Vuex Mutation running, but component not updating until manual commit in vue dev tools

前端 未结 3 2024
天涯浪人
天涯浪人 2021-01-11 18:22

I have a vue component that I can\'t get to update from a computed property that is populated from a service call.

Feed.vue



        
3条回答
  •  隐瞒了意图╮
    2021-01-11 18:51

    Sometimes updating property that are not directly in the state is the problem

    {
       directprop: "noProblem",
       indirectParent: {
          "test": 5 // this one has a problem but works if we clone the whole object  indirectParent
       }
    }
    

    but it is a temporary solution, it should help you to force update the state and discover what is the real problem.

提交回复
热议问题