inflearn logo
Khóa học

Khóa học

Chia sẻ kiến thức

Bài viết của seungbeomi0314

seungbeomi0314 seungbeomi0314

@seungbeomi0314

Số lượng đánh giá đã viết
2
Xếp hạng trung bình
5.0

Bài viết 1

Hỏi & Đáp

server, client 에서 동일서버호출 api 사용방법 문의

지금까지는 아래의 방법이 제일 만족스럽네요. https://www.telerik.com/blogs/api-factories-vue-nuxt // src/api.js import Vue from "vue" ; import Auth from "@/api/auth" ; import Blog from "@/api/blog" ; import Settings from "@/api/settings" ; // Initialize all or API factories const factories = { auth : Auth ( Vue . axios ) , blog : Blog ( Vue . axios ) , settings : Settings ( Vue . axios ) } ; // Make them available in the app with this.$api // https://vuejs.org/v2/cookbook/adding-instance-properties.html Vue . $api = factories ;

Lượt thích
1
Số bình luận
1
Lượt xem
327