
element中的this.$prompt事件如何做手机号码验证,下面web建站小编给大家简单介绍一下具体实现代码!
editPhone() {
this.$prompt('您确定要修改当前手机号码', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
inputValidator: (val) => {
if (val === null) {
return true
}
return !(val.length > 11 || val.length < 11)
},
inputErrorMessage: '格式不正确'
}).then(({ value }) => {
this.rowCurr.patientPhone = value
}).catch(() => {
this.$message({
type: 'info',
message: '取消输入'
})
})
},
标签: this.$prompt, 手机号码验证
上面是“this.$prompt如何做手机号码验证(判断手机号码是否正确)”的全面内容,想了解更多关于 vuejs 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_4464.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

帝国cms如何在tags列表页获取当前tag的ID方法
利用css3+div做一个动态红灯笼(摇摆效果)
布丁扫描APP最新版
KaLM-Embeddin:腾讯团队推出的一系列高性能文本嵌入模型