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

[tooltip] 希望支持自定义class类名 #2973

Closed
iiimix opened this issue Dec 11, 2023 · 4 comments
Closed

[tooltip] 希望支持自定义class类名 #2973

iiimix opened this issue Dec 11, 2023 · 4 comments
Labels
usage the issue is about usage

Comments

@iiimix
Copy link
Contributor

iiimix commented Dec 11, 2023

这个功能解决了什么问题

现有的自定义类名呈现元素不对,给定了tooltip组件,最终呈现在了target元素上
image

tooltip组件content支持自定义类名
https://codesandbox.io/p/sandbox/tdesign-vue-demo-forked-5n6445?file=%2Fsrc%2Fdemo.vue%3A12%2C17

你建议的方案是什么

同时支持tooltip组件自定义类名和slot=content自定义类名

Copy link
Contributor

👋 @iiimix,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

Copy link
Contributor

github-actions bot commented Dec 11, 2023

♥️ 有劳 @mixiaola 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @iiimix

@ghostcode
Copy link

1.tooltip 组件是通过 popup 组件实现的:https://github.com/Tencent/tdesign-vue/blob/develop/src/tooltip/tooltip.tsx#L106
2.通过 https://github.com/Tencent/tdesign-vue/blob/develop/src/tooltip/tooltip.tsx#L18 这里看出,传递给 popup 的属性可以直接用在 tooltip 上。这里是 popup 的 api: https://tdesign.tencent.com/vue/components/popup?tab=api。

@uyarn
Copy link
Collaborator

uyarn commented Dec 15, 2023

是的 如@ghostcode 所说 是可以通过overlayClassname来实现的 class被应用在target上 是因为vue本身透传class实现的效果

@uyarn uyarn closed this as completed Dec 15, 2023
@uyarn uyarn added the usage the issue is about usage label Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage the issue is about usage
Projects
None yet
Development

No branches or pull requests

3 participants