angular ui-select中的ng-disabled选项会缩小文本框

时间:2014-11-05 21:22:25

标签: javascript angularjs angular-ui ui-select2

我正在使用angular ui-select指令并尝试使用ng-disabled选项禁用它。

<ui-select multiple ng-model="address.selected"
             theme="bootstrap"
             ng-disabled="true"
             reset-search-input="true"
             style="width: 300px;">

以下是plunker http://plnkr.co/edit/julETCG4zCGAxFJ0PSBF?p=preview

文本框的大小缩小,ng-disabled =&#34; true&#34;。

1 个答案:

答案 0 :(得分:4)

themebootstrap更新为select2,如下所示:

<ui-select multiple ng-model="address.selected"
         theme="select2"
         ng-disabled="true"
         reset-search-input="true"
         style="width: 300px;">

如果您想要bootstrap主题,请将其添加到样式中:

.ui-select-multiple.ui-select-bootstrap {
    min-height: 34px;        
    height: auto;
    padding: .3em;
}

如图所示here