gpt4 book ai didi

javascript - Uib-popover 应显示有限的字符

转载 作者:行者123 更新时间:2023-11-28 05:43:02 26 4
gpt4 key购买 nike

我有一个 uib-popover,当前显示 4000 个字符。如何在该弹出窗口中仅显示 100 个字符(如 textoverflow 属性)?请查看随附的屏幕截图enter image description here也是如此。

这是我的 html 代码:

 <i class="{{::prefix}}_TableCol_PrescriptionList_Notes_Text_OfficeComments fa fa-comment"
ng-show="prescription.officeNotes && showComments" uib-popover="Office Comments: {{ prescription.officeNotes }}" popover-placement="top"
popover-trigger="mouseenter" popover-animation="0"
ng-click="!prescription.disabledDueToSPM && showIconData(prescription, $event, 'officeNotes')"></i>

这是我的 css 文件代码:

    .popover.top {
margin-top: -5px !important;
font-size: 9pt;
max-width: 500px !important;
}

最佳答案

对于 HTML 标记上的属性,请使用 limitTo :

uib-popover="Office Comments: {{ prescription.officeNotes | limitTo : 100 }}" 

关于javascript - Uib-popover 应显示有限的字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38766197/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com