Skip to content

[Popup] triggerElement 属性传入选择器非触发元素也会导致触发 #5610

@RongDuJiKsp

Description

@RongDuJiKsp

tdesign-vue-next 版本

1.13.2

重现链接

https://github.com/RongDuJiKsp/IssueForTDesgin1

重现步骤

  1. 创建vue脚手架项目并安装Tdesign
  2. 修改 App.vue 使用popup组件包裹两个按钮,id分别为 click-popup no-click-popup
  3. 设置popup的 triggerElement="#click-popup" trigger="click
  4. 分别点击两个按钮

期望结果

点击id为 click-popup 的按钮时应该弹出popup的弹出层内容,而点击id为 no-click-popup 的按钮时不应该弹出popup的弹出层内容

实际结果

点击两个按钮都弹出了popup的弹出层内容

框架版本

Vue(3.5.13)

浏览器版本

Chrome(137.0.7151.104)

系统版本

Macos & WIndows 11

Node版本

v22.5.1

补充说明

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions