0

我在现有应用程序中集成了幻灯片导航http://innofied.com/simplest-slide-navigation-with-sencha-touch-2-2/但我想在列表下方添加图像、几个按钮和文本.

这是我的导航视图的完整代码。

Ext.define('myapp.view.Navigation', {
    extend: 'Ext.List',
    alias: 'widget.navigation',
    xtype: 'navigation',
    requires : ['Ext.data.Store'],

    config: {
        cls : 'nav-list',
        onItemDisclosure : true,
        items: [{               
            xtype: 'list',
            store: {
                fields: ['title', 'event'],
                data : []
            },
            itemTpl: new Ext.XTemplate( '{title}' )
        }]
    },


    initialize: function() {

        userJson = localStorage.getItem('userJson');

        var user = Ext.JSON.decode(userJson);
        console.log(user);
        if(user.id != ''){
            var first = user.name.trim().split(" ")[0];
            console.log(first);
            this.callParent(arguments);
            this.down('list').getStore().add([{title: 'Home', event: 'loadDashboard' } ]); 
            this.down('list').getStore().add([{title: first, event: 'loadProfile' } ]);


        }


    },
});

有可能实现吗?

申请流程为:

成功登录后,用户被重定向到仪表板,我在左侧(在工具栏上)添加了一个列表图标按钮,它会滑动并显示导航视图。

4

1 回答 1

0

您可以使用不同的组件。它不必是 Ext.List,您可以在其中一个项目中使用带有列表的 hbox 面板。例如,我在 git 中将它分叉为嵌套列表而不是列表:https ://github.com/azche/slidenav 。

希望能帮助到你-

于 2013-10-01T12:39:10.770 回答