У меня есть класс Base
, который наследуется от [_WidgetBase, _TemplatedMixin]
. Base
правильно работает. Теперь я наследовать в другом классе этот Base
, который не работаетКонструктор виджета Dijit выдает ошибку «вызывающий цепной конструктор»
define([
"dojo/_base/declare", "dojo/parser", ...
], function(declare, parser, ...){
return declare("mc.widgets.Base", [_WidgetBase, _TemplatedMixin], {
templateString:
'<div class="mc-note-base">'+
'</div>',
constructor: function(argv){
var self = this.inherited(arguments);
return self;
},
data: function(){
},
postCreate: function(){
...
}
})
});
Производный класс
define([
"dojo/_base/declare", "mc/base/path", "mc/widgets/Base"
], function(declare, path, Base){
return declare("mc.widgets.Derived", [Base], {});
})
Производный класс бросает
Error: declare mc.widgets.Derived: calling chained constructor with inherited