mirror of
https://gitee.com/dromara/go-view.git
synced 2025-02-24 00:02:51 +08:00
fix: 解决window.opener 错误判断
This commit is contained in:
parent
19165c76d5
commit
5214c27331
@ -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 }])
|
||||
|
Loading…
Reference in New Issue
Block a user