我有一个叫做的小部件,stat.widget.Weekly
它是一个_Container
,但每当我使用时,我都会得到require
stat.widget.Daily
Daily
new Daily()
Uncaught TypeError: undefined is not a function
我的代码是这样的
require([
"dojo/_base/declare", "dojo/parser", ..., "stat/widget/Daily", "dijit/_Container"
], function(declare, ... , _WidgetBase, _TemplatedMixin, Daily, _Container){
declare("stat.widget.Weekly", [_WidgetBase, _TemplatedMixin, _Container], {
....
update: function(){
new Daily();//< Fires Error
},
postCreate: function(){
var self = this;
setTimeout(function(){
self.update();
}, 500);
}
});
});
但这stat/widget/Daily
可以在控制台中实例化new