【发布时间】:2020-11-12 12:00:28
【问题描述】:
我正在调用父函数,但之后我的 axios 调用在父函数完成之前触发。有没有办法在这里使用 Promise 以便在我的 axios post 调用之前先解析父函数?
let data = {
name: "Charles"
age: 44
}
this.$parent.updateInfo(data);
axios.post('/admin/setup/change', {
status: "new",
comment: this.newNotes,
})
【问题讨论】: