|
@@ -23,7 +23,7 @@ import { useRoute } from 'vue-router'
|
|
|
import StepOne from './StepOne.vue'
|
|
|
import StepTwo from './StepTwo.vue'
|
|
|
import StepThree from './StepThree.vue'
|
|
|
-import { state } from './store'
|
|
|
+import { state, resetState } from './store'
|
|
|
|
|
|
const step = ref(0)
|
|
|
const Component = computed(() => [StepOne, StepTwo, StepThree][step.value])
|
|
@@ -33,8 +33,7 @@ state.form.from = from
|
|
|
state.form.invitor = invitee
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
- state.form = {} as any
|
|
|
- state.modelList = []
|
|
|
+ resetState()
|
|
|
})
|
|
|
|
|
|
watch(step, () => window.scrollTo(0, 0))
|