diff --git a/frontend/src/components/canvas/components/Editor/Preview.vue b/frontend/src/components/canvas/components/Editor/Preview.vue index 65f1bda35c..3c33311250 100644 --- a/frontend/src/components/canvas/components/Editor/Preview.vue +++ b/frontend/src/components/canvas/components/Editor/Preview.vue @@ -185,8 +185,9 @@ export default { return this.$store.state.panel.mainActiveName }, showUnpublishedArea() { - // return this.panelInfo.status === 'unpublished' - if (this.panelInfo && this.panelInfo.showType === 'view') { + if (this.showPosition === 'edit') { + return false + } else if (this.panelInfo && this.panelInfo.showType === 'view') { return false } else if ((this.mainActiveName === 'PanelMain' && this.activeTab === 'PanelList') || this.showPosition.includes('multiplexing')) { return this.panelInfo.status === 'unpublished' && !hasDataPermission('manage', this.panelInfo.privileges) diff --git a/frontend/src/components/canvas/components/Toolbar.vue b/frontend/src/components/canvas/components/Toolbar.vue index 087bfdd9a9..dc46617173 100644 --- a/frontend/src/components/canvas/components/Toolbar.vue +++ b/frontend/src/components/canvas/components/Toolbar.vue @@ -372,7 +372,6 @@ export default { }, clearCanvas() { this.$store.commit('setComponentData', []) - this.$store.commit('setCanvasStyle', DEFAULT_COMMON_CANVAS_STYLE_STRING) this.$store.commit('recordSnapshot', 'clearCanvas') this.$store.commit('setInEditorStatus', false) }, diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index 1995bdfe1b..2cc9423b81 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -269,6 +269,7 @@ :show-type="canvasStyleData.selfAdaption?'full':'width'" :canvas-style-data="canvasStyleData" :component-data="componentData" + show-position="edit" />