async created () {
const sn = await db.collection('forms').get()
sn.forEach(v => {
const { title, content } = v.data()
this.forms.push({
title, content, id: v.id
})
console.log(v.id)
})
},
del () {
const formIdToDelete = this.forms[0].id; // Assuming you want to delete the first form in the array
db.collection('forms').doc(formIdToDelete).delete()
}
}
I managed to retrieve the data and obtain an ID. However, I am unsure about what to specify within the doc() method when deleting.