Discussion
Discussion copied to clipboard
Why does Dom not syn with data when render with v-for
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