fix(Stepper): skip form number validation (#5792)

This commit is contained in:
chenjiahan
2020-03-11 17:24:22 +08:00
parent 3ff8eee270
commit 7af2c99b4a
7 changed files with 31 additions and 44 deletions
+2
View File
@@ -6,6 +6,8 @@ export function formatNumber(value: string, allowDot: boolean) {
value =
value.slice(0, dotIndex + 1) + value.slice(dotIndex).replace(/\./g, '');
}
} else {
value = value.split('.')[0];
}
const regExp = allowDot ? /[^0-9.]/g : /\D/g;