ExtJs3中的Extjs4 this.callParent

时间:2017-10-05 07:08:14

标签: extjs extjs4 extjs3

我是使用extjs的新手。 ExtJs3中this.callParent(args)的等价物是什么。它适用于extjs4但不适用于extjs 3.感谢您的帮助

1 个答案:

答案 0 :(得分:0)

在Ext JS 3x中,我们使用superclass属性来调用父类方法。例如,要调用Ext.Component的父类构造函数,请使用:

Ext.Component.superclass.constructor.call(this);

另一个例子:

要调用TabPanel父类的initComponent()方法,请编写:

Ext.TabPanel.superclass.initComponent.call(this);

希望这适合你。