Commit d777c01c authored by 张烨's avatar 张烨

fix: 功能分组无子项时展示为功能

parent 4c9250a7
...@@ -10,7 +10,7 @@ const tip = 'loading...'; ...@@ -10,7 +10,7 @@ const tip = 'loading...';
export const getId = item => export const getId = item =>
item.userID || item.roleID || item.stationID || item.id; item.userID || item.roleID || item.stationID || item.id;
export const checkIsGroup = node => export const checkIsGroup = node =>
['widgetGroup'].includes(node?.type || node); ['widgetGroup'].includes(node?.type || node) && node.children?.length > 0;
export const checkChildrenByCondition = (item, fn, tag = 'every') => { export const checkChildrenByCondition = (item, fn, tag = 'every') => {
if (!checkIsGroup(item)) { if (!checkIsGroup(item)) {
return fn(item); return fn(item);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment