Commit b32d0724b7a912973f2afb14b5b783e9a0f1183f
1 parent
8deacb70
升级vue-cli版本到4.4.4
Showing
4 changed files
with
28 additions
and
31 deletions
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
| @@ -77,8 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -77,8 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 77 | 77 | ||
| 78 | <select id="checkDeptNameUnique" resultMap="SysDeptResult"> | 78 | <select id="checkDeptNameUnique" resultMap="SysDeptResult"> |
| 79 | <include refid="selectDeptVo"/> | 79 | <include refid="selectDeptVo"/> |
| 80 | - where dept_name=#{deptName} and parent_id = #{parentId} | ||
| 81 | - limit 1 | 80 | + where dept_name=#{deptName} and parent_id = #{parentId} limit 1 |
| 82 | </select> | 81 | </select> |
| 83 | 82 | ||
| 84 | <insert id="insertDept" parameterType="SysDept"> | 83 | <insert id="insertDept" parameterType="SysDept"> |
ruoyi-ui/babel.config.js
| 1 | module.exports = { | 1 | module.exports = { |
| 2 | presets: [ | 2 | presets: [ |
| 3 | - '@vue/app' | ||
| 4 | - ] | 3 | + // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app |
| 4 | + '@vue/cli-plugin-babel/preset' | ||
| 5 | + ], | ||
| 6 | + 'env': { | ||
| 7 | + 'development': { | ||
| 8 | + // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require(). | ||
| 9 | + // This plugin can significantly increase the speed of hot updates, when you have a large number of pages. | ||
| 10 | + 'plugins': ['dynamic-import-node'] | ||
| 11 | + } | ||
| 12 | + } | ||
| 5 | } | 13 | } |
ruoyi-ui/package.json
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | "author": "若依", | 5 | "author": "若依", |
| 6 | "license": "MIT", | 6 | "license": "MIT", |
| 7 | "scripts": { | 7 | "scripts": { |
| 8 | - "dev": "vue-cli-service serve --open", | 8 | + "dev": "vue-cli-service serve", |
| 9 | "build:prod": "vue-cli-service build", | 9 | "build:prod": "vue-cli-service build", |
| 10 | "build:stage": "vue-cli-service build --mode staging", | 10 | "build:stage": "vue-cli-service build --mode staging", |
| 11 | "preview": "node build/index.js --preview", | 11 | "preview": "node build/index.js --preview", |
| @@ -43,10 +43,11 @@ | @@ -43,10 +43,11 @@ | ||
| 43 | "@riophae/vue-treeselect": "0.4.0", | 43 | "@riophae/vue-treeselect": "0.4.0", |
| 44 | "axios": "0.18.1", | 44 | "axios": "0.18.1", |
| 45 | "clipboard": "2.0.4", | 45 | "clipboard": "2.0.4", |
| 46 | + "core-js": "3.6.5", | ||
| 46 | "echarts": "4.2.1", | 47 | "echarts": "4.2.1", |
| 47 | "element-ui": "2.13.2", | 48 | "element-ui": "2.13.2", |
| 48 | "file-saver": "2.0.1", | 49 | "file-saver": "2.0.1", |
| 49 | - "js-beautify": "^1.10.2", | 50 | + "js-beautify": "1.10.2", |
| 50 | "fuse.js": "3.4.4", | 51 | "fuse.js": "3.4.4", |
| 51 | "js-cookie": "2.2.0", | 52 | "js-cookie": "2.2.0", |
| 52 | "jsencrypt": "3.0.0-rc.1", | 53 | "jsencrypt": "3.0.0-rc.1", |
| @@ -65,32 +66,31 @@ | @@ -65,32 +66,31 @@ | ||
| 65 | "vuex": "3.1.0" | 66 | "vuex": "3.1.0" |
| 66 | }, | 67 | }, |
| 67 | "devDependencies": { | 68 | "devDependencies": { |
| 68 | - "@vue/cli-plugin-babel": "3.5.3", | ||
| 69 | - "@vue/cli-plugin-eslint": "^3.9.1", | ||
| 70 | - "@vue/cli-plugin-unit-jest": "3.5.3", | ||
| 71 | - "@vue/cli-service": "3.5.3", | 69 | + "@vue/cli-plugin-babel": "4.4.4", |
| 70 | + "@vue/cli-plugin-eslint": "4.4.4", | ||
| 71 | + "@vue/cli-plugin-unit-jest": "4.4.4", | ||
| 72 | + "@vue/cli-service": "4.4.4", | ||
| 72 | "@vue/test-utils": "1.0.0-beta.29", | 73 | "@vue/test-utils": "1.0.0-beta.29", |
| 73 | - "autoprefixer": "^9.5.1", | ||
| 74 | - "babel-core": "7.0.0-bridge.0", | ||
| 75 | - "babel-eslint": "10.0.1", | 74 | + "autoprefixer": "9.5.1", |
| 75 | + "babel-eslint": "10.1.0", | ||
| 76 | "babel-jest": "23.6.0", | 76 | "babel-jest": "23.6.0", |
| 77 | + "babel-plugin-dynamic-import-node": "2.3.3", | ||
| 77 | "chalk": "2.4.2", | 78 | "chalk": "2.4.2", |
| 78 | "chokidar": "2.1.5", | 79 | "chokidar": "2.1.5", |
| 79 | "connect": "3.6.6", | 80 | "connect": "3.6.6", |
| 80 | - "eslint": "5.15.3", | ||
| 81 | - "eslint-plugin-vue": "5.2.2", | 81 | + "eslint": "6.7.2", |
| 82 | + "eslint-plugin-vue": "6.2.2", | ||
| 82 | "html-webpack-plugin": "3.2.0", | 83 | "html-webpack-plugin": "3.2.0", |
| 83 | - "http-proxy-middleware": "^0.19.1", | ||
| 84 | "husky": "1.3.1", | 84 | "husky": "1.3.1", |
| 85 | "lint-staged": "8.1.5", | 85 | "lint-staged": "8.1.5", |
| 86 | "mockjs": "1.0.1-beta3", | 86 | "mockjs": "1.0.1-beta3", |
| 87 | "plop": "2.3.0", | 87 | "plop": "2.3.0", |
| 88 | - "runjs": "^4.3.2", | ||
| 89 | - "sass": "^1.26.10", | ||
| 90 | - "sass-loader": "^7.1.0", | 88 | + "runjs": "4.3.2", |
| 89 | + "sass": "1.26.10", | ||
| 90 | + "sass-loader": "8.0.2", | ||
| 91 | "script-ext-html-webpack-plugin": "2.1.3", | 91 | "script-ext-html-webpack-plugin": "2.1.3", |
| 92 | "script-loader": "0.7.2", | 92 | "script-loader": "0.7.2", |
| 93 | - "serve-static": "^1.13.2", | 93 | + "serve-static": "1.13.2", |
| 94 | "svg-sprite-loader": "4.1.3", | 94 | "svg-sprite-loader": "4.1.3", |
| 95 | "svgo": "1.2.0", | 95 | "svgo": "1.2.0", |
| 96 | "vue-template-compiler": "2.6.10" | 96 | "vue-template-compiler": "2.6.10" |
ruoyi-ui/vue.config.js
| @@ -30,6 +30,7 @@ module.exports = { | @@ -30,6 +30,7 @@ module.exports = { | ||
| 30 | devServer: { | 30 | devServer: { |
| 31 | host: '0.0.0.0', | 31 | host: '0.0.0.0', |
| 32 | port: port, | 32 | port: port, |
| 33 | + open: true, | ||
| 33 | proxy: { | 34 | proxy: { |
| 34 | // detail: https://cli.vuejs.org/config/#devserver-proxy | 35 | // detail: https://cli.vuejs.org/config/#devserver-proxy |
| 35 | [process.env.VUE_APP_BASE_API]: { | 36 | [process.env.VUE_APP_BASE_API]: { |
| @@ -71,17 +72,6 @@ module.exports = { | @@ -71,17 +72,6 @@ module.exports = { | ||
| 71 | }) | 72 | }) |
| 72 | .end() | 73 | .end() |
| 73 | 74 | ||
| 74 | - // set preserveWhitespace | ||
| 75 | - config.module | ||
| 76 | - .rule('vue') | ||
| 77 | - .use('vue-loader') | ||
| 78 | - .loader('vue-loader') | ||
| 79 | - .tap(options => { | ||
| 80 | - options.compilerOptions.preserveWhitespace = true | ||
| 81 | - return options | ||
| 82 | - }) | ||
| 83 | - .end() | ||
| 84 | - | ||
| 85 | config | 75 | config |
| 86 | .when(process.env.NODE_ENV !== 'development', | 76 | .when(process.env.NODE_ENV !== 'development', |
| 87 | config => { | 77 | config => { |