Skip to content

Commit ae27d43

Browse files
authored
docs: version menu (#6390)
1 parent 9dbe035 commit ae27d43

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

site/src/layouts/header/Menu.vue

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
:default-value="antdVersion"
1313
>
1414
<a-select-option :value="antdVersion">{{ antdVersion }}</a-select-option>
15+
<a-select-option value="3.x" @click="changeVersion('3x')">3.x</a-select-option>
1516
<a-select-option value="2.x" @click="changeVersion('2x')">
1617
2.x (Not Recommended)
1718
</a-select-option>
@@ -69,7 +70,12 @@ export default defineComponent({
6970
);
7071
};
7172
72-
const changeVersion = v => {
73+
const changeVersion = (v: string) => {
74+
if (v === '3x') {
75+
// TODO: 3.x site
76+
location.href = `https://antdv.com${route.fullPath}`;
77+
return;
78+
}
7379
location.href = `https://${v}.antdv.com${route.fullPath}`;
7480
};
7581
return {

0 commit comments

Comments
 (0)