---修复数字输入组件无法正常输入负数和小数点问题
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user