我有一个要求,我要在单击按钮时添加面板。
在控制器功能中,我编写了如下代码。单击按钮时,我没有在控制台中收到错误,也没有得到面板。
但是,当我console.log
面板对象时,可以看到该面板已创建,但不确定为什么未在视图中反映出来。建议。
onAddObjectiveclick: function () {
var panel = new Panel({
headerText: "Description",visible: true,backgroundDesign: "Solid",content: new TextArea({
value: "Lorem Ipsum is simply dummy text of the printing and typesetting industry",growing: true,width: "100%",height: "263px"
})
});
}
this.getView().addDependent(panel);
//在这个地方,我也尝试过setExapanded
和setExpandible
函数,但没有帮助。