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

Transfer 组件 searchapi 搜索的数据,右侧已选项无法正常反显 Label #11381

Open
jinmingpang opened this issue Dec 17, 2024 · 0 comments

Comments

@jinmingpang
Copy link
Contributor

描述问题:

Transfer 组件 searchapi 搜索的数据,右侧以选项无法正常反显 Label

截图或视频:

image

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

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

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

存在

  1. 粘贴有问题的完整 amis schema 代码:
{
  "type": "page",
  "body": {
    "type": "page",
    "body": {
      "type": "form",
      "api": "/amis/api/mock2/form/saveForm",
      "body": [
        {
          "label": "searchApi",
          "type": "transfer",
          "name": "transfer",
          "searchable": true,
          "selectMode": "tree",
          "searchApi": {
            "url": "/amis/api/transfer/search?name=${term}",
            "adaptor": "return { data: { options: [{label: 'A选项', value: 'a'},{label: 'B选项', value: 'b'}]}  }"
          }
        }
      ]
    }
  }
}
  1. 操作步骤
  2. 搜索框输入 “a”, 会搜索出选项,
  3. 然后选择搜索出的选项
  4. 右侧会显示已选择内容 (此时,右侧显示的是选项的 value, 预期反显选项的label)
@jinmingpang jinmingpang changed the title Transfer 组件 searchapi 搜索的数据,右侧以选项无法正常反显 Label Transfer 组件 searchapi 搜索的数据,右侧已选项无法正常反显 Label Dec 17, 2024
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

1 participant