diff --git a/src/components/input-number/input-number.model.ts b/src/components/input-number/input-number.model.ts index a49eb8a..6adab4c 100644 --- a/src/components/input-number/input-number.model.ts +++ b/src/components/input-number/input-number.model.ts @@ -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); }