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-picker中左侧的选项大概超过100个时样式异常,label显示不全。 #9116

Open
Flyingliao opened this issue Dec 12, 2023 · 2 comments
Assignees
Labels
bug Something isn't working confirmed

Comments

@Flyingliao
Copy link

描述问题:

原因:大概超过100个时,选项内联样式多了一部分。

截图或视频:

正常的:
image

异常的:
image

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

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

  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在
    amis: 3.2.0. 官网中也存在这个bug。https://aisuda.bce.baidu.com/amis/zh-CN/components/form/transfer-picker#%E8%87%AA%E5%AE%9A%E4%B9%89%E9%80%89%E9%A1%B9%E5%B1%95%E7%A4%BA

  3. 粘贴有问题的完整 amis schema 代码:
    修改下方代码使其存在100+选项字段就可以重现问题了。

{
        "label": "默认",
        "type": "transfer-picker",
        "name": "transfer",
        "menuTpl": "<div class='flex justify-between'><span>${label}</span><span class='text-muted m-r text-sm'>${tag}</span></div>",
        "valueTpl": "${label}(${value})",
        "options": [
                  {
                    "label": "诸葛亮",
                    "value": "zhugeliang",
                    "tag": "法师"
                  },
                  {
                    "label": "曹操",
                    "value": "caocao",
                    "tag": "战士"
                  },
                  {
                    "label": "钟无艳",
                    "value": "zhongwuyan",
                    "tag": "战士"
                  }
         ]
}
  1. 操作步骤
    打开含有100+选项字段的TransferPicker 穿梭选择器。
Copy link

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@github-actions github-actions bot added the bug Something isn't working label Dec 12, 2023
@sqzhou
Copy link
Collaborator

sqzhou commented Dec 18, 2023

已知问题,在fixed中,可以先通过设置itemHeight为38解决。 @Flyingliao

2betop pushed a commit that referenced this issue Dec 29, 2023
* fix:transfer级连模式支持虚拟列表时,显示文本问题

* fix:transfer级连模式支持虚拟列表时,显示文本问题

* fix:transfer级连模式支持虚拟列表时,显示文本问题

* test: transfer单测完善
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed
Projects
None yet
Development

No branches or pull requests

3 participants