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

actionType: 'dialog'配置data时,dialog层配的data无效 #11128

Open
thinkingc opened this issue Oct 29, 2024 · 1 comment
Open

actionType: 'dialog'配置data时,dialog层配的data无效 #11128

thinkingc opened this issue Oct 29, 2024 · 1 comment

Comments

@thinkingc
Copy link
Contributor

描述问题:

actionType: 'dialog'配置data时,dialog层配的data取不到值

截图或视频:

image

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

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

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

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

{
  "type": "page",
  "body": [
    {
      "label": "提示弹框",
      "type": "button",
      "onEvent": {
        "click": {
          "actions": [
            {
              "actionType": "dialog",
              "data": {
                "name1": "name1"
              },
              "dialog": {
                "title": "弹框标题",
                "data": {
                  "name2": "name2"
                },
                "body": [
                  {
                    "type": "tpl",
                    "tpl": "${name1} - ${name2}"
                  }
                ],
                "actions": []
              }
            }
          ]
        }
      }
    }
  ]
}
  1. 操作步骤
    点击按钮,弹窗中没有name2字符串。看文档有个dataMergeMode字段,看代码没处理dialog的情况,只处理了setvalue情况。
    image
@2betop
Copy link
Collaborator

2betop commented Nov 22, 2024

感觉默认行为不能改,默认应该是 override ?

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

No branches or pull requests

2 participants