删除role/routes.js中import { deepClone } from '../../src/utils/index.js

升级依赖:"mockjs": "^1.1.0",
删除依赖:
"@babel/core": "7.0.0",
"@babel/register": "7.0.0",
"babel-core": "7.0.0-bridge.0",
This commit is contained in:
于博文
2020-05-13 10:31:01 +08:00
parent 6f80263b42
commit d109086a5a
8 changed files with 40 additions and 34 deletions

View File

@@ -1,8 +1,7 @@
import Mock from 'mockjs'
import { deepClone } from '../../src/utils/index.js'
import { asyncRoutes, constantRoutes } from './routes.js'
const Mock = require('mockjs')
const { asyncRoutes, constantRoutes } = require('./routes.js')
const routes = deepClone([...constantRoutes, ...asyncRoutes])
const routes = [].concat(constantRoutes, asyncRoutes)
const roles = [
{
@@ -35,7 +34,7 @@ const roles = [
}
]
export default [
exports.default = [
// mock get all routes form server
{
url: '/vue-element-admin/routes',

View File

@@ -1,6 +1,6 @@
// Just a mock data
export const constantRoutes = [
const constantRoutes = [
{
path: '/redirect',
component: 'layout/Layout',
@@ -72,7 +72,7 @@ export const constantRoutes = [
}
]
export const asyncRoutes = [
const asyncRoutes = [
{
path: '/permission',
component: 'layout/Layout',
@@ -523,3 +523,6 @@ export const asyncRoutes = [
{ path: '*', redirect: '/404', hidden: true }
]
exports.constantRoutes = constantRoutes;
exports.asyncRoutes = asyncRoutes;