|
@@ -2,6 +2,7 @@
|
|
import { computed, ref, useTemplateRef } from 'vue';
|
|
import { computed, ref, useTemplateRef } from 'vue';
|
|
import { useRouter } from 'vue-router';
|
|
import { useRouter } from 'vue-router';
|
|
|
|
|
|
|
|
+import ConfirmModal from '@/components/ConfirmModal.vue';
|
|
import SvgIcon from '@/components/SvgIcon.vue';
|
|
import SvgIcon from '@/components/SvgIcon.vue';
|
|
import { t } from '@/i18n';
|
|
import { t } from '@/i18n';
|
|
import { addUnit } from '@/utils';
|
|
import { addUnit } from '@/utils';
|
|
@@ -67,6 +68,16 @@ const goPrevStep = () => {
|
|
current.value--;
|
|
current.value--;
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+const goOutOfUseGuide = () => {
|
|
|
|
+ router.replace('/first-usage');
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const confirmModalRef = useTemplateRef('confirmModal');
|
|
|
|
+
|
|
|
|
+const skipCurrentStep = () => {
|
|
|
|
+ confirmModalRef.value?.showView();
|
|
|
|
+};
|
|
|
|
+
|
|
const formRef = ref<FormInstance>();
|
|
const formRef = ref<FormInstance>();
|
|
const stepRef = useTemplateRef<UseGuideStepItemInstance>('stepItem');
|
|
const stepRef = useTemplateRef<UseGuideStepItemInstance>('stepItem');
|
|
|
|
|
|
@@ -131,7 +142,7 @@ const finishCurrentStep = async () => {
|
|
<ALayoutFooter class="use-guide-footer">
|
|
<ALayoutFooter class="use-guide-footer">
|
|
<div class="use-guide-step-button-container">
|
|
<div class="use-guide-step-button-container">
|
|
<div>
|
|
<div>
|
|
- <AButton type="text" :disabled="currentStep.isLastStep" @click="goNextStep">
|
|
|
|
|
|
+ <AButton type="text" :disabled="currentStep.isLastStep" @click="skipCurrentStep">
|
|
{{ $t('common.skip') }}
|
|
{{ $t('common.skip') }}
|
|
</AButton>
|
|
</AButton>
|
|
<AButton type="text" @click="goPrevStep">{{ $t('common.return') }}</AButton>
|
|
<AButton type="text" @click="goPrevStep">{{ $t('common.return') }}</AButton>
|
|
@@ -151,6 +162,14 @@ const finishCurrentStep = async () => {
|
|
{{ currentStep.nextStepButtonText || t('common.nextStep') }}
|
|
{{ currentStep.nextStepButtonText || t('common.nextStep') }}
|
|
</AButton>
|
|
</AButton>
|
|
</div>
|
|
</div>
|
|
|
|
+ <ConfirmModal
|
|
|
|
+ ref="confirmModal"
|
|
|
|
+ :title="$t('common.skipConfirm')"
|
|
|
|
+ :description-text="$t('common.skipStepConfirm', { name: currentStep.title })"
|
|
|
|
+ :icon="{ name: 'exclamation' }"
|
|
|
|
+ icon-bg-color="#F56C6C"
|
|
|
|
+ @confirm="goOutOfUseGuide"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</ALayoutFooter>
|
|
</ALayoutFooter>
|
|
</ALayout>
|
|
</ALayout>
|