1.Params
Since dynamic routing also passes params, path cannot be used with params in this.$router.push() method, otherwise params will be invalid. You need to use name to specify the page.
And access through the name attribute of routing configuration
Define parameters in the routing configuration file:
Get the page through name and pass params :
Get parameters through this.$route.params on the target page:
2.Query
The page passes parameters through path and query. In this example, row is a certain row of table data.
Get the parameters on the target page through this.$route.query:
this.$route.query.row.xxx
The above is the detailed content of How to obtain this.$router.push parameter in Vue. For more information, please follow other related articles on the PHP Chinese website!