From 21b5d17e4249ae8e0632462c8e6f1e0005d4a1bf Mon Sep 17 00:00:00 2001 From: Yi Lei Feng Date: Fri, 12 Apr 2024 10:41:49 -0400 Subject: [PATCH] fix Vue 3 router redirect --- src/router/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/router/index.ts b/src/router/index.ts index 4cf6ca1c..8a91650e 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -12,7 +12,9 @@ const routes = [ }, { path: '/:lang/editor/:uid', - redirect: '/:lang/editor-metadata/:uid' + redirect: (to: RouteLocationNormalized) => { + return '/' + to.params.lang + '/editor-metadata/' + to.params.uid; + } }, { path: '/:lang/editor-metadata',