There are two Array in the script above.When click the button,data switch between Arrays.But second 's background-color is always grey.
I have try adding v-for :key='image.url', then it works, when adding :key='image.label' ,if fail.
Although have read the doc,there still are a lot of unclear place in list render of Vuejs.
spcially with v-if and v-else
code address: https://jsfiddle.net/pvmzcchn/1
There are two Array in the script above.When click the button,data switch between Arrays.But second 's background-color is always grey. I have try adding v-for :key='image.url', then it works, when adding :key='image.label' ,if fail. Although have read the doc,there still are a lot of unclear place in list render of Vuejs. spcially with v-if and v-else
Plese someone can explain?why