primevue-mirror/components/lib/stepper/StepperHeader.vue

42 lines
1.3 KiB
Vue
Raw Normal View History

2024-02-13 06:22:45 +00:00
<template>
2024-02-20 14:47:55 +00:00
<component
v-if="template"
:is="template"
:index="index"
:active="active"
:highlighted="highlighted"
:class="cx('stepper.action')"
:headerClass="cx('stepper.action')"
:numberClass="cx('stepper.number')"
:titleClass="cx('stepper.title')"
:clickCallback="(event) => clickCallback(event, index)"
/>
2024-02-13 06:22:45 +00:00
<button v-else :id="id" :class="cx('stepper.action')" role="tab" :tabindex="disabled ? -1 : undefined" :aria-controls="ariaControls" @click="clickCallback($event, index)" v-bind="getStepPT(stepperpanel, 'action', index)">
<span :class="cx('stepper.number')" v-bind="getStepPT(stepperpanel, 'number', index)">{{ index + 1 }}</span>
<span :class="cx('stepper.title')" v-bind="getStepPT(stepperpanel, 'title', index)">{{ getStepProp(stepperpanel, 'header') }}</span>
</button>
</template>
<script>
import BaseComponent from 'primevue/basecomponent';
export default {
name: 'StepperHeader',
hostName: 'Stepper',
extends: BaseComponent,
props: {
id: null,
template: null,
stepperpanel: null,
index: null,
disabled: null,
active: null,
highlighted: null,
ariaControls: null,
clickCallback: null,
getStepPT: null,
getStepProp: null
}
};
</script>