1. yarn add vue-resource
2. main.js引入vue-resource
1 | import VueResource from 'vue-resource' |
3.使用
1 | //引入vue-resource之后, 相当于在vue实例(this)身上新增了一些方法或对象(如:$http) |
1. yarn add vue-resource
2. main.js引入vue-resource
1 | import VueResource from 'vue-resource' |
3.使用
1 | //引入vue-resource之后, 相当于在vue实例(this)身上新增了一些方法或对象(如:$http) |