From 3a6cec3cc9068778953f21516660bc4403bc7ceb Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期一, 04 八月 2025 18:24:28 +0800 Subject: [PATCH] fix: 修改功能模块 --- src/views/System/ModuleManage.vue | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/views/System/ModuleManage.vue b/src/views/System/ModuleManage.vue index 40f8562..5389d40 100644 --- a/src/views/System/ModuleManage.vue +++ b/src/views/System/ModuleManage.vue @@ -425,13 +425,12 @@ } async function getBaseModuleGetAllSubModule(module: TreeModuleDtoGroupDto, type: SubModuleType) { try { - const defaultGroup = currentDrawerModule.value.groups.find((g) => g.group === 'default'); + const defaultGroup = currentDrawerModule.value.groups.find((g) => g.group === 'default') ?? {}; if (type === SubModuleType.Column) { - drawerState.tableData = defaultGroup.fields; + drawerState.tableData = defaultGroup.fields ?? []; } else { - drawerState.tableData = defaultGroup.buttonLocations.find( - (b) => b.location === SubModuleKey[type] - ); + drawerState.tableData = + defaultGroup.buttonLocations?.find((b) => b.location === SubModuleKey[type])?.buttons ?? []; } drawerVisible.value = true; } catch (error) {} -- Gitblit v1.9.1