routing configuration:
{
path: "/proComment",
name: "proComment",
query: {
id: "",
},
component: () => import("@/pages/product/comment.vue")
},
Jump from the details page:
<router-link :to="{name:"proComment",query:{id:proDetilDate.id}}">
<span style="float: right">{{proDetilDate.comment.amount}} ></span>
</router-link>
the address bar changes as follows:
-sharp/proDetail/6 -> /-sharp/proComment
causes the query value not to be obtained in the proComment page, but params is fine
when you return to the previous page, the address bar changes to"/-sharp/proComment?id=6" before clicking again will change to"- sharp/proDetail/6"
.Please take a look at what caused it?