Initial commit

This commit is contained in:
zhongjin
2020-06-15 10:58:47 +08:00
commit 4f1dfe7564
8590 changed files with 1516878 additions and 0 deletions
@@ -0,0 +1,26 @@
var CoreView = require('backbone/core-view');
var template = require('./tab-pane-label.tpl');
/**
* Label component
*/
module.exports = CoreView.extend({
className: 'Label',
initialize: function () {
if (!this.model) {
throw new Error('A model should be provided');
}
this.model.on('change:label', this.render, this);
},
render: function () {
this.$el.html(template({
label: this.model.get('label'),
selectedChild: this.model.get('selectedChild') || ''
}));
return this;
}
});