Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inputNumber 精度问题 #53

Open
PPPenny opened this issue Apr 8, 2020 · 0 comments
Open

inputNumber 精度问题 #53

PPPenny opened this issue Apr 8, 2020 · 0 comments

Comments

@PPPenny
Copy link

PPPenny commented Apr 8, 2020

Is your feature request related to a problem? Please describe.
组件如此使用

         <el-input-number
                 v-model="weight"
                 :min="0"
                 :max="999"
                 :step="0.00001"
                 step-stricky
                 :controls="false"
               />

Describe the solution you'd like

当输入 1 的时候,结果为1.0000000000000002
不要设置pricision,因为界面上不想显示:1.00000
:step="0.00001" step-stricky
是为了保证输入最多5位小数

Describe alternatives you've considered

Additional context
在blur 里面帮忙处理一下,但是还要考虑到科学计数法的情况:如 0.0000001 显示的是 1e-7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant