When a vue, peer route is redirected, how to pass parameters and assign values to the data instance?

I now have two peer routing pages to jump to, from A to B. There are many links on the
A page that can jump to page B, but the link clicked is different, and the data displayed on the page B is different.
now this parameter on page An is in the data instance data on page A. When I want to pass it over, it is also assigned to the data instance on page B, and then the parameter followed by the request on the page is the passed value to make the request to show the data corresponding to the click on the link.
the specific implementation of the code, boss can help write it? My foundation is weak, please!


on the A page, pass < router-link: to= "{path:'b', query: {p1vish p1'}" > < / router-link >

get the parameter value through $route.query.p1 in created on the B page, and then set it to data

.

A page method: this.$router.push ({
path: B page path,
query: {param: param}
});
B page receive: this.$route.query.param

Menu