diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..7c6f5b9990 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,52 @@ +# Contributing to Ant Design + +The following is a set of guidelines for contributing to Ant Design. Please spend several minutes in reading these guidelines before you create an issue or pull request. + +Anyway, these are just guidelines, not rules, use your best judgment and feel free to propose changes to this document in a pull request. + + +## Do your homework before asking a question + +It's a great idea to read Eric Steven Raymond's [How To Ask Questions The Smart Way](http://www.catb.org/esr/faqs/smart-questions.html) twice before asking a question. But if you are busy now, I recommend to read [Don't post homework questions](http://www.catb.org/esr/faqs/smart-questions.html#homework) first. + +The following guidelines are about *How to avoid Homework Questions*. + +### 1. Read the documentation. + +It sad but true that someone just glance(not read) [Ant Design's documentation](http://ant.design/). Please read the documentation closely. What's more, you can modify and run our demo with [JSFiddle](http://jsfiddle.net/9zrstuto/70/). It's helpful to understand our documentation. + +Tips: choose the corresponding documentation with versions selector which in the bottom-right corner. + +### 2. Make sure that your question is about Ant Design, not React + +Someone may think all of the questions that he/she meets in developing are about Ant Design, but it's not true. So, please read [React's documentaion](http://facebook.github.io/react/docs/getting-started.html) or just Google(not Baidu, seriously) your questions with keywork *React* first. If you are sure that your question is about Ant Design, go ahead. + +### 3. Read the FAQ and search the issues list of Ant Design + +Your questions may be asked and solved by others. So please spend several minutes on searching. Remember [DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself), both code and questions. + +P.S. +1. [FAQ](https://github.com/ant-design/ant-design/wiki/FAQ) +1. [Issues list](https://github.com/ant-design/ant-design/issues) + + +## Providing a demo while reporting a bug + +It would be helpful to provide a demo which can re-produce the bug 100%. Please fork this [Fiddle](http://jsfiddle.net/9zrstuto/70/) and re-produce the bug you met. Then, create an issue like this [example](https://github.com/ant-design/ant-design/issues/new?title=%E8%AF%B7%E5%A1%AB%E5%86%99%E7%AE%80%E6%B4%81%E6%9C%89%E6%95%88%E7%9A%84%E6%A0%87%E9%A2%98&body=**%E9%97%AE%E9%A2%98%E6%8F%8F%E8%BF%B0**%0A%0A%EF%BC%88%E6%8F%8F%E8%BF%B0%E4%B8%80%E4%B8%8B%E9%97%AE%E9%A2%98%EF%BC%89%0A%0A**%E5%8F%91%E7%94%9F%E7%8E%AF%E5%A2%83**%0A%0A-%20antd%20%E7%89%88%E6%9C%AC%EF%BC%9A%0A-%20%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E5%8F%8A%E7%89%88%E6%9C%AC%EF%BC%9A%0A-%20%E6%B5%8F%E8%A7%88%E5%99%A8%E5%8F%8A%E7%89%88%E6%9C%AC%EF%BC%9A%0A-%20%E5%9C%A8%E7%BA%BF%E6%BC%94%E7%A4%BA%E5%9C%B0%E5%9D%80%EF%BC%9A%0A%0A**%E9%87%8D%E7%8E%B0%E6%AD%A5%E9%AA%A4**%0A%0A1.%20...%0A2.%20...%0A). The most important thing is: double check before claiming that you have found a bug. + + +## Tips about Feature Request + +If you believe that Ant Design should provide some features, but it does not. You could create an issue to discuss. However, Ant Design is not Swiss Army Knife, there are some features which Ant Design will not support: + +1. Request or operate data + + +## Tips about Pull Request + +It's welcomed to pull request. And there are some tips about that: + +1. It is a good habit to create a feature request issue to disscuss whether the feature is necessary before you implement it. +1. Run `npm run lint` and fix those errors before committing in order to keep consistent code style. +1. Rebase before creating a PR to keep commit history clear. +1. Add some descriptions and refer relative issues for you PR. diff --git a/README-zh_CN.md b/README-zh_CN.md index 24643319ec..4a7679bf9e 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -46,7 +46,8 @@ import 'antd/lib/index.css'; // or 'antd/style/index.less' - [首页](http://ant.design/) - [React UI 库](http://ant.design/docs/introduce) - [修改记录](CHANGELOG.md) -- [构建调试工具](https://github.com/ant-tool/xtool/) +- [开发脚手架](https://github.com/ant-design/antd-init/) +- [本地调试工具集](https://github.com/dora-js/dora/) - [React 组件](http://react-component.github.io/) - [React 代码规范](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-code-style.md) - [组件设计原则](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-design.md) diff --git a/README.md b/README.md index d42530b26d..6138edae90 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,8 @@ Normal browsers and Internet Explorer 8+. - [Home page](http://ant.design/) - [React UI library](http://ant.design/docs/introduce) - [ChangeLog](CHANGELOG.md) -- [Build/Debug tools](https://github.com/ant-tool/xtool/) +- [Scaffold tool](https://github.com/ant-design/antd-init/) +- [Debug tools set](https://github.com/dora-js/dora) - [React components](http://react-component.github.io/) - [React style guide](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-code-style.md) - [React component design guide](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-design.md) diff --git a/components/form/demo/mix.md b/components/form/demo/mix.md index 4dc7cb48bf..6ecfd53f40 100644 --- a/components/form/demo/mix.md +++ b/components/form/demo/mix.md @@ -7,7 +7,8 @@ --- ````jsx -import { Form, Select, InputNumber, DatePicker, Switch, Slider, Button, message, Row, Col } from 'antd'; +import { Form, Select, InputNumber, DatePicker, Switch, + Slider, Button, message, Row, Col, Upload, Icon } from 'antd'; const FormItem = Form.Item; const Option = Select.Option; @@ -28,6 +29,17 @@ const Demo = React.createClass({ }; }, + handleUpload(info) { + if (info.file.status !== 'uploading') { + console.log(info.file, info.fileList); + } + if (info.file.status === 'done') { + message.success(info.file.name + ' 上传成功。'); + } else if (info.file.status === 'error') { + message.error(info.file.name + ' 上传失败。'); + } + }, + handleSubmit(e) { e.preventDefault(); message.success('收到表单值~~~ :' + JSON.stringify(this.state.formData, function(k, v) { @@ -105,6 +117,17 @@ const Demo = React.createClass({ + + + + +

仅支持上传一张。

+
diff --git a/components/select/demo/tags.md b/components/select/demo/tags.md index 4715675f34..b650c77435 100644 --- a/components/select/demo/tags.md +++ b/components/select/demo/tags.md @@ -21,10 +21,10 @@ function handleChange(value) { } ReactDOM.render( - , mountNode); diff --git a/components/tree/index.md b/components/tree/index.md index 28301382ec..6e11ccde6c 100644 --- a/components/tree/index.md +++ b/components/tree/index.md @@ -19,9 +19,11 @@ |multiple | 是否支持多选 | bool | false | |checkable | 是否支持选中 | bool | false | |defaultExpandAll | 设置展开所有树节点 | bool | false | -|defaultExpandedKeys | 展开指定的树节点 | String[] | false | +|defaultExpandedKeys | 默认展开指定的树节点 | String[] | [] | |defaultCheckedKeys | 默认选中复选框的树节点 | String[] | [] | |defaultSelectedKeys | 默认选中的树节点 | String[] | [] | +|checkedKeys | 设置选中复选框的树节点 | String[] | - | +|selectedKeys | 设置选中的树节点 | String[] | - | |onCheck | 点击树节点或复选框触发 | function(e:{checked:bool,node,checkedKeys,event}) | - | |onSelect | 点击树节点触发 | function(e:{checked:bool,node,checkedKeys,event}) | - | |onDataLoaded | 异步加载数据 | function(node)| - | diff --git a/docs/getting-started.md b/docs/getting-started.md index f1bf6ccde5..19f2f15fe6 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -27,7 +27,7 @@ Ant Design React 致力于提供给程序员**愉悦**的开发体验。 $ npm install antd-init -g ``` -[更多使用说明](https://github.com/ant-tool/xtool/#使用说明)。 +[更多使用说明](https://github.com/ant-design/antd-init/)。 ### 2. 创建一个项目 diff --git a/docs/install.md b/docs/install.md index 4fe090261e..617b24e174 100644 --- a/docs/install.md +++ b/docs/install.md @@ -40,4 +40,4 @@ $ npm install antd-init -g 在空目录运行 `antd-init` 可以初始化一个 antd 的前端应用。 -> 更多 [使用方式](https://github.com/ant-tool/xtool/)。 +> 更多 [使用方式](https://github.com/dora-js/dora/)。 diff --git a/docs/install_en.md b/docs/install_en.md index a0a9851c41..f7de8e74ce 100644 --- a/docs/install_en.md +++ b/docs/install_en.md @@ -34,4 +34,4 @@ $ npm install antd-init -g Inside an empty folder run `antd-init` to init. -> [More tools](https://github.com/ant-tool/xtool/)。 +> [More tools](https://github.com/dora-js/dora/)。 diff --git a/docs/introduce.md b/docs/introduce.md index b03cc03c34..bd2d0c7e31 100644 --- a/docs/introduce.md +++ b/docs/introduce.md @@ -61,7 +61,8 @@ import 'antd/lib/index.css'; // or 'antd/style/index.less' - [首页](http://ant.design/) - [修改记录](http://ant.design/changelog) -- [构建调试工具](https://github.com/ant-tool/xtool/) +- [开发脚手架](https://github.com/ant-design/antd-init/) +- [本地调试工具集](https://github.com/dora-js/dora/) - [React 组件](http://react-component.github.io/) - [React 代码规范](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-code-style.md) - [组件设计原则](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-design.md) diff --git a/site/static/style.css b/site/static/style.css index 1f7c4dfcc3..51be095263 100644 --- a/site/static/style.css +++ b/site/static/style.css @@ -543,7 +543,7 @@ footer ul li > a { .markdown h1 { font-size: 28px; } .markdown h2 { font-size: 24px; } -.markdown h3 { font-size: 20px; } +.markdown h3 { font-size: 18px; } .markdown h4 { font-size: 16px; } .markdown h5 { font-size: 14px; } .markdown h6 { font-size: 12px; } diff --git a/spec/font.md b/spec/font.md index f31dc9adcb..0954633e8e 100644 --- a/spec/font.md +++ b/spec/font.md @@ -11,7 +11,7 @@ - 中文字体族: - + - 英文文字体族: @@ -20,7 +20,7 @@ 字体家族 css 代码如下: ```css -font-family: "Helvetica Neue",Helvetica,"Hiragino Sans GB","STHeitiSC-Light","Microsoft YaHei","微软雅黑",Arial,sans-serif; +font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif; ``` ## 字体使用规范 diff --git a/spec/tools.md b/spec/tools.md index 47e2bfb97a..adcf199344 100644 --- a/spec/tools.md +++ b/spec/tools.md @@ -17,18 +17,18 @@ - For Sketch + Components in Sketch ### 图标 - svg set + Icon in AI - Iconfont set + Iconfont for web