Эх сурвалжийг харах

perf(components): 优化 UseGuidance 组件离开引导页的逻辑

wangcong 2 сар өмнө
parent
commit
59048c5e74

+ 2 - 2
src/layout/UseGuidance.vue

@@ -61,7 +61,7 @@ const goNextStep = () => {
 
 const goPrevStep = () => {
   if (isFirstStep.value) {
-    router.replace('/first-usage');
+    goOutOfUseGuide();
     return;
   }
 
@@ -91,7 +91,7 @@ const finishCurrentStep = async () => {
     await stepRef.value?.finish?.();
 
     if (currentStep.value.isLastStep) {
-      router.replace('/first-usage');
+      goOutOfUseGuide();
     } else {
       goNextStep();
     }