0👍
it depends on the data structure of response.data
if it’s an array of objects that contains images
field as an array of images links, then your code should work.
if response.data
is a single object (which I presume) that contains images
array then TypeError: Cannot read property '0' of undefined
will be rised, in this case you don’t need a loop to show your 0 indexed images, just
<v-img v-if="packages.images" :src="packages.images[0]" ></v-img>
- [Vuejs]-Vue + Vuetify submitting form with GET method passes empty values
- [Vuejs]-How do i push a variable after using split function in javascript?
Source:stackexchange.com