params参数使用方法1.声明接收params参数123456789101112131415161718192021{ path:'/home', component:Home, children:[ { path:'news', component:News, }, { path:'message', component:Message, children:[ { name:'xiangqing', path:'detail/:id/:title', //使用占位符声明接收params参数 component:Detail, } ] } ]} 2.传递参数12345678910111213<!-- 跳转路由并携带params参数,to的字符串写法 --><router-link :to="`/home/message/detail/666/你好`">{{m.title}}</router-link> <!-- 跳转路由并携带params参数,to的对象写法 --><router-link :to="{ name:'xiangqing', params:{ id:666, title:'你好' }}"> {{m.title}}</router-link> 3.接收参数12$route.params.id$route.params.title