element-ui-ykx
v1.2.10
Published
按产品需求,修改element-ui一点点功能
Downloads
4
Readme
Links
update message-box $prompt
<template>
<el-button type="text" @click="open3">点击打开 Message Box</el-button>
</template>
<script>
export default {
methods: {
open3() {
this.$prompt('请输入邮箱', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
inputErrorMessage: '邮箱格式不正确',
showChecked: true, //showChecked: 是否显示checked,type:boolean,默认为false
isChecked: true, //isChecked: checked状态,type:boolean,默认为true
checkedText: '推送到APP'//checkedText: checked描述文字,type:string
}).then(({ value }) => {
this.$message({
type: 'success',
message: '你的邮箱是: ' + value
});
}).catch(() => {
this.$message({
type: 'info',
message: '取消输入'
});
});
}
}
}
</script>
此功能用法详解: element-ui