以下搜索框可以完美找到下拉列表的原始代码:
<ui-select ng-model="ctrl.selected" on-select="ctrl.refreshData()" theme="bootstrap">
<ui-select-match placeholder="Select Profile"><span ng-bind="$select.selected.profile"></span></ui-select-match>
<ui-select-choices repeat="data in ctrl.profile | filter:$select.search">
<span ng-bind="data.profile | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
&#13;
我将翻译添加到中文翻译代码后,搜索框对中文不起作用。只有英语正在运作。
<ui-select ng-model="ctrl.selected" on-select="ctrl.refreshData()" theme="bootstrap">
<ui-select-match placeholder="{{'translate.profile' | translate }}"><span translate="{{$select.selected.translateProfile}}" translate-default="{{$select.selected.profile}}"></span>
</ui-select-match>
<ui-select-choices repeat="data in ctrl.profile | filter:$select.search">
<span ng-bind="( data.translateProfile | translate ) | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
&#13;