【问题标题】:How to format number input in react native where there is one number per box for 6 boxes?如何在反应原生中格式化数字输入,其中每盒有一个数字,用于 6 个盒子?
【发布时间】:2021-12-23 16:22:07
【问题描述】:

我正在构建一个带有本机反应的应用程序,并且我正在尝试将数字输入格式设置为这样,其中每个框有一个整数。光标也在下一个框中,已填充的框有更大的边框。任何想法都会有所帮助。

【问题讨论】:

  • 请提供足够的代码,以便其他人更好地理解或重现问题。

标签: javascript css react-native


【解决方案1】:

试试react-native-otp-form

import {OTP} from 'react-native-otp-form';

<OTP
    codeCount={6}
    containerStyle={{marginTop: 50}}
    otpStyles={{backgroundColor: '#eee'}}
/>

【讨论】:

    猜你喜欢
    • 2019-06-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-24
    • 1970-01-01
    相关资源
    最近更新 更多