2016-02-29 14:08:40 +08:00
|
|
|
|
import React from 'react';
|
2016-03-01 14:19:50 +08:00
|
|
|
|
import { Select } from '../../../';
|
2016-03-17 15:46:07 +08:00
|
|
|
|
import { version as antdVersion } from '../../../package.json';
|
|
|
|
|
import { docVersions } from '../../website.config';
|
|
|
|
|
const Option = Select.Option;
|
2016-02-29 14:08:40 +08:00
|
|
|
|
|
2016-03-23 23:02:01 +08:00
|
|
|
|
docVersions[antdVersion] = antdVersion;
|
|
|
|
|
|
2016-02-29 14:08:40 +08:00
|
|
|
|
export default class Footer extends React.Component {
|
2016-03-17 15:46:07 +08:00
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props);
|
|
|
|
|
|
|
|
|
|
this.handleVersionChange = this.handleVersionChange.bind(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
handleVersionChange(url) {
|
|
|
|
|
window.location.href = url;
|
|
|
|
|
}
|
|
|
|
|
|
2016-02-29 14:08:40 +08:00
|
|
|
|
render() {
|
2016-03-23 23:02:01 +08:00
|
|
|
|
const options = Object.keys(docVersions).map(version => (
|
|
|
|
|
<Option value={docVersions[version]} key={version}>{version}</Option>
|
|
|
|
|
));
|
2016-03-01 14:19:50 +08:00
|
|
|
|
return (
|
|
|
|
|
<footer id="footer">
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<h2>GitHub</h2>
|
|
|
|
|
<a target="_blank " href="https://github.com/ant-design/ant-design">
|
|
|
|
|
仓库
|
|
|
|
|
</a>
|
|
|
|
|
<a target="_blank" href="https://github.com/ant-design/ant-design/tree/master/style">
|
|
|
|
|
样式
|
|
|
|
|
</a>
|
|
|
|
|
<a target="_blank" href="https://github.com/ant-design/antd-bin">
|
|
|
|
|
开发工具
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<h2>关于我们</h2>
|
|
|
|
|
<a href="https://github.com/alipay/x/issues">博客 - Ant UED</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<h2>联系我们</h2>
|
|
|
|
|
<a target="_blank" href="https://github.com/ant-design/ant-design/issues">
|
|
|
|
|
反馈和建议
|
|
|
|
|
</a>
|
|
|
|
|
<a target="_blank" href="https://gitter.im/ant-design/ant-design">
|
|
|
|
|
讨论
|
|
|
|
|
</a>
|
|
|
|
|
<a target="_blank" href="http://dwz.cn/2dJ2mg">
|
|
|
|
|
报告 Bug
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<div>©2015 蚂蚁金服体验技术部出品</div>
|
|
|
|
|
<div>
|
|
|
|
|
文档版本:
|
2016-03-23 23:02:01 +08:00
|
|
|
|
<Select
|
|
|
|
|
size="small"
|
|
|
|
|
dropdownMatchSelectWidth={false}
|
|
|
|
|
defaultValue={antdVersion}
|
|
|
|
|
onChange={this.handleVersionChange}>
|
|
|
|
|
{options}
|
2016-03-01 14:19:50 +08:00
|
|
|
|
</Select>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</footer>
|
|
|
|
|
);
|
2016-02-29 14:08:40 +08:00
|
|
|
|
}
|
|
|
|
|
}
|