refactor: 优化顶部菜单栏隐藏条件

Co-authored-by: wangjiahao <1522128093@qq.com>
This commit is contained in:
fit2cloudrd 2021-11-25 17:07:31 +08:00 committed by GitHub
parent 342aec90ea
commit 5c8ae8289d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 10 deletions

View File

@ -12,14 +12,6 @@
<app-main />
</de-main-container>
</de-container>
<!-- <de-main-container>
<app-main />
</de-main-container> -->
<!-- <div :class="{sidebarHide: sidebar.hide}" class="main-container">
<app-main />
</div> -->
</div>
</template>
@ -62,7 +54,7 @@ export default {
return this.$store.state.settings.showSettings
},
fullHeightFlag() {
return this.componentName === 'PanelEdit' || this.componentName === 'ChartEdit'
return this.$route.path.indexOf('panel') > -1 && (this.componentName === 'PanelEdit' || this.componentName === 'ChartEdit')
},
mainStyle() {
if (this.fullHeightFlag) {

View File

@ -28,7 +28,7 @@ export default {
},
computed: {
fullHeightFlag() {
return this.componentName === 'PanelEdit' || this.componentName === 'ChartEdit'
return this.$route.path.indexOf('panel') > -1 && (this.componentName === 'PanelEdit' || this.componentName === 'ChartEdit')
}
},
watch: {
@ -49,6 +49,7 @@ export default {
})
},
created() {
bus.$emit('PanelSwitchComponent', { name: 'PanelMain' })
this.$store.dispatch('app/toggleSideBarHide', true)
const routerParam = this.$router.currentRoute.params
this.toMsgShare(routerParam)