Fixed #4780 - TabMenu/Steps: active option for item templating
parent
da0b83ec08
commit
fad8a9a0ae
|
@ -180,6 +180,10 @@ export interface StepsSlots {
|
||||||
* Menuitem instance
|
* Menuitem instance
|
||||||
*/
|
*/
|
||||||
item: MenuItem;
|
item: MenuItem;
|
||||||
|
/**
|
||||||
|
* Current active state of the menuitem
|
||||||
|
*/
|
||||||
|
active: boolean;
|
||||||
/**
|
/**
|
||||||
* Label property of the menuitem
|
* Label property of the menuitem
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<span :class="cx('label')" v-bind="getPTOptions('label', item, index)">{{ label(item) }}</span>
|
<span :class="cx('label')" v-bind="getPTOptions('label', item, index)">{{ label(item) }}</span>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<component v-else :is="$slots.item" :item="item" :index="index" :label="label(item)" :props="getMenuItemProps(item, index)"></component>
|
<component v-else :is="$slots.item" :item="item" :index="index" :active="index === d_activeStep" :label="label(item)" :props="getMenuItemProps(item, index)"></component>
|
||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
|
@ -203,6 +203,14 @@ export interface TabMenuSlots {
|
||||||
* Menuitem instance
|
* Menuitem instance
|
||||||
*/
|
*/
|
||||||
item: MenuItem;
|
item: MenuItem;
|
||||||
|
/**
|
||||||
|
* Index of the menuitem
|
||||||
|
*/
|
||||||
|
index: number;
|
||||||
|
/**
|
||||||
|
* Current active state of the menuitem
|
||||||
|
*/
|
||||||
|
active: boolean;
|
||||||
/**
|
/**
|
||||||
* Label property of the menuitem
|
* Label property of the menuitem
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<span :class="cx('label')" v-bind="getPTOptions('label', item, i)">{{ label(item) }}</span>
|
<span :class="cx('label')" v-bind="getPTOptions('label', item, i)">{{ label(item) }}</span>
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</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>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
<li ref="inkbar" role="none" :class="cx('inkbar')" v-bind="ptm('inkbar')"></li>
|
<li ref="inkbar" role="none" :class="cx('inkbar')" v-bind="ptm('inkbar')"></li>
|
||||||
|
|
Loading…
Reference in New Issue