Skip to content
On this page

菜单配置

菜单数据存储在local Storage

ts
import { CacheKey } from '@dt-frames/core'

// 菜单数据
const menus = []
// 设置菜单
setLocal(CacheKey.MENUS, menus)
// 获取菜单
getLocal(CacheKey.MENUS)

菜单项类型

ts
export interface Menus {
    id: string;
    icon: string;
    label: string;
    enLabel?: string;
    url?: string;
    children?: Array<Menus>
    [key: string]: any
}

配置菜单流程

  • 1、进入 "安全授权" -> "资源管理" -> "新增"
  • 2、添加菜单资源
  • 3、进入 "安全授权" -> "角色管理" -> 选择角色 -> "设置"
  • 4、退出系统,重新登录,即可看见刚才创建的菜单