import { Dialog } from "vant";
components: {
[Dialog.name]: Dialog
},
data() {
return {
honorList: []
};
},
delete(index) {
const id = this.honorList[index].id;
Dialog.confirm({
title: "提示",
message: "是否确定删除该荣誉?"
})
.then(async () => {
const res = await delete({ id }); //调用删除接口
if (res.code == "success") {
this.honorList.splice(index, 1);
}
})
.catch(() => {});
}