Unverified 提交 5c8ae828 authored 作者: fit2cloudrd's avatar fit2cloudrd 提交者: GitHub

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

Co-authored-by: 's avatarwangjiahao <1522128093@qq.com>
上级 342aec90
...@@ -12,14 +12,6 @@ ...@@ -12,14 +12,6 @@
<app-main /> <app-main />
</de-main-container> </de-main-container>
</de-container> </de-container>
<!-- <de-main-container>
<app-main />
</de-main-container> -->
<!-- <div :class="{sidebarHide: sidebar.hide}" class="main-container">
<app-main />
</div> -->
</div> </div>
</template> </template>
...@@ -62,7 +54,7 @@ export default { ...@@ -62,7 +54,7 @@ export default {
return this.$store.state.settings.showSettings return this.$store.state.settings.showSettings
}, },
fullHeightFlag() { fullHeightFlag() {
return this.componentName === 'PanelEdit' || this.componentName === 'ChartEdit' return this.$route.path.indexOf('panel') > -1 && (this.componentName === 'PanelEdit' || this.componentName === 'ChartEdit')
}, },
mainStyle() { mainStyle() {
if (this.fullHeightFlag) { if (this.fullHeightFlag) {
......
...@@ -28,7 +28,7 @@ export default { ...@@ -28,7 +28,7 @@ export default {
}, },
computed: { computed: {
fullHeightFlag() { fullHeightFlag() {
return this.componentName === 'PanelEdit' || this.componentName === 'ChartEdit' return this.$route.path.indexOf('panel') > -1 && (this.componentName === 'PanelEdit' || this.componentName === 'ChartEdit')
} }
}, },
watch: { watch: {
...@@ -49,6 +49,7 @@ export default { ...@@ -49,6 +49,7 @@ export default {
}) })
}, },
created() { created() {
bus.$emit('PanelSwitchComponent', { name: 'PanelMain' })
this.$store.dispatch('app/toggleSideBarHide', true) this.$store.dispatch('app/toggleSideBarHide', true)
const routerParam = this.$router.currentRoute.params const routerParam = this.$router.currentRoute.params
this.toMsgShare(routerParam) this.toMsgShare(routerParam)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论