-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
[Bug Report] inputNumber data cannot be displayed synchronously #12244
Comments
Translation of this issue: Element UI version OS/Browsers version Vue version Reproduction Link Steps to reproduce What is Expected? What is actually happening? |
刚才尝试一下把change事件做了一下改变:
可以达到目的,但是感觉这样太low了 |
只输入整数吗?试试设置 precision 属性。https://jsfiddle.net/zhiyang/yt6cm0e1/ |
@ziyoung 你的例子的确可以用,但是很奇怪 precision = 0 |
@yuminjustin 文档描述的有问题😅,precision 应该是大于或者等于 0 的整数才对。 element/packages/input-number/src/input-number.vue Lines 94 to 97 in 8de71d0
|
Element UI version
2.4.5
OS/Browsers version
win10/chromium 63
Vue version
2.5.17
Reproduction Link
http://jsfiddle.net/L3w6mrt2/2//
Steps to reproduce
链接中的示例:手动输入1.6,进入绑定的change事件中,把组件state改成非浮点数。由于初始值就是1,输入的1.6,使用Math.floor的方法将值改成了1,组件的test实际为1,但界面依然是1.6。除非另外输入2.6,界面就会显示成2。
What is Expected?
其实我就是新作一个禁止输入浮点数的功能
What is actually happening?
当change事件中经过处理后的值跟原来的值相同时,无法变更界面显示。
The text was updated successfully, but these errors were encountered: