mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-04 04:58:55 +08:00
Merge branch 'develop-1.0.0' of github.com:ant-design/ant-design into develop-1.0.0
This commit is contained in:
commit
3c6c0d63a8
@ -38,6 +38,9 @@ export function jsonmlToComponent(pathname, jsonml) {
|
||||
[(node) => getTagName(node) === 'video', (node, index) =>
|
||||
<VideoPlayer video={getAttributes(node)} key={index} />
|
||||
],
|
||||
[(node) => isElement(node) && getTagName(node) === 'a', (node, index) =>
|
||||
<Link to={getAttributes(node).href} key={index}>{toReactComponent(getChildren(node)[0])}</Link>
|
||||
],
|
||||
[(node) => {
|
||||
return isElement(node) &&
|
||||
getTagName(node) === 'p' &&
|
||||
|
@ -55,6 +55,11 @@ ReactDOM.render(
|
||||
component={utils.getChildrenWrapper(reactComponents)} />
|
||||
</Route>
|
||||
{redirects}
|
||||
<Route path="docs/react" component={ReactComponents}>
|
||||
{utils.generateIndex(reactComponents)}
|
||||
<Route path=":children"
|
||||
component={utils.getChildrenWrapper(reactComponents)} />
|
||||
</Route>
|
||||
<Route path="docs/practice" component={Practice}>
|
||||
{utils.generateIndex(practice)}
|
||||
<Route path=":children"
|
||||
|
@ -60,7 +60,7 @@ export function generateIndex(data) {
|
||||
|
||||
const pathToFile = {};
|
||||
Object.keys(redirects).forEach((key) => pathToFile[redirects[key]] = key);
|
||||
pathToFile['components/changelog'] = './CHANGELOG'; // TODO
|
||||
pathToFile['docs/react/changelog'] = './CHANGELOG'; // TODO
|
||||
export function getChildrenWrapper(data) {
|
||||
return function childrenWrapper(props) {
|
||||
const trimedPathname = props.location.pathname.replace(/^\//, '');
|
||||
|
@ -15,11 +15,7 @@ export default {
|
||||
},
|
||||
|
||||
redirects: {
|
||||
'docs/react/introduce': 'components/introduce',
|
||||
'docs/react/getting-started': 'components/getting-started',
|
||||
'docs/react/install': 'components/install',
|
||||
'docs/react/upgrade-notes': 'components/upgrade-notes',
|
||||
CHANGELOG: 'components/changelog',
|
||||
CHANGELOG: 'docs/react/changelog',
|
||||
},
|
||||
|
||||
docVersions: {
|
||||
|
Loading…
Reference in New Issue
Block a user