Modal.confirm({标签:实战,绑定,setBedCode,裁床,弹框,message,data,response,220 From: https://blog.51cto.com/u_15460007/6050157
title: '系统提示',
content: '是否绑定当前裁床?',
async onOk() {
const response = await getCutBed({ cutBedCode: e.target.value })
if (response.code == 200) {
console.log(response.data, "response")
localStorage.setItem("BindId", JSON.stringify(response.data.id || ""))
setBedCode("");
message.success('裁床绑定成功');
props.onConfirm()
} else {
setBedCode("");
// message.error('当前裁床不存在');
message.warning(response.message);
}
},
onCancel() { },
});