作者:三人行 | 来源:互联网 | 2023-08-31 13:55
12345678 async created () { await setTimeout(()=>{ console.log(1) },5000); }, async mo
1 2 3 4 5 6 7 8
| async created () {
await setTimeout(()=>{
console.log(1)
},5000);
},
async mounted () {
console.log(2)
} |
在vue中给created使用async await,还是会先输出2,而不是等1输出完?