From e88c8eb524bc477ec8a3cac2902c55a4e0982ce7 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期五, 22 三月 2024 10:02:02 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue | 26 ++++++++++++++++++++++---- 1 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue b/Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue index 33a947f..e36cab4 100644 --- a/Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue +++ b/Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue @@ -7,11 +7,13 @@ <el-tree class="filter-tree" show-checkbox + :lazy="lazy" :data="data" + :load="loadNode" :props="defaultProps" :filter-node-method="filterNode" highlight-current - node-key="id" + node-key="oid" ref="tree"> </el-tree> </div> @@ -55,7 +57,8 @@ isShow:{ handler(newval) { if(newval) { - console.log(this.$el.clientHeight)} + //console.log(this.$el.clientHeight) + } } } }, @@ -64,8 +67,8 @@ if (!value) return true; return data[this.defaultProps.label].indexOf(value) !== -1; }, - initData(){ - this.data=[ + initData() { + this.data = [ { "attributes": { "lastmodifier": "1", @@ -1948,6 +1951,20 @@ "text": "琛╗favorite]" } ]; + }, + loadNode(node, resolve) { + //閫愮骇鍔犺浇 + const parentOid = (node.level === 0) ? 0 : node.data.oid; + setTimeout(() => { + const data = [{ + name: 'leaf', + leaf: true + }, { + name: 'zone' + }]; + + resolve(data); + }, 500); } }, data() { @@ -1957,6 +1974,7 @@ children: 'children', label: 'text' }, + lazy:this.componentVO.treeDefineVO.loadType == 'node', data:[] } }, -- Gitblit v1.9.3