This commit is contained in:
syuilo 2017-11-12 18:23:33 +09:00
parent 800d409949
commit ca26fc7363
11 changed files with 179 additions and 16 deletions

View file

@ -9,10 +9,13 @@ riot.mixin('widget', {
this.mixin('api');
this.id = this.opts.id;
this.place = this.opts.place;
Object.keys(this.data).forEach(prop => {
this.data[prop] = this.opts.data.hasOwnProperty(prop) ? this.opts.data[prop] : this.data[prop];
});
if (this.data) {
Object.keys(this.data).forEach(prop => {
this.data[prop] = this.opts.data.hasOwnProperty(prop) ? this.opts.data[prop] : this.data[prop];
});
}
},
save: function() {