From 5214c273318d1656b4e3646fa39948a785f25229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Mon, 18 Sep 2023 11:30:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3window.opener=20?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/preview/wrapper.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/views/preview/wrapper.vue b/src/views/preview/wrapper.vue index 6a9b9a72..3ed56888 100644 --- a/src/views/preview/wrapper.vue +++ b/src/views/preview/wrapper.vue @@ -15,8 +15,7 @@ let key = ref(Date.now()) // 数据变更 -> 组件销毁重建 ;[SavePageEnum.JSON, SavePageEnum.CHART_TO_PREVIEW].forEach((saveEvent: string) => { - if (!window.opener) return - if(!(window.opener === window)) return + if (!window.opener && !window.opener.addEventListener) return window.opener.addEventListener(saveEvent, async (e: any) => { const localStorageInfo: ChartEditStorageType = await getSessionStorageInfo() as unknown as ChartEditStorageType setSessionStorage(StorageEnum.GO_CHART_STORAGE_LIST, [{ ...e.detail, id: localStorageInfo.id }]) From d170d9418607952ed6de8cfe4d45b99ee0669ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Mon, 18 Sep 2023 11:43:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=88=86=E7=BB=84?= =?UTF-8?q?=E5=9C=A8=E9=A2=84=E8=A7=88=E4=B8=8B=E7=9A=84=E6=BB=A4=E9=95=9C?= =?UTF-8?q?=E5=8F=98=E6=8D=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/PreviewRenderGroup/index.vue | 46 +++++++++++-------- .../components/PreviewRenderList/index.vue | 6 ++- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/src/views/preview/components/PreviewRenderGroup/index.vue b/src/views/preview/components/PreviewRenderGroup/index.vue index a24e8676..19507fb7 100644 --- a/src/views/preview/components/PreviewRenderGroup/index.vue +++ b/src/views/preview/components/PreviewRenderGroup/index.vue @@ -1,31 +1,37 @@ diff --git a/src/views/preview/components/PreviewRenderList/index.vue b/src/views/preview/components/PreviewRenderList/index.vue index 4d44e678..d22be72d 100644 --- a/src/views/preview/components/PreviewRenderList/index.vue +++ b/src/views/preview/components/PreviewRenderList/index.vue @@ -6,7 +6,6 @@ :key="item.id" :style="{ ...getComponentAttrStyle(item.attr, index), - ...getFilterStyle(item.styles), ...getTransformStyle(item.styles), ...getStatusStyle(item.status), ...getPreviewConfigStyle(item.preview), @@ -31,7 +30,10 @@ :chartConfig="item" :themeSetting="themeSetting" :themeColor="themeColor" - :style="{ ...getSizeStyle(item.attr) }" + :style="{ + ...getSizeStyle(item.attr), + ...getFilterStyle(item.styles) + }" v-on="useLifeHandler(item)" >