mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix: router catchAll
This commit is contained in:
parent
7346f20e96
commit
59f9b851d6
@ -47,12 +47,12 @@ function getRoutes() {
|
|||||||
|
|
||||||
if (locales) {
|
if (locales) {
|
||||||
routes.push({
|
routes.push({
|
||||||
path: '/*',
|
path: '/:catchAll(.*)',
|
||||||
redirect: (route) => `/${getLangFromRoute(route)}/`,
|
redirect: (route) => `/${getLangFromRoute(route)}/`,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
routes.push({
|
routes.push({
|
||||||
path: '/*',
|
path: '/:catchAll(.*)',
|
||||||
redirect: '/',
|
redirect: '/',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ function getRoutes() {
|
|||||||
|
|
||||||
if (langs.length) {
|
if (langs.length) {
|
||||||
routes.push({
|
routes.push({
|
||||||
path: '/*',
|
path: '/:catchAll(.*)',
|
||||||
redirect: (route) => `/${getLangFromRoute(route)}/`,
|
redirect: (route) => `/${getLangFromRoute(route)}/`,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ function getRoutes() {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
routes.push({
|
routes.push({
|
||||||
path: '*',
|
path: '/:catchAll(.*)',
|
||||||
redirect: () => '/',
|
redirect: () => '/',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user