【发布时间】:2015-02-22 07:29:21
【问题描述】:
我有一个应用程序,它由带有多个页面的标签栏布局组成,其中一个页面是列表视图,另一个页面是“详细视图”,它基本上是一个面板。
面板不会在移动设备上滚动。它在桌面(Chrome/Safari)上运行良好,但不会在移动设备上滚动。我已经在 iOS 上的 Safari/Chrome 和 Android 上的 Chrome 上对其进行了测试。
应用程序的演示在这里:simbro5-80.terminal.com 源代码在这里:github.com/simbro/Geograph
这里有一些sn-ps:
主视图(扩展 Ext.tab.Panel):
{
title: 'News',
layout: 'fit',
iconCls: 'news',
items: [
{
xtype: 'itemsListView'
}
]
},
{
title: 'Item Details',
layout: 'fit',
hidden: true,
items: [
{
xtype: 'itemDetailView'
}
]
},
详细视图:
Ext.define('Geograph.view.ItemDetailView', {
extend: 'Ext.Panel',
xtype: 'itemDetailView',
config: {
title: 'Details',
//layout: 'fit',
tpl: [
'<img src="{thumb}" alt="" />',
'<h2>{name}</h2>'
],
scrollable: {
direction: 'vertical'
},
styleHtmlContent: true,
data: null,
items: [{
docked: 'top',
xtype: 'titlebar',
title: 'Item Details',
items: [{
ui: 'back',
text: 'Back',
id: 'backBtn'
}]
}]
}
});
附:我正在使用 Sencha Touch 2.4.1
【问题讨论】:
-
只是一个想法:当用户单击列表项时,我正在为控制器中的面板设置数据。然后我需要刷新/重绘面板吗?
标签: html extjs mobile sencha-touch-2