objective-c - Use axios to modify data through vuex mutation getter failed for the first time and succeeded for the second time
伊谢尔伦
伊谢尔伦 2017-06-28 09:27:29
0
2
1133

The first getter is undefined
But after the data is changed, the getter data becomes available
Shouldn’t the getter data be changed accordingly
What is the reason for this

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all (2)
过去多啦不再A梦

@tony_gong

The data also exists here

    给我你的怀抱

    The first time getSongList in your state is {}, so when you print it, it must be {__ob__:Observer}, because computed is related to dependencies. If dependencies change, the data in computed will change, so you will mutate later The data is requested and getSongList has a value, so the printing is different. You can try changing getSongList to null and you will know

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!