I have a challenge in creating a web-app with only 2 pages. The first page requires filling out forms across two stages, but I am unable to create separate pages for this purpose. Is there a way to display two forms on one page and remain on the second form even after the page is reloaded?
Here is my component Register.vue:
<form v-if="step === 1">
<!-- input fields for new user details -->
</form>
<form v-if="step === 1">
<!-- additional input fields for new user info -->
</form>
What I have attempted so far:
data() {
return {
step: 1
}
},
mounted() {
if (performance.navigation.type == 1) {
if (this.step === 1) {
this.step = 1;
}
if (this.step === 2) {
this.step = 2;
}
}
},
I have also tried implementing the same logic within the created hook.
Any assistance on how to achieve this would be greatly appreciated.