vuevue 模拟对服务器请求 1、安装 vue-resource插件,将http请求注入vue中 cnpm install vue-resource 2、安装完成后,在组件需要请求服务器的位置,一般是在组件创建成功后进行请求,即(通过$http进行请求): export default{ created:function(){//组件创建成功后请求 this.$htt……继续阅读 » 8年前 (2017-12-03) 1821浏览 0评论 0个赞