同时使用ui-select2的单选和异步,导致input的allowclear失效
<input type="hidden" required class="form-control" data-placeholder="仓库名称" allowclear ui-select2="getWHDataAsync(0)" ng-change="changeWarehouse()" ng-model="queryModel.Warehouse" />
<select class="form-control" ui-select2 multiple="multiple" allowclear ng-model="queryModel.AuditState" placeholder="多选">
<option ng-repeat="item in purchaseStateList" selected value="{{item.Value}}">{{item.Text}}</option>
</select>
解决方法,在select中加入allowclear属性