Component : setup function returned a promise, but no boundary was found in the parent component tree. A component with async setup() must be nested in a in order to be rendered.
vue3 中 setup 顶层 不能直接使用 await
要用一个方法封装一下
比如,你需要等待getFireInList执行完再执行getFireOutList
await getFireInList()
await getFireOutList()
这么写就报错了,页面直接空白,控制台会有黄色警告
正确写法
async function haha() {
await getFireInList()
await getFireOutList()
}