路由跳转步骤
1、创建要跳转的vue组件
2、将组件注入路由对象
(1)在router包下的index.js文件中注入新创建的组件
import Home from '@/components/Home'
(2)在路由规则中添加组件路由
{ path: '/home', component: Home }
3、跳转函数代码
vue3项目路由跳转
阅读 93
2022-02-03
路由跳转步骤
1、创建要跳转的vue组件
2、将组件注入路由对象
(1)在router包下的index.js文件中注入新创建的组件
import Home from '@/components/Home'
(2)在路由规则中添加组件路由
{ path: '/home', component: Home }
3、跳转函数代码
相关推荐
精彩评论(0)