ExtJS版本6.2
我不允许在扩展文本字段中,在构造函数中调用initConfig()。抛出的错误是,
initConfig should not be called by subclasses, it will be called by Ext.Component(…)
。
出于某种原因,我不能在那里使用callParent()。 它在ExtJS 5.0中可用。对此有何选择?
答案 0 :(得分:0)
使用 Ext.apply(this,cfg)代替 initConfig()。它将解决您的问题。
示例旧代码:
constructor: function(cfg){
this.initConfig(cfg);
},
示例正确的代码:
constructor: function(cfg){
//this.initConfig(cfg);
Ext.apply(this, cfg);
},