//index.js
{
name: 'xiangqing',
path:'detail/:id/:title',
component: Detail,
// props: {a:1,b:'hello'}
// props: true
props($route) {
return {
id:$route.params.id,
title:$route.params.title
}
}
<-- !detail.vue-->
<template>
<ul>
<li>消息编号:{
{id}}</li>
<li>消息标题:{
{title}}</li>
</ul