[Vuejs]-VueJS Nested Navigation 3rd Level

0👍

The problem will be the v-for="{ url, name, index, target } in item.children". With v-for, you can either use v-for="item in items" or v-for="(item, index) in items" syntax (talking about arrays). You actually are using the first one here and this means you are trying to destructure { url, name, index, target } properties from your items. This causes the index to be undefined as your items do not have such property on them, and because of that your list items no longer have unique :key property. Try instead this:

v-for="({ url, name, target }, index) in item.children"

For More Info: https://v2.vuejs.org/v2/guide/list.html

Leave a comment