Fixed #3393 - TabMenu: index of menu item must be accessible in slot
parent
a287b092c1
commit
e8714865c0
|
@ -21,7 +21,7 @@
|
|||
<span class="p-menuitem-text">{{ label(item) }}</span>
|
||||
</a>
|
||||
</template>
|
||||
<component v-else :is="$slots.item" :item="item"></component>
|
||||
<component v-else :is="$slots.item" :item="item" :index="i"></component>
|
||||
</li>
|
||||
</router-link>
|
||||
<li v-else-if="visible(item)" ref="tab" :class="getItemClass(item, i)" role="presentation" @click="onItemClick($event, item, i)" @keydown="onKeydownItem($event, item, i)">
|
||||
|
@ -31,7 +31,7 @@
|
|||
<span class="p-menuitem-text">{{ label(item) }}</span>
|
||||
</a>
|
||||
</template>
|
||||
<component v-else :is="$slots.item" :item="item"></component>
|
||||
<component v-else :is="$slots.item" :item="item" :index="i"></component>
|
||||
</li>
|
||||
</template>
|
||||
<li ref="inkbar" class="p-tabmenu-ink-bar"></li>
|
||||
|
|
|
@ -159,7 +159,10 @@ export default {
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>item</td>
|
||||
<td>item: Menuitem instance</td>
|
||||
<td>
|
||||
item: Menuitem instance<br />
|
||||
index: Index of the menuitem instance
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Reference in New Issue