我在 Sencha Touch 中有 2 个列表项,已添加到我的面板中。每个列表的宽度=50%,高度=全屏。该面板具有全屏高度。每个列表都有一个包含大约 100 个项目的 Store。
Sencha 错误地估计了列表的范围并且不允许我向下滚动。我只能放下几个项目,然后它就会弹回来。
如何让并排列表项滚动?
谢谢, 格里
最佳答案
这对我有用,我认为诀窍是每个面板的布局值。
“hbox”用于父级,然后“fit”用于两个半面板,如果“并排”面板未设置为适合列表,则将无法正确滚动。
root = new Ext.Panel({
fullscreen: true,
layout: 'hbox',
version: '1.1.1',
scroll: false,
items: [{
xtype: 'panel',
width: '50%',
height: '100%',
layout: 'fit',
items: [{
xtype: 'list',
itemTpl: '{display}',
store: new Ext.data.Store({
model: 'item',
data: [...]
})
}]
}, {
xtype: 'panel',
width: '50%',
height: '100%',
layout: 'fit',
items: [{
xtype: 'list',
itemTpl: '{display}',
store: new Ext.data.Store({
model: 'item',
data: [...]
})
}]
}]
});
关于list - Sencha Touch 中的 2 个滚动列表不滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6194463/