Confirmation hapus/delete vue js
Caranya gampang
deleteData: function(id, id_loading) {
// delete data nya
if (confirm("Yakin anda ingin menghapus?")) {
$('#' + id_loading).show();
// this.id_edit = id;
let url = "{{ url('account/assets') }}" + '/' + id;
axios.delete(url)
.then(resp => {
// console.log(resp);
this.getData();
})
.catch(err => {
alert('error');
console.log(err);
})
.finally(() => {
$('#' + id_loading).hide();
})
}
},
Belum ada Komentar untuk "Confirmation hapus/delete vue js"
Posting Komentar