From b32d0724b7a912973f2afb14b5b783e9a0f1183f Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 31 Jul 2020 22:35:30 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=8D=87=E7=BA=A7vue-cli=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=88=B04.4.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/system/SysDeptMapper.xml | 3 +- ruoyi-ui/babel.config.js | 12 +++++-- ruoyi-ui/package.json | 32 +++++++++---------- ruoyi-ui/vue.config.js | 12 +------ 4 files changed, 28 insertions(+), 31 deletions(-) diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml index 191f1cca..9da14d8f 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -77,8 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/ruoyi-ui/babel.config.js b/ruoyi-ui/babel.config.js index c8e69f56..b732c91f 100644 --- a/ruoyi-ui/babel.config.js +++ b/ruoyi-ui/babel.config.js @@ -1,5 +1,13 @@ module.exports = { presets: [ - '@vue/app' - ] + // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app + '@vue/cli-plugin-babel/preset' + ], + 'env': { + 'development': { + // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require(). + // This plugin can significantly increase the speed of hot updates, when you have a large number of pages. + 'plugins': ['dynamic-import-node'] + } + } } diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index a78acadf..f359fb6c 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -5,7 +5,7 @@ "author": "若依", "license": "MIT", "scripts": { - "dev": "vue-cli-service serve --open", + "dev": "vue-cli-service serve", "build:prod": "vue-cli-service build", "build:stage": "vue-cli-service build --mode staging", "preview": "node build/index.js --preview", @@ -43,10 +43,11 @@ "@riophae/vue-treeselect": "0.4.0", "axios": "0.18.1", "clipboard": "2.0.4", + "core-js": "3.6.5", "echarts": "4.2.1", "element-ui": "2.13.2", "file-saver": "2.0.1", - "js-beautify": "^1.10.2", + "js-beautify": "1.10.2", "fuse.js": "3.4.4", "js-cookie": "2.2.0", "jsencrypt": "3.0.0-rc.1", @@ -65,32 +66,31 @@ "vuex": "3.1.0" }, "devDependencies": { - "@vue/cli-plugin-babel": "3.5.3", - "@vue/cli-plugin-eslint": "^3.9.1", - "@vue/cli-plugin-unit-jest": "3.5.3", - "@vue/cli-service": "3.5.3", + "@vue/cli-plugin-babel": "4.4.4", + "@vue/cli-plugin-eslint": "4.4.4", + "@vue/cli-plugin-unit-jest": "4.4.4", + "@vue/cli-service": "4.4.4", "@vue/test-utils": "1.0.0-beta.29", - "autoprefixer": "^9.5.1", - "babel-core": "7.0.0-bridge.0", - "babel-eslint": "10.0.1", + "autoprefixer": "9.5.1", + "babel-eslint": "10.1.0", "babel-jest": "23.6.0", + "babel-plugin-dynamic-import-node": "2.3.3", "chalk": "2.4.2", "chokidar": "2.1.5", "connect": "3.6.6", - "eslint": "5.15.3", - "eslint-plugin-vue": "5.2.2", + "eslint": "6.7.2", + "eslint-plugin-vue": "6.2.2", "html-webpack-plugin": "3.2.0", - "http-proxy-middleware": "^0.19.1", "husky": "1.3.1", "lint-staged": "8.1.5", "mockjs": "1.0.1-beta3", "plop": "2.3.0", - "runjs": "^4.3.2", - "sass": "^1.26.10", - "sass-loader": "^7.1.0", + "runjs": "4.3.2", + "sass": "1.26.10", + "sass-loader": "8.0.2", "script-ext-html-webpack-plugin": "2.1.3", "script-loader": "0.7.2", - "serve-static": "^1.13.2", + "serve-static": "1.13.2", "svg-sprite-loader": "4.1.3", "svgo": "1.2.0", "vue-template-compiler": "2.6.10" diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index b7f16f3e..fb708578 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -30,6 +30,7 @@ module.exports = { devServer: { host: '0.0.0.0', port: port, + open: true, proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { @@ -71,17 +72,6 @@ module.exports = { }) .end() - // set preserveWhitespace - config.module - .rule('vue') - .use('vue-loader') - .loader('vue-loader') - .tap(options => { - options.compilerOptions.preserveWhitespace = true - return options - }) - .end() - config .when(process.env.NODE_ENV !== 'development', config => { From 4dcf737db03720bff2216ea04aba082be1ebb413 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 1 Aug 2020 15:45:38 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E6=A0=8F=E5=8F=B3=E4=BE=A7=E6=B7=BB=E5=8A=A0=E5=88=B7=E6=96=B0?= =?UTF-8?q?&=E6=98=BE=E9=9A=90=E6=9F=A5=E8=AF=A2=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/vm/vue/index-tree.vue.vm | 31 +++++++++----- .../src/main/resources/vm/vue/index.vue.vm | 14 ++++++- ruoyi-ui/src/assets/styles/ruoyi.scss | 27 ++++++++++++- ruoyi-ui/src/views/monitor/job/index.vue | 14 ++++++- ruoyi-ui/src/views/monitor/job/log.vue | 14 ++++++- .../src/views/monitor/logininfor/index.vue | 14 ++++++- ruoyi-ui/src/views/monitor/online/index.vue | 2 +- ruoyi-ui/src/views/monitor/operlog/index.vue | 14 ++++++- ruoyi-ui/src/views/system/config/index.vue | 14 ++++++- ruoyi-ui/src/views/system/dept/index.vue | 40 +++++++++++++------ ruoyi-ui/src/views/system/dict/data.vue | 14 ++++++- ruoyi-ui/src/views/system/dict/index.vue | 14 ++++++- ruoyi-ui/src/views/system/menu/index.vue | 37 ++++++++++++++--- ruoyi-ui/src/views/system/notice/index.vue | 14 ++++++- ruoyi-ui/src/views/system/post/index.vue | 14 ++++++- ruoyi-ui/src/views/system/role/index.vue | 14 ++++++- ruoyi-ui/src/views/system/user/index.vue | 14 ++++++- ruoyi-ui/src/views/tool/gen/index.vue | 14 ++++++- 18 files changed, 262 insertions(+), 57 deletions(-) diff --git a/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm index 2b26f795..a6ae2026 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm @@ -1,6 +1,6 @@