mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-06 14:33:11 +08:00
2.6 KiB
Executable File
2.6 KiB
Executable File
RouteMetaRaw 类型属性说明
本文档详细说明了 Fantastic-admin 框架中路由 meta 对象的所有可用属性。
目录
权限相关
auth
- 类型:
string | string[] - 默认值:
undefined - 说明: 路由访问权限,配置为数组时,只需满足一个即可进入
- 示例:
auth: 'news:view' // 需要具备 news:view 权限 auth: ['news:view', 'news:edit'] // 需要具备其中一个权限
导航显示
title
- 类型:
string | (() => string) - 默认值:
undefined - 说明: 标题会在导航、标签页、面包屑等需要的展示位置显示
- 示例:
title: '新闻管理' title: () => '动态标题'
icon
- 类型:
string - 默认值:
undefined - 说明: 图标
- 示例:
icon: 'i-ep:lock' // 默认显示 i-ep:lock 图标
menu
- 类型:
boolean - 默认值:
true - 说明: 是否在导航中显示,当子导航里没有可展示的导航时,会直接显示父导航
activeMenu
- 类型:
string - 默认值:
undefined - 说明: 高亮导航,需要设置完整路由地址
- 示例:
activeMenu: '/news/list'
expand
- 类型:
boolean - 默认值:
undefined - 说明: 是否默认展开
- 示例:
expand: true // 默认展开
breadcrumb
- 类型:
boolean - 默认值:
true - 说明: 是否在面包屑中显示
页面行为
keepAlive
- 类型:
boolean | string | string[] - 默认值:
undefined - 说明: 保活,根据规则保活当前路由页面
- 示例:
keepAlive: true // 始终保活 keepAlive: 'news' // 访问路由name为news的页面时保活 keepAlive: ['news', 'user'] // 访问路由name为news或user的页面时保活
noKeepAlive
- 类型:
string | string[] - 默认值:
undefined - 说明: 不保活,根据规则不保活当前路由页面
- 示例:
noKeepAlive: 'news' // 访问路由name为news的页面时不保活 noKeepAlive: ['news', 'user'] // 访问路由name为news或user的页面时不保活
link
- 类型:
string - 默认值:
undefined - 说明: 外部链接,会在浏览器新窗口访问该链接
- 示例:
link: 'https://fantastic-admin.hurui.me' // 在浏览器新窗口打开 Fantastic-admin 官网