安装使用vue-reasource插件

来源:互联网 发布:有哪些数据库管理系统 编辑:程序博客网 时间:2024/05/29 03:17

先在当前项目文件夹下命令行安装插件

npm install vue-reasource 

在项目里直接引用即可


示例:

{  // GET /someUrl  this.$http.get('/someUrl').then(response => {    // get body data    this.someData = response.body;  }, response => {    // error callback  });}

参考官方文章:

https://github.com/pagekit/vue-resource/tree/master