Javascript ExtJS--在展开/折叠时调整面板高度
我有一个父面板,其中有两个面板嵌套在vbox布局中。顶部面板可垂直折叠。当它倒塌时,我希望下部面板调整其高度Javascript ExtJS--在展开/折叠时调整面板高度,javascript,html,extjs,Javascript,Html,Extjs,我有一个父面板,其中有两个面板嵌套在vbox布局中。顶部面板可垂直折叠。当它倒塌时,我希望下部面板调整其高度 //nested panel code { xtype:"panel", layout:"border", items:[ { region: 'west', xtype: 'panel', autoScroll:tru
//nested panel code
{
xtype:"panel",
layout:"border",
items:[
{
region: 'west',
xtype: 'panel',
autoScroll:true,
/*collapsible:true,
collapseDirection:"top",*/
style:{"background-color":"white"},
layout: {type: 'vbox', align: 'stretch'},
width: 400,
items: [
{
xtype: 'panel',
layout: "fit",
title: 'Members',
collapsible:true,
collapseDirection:"top",
items: [{xtype: 'app_chart_memberschart', height: 350}]
}, {
xtype: 'panel',
layout: 'fit',
title: 'Users',
height:"auto",//no effect
items: [{xtype: 'app_chart_userschart', height: 220}]//need this panel to adjust height once Members panel is collapsed
}
]
}
将flex属性添加到子面板 { xtype:panel, 布局:边框, 项目:[ { 地区:'西部', xtype:'面板', autoScroll:是的, /*可折叠的:是的, 折叠中间方向:顶部*/ 样式:{背景色:白色}, 布局:{type:'vbox',align:'stretch'}, 宽度:400, 项目:[ { xtype:'面板', 弹性:1, 布局:适合, 标题:“成员”, 可折叠的:是的, 折叠中间方向:顶部, 项目:[{xtype:'app_chart_memberschart',高度:350}] }, { xtype:'面板', 弹性:1, 布局:“适合”, 标题:“用户”, 高度:自动,//无效果 items:[{xtype:'app\u chart\u userschart',height:220}]//需要此面板在成员面板折叠后调整高度 } ] }