Browse Source

控制银行账号只允许输入纯数字

fan0987 2 months ago
parent
commit
c63577f991
1 changed files with 2 additions and 1 deletions
  1. 2 1
      bidding-ui/src/views/mine/bankinfo.vue

+ 2 - 1
bidding-ui/src/views/mine/bankinfo.vue

@@ -22,7 +22,8 @@
         </el-col>
         <el-col :span="12">
           <el-form-item label="银行账号" prop="hAccount">
-            <el-input type="text" v-model.trim="form.hAccount" :disabled="!isEdit" />
+            <el-input type="text" v-model.trim="form.hAccount" 
+              @input="(v) => (form.hAccount = v.replace(/[^\d]/g, ''))" :disabled="!isEdit" />
           </el-form-item>
         </el-col>
       </el-row>