zoukankan      html  css  js  c++  java
  • Extjs4.2布局——layout: accordion(Ext.layout.container.Accordion)

    API这样介绍这种布局:

    示例:(来自API)注:打开默认展开第一个面板。

    Ext.create('Ext.panel.Panel', {
                    title: 'Accordion Layout',
                     300,
                    height: 300,
                    defaults: {
                        // applied to each contained panel
                        bodyStyle: 'padding:15px'
                    },
                    layout: {
                        // layout-specific configs go here
                        type: 'accordion',
                        titleCollapse: false,//'true' 表示允许通过点击标题栏的任意位置来展开/收缩子项Panel, 'false' 则表示仅允许通过点击工具按钮来进行展开/收缩.
                        animate: true,//表示对所含面板进行展开/收缩时, 面板的打开/关闭使用动画效果.
                        activeOnTop: true//'true'表示当每个面板展开时, 都将面板移动到容器的第一个. 'false' 则保持顺序不变.
                    },
                    items: [{
                        title: 'Panel 1',
                        html: 'Panel content!'
                    },{
                        title: 'Panel 2',
                        html: 'Panel content!'
                    },{
                        title: 'Panel 3',
                        html: 'Panel content!'
                    }],
                    renderTo: Ext.getBody()
                });

    效果:

  • 相关阅读:
    bzoj 1054
    bzoj 1047
    bzoj 2761
    bzoj 1191
    bzoj 2748
    bzoj_1003 物流运输
    新的开始( [USACO08OCT]打井Watering Hole)
    map
    Generic Cow Protests-G——60分做法
    逆序对
  • 原文地址:https://www.cnblogs.com/wql025/p/5027130.html
Copyright © 2011-2022 走看看