Sencha touch 为什么我的列表没有显示在ST2中的浮动容器中
我正在编写一些测试代码,并希望在浮动容器中显示一个列表。测试代码不工作。有人能看看我是否遗漏了什么:Sencha touch 为什么我的列表没有显示在ST2中的浮动容器中,sencha-touch,sencha-touch-2,Sencha Touch,Sencha Touch 2,我正在编写一些测试代码,并希望在浮动容器中显示一个列表。测试代码不工作。有人能看看我是否遗漏了什么: var p = Ext.create('Ext.form.Panel', { xtype: 'panel', scrollable: true, centered: true, width: 300, height: 300, items: [ { xtype:"container", layout: {
var p = Ext.create('Ext.form.Panel', {
xtype: 'panel',
scrollable: true,
centered: true,
width: 300,
height: 300,
items: [
{
xtype:"container",
layout: {
type: 'vbox'
},
items: [
{
xtype: "list",
itemTpl: '{title},{author}',
flex: 1,
store: {
autoLoad: true,
fields : ['title', 'author'],
proxy: {
type: 'jsonp',
url: 'https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http://feeds.feedburner.com/SenchaBlog',
reader: {
type: 'json',
rootProperty: 'responseData.feed.entries'
}
}
}
}
]
}
]
});
Ext.Viewport.add(p);
这仅仅是因为您试图将列表放入FormPanel中。 试着使用一个容器,另外,如果你只需要在其中放置一个列表,不要使用“vbox”布局,而是使用一个合适的布局
var p = Ext.create('Ext.Container', {
centered: true,
width: 300,
height: 300,
layout: 'fit',
items: [
{
xtype: "list",
...