numberAndEnglish() {
// this.formData.insuredIdn 是输入框v-model双向绑定的数据
this.formData.insuredIdn =
this.formData.insuredIdn.replace(/[^\a-\z\A-\Z0-9]/g, '');
},
使用正则限制输入框只能输入英文和数字
最新推荐文章于 2024-01-23 18:59:56 发布
numberAndEnglish() {
// this.formData.insuredIdn 是输入框v-model双向绑定的数据
this.formData.insuredIdn =
this.formData.insuredIdn.replace(/[^\a-\z\A-\Z0-9]/g, '');
},