add shared-state-plugin

This commit is contained in:
j3d1 2024-06-23 01:04:32 +02:00
parent e91b64ca97
commit 67375bd281
7 changed files with 455 additions and 24 deletions

View file

@ -27,16 +27,19 @@ export default {
computed: {
...mapState(['lastUsed'])
},
created() {
this.item = {box: this.lastUsed.box || '', cid: this.lastUsed.cid || ''};
},
methods: {
...mapActions(['postItem']),
...mapActions(['postItem', 'loadBoxes', 'scheduleAfterInit']),
saveNewItem() {
this.postItem(this.item).then(() => {
this.$emit('close');
});
}
},
created() {
this.item = {box: this.lastUsed.box || '', cid: this.lastUsed.cid || ''};
},
mounted() {
this.scheduleAfterInit(() => [this.loadBoxes()]);
}
};
</script>