fix: 修复无消费权限闪屏
This commit is contained in:
@@ -61,6 +61,13 @@ export type NavigateFn = (page: Page, options?: NavigateOptions) => void;
|
||||
export type Notice = { type: "success" | "error" | "info"; text: string } | null;
|
||||
export type NavItem = { page: Page; label: string; icon: typeof Home; badge?: string };
|
||||
|
||||
// 仅团队主账号可访问的团队级页面。入口与路由守卫共用此规则,避免权限逻辑分散。
|
||||
const OWNER_ONLY_PAGES = new Set<Page>(["team", "account"]);
|
||||
|
||||
export function isOwnerOnlyPage(page: Page) {
|
||||
return OWNER_ONLY_PAGES.has(page);
|
||||
}
|
||||
|
||||
export const mainNav: NavItem[] = [
|
||||
{ page: "dashboard", label: "工作台", icon: Home },
|
||||
{ page: "products", label: "商品库", icon: Package },
|
||||
|
||||
Reference in New Issue
Block a user