如何将接口分配到usefetch对象vuejs 3和nuxtjs 3
如何将接口分配给usefetch对象vuejs 3
接口
export interface ProdutoInterface {
codigo: number
nome: string
}
组件,
const { data: produto, error } = await useFetch(config.API_BASE_URL+`/produto`)
我无法使其工作。任何人都知道如何帮助我。
非常感谢您的关注
How to assign an interface to a useFetch object Vuejs 3
Interface
export interface ProdutoInterface {
codigo: number
nome: string
}
Componente
const { data: produto, error } = await useFetch(config.API_BASE_URL+`/produto`)
I can't get it to work. Would anyone know how to help me.
thank you very much for your attention
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用fetch接受通用类型:
Use fetch accepts an generic type: