1、安装vue-resource到项目中,找到当前项目
输入:npm install vue-resource --save
2、安装完毕后,在main.js中导入,如下所示:
import VueResource from 'vue-resource'
Vue.use(VueResource)
这样就可以了

1、安装vue-resource到项目中,找到当前项目
输入:npm install vue-resource --save
2、安装完毕后,在main.js中导入,如下所示:
import VueResource from 'vue-resource'
Vue.use(VueResource)
这样就可以了
本文标题:vue引用vue-resource步骤
本文链接:https://www.haomeiwen.com/subject/ahlujftx.html
网友评论