嗨列表我不明白爲什麼我看不到我的TAB3列表...煎茶沒有看到在面板
這是我的代碼... 我添加一條記錄在myStore,但我沒有看到名單...
在此先感謝!
var mainForm ;
var mainFormPanel={};
var addToXml=function (values){};
var htmlTemplate='<p>{b}</p><p>{m}</p><p>{f}</p>';
var template = new Ext.Template(htmlTemplate);
var myStore = Ext.create('Ext.data.Store', {
storeId: 'MyStore',
fields: [
{name: 'id', type: 'string'},
{name: 'c', type: 'string'},
{name: 'd', type: 'string'},
{name: 'q', type: 'string'},
{name: 'n', type: 'string'}
]
}); // create()
myStore.add({id:"id",c:"222",d:"333",q:"444",n:"555"});
var listpanel;
var config={
glossOnIcon: false,
autoMaximize: false,
icon: {
57: 'lib/sencha-touch/resources/icons/icon.png',
72: 'lib/sencha-touch/resources/icons/[email protected]',
114: 'lib/sencha-touch/resources/icons/[email protected]',
144: 'lib/sencha-touch/resources/icons/[email protected]'
},
phoneStartupScreen: 'lib/sencha-touch/resources/loading/Homescreen.jpg',
tabletStartupScreen: 'lib/sencha-touch/resources/loading/Homescreen~ipad.jpg',
//next we require any components we are using in our application.
requires: [
'Ext.tab.Panel',
'Ext.form.*',
'Ext.field.*',
'Ext.Button',
'Ext.data.Store'
],
launch: function() {
var list= Ext.create("Ext.NavigationView",{
xtype: 'list',
itemTpl: 'D:{id} - C:{c}',
store: myStore,
fullscreen: true,
layout:'fit',
title:'listtitle',
onItemDisclosure: function (record, btn, index) {
view.push({
xtype: 'panel',
renderTo: document.body,
layout:'fit',
title: 'second view',
html: 'second view',
styleHtmlContent: true
});
}
});
var myTitle= {
xtype: 'titlebar',
id: 'myTitle',
docked: 'top',
title: 'mytitle'//,
};
var myMean={
xtype: 'titlebar',
id: 'myMean',
docked: 'bottom',
title: 'myMean'
};
listpanel = new Ext.Panel({
xtype:'panel',
header:true,
layout: 'fit', // important to make layout as 'fit'
id:'listpanel',
title:'listpanel',
items: [myTitle,myMean,list]
});
var view = Ext.create("Ext.NavigationView", {
layout:'fit',
id:'view',
items: [listpanel]
});
Ext.Viewport.add({
xtype: 'tabpanel',
tabBarPosition: 'bottom',
items: [
{
title: '1-tab',
layout:'fit',
iconCls: 'home',
html:'tab1',
cls: 'card1'
},
{
title: '2-tab',
layout:'fit',
iconCls: 'download',
html:'tab2',
cls: 'card2'
},
{
title: '3-tab',
layout:'fit',
iconCls: 'home',
items: [view],
cls: 'card3'
},
{
title: '4-tabs',
layout:'fit',
iconCls: 'home',
html: '4-tab',
cls: 'card4'
}
]
});
}
};
Ext.application(config);
控制檯日誌錯誤? –
沒有錯誤:(... – michele