routes传递参数

routes传递参数_第1张图片
image.png

1 用:to传递参数 {{$route.params.us}}

 
  xin-x1|
  xin-x2



2 用 {{$route.name}} 取值
html

1 html 
 
鼠标悬停几秒钟查看此处动态绑定的提示信息! 999--- {{$route.name}}
2 routes routes: [ { path: '/', name: 'HelloWorld', component: HelloWorld },{ path: '/xin', component: titv, children:[ { path: '/', name: 'titv', component: titv, }, { path: 'x1', name: 'x1', component: titv1 },{ path: 'x2', name: 'x2', component: titv2 } ] } ]

你可能感兴趣的:(routes传递参数)