前后端的数据传递的几种方式,其中由于是有公司开放的框架所以你们有的方法不一定适用。
第一种
deleteHandle(id) {
var ids = id ? [id] :
this.dataListSelections.map(item => {
return item.id;
});
this.$confirm(`确定${id ? "删除" : "批量删除"}?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.$axios.post("/pc/modeldefecrectificationnotice/delete", ids)
.then(data => {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
}
});
});
}).catch(() => {});
},
这是相比较来说的比较麻烦的一个实现删除功能,在真正的开发过程中其实很多的东西都是逻辑删除&#x