amis icon indicating copy to clipboard operation
amis copied to clipboard

dialog 中设置了 menuTpl 和 searchable 的 select 无法选中

Open biley opened this issue 3 years ago • 2 comments

描述问题:

dialog 中设置了 menuTpl 和 searchable 的 select 无法直接选中 企业微信截图_00b2c8f6-f1cd-465c-8351-382b8cceee35

但是点击对应选项的 padding 的话,是可以选中的 截屏2022-09-15 17 11 14

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

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

  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在 最新 amis,可直接在官网文档中复现:https://aisuda.bce.baidu.com/amis/zh-CN/components/page

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

{
  "type": "page",
  "body": [
    {
      "type": "form",
      "body": [
        {
          "type": "button",
          "label": "按钮",
          "actionType": "dialog",
          "dialog": {
            "title": "系统提示",
            "body": [
              {
                "type": "select",
                "label": "选项",
                "name": "select",
                "menuTpl": "<div>${label} 值:${value}, 当前是否选中: ${checked}</div>",
                "options": [
                  {
                    "label": "A",
                    "value": "a"
                  },
                  {
                    "label": "B",
                    "value": "b"
                  },
                  {
                    "label": "C",
                    "value": "c"
                  }
                ],
                "searchable": true
              }
            ],
            "type": "dialog"
          }
        }
      ]
    }
  ]
}
  1. 操作步骤 直接点击选项 content 是无法选中的,点击选项的 padding 区域可以选中

biley avatar Sep 15 '22 09:09 biley

这种情况下甚至在 menuTpl 中使用的 <a></a> 标签都无法点击跳转,不太理解为什么会这样😭

biley avatar Sep 16 '22 06:09 biley

好像和 html 标签有关,正常使用模板 ${} 是没关系的;用 html 标签包裹的内容点击就会失效

biley avatar Sep 16 '22 07:09 biley

用你提供的Schema没复现

lurunze1226 avatar Sep 28 '22 11:09 lurunze1226