- 安装
npm i vue-resource -D - 引入
import VueResource from 'vue-resource'
Vue.use(VueResource) - 调用
this.$http.get('http://localhost:8088/mockjsdata/1/supplier.json')
.then(res => {
return res.json()
})
.then(data => {
console.log(data)
this.tableData3 = data.tableData3
})
三步搞定Vue-resource
猜你喜欢
转载自blog.csdn.net/zcq125521/article/details/88551086
今日推荐
周排行