merge master
commit
61d305b8dd
|
@ -16,7 +16,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "0.18.1",
|
"axios": "0.18.1",
|
||||||
"element-ui": "2.7.2",
|
"element-ui": "2.13.0",
|
||||||
"js-cookie": "2.2.0",
|
"js-cookie": "2.2.0",
|
||||||
"normalize.css": "7.0.0",
|
"normalize.css": "7.0.0",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
<a target="_blank" href="https://panjiachen.github.io/vue-element-admin-site/#/">
|
<a target="_blank" href="https://panjiachen.github.io/vue-element-admin-site/#/">
|
||||||
<el-dropdown-item>Docs</el-dropdown-item>
|
<el-dropdown-item>Docs</el-dropdown-item>
|
||||||
</a>
|
</a>
|
||||||
<el-dropdown-item divided>
|
<el-dropdown-item divided @click.native="logout">
|
||||||
<span style="display:block;" @click="logout">Log Out</span>
|
<span style="display:block;">Log Out</span>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div v-if="!item.hidden" class="menu-wrapper">
|
<div v-if="!item.hidden">
|
||||||
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
|
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
|
||||||
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
|
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
|
||||||
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
||||||
|
|
|
@ -21,10 +21,10 @@ import '@/permission' // permission control
|
||||||
* you can execute: mockXHR()
|
* you can execute: mockXHR()
|
||||||
*
|
*
|
||||||
* Currently MockJs will be used in the production environment,
|
* Currently MockJs will be used in the production environment,
|
||||||
* please remove it before going online! ! !
|
* please remove it before going online ! ! !
|
||||||
*/
|
*/
|
||||||
import { mockXHR } from '../mock'
|
|
||||||
if (process.env.NODE_ENV === 'production') {
|
if (process.env.NODE_ENV === 'production') {
|
||||||
|
const { mockXHR } = require('../mock')
|
||||||
mockXHR()
|
mockXHR()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,9 +78,9 @@ const actions = {
|
||||||
logout({ commit, state }) {
|
logout({ commit, state }) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
logout(state.token).then(() => {
|
logout(state.token).then(() => {
|
||||||
removeToken() // must remove token first
|
removeToken() // must remove token first
|
||||||
commit('RESET_STATE')
|
|
||||||
resetRouter()
|
resetRouter()
|
||||||
|
commit('RESET_STATE')
|
||||||
resolve()
|
resolve()
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
|
@ -91,7 +91,7 @@ const actions = {
|
||||||
// remove token
|
// remove token
|
||||||
resetToken({ commit }) {
|
resetToken({ commit }) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
removeToken() // must remove token first
|
removeToken() // must remove token first
|
||||||
commit('RESET_STATE')
|
commit('RESET_STATE')
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue