Calculate step when there is no start badge
This commit is contained in:
parent
02d637f971
commit
726d5dc9bd
|
|
@ -50,6 +50,13 @@ const endBadgeClasses = computed(() => {
|
|||
}
|
||||
return "border";
|
||||
});
|
||||
|
||||
function calcStepIndex(step: number) {
|
||||
if (props.startBadgeText) {
|
||||
return step + 1;
|
||||
}
|
||||
return step;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -75,7 +82,7 @@ const endBadgeClasses = computed(() => {
|
|||
>
|
||||
<router-link
|
||||
v-if="props.baseUrl"
|
||||
:to="`${props.baseUrl}?${props.queryParam}=${step + 1}`"
|
||||
:to="`${props.baseUrl}?${props.queryParam}=${calcStepIndex(step)}`"
|
||||
>
|
||||
{{ step + 1 }}
|
||||
</router-link>
|
||||
|
|
|
|||
Loading…
Reference in New Issue