From 0159679ab18117a26f31353826a54295a95d198e Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Thu, 3 Dec 2015 09:37:57 +0800 Subject: [PATCH 1/9] chore: replace `no-drop` with `not-allowed` --- style/components/switch.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/style/components/switch.less b/style/components/switch.less index c118dafc9a..794941207d 100644 --- a/style/components/switch.less +++ b/style/components/switch.less @@ -51,13 +51,13 @@ } &-disabled { - cursor: no-drop; + cursor: not-allowed; background: #f4f4f4; border-color: #f4f4f4; &:after { background: #ccc; - cursor: no-drop; + cursor: not-allowed; } &-inner { From 7bbe2dee7c672a5af0f9a732fb22c4ebc06d3b65 Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Fri, 4 Dec 2015 11:22:16 +0800 Subject: [PATCH 2/9] chore: cursor should be `not-allowed` if disabled --- components/menu/demo/horizontal.md | 2 +- style/components/menu.less | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/menu/demo/horizontal.md b/components/menu/demo/horizontal.md index d67b99fc60..dfd3438f29 100644 --- a/components/menu/demo/horizontal.md +++ b/components/menu/demo/horizontal.md @@ -31,7 +31,7 @@ const App = React.createClass({ 导航一 - + 导航二 导航 - 子菜单}> diff --git a/style/components/menu.less b/style/components/menu.less index 6793ebd4a3..ce850fb923 100644 --- a/style/components/menu.less +++ b/style/components/menu.less @@ -100,6 +100,7 @@ &.@{menu-prefix-cls}-item-disabled, &.@{menu-prefix-cls}-submenu-disabled { color: #999 !important; + cursor: not-allowed; } } & > &-item-divider { From cc9c6390b85ce4eeca67aaaf87b40f9dace94f76 Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 4 Dec 2015 17:11:18 +0800 Subject: [PATCH 3/9] Fix document links --- CHANGELOG.md | 2 +- README-zh_CN.md | 2 +- README.md | 6 +++--- docs/getting-started.md | 7 +++++-- docs/install.md | 2 +- docs/introduce.md | 2 +- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcccc016b2..c2909ee934 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,7 +58,7 @@ - 优先使用苹方字体。 - 统一 size 属性的可选值为 `small` `default` `large`。 - 开始初步补充[测试用例](https://github.com/ant-design/ant-design/tree/1a3a19793c0791201666fdcf0dbd12a30fad4be0/tests)。 -- 提供主色系更换的方案。[#384](https://github.com/ant-design/ant-design/issues/384) +- 提供主色系更换的[方案](https://github.com/ant-tool/xtool/tree/master/examples/customize-antd-theme)。[#384](https://github.com/ant-design/ant-design/issues/384) - 添加[色彩换算工具](http://ant.design/spec/colors#色彩换算工具)。 - 添加布局和导航规范,以及[常用布局](http://ant.design/spec/layout/)。 - 文档支持标题和演示的锚点,方便分享文档和演示代码。 diff --git a/README-zh_CN.md b/README-zh_CN.md index b5d2d544e6..b1d6832375 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -48,7 +48,7 @@ npm install antd - [首页](http://ant.design/) - [React UI 库](http://ant.design/docs/introduce) -- [构建调试工具](https://github.com/ant-design/antd-bin) +- [构建调试工具](https://github.com/ant-tool/xtool/) - [开发计划](https://github.com/ant-design/ant-design/issues/9) - [修改记录](CHANGELOG.md) - [React 组件](http://react-component.github.io/) diff --git a/README.md b/README.md index cb83687af7..1128b05381 100644 --- a/README.md +++ b/README.md @@ -44,12 +44,12 @@ Normal browsers and Internet Explorer 8+. - [Home page](http://ant.design/) - [React UI library](http://ant.design/docs/introduce) -- [Build/Debug tools](https://github.com/ant-design/antd-bin) +- [Build/Debug tools](https://github.com/ant-tool/xtool/) - [Roadmap](https://github.com/ant-design/ant-design/issues/9) - [ChangeLog](CHANGELOG.md) - [React components](http://react-component.github.io/) -- [React style guide](https://github.com/react-component/react-component.github.io/blob/master/docs/en-US/component-code-style.md) -- [React component design guide](https://github.com/react-component/react-component.github.io/blob/master/docs/en-US/component-design.md) +- [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) - [Developer Instruction](https://github.com/ant-design/ant-design/wiki/%E7%BD%91%E7%AB%99%E5%92%8C%E7%BB%84%E4%BB%B6%E5%BC%80%E5%8F%91%E8%AF%B4%E6%98%8E) - [Versioning Release Note](https://github.com/ant-design/ant-design/wiki/%E7%89%88%E6%9C%AC%E5%8F%91%E5%B8%83%E6%B5%81%E7%A8%8B) diff --git a/docs/getting-started.md b/docs/getting-started.md index 188bdb2da2..cb5ac7f5ce 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-design/antd-bin#使用说明)。 +[更多使用说明](https://github.com/ant-tool/xtool/#使用说明)。 ### 2. 创建一个项目 @@ -131,8 +131,11 @@ Ant Design React 支持所有的现代浏览器和 IE8+。 ## 自行构建 -如果想自己维护工作流,我们推荐使用 [webpack](http://webpack.github.io/) 进行构建和调试,可以参考我们所使用的 [webpack 配置](https://github.com/ant-design/antd-build/blob/master/lib/webpack.common.config.js)。 +如果想自己维护工作流,我们推荐使用 [webpack](http://webpack.github.io/) 进行构建和调试,可以参考我们所使用的 [webpack 配置](https://github.com/ant-tool/atool-build/blob/master/src/getWebpackCommonConfig.js)。 +### 改变主色系 + +- [演示](https://github.com/ant-tool/xtool/tree/master/examples/customize-antd-theme)。 ## 小甜点 diff --git a/docs/install.md b/docs/install.md index a6e8060e0d..591f27044f 100644 --- a/docs/install.md +++ b/docs/install.md @@ -51,7 +51,7 @@ $ npm install antd-bin --save-dev } ``` -> 更多[使用方式](https://github.com/ant-design/antd-bin/)。 +> 更多[使用方式](https://github.com/ant-tool/xtool/)。 From aed50b2cc0b509aa58103c5011af61a4a49b2803 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 5 Dec 2015 01:03:08 +0800 Subject: [PATCH 5/9] update docs --- components/select/index.md | 19 ++++++++++--------- docs/getting-started.md | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/components/select/index.md b/components/select/index.md index 7511833d7b..5f477dcee8 100644 --- a/components/select/index.md +++ b/components/select/index.md @@ -28,14 +28,15 @@ | defaultValue | 指定默认选中的条目 | string/Array | 无 | | multiple | 支持多选 | boolean | false | | filterOption | 是否根据输入项进行筛选 | boolean | true | -| tags | 可以把随意输入的条目作为tag,输入项不需要与下拉选项匹配 | boolean |false | -| onSelect | 被选中时调用,参数为选中的option value值 | function(value, option) | 无 | -| onDeselect | 取消选中时调用,参数为选中的option value值,仅在multiple或tags模式下生效 | function(value, option) | 无 | -| onChange | 选中option,或input的value变化(combobox模式下)时,调用此函数 | function(value, label) | 无 | +| tags | 可以把随意输入的条目作为 tag,输入项不需要与下拉选项匹配 | boolean |false | +| onSelect | 被选中时调用,参数为选中项的 value 值 | function(value, option) | 无 | +| onDeselect | 取消选中时调用,参数为选中项的 option value 值,仅在 multiple 或 tags 模式下生效 | function(value, option) | 无 | +| onChange | 选中option,或input的value变化(combobox 模式下)时,调用此函数 | function(value, label) | 无 | | allowClear | 显示清除按钮 | boolean | false | | onSearch | 文本框值变化时回调 | function(value: String) | | | placeholder | 选择框默认文字 | string | 无 | | searchPlaceholder | 搜索框默认文字 | string | 无 | +| dropdownMatchSelectWidth | 下拉菜单和选择器同宽 | boolean | false | | optionFilterProp | 输入项过滤对应的 option 属性 | string | value | | combobox | 输入框自动提示模式 | boolean | false | | size | 选择框大小,可选 `large` `small` | String | default | @@ -47,12 +48,12 @@ | 参数 | 说明 | 类型 | 默认值 | |----------|----------------|----------|--------------| | disabled | 是否禁用 | Boolean | false | -| key | 如果react需要你设置此项,此项值与value的值相同,然后可以省略value设置 | String | | +| key | 如果 react 需要你设置此项,此项值与 value 的值相同,然后可以省略 value 设置 | String | | | value | 默认根据此属性值进行筛选 | String | - | ### OptGroup props -| 参数 | 说明 | 类型 | 默认值 | -|----------|----------------|----------|--------------| -| label | 组名 | String/React.Element | 无 | -| key | | String | - | +| 参数 | 说明 | 类型 | 默认值 | +|----------|----------------|----------|-----------------| +| label | 组名 | String/React.Element | 无 | +| key | | String | - | diff --git a/docs/getting-started.md b/docs/getting-started.md index cb5ac7f5ce..54debb70a3 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -135,7 +135,7 @@ Ant Design React 支持所有的现代浏览器和 IE8+。 ### 改变主色系 -- [演示](https://github.com/ant-tool/xtool/tree/master/examples/customize-antd-theme)。 +- [配置代码示例](https://github.com/ant-tool/xtool/tree/master/examples/customize-antd-theme) ## 小甜点 From 84b23d6b11772f2e66c2678be5510a239f78da0f Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 5 Dec 2015 13:07:17 +0800 Subject: [PATCH 6/9] fix demo ajax page change --- components/table/demo/ajax.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/components/table/demo/ajax.md b/components/table/demo/ajax.md index 21d69d0eff..c6ac0b8aa8 100644 --- a/components/table/demo/ajax.md +++ b/components/table/demo/ajax.md @@ -74,14 +74,18 @@ const Test = React.createClass({ // 使用受控属性 current,方便外部设置页数 const pagination = this.state.pagination; pagination.current = page; - this.setState({ pagination }); + this.setState({ + pagination, + dataSource: dataSource.clone(), + }); }, refresh() { // 回到第一页 const pagination = this.state.pagination; pagination.current = 1; this.setState({ - dataSource: dataSource.clone() + pagination, + dataSource: dataSource.clone(), }); }, changeAndRefresh() { @@ -90,10 +94,10 @@ const Test = React.createClass({ pagination.current = 1; // 可以修改原来的 dataSource 再发请求 this.setState({ + pagination, dataSource: dataSource.clone({ data: { city: 'hz' } }), - pagination, }); }, render() { From edeec8e503fd69a8c3be1178acb6a7241a278bdb Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 6 Dec 2015 17:40:04 +0800 Subject: [PATCH 7/9] update document --- README-zh_CN.md | 20 +++++++++----------- README.md | 12 ++++++++---- docs/introduce.md | 8 +++----- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/README-zh_CN.md b/README-zh_CN.md index b1d6832375..53317e8dae 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -1,20 +1,18 @@ +

+ + + +

+ # Ant Design [![](https://img.shields.io/travis/ant-design/ant-design.svg?style=flat-square)](https://travis-ci.org/ant-design/ant-design) [![npm package](https://img.shields.io/npm/v/antd.svg?style=flat-square)](https://www.npmjs.org/package/antd) [![NPM downloads](http://img.shields.io/npm/dm/antd.svg?style=flat-square)](https://npmjs.org/package/antd) [![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) 一套企业级的 UI 设计语言和 React 实现。 -

- - - -

- ## 特性 -- 提炼自企业级后台产品的交互语言和视觉风格。 -- [React Component](http://react-component.github.io/badgeboard/) 基础上二次封装的丰富实用的 UI 组件。 -- 基于 React 的组件化开发模式。 -- 背靠 npm 生态圈。 -- 基于 webpack 的调试构建方案,支持 ES6。 +- 提炼和服务企业级中后台产品的交互语言和视觉风格。 +- [React Component](http://react-component.github.io/badgeboard/) 上精心封装的高质量 UI 库。 +- 基于 npm + webpack + babel 的工作流,支持 ES2015。 ## 安装 diff --git a/README.md b/README.md index 1128b05381..37ae1580b8 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +

+ + + +

+ # Ant Design [![](https://img.shields.io/travis/ant-design/ant-design.svg?style=flat-square)](https://travis-ci.org/ant-design/ant-design) [![npm package](https://img.shields.io/npm/v/antd.svg?style=flat-square)](https://www.npmjs.org/package/antd) [![NPM downloads](http://img.shields.io/npm/dm/antd.svg?style=flat-square)](https://npmjs.org/package/antd) [![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) An enterprise-class UI design language and React-based implementation. @@ -6,11 +12,9 @@ An enterprise-class UI design language and React-based implementation. ## Features -- An enterprise-class graphical design language and framework for financial applications +- An enterprise-class graphical design language and framework for financial applications. - Rich library of UI components base on [React Component](http://react-component.github.io/badgeboard/). -- A Component development model based on React. -- Backed by the npm ecosystem. -- webpack-based debug builds supporting ES6 +- A npm + webpack + babel workflow, supporting ES2015. ## Install diff --git a/docs/introduce.md b/docs/introduce.md index 2f31e232a1..b9687ebf2f 100644 --- a/docs/introduce.md +++ b/docs/introduce.md @@ -27,11 +27,9 @@ ## 特性 -- Designed as Ant Design. -- [React Component](http://react-component.github.io/badgeboard/) 上二次封装的丰富实用的 UI 组件。 -- 基于 React 的组件化开发模式。 -- 背靠 npm 生态圈。 -- 基于 webpack 的调试构建方案,支持 ES6。 +- Designed as Ant Design, 提炼和服务企业级中后台产品的交互语言和视觉风格> +- [React Component](http://react-component.github.io/badgeboard/) 上精心封装的高质量 UI 库。 +- 基于 npm + webpack + babel 的工作流,支持 ES2015。 ## 示例 From 16ce16ebd392a8f078830d21b57d3a1b5456955d Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 6 Dec 2015 17:41:09 +0800 Subject: [PATCH 8/9] update document --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 37ae1580b8..d1174b2a5f 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,6 @@ An enterprise-class UI design language and React-based implementation. -![](https://t.alipayobjects.com/images/rmsweb/T11aVgXc4eXXXXXXXX.svg) - ## Features - An enterprise-class graphical design language and framework for financial applications. From 1a4527944f89455d0eaadc4fe035c0cf0f680821 Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Mon, 7 Dec 2015 11:12:19 +0800 Subject: [PATCH 9/9] chore: remove useless `ref` property --- components/upload/uploadList.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/upload/uploadList.jsx b/components/upload/uploadList.jsx index 706b9e4fb5..584131d1ba 100644 --- a/components/upload/uploadList.jsx +++ b/components/upload/uploadList.jsx @@ -32,8 +32,7 @@ export default React.createClass({
{file.name} - +
{ progress }