添加属性 :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;width: 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=&