From 2b34bc88b85a4c67d4767e9883d43834096c2e72 Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期四, 21 三月 2024 17:53:21 +0800 Subject: [PATCH] UI上下文展示引擎 --- 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