update: add delete confirmation
This commit is contained in:
@@ -10,6 +10,7 @@ const emit = defineEmits(['delete-message']);
|
|||||||
const userId = authStore.id;
|
const userId = authStore.id;
|
||||||
|
|
||||||
const onDelete = () => {
|
const onDelete = () => {
|
||||||
|
if (!confirm('確定要刪除這則留言嗎?')) return;
|
||||||
emit('delete-message', props.message.id);
|
emit('delete-message', props.message.id);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user