From 7fac43d63b88378e3b531ba72c156c15634cae77 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 24 Dec 2021 17:52:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96PC=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E5=B8=83=E5=B1=80=E5=88=87=E6=8D=A2=EF=BC=8C?= =?UTF-8?q?=E9=98=B2=E6=AD=A2=E6=81=A2=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/components/Toolbar.vue | 1 + frontend/src/store/index.js | 1 + frontend/src/views/panel/list/PanelList.vue | 2 ++ frontend/src/views/panel/list/PanelViewShow.vue | 3 --- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/canvas/components/Toolbar.vue b/frontend/src/components/canvas/components/Toolbar.vue index 1bbdc16046..841b0350e5 100644 --- a/frontend/src/components/canvas/components/Toolbar.vue +++ b/frontend/src/components/canvas/components/Toolbar.vue @@ -376,6 +376,7 @@ export default { mobileDataObj[item.id] = item }) const sourceComponentData = JSON.parse(this.componentDataCache) + this.$store.commit('setComponentDataCache', null) sourceComponentData.forEach(item => { if (mobileDataObj[item.id]) { mobile2MainCanvas(item, mobileDataObj[item.id]) diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js index 8d71afdb3f..2c97d20e39 100644 --- a/frontend/src/store/index.js +++ b/frontend/src/store/index.js @@ -348,6 +348,7 @@ const data = { }, // 启用移动端布局 openMobileLayout(state) { + state.componentDataCache = null state.componentDataCache = JSON.stringify(state.componentData) state.pcComponentData = state.componentData const mainComponentData = [] diff --git a/frontend/src/views/panel/list/PanelList.vue b/frontend/src/views/panel/list/PanelList.vue index 016da5f01f..1af58c1307 100644 --- a/frontend/src/views/panel/list/PanelList.vue +++ b/frontend/src/views/panel/list/PanelList.vue @@ -645,6 +645,8 @@ export default { this.lastActiveNodeData = data this.activeTree = data.panelType if (data.nodeType === 'panel') { + // 清理pc布局缓存 + this.$store.commit('setComponentDataCache', null) // 加载视图数据 findOne(data.id).then(response => { const componentDatas = JSON.parse(response.data.panelData) diff --git a/frontend/src/views/panel/list/PanelViewShow.vue b/frontend/src/views/panel/list/PanelViewShow.vue index 9f9672ee49..54d0643dd8 100644 --- a/frontend/src/views/panel/list/PanelViewShow.vue +++ b/frontend/src/views/panel/list/PanelViewShow.vue @@ -130,13 +130,11 @@ import { starStatus, saveEnshrine, deleteEnshrine } from '@/api/panel/enshrine' import bus from '@/utils/bus' import { queryAll } from '@/api/panel/pdfTemplate' import ShareHead from '@/views/panel/GrantAuth/ShareHead' -import JsPDF from 'jspdf' export default { name: 'PanelViewShow', components: { Preview, SaveToTemplate, PDFPreExport, ShareHead }, props: { - // eslint-disable-next-line vue/require-default-prop activeTab: { type: String, required: false @@ -208,7 +206,6 @@ export default { bus.$on('set-panel-show-type', type => { this.showType = type || 0 }) - this.initPdfTemplate() }, methods: { From 9485610a771ab1663b93fc8e6ee45b81787547c4 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 27 Dec 2021 11:16:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BB=AA=E8=A1=A8=E6=9D=BF=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E5=88=97=E8=A1=A8=E7=BB=84=E4=BB=B6=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=9C=AA=E9=9D=A0=E5=B7=A6=E6=8E=92=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/widget/DeWidget/DeSelectGrid.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/components/widget/DeWidget/DeSelectGrid.vue b/frontend/src/components/widget/DeWidget/DeSelectGrid.vue index bad50f9d35..f7f4d4dd89 100644 --- a/frontend/src/components/widget/DeWidget/DeSelectGrid.vue +++ b/frontend/src/components/widget/DeWidget/DeSelectGrid.vue @@ -220,6 +220,7 @@ export default { position: absolute; top: 30px; bottom: 0; + text-align: left; } }