Browse Source

菜单防抖

main
wang 1 month ago
parent
commit
00cbd28f1f
  1. 4
      smart-flow-web/src/store/modules/system/user.js

4
smart-flow-web/src/store/modules/system/user.js

@ -379,6 +379,10 @@ function injectWorkflowSubMenus(menuNode) {
const dictStore = useDictStore(); const dictStore = useDictStore();
// 从数据字典加载流转状态项列表,实现真正的动态插拔 // 从数据字典加载流转状态项列表,实现真正的动态插拔
const statesDict = dictStore.getDictData('WORKFLOW_STATE') || []; const statesDict = dictStore.getDictData('WORKFLOW_STATE') || [];
if (statesDict.length === 0) {
// 增加防空防丢保护:如果数据字典暂未就绪,直接返回以避免清空或覆盖原菜单项
return;
}
const children = []; const children = [];
statesDict.forEach((item, index) => { statesDict.forEach((item, index) => {

Loading…
Cancel
Save