Vue Getter & Setter instead of the actual values in backend response

前端 未结 2 1797
暖寄归人
暖寄归人 2021-01-14 21:22

I\'m new to Vue and I\'m struggling to understand why my problem is happening.

When I make a call to my backend to retrieve some data the response is as follows:

2条回答
  •  难免孤独
    2021-01-14 22:24

    https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function

    you can change data to be an object instead of a function, but not recommend. If Vue didn’t have this rule, clicking on one component would affect the data of all other instances.

提交回复
热议问题