问题描述
在on change回调中不能再次改变value的值
问题出现的环境背景及自己尝试过哪些方法
相关代码
// 请把代码文本粘贴到下方(请勿用图片代替代码)
data() {
return {
isChecked: false
}
},
const h = this.$createElement;
const _this = this;
this.$msgbox({
title: '提示',
message: h('div', null, [
h('p', null, '已将当前房源分配到 “长租整租房源” 中您可前往继续编辑房源详情'),
h('ElCheckbox', {
props: {
value: _this.isChecked
},
on: {
change(val) {
_this.isChecked = val;
}
}
}, '不再提示'),
]),
type: 'success',
showCancelButton: true,
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(res => {
// console.log(res);
}).catch(err => {
});