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 文字提示] 内容区能否加一个高度限制的props #4272

Open
zhujie948 opened this issue Jun 11, 2024 · 4 comments
Open

[Tooltip 文字提示] 内容区能否加一个高度限制的props #4272

zhujie948 opened this issue Jun 11, 2024 · 4 comments
Labels
need more info need more information to resolve issue

Comments

@zhujie948
Copy link

zhujie948 commented Jun 11, 2024

tdesign-vue-next 版本

1.9.4

重现链接

No response

重现步骤

当Tooltip内容过多时,外层box设置overflow:hidden导致文字显示不全

期望结果

希望出一个可自定义设置高度的props,超过这个高度时,内容区出现滚动条

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

有尝试过覆盖样式设置高度,但内容区和小箭头同属于一个div中,设置overflow:auto导致小箭头消失

Copy link
Contributor

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

@uyarn
Copy link
Collaborator

uyarn commented Jun 13, 2024

“有尝试过覆盖样式设置高度,但内容区和小箭头同属于一个div中,设置overflow:auto导致小箭头消失” 是指怎么弄的,贴下代码看看呢

@uyarn uyarn added the need more info need more information to resolve issue label Jun 13, 2024
@zhujie948
Copy link
Author

“有尝试过覆盖样式设置高度,但内容区和小箭头同属于一个div中,设置overflow:auto导致小箭头消失” 是指怎么弄的,贴下代码看看呢

.t-tooltip {
// max-height: 300px !important;
// overflow-y: auto;
// scrollbar-color: rgba(0, 0, 0, 10%) transparent;
// scrollbar-width: thin;

.t-popup__content {
  max-height: 300px !important;
  overflow-y: auto;
  scrollbar-color: rgba(255, 255, 255, 10%) transparent;
  scrollbar-width: thin;
}

}

大概是这样 给 .t-popup__content设置高度让他出现滚动条,但是这样,小箭头就没有了,所以我只能修改为给外层的.t-tooltip设置高度解决问题

@kangkang723
Copy link

我也遇到这种情况,并且如果内容太多,还超出被遮挡了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info need more information to resolve issue
Projects
None yet
Development

No branches or pull requests

3 participants