|
|
@@ -13,14 +13,23 @@ module.exports = {
|
|
|
props: ['options'],
|
|
|
template: cache.get('./item.html'),
|
|
|
data: function () {
|
|
|
- // make options reactive
|
|
|
return {
|
|
|
- reactiveOptions: this.options,
|
|
|
+ data: {},
|
|
|
};
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ options: 'update',
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ update: function () {
|
|
|
+ this.data = this.options;
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
+ init: wrapHandler('init'),
|
|
|
onClick: wrapHandler('onClick'),
|
|
|
detailClick: wrapHandler('detailClick'),
|
|
|
},
|
|
|
- mounted: wrapHandler('init'),
|
|
|
+ mounted: function () {
|
|
|
+ this.update();
|
|
|
+ },
|
|
|
};
|