From 5bebb0546da5d2b34bae52a13f302657c7099755 Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期五, 12 四月 2024 12:06:36 +0800 Subject: [PATCH] 按钮action --- Source/ProjectWeb/src/components/dynamic-components/dynamic-TreeTable.vue | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Source/ProjectWeb/src/components/dynamic-components/dynamic-TreeTable.vue b/Source/ProjectWeb/src/components/dynamic-components/dynamic-TreeTable.vue index 92a07cb..6f6efc4 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" @@ -12,13 +13,13 @@ </template> <!--top鍖哄煙鎸夐挳--> <template slot="menuLeft" slot-scope="scope"> - <dynamic-button :butttonList="componentVO.buttons" :selectList="TreeSelectList" LocationType="top" + <dynamic-button :componentVO="componentVO" :butttonList="componentVO.buttons" :dataStore="TreeSelectList" :sourceData="sourceData" LocationType="top" type="TreeTable"></dynamic-button> </template> <!--menu鍖哄煙鎸夐挳--> <template slot="menu" slot-scope="scope"> - <dynamic-button :butttonList="componentVO.buttons" :scope="scope" :selectList="TreeSelectList" LocationType="menu" default="default" + <dynamic-button :componentVO="componentVO" :butttonList="componentVO.buttons" :scope="scope" :dataStore="TreeSelectList" :sourceData="sourceData" LocationType="menu" default="default" type="TreeTable"></dynamic-button> </template> </avue-crud> @@ -370,6 +371,7 @@ }, sourceData:{ handler(newval) { + //婧愭暟鎹湁鍙樺寲鏃跺彉鏇村綋鍓嶅尯鍩熸暟鎹� console.log(this.areasName); console.log(newval); } @@ -387,13 +389,20 @@ } }, methods: { + rowClickChange(row){ + this.$refs.treeTable.toggleRowSelection(row); + }, TreeSelectChange(row) { this.TreeSelectList = row; this.$emit("setDataStore", { area: this.areasName, + type:this.componentVO.uiComponentType, dataStore:row }); }, + handleRefresh(){ + this.$refs.treeTable.refreshTable(); + } } } </script> -- Gitblit v1.9.3