Within the GridRow.vue file, I have a function that redirects to a specific route while passing along parameters:
redirectWithData () {
this.$router.push({
name: 'payment.request',
params: {
periodFrom: this.data.periodFrom,
periodTo: this.data.periodTo,
receipt: this.data.receipt
}
})
}
However, I am facing an issue where upon refreshing the page, these parameters are lost. I am unsure of how to retain these parameters in the new route, or how to verify if the route has received the parameters, redirecting to another route if necessary.
The parameters are received in the RequestPayment.vue component:
props: {
periodFrom: String,
periodTo: String,
receipt: Number
}
Within the Vue router configuration, I have set props: true for RequestPayment.vue and attempted to implement a navigation guard without success:
{
component: RequestPayment,
name: 'payment.request',
path: '/pagamentos/solicitar',
props: true
}