我有一个这样的标签面板
Ext.application({
name : 'Fiddle',
launch : function() {
Ext.create('Ext.TabPanel', {
items: [
{
title: 'First Tab',
id: 'firstTab'
xclass: 'viewClass'
},
{
title: 'Second Tab',
xclass: ''
}
]});}});
在 xclass 组件中有定义视图的类的路径。在视图中应该是一个按钮,点击它后,视图应该刷新并显示另一个类,例如视图应该由'viewClass2'定义,而不是由'viewClass'定义我正在成像按钮点击触发的功能像这样:
function(): {
Ext.getCmp('firstTab').xclass = 'viewClass2';
this.getView().refresh() // but it doesen't exist
}
我能做些什么来改变视图?