We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
2.31.0
3.2.37
Chrome(103.0.5060.134)
window 11
https://www.naiveui.com/zh-CN/light/components/tag
给可关闭的tag标签绑定click事件,点击关闭按钮时会同时触发两个事件
期望给可关闭的tag标签绑定click事件时,点击非关闭按钮区域时只触发click事件,点击关闭按钮时只触发close事件。
实际给可关闭的tag标签绑定click事件时,点击关闭按钮时会同时触发click事件和close事件。
elementui的tag有click和close两个回调,naive只有close的回调
The text was updated successfully, but these errors were encountered:
use internal-stop-click-propagation prop can solve your issue.
internal-stop-click-propagation
<n-tag type="info" closable internal-stop-click-propagation @click="handleClick" @close="handleClose" > OK </n-tag>
Sorry, something went wrong.
这个可能得考虑
外部化这种属性
暴露出来叫 stopClickPropagation 怎么样
stopClickPropagation
trigger-click-on-close
Successfully merging a pull request may close this issue.
TuSimple/naive-ui version (版本)
2.31.0
Vue version (Vue 版本)
3.2.37
Browser and its version (浏览器及其版本)
Chrome(103.0.5060.134)
System and its version (系统及其版本)
window 11
Node version (Node 版本)
Reappearance link (重现链接)
https://www.naiveui.com/zh-CN/light/components/tag
Reappearance steps (重现步骤)
给可关闭的tag标签绑定click事件,点击关闭按钮时会同时触发两个事件
Expected results (期望的结果)
期望给可关闭的tag标签绑定click事件时,点击非关闭按钮区域时只触发click事件,点击关闭按钮时只触发close事件。
Actual results (实际的结果)
实际给可关闭的tag标签绑定click事件时,点击关闭按钮时会同时触发click事件和close事件。
Remarks (补充说明)
elementui的tag有click和close两个回调,naive只有close的回调
The text was updated successfully, but these errors were encountered: