vue: Wrong type check for prop

1.2k views Asked by At

My component has in data section:

photos: ['images/1.jpg','images/2.jpg']

In template (pug) :

 ...
 v-carousel
     v-carousel-item(v-for='(item,i) in photos',:key='i',
       :src='item')

It works ok but got 2 warnings:

[Vue warn]: Invalid prop: type check failed for prop "src". Expected String, got Number. found in --->

If

 :src='item' 

change to

 :src='item.toString()' 

there are no warnings.

Is it Vue or Vuetify or my error?

0

There are 0 answers