close modals when saving

This commit is contained in:
busti 2019-12-27 02:38:58 +01:00
parent d3a52aae06
commit 7131a54455
3 changed files with 6 additions and 5 deletions

View file

@ -17,7 +17,7 @@ import Modal from '@/components/Modal';
import EditItem from '@/components/EditItem';
export default {
name: 'AddItem',
name: 'AddItemModal',
components: { Modal, EditItem },
props: ['isModal'],
data: () => ({
@ -26,6 +26,7 @@ export default {
methods: {
saveNewItem() {
this.$store.dispatch('postItem', this.item);
this.$emit('close');
}
}
};