From bcb1aaaadad892fe02e4de9a1fdb10cb99fea9bc Mon Sep 17 00:00:00 2001 From: ludc Date: 星期一, 08 四月 2024 12:01:46 +0800 Subject: [PATCH] Func工具类添加 --- Source/ProjectWeb/src/components/dynamic-components/dynamic-TreeTable.vue | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/Source/ProjectWeb/src/components/dynamic-components/dynamic-TreeTable.vue b/Source/ProjectWeb/src/components/dynamic-components/dynamic-TreeTable.vue index 5ab9176..b563d16 100644 --- a/Source/ProjectWeb/src/components/dynamic-components/dynamic-TreeTable.vue +++ b/Source/ProjectWeb/src/components/dynamic-components/dynamic-TreeTable.vue @@ -5,6 +5,7 @@ :data="TreeData" :option="option" :page.sync="pageType" + @row-click="rowClickChange" @selection-change="TreeSelectChange"> <template #icon="scope"> <i :class="scope.row.icon" @@ -367,6 +368,13 @@ this.parentHeight = this.$el.clientHeight - this.$children[0].$children[1].$children[0].$el.clientHeight - this.$children[0].$children[2].$el.clientHeight - 5; } } + }, + sourceData:{ + handler(newval) { + //婧愭暟鎹湁鍙樺寲鏃跺彉鏇村綋鍓嶅尯鍩熸暟鎹� + console.log(this.areasName); + console.log(newval); + } } }, mounted() { @@ -377,12 +385,19 @@ }, computed: { pageType() { - return this.areasName === 'westArea' ? this.simplePage : this.page; + return this.areasName.indexOf('westArea') == 0 ? this.simplePage : this.page; } }, methods: { + rowClickChange(row){ + this.$refs.treeTable.toggleRowSelection(row); + }, TreeSelectChange(row) { this.TreeSelectList = row; + this.$emit("setDataStore", { + area: this.areasName, + dataStore:row + }); }, } } -- Gitblit v1.9.3