4
0
mirror of https://gitee.com/chu1204505056/vue-admin-beautiful.git synced 2025-04-06 03:58:00 +08:00

60 lines
2.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @author chuzhixin 1204505056@qq.com
* @description router全局配置如有必要可分文件抽离其中asyncRoutes只有在intelligence模式下才会用到pro版只支持remixIcon图标
* hidden:true 是否显示在菜单中显示路由默认值false
* alwaysShow:true 当只有一级子路由时是否显示父路由是否显示在菜单中显示路由默认值false
* name:"Demo" 首字母大写一定要与vue文件的name对应起来用于noKeepAlive缓存控制该项特别重要
* meta:{
title:"title" 菜单、面包屑、多标签页显示的名称
roles:["admin","..."] 当config/index.js中rolesControl配置开启时用于控制角色
roles: {
role: ["admin"],
ability: ["READ","WRITE","DELETE"], ability: ["READ","WRITE"],
mode: "allOf" allOf: 数组内所有角色都拥有返回True oneOf: 数组内拥有任一角色返回True(等价第1种数据) except: 不拥有数组内任一角色返回True(取反)
}
icon:"" remix图标
isCustomSvgIcon:false, 是否是自定义svg图标默认值false如果设置true那么需要把你的svg拷贝到icon/remixIcon下然后remixIcon字段配置上你的图标名
noKeepAlive:true 当前路由是否不缓存默认值false
affix:true 当前路由是否固定多标签页
badge:"New" badge小标签只支持子级
tagHidden:true 当前路由是否不显示多标签页
}
*/
const data = [
{
path: '/',
component: 'Layout',
redirect: '/index',
meta: {
title: '首页',
icon: 'home-4-line',
affix: true,
},
children: [
{
path: 'index',
name: 'Index',
component: '@/views/index',
meta: {
title: '首页',
icon: 'home-4-line',
affix: true,
},
},
],
},
]
module.exports = [
{
url: '/menu/navigate',
type: 'get',
response() {
return {
code: 200,
msg: 'success',
data,
}
},
},
]