jd-opensource / jd-opensource/taro-ui
input-number无法输入0.
Open
- Dominant language
- TypeScript
- Stars
- 4.7k
- Forks
- 740
- PR merge metrics
- No merged PRs in 30d
Description
**复现步骤**
1 输入0.
2 组件处理为0
3 无法继续输入0.1
```js
// 这里可以贴代码
components/input-number/index.tsx line: 101 源代码如下
if (resultValue && !Number(resultValue)) {
resultValue = parseFloat(String(resultValue)) || min
this.handleError({
type: 'OVER',
errorValue: resultValue!
})
}
```
**期望行为**
可以输入小数,0.xx,源代码判断条件需要修改
**报错信息**
无报错
**系统信息**
👽 Taro v2.2.7
Taro CLI 2.2.7 environment info:
System:
OS: Windows 10
Binaries:
Node: 10.15.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.16.0 - C:\Users\bg344717\AppData\Roaming\npm\yarn.CMD
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
**补充信息**
Contributor guide
Assessment
This issue has not been assessed yet.