feat: role management page with component tree (#5675)

* feat: add shadcn tree

* fix: update vbenTree component

* feat: role management demo page

* feat: add cellSwitch renderer for vxeTable

* chore: remove tree examples
This commit is contained in:
Netfan
2025-03-07 16:03:08 +08:00
committed by GitHub
parent 4b9cfcb867
commit b37ed48b9d
19 changed files with 963 additions and 3 deletions

View File

@@ -377,3 +377,14 @@ export const MOCK_MENU_LIST = [
path: '/about',
},
];
export function getMenuIds(menus: any[]) {
const ids: number[] = [];
menus.forEach((item) => {
ids.push(item.id);
if (item.children && item.children.length > 0) {
ids.push(...getMenuIds(item.children));
}
});
return ids;
}