重构用户权限
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
2025-09-25 18:41:32 +08:00
parent 4429e2f018
commit efbca0e802
15 changed files with 619 additions and 187 deletions

View File

@@ -87,7 +87,12 @@ const menus = computed<MenuOption[]>(() => [
icon: renderIcon("streamline-emojis:palm-tree"),
},
{
label: () => h(RouterLink, { to: "/admin" }, { default: () => "后台" }),
label: () =>
h(
RouterLink,
{ to: userStore.isTheAdmin ? "/admin/problem/list" : "/admin" },
{ default: () => (userStore.isTheAdmin ? "我出的题" : "后台") },
),
show: userStore.isAdminRole,
key: "admin",
icon: renderIcon("streamline-emojis:ghost"),