From 6f7dd7dd7a001b607ff818c362931c5834c6d65b Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 1 Jul 2022 17:47:52 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8B=E6=9E=B6=E6=9C=89=E6=9D=83=E9=99=90?= =?UTF-8?q?=E7=9A=84=E4=BB=AA=E8=A1=A8=E6=9D=BF=EF=BC=8C=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E6=97=B6=E6=8F=90=E7=A4=BA=E5=B7=B2=E4=B8=8B?= =?UTF-8?q?=E6=9E=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/components/Editor/Preview.vue | 5 +++-- frontend/src/views/panel/edit/index.vue | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) 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/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" /> Date: Fri, 1 Jul 2022 17:53:24 +0800 Subject: [PATCH 2/2] =?UTF-8?q?refactor(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?= =?UTF-8?q?=E4=BB=AA=E8=A1=A8=E6=9D=BF=E6=B8=85=E9=99=A4=E7=94=BB=E5=B8=83?= =?UTF-8?q?=E5=8F=AA=E6=B8=85=E7=90=86=E7=BB=84=E4=BB=B6=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=BF=9D=E7=95=99=E4=BB=AA=E8=A1=A8=E6=9D=BF=E7=94=BB=E5=B8=83?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/components/Toolbar.vue | 1 - 1 file changed, 1 deletion(-) 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) },