关于confirm和axios的结合使用
以请求方式delete为例
请求地址**/doctor/doctorSchedulById** 参数为doctorId
handleDelete () {
this.$confirm('是否确认删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$axios.delete('/doctor/doctorSchedulById?doctorId=' + doctorId).then((response) => {
//在此书写点击确定按钮以后的操作
that.$modal.msgSuccess("删除成功");
},
)
}).catch(() => {
//在此书写点击取消按钮以后的操作
})
},