@@ -349,6 +349,8 @@ const formatInput = (value)=>{
if (!value) {
return ''
}
+ // 移除非数字和小数点
+ value = value.replace(/[^\d.]/g, '')
// 使用正则表达式匹配输入是否合法
const regExp = /^\d+(\.\d{0,2})?$/
if (regExp.test(value)) {