zoukankan      html  css  js  c++  java
  • EXT学习笔记之一 accordion布局

    accordion布局,先上图,后贴代码

    image

    其实就是类似于QQ那样的可折叠的菜单效果

    代码如下

    Ext.onReady(function() {
        /*------------------------------------------
            west,Panel
        ------------------------------------------*/
        var west = new Ext.Panel({
            title:'菜单分类 - all menus',
            region: 'west',
            margins: '5 0 5 5',
            //collapsible:true,
            border:true,
            split: true,
             300,
            layout: 'accordion',
            items: [
                new Ext.Panel({
                    title: '机票政策管理 - policy',
                }),
                new Ext.Panel({
                    title: '机票订单管理 - orders',
                }),
                new Ext.Panel({
                    title: '会员积分管理 - scores',
                }),
                new Ext.Panel({
                    title: '系统菜单管理 - menus',
                }),
                new Ext.Panel({
                    title: '内部雇员管理 - employee',
                }),
                new Ext.Panel({
                    title: '其它信息 - other information',
                })]
        });
    
        /*------------------------------------------
            north,Viewport
        ------------------------------------------*/
        var north = new Ext.Viewport({
            xtype: 'box',
            region: 'north',
            applyTo: 'header',
            height: 30
        });
    
        /*------------------------------------------
            center,Panel
        ------------------------------------------*/
        var center = new Ext.Panel({
            id: 'content-panel',
            region: 'center', // this is what makes this panel into a region within the containing layout
            layout: 'card',
            margins: '5 0 5 0',
            activeItem: 0,
            border: false,
            items: [
                new Ext.Panel({
                    id: 'start-panel',
                    layout: 'fit',
                    bodyStyle: 'padding:25px',
                    contentEl: 'start-div'
                })
            ]
        });
    
    
        /*------------------------------------------
            viewport,Viewport
        ------------------------------------------*/
        new Ext.Viewport({
            layout: 'border',
            title: 'korn',
            items: [north, west, center],
            renderTo: Ext.getBody()
        });
    });

    官方文档

  • 相关阅读:
    Moebius实现Sqlserver集群~介绍篇
    知方可补不足~SQL数据库用户的克隆,SQL集群的用户同步问题
    从零开始学C++之动态创建对象
    [置顶] 某大型银行深化系统技术方案之二十五:性能设计之主要数量指标
    POJ 1300 Door Man
    解决SQL查询总是超时已过期
    hdu 1728 逃离迷宫(BFS)
    Nginx 负载均衡-加权轮询策略剖析
    ios 6 横竖屏转换
    firefox同步数据时无响应问题
  • 原文地址:https://www.cnblogs.com/kkun/p/1537026.html
Copyright © 2011-2022 走看看