我试图找到方法将自定义 CSS 仅应用于 UISelect Multiple 中的一个选定项目。
<ui-select id="productSelect" class="form-control" multiple ng-model="contractsHeader.ProductList" ng-click="addProductOpen()" on-select="onProductSelected($item)" on-remove="onProductRemoved($item)" ng-disabled="!selectedAdvertisers.selectedAdvertiser || !selectedAdvertisers.selectedAdvertiser.AdvertiserKey || selectedAdvertisers.selectedAdvertiser.AdvertiserKey== ' '" ng-required="true" autofocus>
<ui-select-match>{{getProductDisplayText($item)}}</ui-select-match>
<ui-select-choices ui-disable-choice="product.Product_Code == null" refresh="searchByTypes('Products',$select.search)" refresh-delay="0" repeat="product in products track by $index | filter:$select.search">
<div style="cursor:pointer;" ng-if="product.Product_Code == null && securitySettings.addOtherProducts" ng-click="addProductOpen($select, $event)"><{{product.Product_Description}}></div>
<div ng-if="product.Product_Code != null">{{product.Product_Description}} ({{product.Product_Code}})</div>
</ui-select-choices>
</ui-select>
这是 UISelect-Match 的摘录
<ui-select-match>{{getProductDisplayText($item)}}</ui-select-match>
我尝试使用条件 ng-class 将 CSS 仅应用于一个元素,但 CSS 类从未应用于该项目。