You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The InputNumber component in ViewUIPlus has a precision property that controls the number of decimal places for the value. If the component adds an extra digit when losing focus, it is likely due to the precision property not being set correctly.
To resolve this issue without needing an additional blur event, you should set the precision property to the desired number of decimal places. This ensures that the value is formatted correctly when the input loses focus.
Here is an example of how to use the precision property:
In this example, the precision is set to 2, which means the value will be formatted to two decimal places when the input loses focus. Additionally, the formatterValue property in the component ensures that the value is displayed correctly in the input field [1][2].
Environment
"vue": "^3.4.27",chrome
Reproduction link
https://run.iviewui.com/
Steps to reproduce
当我使用指令或者事件去限制了input能输入的位数,在我失去焦点的时候会自动多加一位,必须在绑定一个失焦事件再去限制一下才能解决这个问题
What is expected?
在去焦点的时候不会再多赋值一位,无需额外事件去处理
What is actually happening?
需要额外的事件去处理,再去截取一下需求的位数
The text was updated successfully, but these errors were encountered: