会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
潇潇六月雨
博客园
首页
订阅
管理
使用vue-resource请求数据的步骤
1、需要安装 vue-resource模块 注意加上--save
npm install vue-resource --save
2、main.js 引入vue-resource
import VueResource from 'vue-resource';
3、Vue.use(VueResource);
4、在组件里面直接使用
this.$http.get('url').then(function(res){},function(){err})
posted on
2019-06-22 23:24
潇潇六月雨
阅读(
159
) 评论(
0
)
收藏
举报
刷新页面
返回顶部