【问题标题】:ExtJS 4.1. which are best components for create sidebar menu (as have Worpdress in left panel)ExtJS 4.1。哪些是创建侧边栏菜单的最佳组件(如左侧面板中的 Wordpress)
【发布时间】:2016-04-20 17:07:30
【问题描述】:

我是 Extjs 的新手,使用 4.1 版。我想知道哪个组件最适合在 Ext.Viewport 中使用,具有左侧面板侧边栏(如在 Wordpress 管理中,如 Wordpress Post/Page/Media/Categories/Settings 菜单等)。我想成为垂直菜单,一个在另一个之下。

我找到了带有 Ext.tree、Ext.menu 或侧边栏垂直选项卡的示例,但我真的不知道 Ext.Viewport(不是 MVC 应用程序)是否是在“项目”属性中使用组件的一种最佳方法。

Ext.create('Ext.Viewport', {
    layout: 'border',
    items: [{
        xtype: 'box',
        region: 'north'
        ....
    },{
        layout: 'border',
        id: 'sidebar',
        region:'west',
        items: HERE WANT SIDEBAR COMPONENT
        ....
    }, 
    {
        id: 'vbox-panel',
        region: 'center',
        defaultType: 'container',
        layout: {
            type: 'vbox'
        },
        defaults: {
            frame: true
        },
        items: [
            {
                height: 40,
                html: 'Top content'
                ....
            }, {
                id: 'content',
                layout: 'card',
                items: [content],
                flex: 2
                ....
            }, {
                flex: 2,
                html: 'Bottom comtent'
                ....
            }
        ]
    }],
    renderTo: Ext.getBody()
});

谢谢

更新: - 用一个简单的解决方案写一条评论,适合我这样的初学者:)

【问题讨论】:

  • 我找到了一个解决方案,适合初学者:) .... 上面的“HERE WANT SIDEBAR COMPONENT”可以替换为对象数组,类型为 vbox,每个对象都具有 html 属性,例如:[ { html : "应用程序", 高度: 30, 边框: false }, { html : "模块", 高度: 30 ,边框:假}]

标签: javascript extjs components sidebar


【解决方案1】:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-22
    • 1970-01-01
    • 2010-10-09
    • 2016-05-21
    相关资源
    最近更新 更多