methedA: function(row) {
...
...
...
let _this -= this
this.findUser(row).then(function(result) {
_this.ouVal = result
})
...
...
...
}
async findUser(row) {
let list = []
await this.$axios
.post('/api/user/findUser', params)
.then(rsp => {
list = [...rsp.data.list]
})
.catch(error => {
})
return list
}
vue中anync与await使用,方法同步按顺序执行
最新推荐文章于 2024-05-20 17:02:17 发布