From ae27d430e52edc109d98f251fec56aa97eea0e7a Mon Sep 17 00:00:00 2001 From: Cherry7 <79909910+CCherry07@users.noreply.github.com> Date: Mon, 27 Mar 2023 08:16:03 +0800 Subject: [PATCH] docs: version menu (#6390) --- site/src/layouts/header/Menu.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/site/src/layouts/header/Menu.vue b/site/src/layouts/header/Menu.vue index ed36233fa..df0528581 100644 --- a/site/src/layouts/header/Menu.vue +++ b/site/src/layouts/header/Menu.vue @@ -12,6 +12,7 @@ :default-value="antdVersion" > {{ antdVersion }} + 3.x 2.x (Not Recommended) @@ -69,7 +70,12 @@ export default defineComponent({ ); }; - const changeVersion = v => { + const changeVersion = (v: string) => { + if (v === '3x') { + // TODO: 3.x site + location.href = `https://antdv.com${route.fullPath}`; + return; + } location.href = `https://${v}.antdv.com${route.fullPath}`; }; return {