Axios request giving getter setter methods instead of data queried

走远了吗. 提交于 2019-11-28 14:13:25

Writing up my comments above as a sort of canonical answer to this as it keeps coming up...

What you're looking at is how Vue proxies your data to make it reactive. This is because you're using console.log() on a Vue instance data property.

When you assign values to a data property, it is transformed to an observable so Vue can treat it reactively. I suggest you forget about trying to console.log() anything assigned to this and use the Vue Devtools browser extension to inspect your components and their data if you're having trouble rendering the response.

Please note, there is nothing wrong here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!