提取Promise对象中的数据:

axios.get('/url', { params: { id: 1} }).then(res => {
    // res就是提取的是Promise对象中的值
    console.log(res)
})

 

Logo

前往低代码交流专区

更多推荐