This commit is contained in:
2021-10-20 16:25:18 +08:00
parent a62e9a9dce
commit c951ee56f5
686 changed files with 75106 additions and 5870 deletions

View File

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

View File

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