加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

twitter-bootstrap-3 – ui-select:在Bootstrap网格系统中设置

发布时间:2020-12-17 21:34:40 所属栏目:安全 来源:网络整理
导读:我在自举网格中有一个带有ui-select的表单. 我希望我的ui-select与它下面的输入一样宽. 这是我的代码 div class="col-md-12" div class="col-md-6 form-group" label class="col-md-4" style="text-align:right;"Pays/label div class="col-md-8" ui-select
我在自举网格中有一个带有ui-select的表单.
我希望我的ui-select与它下面的输入一样宽.
这是我的代码

<div class="col-md-12">
   <div class="col-md-6 form-group">
        <label class="col-md-4" style="text-align:right;">Pays</label>
        <div class="col-md-8">
            <ui-select ng-model="adresse.pays" theme="select2" ng-disabled="disabled" ame="pays">
                <ui-select-match placeholder="Sélectionnez un pays..." allow-clear>{{$select.selected.nom}}</ui-select-match>
                <ui-select-choices repeat="pays in payss | propsFilter: {nom : $select.search}">
                    <div ng-bind-html="pays.nom | highlight: $select.search"></div>
                </ui-select-choices>
            </ui-select>
        </div>
    </div>
    <div class="col-md-6">
        <label class="col-md-4" style="text-align:right;">Mail</label>
        <input type="text" class="col-md-3 input-sm"
            ng-model="adresse.mail">
    </div>
</div>
<div class="col-md-12">
    <div class="form-group col-md-6">
        <label class="col-md-4" style="text-align:right;">Code adresse client</label>
        <input type="text" class="col-md-8 input-sm"
            ng-model="adresse.codeAdresseClient" name="codeAdresse">
    </div>
    <div class="form-group col-md-6">
        <label class="col-md-4" style="text-align:right;">Interlocuteur</label>
        <input type="text" class="col-md-3 input-sm"
            ng-model="adresse.interlocuteur" name="interlocuteur">
    </div>
</div>

这段代码产生了这个:

如果有人知道该怎么做……
提前致谢.

解决方法

我的建议是要么

>使用bootstrap主题(而不是select2),或
>只需将宽度设置为100%

检查这个插件:http://plnkr.co/edit/9mI8nO?p=preview

<ui-select ng-model="person.selected" theme="bootstrap">
  ...
</ui-select>

<ui-select ng-model="person.selected" theme="select2" style="width:100%">
  ...
</ui-select>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读