You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{ path: '/', redirect: '/foo' }, // when come to "/" , I hope go to foo page which is my actural home page { path: '/foo', component: Foo }, { path: '/:pathMatch(.*)', // when not "/ " or not "foo", I hope go to bar page , which is my 404 page . component: Bar }
The text was updated successfully, but these errors were encountered:
sherleysong
changed the title
@4.3.3 the redirect / to home is not effective when sub
@4.3.3 the redirect / to home is not effective when children get /:pathMatch(.*)
Jun 11, 2024
Reproduction
https://jsfiddle.net/5qv469nr/2/
Steps to reproduce the bug
{ path: '/', redirect: '/foo' },
{ path: '/foo', component: Foo },
{
path: '/:pathMatch(.*)',
component: Bar
}
Expected behavior
goto foo
Actual behavior
goto bar
Additional information
{ path: '/', redirect: '/foo' }, // when come to "/" , I hope go to foo page which is my actural home page { path: '/foo', component: Foo }, { path: '/:pathMatch(.*)', // when not "/ " or not "foo", I hope go to bar page , which is my 404 page . component: Bar }
the actural code is like this :
{ path: '/', name: 'home', component: Main, redirect: '/home', meta: { title: '首页' }, children: [ { path: '/home', name: 'home', meta: { title: '首页' }, component: () => import('src/components/home') }, { path: '/:pathMatch(.*)', component: () => import('src/components/error-page/404.vue') } ] }
the code before [email protected] is OK , but wrong when come to [email protected] .
can you fix it @4.3.4 ?
The text was updated successfully, but these errors were encountered: