[Vue warn] Set operation on key “dialogVisible“ failed: target is readonly
el-dialog对话框关闭时控制台警告: [Vue warn] Set operation on key "dialogVisible" failed: target is readonly
·
[Vue warn] Set operation on key “dialogVisible” failed: target is readonly.
<el-dialog
v-model="dialogVisible"
title="Tips"
width="30%"
:before-close="handleClose"
>
</el-dialog>
1. 经过多次反复尝试, 导致警告的原因就是 v-model=“dialogVisible” 这行代码
2. 将 v-model=“dialogVisible” 直接替换成 :model-value=“dialogVisible” 就可以解决了
更多推荐
已为社区贡献2条内容
所有评论(0)