Browse Source
site: Add 4.x url (#23130)
* docs: add 4.x url in 3.x page
* add s
pull/23382/head
xrkffgg
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
18 additions and
7 deletions
-
site/bisheng.config.js
-
site/theme/template/Layout/Header.jsx
|
|
@ -66,12 +66,15 @@ module.exports = { |
|
|
|
废弃: 7, |
|
|
|
}, |
|
|
|
docVersions: { |
|
|
|
'0.9.x': 'http://09x.ant.design', |
|
|
|
'0.10.x': 'http://010x.ant.design', |
|
|
|
'0.11.x': 'http://011x.ant.design', |
|
|
|
'0.12.x': 'http://012x.ant.design', |
|
|
|
'1.x': 'http://1x.ant.design', |
|
|
|
'2.x': 'http://2x.ant.design', |
|
|
|
'1.x': 'http://1x.ant.design', |
|
|
|
'0.12.x': 'http://012x.ant.design', |
|
|
|
'0.11.x': 'http://011x.ant.design', |
|
|
|
'0.10.x': 'http://010x.ant.design', |
|
|
|
'0.9.x': 'http://09x.ant.design', |
|
|
|
}, |
|
|
|
docNewVersions: { |
|
|
|
'4.x': 'https://ant.design', |
|
|
|
}, |
|
|
|
}, |
|
|
|
filePathMapper(filePath) { |
|
|
|
|
|
@ -108,8 +108,16 @@ class Header extends React.Component { |
|
|
|
const { menuVisible } = this.state; |
|
|
|
const { isMobile } = this.context; |
|
|
|
const menuMode = isMobile ? 'inline' : 'horizontal'; |
|
|
|
const { location, themeConfig, intl: { locale } } = this.props; |
|
|
|
const docVersions = { ...themeConfig.docVersions, [antdVersion]: antdVersion }; |
|
|
|
const { |
|
|
|
location, |
|
|
|
themeConfig, |
|
|
|
intl: { locale }, |
|
|
|
} = this.props; |
|
|
|
const docVersions = { |
|
|
|
...themeConfig.docNewVersions, |
|
|
|
[antdVersion]: antdVersion, |
|
|
|
...themeConfig.docVersions, |
|
|
|
}; |
|
|
|
const versionOptions = Object.keys(docVersions).map(version => ( |
|
|
|
<Option value={docVersions[version]} key={version}> |
|
|
|
{version} |
|
|
|