mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-24 02:20:01 +08:00
docs: tweak version select option order (#42564)
* feat: test * chore: empty --------- Co-authored-by: afc163 <afc163@gmail.com>
This commit is contained in:
parent
694c332083
commit
729f568723
@ -39,7 +39,8 @@
|
||||
"color-function-notation": "legacy",
|
||||
"selector-class-pattern": null,
|
||||
"selector-id-pattern": null,
|
||||
"selector-not-notation": null
|
||||
"selector-not-notation": null,
|
||||
"declaration-block-no-redundant-longhand-properties": null
|
||||
},
|
||||
"ignoreFiles": ["components/style/color/{bezierEasing,colorPalette,tinyColor}.less"]
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ export interface HeaderProps {
|
||||
intl: { locale: string };
|
||||
location: { pathname: string; query: any };
|
||||
router: any;
|
||||
themeConfig?: { docVersions: Record<string, string> };
|
||||
themeConfig?: { docVersions: Record<string, string>; docNewVersions: Record<string, string> };
|
||||
changeDirection: (direction: DirectionType) => void;
|
||||
}
|
||||
|
||||
@ -208,6 +208,7 @@ const Header: React.FC<HeaderProps & WrappedComponentProps<'intl'>> = (props) =>
|
||||
{({ isMobile }) => {
|
||||
const { menuVisible, windowWidth, searching, showTechUIButton } = headerState;
|
||||
const docVersions: Record<string, string> = {
|
||||
...themeConfig?.docNewVersions,
|
||||
[antdVersion]: antdVersion,
|
||||
...themeConfig?.docVersions,
|
||||
};
|
||||
|
@ -1,3 +1,6 @@
|
||||
const chineseMirror =
|
||||
typeof location !== 'undefined' && location.hostname.includes('.antgroup.com');
|
||||
|
||||
module.exports = {
|
||||
categoryOrder: {
|
||||
'Ant Design': 0,
|
||||
@ -43,7 +46,6 @@ module.exports = {
|
||||
'Template Document': 3,
|
||||
},
|
||||
docVersions: {
|
||||
'5.x': 'https://ant.design',
|
||||
'3.x': 'http://3x.ant.design',
|
||||
'2.x': 'http://2x.ant.design',
|
||||
'1.x': 'http://1x.ant.design',
|
||||
@ -52,4 +54,7 @@ module.exports = {
|
||||
'0.10.x': 'http://010x.ant.design',
|
||||
'0.9.x': 'http://09x.ant.design',
|
||||
},
|
||||
docNewVersions: {
|
||||
'5.x': chineseMirror ? 'https://ant-design.antgroup.com' : 'https://ant.design',
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user