-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
a-typography-link specifies the copyable attribute, limiting the self event of the copy button to not be thrown #5746
Comments
使用 copyableIcon 插槽自定义 copy icon 就可以了 |
https://codesandbox.io/s/wen-ben-yu-chao-lian-jie-zu-jian-ant-design-vue-3-2-7-forked-6g751e?file=/src/demo.vue |
<template #copyableIcon="{ copied }">
<span @click.stop>
<CopyOutlined v-if="!copied" />
<CheckOutlined v-else style="color: blue" />
</span>
</template> 自定义 stop 啊 |
场景是,通过link展示一个链接文本,后面提供复制长文本的能力,同时点击链接时又能够自定义响应动作,两个动作是分离的,这里stop后,copy默认动作也丢失了。 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What problem does this feature solve?
例如<a-typography-link @click="handleLinked" underline copyable>中,点击copy按钮,click事件也会被响应,有可能会需要两种动作
What does the proposed API look like?
copyable时,copy按钮 onclick中增加stop阻止冒泡
The text was updated successfully, but these errors were encountered: