V-for traversal error in vue




misreported

Mar.18,2021

you need to define PicList in data . You put it in sizeForm . Should it be misplaced?


you have three problems.
1. When v-for traverses, you need a key value. If you use es-lint, it will be red
2. When you return data assignment is wrong, why save the outer this value? just write it as this.sizeForm.PicList=res.data.content. There is no need to assign
3 to this and write the standard. When you name it, the initials should be lowercase. The first letter after the word is capitalized


there is no definition of PicList in your data
change it to this v br for = "sizeForm.PicList"

Why should ps: PicList be capitalized?


if there is nothing wrong with putting it in sizeForm, write

< item in sizeForm.PicList "


_ that.piclist = _ that.piclist.concat (res.data.content) like this

.
Menu