docs: route meta
This commit is contained in:
parent
663a2c7173
commit
609c1b4b4b
@ -229,7 +229,7 @@ export const dynamicRoutes: RouteRecordRaw[] = [
|
|||||||
name: "PagePermission",
|
name: "PagePermission",
|
||||||
meta: {
|
meta: {
|
||||||
title: "页面级",
|
title: "页面级",
|
||||||
roles: ["admin"] // 或者在子导航中设置角色
|
roles: ["admin"] // 或者在子路由中设置角色
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
9
types/vue-router.d.ts
vendored
9
types/vue-router.d.ts
vendored
@ -33,15 +33,14 @@ declare module "vue-router" {
|
|||||||
*/
|
*/
|
||||||
affix?: boolean
|
affix?: boolean
|
||||||
/**
|
/**
|
||||||
* @description 当一个路由下面的 children 声明的路由大于 1 个时,自动会变成嵌套的模式,
|
* @description 当一个路由的 children 属性中声明的非隐藏子路由只有 1 个且该子路由为叶子节点时,会将这个子路由当做父路由显示在侧边栏
|
||||||
* @description 只有一个时,会将那个子路由当做根路由显示在侧边栏,
|
* @description 当大于 1 个时,会恢复成嵌套模式
|
||||||
* @description 若想不管路由下面的 children 声明的个数都显示你的根路由,
|
* @description 如果想不管个数总是显示父路由,可以在父路由上设置 alwaysShow: true
|
||||||
* @description 可以设置 alwaysShow: true,这样就会忽略之前定义的规则,一直显示根路由
|
|
||||||
*/
|
*/
|
||||||
alwaysShow?: boolean
|
alwaysShow?: boolean
|
||||||
/**
|
/**
|
||||||
* @description 示例: activeMenu: "/xxx/xxx",
|
* @description 示例: activeMenu: "/xxx/xxx",
|
||||||
* @description 当设置了该属性进入路由时,则会高亮 activeMenu 属性对应的侧边栏。
|
* @description 当设置了该属性进入路由时,则会高亮 activeMenu 属性对应的侧边栏
|
||||||
* @description 该属性适合使用在有 hidden: true 属性的路由上
|
* @description 该属性适合使用在有 hidden: true 属性的路由上
|
||||||
*/
|
*/
|
||||||
activeMenu?: string
|
activeMenu?: string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user