layoutConfig: Object



这是一个包含指定布局详细属性的对象 (与​​layout​​ 配置值结合使用)。 对于...


这是一个包含指定布局详细属性的对象 (与​​layout​​ 配置值结合使用)。对于每个合法的布局类型的完整细节,请看指定布局类型相应的类:



Class Ext.layout.Accordion

包:

Ext.layout

所在文件:

AccordionLayout.js

Class:

Accordion

继承自:

​FitLayout​




这是一种可以包含多个panel的,可折叠式的布局,在任意时刻只能打开一个panel。每个panel都有内置的展开/折叠功能。该类是被设计用来继承的,或者通过layout:'accordion'​ ​Ext.Container.layout​​ 配置项来创建,一般情况下不需要通过new关键字直接创建。

注意:当通过配置项创建一个布局时,布局特有的属性必须通过​​Ext.Container.layoutConfig​​ 配置项传递进来,然后它将在内部被应用到布局中。示例用法:

var accordion = new Ext.Panel({
title: 'Accordion Layout',
layout:'accordion',
defaults: {
//应用到每个包含的panel
bodyStyle: 'padding:15px'
},
layoutConfig: {
// layout-specific configs go here
titleCollapse: false,
animate: true,
activeOnTop: true
},
items: [{
title: 'Panel 1',
html: '<p>Panel content!</p>'
},{
title: 'Panel 2',
html: '<p>Panel content!</p>'
},{
title: 'Panel 3',
html: '<p>Panel content!</p>'
}]
});