Explorar o código

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

fan0987 hai 2 meses
pai
achega
c63577f991
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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>