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

42 lines
1.4 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.itemHeader')"
:headerClass="cx('stepper.itemHeader')"
:numberClass="cx('stepper.itemNumber')"
:titleClass="cx('stepper.itemTitle')"
2024-02-20 14:47:55 +00:00
:clickCallback="(event) => clickCallback(event, index)"
/>
<button v-else :id="id" :class="cx('stepper.itemHeader')" role="tab" :tabindex="disabled ? -1 : undefined" :aria-controls="ariaControls" @click="clickCallback($event, index)" v-bind="getStepPT(stepperpanel, 'itemHeader', index)">
<span :class="cx('stepper.itemNumber')" v-bind="getStepPT(stepperpanel, 'itemNumber', index)">{{ index + 1 }}</span>
2024-05-08 09:57:59 +00:00
<span :class="cx('stepper.itemTitle')" v-bind="getStepPT(stepperpanel, 'itemTitle', index)">{{ getStepProp(stepperpanel, 'header') }}</span>
2024-02-13 06:22:45 +00:00
</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>