Sencha Touch 2:面板不会#39;在移动设备上滚动

时间:2015-02-22 07:29:21

标签: html5 extjs mobile sencha-touch-2

我有一个应用程序,它由一个带有多个页面的标签栏布局组成,其中一个页面是列表视图,另一个是"详细视图"这基本上是一个小组。

该小组不会在移动设备上滚动。它在桌面(Chrome / Safari)上运行良好,但不会在移动设备上滚动。我已在iOS上的Safari / Chrome和Android上的Chrome上测试过它。

该应用程序的演示在这里:simbro5-80.terminal.com 源代码在这里:github.com/simbro/Geograph

以下是一些片段:

主视图(扩展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'
            }]
        }]
    }
});

P.S。我正在使用Sencha Touch 2.4.1

1 个答案:

答案 0 :(得分:0)

尝试更改为

scrollable: true

只是看看明确设置这对你有什么影响