【发布时间】:2015-05-06 16:40:38
【问题描述】:
这两种覆盖有什么区别
所以选项1:
Ext.window.Window.override({
initComponent: function () {
this.draggable = false;
this.resizable = false;
this.on('resize', function () {
this.center();
});
this.callParent();
}
});
选项 2:
Ext.define('Ext.window.WindowOverride', {
override: 'Ext.window.Window',
initComponent: function () {
this.draggable = false;
this.resizable = false;
this.on('resize', function () {
this.center();
});
this.callParent();
}
});
我应该采用哪种方法以及为什么?
具体使用Extjs 4.1.1
【问题讨论】:
-
在我看来,这不应再被标记为重复
-
这不是重复的,顶部引用的答案并未提供最佳实践建议。
标签: javascript extjs extjs4