How to use vue-resource ($http) and vue-router ($route) in a vuex store?

前端 未结 5 2105
时光说笑
时光说笑 2020-12-16 17:18

Before I was getting movie detail from the component\'s script. The function first check whether the movie ID of the store is same as of the route\'s param movie ID. If its

5条回答
  •  独厮守ぢ
    2020-12-16 18:13

    In your vuex store:

    import Vue from 'vue'
    
    Vue.http.post('url',{})
    

    Not like in normal vue components: this.$http.post(...)

提交回复
热议问题