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

iframe的通信事件多次响应问题 #10196

Open
IRelive opened this issue May 10, 2024 · 1 comment · May be fixed by #10266
Open

iframe的通信事件多次响应问题 #10196

IRelive opened this issue May 10, 2024 · 1 comment · May be fixed by #10266
Assignees

Comments

@IRelive
Copy link

IRelive commented May 10, 2024

描述问题:

dialog内添加了iframe,iframe添加了通信事件,每次重新打开dialog后,iframe绑定的通信事件就会重复绑定,导致通信事件被多次响应

截图或视频:

可以的话,尽可能提供截图或视频来补充描述你的问题...

如何复现(请务必完整填写下面内容):

  1. 你是如何使用 amis 的?
    sdk

  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在

  3. 粘贴有问题的完整 amis schema 代码:

{
  "type": "page",
  "data": {
    "iframeSrc": "https://github.com/baidu/amis"
  },
  "body": [
    {
      "type": "button",
      "actionType": "dialog",
      "dialog": {
        "title":"adf",
        "body":[
          {
            "type": "iframe",
            "src": "http://www.xxx.com",
            "onEvent": {
              "detail": {
                "actions": [
                  {
                    "actionType": "crud",
                    "componentId": "form01",
                    "data": {
                      "iframeId": "${iframeId}" // 刷新请求参数为`"iframe 传给 amis 的 id 是:${iframeId}"`这段模板,即111
                    }
                  }
                ]
              }
            }
          }
        ]
      }
    }
  ]
  1. 操作步骤
    请简单描述一下复现的操作步骤...
@2betop
Copy link
Collaborator

2betop commented May 20, 2024

感谢反馈已定位到问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants