mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-11 01:42:34 +00:00
Fixed #959 - Add keys to template v-for
This commit is contained in:
parent
3bd70d34c1
commit
8041a244ab
10 changed files with 58 additions and 173 deletions
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<ul class="p-submenu-list" role="tree">
|
||||
<template v-for="(item, i) of model">
|
||||
<li role="none" :class="getItemClass(item)" :style="item.style" v-if="visible(item) && !item.separator" :key="item.label + i">
|
||||
<template v-for="(item, i) of model" :key="item.label + i">
|
||||
<li role="none" :class="getItemClass(item)" :style="item.style" v-if="visible(item) && !item.separator">
|
||||
<router-link v-if="item.to && !item.disabled" :to="item.to" custom v-slot="{navigate, href}">
|
||||
<a :href="href" :class="getLinkClass(item)" @click="onItemClick($event, item, navigate)" role="treeitem" :aria-expanded="isActive(item)">
|
||||
<span :class="['p-menuitem-icon', item.icon]"></span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue