diff --git a/components/History.vue b/components/History.vue index 1ad3acc..8636e1a 100644 --- a/components/History.vue +++ b/components/History.vue @@ -22,6 +22,25 @@ if (data != undefined) { // 取得済の場合のみ recordList.value = data +async function showDeleteDialog(id: number): Promise { + const userResponse: boolean = confirm("このデータを削除しますか"); + if (userResponse == true) { + console.log('delete: id=' + id); + const asyncDataBtn = await useAsyncData( + `record`, + (): Promise => { + const param = { 'id': id }; + const paramStr = "?id=" + param['id']; + const localurl = "/api/deleteRecord" + paramStr + const response = $fetch(localurl); + return response; + } + ); + location.reload() + } + +}; +