first , Read the document carefully !!! Step on the pit bit by bit ~~~

Here's how params and query Two methods

1. use params Biography of ginseng

List page :

<router-link :to="{ name:'msgDetail', params: {id: item.msg_id}
}">( be careful : use params Parameters here is named route , use name)

</router-link>

The routing configuration is as follows :

export default new Router({

routes: [

 {

   path: '/msgDetail/:id',

   name: 'msgDetail',

   component: msgDetail

 }

]

Details page receiving parameters :

this.$route.params.id( be careful : Here is $route, instead of $router)

2. use query Biography of ginseng

List components :

<router-link :to="{ path: '/msgDetail', query: {id: item.msg_id}
}">( be careful : use query Here is the parameter with query , use path)

</router-link>

The routing configuration is as follows :

export default new Router({

routes: [

 {

   path: '/msgDetail',

   name: 'msgDetail',

   component: msgDetail

 }

]

Details page receiving parameters :

this.$route.query.id( be careful : Here is $route, instead of $router)

Technology
©2019-2020 Toolsou All rights reserved,
( Essence )2020 year 8 month 15 day redis database StackExchange.Redis in Set type (C# edition )org.postgresql.util.PSQLException Processing records Ai Wei also talks about project management , On grass roots management [AndroidO] [RK3399] -- GPIO Drive and control mode latex Custom commands in ———\newcommandgit Pull the remote branch and switch to it npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! test_vue_0613@1.0.0 dev: Solutions to errors ( Essence )2020 year 6 month 26 day C# Class library read json Profile help class java Compile time and runtime exceptions in Output string at specified position ( Detailed analysis )