2014-10-11 58 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。

讓我知道這是否有助於你