diff --git a/frontend/src/layout/index.vue b/frontend/src/layout/index.vue
index edb33d0bd9..554743b313 100644
--- a/frontend/src/layout/index.vue
+++ b/frontend/src/layout/index.vue
@@ -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) {
diff --git a/frontend/src/views/panel/index.vue b/frontend/src/views/panel/index.vue
index 3ae88858ad..c3813c655b 100644
--- a/frontend/src/views/panel/index.vue
+++ b/frontend/src/views/panel/index.vue
@@ -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)