This commit is contained in:
Edwin Betancourt 2021-02-07 13:23:58 +00:00 committed by GitHub
commit df928c0fbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 91 additions and 74 deletions

View File

@ -1,7 +1,7 @@
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
sourceType: 'module'
},
env: {

View File

@ -6,4 +6,4 @@
}
},
"exclude": ["node_modules", "dist"]
}
}

View File

@ -15,62 +15,63 @@
"test:ci": "npm run lint && npm run test:unit"
},
"dependencies": {
"axios": "0.18.1",
"clipboard": "2.0.4",
"codemirror": "5.45.0",
"core-js": "3.6.5",
"driver.js": "0.9.5",
"dropzone": "5.5.1",
"echarts": "4.2.1",
"element-ui": "2.13.2",
"file-saver": "2.0.1",
"fuse.js": "3.4.4",
"js-cookie": "2.2.0",
"axios": "0.21.1",
"clipboard": "2.0.6",
"codemirror": "5.59.2",
"core-js": "3.8.3",
"driver.js": "0.9.8",
"dropzone": "5.7.3",
"echarts": "5.0.2",
"element-ui": "2.15.0",
"file-saver": "2.0.5",
"fuse.js": "6.4.6",
"js-cookie": "2.2.1",
"jsonlint": "1.6.3",
"jszip": "3.2.1",
"normalize.css": "7.0.0",
"jszip": "3.5.0",
"normalize.css": "8.0.1",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
"screenfull": "4.2.0",
"path-to-regexp": "6.2.0",
"screenfull": "5.0.2",
"script-loader": "0.7.2",
"sortablejs": "1.8.4",
"tui-editor": "1.3.3",
"vue": "2.6.10",
"sortablejs": "1.13.0",
"tui-editor": "1.4.10",
"vue": "2.6.12",
"vue-count-to": "1.0.13",
"vue-router": "3.0.2",
"vue-splitpane": "1.0.4",
"vuedraggable": "2.20.0",
"vuex": "3.1.0",
"xlsx": "0.14.1"
"vue-router": "3.5.1",
"vue-splitpane": "1.0.6",
"vuedraggable": "2.24.3",
"vuex": "3.6.2",
"xlsx": "0.16.9"
},
"devDependencies": {
"@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-eslint": "10.1.0",
"babel-jest": "23.6.0",
"@babel/core": "7.12.13",
"@babel/eslint-parser": "7.12.13",
"@vue/cli-plugin-babel": "4.5.11",
"@vue/cli-plugin-eslint": "4.5.11",
"@vue/cli-plugin-unit-jest": "4.5.11",
"@vue/cli-service": "4.5.11",
"@vue/test-utils": "1.1.3",
"autoprefixer": "9.8.6",
"babel-jest": "26.6.3",
"babel-plugin-dynamic-import-node": "2.3.3",
"chalk": "2.4.2",
"chokidar": "2.1.5",
"connect": "3.6.6",
"eslint": "6.7.2",
"chalk": "4.1.0",
"chokidar": "3.5.1",
"connect": "3.7.0",
"eslint": "7.19.0",
"eslint-plugin-vue": "6.2.2",
"html-webpack-plugin": "3.2.0",
"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.2",
"sass-loader": "8.0.2",
"script-ext-html-webpack-plugin": "2.1.3",
"serve-static": "1.13.2",
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.0",
"vue-template-compiler": "2.6.10"
"html-webpack-plugin": "5.0.0",
"husky": "4.3.8",
"lint-staged": "10.5.4",
"mockjs": "1.1.0",
"plop": "2.7.4",
"runjs": "4.4.2",
"sass": "1.32.6",
"sass-loader": "10.1.1",
"script-ext-html-webpack-plugin": "2.1.5",
"serve-static": "1.14.1",
"svg-sprite-loader": "5.2.1",
"svgo": "1.3.2",
"vue-template-compiler": "2.6.12"
},
"browserslist": [
"> 1%",

View File

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

View File

@ -3,7 +3,7 @@
</template>
<script>
import echarts from 'echarts'
import * as echarts from 'echarts'
import resize from './mixins/resize'
export default {

View File

@ -3,7 +3,7 @@
</template>
<script>
import echarts from 'echarts'
import * as echarts from 'echarts'
import resize from './mixins/resize'
export default {

View File

@ -3,7 +3,7 @@
</template>
<script>
import echarts from 'echarts'
import * as echarts from 'echarts'
import resize from './mixins/resize'
export default {

View File

@ -12,7 +12,12 @@
class="header-search-select"
@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>
</div>
</template>
@ -69,8 +74,8 @@ export default {
this.options = []
this.show = false
},
change(val) {
this.$router.push(val.path)
change(path) {
this.$router.push(path, () => {})
this.search = ''
this.options = []
this.$nextTick(() => {

View File

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

View File

@ -3,7 +3,7 @@
</template>
<script>
import echarts from 'echarts'
import * as echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme
import resize from './mixins/resize'

View File

@ -3,7 +3,7 @@
</template>
<script>
import echarts from 'echarts'
import * as echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme
import resize from './mixins/resize'

View File

@ -3,7 +3,7 @@
</template>
<script>
import echarts from 'echarts'
import * as echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme
import resize from './mixins/resize'

View File

@ -3,7 +3,7 @@
</template>
<script>
import echarts from 'echarts'
import * as echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme
import resize from './mixins/resize'

View File

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

View File

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

View File

@ -12,7 +12,9 @@ export default {
components: { SwitchRoles },
methods: {
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: {
activeName(val) {
this.$router.push(`${this.$route.path}?tab=${val}`)
this.$router.push(`${this.$route.path}?tab=${val}`, () => {})
}
},
created() {