javascript - vue gets json data and assigns it to this.data. Why do some key-value pairs appear undefined?
phpcn_u1582
phpcn_u1582 2017-05-19 10:15:28
0
3
813


teamData is json obtained from the backend. When using it to make data driver, it always appears,,,,undefined,
Instead, assign those arrays as Empty, and the second-level str is also assigned an empty value, you will not encounter this situation.
How to understand this?

phpcn_u1582
phpcn_u1582

reply all(3)
Ty80

Because it is an Object, when you first load it to get the data, it will definitely be undefined. The official said that it is best to declare all properties in advance. Regardless of whether there is data or not, give him null,

淡淡烟草味
  • Make sure you can get json data instead of undefined

  • Where did you get the data? Post it and take a look

曾经蜡笔没有小新

JSON.parse(res)

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!