|
@@ -114,13 +114,15 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
sidebarOpened (val) {
|
|
|
- // console.log(this.$store.state.user.nowRouteName ,'vvvvvvvvvvv')
|
|
|
+ // console.log(this.$store.state.user.nowRouteName, 'vvvvvvvvvvv')
|
|
|
if (this.$store.state.user.nowRouteName != 'NodeMap') {
|
|
|
this.collapsed = !val
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ this.collapsed = true
|
|
|
+ }
|
|
|
},
|
|
|
nowRouteName (val) {
|
|
|
- // console.log(val,'vvvvvvvvvvv')
|
|
|
+ // console.log(val, 'vvvvvvvvvvv')
|
|
|
if (val == 'NodeMap') {
|
|
|
this.collapsed = true
|
|
|
} else {
|
|
@@ -140,7 +142,8 @@ export default {
|
|
|
},
|
|
|
mounted () {
|
|
|
const userAgent = navigator.userAgent
|
|
|
- if (userAgent.indexOf('Edge') > -1) {
|
|
|
+ console.log(userAgent, this.collapsed, this.nowRouteName, 'this.collapsedthis.collapsedthis.collapsed')
|
|
|
+ if (userAgent.indexOf('Edge') > -1 && this.nowRouteName != 'NodeMap') {
|
|
|
this.$nextTick(() => {
|
|
|
this.collapsed = !this.collapsed
|
|
|
setTimeout(() => {
|
|
@@ -148,6 +151,11 @@ export default {
|
|
|
}, 16)
|
|
|
})
|
|
|
}
|
|
|
+ if (this.nowRouteName == 'NodeMap') {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.collapsed = true
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['setSidebar']),
|