【vue】el-dialog点击外部不关闭对话框
代码示例
<el-dialog title=""
append-to-body
:close-on-click-modal = "false"
:visible.sync="box"
width="345px">
<span>你好</span>
<span slot="footer"
class="dialog-footer">
<el-button @click="box = false">取 消</el-button>
<el-button type="primary"
@click="submit">确 定</el-button>
</span>
</el-dialog>
图片示例

说明:
1.close-on-click-modal属性控制点击模态框是否关闭,false表示不关闭,注意前面要加英文冒号 :。
本文介绍如何使用Vue的el-dialog组件,并通过设置close-on-click-modal属性为false来实现点击模态框外部区域时不关闭对话框的功能。
8948





