mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-17 18:46:36 +08:00
commit
This commit is contained in:
@@ -23,6 +23,12 @@ import { mapGetters, mapMutations } from 'vuex';
|
||||
import projectConfig from '@/core/config';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
multiTag: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
isCollapse: false,
|
||||
@@ -60,9 +66,13 @@ export default {
|
||||
},
|
||||
selectMenu (index, path) {
|
||||
if (this.getCurrentMenuId === index) return;
|
||||
// <20><>ҳ<EFBFBD><D2B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>tags<67><73>cachePage
|
||||
if (!this.multiTag) {
|
||||
this.clearAllTags();
|
||||
}
|
||||
this.setCurrentMenuId(index);
|
||||
},
|
||||
...mapMutations(['setCollapse', 'clearCachePage', 'setCurrentMenuId'])
|
||||
...mapMutations(['setCollapse', 'clearAllTags', 'setCurrentMenuId'])
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-container :style="getMainStyle">
|
||||
<el-aside width='200px' class="sidebar">
|
||||
<side-bar style="overflow: hidden"></side-bar>
|
||||
<side-bar style="overflow: hidden" :multi-tag="false"></side-bar>
|
||||
</el-aside>
|
||||
<el-container style="background-color: rgb(235,235,235)">
|
||||
<el-header class="header">
|
||||
@@ -76,11 +76,12 @@ export default {
|
||||
}
|
||||
|
||||
SystemController.logout(this, {}, options).catch(e => {});
|
||||
this.clearAllTags();
|
||||
this.$router.replace({name: 'login'});
|
||||
}).catch(e => {});
|
||||
}
|
||||
},
|
||||
...mapMutations(['setClientHeight'])
|
||||
...mapMutations(['setClientHeight', 'clearAllTags'])
|
||||
},
|
||||
computed: {
|
||||
getMainStyle () {
|
||||
@@ -112,9 +113,11 @@ export default {
|
||||
getMenuItem: {
|
||||
handler (newValue) {
|
||||
if (newValue == null) {
|
||||
this.$router.replace({
|
||||
name: 'welcome'
|
||||
});
|
||||
if (this.$route.name !== 'welcome') {
|
||||
this.$router.replace({
|
||||
name: 'welcome'
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.$router.replace({
|
||||
name: newValue.formRouterName
|
||||
|
||||
Reference in New Issue
Block a user