From 3fb5d3c0abbdc869696ee1d425475fc417841c3e Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 16 Mar 2016 16:53:20 +0800 Subject: [PATCH 1/8] update changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20bc9ec74b..01afd44008 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,9 +16,9 @@ - Progress 的默认颜色固定,不再随着主色变化。 - 优化 Button 点击动画在 Chrome 下的效果。 - 修复一个 Affix 的 `z-index` 太低的问题。 -- 修复 Table 树形数据的二级节点前无法选择的问题。[#1212](https://github.com/ant-design/ant-design/issues/1212) +- 修复 Table 树形数据的二级节点列前无法选择的问题。[#1212](https://github.com/ant-design/ant-design/issues/1212) - 修复 Table 修改 `pageSize` 没有触发 `onChange` 的问题。[#1206](https://github.com/ant-design/ant-design/issues/1206) -- 修复 Table 指定 `rowKey 时导致 `rowSelection.onChange` 的 `selectedRows` 参数为空的问题。 +- 修复 Table 指定 `rowKey` 时导致 `rowSelection.onChange` 的 `selectedRows` 参数为空的问题。 - 修复一个 Affix 的 `z-index` 太低的问题。 ## 0.12.10 From dcd6c6f489650ad9f37379bfcb38c1eb05516077 Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 16 Mar 2016 19:04:15 +0800 Subject: [PATCH 2/8] fix changelog --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01afd44008..85ce26fd92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,6 @@ - 修复 Table 树形数据的二级节点列前无法选择的问题。[#1212](https://github.com/ant-design/ant-design/issues/1212) - 修复 Table 修改 `pageSize` 没有触发 `onChange` 的问题。[#1206](https://github.com/ant-design/ant-design/issues/1206) - 修复 Table 指定 `rowKey` 时导致 `rowSelection.onChange` 的 `selectedRows` 参数为空的问题。 -- 修复一个 Affix 的 `z-index` 太低的问题。 ## 0.12.10 From f66a257ab9c738746a662c8b569869a01f8227c4 Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 16 Mar 2016 20:17:35 +0800 Subject: [PATCH 3/8] update upload chinese name --- components/upload/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/upload/index.md b/components/upload/index.md index 6fba743b8f..a81217d52c 100644 --- a/components/upload/index.md +++ b/components/upload/index.md @@ -1,7 +1,7 @@ # Upload - category: Components -- chinese: 文件上传 +- chinese: 上传 - type: 表单 --- From d7f46a05b30057886a5f6d0f08530001166f829c Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 16 Mar 2016 22:06:02 +0800 Subject: [PATCH 4/8] update docs --- components/alert/index.jsx | 3 ++- components/alert/index.md | 2 +- components/popconfirm/demo/placement.md | 2 +- components/popconfirm/index.md | 2 +- components/tabs/index.md | 1 + 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/alert/index.jsx b/components/alert/index.jsx index 566718731e..ed3637d1e8 100644 --- a/components/alert/index.jsx +++ b/components/alert/index.jsx @@ -9,7 +9,8 @@ export default React.createClass({ return { prefixCls: 'ant-alert', showIcon: false, - onClose() {} + onClose() {}, + type: 'info', }; }, getInitialState() { diff --git a/components/alert/index.md b/components/alert/index.md index 3ea71340a7..ba0e1b9c22 100644 --- a/components/alert/index.md +++ b/components/alert/index.md @@ -17,7 +17,7 @@ | 参数 | 说明 | 类型 | 默认值 | |----------- |--------------------------------------------------------- | ---------- |-------| -| type | 必选参数,指定警告提示的样式,有四种选择`success`、`info`、`warn`、`error` | String | 无 | +| type | 必选参数,指定警告提示的样式,有四种选择`success`、`info`、`warn`、`error` | String | `info` | | closable | 可选参数,默认不显示关闭按钮 | Boolean | 无 | | closeText | 可选参数,自定义关闭按钮 | React.Node | 无 | | message | 必选参数,警告提示内容 | React.Node | 无 | diff --git a/components/popconfirm/demo/placement.md b/components/popconfirm/demo/placement.md index 3ce9735121..1f89c8d57e 100644 --- a/components/popconfirm/demo/placement.md +++ b/components/popconfirm/demo/placement.md @@ -2,7 +2,7 @@ - order: 1 -位置有四个方向。 +位置有十二个方向。 --- diff --git a/components/popconfirm/index.md b/components/popconfirm/index.md index 491d21135c..9cfd85810c 100644 --- a/components/popconfirm/index.md +++ b/components/popconfirm/index.md @@ -19,7 +19,7 @@ | 参数 | 说明 | 类型 | 默认值 | |-----------|------------------------------------------|---------------|--------| -| placement | 气泡框位置,可选 `top/left/right/bottom` | string | top | +| placement | 气泡框位置,可选 `top/left/right/bottom` `topLeft/topRight/bottomLeft/bottomRight` `leftTop/leftBottom/rightTop/rightBottom` | string | top | | title | 确认框的描述 | string | 无 | | onConfirm | 点击确认的回调 | function | 无 | | onCancel | 卡片内容 | function | 无 | diff --git a/components/tabs/index.md b/components/tabs/index.md index 1a0127b9f2..ace73874b0 100644 --- a/components/tabs/index.md +++ b/components/tabs/index.md @@ -30,6 +30,7 @@ Ant Design 依次提供了三级选项卡,分别用于不同的场景。 | onTabClick | tab 被点击的回调 | Function | 无 | | tabBarExtraContent | tab bar 上额外的元素 | React Node | 无 | | type | 页签的基本样式,可选 `line`、`card` `editable-card` 类型 | String | 'line' | +| size | 大小,提供 `default` 和 `small` 两种大小 | String | 'default' | | tabPosition | 页签位置,可选值有 `top` `right` `bottom` `left` | String | 'top' | | onEdit | 新增和删除页签的回调,在 `type="editable-card"` 时有效 | Function(targetKey, action) | 无 | From ab04ce30f7ff41b41f4c5c467890441b49cfb3e2 Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Thu, 17 Mar 2016 10:11:26 +0800 Subject: [PATCH 5/8] docs: update docs for getFieldProps, close: #1211 --- components/form/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/form/index.md b/components/form/index.md index d680a6de83..7b6bebe9fb 100644 --- a/components/form/index.md +++ b/components/form/index.md @@ -85,6 +85,8 @@ CustomizedForm = Form.create({})(CustomizedForm); #### this.props.form.getFieldProps(id, options) +`getFieldProps` 返回的属性包括 `id`、`value`(或你设置的其它 `valuePropName`)、`ref`、`onChange`(或者你设置的其它 `trigger` `validateTrigger`),所以不应再设置同样的属性,以免冲突。如果对其返回值的细节有兴趣,可以 `console.log` 出来查看。 + | 参数 | 说明 | 类型 | 可选值 |默认值 | |-----------|------------------------------------------|------------|-------|--------| | options.id | 必填输入控件唯一标志 | string | | | From 6c913d7ebe4bb27a0fb8351da9f288e12d89fd6d Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 17 Mar 2016 15:10:49 +0800 Subject: [PATCH 6/8] Fix popover and popconfirm arrow style --- components/popconfirm/index.jsx | 2 +- components/popover/index.jsx | 2 +- style/components/popover.less | 50 ++++++++++++++++----------------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/components/popconfirm/index.jsx b/components/popconfirm/index.jsx index 197d9bb724..726276bc8b 100644 --- a/components/popconfirm/index.jsx +++ b/components/popconfirm/index.jsx @@ -67,7 +67,7 @@ export default React.createClass({ const { title, okText, cancelText, placement, overlayStyle, trigger, ...restProps } = this.props; const overlay = (
-
+
{title}
diff --git a/components/popover/index.jsx b/components/popover/index.jsx index 730aef6c02..44aef07df2 100644 --- a/components/popover/index.jsx +++ b/components/popover/index.jsx @@ -52,7 +52,7 @@ const Popover = React.createClass({ return (
{this.props.title &&
{this.props.title}
} -
+
{this.props.overlay}
diff --git a/style/components/popover.less b/style/components/popover.less index de6f6c12dc..cf24939d73 100644 --- a/style/components/popover.less +++ b/style/components/popover.less @@ -93,7 +93,7 @@ color: #666; } - &-content { + &-inner-content { padding: 8px 16px; color: @text-color; } @@ -143,9 +143,9 @@ content: ""; } - &-placement-top > &-arrow, - &-placement-topLeft > &-arrow, - &-placement-topRight > &-arrow { + &-placement-top &-arrow, + &-placement-topLeft &-arrow, + &-placement-topRight &-arrow { border-bottom-width: 0; border-top-color: @popover-arrow-outer-color; bottom: 0; @@ -157,20 +157,20 @@ border-top-color: @popover-arrow-color; } } - &-placement-top > &-arrow { + &-placement-top &-arrow { left: 50%; margin-left: -@popover-arrow-outer-width; } - &-placement-topLeft > &-arrow { + &-placement-topLeft &-arrow { left: 16px; } - &-placement-topRight > &-arrow { + &-placement-topRight &-arrow { right: 16px; } - &-placement-right > &-arrow, - &-placement-rightTop > &-arrow, - &-placement-rightBottom > &-arrow { + &-placement-right &-arrow, + &-placement-rightTop &-arrow, + &-placement-rightBottom &-arrow { left: 0; border-left-width: 0; border-right-color: @popover-arrow-outer-color; @@ -182,20 +182,20 @@ border-right-color: @popover-arrow-color; } } - &-placement-right > &-arrow { + &-placement-right &-arrow { top: 50%; margin-top: -@popover-arrow-outer-width; } - &-placement-rightTop > &-arrow { + &-placement-rightTop &-arrow { top: 12px; } - &-placement-rightBottom > &-arrow { + &-placement-rightBottom &-arrow { bottom: 12px; } - &-placement-bottom > &-arrow, - &-placement-bottomLeft > &-arrow, - &-placement-bottomRight > &-arrow { + &-placement-bottom &-arrow, + &-placement-bottomLeft &-arrow, + &-placement-bottomRight &-arrow { border-top-width: 0; border-bottom-color: @popover-arrow-outer-color; top: 0; @@ -207,20 +207,20 @@ border-bottom-color: @popover-arrow-color; } } - &-placement-bottom > &-arrow { + &-placement-bottom &-arrow { left: 50%; margin-left: -@popover-arrow-outer-width; } - &-placement-bottomLeft > &-arrow { + &-placement-bottomLeft &-arrow { left: 16px; } - &-placement-bottomRight > &-arrow { + &-placement-bottomRight &-arrow { right: 16px; } - &-placement-left > &-arrow, - &-placement-leftTop > &-arrow, - &-placement-leftBottom > &-arrow { + &-placement-left &-arrow, + &-placement-leftTop &-arrow, + &-placement-leftBottom &-arrow { right: 0; border-right-width: 0; border-left-color: @popover-arrow-outer-color; @@ -232,14 +232,14 @@ bottom: -@popover-arrow-width; } } - &-placement-left > &-arrow { + &-placement-left &-arrow { top: 50%; margin-top: -@popover-arrow-outer-width; } - &-placement-leftTop > &-arrow { + &-placement-leftTop &-arrow { top: 12px; } - &-placement-leftBottom > &-arrow { + &-placement-leftBottom &-arrow { bottom: 12px; } } From 60cd7ed85e61bb742c9b0ab12104a3d2cf80b44e Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 17 Mar 2016 15:13:48 +0800 Subject: [PATCH 7/8] Fix current page when Table pageSize changed --- components/table/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/table/index.jsx b/components/table/index.jsx index 6ea2663f46..d87df967ab 100644 --- a/components/table/index.jsx +++ b/components/table/index.jsx @@ -456,7 +456,7 @@ let AntTable = React.createClass({ handleShowSizeChange(current, pageSize) { const pagination = this.state.pagination; pagination.onShowSizeChange(current, pageSize); - const nextPagination = { ...pagination, pageSize }; + const nextPagination = { ...pagination, pageSize, current }; this.setState({ pagination: nextPagination }); this.props.onChange(...this.prepareParamsArguments({ ...this.state, From 04f747770eea6006743715cfb919f4fe926ee4cd Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 18 Mar 2016 11:48:06 +0800 Subject: [PATCH 8/8] fix(docs), confirm demo & docs --- components/modal/demo/info.md | 9 +++++++-- components/modal/index.md | 3 ++- style/components/confirm.less | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/components/modal/demo/info.md b/components/modal/demo/info.md index 4a9eba35b1..a559b04646 100644 --- a/components/modal/demo/info.md +++ b/components/modal/demo/info.md @@ -12,8 +12,13 @@ import { Modal, Button } from 'antd'; function info() { Modal.info({ title: '这是一条通知信息', - content: '一些附加信息一些附加信息一些附加信息', - onOk() {} + content: ( +
+

一些附加信息一些附加信息一些附加信息

+

一些附加信息一些附加信息一些附加信息

+
+ ), + onOk() {}, }); } diff --git a/components/modal/index.md b/components/modal/index.md index 875f4e46d5..efeab06d36 100644 --- a/components/modal/index.md +++ b/components/modal/index.md @@ -31,7 +31,7 @@ | okText | 确认按钮文字 | String | 确定 | | cancelText | 取消按钮文字 | String | 取消 | | maskClosable | 点击蒙层是否允许关闭 | Boolean | true | -| align | 浮层自定义位置 | Object, [dom-align](https://github.com/yiminghe/dom-align) | 距离顶部 100px | +| align | 浮层自定义位置 | Object, [dom-align](https://github.com/yiminghe/dom-align) | 距离顶部 100px | ### Modal.xxx() @@ -47,6 +47,7 @@ | 参数 | 说明 | 类型 | 默认值 | |------------|----------------|------------------|--------------| | title | 标题 | React.Element or String | 无 | +| content | 内容 | React.Element or String | 无 | | onOk | 点击确定回调,参数为关闭函数,返回 promise 时 resolve 后自动关闭 | function | 无 | | onCancel | 取消回调,参数为关闭函数,返回 promise 时 resolve 后自动关闭 | function | 无 | | width | 宽度 | String or Number | 416 | diff --git a/style/components/confirm.less b/style/components/confirm.less index 19164b0378..9e98fcb725 100644 --- a/style/components/confirm.less +++ b/style/components/confirm.less @@ -21,6 +21,7 @@ margin-left: 37px; font-size: @font-size-base; color: @text-color; + margin-top: 8px; } .anticon {