2014-10-11 59 views
0

代码在这里UI,只选择第一个选项卡工作

 <tabset justified="true"> 
 

 
      <tab heading="tab1" select="switchTier1Tab('qe')"> 
 
        tab1content 
 
      </tab> 
 

 
      <tab heading="tab2" select="switchTab('default')"> 
 
       <ui-select multiple ng-model="multipleResult.selectedRecordsWithGroupBy" theme="select2" on-select="modelselected($item, $model)" style="width: 100%" > 
 
        <ui-select-match placeholder="search records here...">{{$item.name}}</ui-select-match> 
 
        <ui-select-choices group-by="'group'" repeat="record in records | propsFilter: {name: $select.search}"> 
 
         <span ng-bind-html="record.name | highlight: $select.search"></span> 
 
        </ui-select-choices> 
 
       </ui-select> 
 
      </tab> 
 
      <tab heading="xx"> 
 
       tabcontent3 
 
      </tab> 
 
     </tabset>

当我把UI,选择第一个选项卡,它的工作原理,但是当我把它放在第二个选项卡。ui-select不起作用,我可以看不到数据。有没有人可以帮助解释这一点?

回答

0

您可以检查宽度是否设置为0px,这就是为什么您无法获取ui-select的输入类型文本。 ui-select的问题是文本框的宽度是从容器中计算出来的。因此,当选择框位于第二个选项卡中时,输入类型的宽度设置为0px。

让我知道这是否有助于你