define(function(require, exports, module) {
var Base = require('base');
var Pig = Base.extend({
attrs: {
name: ''
},
talk: function() {
alert('我是' + this.get('name'));
}
});
module.exports = Pig;
});
define(function(require, exports, module) {
var Base = require('base');
var Widget = Base.extend({
initialize: function(config) {
Widget.superclass.initialize.call(this, config);
this.parseElement()
this.initProps()
this.delegateEvents()
this.setup()
},
...
});
module.exports = Widget;
});
define(function(require) {
var Class = require('class');
var Events = require('events');
var Aspect = require('./aspect');
var Attribute = require('./attribute');
var Base = Class.create({
Implements: [Events, Aspect, Attribute],
initialize: function(config) {
...
},
...
});
...
});