20260727173703
This commit is contained in:
1 parent
a8478d60ed
commit
9dbaef7787
114 files changed
+959
-2588
No files matched your search
@@ -12,12 +12,17 @@ const permissionStore = usePermissionStore();
|
||||
const menuIcon = (icon) => () => h(icon, { size: 16, strokeWidth: 1.8 });
|
||||
const openKeys = ref(["system"]);
|
||||
const effectiveCollapsed = computed(() => appStore.sidebarCollapsed);
|
||||
function canAccessMenu(item) {
|
||||
if (item.dataCode) return permissionStore.canData(item.dataCode);
|
||||
if (item.moduleCode) return permissionStore.canModule(item.moduleCode);
|
||||
return true;
|
||||
}
|
||||
const menuItems = computed(() => {
|
||||
const systemPages = [
|
||||
{ key: "/system/module-management", label: "模块管理", moduleCode: "m_metadata" },
|
||||
{ key: "/system/i18n-type", label: "多语言类型", moduleCode: "m_i18n_type" },
|
||||
{ key: "/system/login-log", label: "登录日志" },
|
||||
].filter((item) => !item.moduleCode || permissionStore.canModule(item.moduleCode));
|
||||
{ key: "/system/login-log", label: "登录日志", dataCode: "d_login_log" },
|
||||
].filter(canAccessMenu);
|
||||
const items = [{ key: "/dashboard", icon: menuIcon(House), label: "工作台" }];
|
||||
if (systemPages.length)
|
||||
items.push({
|
||||
|
||||
Reference in new issue
Block a user