feat: Update all packages to latest version.

This commit is contained in:
EdwinBetanc0urt 2020-08-26 17:25:01 -04:00
parent 5e7113935c
commit cb936b3a94
9 changed files with 78 additions and 62 deletions

View File

@ -15,62 +15,62 @@
"test:ci": "npm run lint && npm run test:unit" "test:ci": "npm run lint && npm run test:unit"
}, },
"dependencies": { "dependencies": {
"axios": "0.18.1", "axios": "0.20.0",
"clipboard": "2.0.4", "clipboard": "2.0.6",
"codemirror": "5.45.0", "codemirror": "5.57.0",
"core-js": "3.6.5", "core-js": "3.6.5",
"driver.js": "0.9.5", "driver.js": "0.9.8",
"dropzone": "5.5.1", "dropzone": "5.7.2",
"echarts": "4.2.1", "echarts": "4.8.0",
"element-ui": "2.13.2", "element-ui": "2.13.2",
"file-saver": "2.0.1", "file-saver": "2.0.2",
"fuse.js": "3.4.4", "fuse.js": "6.4.1",
"js-cookie": "2.2.0", "js-cookie": "2.2.1",
"jsonlint": "1.6.3", "jsonlint": "1.6.3",
"jszip": "3.2.1", "jszip": "3.5.0",
"normalize.css": "7.0.0", "normalize.css": "8.0.1",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"path-to-regexp": "2.4.0", "path-to-regexp": "6.1.0",
"screenfull": "4.2.0", "screenfull": "5.0.2",
"script-loader": "0.7.2", "script-loader": "0.7.2",
"sortablejs": "1.8.4", "sortablejs": "1.10.2",
"tui-editor": "1.3.3", "tui-editor": "1.4.10",
"vue": "2.6.10", "vue": "2.6.12",
"vue-count-to": "1.0.13", "vue-count-to": "1.0.13",
"vue-router": "3.0.2", "vue-router": "3.4.3",
"vue-splitpane": "1.0.4", "vue-splitpane": "1.0.6",
"vuedraggable": "2.20.0", "vuedraggable": "2.24.1",
"vuex": "3.1.0", "vuex": "3.5.1",
"xlsx": "0.14.1" "xlsx": "0.16.6"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "4.4.4", "@vue/cli-plugin-babel": "4.5.4",
"@vue/cli-plugin-eslint": "4.4.4", "@vue/cli-plugin-eslint": "4.5.4",
"@vue/cli-plugin-unit-jest": "4.4.4", "@vue/cli-plugin-unit-jest": "4.5.4",
"@vue/cli-service": "4.4.4", "@vue/cli-service": "4.5.4",
"@vue/test-utils": "1.0.0-beta.29", "@vue/test-utils": "1.0.4",
"autoprefixer": "9.5.1", "autoprefixer": "9.8.6",
"babel-eslint": "10.1.0", "babel-eslint": "10.1.0",
"babel-jest": "23.6.0", "babel-jest": "26.3.0",
"babel-plugin-dynamic-import-node": "2.3.3", "babel-plugin-dynamic-import-node": "2.3.3",
"chalk": "2.4.2", "chalk": "4.1.0",
"chokidar": "2.1.5", "chokidar": "3.4.2",
"connect": "3.6.6", "connect": "3.7.0",
"eslint": "6.7.2", "eslint": "7.7.0",
"eslint-plugin-vue": "6.2.2", "eslint-plugin-vue": "6.2.2",
"html-webpack-plugin": "3.2.0", "html-webpack-plugin": "4.3.0",
"husky": "1.3.1", "husky": "4.2.5",
"lint-staged": "8.1.5", "lint-staged": "10.2.13",
"mockjs": "1.0.1-beta3", "mockjs": "1.1.0",
"plop": "2.3.0", "plop": "2.7.4",
"runjs": "4.3.2", "runjs": "4.4.2",
"sass": "1.26.2", "sass": "1.26.10",
"sass-loader": "8.0.2", "sass-loader": "10.0.1",
"script-ext-html-webpack-plugin": "2.1.3", "script-ext-html-webpack-plugin": "2.1.4",
"serve-static": "1.13.2", "serve-static": "1.14.1",
"svg-sprite-loader": "4.1.3", "svg-sprite-loader": "5.0.0",
"svgo": "1.2.0", "svgo": "1.3.2",
"vue-template-compiler": "2.6.10" "vue-template-compiler": "2.6.12"
}, },
"browserslist": [ "browserslist": [
"> 1%", "> 1%",

View File

@ -10,7 +10,7 @@
</template> </template>
<script> <script>
import pathToRegexp from 'path-to-regexp' import { compile } from 'path-to-regexp'
export default { export default {
data() { data() {
@ -52,16 +52,16 @@ export default {
pathCompile(path) { pathCompile(path) {
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561 // To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
const { params } = this.$route const { params } = this.$route
var toPath = pathToRegexp.compile(path) const toPath = compile(path)
return toPath(params) return toPath(params)
}, },
handleLink(item) { handleLink(item) {
const { redirect, path } = item const { redirect, path } = item
if (redirect) { if (redirect) {
this.$router.push(redirect) this.$router.push(redirect, () => {})
return return
} }
this.$router.push(this.pathCompile(path)) this.$router.push(this.pathCompile(path), () => {})
} }
} }
} }

View File

@ -12,7 +12,12 @@
class="header-search-select" class="header-search-select"
@change="change" @change="change"
> >
<el-option v-for="item in options" :key="item.path" :value="item" :label="item.title.join(' > ')" /> <el-option
v-for="element in options"
:key="element.item.path"
:value="element.item.path"
:label="element.item.title.join(' > ')"
/>
</el-select> </el-select>
</div> </div>
</template> </template>
@ -69,8 +74,8 @@ export default {
this.options = [] this.options = []
this.show = false this.show = false
}, },
change(val) { change(path) {
this.$router.push(val.path) this.$router.push(path, () => {})
this.search = '' this.search = ''
this.options = [] this.options = []
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -76,7 +76,7 @@ export default {
}, },
async logout() { async logout() {
await this.$store.dispatch('user/logout') await this.$store.dispatch('user/logout')
this.$router.push(`/login?redirect=${this.$route.fullPath}`) this.$router.push(`/login?redirect=${this.$route.fullPath}`, () => {})
} }
} }
} }

View File

@ -142,7 +142,7 @@ export default {
}) })
}, },
closeOthersTags() { closeOthersTags() {
this.$router.push(this.selectedTag) this.$router.push(this.selectedTag, () => {})
this.$store.dispatch('tagsView/delOthersViews', this.selectedTag).then(() => { this.$store.dispatch('tagsView/delOthersViews', this.selectedTag).then(() => {
this.moveToCurrentTag() this.moveToCurrentTag()
}) })
@ -158,15 +158,17 @@ export default {
toLastView(visitedViews, view) { toLastView(visitedViews, view) {
const latestView = visitedViews.slice(-1)[0] const latestView = visitedViews.slice(-1)[0]
if (latestView) { if (latestView) {
this.$router.push(latestView.fullPath) this.$router.push(latestView.fullPath, () => {})
} else { } else {
// now the default is to redirect to the home page if there is no tags-view, // now the default is to redirect to the home page if there is no tags-view,
// you can adjust it according to your needs. // you can adjust it according to your needs.
if (view.name === 'Dashboard') { if (view.name === 'Dashboard') {
// to reload home page // to reload home page
this.$router.replace({ path: '/redirect' + view.fullPath }) this.$router.replace({
path: '/redirect' + view.fullPath
}, () => {})
} else { } else {
this.$router.push('/') this.$router.push('/', () => {})
} }
} }
}, },

View File

@ -49,7 +49,9 @@ export default {
methods: { methods: {
back() { back() {
if (this.$route.query.noGoBack) { if (this.$route.query.noGoBack) {
this.$router.push({ path: '/dashboard' }) this.$router.push({
path: '/dashboard'
}, () => {})
} else { } else {
this.$router.go(-1) this.$router.go(-1)
} }

View File

@ -158,7 +158,10 @@ export default {
this.loading = true this.loading = true
this.$store.dispatch('user/login', this.loginForm) this.$store.dispatch('user/login', this.loginForm)
.then(() => { .then(() => {
this.$router.push({ path: this.redirect || '/', query: this.otherQuery }) this.$router.push({
path: this.redirect || '/',
query: this.otherQuery
}, () => {})
this.loading = false this.loading = false
}) })
.catch(() => { .catch(() => {
@ -189,7 +192,9 @@ export default {
// const codeName = code[type] // const codeName = code[type]
// if (codeName) { // if (codeName) {
// this.$store.dispatch('LoginByThirdparty', codeName).then(() => { // this.$store.dispatch('LoginByThirdparty', codeName).then(() => {
// this.$router.push({ path: this.redirect || '/' }) // this.$router.push({
// path: this.redirect || '/'
// }, () => {})
// }) // })
// } else { // } else {
// alert('') // alert('')

View File

@ -12,7 +12,9 @@ export default {
components: { SwitchRoles }, components: { SwitchRoles },
methods: { methods: {
handleRolesChange() { handleRolesChange() {
this.$router.push({ path: '/permission/index?' + +new Date() }) this.$router.push({
path: '/permission/index?' + +new Date()
}, () => {})
} }
} }
} }

View File

@ -32,7 +32,7 @@ export default {
}, },
watch: { watch: {
activeName(val) { activeName(val) {
this.$router.push(`${this.$route.path}?tab=${val}`) this.$router.push(`${this.$route.path}?tab=${val}`, () => {})
} }
}, },
created() { created() {