forked from FoundKeyGang/FoundKey
Fix bug
This commit is contained in:
parent
4096ddcbd0
commit
8aaab195c6
1 changed files with 6 additions and 7 deletions
|
@ -72,13 +72,13 @@ export default Vue.extend({
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
widgets(): any[] {
|
widgets(): any[] {
|
||||||
return this.$store.state.settings.mobileHome;
|
return this.$store.state.device.mobileHome;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
if (this.widgets.length == 0) {
|
if (this.widgets.length == 0) {
|
||||||
this.widgets = [{
|
this.$store.commit('device/setMobileHome', [{
|
||||||
name: 'calendar',
|
name: 'calendar',
|
||||||
id: 'a', data: {}
|
id: 'a', data: {}
|
||||||
}, {
|
}, {
|
||||||
|
@ -96,8 +96,7 @@ export default Vue.extend({
|
||||||
}, {
|
}, {
|
||||||
name: 'version',
|
name: 'version',
|
||||||
id: 'g', data: {}
|
id: 'g', data: {}
|
||||||
}];
|
}]);
|
||||||
this.saveHome();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -123,7 +122,7 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
addWidget() {
|
addWidget() {
|
||||||
this.$store.commit('settings/addMobileHomeWidget', {
|
this.$store.commit('device/addMobileHomeWidget', {
|
||||||
name: this.widgetAdderSelected,
|
name: this.widgetAdderSelected,
|
||||||
id: uuid(),
|
id: uuid(),
|
||||||
data: {}
|
data: {}
|
||||||
|
@ -131,11 +130,11 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
removeWidget(widget) {
|
removeWidget(widget) {
|
||||||
this.$store.commit('settings/removeMobileHomeWidget', widget);
|
this.$store.commit('device/removeMobileHomeWidget', widget);
|
||||||
},
|
},
|
||||||
|
|
||||||
saveHome() {
|
saveHome() {
|
||||||
this.$store.commit('settings/setMobileHome', this.widgets);
|
this.$store.commit('device/setMobileHome', this.widgets);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue