porps传参(最常用的 布尔传值)(基于前面的步骤进行修改)
①index.js //定义动态路由 props:true
const routes =[
{path:"/user/:id/:name/:age",component:User,props:true}
]
②app.vue //定义传参格式
<div>
<h6>路由导航</h6>
<div>
<router-link to="/foo">    foo</router-link>
<router-link to="/bar">    bar</router-link>
<router-link to="/user">    user</router-link>
<router-link to="/user/1/lsq/18">    user1</router-link>
<router-link to="/user/2/zsj/19">    user2</router-link>
<router-link to="/user/3/zzr/18">    user3</router-link>
</div>
<h6>路由出口</h6>
<router-view></router-view>
:to="{path:'/listview',params:{id:item.id}
③user.vue // 定义接收参数
<template>
<p>{{id}}</p>
<p>{{name}}</p>
<p>{{age}}</p>
</template>
<script>
export default {
name: "User",
props:['id','name','age']
}
</script>
<style scoped>
</style>