mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 17:51:54 +00:00
fix: router catchAll
This commit is contained in:
@@ -47,12 +47,12 @@ function getRoutes() {
|
||||
|
||||
if (locales) {
|
||||
routes.push({
|
||||
path: '/*',
|
||||
path: '/:catchAll(.*)',
|
||||
redirect: (route) => `/${getLangFromRoute(route)}/`,
|
||||
});
|
||||
} else {
|
||||
routes.push({
|
||||
path: '/*',
|
||||
path: '/:catchAll(.*)',
|
||||
redirect: '/',
|
||||
});
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@ function getRoutes() {
|
||||
|
||||
if (langs.length) {
|
||||
routes.push({
|
||||
path: '/*',
|
||||
path: '/:catchAll(.*)',
|
||||
redirect: (route) => `/${getLangFromRoute(route)}/`,
|
||||
});
|
||||
|
||||
@@ -41,7 +41,7 @@ function getRoutes() {
|
||||
});
|
||||
} else {
|
||||
routes.push({
|
||||
path: '*',
|
||||
path: '/:catchAll(.*)',
|
||||
redirect: () => '/',
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user