angularjs – Angular UI-Select:如何为文本溢出添加工具提示?
发布时间:2020-12-17 17:38:59 所属栏目:安全 来源:网络整理
导读:我有一个ui-select-match元素,当打开元素并在一行上悬停(突出显示)时,我需要一个工具提示,以便在文本溢出被边框切断的情况下显示该行的完整内容. 这似乎应该是ui-select的一个特性,但我找不到任何关于这样的东西的参考.到目前为止,我只找到了显示行内整个文
我有一个ui-select-match元素,当打开元素并在一行上悬停(突出显示)时,我需要一个工具提示,以便在文本溢出被边框切断的情况下显示该行的完整内容.
这似乎应该是ui-select的一个特性,但我找不到任何关于这样的东西的参考.到目前为止,我只找到了显示行内整个文本的解决方案. 谢谢! 解决方法
把title =“{{selected.name}}”放在持有ui-select-match指令的元素上怎么样?但是,工具提示无论如何都会在文本溢出时出现.
码: <ui-select ng-model="address.selected" theme="bootstrap" ng-disabled="disabled" reset-search-input="false" style="width: 300px;"> <ui-select-match title="{{address.selected.formatted_address}}" placeholder="Enter an address...">{{$select.selected.formatted_address}}</ui-select-match> <ui-select-choices repeat="address in addresses track by $index" refresh="refreshAddresses($select.search)" refresh-delay="0"> <div ng-bind-html="address.formatted_address | highlight: $select.search"></div> </ui-select-choices> </ui-select> 见plnkr (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |