add shared-state-plugin
This commit is contained in:
parent
e91b64ca97
commit
67375bd281
7 changed files with 455 additions and 24 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue