1
視圖無法正確呈現。它只顯示按鈕。我在這裏做錯了什麼?導航視圖不能正確呈現項目
Ext.application({
name: 'App',
models: ['Picture'],
stores: ['Pictures'],
views: ['Picture'],
requires: [
'Ext.carousel.Carousel',
'Ext.data.proxy.JsonP'
],
launch: function() {
var titleVisible = false,
info, carousel;
carousel = Ext.create('Ext.Carousel', {
store: 'Pictures',
direction: 'horizontal',
listeners: {
activeitemchange: function(carousel, item) {
info.setHtml(item.getPicture().get('title'));
}
}
});
info = Ext.create('Ext.Component', {
cls: 'apod-title',
top: '50',
left: 0,
right: 0
});
var view = Ext.create('Ext.NavigationView', {
title:'Paramore',
items: [carousel,info,{xtype:'button',text:'help'}]
});
Ext.Viewport.add(view);
--- some code ----
});
}
});
.I也試過這種
VAR視圖= Ext.create( 'Ext.NavigationView',{ 標題: '測試', 項目:[ { 的xtype: '容器', 標題: '測試', 滾動: '垂直', 項目:旋轉木馬,信息] }
謝謝你幫助我:-)。我不知道導航視圖的行爲。代碼是從Ed Spencer博客中直接獲取的,我想在導航視圖中將同樣的東西和列表一起寫入。那就是我想要Carousel(如Ed的博客)和導航視圖中的List。這是我在上面的代碼中試過的。再次感謝 。 – raghav 2012-03-06 05:07:50