【发布时间】:2022-07-21 14:06:08
【问题描述】:
我可以在没有确认消息的情况下删除数据,请帮我在 Axios 部分之间设置确认。与此一起添加的代码。
const navigate = useNavigate();
const Delete = async () => {
await axios({
method: 'DELETE',
url: `http://localhost:8000/update/${id}`,
headers: {
'Content-Type': 'multipart/form-data'
}
}).then(response => {
navigate('/')
})
}
【问题讨论】:
-
您指的是什么确认信息?究竟是什么问题?你想做什么?您可以添加更完整的代码示例吗? stackoverflow.com/help/minimal-reproducible-example
标签: reactjs