https://zishu.me/blog/151.html/ #31
Replies: 1 comment
-
qwe([email protected]) hello 1900([email protected]) 之前也写了个demo,后端用的express,的确挺方便的。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://zishu.me/blog/151.html/
示例如下。 <template> <div class="posts"> <div v-for="item in list" :key="item.cid" > {{ item.title }} </div> </div> </template> <script> import Axios from 'axios'; export default { name: 'index', data () { return { list: [] } }, methods: { getData () { var api = 'https://zburu.com/api/posts.php'; Axios.get(api).then((response) => { this.list = response.data; console.log(response.data) }).catch((error) => { console.log(error); })
https://zishu.me/blog/151.html/
Beta Was this translation helpful? Give feedback.
All reactions