我有一个要求,我在单击按钮时添加了面板。
在控制器功能中,我编写了如下代码。单击按钮时,我在控制台中没有收到错误,也没有收到面板。
但是,当我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
但没有任何帮助。