首页 > 代码库 > vue-resource

vue-resource

<script src="https://cdn.jsdelivr.net/vue.resource/1.3.1/vue-resource.min.js"></script>
methods:{
        doSomething: function(){
            this.currentView = ‘archive‘;
            this.$http.get(‘data/demo.json‘).then(function(res){
                console.log(res.body)
            })
        }
}

 

vue-resource