From b7ca4415c984c68fd4965d5e96c92b3591373abe Mon Sep 17 00:00:00 2001 From: xwb <717567226@qq.com> Date: Wed, 22 Apr 2020 12:23:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=83=A8=E5=88=86=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=EF=BC=8C=E4=BF=AE=E5=A4=8D=E8=B7=AF=E7=94=B1=E6=87=92?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 18 ++++++++++++------ src/router/routers.js | 6 +++--- src/store/modules/permission.js | 2 +- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index c6d7161..197b220 100644 --- a/package.json +++ b/package.json @@ -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.0", + "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", diff --git a/src/router/routers.js b/src/router/routers.js index dbdfb78..f0bfb67 100644 --- a/src/router/routers.js +++ b/src/router/routers.js @@ -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 }, { diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 35d1e8e..e73e290 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -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