mirror of
https://gitee.com/dromara/go-view.git
synced 2024-11-30 10:48:40 +08:00
!209 第三方应用open预览地址的时候,发现window.opener并不是一个window对象会报addEventListener不存在。
Merge pull request !209 from 空/N/A
This commit is contained in:
commit
6e55c9951b
@ -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 }])
|
||||
|
Loading…
Reference in New Issue
Block a user