确认框/confirm
使用方式
<script>
methods: {
fun() {
this.$confirm({
title:'提示',
content:'可以在这里说点什么',
successText:'确 定',
cancelText:'取 消'
}).then(()=>{
// 点击确认 执行的代码
}).catch(()=>{
// 点击取消 执行的代码
})
}
}
</script>
$confirm 配置说明
参数 | 类型 | 默认值 | 作用 |
---|---|---|---|
title | String | Null | 弹窗的标题 |
content | String | Null | 确认框的内容 |
successText | String | 确 认 | 确认按钮的文本 |
cancelText | String | 取 消 | 取消按钮的文本 |