| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- // 静态路由配置
- // 书写格式与动态路由格式一致,全部经由框架统一转换
- // 比较动态路由在meta中多加入了role角色权限,为数组类型。一个菜单是否有权限显示,取决于它以及后代菜单是否有权限。
- // routes 显示在左侧菜单中的路由(显示顺序在动态路由之前)
- // 示例如下
- // const routes = [
- // {
- // name: "demo",
- // path: "/demo",
- // meta: {
- // icon: "el-icon-eleme-filled",
- // title: "演示",
- // role: ["SA"]
- // },
- // children: [{
- // name: "demopage",
- // path: "/demopage",
- // component: "test/autocode/index",
- // meta: {
- // icon: "el-icon-menu",
- // title: "演示页面",
- // role: ["SA"]
- // }
- // }]
- // }
- // ]
- const routes = [
- {
- name: "material",
- path: "/material",
- meta: {
- icon: "el-icon-picture",
- title: "素材管理",
- },
- children: [
- {
- name: "materialIndex",
- path: "/material/index",
- component: "material/index",
- meta: {
- icon: "el-icon-folder",
- title: "素材库",
- },
- },
- ],
- },
- // {
- // name: "permission",
- // path: "/permission",
- // meta: {
- // icon: "el-icon-lock",
- // title: "权限管理",
- // },
- // children: [
- // {
- // name: "permissionRoleList",
- // path: "/permission/role",
- // component: "permission/role/list/index",
- // meta: {
- // icon: "el-icon-user-filled",
- // title: "身份列表",
- // },
- // },
- // {
- // name: "permissionAdminList",
- // path: "/permission/admin",
- // component: "permission/admin/list/index",
- // meta: {
- // icon: "el-icon-monitor",
- // title: "管理员列表",
- // },
- // },
- // ],
- // },
- ]
- export default routes;
|