duy 11 months ago
parent
commit
584cc337bd
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/views/project/admin/create.vue

+ 2 - 0
src/views/project/admin/create.vue

@@ -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)) {