【问题标题】:Is It right way to create side collapsible panel navigation in extjs在 extjs 中创建侧面可折叠面板导航是否正确?
【发布时间】:2020-06-18 13:29:32
【问题描述】:
Ext.application({
    name: 'Fiddle',
    launch: function() {
            var mainView = new Ext.panel.Panel({
            xtype: 'panel',
            //title: 'Container',
            layout: 'border',
            itemId: 'bigContainer',
            height: '100vh',
            items: [{
                xtype: 'panel',
                //title: 'Left Panel',
                itemId: 'menuLeftPanel',
                region: 'west',
                scrollable: true,
                //width: 300,
                //height: 900,
                dockedItems:
                [{
                    xtype: 'tabpanel',
                    collapseMode: 'header',
                    //animCollapse: 200,
                    dock: 'left',
                    id: 'moduleTas',
                    itemId: 'moduleTabs',
                    width: 400,
                    collapsible: true,
                    headerPosition: 'left',
                    hideCollapseTool: true,
                    //activeTab: 0,
                    tabBarHeaderPosition: 0,
                    tabRotation: 0,
                    items: [{
                        xtype: 'panel',
                        scrollable: 'y',
                        tabConfig: {
                            xtype: 'tab',
                            iconCls: 'x-fa fa-home',
                            tooltip: "Home",
                            listeners:
                            {
                                click: function(btn, e, eOpts)
                                {
                                    var tab = Ext.getCmp('moduleTas');
                                    tab.toggleCollapse();
                                }
                            }
                        },
                    },
                    ]
                },
                ]
            }],
            renderTo: Ext.getBody()
        });
    }
});

【问题讨论】:

    标签: javascript extjs navigation panel


    【解决方案1】:

    当您下载框架时,Sencha 提供了一个“Admin Dashboard”示例应用程序,它实现了可折叠的侧边导航。以下布局的所有源代码(以及厨房水槽中的每个组件)都可以在框架下载中找到。

    Admin Dashboard

    Admin Dashboard Source Code

    这不是你应该重新创建自己的东西(破坏了使用像 Extjs 这样的框架的意义)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-04-07
      • 1970-01-01
      • 2015-11-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多