【问题标题】:ant design input direction when is empty为空时的ant design输入方向
【发布时间】:2021-04-18 20:44:56
【问题描述】:

当输入值为空时如何将输入方向设置为rtl,否则设置为auto

https://codesandbox.io/s/antd-input-direction-lofk3

【问题讨论】:

    标签: reactjs input antd right-to-left


    【解决方案1】:

    你可能会做这样的事情。我放置了一个 useState 来处理输入的值,并使用 template literalconditional operator 对其做出反应

    https://codesandbox.io/s/antd-input-direction-forked-dogr1

    【讨论】:

      猜你喜欢
      • 2021-01-31
      • 1970-01-01
      • 1970-01-01
      • 2020-07-11
      • 1970-01-01
      • 2020-03-11
      • 2021-04-29
      • 2020-07-29
      • 1970-01-01
      相关资源
      最近更新 更多