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

View File

@@ -0,0 +1,25 @@
const Backbone = require('backbone');
module.exports = Backbone.Model.extend({
defaults: {
msg: '',
type: 'error',
display: false
},
shouldDisplay: function () {
return this.get('display') && !!this.get('msg') && !!this.get('type');
},
show: function (message, type) {
return this.set({
display: true,
msg: message,
type: type
});
},
hide: function () {
this.set('display', false);
}
});