2019-08-14 09:48:44 +00:00
|
|
|
<template>
|
2019-09-02 14:56:28 +00:00
|
|
|
<transition-group
|
|
|
|
name="wizard-items"
|
|
|
|
tag="div"
|
2022-08-18 11:41:19 +00:00
|
|
|
class="wizard-box"
|
2019-09-02 14:56:28 +00:00
|
|
|
:class="classObject"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
v-for="item in items"
|
2019-09-02 15:49:25 +00:00
|
|
|
:key="item.route"
|
2019-09-02 14:56:28 +00:00
|
|
|
class="item"
|
|
|
|
:class="{ active: isActive(item), over: isOver(item) }"
|
|
|
|
>
|
2022-08-18 11:41:19 +00:00
|
|
|
<div class="flex-align-center">
|
|
|
|
<h3 class="text-truncate">
|
|
|
|
{{ item.title }}
|
|
|
|
</h3>
|
2019-09-02 14:56:28 +00:00
|
|
|
<span v-if="isOver(item)" class="completed">
|
2021-12-01 05:03:18 +00:00
|
|
|
<fluent-icon icon="checkmark" />
|
2019-08-14 09:48:44 +00:00
|
|
|
</span>
|
2022-08-18 11:41:19 +00:00
|
|
|
</div>
|
2019-09-02 14:56:28 +00:00
|
|
|
<span class="step">
|
|
|
|
{{ items.indexOf(item) + 1 }}
|
|
|
|
</span>
|
|
|
|
<p>{{ item.body }}</p>
|
|
|
|
</div>
|
|
|
|
</transition-group>
|
2019-08-14 09:48:44 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
/* eslint no-console: 0 */
|
2020-05-11 20:01:40 +00:00
|
|
|
import globalConfigMixin from 'shared/mixins/globalConfigMixin';
|
|
|
|
|
2019-08-14 09:48:44 +00:00
|
|
|
export default {
|
2020-05-11 20:01:40 +00:00
|
|
|
mixins: [globalConfigMixin],
|
2019-08-14 09:48:44 +00:00
|
|
|
props: {
|
|
|
|
isFullwidth: Boolean,
|
2020-05-11 20:01:40 +00:00
|
|
|
items: {
|
|
|
|
type: Array,
|
|
|
|
default: () => [],
|
|
|
|
},
|
2019-08-14 09:48:44 +00:00
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
classObject() {
|
|
|
|
return 'full-width';
|
|
|
|
},
|
|
|
|
activeIndex() {
|
|
|
|
return this.items.findIndex(i => i.route === this.$route.name);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
isActive(item) {
|
|
|
|
return this.items.indexOf(item) === this.activeIndex;
|
|
|
|
},
|
|
|
|
isOver(item) {
|
|
|
|
return this.items.indexOf(item) < this.activeIndex;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|