2012-12-29 51 views
0

我錯過了什麼嗎?在圖像下方生成代碼。Sencha Architect Gened代碼Tab Tab&List - 列表不顯示在Tab ...?

列表工作良好的標籤獨立...你可以不把一個列表中的標籤容器或有一個選項,我另外需要?謝謝格雷格

Ext.define('MyApp.view.MyTabPanel', { 
    extend: 'Ext.tab.Panel', 

    config: { 
     items: [ 
      { 
       xtype: 'container', 
       title: 'Home', 
       iconCls: 'info', 
       html: 'Welcome', 
       itemId: 'home' 
      }, 
      { 
       xtype: 'container', 
       title: 'About', 
       iconCls: 'info', 
       html: 'Awsome', 
       itemId: 'about' 
      }, 
      { 
       xtype: 'container', 
       title: 'Stylists', 
       iconCls: 'info', 
       html: '', 
       itemId: 'contact', 
       scrollable: true, 
       items: [ 
        { 
         xtype: 'list', 
         docked: 'top', 
         styleHtmlContent: true, 
         itemTpl: [ 
          '<div>{fname} {lname} {title}</div>' 
         ], 
         store: 'LSstylistStore' 
        } 
       ] 
      } 
     ], 
     tabBar: { 
      docked: 'bottom' 
     } 
    } 

}); 

回答

0

需要添加布局:類型:適合,這使列表顯示在選項卡容器內。在Architect中選擇包含列表的選項卡並在Ext.Container佈局選項中選擇「fit」

  xtype: 'container', 
      title: 'Stylists', 
      iconCls: 'info', 
      html: '', 
      itemId: 'Stylists', 
      layout: { 
       type: 'fit' 
      }, 
      scrollable: true,