From 4a7268ffc37410588acbbac009a46b380d010657 Mon Sep 17 00:00:00 2001 From: izory <791736813@qq.com> Date: Sat, 20 Nov 2021 13:27:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E9=97=A8=E7=AE=A1=E7=90=86=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B1=95=E5=BC=80=E6=8A=98=E5=8F=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZR.Vue/src/views/system/dept/index.vue | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ZR.Vue/src/views/system/dept/index.vue b/ZR.Vue/src/views/system/dept/index.vue index ec19685..af46207 100644 --- a/ZR.Vue/src/views/system/dept/index.vue +++ b/ZR.Vue/src/views/system/dept/index.vue @@ -19,10 +19,14 @@ 新增 + + + 展开/折叠 + - + @@ -119,6 +123,10 @@ export default { showSearch: true, // 表格树数据 deptList: [], + // 是否展开,默认全部折叠 + isExpandAll: false, + // 重新渲染表格状态 + refreshTable: true, // 部门树选项 deptOptions: [], // 弹出层标题 @@ -283,6 +291,14 @@ export default { this.msgSuccess("删除成功"); }); }, + //展开/折叠操作 + toggleExpandAll() { + this.refreshTable = false; + this.isExpandAll = !this.isExpandAll; + this.$nextTick(() => { + this.refreshTable = true; + }); + }, }, };