Skip to content

Commit 8d75fc4

Browse files
committed
feat✨: vue-cli@3 升级为 vue-cli@4、Change Node Sass to Dart Sass、代码生成工具
1 parent 45a6d02 commit 8d75fc4

File tree

15 files changed

+32
-46
lines changed

15 files changed

+32
-46
lines changed

.env.development

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,3 @@ ENV = 'development'
44
# base api
55
VUE_APP_BASE_API = 'http://127.0.0.1:8000'
66

7-
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
8-
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
9-
# It only does one thing by converting all import() to require().
10-
# This configuration can significantly increase the speed of hot updates,
11-
# when you have a large number of pages.
12-
# Detail: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
13-
14-
VUE_CLI_BABEL_TRANSPILE_MODULES = true

babel.config.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
module.exports = {
22
presets: [
3-
'@vue/app'
4-
]
3+
'@vue/cli-plugin-babel/preset'
4+
],
5+
env: {
6+
development: {
7+
plugins: ['dynamic-import-node']
8+
}
9+
}
510
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,13 @@
9595
"@vue/cli-plugin-babel": "4.4.6",
9696
"@vue/cli-plugin-eslint": "^4.4.6",
9797
"@vue/cli-plugin-unit-jest": "4.4.6",
98-
"@vue/cli-service": "4.4.6",
98+
"@vue/cli-service": "^4.5.13",
9999
"@vue/test-utils": "1.0.3",
100100
"autoprefixer": "^9.8.6",
101101
"babel-core": "7.0.0-bridge.0",
102102
"babel-eslint": "10.1.0",
103103
"babel-jest": "26.2.2",
104+
"babel-plugin-dynamic-import-node": "^2.3.3",
104105
"beautifier": "^0.1.7",
105106
"chalk": "4.1.0",
106107
"chokidar": "3.4.2",
@@ -114,9 +115,9 @@
114115
"lint-staged": "10.2.11",
115116
"mockjs": "1.1.0",
116117
"monaco-editor-webpack-plugin": "^1.9.0",
117-
"node-sass": "^4.14.1",
118118
"plop": "2.7.4",
119119
"runjs": "^4.4.2",
120+
"sass": "^1.35.1",
120121
"sass-loader": "^9.0.3",
121122
"script-ext-html-webpack-plugin": "2.1.4",
122123
"script-loader": "0.7.2",

src/components/CustomDialog/index.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,25 +66,25 @@ export default {
6666
</script>
6767

6868
<style lang="scss" scoped>
69-
/deep/ .el-dialog__body{
69+
::v-deep .el-dialog__body{
7070
padding: 20px!important;
7171
}
7272
7373
.el-dialog{
7474
margin: 0!important;
7575
}
7676
77-
/deep/ .el-dialog__header {
77+
::v-deep .el-dialog__header {
7878
border-bottom: 1px solid #e8e8e8;
7979
}
8080
81-
/deep/ .el-dialog__footer{
81+
::v-deep .el-dialog__footer{
8282
border-top: 1px solid #e8e8e8;
8383
padding: 10px 20px!important;
8484
box-sizing: border-box;
8585
}
8686
87-
/deep/ .el-dialog__title{
87+
::v-deep .el-dialog__title{
8888
font-size: 16px;
8989
}
9090
</style>

src/components/Tinymce/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export default {
212212

213213
<style lang="scss" scoped>
214214
215-
.tinymce-container /deep/{
215+
.tinymce-container ::v-deep{
216216
position: relative;
217217
line-height: normal;
218218
width: 100%;

src/components/tableAction.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ export default {
302302
</script>
303303

304304
<style lang="scss" scoped>
305-
/deep/ .el-table{
305+
::v-deep .el-table{
306306
margin-top: 10px;
307307
thead {
308308
th{

src/layout/components/TagsView/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ String.prototype.colorRgb = function() {
247247
</script>
248248

249249
<style lang="scss" scoped>
250-
.tags-view-container /deep/{
250+
.tags-view-container ::v-deep{
251251
height: 43px;
252252
width: 100%;
253253
background: #fff;

src/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import permission from './directive/permission'
2222
import { getDicts } from '@/api/admin/dict/data'
2323
import { getItems, setItems } from '@/api/table'
2424
import { getConfigKey } from '@/api/admin/sys-config'
25-
import { parseTime, resetForm, addDateRange, selectDictLabel, download, selectItemsLabel } from '@/utils/costum'
25+
import { parseTime, resetForm, addDateRange, selectDictLabel, /* download,*/ selectItemsLabel } from '@/utils/costum'
2626

2727
import './icons' // icon
2828
import './permission' // permission control
@@ -51,7 +51,7 @@ Vue.prototype.resetForm = resetForm
5151
Vue.prototype.addDateRange = addDateRange
5252
Vue.prototype.selectDictLabel = selectDictLabel
5353
Vue.prototype.selectItemsLabel = selectItemsLabel
54-
Vue.prototype.download = download
54+
// Vue.prototype.download = download
5555

5656
// 全局组件挂载
5757
Vue.component('Pagination', Pagination)

src/store/modules/system.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getSetting, updateSetting } from '@/api/login'
1+
import { getSetting } from '@/api/login'
22
import storage from '@/utils/storage'
33
const state = {
44
info: storage.get('app_info')
@@ -22,17 +22,6 @@ const actions = {
2222
reject(error)
2323
})
2424
})
25-
},
26-
updateSetting({ commit }, info) {
27-
return new Promise((resolve, reject) => {
28-
updateSetting(info).then(response => {
29-
const { data } = response
30-
commit('SET_INFO', data)
31-
resolve(response)
32-
}).catch(error => {
33-
reject(error)
34-
})
35-
})
3625
}
3726
}
3827

src/views/admin/sys-menu/index.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@
4949
</el-table-column>
5050
<el-table-column prop="sort" label="排序" width="60px" />
5151
<el-table-column prop="permission" label="权限标识" :show-overflow-tooltip="true">
52-
<!-- <template slot-scope="scope">
53-
<span v-if="scope.row.permission==''">-</span>
54-
<span v-else>{{ scope.row.permission }}</span>
55-
> -->
5652
<template slot-scope="scope">
5753
<el-popover v-if="scope.row.sysApi.length>0" trigger="hover" placement="top">
5854
<el-table

0 commit comments

Comments
 (0)