摘要: 作用:使路由组件更方便接收参数 { name: "example", path: "detail/:id", component: RouteDetail, //第一种写法:props值为对象,该对象中所有的可以-value的组合最后都将通过props传给RouteDetail组件 //Props: 阅读全文
posted @ 2022-05-11 19:41 清水紅葉 阅读(303) 评论(0) 推荐(0) 编辑
摘要: params 1.配置路由,声明接收params参数 export default new VueRouter({ routes: [ { path: "/about", component: RouteAbout, }, { path: "/home", component: RouteHome, 阅读全文
posted @ 2022-05-11 18:06 清水紅葉 阅读(24) 评论(0) 推荐(0) 编辑