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

[Bug]: steedos object form组件, 在amis 抽屉中显示时, defaultData 不生效. #423

Open
baozhoutao opened this issue May 6, 2023 · 0 comments
Labels

Comments

@baozhoutao
Copy link
Contributor

Description

defaultData 在 抽屉模式下不生效

Steps To Reproduce 重现步骤

1 复制一下代码到设计器的page body.
2 修改下例代码中的对象名
3 然后在设计器预览即可看到问题

"body": [
    {
      "type": "button",
      "label": "按钮-弹框",
      "onEvent": {
        "click": {
          "actions": [
            {
              "dialog": {
                "type": "dialog",
                "title": "弹框标题",
                "body": [
                  {
                    "type": "steedos-object-form",
                    "label": "对象表单",
                    "objectApiName": "test_permission_obj",
                    "className": "sm:border sm:shadow sm:rounded sm:border-gray-300 bg-white p-4",
                    "id": "u:aa4af59803e62",
                    "mode": "edit"
                  }
                ],
                "showCloseButton": true,
                "showErrorMsg": true,
                "showLoading": true,
                "id": "u:5f57b497518c",
                "data": {
                  "defaultData": {
                    "name": "661"
                  },
                  "&": "$$"
                }
              },
              "actionType": "dialog"
            }
          ]
        }
      },
      "id": "u:7e411b05f2ae"
    },
    {
      "type": "button",
      "label": "按钮-抽屉",
      "onEvent": {
        "click": {
          "actions": [
            {
              "actionType": "drawer",
              "drawer": {
                "type": "drawer",
                "title": "弹框标题",
                "body": [
                  {
                    "type": "steedos-object-form",
                    "label": "对象表单",
                    "objectApiName": "test_permission_obj",
                    "className": "sm:border sm:shadow sm:rounded sm:border-gray-300 bg-white p-4",
                    "id": "u:d4e8034a59773",
                    "mode": "edit",
                    "defaultData": "${defaultData}"
                  }
                ],
                "id": "u:5fd0ea4872c6"
              }
            }
          ]
        }
      },
      "id": "u:6ab6ef351260"
    }
  ]

Version 版本

1.1、1.2

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

No branches or pull requests

1 participant