dojo的api案例中也有类似的添加方法,但是在实际中需要稍作修改,其中html中代码如下: div dojoType="dijit.layout.ContentPane" style="width: 100%;height: 100%;" dojoAttachPoint="contenPaneDiv"div dojoAttachPoin
dojo的api案例中也有类似的添加方法,但是在实际中需要稍作修改,其中html中代码如下:
<div dojoType="dijit.layout.ContentPane" style="width: 100%;height: 100%;" dojoAttachPoint="contenPaneDiv">
<div dojoAttachPoint="accor" style="height: 100%;width :100%;" dojoType="dijit.layout.AccordionContainer" id="${id}_accordion">
</div>
</div>
js文件中需要添加引用:
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.layout.AccordionContainer");
添加方法如下:
//testTitle 模块的标题
var content = new dijit.layout.ContentPane({id:id, style:"padding:0px;height:100%;", title:"testTitle"});
content.startup();
this.accor.addChild(content);
this.accor.startup();
this.accor.resize();//如果不执行此方法,会出现显示异常的情况
