🔱: [client] sync upgrade with 2 commits [trident-sync]

chore:
pull/91/head
GitHub Actions Bot 2024-07-28 19:23:50 +00:00
parent f97827ec76
commit b2971cf5fb
2 changed files with 6 additions and 0 deletions

View File

@ -15,6 +15,9 @@ const util = {
const permissionStore = usePermissionStore();
const userPermissionList = permissionStore.getPermissions;
return userPermissionList.some((permission: any) => {
if (permission === "*") {
return true;
}
return need.includes(permission);
});
},

View File

@ -112,6 +112,9 @@ export const useResourceStore = defineStore({
filterChildrenByPermission(list: any, permissions: any) {
const menus = list.filter((item: any) => {
if (item?.meta?.permission) {
if (permissions.includes("*")) {
return true;
}
return permissions.includes(item.meta.permission);
}
return true;