Gen*_*ful 1 extjs sencha-touch sencha-touch-2
背景:我正在使用senchatouch 2 MVC框架开发一个应用程序.我正在使用带有两个标签的tabpanel的屏幕上工作.
问题:在第一个选项卡中,我想显示titleBar和List.我可以显示titleBar但不能显示选项卡中的列表.当我使用谷歌浏览器检查元素时,列表显示为空.我正在使用sencha网站上的示例列表代码.我可以在另一个面板中显示列表,但是当我将它作为项目放在tabPanel中时,它不会显示.
这是我正在使用的代码:
Ext.define('POC.view.WUHomePage', {
extend: 'Ext.TabPanel',
requires: ['Ext.TitleBar', 'Ext.dataview.List', 'Ext.data.proxy.JsonP'],
alias: 'widget.wuHomePageView',
config: {
fullscreen: true,
tabBarPosition: 'bottom',
cardSwitchAnimation: 'slide',
defaults: {
styleHtmlContent: true
},
items: [{
// This is first tab
title: 'Home',
iconCls: 'home',
items: [{
xtype: 'titlebar',
title: 'Hello',
docked: 'top',
items: [{
xtype: 'button',
text: 'LogOut',
ui: 'action',
itemId: 'newButton',
align: 'right'
}]
}, {
xtype: 'list',
title: 'Sample',
fullscreen: true,
itemTpl: '{title}',
data: [{
title: 'Item 1'
}, {
title: 'Item 2'
}, {
title: 'Item 3'
}, {
title: 'Item 4'
}]
}]
},
// This is second tab
{
title: 'Contact',
iconCls: 'user',
html: 'Contact Screen'
}]
},
});
Run Code Online (Sandbox Code Playgroud)