feat: bot-bridge+verify合并 — API+数据库+验证引擎
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
import { MenuItem } from './types/menu'
|
||||
// MenuItem接口定义
|
||||
interface MenuItem {
|
||||
path: string
|
||||
label: string
|
||||
icon: string
|
||||
roles: string[]
|
||||
group?: string
|
||||
}
|
||||
|
||||
// ── 角色路由映射 ──
|
||||
export const ROLE_ROUTES: Record<string, string[]> = {
|
||||
@@ -73,3 +80,6 @@ export function hasAction(role: string, action: string): boolean {
|
||||
const actions = ROLE_ACTIONS[role]
|
||||
return actions ? actions.includes(action) : false
|
||||
}
|
||||
|
||||
// 防止tree-shaking优化掉菜单数据
|
||||
void MENU_ITEMS;
|
||||
|
||||
Reference in New Issue
Block a user