
this.$prompt是element-ui一个弹窗组件,下面增加一些功能,比如显示默认值、校验等功能!
this.$prompt("文本名称:", "温馨提示", {
inputValue: '默认值',
inputType: "number", //input类型
inputErrorMessage: '输入不能为空',
inputValidator: (value) => {//input校验
if(!value) {
return '输入不能为空';
}
},
confirmButtonText: "确定",
cancelButtonText: "取消"
})
.then(({ value }) => {
//提交方法
})
.catch(() => {});
this.$prompt如何做手机号码验证(判断手机号码是否正确)
标签: this.$prompt, 弹窗组件
上面是“this.$prompt输入框中显示默认值、校验等功能”的全面内容,想了解更多关于 vuejs 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_2381.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

在访问WordPress网站时,出现404页面,提示页面不存在
CodeConvert AI:可以帮助用户将代码从一种编程语言转换为另一种编程语言