File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1818 :render-content =" renderContent"
1919 @node-expand =" handleNodeExpand" >
2020 </el-tree-node >
21- <div class =" el-tree__empty-block" v-if =" !root.childNodes || root.childNodes.length === 0 " >
21+ <div class =" el-tree__empty-block" v-if =" isEmpty " >
2222 <span class =" el-tree__empty-text" >{{ emptyText }}</span >
2323 </div >
2424 <div
141141
142142 treeItemArray () {
143143 return Array .prototype .slice .call (this .treeItems );
144+ },
145+
146+ isEmpty () {
147+ const { childNodes } = this .root ;
148+ return ! childNodes || childNodes .length === 0 || childNodes .every (({visible}) => ! visible);
144149 }
145150 },
146151
147152 watch: {
148153 defaultCheckedKeys (newVal ) {
149- this .store .defaultCheckedKeys = newVal;
150154 this .store .setDefaultCheckedKey (newVal);
151155 },
152156
You can’t perform that action at this time.
0 commit comments