From 00cbd28f1f21c8ce4904e9b2e37654693c90241a Mon Sep 17 00:00:00 2001 From: wang Date: Thu, 11 Jun 2026 14:32:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E9=98=B2=E6=8A=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- smart-flow-web/src/store/modules/system/user.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/smart-flow-web/src/store/modules/system/user.js b/smart-flow-web/src/store/modules/system/user.js index e87e9f4..2080d29 100644 --- a/smart-flow-web/src/store/modules/system/user.js +++ b/smart-flow-web/src/store/modules/system/user.js @@ -379,6 +379,10 @@ function injectWorkflowSubMenus(menuNode) { const dictStore = useDictStore(); // 从数据字典加载流转状态项列表,实现真正的动态插拔 const statesDict = dictStore.getDictData('WORKFLOW_STATE') || []; + if (statesDict.length === 0) { + // 增加防空防丢保护:如果数据字典暂未就绪,直接返回以避免清空或覆盖原菜单项 + return; + } const children = []; statesDict.forEach((item, index) => {