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>
|
<span class="p-menuitem-text">{{ label(item) }}</span>
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
<component v-else :is="$slots.item" :item="item"></component>
|
<component v-else :is="$slots.item" :item="item" :index="i"></component>
|
||||||
</li>
|
</li>
|
||||||
</router-link>
|
</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)">
|
<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>
|
<span class="p-menuitem-text">{{ label(item) }}</span>
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
<component v-else :is="$slots.item" :item="item"></component>
|
<component v-else :is="$slots.item" :item="item" :index="i"></component>
|
||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
<li ref="inkbar" class="p-tabmenu-ink-bar"></li>
|
<li ref="inkbar" class="p-tabmenu-ink-bar"></li>
|
||||||
|
|
|
@ -159,7 +159,10 @@ export default {
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>item</td>
|
<td>item</td>
|
||||||
<td>item: Menuitem instance</td>
|
<td>
|
||||||
|
item: Menuitem instance<br />
|
||||||
|
index: Index of the menuitem instance
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in New Issue