Merge branch 'develop-1.0.0' of github.com:ant-design/ant-design into develop-1.0.0

This commit is contained in:
afc163 2016-05-06 15:53:25 +08:00
commit 3c6c0d63a8
4 changed files with 10 additions and 6 deletions

View File

@ -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' &&

View File

@ -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"

View File

@ -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(/^\//, '');

View File

@ -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: {