Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

主应用定义在window上的对象或者发送全局数据中的对象键名丢失 #1379

Closed
galaxyCSS opened this issue Sep 21, 2024 · 2 comments
Labels
Need Reproduction 需要复现步骤

Comments

@galaxyCSS
Copy link

galaxyCSS commented Sep 21, 2024

问题描述

问题的具体描述

复现步骤

主应用在window上添加对象,主应用发送全局数据
const fdapi = new DigitalTwinPlayer(host, options).getAPI() window.fdapi = fdapi localStorage.setItem('fdapi', JSON.stringify({ fdapi })) microApp.setGlobalData({ fdapi }, () => { console.log('数据发送完成') })
子应用获取这个对象
let fdapi = window.rawWindow.fdapi console.log(fdapi)
const dataListener = (data) => { console.log(fdapi) }
查看对象的marker对象发现和不使用框架获取的对象里的键值不一样

上传截图

请上传代码截图、控制台、终端等截图以帮助我们了解您的问题。

62314b5616b910b00d4a6b63c4d8f49 25d5be146ba9819758fb90af8379b9c a58cbbd18dccb9ea747c23ff6ca451c

复现仓库

请提供一个精简的代码仓库,然后上传到自己的 github,以帮助我们复现您的问题。

环境信息

  • micro-app版本:
  • 主应用前端框架&版本:
  • 子应用前端框架&版本:
  • 构建工具&版本:
@galaxyCSS galaxyCSS changed the title 主应用定义在window上的对象或者发送全局数据中的对象键名 主应用定义在window上的对象或者发送全局数据中的对象键名丢失 Sep 21, 2024
@timhub66 timhub66 added the Need Reproduction 需要复现步骤 label Sep 23, 2024
Copy link

Hello @galaxyCSS. In order to facilitate location and troubleshooting, we need you to provide a realistic GitHub repository.
您好 @galaxyCSS, 为了方便定位和排查问题,我们需要您提供一个重现实例,请提供一个尽可能精简的 GitHub 仓库地址。

@github-actions github-actions bot closed this as completed Oct 1, 2024
Copy link

github-actions bot commented Oct 1, 2024

Since the issue was labeled with Need Reproduction, but no response in 7 days. This issue will be close. If you have any questions, you can comment and reply.
由于该 issue 被标记为需要可复现步骤,却 7 天未收到回应。现关闭 issue,若有任何问题,可评论回复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Need Reproduction 需要复现步骤
Projects
None yet
Development

No branches or pull requests

2 participants