vue-router-7-重定向及别名
const router = new VueRouter({ mode: 'history', base: __dirname, routes: [ { path: '/', component: Home, children: [ { path: '', component: Default }, { path: 'foo', component: Foo }, { path: 'baz', name: 'baz', component: Baz }, { path: 'with-params/:id', component: WithParams }, // relative redirect to a sibling route { path: 'relative-redirect', redirect: 'foo' } ] }, // absolute redirect { path: '/absolute-redirect', redirect: '/bar' }, // dynamic redirect, note that the target route `to` is available for the redirect function { path: '/dynamic-redirect/:id?', redirect: to => { const {