---修复数字输入组件无法正常输入负数和小数点问题

This commit is contained in:
2026-03-02 15:36:56 +08:00
parent 9aba50620a
commit 52704d9937

View File

@ -39,12 +39,13 @@ export class InputNumberModel {
setViewValue(value: ValueType) {
this.viewValue = value;
if(value!=undefined && (value+"").endsWith(".")) return;
this.modelValue = this.viewToModel(value);
this.triggerVm();
}
viewToModel(vv: ValueType):ValueType {
if(vv==undefined) return;
if(vv==undefined || vv=="" || vv=="-") return;
if(!this.focus){
this.viewValue = Number.format(Number.parse(vv),this.numberFormat);
}