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
You can set active-change="false" to fix this problem <InputNumber v-model="value" :min="1" :max="9999999999" style="width:100%;" :precision="2" :step="0.01" :active-change="false" > </InputNumber>
Environment
vue3.2.33
Reproduction link
https://www.iviewui.com/view-ui-plus/component/form/input-number
Steps to reproduce
设置precision = 2
What is expected?
期待失去焦点触发toFixed,而不是computed
What is actually happening?
假如我想输入2.22 当我输入2时 我的value会立刻变成2.00 这时候我需要backspace
InputNumber源码:
precisionValue () {
// can not display 1.0
if(!this.currentValue) return this.currentValue;
return this.precision ? this.currentValue.toFixed(this.precision) : this.currentValue;
},
formatterValue () {
if (this.formatter && this.precisionValue !== null) {
return this.formatter(this.precisionValue);
} else {
return this.precisionValue;
}
}
The text was updated successfully, but these errors were encountered: