Delete notes from table view
This commit is contained in:
parent
f1eed842d2
commit
eaccc85c80
@ -70,14 +70,19 @@ export default {
|
|||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$axios.get('/notes').then((e) => {
|
this.loadNotes()
|
||||||
this.notes = e.data
|
|
||||||
this.loading = false
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async loadNotes() {
|
||||||
|
await this.$axios.get('/notes').then((e) => {
|
||||||
|
this.notes = e.data
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
editItem(item) {},
|
editItem(item) {},
|
||||||
deleteItem(item) {},
|
async deleteItem(item) {
|
||||||
|
await this.$axios.delete(`/notes/${item.uuid}`).then(this.loadNotes)
|
||||||
|
},
|
||||||
format,
|
format,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user