prseFloat()函数在Android上没问题,在iOS上是NaN,有谁知道什么原因吗?
这是输入框:
< input class = "cjj_input" value = "{{cjj}}" placeholder = "成交价" bindinput = "cjjInput" type = "digit" ></ input > < input class = "shoushu_input" value = "{{shoushu}}" placeholder = "手数" bindinput = "shoushuInput" type = "number" ></ input > |
data: { cjj: 0 , // 当前点数 shoushu: 0 , // 手数 }, cjjInput: function (e) { var value = e.detail.value; this .data.cjj = parseFloat(value); }, shoushuInput: function (e) { var value = e.detail.value; this .data.shoushu = parseFloat(value); }, |
有大佬碰到这个问题吗?