- Operating System: Darwin
- Node Version: v18.16.0
- Nuxt Version: 3.5.3
- Nitro Version: 2.4.1
- Package Manager: yarn@1.22.19
- Builder: vite
- User Config: app, components, runtimeConfig, modules, pinia, vite, css, alias, experimental
- Runtime Modules: @pinia/nuxt@0.4.11, nuxt-icon@0.4.2
- Build Modules: -
onMounted(async () => {
if (process.client) {
const { data } = await useFetch('http://192.168.0.134:9900/api/order/quotationbar/queryQuotationBarNumber', {
method: 'post',
headers: {
Authorization: 'bearer b70d7091-aa41-4857-9eec-1b1ef336043f',
},
server: false,
lazy: true,
})
console.log(data)
}
})
data为null
Describe the bug客户端渲染获取到data为null
Additional context做了以下尝试
onMounted请求 判断process.client 修改useFetch配置为server为false lazy为true
都获取不到数据
在浏览器的network是可以看到请求成功的~
LogsNo response