【发布时间】:2019-12-03 03:05:28
【问题描述】:
我正在使用 PrimeNG 的工具提示,并在其中包含大量文本时尝试使其更宽,但它对我尝试的任何内容都没有响应。
我尝试使用 PrimeNG 的 HTML 属性 tooltipStyleClass 并在 CSS 文件中为该类指定宽度。我也尝试过覆盖 PrimeNG 在其文档https://www.primefaces.org/primeng/#/tooltip 中描述的 ui-tooltip 类,但无济于事。我已经尝试在 Chrome 中调试,但我仍然无法弄清楚。
<!--TODO: make tooltip wider-->
<span *ngIf="uiComponent.component.description.length > 80"
pTooltip="{{uiComponent.component.description}}"
tooltipPosition="bottom"
showDelay="250"
tooltipStyleClass="tooltip">
{{uiComponent.component.description.substr(0,80)}}...
</span>
.tooltip {
width: 100em;
}
到目前为止,无论我做什么,工具提示的宽度都从未真正改变过。
【问题讨论】:
标签: angular tooltip width primeng