摘要: 1. 配置路由,声明接收params参数 ```js { path:'/home', component:Home, children:[ { path:'news', component:News }, { component:Message, children:[ { name:'xiangqi 阅读全文
posted @ 2023-09-11 23:38 雪落无痕1 阅读(12) 评论(0) 推荐(0) 编辑
摘要: ### 5.命名路由 1. 作用:可以简化路由的跳转。 2. 如何使用 1. 给路由命名: ```js { path:'/demo', component:Demo, children:[ { path:'test', component:Test, children:[ { name:'hello 阅读全文
posted @ 2023-09-11 23:09 雪落无痕1 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 1. router/index.js //该文件专门用于创建整个应用的路由器 import VueRouter from "vue-router" import About from '../pages/About' import Home from '../pages/Home' import N 阅读全文
posted @ 2023-09-11 22:56 雪落无痕1 阅读(7) 评论(0) 推荐(0) 编辑