12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- // 根据角色动态生成路由
- import { MockMethod } from "vite-plugin-mock";
- // http://mockjs.com/examples.html#Object
- const systemRouter = {
- path: "/system",
- name: "system",
- // component: Layout,
- redirect: "/system/user",
- meta: {
- icon: "el-icon-setting",
- title: "message.hssysManagement",
- showLink: true,
- savedPosition: true,
- rank: 6,
- },
- children: [
- {
- path: "/system/user",
- name: "user",
- // component: () => import("/@/views/system/user/index.vue"),
- meta: {
- title: "message.hsBaseinfo",
- showLink: false,
- savedPosition: true,
- },
- },
- {
- path: "/system/dict",
- name: "dict",
- // component: () => import("/@/views/system/dict/index.vue"),
- meta: {
- title: "message.hsDict",
- showLink: false,
- savedPosition: true,
- },
- },
- ],
- };
- export default [
- {
- url: "/getAsyncRoutes",
- method: "get",
- response: () => {
- return {
- code: 0,
- info: systemRouter,
- };
- },
- },
- ] as MockMethod[];
|