diff --git a/src/views/preview/wrapper.vue b/src/views/preview/wrapper.vue index c119a661..6a9b9a72 100644 --- a/src/views/preview/wrapper.vue +++ b/src/views/preview/wrapper.vue @@ -16,6 +16,7 @@ let key = ref(Date.now()) // 数据变更 -> 组件销毁重建 ;[SavePageEnum.JSON, SavePageEnum.CHART_TO_PREVIEW].forEach((saveEvent: string) => { if (!window.opener) return + if(!(window.opener === window)) 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 }])