ant-design/docs/react/introduce.zh-CN.md

115 lines
4.4 KiB
Markdown
Raw Normal View History

2016-03-31 14:17:09 +08:00
---
order: 0
title: Ant Design of React
2016-03-31 14:17:09 +08:00
---
2015-06-04 17:56:09 +08:00
2015-08-24 17:26:42 +08:00
这里是 Ant Design 的 React 实现,开发和服务于企业级后台产品。
2015-07-23 21:18:36 +08:00
2015-08-22 20:51:10 +08:00
<div class="pic-plus">
<img width="150" src="https://t.alipayobjects.com/images/rmsweb/T11aVgXc4eXXXXXXXX.svg">
<span>+</span>
<img width="160" src="https://t.alipayobjects.com/images/rmsweb/T16xRhXkxbXXXXXXXX.svg">
</div>
2016-03-21 10:44:31 +08:00
2015-08-22 20:51:10 +08:00
<style>
.pic-plus > * {
display: inline-block!important;
vertical-align: middle;
}
.pic-plus span {
font-size: 30px;
color: #aaa;
margin: 0 20px;
}
</style>
2016-03-14 16:18:06 +08:00
---
2015-06-04 17:56:09 +08:00
## 特性
2016-01-12 15:51:44 +08:00
- Designed as Ant Design提炼和服务企业级中后台产品的交互语言和视觉风格。
2016-07-17 18:37:44 +08:00
- [React Component](http://react-component.github.io/badgeboard/) 基础上精心封装的高质量 UI 组件。
- 基于 npm + webpack + babel 的工作流,支持 ES2015 和 TypeScript。
2015-07-08 20:08:19 +08:00
2016-02-02 18:24:49 +08:00
## 安装
2016-02-23 01:03:50 +08:00
```bash
2016-02-02 18:24:49 +08:00
$ npm install antd
```
2015-07-03 18:06:47 +08:00
2015-11-17 16:33:47 +08:00
## 示例
2015-11-08 19:09:28 +08:00
2015-07-03 18:06:47 +08:00
```jsx
import { DatePicker } from 'antd';
ReactDOM.render(<DatePicker />, mountNode);
2015-07-03 18:06:47 +08:00
```
2015-06-15 18:16:21 +08:00
2015-12-08 18:05:01 +08:00
引入样式:
2015-11-14 21:38:31 +08:00
```jsx
import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
2015-11-14 21:38:31 +08:00
```
以下两种方法都可以达到按需加载的目的:
2015-12-08 18:05:01 +08:00
- `import DatePicker from 'antd/lib/date-picker'`
- 配合插件 [babel-plugin-import](https://github.com/ant-design/babel-plugin-import) 使用 `import { DatePicker } from 'antd';`
> babel-plugin-import 支持 js 和 css 同时按需加载。
2015-12-08 18:05:01 +08:00
2015-08-22 21:08:18 +08:00
## 版本
2016-09-29 14:32:15 +08:00
- 稳定版:[![npm package](https://img.shields.io/npm/v/antd.svg?style=flat-square)](https://www.npmjs.org/package/antd)
2015-09-08 14:05:03 +08:00
- 开发版:[![](https://cnpmjs.org/badge/v/antd.svg?&tag=beta&subject=npm)](https://www.npmjs.org/package/antd)
2015-08-22 21:08:18 +08:00
2015-11-03 15:08:41 +08:00
## 浏览器支持
2016-09-28 00:07:31 +08:00
现代浏览器和 IE9 及以上。
2015-11-03 15:08:41 +08:00
2016-01-14 14:29:30 +08:00
> [IE8 issues](https://github.com/xcatliu/react-ie8)
2015-06-15 18:16:21 +08:00
## 链接
2015-06-04 17:56:09 +08:00
2015-06-15 18:16:21 +08:00
- [首页](http://ant.design/)
2016-11-14 11:08:26 +08:00
- [组件文档](http://ant.design/docs/react/introduce)
- [更新日志](CHANGELOG.en-US.md)
2016-12-02 15:46:42 +08:00
- [开发脚手架](https://github.com/dvajs/dva-cli)
2016-01-19 17:30:58 +08:00
- [开发工具文档](http://ant-tool.github.io/)
2016-07-29 13:52:05 +08:00
- [React 基础组件](http://react-component.github.io/)
- [移动端组件](http://mobile.ant.design)
2016-11-14 11:08:26 +08:00
- [动效](https://motion.ant.design)
2015-12-22 18:03:15 +08:00
- [设计规范速查手册](https://os.alipayobjects.com/rmsportal/HTXUgPGkyyxEivE.png)
2016-11-14 11:08:26 +08:00
- [开发者说明](https://github.com/ant-design/ant-design/wiki/Development)
- [版本发布规则](https://github.com/ant-design/ant-design/wiki/%E8%BD%AE%E5%80%BC%E8%A7%84%E5%88%99%E5%92%8C%E7%89%88%E6%9C%AC%E5%8F%91%E5%B8%83%E6%B5%81%E7%A8%8B)
2016-06-23 12:54:37 +08:00
- [社区贡献脚手架和范例](https://github.com/ant-design/ant-design/issues/129)
2016-08-11 16:45:15 +08:00
- [常见问题](https://github.com/ant-design/ant-design/wiki/FAQ)
2016-11-14 11:08:26 +08:00
- [CodePen 模板](http://codepen.io/benjycui/pen/KgPZrE?editors=001) for bug reports
2016-08-11 16:45:15 +08:00
- [Awesome Ant Design](https://github.com/websemantics/awesome-ant-design)
2016-11-14 11:08:26 +08:00
- [定制主题](https://github.com/ant-design/antd-init/tree/master/examples/customize-antd-theme)
2015-06-15 18:18:42 +08:00
2015-07-03 18:06:47 +08:00
## 谁在使用
2016-10-07 21:10:05 +08:00
- [蚂蚁金服](http://www.antgroup.com/)
- [阿里巴巴](http://www.alibaba.com/)
- [口碑](http://www.koubei.com/)
- [美团](http://www.meituan.com)
- [滴滴](http://www.xiaojukeji.com/)
2015-06-15 18:18:42 +08:00
2015-11-04 20:30:50 +08:00
> 如果你的公司和产品使用了 Ant Design欢迎到 [这里](https://github.com/ant-design/ant-design/issues/477) 留言。
2015-06-15 18:18:42 +08:00
## 如何贡献
在任何形式的参与前,请先阅读 [贡献者文档](https://github.com/ant-design/ant-design/blob/master/.github/CONTRIBUTING.md)。有任何建议或意见您可以 [Pull Request](https://github.com/ant-design/ant-design/pulls),给我们 [报告 Bug](https://github.com/ant-design/ant-design/issues/new)。
2016-06-18 16:05:14 +08:00
2016-06-18 16:07:41 +08:00
> 强烈推荐阅读 [《提问的智慧》](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way)、[《如何向开源社区提问题》](https://github.com/seajs/seajs/issues/545) 和 [《如何有效地报告 Bug》](http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html),更好的问题更容易获得帮助。
## 社区互助
如果您在使用的过程中碰到问题,可以通过下面几个途径寻求帮助,同时我们也鼓励资深用户通过下面的途径给新人提供帮助。
2016-10-20 14:49:51 +08:00
通过 Stack Overflow 或者 Segment Fault 提问时,建议加上 `antd` 标签。
2016-10-19 14:04:46 +08:00
2016-10-20 14:49:51 +08:00
1. [Stack Overflow](http://stackoverflow.com/questions/tagged/antd)(推荐)
2. [Segment Fault](https://segmentfault.com/t/antd)
3. [![Join the chat at https://gitter.im/ant-design/ant-design](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ant-design/ant-design?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)