watch: {
'formData.phone':{
handler: function(newVal, oldVal) {
if (!(Number(newVal)+'' !==NaN+'' )) {
this.formData.phone = newVal.replace(/[^0-9]/g,'')
}
},
deep: true
}
},
<el-input
v-model="formData.phone"
placeholder="请输入"
clearable
maxlength="11"
:style="{ width: '100%' }"
>
08-01
3687
