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