From 8f8d3455d6d3efcab763cff3cbd156c37080ef4c Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Mon, 7 Oct 2024 11:19:14 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E9=9C=80=E8=A6=81=E7=9B=91=E5=90=AC?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=AE=AD=E5=A4=B4=E5=B1=95=E5=BC=80=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5=20=E5=90=A6=E5=88=99=E5=B1=95=E5=BC=80/?= =?UTF-8?q?=E6=8A=98=E5=8F=A0=E7=9A=84=E6=95=B0=E6=8D=AE=E4=B8=8D=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/system/dept/index.vue | 5 +++++ apps/web-antd/src/views/system/menu/index.vue | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/apps/web-antd/src/views/system/dept/index.vue b/apps/web-antd/src/views/system/dept/index.vue index 5826267e..12cc026e 100644 --- a/apps/web-antd/src/views/system/dept/index.vue +++ b/apps/web-antd/src/views/system/dept/index.vue @@ -82,6 +82,11 @@ const [BasicTable, tableApi] = useVbenVxeGrid({ tableApi.grid.setTreeExpand(row, !isExpanded); row.expand = !isExpanded; }, + // 需要监听使用箭头展开的情况 否则展开/折叠的数据不一致 + toggleTreeExpand: (e: any) => { + const { row = {}, expanded } = e; + row.expand = expanded; + }, }, }); const [DeptDrawer, drawerApi] = useVbenDrawer({ diff --git a/apps/web-antd/src/views/system/menu/index.vue b/apps/web-antd/src/views/system/menu/index.vue index 0f34da37..6d1a310f 100644 --- a/apps/web-antd/src/views/system/menu/index.vue +++ b/apps/web-antd/src/views/system/menu/index.vue @@ -79,6 +79,11 @@ const [BasicTable, tableApi] = useVbenVxeGrid({ tableApi.grid.setTreeExpand(row, !isExpanded); row.expand = !isExpanded; }, + // 需要监听使用箭头展开的情况 否则展开/折叠的数据不一致 + toggleTreeExpand: (e: any) => { + const { row = {}, expanded } = e; + row.expand = expanded; + }, }, }); const [MenuDrawer, drawerApi] = useVbenDrawer({