【发布时间】:2011-07-20 14:41:20
【问题描述】:
我是 ExtJs 的新手,我正在尝试创建一个可折叠面板并希望将其插入到 Dom 中。我这样做如下:
this.foo_holder = Ext.DomHelper.append(document.body, [{id : 'testdiv'}]);
var fooPanel = {
xtype : 'panel',
height : 100,
title : 'fooPanel',
titleCollapse : true,
collapsed : true,
collapsible : true,
html : 'Blah Blah'
};
Ext.DomHelper.append(this.foo_holder, fooPanel);
但是,它只是在插入面板时显示 html。我没有看到任何标题栏或标题或任何可折叠的功能。 当我在渲染 dom 之前创建相同的面板时,它会正确显示。但我需要稍后添加/删除面板。
谁能帮忙?
此外,有关如何动态删除组件的任何输入都将非常有用!
【问题讨论】: