This commit is contained in:
PC-202306242200\Administrator
2024-09-19 18:28:02 +08:00
parent 9ea99f1dda
commit 2081393a33
39 changed files with 821 additions and 194 deletions

View File

@@ -9,6 +9,7 @@ interface Item {
menuType?: string;
disabledTooltip?: boolean;
access?: any;
orderNum?: number;
}
@@ -37,6 +38,5 @@ export const childrenRemove = (data: Item[] | undefined): Item[] => {
list.push(i);
}
});
return list; // 返回处理后的列表
return list.sort((a, b) => (a.orderNum === 0 ? -1 : b.orderNum === 0 ? 1 : a.orderNum - b.orderNum));
};