vuex commit does not commit to store

后端 未结 1 701
不思量自难忘°
不思量自难忘° 2021-01-20 12:54

I\'m having trouble getting my commit to work on a store.

I am calling the mutation via an action, which seems to work fine.

export const location =         


        
1条回答
  •  囚心锁ツ
    2021-01-20 13:42

    Ok, this was actually a very simple problem/oversight.

    I hadn't modelled anything in the DOM on the computed property I was watching, so it was never updated.

    So the solution is simply to use v-model="mapLocation" to ensure the watch fires.

    0 讨论(0)
提交回复
热议问题