shu*_*una 6 javascript jquery angularjs angular-ui angular-ui-select
我有一个dropdown list和一个ui-select.在下拉值的基础上ui-select绑定.但如果我直接粘贴其中的特定值ui-select显示为已选中.我们如何防止ui-select复制粘贴值?
示例如下所示.
选择查询 <div class="dropdown-Finding">
<ui-select class="form-control dropdown-reviwerFinding-select" id="searchBarArea" onkeypress="return false;" multiple tagging tagging-label="false" ng-model="QiReviewerFindingType.selectedItems" theme="bootstrap">
<ui-select-match placeholder="Select Reviewer Findings">{{$item.ShortDescription}}</ui-select-match>
<ui-select-choices repeat="qiQueryFinding in qiQueryFindings | filter:$select.search">
{{qiQueryFinding.ShortDescription}}
</ui-select-choices>
</ui-select>
<span class="carat" open-menu-by-click="searchBarArea"></span>
</div>
Run Code Online (Sandbox Code Playgroud)
小智 0
http://plnkr.co/edit/BVaXpviCACi5sd3aw9oX?p=preview
使用这些类型的代码。
<ui-select ng-model="ctrl.person.selected" theme="select2" on-select="ctrl.onSelectCallback($item, $model)" ng-disabled="ctrl.disabled" style="min-width: 300px;" title="Choose a person">
<ui-select-match placeholder="Select a person in the list or search his name/age...">{{$select.selected.name}}</ui-select-match>
<ui-select-choices repeat="person.email as person in ctrl.people | propsFilter: {name: $select.search, age: $select.search}">
<div ng-bind-html="person.name | highlight: $select.search"></div>
<small>
email: {{person.email}}
age: <span ng-bind-html="''+person.age | highlight: $select.search"></span>
</small>
</ui-select-choices>
Run Code Online (Sandbox Code Playgroud)
我试图找出确切的差异,但我做不到。但上面的示例可能会对您有所帮助。
| 归档时间: |
|
| 查看次数: |
429 次 |
| 最近记录: |