简体   繁体   English

我如何在 react-native 输入中计算?

[英]How to i can calclulate in react-native input?

I got an problem to calculate my input in react-native, sorry, im total new in React-native and stack overflow.我在计算 react-native 中的输入时遇到问题,对不起,我在 React-native 中完全是新的并且堆栈溢出。 Correct me if I'm wrong.如我错了请纠正我。

The Code编码

The Output Output

Add in your TextInput the keyboardType="numeric" parameter, i think the problem is calculate with string not a number look here textinput在您的 TextInput 中添加keyboardType="numeric" 参数,我认为问题是用字符串计算而不是数字看这里textinput

<TextInput
    ...
    keyboardType="numeric"
  />

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM