mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 09:22:34 +00:00
Fixed #4780 - TabMenu/Steps: active option for item templating
This commit is contained in:
parent
da0b83ec08
commit
fad8a9a0ae
4 changed files with 14 additions and 2 deletions
8
components/lib/tabmenu/TabMenu.d.ts
vendored
8
components/lib/tabmenu/TabMenu.d.ts
vendored
|
@ -203,6 +203,14 @@ export interface TabMenuSlots {
|
|||
* Menuitem instance
|
||||
*/
|
||||
item: MenuItem;
|
||||
/**
|
||||
* Index of the menuitem
|
||||
*/
|
||||
index: number;
|
||||
/**
|
||||
* Current active state of the menuitem
|
||||
*/
|
||||
active: boolean;
|
||||
/**
|
||||
* Label property of the menuitem
|
||||
*/
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<span :class="cx('label')" v-bind="getPTOptions('label', item, i)">{{ label(item) }}</span>
|
||||
</a>
|
||||
</template>
|
||||
<component v-else :is="$slots.item" :item="item" :index="i" :label="label(item)" :props="getMenuItemProps(item, i)"></component>
|
||||
<component v-else :is="$slots.item" :item="item" :index="i" :active="i === d_activeIndex" :label="label(item)" :props="getMenuItemProps(item, i)"></component>
|
||||
</li>
|
||||
</template>
|
||||
<li ref="inkbar" role="none" :class="cx('inkbar')" v-bind="ptm('inkbar')"></li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue