我有一个引导模式,在其中,我有一个用于标记的 ui-select。这是我的例子:
<div class="modal modal-invite">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<ui-select multiple tagging tagging-label="" ng-model="email_list" theme="bootstrap" ng-disabled="disabled" on-select="" on-remove="" title="Insert your friends email here." >
<ui-select-match placeholder="Your friends email here...">{{$item}}</ui-select-match>
<ui-select-choices repeat="email in email_list | filter:$select.search">
{{email}}
</ui-select-choices>
</ui-select>
</div>
<div class="modal-footer">
<button class="btn btn-success">Invite</button>
</div>
</div>
</div>
</div>
我的问题是:当我打开模态框时$('modal-invite').modal('show')
,占位符(和可点击区域)的大小为 10 像素,如下所示:
单击它后,它会获得正确的宽度。
当模式打开时,如何使 ui-select 刷新它的大小?