Commit a07ac182 by ZhengJie

[代码完善](v2.4): 更新部分依赖,修复路由懒加载问题

update package.json
update src/routers.js
update src/store/modules/permission.js
parent 3311634a
......@@ -61,30 +61,34 @@
"vue-splitpane": "1.0.4",
"vuex": "3.1.0",
"wangeditor": ">=3.0.0",
"xlsx": "^0.11.16"
"xlsx": "^0.11.16",
"js-beautify": "^1.10.2",
"sortablejs": "1.8.4",
"vuedraggable": "2.20.0"
},
"devDependencies": {
"@babel/core": "7.0.0",
"@babel/register": "7.0.0",
"@babel/parser": "^7.7.4",
"@vue/cli-plugin-babel": "3.5.3",
"@vue/cli-plugin-eslint": "3.5.1",
"@vue/cli-plugin-eslint": "^3.9.1",
"@vue/cli-plugin-unit-jest": "3.5.3",
"@vue/cli-service": "3.5.3",
"@vue/test-utils": "1.0.0-beta.29",
"autoprefixer": "^9.5.1",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "8.2.6",
"babel-eslint": "10.0.1",
"babel-jest": "23.6.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"chalk": "2.4.2",
"chokidar": "2.1.5",
"connect": "3.6.6",
"eslint": "5.15.3",
"eslint-plugin-vue": "5.2.2",
"html-webpack-plugin": "3.2.0",
"http-proxy-middleware": "^0.19.1",
"husky": "1.3.1",
"lint-staged": "8.1.5",
"node-sass": "^4.13.1",
"node-sass": "^4.9.0",
"plop": "2.3.0",
"runjs": "^4.3.2",
"sass-loader": "^7.1.0",
......@@ -93,7 +97,9 @@
"serve-static": "^1.13.2",
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.0",
"vue-template-compiler": "2.6.10"
"vue-template-compiler": "2.6.10",
"babel-plugin-transform-remove-console": "^6.9.4",
"babel-plugin-dynamic-import-node": "2.3.0"
},
"engines": {
"node": ">=8.9",
......
......@@ -7,17 +7,17 @@ Vue.use(Router)
export const constantRouterMap = [
{ path: '/login',
meta: { title: '登录', noCache: true },
component: () => import('@/views/login'),
component: (resolve) => require(['@/views/login'], resolve),
hidden: true
},
{
path: '/404',
component: () => import('@/views/features/404'),
component: (resolve) => require(['@/views/features/404'], resolve),
hidden: true
},
{
path: '/401',
component: () => import('@/views/features/401'),
component: (resolve) => require(['@/views/features/401'], resolve),
hidden: true
},
{
......@@ -27,7 +27,7 @@ export const constantRouterMap = [
children: [
{
path: '/redirect/:path*',
component: () => import('@/views/features/redirect')
component: (resolve) => require(['@/views/features/redirect'], resolve)
}
]
},
......@@ -38,7 +38,7 @@ export const constantRouterMap = [
children: [
{
path: 'dashboard',
component: () => import('@/views/home'),
component: (resolve) => require(['@/views/home'], resolve),
name: 'Dashboard',
meta: { title: '首页', icon: 'index', affix: true, noCache: true }
}
......@@ -52,7 +52,7 @@ export const constantRouterMap = [
children: [
{
path: 'center',
component: () => import('@/views/system/user/center'),
component: (resolve) => require(['@/views/system/user/center'], resolve),
name: '个人中心',
meta: { title: '个人中心' }
}
......
......@@ -37,7 +37,7 @@ export const filterAsyncRouter = (routers) => { // 遍历后台传来的路由
}
export const loadView = (view) => {
return () => import(`@/views/${view}`)
return (resolve) => require([`@/views/${view}`], resolve)
}
export default permission
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment