【问题标题】:placeholder textinput not displaying (react native)占位符文本输入不显示(反应原生)
【发布时间】:2022-01-21 10:27:24
【问题描述】:

我的占位符没有显示在我的文本输入中,有人可以帮助我吗? 我正在使用本机反应

<TextInput
  style={{
    height: "15%",
    margin: 12,
    border: 1,
    borderColor: "white",
    borderStyle: "solid",
    placeholder: "this is a test",
    padding: 10,
    borderRadius: 20,
    width: "70%",
    backgroundColor: "#E5E5E5"
  }}
></TextInput>;

【问题讨论】:

    标签: javascript reactjs native placeholder textinput


    【解决方案1】:

    直接使用占位符属性,不传递css样式

    查看反应原生文档: https://reactnative.dev/docs/textinput

    【讨论】:

    • 是的,非常感谢:))))
    猜你喜欢
    • 1970-01-01
    • 2023-03-20
    • 2013-12-28
    • 2023-02-15
    • 2021-09-21
    • 2019-09-28
    • 2020-03-06
    • 2021-02-06
    • 1970-01-01
    相关资源
    最近更新 更多