Skip to content

弹窗中通过onEvent发送ajax请求时,弹窗的关闭按钮无法点击 #12250

@thinkingc

Description

@thinkingc

描述问题:

发送请求过程中,关闭按钮消失了,如果我在请求下载一个很大的文件,但其实我并不想等响应结束就关闭弹窗。

截图或视频:

Image

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

  1. 你是如何使用 amis 的?
    sdknpm其他...

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

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

{
  "type": "page",
  "body": {
    "type": "flex",
    "justify": "start",
    "gap": true,
    "items": [
      {
        "type": "button",
        "label": "标准",
        "actionType": "dialog",
        "dialog": {
          "actions": [
            {
              "type": "button",
              "actionType": "cancel",
              "label": "取消",
            },
            {
              "type": "button",
              "actionType": "confirm",
              "label": "确认",
            },
          ],
          "body": [
            {
              "label": "下载",
              "type": "action",
              "onEvent": {
                "click": {
                  "actions": [
                    {
                      "actionType": "ajax",
                      "api": {
                        "url": "/amis/api/mock2/form/saveForm?waitSeconds=3",
                        "method": "post",
                        "responseData": {
                          "resId": "${id}"
                        },
                        "messages": {
                          "success": "成功了!欧耶",
                          "failed": "失败了呢。。"
                        }
                      },
                      "data": {
                        "age": 18
                      }
                    },
                  ],
                },
              }
            }
          ]
        }
      }
    ]
  }
}
  1. 操作步骤
    1、点击“下载”按钮
    2、关闭按钮消失了,接口响应时间长的情况下无法关闭

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions