将特定的路径,重新定向到已有路由

在router文件夹的index.ts文件中配置

实现只要输入网址,就能跳转进入home页面

1
2
3
4
{
path:'/',
redirect:'/home'
}