添加属性 :close-on-click-modal="false"
<el-dialog :visible.sync="dialogShow" title="添加收藏" class="favoritedialog" :close-on-click-modal="false">
<div style="border: 1px solid #D9D9D9;margin: 0px;position: relative; 400px;height: 500px;">
<div id="treeDialog" style="height: 100%;">
<el-scrollbar style="height:100%;">
<el-tree
:data="treeDatas"
empty-text="无收藏菜单"
show-checkbox
node-key="id"
default-expand-all
:filter-node-method="filterNode"
:props="defaultProps"
:destroy-on-close="true"
:default-checked-keys="checkedKeys"
ref="tree"
>
</el-tree>
</el-scrollbar>
</div>
</div>
<div style="border: 1px #D9D9D9;height: 28px;margin-top: 0px;" class="myelinput">
<el-input class="favoriteinput" placeholder="请输入文字" v-model="filterText" style="padding-bottom: 0px;height: 28px;">
</el-input>
</div>
<div class="modal-footer">
<el-button type="button" class="btn btn-default" size="mini" data-dismiss="modal" @click="closeDialog">取消</el-button>
<el-button id="finishBtn" type="button" class="btn btn-primary" size="mini" @click="checkMenus" style="margin-left: 0px; margin-right: 10px;color:#FFF;background-color: #409EFF;">确定</el-button>
</div>
</el-dialog>
————————————————
版权声明:本文为CSDN博主「从面朝大海到春暖花开」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/u010313342/article/details/109783834