confirmDelete(row) { let that = this; let data = { id: row }; that.$axios .post(api.destroymodule, data) .then(res => { if (res.data.success == true) { this.$message({ message: "刪除成功", type: "success", duration:500 }); } }) .catch(error => { console.log(error); this.$message({ message: '刪除失敗', type: 'error' }); }); }, async remover_handleClick(row) { let that = this; this.$confirm("此操作將永久刪除該模塊, 是否繼續?", "提示", { confirmButtonText: "確定", cancelButtonText: "取消", type: "warning" }) .then(async () => { let msgRet = await this.confirmDelete(row.id); }) .catch(() => { console.log("cancel"); }); },