From e18a330fbd85f80d21ca557aefef6c9aa85d1021 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 14 Feb 2017 11:54:52 +0800 Subject: [PATCH 01/88] Fix danger button click effect --- components/button/style/index.less | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/button/style/index.less b/components/button/style/index.less index 7982c9e3aa..d5bdf0d8ca 100644 --- a/components/button/style/index.less +++ b/components/button/style/index.less @@ -123,10 +123,14 @@ border-radius: inherit; border: 0 solid @primary-color; opacity: 0.4; - animation: buttonEffect 0.36s ease-out forwards; + animation: buttonEffect 0.48s ease-in-out forwards; display: block; } + &-danger&-clicked:after { + border-color: @btn-danger-bg; + } + &-background-ghost { background: transparent!important; border-color: #fff; From a0c1d22d920d78af19f5560eb15124d7083ed083 Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Tue, 14 Feb 2017 18:03:32 +0800 Subject: [PATCH 02/88] deps: upgrade bisheng --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b0d5a6bd0c..c40605b10d 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "babel-preset-es2015": "^6.18.0", "babel-preset-react": "^6.16.0", "babel-preset-stage-0": "^6.16.0", - "bisheng": "^0.21.0", + "bisheng": "^0.22.0", "bisheng-plugin-antd": "^0.11.0", "bisheng-plugin-description": "^0.1.1", "bisheng-plugin-react": "^0.4.0", From c296d1a9181775a63688cafccf73b2b780d6954b Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 14 Feb 2017 20:27:48 +0800 Subject: [PATCH 03/88] remove unused ant-select-show-search className, close #4859 --- .../__tests__/__snapshots__/demo.test.js.snap | 2 +- components/select/__tests__/__snapshots__/demo.test.js.snap | 2 +- components/select/demo/optgroup.md | 6 +++--- components/select/index.tsx | 2 -- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/components/locale-provider/__tests__/__snapshots__/demo.test.js.snap b/components/locale-provider/__tests__/__snapshots__/demo.test.js.snap index dd20609036..1187ad545c 100644 --- a/components/locale-provider/__tests__/__snapshots__/demo.test.js.snap +++ b/components/locale-provider/__tests__/__snapshots__/demo.test.js.snap @@ -126,7 +126,7 @@ exports[`test renders ./components/locale-provider/demo/all.md correctly 1`] = `
+ +
+ No Data
diff --git a/components/table/Table.tsx b/components/table/Table.tsx index 271ec58385..eb49ab8554 100755 --- a/components/table/Table.tsx +++ b/components/table/Table.tsx @@ -720,6 +720,7 @@ export default class Table extends React.Component, any> { let total = pagination.total || this.getLocalData().length; return (total > 0) ? extends React.Component, any> { } render() { - const { style, className, prefixCls, showHeader, ...restProps } = this.props; + const { style, className, prefixCls, showHeader, loading, ...restProps } = this.props; const data = this.getCurrentPageData(); let columns = this.renderRowSelection(); const expandIconAsCell = this.props.expandedRowRender && this.props.expandIconAsCell !== false; @@ -854,8 +855,9 @@ export default class Table extends React.Component, any> { expandIconColumnIndex = restProps.expandIconColumnIndex as number; } - let table = ( + const table = ( extends React.Component, any> { emptyText={() => locale.emptyText} /> ); + // if there is no pagination or no data, // the height of spin should decrease by half of pagination const paginationPatchClass = (this.hasPagination() && data && data.length !== 0) - ? `${prefixCls}-with-pagination` - : `${prefixCls}-without-pagination`; - const spinClassName = this.props.loading ? `${paginationPatchClass} ${prefixCls}-spin-holder` : ''; - return ( -
- + ? `${prefixCls}-with-pagination` : `${prefixCls}-without-pagination`; + + const tableWithSpin = loading ? ( + {table} {this.renderPagination()} - + + ) : [table, this.renderPagination()]; + + return ( +
+ {tableWithSpin}
); } diff --git a/components/table/__tests__/__snapshots__/Table.filter.test.js.snap b/components/table/__tests__/__snapshots__/Table.filter.test.js.snap index eaf63d0b45..36f540c5b9 100644 --- a/components/table/__tests__/__snapshots__/Table.filter.test.js.snap +++ b/components/table/__tests__/__snapshots__/Table.filter.test.js.snap @@ -14,87 +14,81 @@ exports[`Table.filter renders custom content correctly 1`] = ` exports[`Table.filter renders filter correctly 1`] = `
+ class="">
+ class="ant-table ant-table-large ant-table-scroll-position-left">
+ class="ant-table-content">
-
+ class=""> +
- -
- - - - - - - - - - - - - - - - - - - - - - - -
- - Name - - -
- - Jack -
- - Lucy -
- - Tom -
- - Jerry -
-
-
+ class="ant-table-body"> + + + + + + + + + + + + + + + + + + + + + + + +
+ + Name + + +
+ + Jack +
+ + Lucy +
+ + Tom +
+ + Jerry +
-
+
diff --git a/components/table/__tests__/__snapshots__/Table.pagination.test.js.snap b/components/table/__tests__/__snapshots__/Table.pagination.test.js.snap index 6eabf0a940..b1d6a64b0e 100644 --- a/components/table/__tests__/__snapshots__/Table.pagination.test.js.snap +++ b/components/table/__tests__/__snapshots__/Table.pagination.test.js.snap @@ -1,93 +1,87 @@ exports[`Table.pagination renders pagination correctly 1`] = `
+ class="">
+ class="ant-table ant-table-large ant-table-scroll-position-left">
+ class="ant-table-content">
-
+ class=""> +
- -
- - - - - - - - - - - - - - - - - -
- - Name - -
- - Jack -
- - Lucy -
-
-
+ class="ant-table-body"> + + + + + + + + + + + + + + + + + +
+ + Name + +
+ + Jack +
+ + Lucy +
-
+
-
+
`; diff --git a/components/table/__tests__/__snapshots__/Table.test.js.snap b/components/table/__tests__/__snapshots__/Table.test.js.snap index bc12148e0d..3e637c0346 100644 --- a/components/table/__tests__/__snapshots__/Table.test.js.snap +++ b/components/table/__tests__/__snapshots__/Table.test.js.snap @@ -1,103 +1,97 @@ exports[`Table renders JSX correctly 1`] = `
+ class="">
+ class="ant-table ant-table-large ant-table-scroll-position-left">
+ class="ant-table-content">
-
+ class=""> +
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Name - - - - Age - -
- - First Name - - - - Last Name - -
- - John - - Brown - - 32 -
- - Jim - - Green - - 42 -
-
-
+ class="ant-table-body"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Name + + + + Age + +
+ + First Name + + + + Last Name + +
+ + John + + Brown + + 32 +
+ + Jim + + Green + + 42 +
-
+
diff --git a/components/table/__tests__/__snapshots__/demo.test.js.snap b/components/table/__tests__/__snapshots__/demo.test.js.snap index ada84dffac..f06d3b70fd 100644 --- a/components/table/__tests__/__snapshots__/demo.test.js.snap +++ b/components/table/__tests__/__snapshots__/demo.test.js.snap @@ -1,83 +1,77 @@ exports[`test renders ./components/table/demo/ajax.md correctly 1`] = `
+ class="">
+ class="ant-table ant-table-large ant-table-empty ant-table-scroll-position-left">
+ class="ant-table-content">
-
+ class=""> +
- -
- - - - - - - - - - + + + + + +
- - Name -
- - - - - - -
-
-
- - Gender + class="ant-table-body"> + + + + + + + + + - - - - -
+ + Name +
+ + class="anticon anticon-caret-up" /> -
- - Email + + -
- -
-
- - - 暂无数据 - -
+ + +
+ + Gender + + + + + Email + +
+
+
+ + + 暂无数据 +
@@ -87,749 +81,725 @@ exports[`test renders ./components/table/demo/ajax.md correctly 1`] = ` exports[`test renders ./components/table/demo/basic.md correctly 1`] = `
`; exports[`test renders ./components/table/demo/bordered.md correctly 1`] = `
+ class=""> `; exports[`test renders ./components/table/demo/colspan-rowspan.md correctly 1`] = ` `; exports[`test renders ./components/table/demo/custom-filter-panel.md correctly 1`] = ` `; @@ -1108,753 +1078,747 @@ exports[`test renders ./components/table/demo/dynamic-settings.md correctly 1`]
+ class="">
+ class="ant-table ant-table-default ant-table-scroll-position-left">
+ class="ant-table-title"> + Here is title +
+
-
- Here is title -
-
+ class=""> +
- -
- - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + +
- - - - - - - Name - - - - Age - - - - Address - - - - Action - -
+ class="ant-table-body"> + + + + + + + + + + + + - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - -
+ + + - - - - - - John Brown - - - 12 - - New York No. 1 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
+ + + + + + Name + + + + Age + + + + Address + + + + Action + +
+ + + + - - - - - - John Brown - - - 22 - - New York No. 2 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
+ + + + + John Brown + + + 12 + + New York No. 1 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
+ + + + - - - - - - John Brown - - - 32 - - New York No. 3 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
+ + + + + John Brown + + + 22 + + New York No. 2 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
+ + + + - - - - - - John Brown - - - 42 - - New York No. 4 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
+ + + + + John Brown + + + 32 + + New York No. 3 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
+ + + + - - - - - - John Brown - - - 52 - - New York No. 5 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
+ + + + + John Brown + + + 42 + + New York No. 4 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
+ + + + - - - - - - John Brown - - - 62 - - New York No. 6 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
+ + + + + John Brown + + + 52 + + New York No. 5 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
+ + + + - - - - - - John Brown - - - 72 - - New York No. 7 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
+ + + + + John Brown + + + 62 + + New York No. 6 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
+ + + + - - - - - - John Brown - - - 82 - - New York No. 8 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
+ + + + + John Brown + + + 72 + + New York No. 7 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
+ + + + - - - - - - John Brown - - - 92 - - New York No. 9 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
+ + + + + John Brown + + + 82 + + New York No. 8 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
+ + + + - - - - - - John Brown - - - 102 - - New York No. 10 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
- - - + + +
+ + John Brown + + + 92 + + New York No. 9 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
+ + + + + + + + John Brown + + + 102 + + New York No. 10 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
+
+
-
+
`; @@ -1869,4921 +1833,4855 @@ exports[`test renders ./components/table/demo/edit-cell.md correctly 1`] = `
`; exports[`test renders ./components/table/demo/edit-row.md correctly 1`] = ` `; exports[`test renders ./components/table/demo/expand.md correctly 1`] = ` `; exports[`test renders ./components/table/demo/expand-children.md correctly 1`] = `
+ class="">
+ class="ant-table ant-table-large ant-table-scroll-position-left">
+ class="ant-table-content">
-
+ class=""> +
- -
- - - - - - - - - - + + + + +
- - + class="ant-table-body"> + + + + + + + + + + - + + + + + + + + + + + + + + + + + + - - - - + + + + + + - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + - - Name + + + + + Name + + + + Age + + + + Address + +
+ + - - Age + + + + + + + John Brown sr. + + 60 + + New York No. 1 Lake Park +
- - + + + + + + John Brown jr. + + 30 + + New York No. 3 Lake Park +
+ + - 72 - - London No. 1 Lake Park -
- - - - - - - Joe Black - - 32 - - Sidney No. 1 Lake Park -
- -
+ + + +
+ + + Joe Black + + 32 + + Sidney No. 1 Lake Park +
-
+
-
+
`; exports[`test renders ./components/table/demo/fixed-columns.md correctly 1`] = `
+ class="">
+ class="ant-table ant-table-large ant-table-scroll-position-left">
+ class="ant-table-content">
-
+ class="ant-table-fixed-left"> +
- -
-
- - - - - - - - - - - - - - - - - - - - - -
- - Full Name - - - - Age - -
- - John Brown - - 32 -
- - Jim Green - - 40 -
-
-
-
+ class="ant-table-body-outer"> +
+ + + + + + + + + + + + + + + + + + + + + +
+ + Full Name + + + + Age + +
+ + John Brown + + 32 +
+ + Jim Green + + 40 +
+
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Full Name - - - - Age - - - - Column 1 - - - - Column 2 - - - - Column 3 - - - - Column 4 - - - - Column 5 - - - - Column 6 - - - - Column 7 - - - - Column 8 - - - - Action - -
- - John Brown - - 32 - - New York Park - - New York Park - - New York Park - - New York Park - - New York Park - - New York Park - - New York Park - - New York Park - - - action - -
- - Jim Green - - 40 - - London Park - - London Park - - London Park - - London Park - - London Park - - London Park - - London Park - - London Park - - - action - -
-
-
-
-
- -
-
- - - - - - - - - - - - - - - - - -
- - Action - -
- - action - -
- - action - -
-
-
-
-
-
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Full Name + + + + Age + + + + Column 1 + + + + Column 2 + + + + Column 3 + + + + Column 4 + + + + Column 5 + + + + Column 6 + + + + Column 7 + + + + Column 8 + + + + Action + +
+ + John Brown + + 32 + + New York Park + + New York Park + + New York Park + + New York Park + + New York Park + + New York Park + + New York Park + + New York Park + + + action + +
+ + Jim Green + + 40 + + London Park + + London Park + + London Park + + London Park + + London Park + + London Park + + London Park + + London Park + + + action + +
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + +
+ + Action + +
+ + action + +
+ + action + +
+
+
+
-
+
`; exports[`test renders ./components/table/demo/fixed-columns-header.md correctly 1`] = `
+ class="">
+ class="ant-table ant-table-large ant-table-fixed-header ant-table-scroll-position-left">
+ class="ant-table-content">
-
+ class="ant-table-fixed-left"> +
- -
- - - - - - - - - - - -
- - Full Name - - - - Age - -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Edrward 0 - - 32 -
- - Edrward 1 - - 32 -
- - Edrward 2 - - 32 -
- - Edrward 3 - - 32 -
- - Edrward 4 - - 32 -
- - Edrward 5 - - 32 -
- - Edrward 6 - - 32 -
- - Edrward 7 - - 32 -
- - Edrward 8 - - 32 -
- - Edrward 9 - - 32 -
-
-
-
+ class="ant-table-header"> + + + + + + + + + + + +
+ + Full Name + + + + Age + +
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Full Name - - - - Age - - - - Column 1 - - - - Column 2 - - - - Column 3 - - - - Column 4 - - - - Column 5 - - - - Column 6 - - - - Column 7 - - - - Column 8 - - - - Action - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Edrward 0 - - 32 - - London Park no. 0 - - London Park no. 0 - - London Park no. 0 - - London Park no. 0 - - London Park no. 0 - - London Park no. 0 - - London Park no. 0 - - London Park no. 0 - - - action - -
- - Edrward 1 - - 32 - - London Park no. 1 - - London Park no. 1 - - London Park no. 1 - - London Park no. 1 - - London Park no. 1 - - London Park no. 1 - - London Park no. 1 - - London Park no. 1 - - - action - -
- - Edrward 2 - - 32 - - London Park no. 2 - - London Park no. 2 - - London Park no. 2 - - London Park no. 2 - - London Park no. 2 - - London Park no. 2 - - London Park no. 2 - - London Park no. 2 - - - action - -
- - Edrward 3 - - 32 - - London Park no. 3 - - London Park no. 3 - - London Park no. 3 - - London Park no. 3 - - London Park no. 3 - - London Park no. 3 - - London Park no. 3 - - London Park no. 3 - - - action - -
- - Edrward 4 - - 32 - - London Park no. 4 - - London Park no. 4 - - London Park no. 4 - - London Park no. 4 - - London Park no. 4 - - London Park no. 4 - - London Park no. 4 - - London Park no. 4 - - - action - -
- - Edrward 5 - - 32 - - London Park no. 5 - - London Park no. 5 - - London Park no. 5 - - London Park no. 5 - - London Park no. 5 - - London Park no. 5 - - London Park no. 5 - - London Park no. 5 - - - action - -
- - Edrward 6 - - 32 - - London Park no. 6 - - London Park no. 6 - - London Park no. 6 - - London Park no. 6 - - London Park no. 6 - - London Park no. 6 - - London Park no. 6 - - London Park no. 6 - - - action - -
- - Edrward 7 - - 32 - - London Park no. 7 - - London Park no. 7 - - London Park no. 7 - - London Park no. 7 - - London Park no. 7 - - London Park no. 7 - - London Park no. 7 - - London Park no. 7 - - - action - -
- - Edrward 8 - - 32 - - London Park no. 8 - - London Park no. 8 - - London Park no. 8 - - London Park no. 8 - - London Park no. 8 - - London Park no. 8 - - London Park no. 8 - - London Park no. 8 - - - action - -
- - Edrward 9 - - 32 - - London Park no. 9 - - London Park no. 9 - - London Park no. 9 - - London Park no. 9 - - London Park no. 9 - - London Park no. 9 - - London Park no. 9 - - London Park no. 9 - - - action - -
-
-
+ class="ant-table-body-outer" + style="height:300px;"> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Edrward 0 + + 32 +
+ + Edrward 1 + + 32 +
+ + Edrward 2 + + 32 +
+ + Edrward 3 + + 32 +
+ + Edrward 4 + + 32 +
+ + Edrward 5 + + 32 +
+ + Edrward 6 + + 32 +
+ + Edrward 7 + + 32 +
+ + Edrward 8 + + 32 +
+ + Edrward 9 + + 32 +
+
-
- -
- - - - - - - - - -
- - Action - -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - action - -
- - action - -
- - action - -
- - action - -
- - action - -
- - action - -
- - action - -
- - action - -
- - action - -
- - action - -
-
-
-
-
-
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Full Name + + + + Age + + + + Column 1 + + + + Column 2 + + + + Column 3 + + + + Column 4 + + + + Column 5 + + + + Column 6 + + + + Column 7 + + + + Column 8 + + + + Action + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Edrward 0 + + 32 + + London Park no. 0 + + London Park no. 0 + + London Park no. 0 + + London Park no. 0 + + London Park no. 0 + + London Park no. 0 + + London Park no. 0 + + London Park no. 0 + + + action + +
+ + Edrward 1 + + 32 + + London Park no. 1 + + London Park no. 1 + + London Park no. 1 + + London Park no. 1 + + London Park no. 1 + + London Park no. 1 + + London Park no. 1 + + London Park no. 1 + + + action + +
+ + Edrward 2 + + 32 + + London Park no. 2 + + London Park no. 2 + + London Park no. 2 + + London Park no. 2 + + London Park no. 2 + + London Park no. 2 + + London Park no. 2 + + London Park no. 2 + + + action + +
+ + Edrward 3 + + 32 + + London Park no. 3 + + London Park no. 3 + + London Park no. 3 + + London Park no. 3 + + London Park no. 3 + + London Park no. 3 + + London Park no. 3 + + London Park no. 3 + + + action + +
+ + Edrward 4 + + 32 + + London Park no. 4 + + London Park no. 4 + + London Park no. 4 + + London Park no. 4 + + London Park no. 4 + + London Park no. 4 + + London Park no. 4 + + London Park no. 4 + + + action + +
+ + Edrward 5 + + 32 + + London Park no. 5 + + London Park no. 5 + + London Park no. 5 + + London Park no. 5 + + London Park no. 5 + + London Park no. 5 + + London Park no. 5 + + London Park no. 5 + + + action + +
+ + Edrward 6 + + 32 + + London Park no. 6 + + London Park no. 6 + + London Park no. 6 + + London Park no. 6 + + London Park no. 6 + + London Park no. 6 + + London Park no. 6 + + London Park no. 6 + + + action + +
+ + Edrward 7 + + 32 + + London Park no. 7 + + London Park no. 7 + + London Park no. 7 + + London Park no. 7 + + London Park no. 7 + + London Park no. 7 + + London Park no. 7 + + London Park no. 7 + + + action + +
+ + Edrward 8 + + 32 + + London Park no. 8 + + London Park no. 8 + + London Park no. 8 + + London Park no. 8 + + London Park no. 8 + + London Park no. 8 + + London Park no. 8 + + London Park no. 8 + + + action + +
+ + Edrward 9 + + 32 + + London Park no. 9 + + London Park no. 9 + + London Park no. 9 + + London Park no. 9 + + London Park no. 9 + + London Park no. 9 + + London Park no. 9 + + London Park no. 9 + + + action + +
+
+
+
+
+ +
+ + + + + + + + + +
+ + Action + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + action + +
+ + action + +
+ + action + +
+ + action + +
+ + action + +
+ + action + +
+ + action + +
+ + action + +
+ + action + +
+ + action + +
+
+
+
-
+
`; exports[`test renders ./components/table/demo/fixed-header.md correctly 1`] = `
+ class="">
+ class="ant-table ant-table-large ant-table-fixed-header ant-table-scroll-position-left">
+ class="ant-table-content">
-
+ class="ant-table-scroll"> +
- -
- - - - - - - - - - - - - -
- - Name - - - - Age - - - - Address - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Edward King 0 - - 32 - - London, Park Lane no. 0 -
- - Edward King 1 - - 32 - - London, Park Lane no. 1 -
- - Edward King 2 - - 32 - - London, Park Lane no. 2 -
- - Edward King 3 - - 32 - - London, Park Lane no. 3 -
- - Edward King 4 - - 32 - - London, Park Lane no. 4 -
- - Edward King 5 - - 32 - - London, Park Lane no. 5 -
- - Edward King 6 - - 32 - - London, Park Lane no. 6 -
- - Edward King 7 - - 32 - - London, Park Lane no. 7 -
- - Edward King 8 - - 32 - - London, Park Lane no. 8 -
- - Edward King 9 - - 32 - - London, Park Lane no. 9 -
- - Edward King 10 - - 32 - - London, Park Lane no. 10 -
- - Edward King 11 - - 32 - - London, Park Lane no. 11 -
- - Edward King 12 - - 32 - - London, Park Lane no. 12 -
- - Edward King 13 - - 32 - - London, Park Lane no. 13 -
- - Edward King 14 - - 32 - - London, Park Lane no. 14 -
- - Edward King 15 - - 32 - - London, Park Lane no. 15 -
- - Edward King 16 - - 32 - - London, Park Lane no. 16 -
- - Edward King 17 - - 32 - - London, Park Lane no. 17 -
- - Edward King 18 - - 32 - - London, Park Lane no. 18 -
- - Edward King 19 - - 32 - - London, Park Lane no. 19 -
- - Edward King 20 - - 32 - - London, Park Lane no. 20 -
- - Edward King 21 - - 32 - - London, Park Lane no. 21 -
- - Edward King 22 - - 32 - - London, Park Lane no. 22 -
- - Edward King 23 - - 32 - - London, Park Lane no. 23 -
- - Edward King 24 - - 32 - - London, Park Lane no. 24 -
- - Edward King 25 - - 32 - - London, Park Lane no. 25 -
- - Edward King 26 - - 32 - - London, Park Lane no. 26 -
- - Edward King 27 - - 32 - - London, Park Lane no. 27 -
- - Edward King 28 - - 32 - - London, Park Lane no. 28 -
- - Edward King 29 - - 32 - - London, Park Lane no. 29 -
- - Edward King 30 - - 32 - - London, Park Lane no. 30 -
- - Edward King 31 - - 32 - - London, Park Lane no. 31 -
- - Edward King 32 - - 32 - - London, Park Lane no. 32 -
- - Edward King 33 - - 32 - - London, Park Lane no. 33 -
- - Edward King 34 - - 32 - - London, Park Lane no. 34 -
- - Edward King 35 - - 32 - - London, Park Lane no. 35 -
- - Edward King 36 - - 32 - - London, Park Lane no. 36 -
- - Edward King 37 - - 32 - - London, Park Lane no. 37 -
- - Edward King 38 - - 32 - - London, Park Lane no. 38 -
- - Edward King 39 - - 32 - - London, Park Lane no. 39 -
- - Edward King 40 - - 32 - - London, Park Lane no. 40 -
- - Edward King 41 - - 32 - - London, Park Lane no. 41 -
- - Edward King 42 - - 32 - - London, Park Lane no. 42 -
- - Edward King 43 - - 32 - - London, Park Lane no. 43 -
- - Edward King 44 - - 32 - - London, Park Lane no. 44 -
- - Edward King 45 - - 32 - - London, Park Lane no. 45 -
- - Edward King 46 - - 32 - - London, Park Lane no. 46 -
- - Edward King 47 - - 32 - - London, Park Lane no. 47 -
- - Edward King 48 - - 32 - - London, Park Lane no. 48 -
- - Edward King 49 - - 32 - - London, Park Lane no. 49 -
-
-
+ class="ant-table-header"> + + + + + + + + + + + + + +
+ + Name + + + + Age + + + + Address + +
-
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Edward King 0 + + 32 + + London, Park Lane no. 0 +
+ + Edward King 1 + + 32 + + London, Park Lane no. 1 +
+ + Edward King 2 + + 32 + + London, Park Lane no. 2 +
+ + Edward King 3 + + 32 + + London, Park Lane no. 3 +
+ + Edward King 4 + + 32 + + London, Park Lane no. 4 +
+ + Edward King 5 + + 32 + + London, Park Lane no. 5 +
+ + Edward King 6 + + 32 + + London, Park Lane no. 6 +
+ + Edward King 7 + + 32 + + London, Park Lane no. 7 +
+ + Edward King 8 + + 32 + + London, Park Lane no. 8 +
+ + Edward King 9 + + 32 + + London, Park Lane no. 9 +
+ + Edward King 10 + + 32 + + London, Park Lane no. 10 +
+ + Edward King 11 + + 32 + + London, Park Lane no. 11 +
+ + Edward King 12 + + 32 + + London, Park Lane no. 12 +
+ + Edward King 13 + + 32 + + London, Park Lane no. 13 +
+ + Edward King 14 + + 32 + + London, Park Lane no. 14 +
+ + Edward King 15 + + 32 + + London, Park Lane no. 15 +
+ + Edward King 16 + + 32 + + London, Park Lane no. 16 +
+ + Edward King 17 + + 32 + + London, Park Lane no. 17 +
+ + Edward King 18 + + 32 + + London, Park Lane no. 18 +
+ + Edward King 19 + + 32 + + London, Park Lane no. 19 +
+ + Edward King 20 + + 32 + + London, Park Lane no. 20 +
+ + Edward King 21 + + 32 + + London, Park Lane no. 21 +
+ + Edward King 22 + + 32 + + London, Park Lane no. 22 +
+ + Edward King 23 + + 32 + + London, Park Lane no. 23 +
+ + Edward King 24 + + 32 + + London, Park Lane no. 24 +
+ + Edward King 25 + + 32 + + London, Park Lane no. 25 +
+ + Edward King 26 + + 32 + + London, Park Lane no. 26 +
+ + Edward King 27 + + 32 + + London, Park Lane no. 27 +
+ + Edward King 28 + + 32 + + London, Park Lane no. 28 +
+ + Edward King 29 + + 32 + + London, Park Lane no. 29 +
+ + Edward King 30 + + 32 + + London, Park Lane no. 30 +
+ + Edward King 31 + + 32 + + London, Park Lane no. 31 +
+ + Edward King 32 + + 32 + + London, Park Lane no. 32 +
+ + Edward King 33 + + 32 + + London, Park Lane no. 33 +
+ + Edward King 34 + + 32 + + London, Park Lane no. 34 +
+ + Edward King 35 + + 32 + + London, Park Lane no. 35 +
+ + Edward King 36 + + 32 + + London, Park Lane no. 36 +
+ + Edward King 37 + + 32 + + London, Park Lane no. 37 +
+ + Edward King 38 + + 32 + + London, Park Lane no. 38 +
+ + Edward King 39 + + 32 + + London, Park Lane no. 39 +
+ + Edward King 40 + + 32 + + London, Park Lane no. 40 +
+ + Edward King 41 + + 32 + + London, Park Lane no. 41 +
+ + Edward King 42 + + 32 + + London, Park Lane no. 42 +
+ + Edward King 43 + + 32 + + London, Park Lane no. 43 +
+ + Edward King 44 + + 32 + + London, Park Lane no. 44 +
+ + Edward King 45 + + 32 + + London, Park Lane no. 45 +
+ + Edward King 46 + + 32 + + London, Park Lane no. 46 +
+ + Edward King 47 + + 32 + + London, Park Lane no. 47 +
+ + Edward King 48 + + 32 + + London, Park Lane no. 48 +
+ + Edward King 49 + + 32 + + London, Park Lane no. 49 +
+
+
-
+
`; exports[`test renders ./components/table/demo/grouping-columns.md correctly 1`] = `
+ class="">
+ class="ant-table ant-table-middle ant-table-bordered ant-table-fixed-header ant-table-scroll-position-left">
+ class="ant-table-content">
-
+ class="ant-table-fixed-left"> +
- -
- - - - - - - - - -
- - Name - - -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - John Brown -
- - John Brown -
- - John Brown -
- - John Brown -
- - John Brown -
- - John Brown -
- - John Brown -
- - John Brown -
- - John Brown -
- - John Brown -
-
-
-
+ class="ant-table-header"> + + + + + + + + + +
+ + Name + + +
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Name - - - - - Other - - - - Company - - - - Gender - -
- - Age -
- - - - - - -
-
-
- - Address - - - - Company Address - - - - Company Name - -
- - Street - - - - Block - -
- - Building - - - - Door No. - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - John Brown - - 1 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co - - M -
- - John Brown - - 2 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co - - M -
- - John Brown - - 3 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co - - M -
- - John Brown - - 4 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co - - M -
- - John Brown - - 5 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co - - M -
- - John Brown - - 6 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co - - M -
- - John Brown - - 7 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co - - M -
- - John Brown - - 8 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co - - M -
- - John Brown - - 9 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co - - M -
- - John Brown - - 10 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co - - M -
-
-
+ class="ant-table-body-outer" + style="height:240px;"> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + John Brown +
+ + John Brown +
+ + John Brown +
+ + John Brown +
+ + John Brown +
+ + John Brown +
+ + John Brown +
+ + John Brown +
+ + John Brown +
+ + John Brown +
+
-
- -
- - - - - - - - - -
- - Gender - -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- M -
- M -
- M -
- M -
- M -
- M -
- M -
- M -
- M -
- M -
-
-
-
-
-
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Name + + + + + Other + + + + Company + + + + Gender + +
+ + Age +
+ + + + + + +
+
+
+ + Address + + + + Company Address + + + + Company Name + +
+ + Street + + + + Block + +
+ + Building + + + + Door No. + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + John Brown + + 1 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
+ + John Brown + + 2 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
+ + John Brown + + 3 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
+ + John Brown + + 4 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
+ + John Brown + + 5 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
+ + John Brown + + 6 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
+ + John Brown + + 7 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
+ + John Brown + + 8 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
+ + John Brown + + 9 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
+ + John Brown + + 10 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
+
+
+
+
+ +
+ + + + + + + + + +
+ + Gender + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ M +
+ M +
+ M +
+ M +
+ M +
+ M +
+ M +
+ M +
+ M +
+ M +
+
+
+
-
+
`; exports[`test renders ./components/table/demo/head.md correctly 1`] = `
+ class=""> `; exports[`test renders ./components/table/demo/jsx.md correctly 1`] = ` `; exports[`test renders ./components/table/demo/nested-table.md correctly 1`] = ` `; @@ -6814,453 +6712,441 @@ exports[`test renders ./components/table/demo/reset-filter.md correctly 1`] = `
`; exports[`test renders ./components/table/demo/row-selection.md correctly 1`] = `
+ class="">
+ class="ant-table ant-table-large ant-table-scroll-position-left">
+ class="ant-table-content">
-
+ class=""> +
- -
- - - - - - - - - - - - - - - - - - - + + + + + + + + + + + +
- - - - - - Name - - - - Age - - - - Address - -
- - - - + class="ant-table-body"> + + + + + + + + + + - - - - - + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - -
+ + - 32 - - London, Park Lane no. 0 -
- - + class="ant-checkbox"> + + - + + + + + + Name + + + + Age + + + + Address + +
+ + - 32 - - London, Park Lane no. 1 -
- - + class="ant-checkbox"> + + - + + + + + Edward King 0 + + 32 + + London, Park Lane no. 0 +
+ + - 32 - - London, Park Lane no. 2 -
- - + class="ant-checkbox"> + + - + + + + + Edward King 1 + + 32 + + London, Park Lane no. 1 +
+ + - 32 - - London, Park Lane no. 3 -
- - + class="ant-checkbox"> + + - + + + + + Edward King 2 + + 32 + + London, Park Lane no. 2 +
+ + - 32 - - London, Park Lane no. 4 -
- - + class="ant-checkbox"> + + - + + + + + Edward King 3 + + 32 + + London, Park Lane no. 3 +
+ + - 32 - - London, Park Lane no. 5 -
- - + class="ant-checkbox"> + + - + + + + + Edward King 4 + + 32 + + London, Park Lane no. 4 +
+ + - 32 - - London, Park Lane no. 6 -
- - + class="ant-checkbox"> + + - + + + + + Edward King 5 + + 32 + + London, Park Lane no. 5 +
+ + - 32 - - London, Park Lane no. 7 -
- - + class="ant-checkbox"> + + - + + + + + Edward King 6 + + 32 + + London, Park Lane no. 6 +
+ + - 32 - - London, Park Lane no. 8 -
- - + class="ant-checkbox"> + + - + + + + + Edward King 7 + + 32 + + London, Park Lane no. 7 +
+ + - 32 - - London, Park Lane no. 9 -
- - + class="ant-checkbox"> + + + + + +
+ + Edward King 8 + + 32 + + London, Park Lane no. 8 +
+ + + + + + Edward King 9 + + 32 + + London, Park Lane no. 9 +
-
+
-
+
`; @@ -7751,271 +7631,259 @@ exports[`test renders ./components/table/demo/size.md correctly 1`] = ` Middle size table

Small size table

`; From 144393c48a0a4a11434657c468bb26e0197454e3 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 16 Feb 2017 15:00:22 +0800 Subject: [PATCH 27/88] demo: update menu sider demo --- components/menu/demo/sider.md | 18 ++++++------------ components/style/core/motion.less | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/components/menu/demo/sider.md b/components/menu/demo/sider.md index 963d8fe0c8..403e6b3a1a 100755 --- a/components/menu/demo/sider.md +++ b/components/menu/demo/sider.md @@ -19,31 +19,24 @@ const SubMenu = Menu.SubMenu; const MenuItemGroup = Menu.ItemGroup; const Sider = React.createClass({ - getInitialState() { - return { - current: '1', - }; - }, handleClick(e) { console.log('click ', e); - this.setState({ - current: e.key, - }); }, render() { return ( - Navigation One}> - + Option 1 Option 2 - + Option 3 Option 4 @@ -66,5 +59,6 @@ const Sider = React.createClass({ ); }, }); + ReactDOM.render(, mountNode); ```` diff --git a/components/style/core/motion.less b/components/style/core/motion.less index 121692ef00..eebf4914d2 100644 --- a/components/style/core/motion.less +++ b/components/style/core/motion.less @@ -10,6 +10,6 @@ .ant-motion-collapse { overflow: hidden; &-active { - transition: height .2s @ease-out; + transition: height .2s ease-out; } } From d22ce9cd507d9217d126843e214c8a68607042b6 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 16 Feb 2017 15:35:52 +0800 Subject: [PATCH 28/88] Improve menu and collapse style details --- components/collapse/style/index.less | 22 +++++++++++++--------- components/menu/style/index.less | 5 +++++ components/style/core/motion.less | 2 +- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/components/collapse/style/index.less b/components/collapse/style/index.less index 7330baddaa..636cb238cd 100644 --- a/components/collapse/style/index.less +++ b/components/collapse/style/index.less @@ -4,15 +4,15 @@ @collapse-prefix-cls: ~"@{ant-prefix}-collapse"; .collapse-close() { - .iconfont-size-under-12px(7px, 270deg); + .iconfont-size-under-12px(9px, 0); } .collapse-open() { - .iconfont-size-under-12px(7px, 360deg); + .iconfont-size-under-12px(9px, 90deg); } .@{collapse-prefix-cls} { background-color: @background-color-base; - border-radius: 3px; + border-radius: @border-radius-base; border: @border-width-base @border-style-base @border-color-base; border-bottom: 0; @@ -25,18 +25,22 @@ color: @text-color; cursor: pointer; position: relative; + transition: all .3s; + + &:active { + background-color: #eee!important; + } .arrow { .collapse-close(); .iconfont-mixin(); position: absolute; - color: @text-color; + color: @text-color-secondary; display: inline-block; - margin-right: 8px; + font-weight: bold; line-height: 40px; - content: "\e606"; vertical-align: middle; - transition: transform 0.24s ease; + transition: transform 0.24s; top: 0; left: 16px; /* stylelint-disable declaration-block-no-duplicate-properties */ @@ -44,7 +48,7 @@ left: ~"0 \9"; /* stylelint-enable declaration-block-no-duplicate-properties */ &:before { - content: "\e606"; + content: "\E61F"; } } } @@ -72,7 +76,7 @@ &-item:last-child { > .@{collapse-prefix-cls}-content { - border-radius: 0 0 3px 3px; + border-radius: 0 0 @border-radius-base @border-radius-base; } } diff --git a/components/menu/style/index.less b/components/menu/style/index.less index b5bc9d8b9d..4b73443aab 100644 --- a/components/menu/style/index.less +++ b/components/menu/style/index.less @@ -38,6 +38,11 @@ transition: all 0.3s ease; } + &-item:active, + &-submenu-title:active { + background: @primary-1; + } + &-submenu &-sub { cursor: initial; } diff --git a/components/style/core/motion.less b/components/style/core/motion.less index eebf4914d2..ac4887271d 100644 --- a/components/style/core/motion.less +++ b/components/style/core/motion.less @@ -10,6 +10,6 @@ .ant-motion-collapse { overflow: hidden; &-active { - transition: height .2s ease-out; + transition: height .24s ease-in; } } From d1678711a71462c099ff5a7f0ccbdb8f15d147e4 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 16 Feb 2017 16:25:42 +0800 Subject: [PATCH 29/88] docs: update footer --- site/theme/en-US.js | 7 ++++- site/theme/static/footer.less | 2 +- site/theme/template/Layout/Footer.jsx | 40 ++++++++++++++++++++------- site/theme/zh-CN.js | 9 ++++-- 4 files changed, 44 insertions(+), 14 deletions(-) diff --git a/site/theme/en-US.js b/site/theme/en-US.js index 6c38e2f73e..37c8907a83 100644 --- a/site/theme/en-US.js +++ b/site/theme/en-US.js @@ -27,6 +27,8 @@ module.exports = { 'app.home.sub-slogan': 'A Little Happiness in Hand', 'app.home.vision': 'This is a design language dedicated to improve the user and design experience.', 'app.footer.repo': 'Repository', + 'app.footer.awesome': 'Awesome Ant Design', + 'app.footer.customize-theme': 'Customize Theme', 'app.footer.scaffold': 'Scaffold', 'app.footer.dev-tools': 'Developer Tools', 'app.footer.dva': 'Framework', @@ -35,10 +37,13 @@ module.exports = { 'app.footer.data-vis': 'Data Visualization', 'app.footer.motion': 'Motion Soluction', 'app.footer.antd-library': 'Axure library', - 'app.footer.material': 'Sitemap Template', + 'app.footer.antux': 'Sitemap Template', 'app.footer.community': 'Community', 'app.footer.change-log': 'Change Log', + 'app.footer.faq': 'FAQ', 'app.footer.feedback': 'Feedback', + 'app.footer.stackoverflow': 'StackOverflow', + 'app.footer.segmentfault': 'SegmentFault', 'app.footer.discuss': 'Chat Room', 'app.footer.bug-report': 'Bug Report', 'app.footer.version': 'Version: ', diff --git a/site/theme/static/footer.less b/site/theme/static/footer.less index c5bdcc082a..93dcc7c3bf 100644 --- a/site/theme/static/footer.less +++ b/site/theme/static/footer.less @@ -31,7 +31,7 @@ footer ul li > h2 { left: -22px; top: 3px; color: #aaa; - } + } } footer ul li > div { diff --git a/site/theme/template/Layout/Footer.jsx b/site/theme/template/Layout/Footer.jsx index 2569112b57..f467ee2e1f 100644 --- a/site/theme/template/Layout/Footer.jsx +++ b/site/theme/template/Layout/Footer.jsx @@ -68,14 +68,14 @@ class Footer extends React.Component {
- dva - + + +
- dva-cli - - -
-
  • @@ -85,6 +85,13 @@ class Footer extends React.Component { -
  • +
    + dva - +
    +
    + dva-cli - + +
    AntV - @@ -103,7 +110,7 @@ class Footer extends React.Component {
    Ant UX - - +
  • @@ -114,8 +121,8 @@ class Footer extends React.Component {
  • @@ -128,9 +135,22 @@ class Footer extends React.Component {
    +
    + + + +
    +
    + + + +
  • -
    ©2016
    +

    Copyright © 2017

    +
    + +
    Built with BiSheng
  • diff --git a/site/theme/zh-CN.js b/site/theme/zh-CN.js index f2583d5b34..37ba57b623 100644 --- a/site/theme/zh-CN.js +++ b/site/theme/zh-CN.js @@ -27,6 +27,8 @@ module.exports = { 'app.home.sub-slogan': '微小·确定·幸福', 'app.home.vision': '这是一套致力于提升『用户』和『设计者』使用体验的中后台设计语言。', 'app.footer.repo': '仓库', + 'app.footer.awesome': 'Awesome Ant Design', + 'app.footer.customize-theme': '定制主题', 'app.footer.scaffold': '脚手架', 'app.footer.dev-tools': '开发工具', 'app.footer.dva': '应用框架', @@ -35,11 +37,14 @@ module.exports = { 'app.footer.data-vis': '数据可视化', 'app.footer.motion': '设计动效', 'app.footer.antd-library': 'Axure 部件库', - 'app.footer.material': '页面逻辑素材', + 'app.footer.antux': '页面逻辑素材', 'app.footer.community': '社区', 'app.footer.change-log': '更新记录', + 'app.footer.faq': '常见问题', 'app.footer.feedback': '反馈和建议', - 'app.footer.discuss': '讨论', + 'app.footer.stackoverflow': 'StackOverflow', + 'app.footer.segmentfault': 'SegmentFault', + 'app.footer.discuss': '在线讨论', 'app.footer.bug-report': '报告 Bug', 'app.footer.version': '文档版本:', 'app.footer.author': '蚂蚁金服体验技术部出品', From 6002a3351e13fca7112314a6e369e4d446827dd3 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 16 Feb 2017 16:26:53 +0800 Subject: [PATCH 30/88] update docs --- docs/practice/cases.en-US.md | 12 ++++++------ docs/practice/cases.zh-CN.md | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/practice/cases.en-US.md b/docs/practice/cases.en-US.md index 8105ab979c..3a51c973ea 100644 --- a/docs/practice/cases.en-US.md +++ b/docs/practice/cases.en-US.md @@ -5,11 +5,11 @@ title: Cases Ant Design is a design language for enterprise-like complex UIs. -Starting in April 2015, more and more products of Ant Financial follow Ant Design specification, covering multiple business lines and more than 40 systems. +Starting in April 2015, more and more products of Ant Financial follow Ant Design specification, covering multiple business lines and more than 300 applications. Designed for enterprise-like complex UIs, used by both professional and non-professional designers, Ant Design has a low learning curve that helps you getting started fast and achieve rapid results. - -With a strong focus on proof-based design and user experience, + +With a strong focus on proof-based design and user experience, Ant Design provides a complete front-end development solution that can greatly enhance the design and development efficiency. Currently, there are many products and sites using Ant Design. @@ -53,7 +53,7 @@ OceanBase Cloud is a distributed relational database in a real sense, but OceanB -Experience Platform is used for collecting all the points of contact and information of the user (including microblogging and other channels). +Experience Platform is used for collecting all the points of contact and information of the user (including microblogging and other channels). Through data mining, it exposes the users's experience and it helps the company's internal business team / product managers, facilitating the experience problem solving, in order to achieve healthy functioning streams.

    Website

    @@ -66,8 +66,8 @@ Through data mining, it exposes the users's experience and it helps the company' -AntV is a graphical library that is based on the work of a data group team -whose results of exploring data visualization were summarized +AntV is a graphical library that is based on the work of a data group team +whose results of exploring data visualization were summarized and shared them together with the required data visualization theory.

    Website

    diff --git a/docs/practice/cases.zh-CN.md b/docs/practice/cases.zh-CN.md index 7335f583fc..ca341602ab 100644 --- a/docs/practice/cases.zh-CN.md +++ b/docs/practice/cases.zh-CN.md @@ -5,7 +5,7 @@ title: 实践案例 Ant Design 是面向中台的 UI 设计语言。 -从 2015 年 4 月起,Ant Design 在蚂蚁金服中后台产品线迅速推广,对接多条业务线,覆盖系统 40 个以上。定位于中台业务的 Ant Design 兼顾专业和非专业的设计人员,具有学习成本低、上手速度快、实现效果好等特点,并且提供从界面设计到前端开发的全链路生态,可以大大提升设计和开发的效率。 +从 2015 年 4 月起,Ant Design 在蚂蚁金服中后台产品线迅速推广,对接多条业务线,覆盖系统 300 个以上。定位于中台业务的 Ant Design 兼顾专业和非专业的设计人员,具有学习成本低、上手速度快、实现效果好等特点,并且提供从界面设计到前端开发的全链路生态,可以大大提升设计和开发的效率。 Ant Design 目前在外部也有 [许多产品实践](https://github.com/ant-design/ant-design/issues/477),如果你的公司和产品从中受益,欢迎留言。 From c4ac91906790c94f67c7d637d601e47110b3b356 Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Thu, 16 Feb 2017 16:30:16 +0800 Subject: [PATCH 31/88] fix: Menu.Item border width should not show animation --- components/menu/style/index.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/menu/style/index.less b/components/menu/style/index.less index 4b73443aab..e367c09edb 100644 --- a/components/menu/style/index.less +++ b/components/menu/style/index.less @@ -116,7 +116,7 @@ &-vertical { border-right: @border-width-base @border-style-base @border-color-split; .@{menu-prefix-cls}-item { - border-right: @border-width-base @border-style-base @border-color-split; + border-right: 3px @border-style-base transparent; margin-left: -1px; left: 1px; position: relative; @@ -134,7 +134,7 @@ &-inline { .@{menu-prefix-cls}-selected, .@{menu-prefix-cls}-item-selected { - border-right: 3px solid @primary-color; + border-right-color: @primary-color; transform: translateZ(0); } } From 49b050ccc148b4c8c516a7bec78e6d661d109fe8 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 16 Feb 2017 17:07:49 +0800 Subject: [PATCH 32/88] Improve button and badge[status] with pulse animation --- components/badge/style/index.less | 2 +- components/button/style/index.less | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/components/badge/style/index.less b/components/badge/style/index.less index e370767b71..b4b16c74b2 100644 --- a/components/badge/style/index.less +++ b/components/badge/style/index.less @@ -68,7 +68,7 @@ width: 100%; height: 100%; border-radius: 50%; - background-color: @primary-color; + border: 1px solid @primary-color; content: ''; animation: antStatusProcessing 1.2s infinite ease-in-out; } diff --git a/components/button/style/index.less b/components/button/style/index.less index 80e9913487..0d69260a1f 100644 --- a/components/button/style/index.less +++ b/components/button/style/index.less @@ -122,9 +122,9 @@ bottom: -1px; right: -1px; border-radius: inherit; - border: 0 solid @primary-color; + border: 1.5px solid @primary-color; opacity: 0.4; - animation: buttonEffect 0.48s ease-in-out forwards; + animation: buttonEffect 0.4s ease-in-out forwards; display: block; } @@ -150,6 +150,5 @@ left: -6px; bottom: -6px; right: -6px; - border-width: 6px; } } From 477e1500752afe4cfc35ef94aa6110741ef218d8 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 16 Feb 2017 17:31:08 +0800 Subject: [PATCH 33/88] Fix some SubMenu style bug, close #4906 --- components/menu/style/index.less | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/components/menu/style/index.less b/components/menu/style/index.less index e367c09edb..dc78fcc27e 100644 --- a/components/menu/style/index.less +++ b/components/menu/style/index.less @@ -124,10 +124,19 @@ } } - &-vertical &-sub { + &-vertical&-sub { border-right: 0; .@{menu-prefix-cls}-item { border-right: 0; + margin-left: 0; + left: 0; + } + > .@{menu-prefix-cls}-item:first-child { + border-radius: @border-radius-base @border-radius-base 0 0; + } + > .@{menu-prefix-cls}-item:last-child, + > .@{menu-prefix-cls}-item-group:last-child > .@{menu-prefix-cls}-item-group-list:last-child > .@{menu-prefix-cls}-item:last-child { + border-radius: 0 0 @border-radius-base @border-radius-base; } } From 8cfdf68f75acc7fb1045de56ce862025d92f73c8 Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Thu, 16 Feb 2017 17:32:06 +0800 Subject: [PATCH 34/88] deps: upgrade bisheng-plugin-react --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c40605b10d..f93560ae6f 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "bisheng": "^0.22.0", "bisheng-plugin-antd": "^0.11.0", "bisheng-plugin-description": "^0.1.1", - "bisheng-plugin-react": "^0.4.0", + "bisheng-plugin-react": "^0.5.0", "bisheng-plugin-toc": "^0.4.0", "coveralls": "^2.11.15", "cross-env": "^3.1.4", From 74028f6e4826e6280da4d0e799d0424732bf9fb8 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 16 Feb 2017 17:56:15 +0800 Subject: [PATCH 35/88] Fix pop menu padding --- components/menu/style/index.less | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/menu/style/index.less b/components/menu/style/index.less index dc78fcc27e..b341096f2e 100644 --- a/components/menu/style/index.less +++ b/components/menu/style/index.less @@ -290,7 +290,7 @@ &-item-group-list { & > .@{menu-prefix-cls}-item, & > .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title { - padding: 0 16px 0 28px; + padding: 0 16px; font-size: @font-size-base; line-height: 42px; height: 42px; @@ -299,6 +299,13 @@ } } + &-item-group-list { + & > .@{menu-prefix-cls}-item, + & > .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title { + padding: 0 16px 0 28px; + } + } + &-vertical&-sub { padding: 0; transform-origin: 0 0; From 989792ed9b9a81521de7646ac8a674be2bb47ed0 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 16 Feb 2017 21:24:17 +0800 Subject: [PATCH 36/88] simplify less code --- components/menu/style/index.less | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/components/menu/style/index.less b/components/menu/style/index.less index b341096f2e..dd1ec46bba 100644 --- a/components/menu/style/index.less +++ b/components/menu/style/index.less @@ -286,10 +286,9 @@ } &-vertical, - &-inline, - &-item-group-list { - & > .@{menu-prefix-cls}-item, - & > .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title { + &-inline { + .@{menu-prefix-cls}-item, + .@{menu-prefix-cls}-submenu-title { padding: 0 16px; font-size: @font-size-base; line-height: 42px; @@ -300,8 +299,8 @@ } &-item-group-list { - & > .@{menu-prefix-cls}-item, - & > .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title { + .@{menu-prefix-cls}-item, + .@{menu-prefix-cls}-submenu-title { padding: 0 16px 0 28px; } } From 94e81386390d4c3e45b2d5d95e2b4cd635dade7a Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 16 Feb 2017 21:55:03 +0800 Subject: [PATCH 37/88] adjust spin style --- components/spin/style/index.less | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/spin/style/index.less b/components/spin/style/index.less index c303d2656e..29d68e146e 100644 --- a/components/spin/style/index.less +++ b/components/spin/style/index.less @@ -75,8 +75,8 @@ &-blur { opacity: 0.7; - -webkit-filter: blur(1px); - filter: blur(1px); + -webkit-filter: blur(0.8px); + filter: blur(0.8px); /* IE6~IE9 */ filter: ~"progid\:DXImageTransform\.Microsoft\.Blur(PixelRadius\=1, MakeShadow\=false)"; // lesshint duplicateProperty: false @@ -91,7 +91,9 @@ right: 0; top: 0; bottom: 0; - background: transparent; + background: #fff; + opacity: 0.2; + transition: all .3s; } } From bace209d52a8fb256e25f519ce90d8e84a80d193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Fri, 17 Feb 2017 00:06:00 +0800 Subject: [PATCH 38/88] Update CHANGELOG.zh-CN.md --- CHANGELOG.zh-CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 551764b8f1..440f274402 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -10,7 +10,7 @@ timeline: true #### 发布周期 * patch 版本:每周末会进行日常 bugfix 更新。(如果有紧急的 bugfix,则任何时候都可发布) -* minor 版本:每月发布一个带有新特性的版本。 +* minor 版本:每月发布一个带有新特性的向下兼容的版本。 * 大版本号:含有破坏性更新和新特性,不在发布周期内。 如果需要查看 `2.0.0` 之前的更新日志,请移步 [GitHub](https://github.com/ant-design/ant-design/blob/1.x-stable/CHANGELOG.md)。 From df3617ddede397950ca77b874bbd81e2e62c5840 Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 17 Feb 2017 00:59:11 +0800 Subject: [PATCH 39/88] docs: improve API table layout --- components/tree-select/index.en-US.md | 4 ++-- components/tree-select/index.zh-CN.md | 4 ++-- components/tree/index.en-US.md | 14 +++++++------- components/tree/index.zh-CN.md | 14 +++++++------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/components/tree-select/index.en-US.md b/components/tree-select/index.en-US.md index 75ff2c5460..cba439a428 100644 --- a/components/tree-select/index.en-US.md +++ b/components/tree-select/index.en-US.md @@ -18,8 +18,8 @@ Any data whose entries are defined in a hierarchical manner is fit to use this c Property | Description | Type | Default -----|-----|-----|------ -value | To set the current selected treeNode(s). | __Default:__ string\|string[]. __With `labelInValue` set:__ { value: string, label: ReactNode }/Array<{ value: string, label: ReactNode }>. __With `treeCheckStrictly` set(`halfChecked` is set to `false`):__ { value: string, label: ReactNode, halfChecked: string[] }/Array<{ value: string, label: ReactNode, halfChecked: string[] }>. | - -labelInValue | Determine whether to put `label` into `value`, the type of `value` as specified in the above | boolean | false +value | To set the current selected treeNode(s). | string\|string[] | - +labelInValue | whether to embed label in value, turn the format of value from `string` to `{key: string, label: ReactNode, halfChecked: string[]} | boolean | false defaultValue | To set the initial selected treeNode(s). | string\|string[] | - multiple | Support multiple or not, will be `true` when enable `treeCheckable`. | boolean | false onSelect | A callback function, can be executed when you select a treeNode. | function(value, node, extra) | - diff --git a/components/tree-select/index.zh-CN.md b/components/tree-select/index.zh-CN.md index 0a43d30ceb..92a79775b2 100644 --- a/components/tree-select/index.zh-CN.md +++ b/components/tree-select/index.zh-CN.md @@ -17,8 +17,8 @@ title: TreeSelect | 参数 | 说明 | 类型 | 默认值 | |-----------|------------------------------------------|------------|--------| -| value | 指定当前选中的条目 | 通常: string/string[]. 设置 labelInValue: { value: string, label: ReactNode }/Array<{ value: string, label: ReactNode }>. 设置 treeCheckStrictly(halfChecked 默认为 false): { value: string, label: ReactNode, halfChecked: string[] }/Array<{ value: string, label: ReactNode, halfChecked: string[] }>. | - | -| labelInValue | 是否把 label 嵌入到 value 里,设置后参考以上 value 类型写法 | boolean | false | +| value | 指定当前选中的条目 | string/string[] | - | +| labelInValue | 是否把每个选项的 label 包装到 value 中,会把 value 类型从 `string` 变为 `{key: string, label: ReactNode, halfChecked(treeCheckStrictly 时有效): string[] }` 的格式 | boolean | false | | defaultValue | 指定默认选中的条目 | string/string[] | - | | multiple | 支持多选(当设置 treeCheckable 时自动变为true) | boolean | false | | onSelect | 被选中时调用 | function(value, node, extra) | - | diff --git a/components/tree/index.en-US.md b/components/tree/index.en-US.md index 5061f1de60..d099c7bcbb 100644 --- a/components/tree/index.en-US.md +++ b/components/tree/index.en-US.md @@ -21,7 +21,7 @@ Directory, organization, biological classification, country, and etc. Almost thi |expandedKeys |(controlled) Specifies keys of expanded treeNodes | string[] | [] | |autoExpandParent | Whether to automatically expand a parent treeNode | boolean | true | |defaultCheckedKeys | Specifies keys of default checked treeNodes | string[] | [] | -|checkedKeys |(controlled) Specifies keys of checked treeNodes(PS: When specifies a key of treeNode which is a parent treeNode, all children treeNodes of its will be checked; And vice versa, when specifies a key of treeNode which is a child treeNode, its parent treeNode will also be checked. When `checkable` and `checkStrictly` is true, it'a object has `checked` and `halfChecked` property, and no matter child treeNode or parent treeNode is checked, they won't impact on eachother. | string[]/{checked:string[],halfChecked:string[]} | [] | +|checkedKeys |(controlled) Specifies keys of checked treeNodes(PS: When specifies a key of treeNode which is a parent treeNode, all children treeNodes of its will be checked; And vice versa, when specifies a key of treeNode which is a child treeNode, its parent treeNode will also be checked. When `checkable` and `checkStrictly` is true, it'a object has `checked` and `halfChecked` property, and no matter child treeNode or parent treeNode is checked, they won't impact on eachother. | string[] \| {checked: string[], halfChecked: string[]} | [] | |checkStrictly| Check treeNode precisely, parent treeNode and children treeNodes are not associated | boolean | false | |defaultSelectedKeys | Specifies keys of default selected treeNodes | string[] | [] | |selectedKeys |(controlled) Specifies keys of selected treeNode | string[] | - | @@ -30,13 +30,13 @@ Directory, organization, biological classification, country, and etc. Almost thi |onSelect | The callback will be invoked when the user clicks a treeNode | function(selectedKeys, e:{selected: bool, selectedNodes, node, event}) | - | |filterTreeNode | Defines a function to filter treeNodes(highlight),when return true, corresponding treeNode will be highlight | function(node) | - | |loadData | load data asynchronously | function(node)| - | -|onRightClick | The call back will be invoked when the user right clicks a treeNode | function({event,node}) | - | +|onRightClick | The call back will be invoked when the user right clicks a treeNode | function({event, node}) | - | |draggable | Specifies whether this Tree is draggable(IE>8) | boolean | false | -|onDragStart | Defines a function will be called when the onDragStart event occurs | function({event,node}) | - | -|onDragEnter | Defines a function will be called when the onDragEnter event occurs | function({event,node,expandedKeys}) | - | -|onDragOver | Defines a function will be called when the onDragOver event occurs | function({event,node}) | - | -|onDragLeave | Defines a function will be called when the onDragLeave event occurs | function({event,node}) | - | -|onDragEnd | Defines a function will be called when the onDragEnd event occurs | function({event,node}) | - | +|onDragStart | Defines a function will be called when the onDragStart event occurs | function({event, node}) | - | +|onDragEnter | Defines a function will be called when the onDragEnter event occurs | function({event, node, expandedKeys}) | - | +|onDragOver | Defines a function will be called when the onDragOver event occurs | function({event, node}) | - | +|onDragLeave | Defines a function will be called when the onDragLeave event occurs | function({event, node}) | - | +|onDragEnd | Defines a function will be called when the onDragEnd event occurs | function({event, node}) | - | |onDrop | Defines a function will be called when the onDrop event occurs | function({event, node, dragNode, dragNodesKeys}) | - | ### TreeNode props diff --git a/components/tree/index.zh-CN.md b/components/tree/index.zh-CN.md index c4a4f33fd4..d4c948f51e 100644 --- a/components/tree/index.zh-CN.md +++ b/components/tree/index.zh-CN.md @@ -22,7 +22,7 @@ subtitle: 树形控件 |expandedKeys | (受控)展开指定的树节点 | string[] | [] | |autoExpandParent | 是否自动展开父节点 | boolean | true | |defaultCheckedKeys | 默认选中复选框的树节点 | string[] | [] | -|checkedKeys | (受控)选中复选框的树节点(注意:父子节点有关联,如果传入父节点key,则子节点自动选中;相应当子节点key都传入,父节点也自动选中。当设置`checkable`和`checkStrictly`,它是一个有`checked`和`halfChecked`属性的对象,并且父子节点的选中与否不再关联 | string[]\|{checked:string[],halfChecked:string[]} | [] | +|checkedKeys | (受控)选中复选框的树节点(注意:父子节点有关联,如果传入父节点key,则子节点自动选中;相应当子节点key都传入,父节点也自动选中。当设置`checkable`和`checkStrictly`,它是一个有`checked`和`halfChecked`属性的对象,并且父子节点的选中与否不再关联 | string[] \| {checked: string[], halfChecked: string[]} | [] | |checkStrictly| checkable状态下节点选择完全受控(父子节点选中状态不再关联)| boolean | false | |defaultSelectedKeys | 默认选中的树节点 | string[] | [] | |selectedKeys | (受控)设置选中的树节点 | string[] | - | @@ -31,13 +31,13 @@ subtitle: 树形控件 |onSelect | 点击树节点触发 | function(selectedKeys, e:{selected: bool, selectedNodes, node, event}) | - | |filterTreeNode | 按需筛选树节点(高亮),返回true | function(node) | - | |loadData | 异步加载数据 | function(node)| - | -|onRightClick | 响应右键点击 | function({event,node}) | - | +|onRightClick | 响应右键点击 | function({event, node}) | - | |draggable | 设置节点可拖拽(IE>8) | boolean | false | -|onDragStart | 开始拖拽时调用 | function({event,node}) | - | -|onDragEnter | dragenter 触发时调用 | function({event,node,expandedKeys}) | - | -|onDragOver | dragover 触发时调用 | function({event,node}) | - | -|onDragLeave | dragleave 触发时调用 | function({event,node}) | - | -|onDragEnd | dragend 触发时调用 | function({event,node}) | - | +|onDragStart | 开始拖拽时调用 | function({event, node}) | - | +|onDragEnter | dragenter 触发时调用 | function({event, node, expandedKeys}) | - | +|onDragOver | dragover 触发时调用 | function({event, node}) | - | +|onDragLeave | dragleave 触发时调用 | function({event, node}) | - | +|onDragEnd | dragend 触发时调用 | function({event, node}) | - | |onDrop | drop 触发时调用 | function({event, node, dragNode, dragNodesKeys}) | - | ### TreeNode props From 58afe5f729a695f495d7354ff50d154d58df1a21 Mon Sep 17 00:00:00 2001 From: Wei Zhu Date: Fri, 17 Feb 2017 09:36:42 +0800 Subject: [PATCH 40/88] fix: build dist with locales (#4910) --- index-with-locales.js | 11 +++++++++++ webpack.config.js | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 index-with-locales.js diff --git a/index-with-locales.js b/index-with-locales.js new file mode 100644 index 0000000000..3ea9a69054 --- /dev/null +++ b/index-with-locales.js @@ -0,0 +1,11 @@ +const antd = require('./components'); +const req = require.context('./components', true, /^\.\/locale-provider\/.+_.+\.tsx$/); + +antd.locales = {}; + +req.keys().forEach((mod) => { + const match = mod.match(/\/([^/]+).tsx$/); + antd.locales[match[1]] = req(mod); +}); + +module.exports = antd; diff --git a/webpack.config.js b/webpack.config.js index 7079938c9d..c5fcd0f32e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -18,12 +18,22 @@ function es3ify(webpackConfig) { }); } +function addLocales(webpackConfig) { + let packageName = 'antd-with-locales'; + if (webpackConfig.entry['antd.min']) { + packageName += '.min'; + } + webpackConfig.entry[packageName] = './index-with-locales.js'; + webpackConfig.output.filename = '[name].js'; +} + module.exports = function (webpackConfig) { webpackConfig = getWebpackConfig(webpackConfig); if (process.env.RUN_ENV === 'PRODUCTION') { webpackConfig.forEach((config) => { es3ify(config); ignoreMomentLocale(config); + addLocales(config); }); } return webpackConfig; From 5ff8723a9f0293fddb24bedec32284e6609a318c Mon Sep 17 00:00:00 2001 From: Chikara Chan Date: Fri, 17 Feb 2017 11:11:42 +0800 Subject: [PATCH 41/88] docs: fix import style error due to duplicated identifier (#4917) * fix render unuse className when type is undefined * docs: fix import style error due to duplicated identifier --- docs/react/getting-started.en-US.md | 2 +- docs/react/getting-started.zh-CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/react/getting-started.en-US.md b/docs/react/getting-started.en-US.md index 2627358a88..e42fc3c56b 100644 --- a/docs/react/getting-started.en-US.md +++ b/docs/react/getting-started.en-US.md @@ -168,7 +168,7 @@ But, we can import individual components on demand: ```jsx import Button from 'antd/lib/button'; -import Button from 'antd/lib/button/style/css'; // import style +import 'antd/lib/button/style/css'; // import style ``` We strongly recommend to use [babel-plugin-import](https://github.com/ant-design/babel-plugin-import), which can convert the following code to the 'antd/lib/xxx' way: diff --git a/docs/react/getting-started.zh-CN.md b/docs/react/getting-started.zh-CN.md index 1b32d303ae..1195e43389 100644 --- a/docs/react/getting-started.zh-CN.md +++ b/docs/react/getting-started.zh-CN.md @@ -166,7 +166,7 @@ IE8 需要配合使用 [react@0.14.x](https://facebook.github.io/react/blog/2016 ```jsx import Button from 'antd/lib/button'; -import Button from 'antd/lib/button/style/css'; // 按需引入 css +import 'antd/lib/button/style/css'; // 按需引入 css ``` 如果你使用了 babel,那么可以使用 [babel-plugin-import](https://github.com/ant-design/babel-plugin-import) 来进行按需加载,加入这个插件后。你可以仍然这么写: From 7d3cbfd9d99de7a5d3d01b308d9a26118491fce4 Mon Sep 17 00:00:00 2001 From: ddcat1115 Date: Fri, 17 Feb 2017 11:12:52 +0800 Subject: [PATCH 42/88] fix: menu[mode='vertical'] can not show submenu in Layout.Sider (#4904) * fix menu[mode='vertical'] can not show submenu in Layout.Sider close #4890 improve Layout demo * del useless css --- components/layout/Sider.tsx | 1 + .../__tests__/__snapshots__/demo.test.js.snap | 136 +++++++----------- components/layout/demo/side.md | 61 ++++---- components/layout/style/index.less | 6 - 4 files changed, 86 insertions(+), 118 deletions(-) diff --git a/components/layout/Sider.tsx b/components/layout/Sider.tsx index cc9e4e7e8f..7afe0fd1aa 100644 --- a/components/layout/Sider.tsx +++ b/components/layout/Sider.tsx @@ -81,6 +81,7 @@ export default class Sider extends React.Component { const divStyle = { ...style, flex: `0 0 ${this.state.collapsed ? collapsedWidth : width}px`, + width: `${this.state.collapsed ? collapsedWidth : width}px`, }; const iconObj = { 'expanded': reverseArrow ? : , diff --git a/components/layout/__tests__/__snapshots__/demo.test.js.snap b/components/layout/__tests__/__snapshots__/demo.test.js.snap index 72a567c683..62132e8ded 100644 --- a/components/layout/__tests__/__snapshots__/demo.test.js.snap +++ b/components/layout/__tests__/__snapshots__/demo.test.js.snap @@ -25,7 +25,7 @@ exports[`test renders ./components/layout/demo/basic.md correctly 1`] = ` class="ant-layout ant-layout-has-sider">
    + style="flex:0 0 200px;width:200px;"> Sider
    + style="flex:0 0 200px;width:200px;"> Sider
    @@ -65,7 +65,7 @@ exports[`test renders ./components/layout/demo/basic.md correctly 1`] = ` class="ant-layout ant-layout-has-sider">
    + style="flex:0 0 200px;width:200px;"> Sider
    + style="flex:0 0 200px;width:200px;">
    +
    + +
    `; diff --git a/components/upload/demo/defaultFileList.md b/components/upload/demo/defaultFileList.md index f0995c8e32..4f62122339 100644 --- a/components/upload/demo/defaultFileList.md +++ b/components/upload/demo/defaultFileList.md @@ -1,40 +1,45 @@ --- order: 2 -title: - zh-CN: 传入已上传的文件 - en-US: Set files that have been uploaded +title: + zh-CN: 已上传的文件列表 + en-US: Default Files --- ## zh-CN -对已上传的文件进行编辑。 +使用 `defaultFileList` 设置已上传的内容。 ## en-US -Edit uploaded files - +Use `defaultFileList` for uploaded files when page init. ````jsx import { Upload, Button, Icon } from 'antd'; const props = { action: '/upload.do', - onChange(info) { - if (info.file.status !== 'uploading') { - console.log(info.file); - console.log(info.fileList); + onChange({ file, fileList }) { + if (file.status !== 'uploading') { + console.log(file, fileList); } }, defaultFileList: [{ - uid: -1, + uid: 1, name: 'xxx.png', status: 'done', + reponse: 'Server Error 500', // custom error message to show url: 'http://www.baidu.com/xxx.png', }, { - uid: -2, + uid: 2, name: 'yyy.png', status: 'done', url: 'http://www.baidu.com/yyy.png', + }, { + uid: 3, + name: 'zzz.png', + status: 'error', + reponse: 'Server Error 500', // custom error message to show + url: 'http://www.baidu.com/zzz.png', }], }; diff --git a/components/upload/style/index.less b/components/upload/style/index.less index 3d9525b903..03b4daf56a 100644 --- a/components/upload/style/index.less +++ b/components/upload/style/index.less @@ -152,7 +152,8 @@ } &-error, - &-error .@{iconfont-css-prefix}-paper-clip { + &-error .@{iconfont-css-prefix}-paper-clip, + &-error &-item-name { color: @error-color; } From b427adec210d1a2a502cfc746a41205d5f0daf03 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 19 Feb 2017 01:42:58 +0800 Subject: [PATCH 61/88] docs: add instrunction about footer={null} --- components/modal/demo/footer.md | 10 +++++++--- components/modal/index.en-US.md | 2 +- components/modal/index.zh-CN.md | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/components/modal/demo/footer.md b/components/modal/demo/footer.md index 48e427608c..9d7749c5a8 100644 --- a/components/modal/demo/footer.md +++ b/components/modal/demo/footer.md @@ -2,19 +2,23 @@ order: 2 title: zh-CN: 自定义页脚 - en-US: Customized footer + en-US: Customized Footer --- ## zh-CN 更复杂的例子,自定义了页脚的按钮,点击提交后进入 loading 状态,完成后关闭。 +不需要默认确定取消按钮时,你可以把 `footer` 设为 `null`。 + ## en-US -A more complex example, as illustrated in this example, we define a customized footer button bar, -the dialog will change to loading state after clicking submit button , when the loading is over, +A more complex example which define a customized footer button bar, +the dialog will change to loading state after clicking submit button, when the loading is over, the modal dialog will be closed. +You could set `footer` to `null` if you don't need default footer buttons. + ````jsx import { Modal, Button } from 'antd'; diff --git a/components/modal/index.en-US.md b/components/modal/index.en-US.md index 7d673eb315..59750ddc51 100644 --- a/components/modal/index.en-US.md +++ b/components/modal/index.en-US.md @@ -25,7 +25,7 @@ and so on. | onOk | Specify a function that will be called when a user clicked OK button | function | no | | onCancel | Specify a function that will be called when a user clicked mask, close button on top right or cancel button | function(e) | no | | width | Width of a modal dialog | string\|number | 520 | -| footer | Footer content | string\|ReactNode | OK and cancel button | +| footer | Footer content, set as `footer={null}` when you don't need default buttons | string\|ReactNode | OK and cancel button | | okText | Text of the OK button | string | OK | | cancelText | Text of the Cancel button | string | Cancel | | maskClosable | Determine whether to close the modal dialog when clicked mask of it. | boolean | true | diff --git a/components/modal/index.zh-CN.md b/components/modal/index.zh-CN.md index 2a2c3dca82..36ab711a47 100644 --- a/components/modal/index.zh-CN.md +++ b/components/modal/index.zh-CN.md @@ -24,7 +24,7 @@ title: Modal | onOk | 点击确定回调 | function | 无 | | onCancel | 点击遮罩层或右上角叉或取消按钮的回调 | function(e) | 无 | | width | 宽度 | string\|number | 520 | -| footer | 底部内容 | string\|ReactNode | 确定取消按钮 | +| footer | 底部内容,当不需要默认底部按钮时,可以设为 `footer={null}` | string\|ReactNode | 确定取消按钮 | | okText | 确认按钮文字 | string | 确定 | | cancelText | 取消按钮文字 | string | 取消 | | maskClosable | 点击蒙层是否允许关闭 | boolean | true | From b34557ef17793f966ca0ea6eeec9b069f6762ae7 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 19 Feb 2017 13:49:22 +0800 Subject: [PATCH 62/88] Fix Table pagination.onChange arguments react-component/pagination#58 --- components/table/Table.tsx | 4 ++-- components/table/__tests__/Table.pagination.test.js | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/components/table/Table.tsx b/components/table/Table.tsx index 58e3b90c9d..92ec6ef533 100755 --- a/components/table/Table.tsx +++ b/components/table/Table.tsx @@ -500,7 +500,7 @@ export default class Table extends React.Component, any> { }); } - handlePageChange = (current) => { + handlePageChange = (current, ...otherArguments) => { const props = this.props; let pagination = assign({}, this.state.pagination); if (current) { @@ -508,7 +508,7 @@ export default class Table extends React.Component, any> { } else { pagination.current = pagination.current || 1; } - pagination.onChange(pagination.current); + pagination.onChange(pagination.current, ...otherArguments); const newState = { pagination, diff --git a/components/table/__tests__/Table.pagination.test.js b/components/table/__tests__/Table.pagination.test.js index 1e9518af9b..01be4faf38 100644 --- a/components/table/__tests__/Table.pagination.test.js +++ b/components/table/__tests__/Table.pagination.test.js @@ -56,9 +56,10 @@ describe('Table.pagination', () => { it('fires change event', () => { const handleChange = jest.fn(); + const handlePaginationChange = jest.fn(); const noop = () => {}; const wrapper = mount(createTable({ - pagination: { ...pagination, onChange: noop, onShowSizeChange: noop }, + pagination: { ...pagination, onChange: handlePaginationChange, onShowSizeChange: noop }, onChange: handleChange, })); @@ -67,13 +68,15 @@ describe('Table.pagination', () => { expect(handleChange).toBeCalledWith( { current: 2, - onChange: noop, + onChange: handlePaginationChange, onShowSizeChange: noop, pageSize: 2, }, {}, {} ); + + expect(handlePaginationChange).toBeCalledWith(2, 2); }); // https://github.com/ant-design/ant-design/issues/4532 From 6e4fae0e2919cc19729dfd59078bef59a8d9901e Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 19 Feb 2017 13:55:36 +0800 Subject: [PATCH 63/88] remove onChange functions in Table.onChange(pagination) --- components/table/Table.tsx | 7 +++++-- components/table/__tests__/Table.pagination.test.js | 2 -- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/components/table/Table.tsx b/components/table/Table.tsx index 92ec6ef533..87192a8071 100755 --- a/components/table/Table.tsx +++ b/components/table/Table.tsx @@ -731,9 +731,12 @@ export default class Table extends React.Component, any> { /> : null; } + // Get pagination, filters, sorter prepareParamsArguments(state: any): [any, string[], Object] { - // 准备筛选、排序、分页的参数 - const pagination = state.pagination; + const pagination = { ...state.pagination }; + // remove useless handle function in Table.onChange + delete pagination.onChange; + delete pagination.onShowSizeChange; const filters = state.filters; const sorter: any = {}; if (state.sortColumn && state.sortOrder) { diff --git a/components/table/__tests__/Table.pagination.test.js b/components/table/__tests__/Table.pagination.test.js index 01be4faf38..06603404fa 100644 --- a/components/table/__tests__/Table.pagination.test.js +++ b/components/table/__tests__/Table.pagination.test.js @@ -68,8 +68,6 @@ describe('Table.pagination', () => { expect(handleChange).toBeCalledWith( { current: 2, - onChange: handlePaginationChange, - onShowSizeChange: noop, pageSize: 2, }, {}, From 673969d0bab895bfcf44374e2001b339ceaf422e Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 19 Feb 2017 14:04:22 +0800 Subject: [PATCH 64/88] fix table snapshot for react-component/table#121 --- .../__tests__/__snapshots__/demo.test.js.snap | 73 +- .../__snapshots__/Table.filter.test.js.snap | 133 +- .../Table.pagination.test.js.snap | 87 +- .../__snapshots__/Table.test.js.snap | 167 +- .../__tests__/__snapshots__/demo.test.js.snap | 12309 ++++++++-------- 5 files changed, 6318 insertions(+), 6451 deletions(-) diff --git a/components/locale-provider/__tests__/__snapshots__/demo.test.js.snap b/components/locale-provider/__tests__/__snapshots__/demo.test.js.snap index b3d81ce1cc..fa1e538d23 100644 --- a/components/locale-provider/__tests__/__snapshots__/demo.test.js.snap +++ b/components/locale-provider/__tests__/__snapshots__/demo.test.js.snap @@ -1156,45 +1156,40 @@ exports[`test renders ./components/locale-provider/demo/all.md correctly 1`] = `
    - -
    - - - - - - - - - - - - -
    - - Name - - - - - Age - -
    -
    -
    -
    - No Data -
    + class="ant-table-body"> + + + + + + + + + + + + +
    + + Name + + + + + Age + +
    +
    +
    + No Data
    diff --git a/components/table/__tests__/__snapshots__/Table.filter.test.js.snap b/components/table/__tests__/__snapshots__/Table.filter.test.js.snap index f8e9ebc4bd..7449a4b506 100644 --- a/components/table/__tests__/__snapshots__/Table.filter.test.js.snap +++ b/components/table/__tests__/__snapshots__/Table.filter.test.js.snap @@ -24,75 +24,70 @@ exports[`Table.filter renders filter correctly 1`] = `
    - -
    - - - - - - - - - - - - - - - - - - - - - - - -
    - - Name - - -
    - - Jack -
    - - Lucy -
    - - Tom -
    - - Jerry -
    -
    -
    + class="ant-table-body"> + + + + + + + + + + + + + + + + + + + + + + + +
    + + Name + + +
    + + Jack +
    + + Lucy +
    + + Tom +
    + + Jerry +
    diff --git a/components/table/__tests__/__snapshots__/Table.pagination.test.js.snap b/components/table/__tests__/__snapshots__/Table.pagination.test.js.snap index 7f9cc31abc..24ba4383e0 100644 --- a/components/table/__tests__/__snapshots__/Table.pagination.test.js.snap +++ b/components/table/__tests__/__snapshots__/Table.pagination.test.js.snap @@ -10,52 +10,47 @@ exports[`Table.pagination renders pagination correctly 1`] = `
    - -
    - - - - - - - - - - - - - - - - - -
    - - Name - -
    - - Jack -
    - - Lucy -
    -
    -
    + class="ant-table-body"> + + + + + + + + + + + + + + + + + +
    + + Name + +
    + + Jack +
    + + Lucy +
    diff --git a/components/table/__tests__/__snapshots__/Table.test.js.snap b/components/table/__tests__/__snapshots__/Table.test.js.snap index 8d4fc3e352..bd00bc1717 100644 --- a/components/table/__tests__/__snapshots__/Table.test.js.snap +++ b/components/table/__tests__/__snapshots__/Table.test.js.snap @@ -10,92 +10,87 @@ exports[`Table renders JSX correctly 1`] = `
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - Name - - - - Age - -
    - - First Name - - - - Last Name - -
    - - John - - Brown - - 32 -
    - - Jim - - Green - - 42 -
    -
    -
    + class="ant-table-body"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + Name + + + + Age + +
    + + First Name + + + + Last Name + +
    + + John + + Brown + + 32 +
    + + Jim + + Green + + 42 +
    diff --git a/components/table/__tests__/__snapshots__/demo.test.js.snap b/components/table/__tests__/__snapshots__/demo.test.js.snap index 0da7c20948..db5221e2da 100644 --- a/components/table/__tests__/__snapshots__/demo.test.js.snap +++ b/components/table/__tests__/__snapshots__/demo.test.js.snap @@ -10,73 +10,68 @@ exports[`test renders ./components/table/demo/ajax.md correctly 1`] = `
    - -
    - - - - - - - - - - + + + + + +
    - - Name -
    - - - - - - -
    -
    -
    - - Gender + class="ant-table-body"> + + + + + + + + + - - - - -
    + + Name +
    + + class="anticon anticon-caret-up" /> -
    - - Email + + -
    - + +
    +
    + + Gender + + + + + Email + +
    +
    +
    + + + 暂无数据 -
    - - - 暂无数据 - -
    @@ -97,188 +92,183 @@ exports[`test renders ./components/table/demo/basic.md correctly 1`] = `
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - Name - - - - Age - - - - Address - - - - Action - -
    - - - John Brown - - - 32 - - New York No. 1 Lake Park - - - - Action 一 John Brown - - - - Delete - - - - More actions - - - -
    - - - Jim Green - - - 42 - - London No. 1 Lake Park - - - - Action 一 Jim Green - - - - Delete - - - - More actions - - - -
    - - - Joe Black - - - 32 - - Sidney No. 1 Lake Park - - - - Action 一 Joe Black - - - - Delete - - - - More actions - - - -
    -
    -
    + class="ant-table-body"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + Name + + + + Age + + + + Address + + + + Action + +
    + + + John Brown + + + 32 + + New York No. 1 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
    + + + Jim Green + + + 42 + + London No. 1 Lake Park + + + + Action 一 Jim Green + + + + Delete + + + + More actions + + + +
    + + + Joe Black + + + 32 + + Sidney No. 1 Lake Park + + + + Action 一 Joe Black + + + + Delete + + + + More actions + + + +
    @@ -324,113 +314,108 @@ exports[`test renders ./components/table/demo/bordered.md correctly 1`] = `
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - Name - - - - Cash Assets - - - - Address - -
    - - - John Brown - - - ¥300,000.00 - - New York No. 1 Lake Park -
    - - - Jim Green - - - ¥1,256,000.00 - - London No. 1 Lake Park -
    - - - Joe Black - - - ¥120,000.00 - - Sidney No. 1 Lake Park -
    -
    -
    - + class="ant-table-body"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + Name + + + + Cash Assets + + + + Address + +
    + + + John Brown + + + ¥300,000.00 + + New York No. 1 Lake Park +
    + + + Jim Green + + + ¥1,256,000.00 + + London No. 1 Lake Park +
    + + + Joe Black + + + ¥120,000.00 + + Sidney No. 1 Lake Park +
    +
    +
    @@ -472,182 +457,177 @@ exports[`test renders ./components/table/demo/colspan-rowspan.md correctly 1`] =
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - Name - - - - Age - - - - Home phone - - - - Address - -
    - - - John Brown - - - 32 - - 0571-22098909 - - 18889898989 - - New York No. 1 Lake Park -
    - - - Jim Green - - - 42 - - 0571-22098333 - - 18889898888 - - London No. 1 Lake Park -
    - - - Joe Black - - - 32 - - 0575-22098909 - - 18900010002 - - Sidney No. 1 Lake Park -
    - - - Jim Red - - - 18 - - 18900010002 - - London No. 2 Lake Park -
    - - - Jake White - -
    -
    -
    + class="ant-table-body"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + Name + + + + Age + + + + Home phone + + + + Address + +
    + + + John Brown + + + 32 + + 0571-22098909 + + 18889898989 + + New York No. 1 Lake Park +
    + + + Jim Green + + + 42 + + 0571-22098333 + + 18889898888 + + London No. 1 Lake Park +
    + + + Joe Black + + + 32 + + 0575-22098909 + + 18900010002 + + Sidney No. 1 Lake Park +
    + + + Jim Red + + + 18 + + 18900010002 + + London No. 2 Lake Park +
    + + + Jake White + +
    @@ -689,121 +669,116 @@ exports[`test renders ./components/table/demo/custom-filter-panel.md correctly 1
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - Name - - - - - Age - - - - Address - -
    - - John Brown - - 32 - - New York No. 1 Lake Park -
    - - Jim Green - - 42 - - London No. 1 Lake Park -
    - - Joe Black - - 32 - - Sidney No. 1 Lake Park -
    - - Jim Red - - 32 - - London No. 2 Lake Park -
    -
    -
    + class="ant-table-body"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + Name + + + + + Age + + + + Address + +
    + + John Brown + + 32 + + New York No. 1 Lake Park +
    + + Jim Green + + 42 + + London No. 1 Lake Park +
    + + Joe Black + + 32 + + Sidney No. 1 Lake Park +
    + + Jim Red + + 32 + + London No. 2 Lake Park +
    @@ -1122,713 +1097,708 @@ exports[`test renders ./components/table/demo/dynamic-settings.md correctly 1`]
    - -
    - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + +
    - - - - - - - Name - - - - Age - - - - Address - - - - Action - -
    + class="ant-table-body"> + + + + + + + + + + + + - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - -
    + + + - - - - - - John Brown - - - 12 - - New York No. 1 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
    + + + + + + Name + + + + Age + + + + Address + + + + Action + +
    + + + + - - - - - - John Brown - - - 22 - - New York No. 2 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
    + + + + + John Brown + + + 12 + + New York No. 1 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
    + + + + - - - - - - John Brown - - - 32 - - New York No. 3 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
    + + + + + John Brown + + + 22 + + New York No. 2 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
    + + + + - - - - - - John Brown - - - 42 - - New York No. 4 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
    + + + + + John Brown + + + 32 + + New York No. 3 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
    + + + + - - - - - - John Brown - - - 52 - - New York No. 5 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
    + + + + + John Brown + + + 42 + + New York No. 4 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
    + + + + - - - - - - John Brown - - - 62 - - New York No. 6 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
    + + + + + John Brown + + + 52 + + New York No. 5 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
    + + + + - - - - - - John Brown - - - 72 - - New York No. 7 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
    + + + + + John Brown + + + 62 + + New York No. 6 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
    + + + + - - - - - - John Brown - - - 82 - - New York No. 8 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
    + + + + + John Brown + + + 72 + + New York No. 7 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
    + + + + - - - - - - John Brown - - - 92 - - New York No. 9 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
    + + + + + John Brown + + + 82 + + New York No. 8 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
    + + + + - - - - - - John Brown - - - 102 - - New York No. 10 Lake Park - - - - Action 一 John Brown - + class="ant-checkbox"> - - Delete - - - - More actions - - + class="ant-checkbox-inner" /> + -
    - - - + + +
    + + John Brown + + + 92 + + New York No. 9 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
    + + + + + + + + John Brown + + + 102 + + New York No. 10 Lake Park + + + + Action 一 John Brown + + + + Delete + + + + More actions + + + +
    +
    +
    @@ -1879,120 +1849,115 @@ exports[`test renders ./components/table/demo/edit-cell.md correctly 1`] = `
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - name - - - - age - - - - address - - - - operation - -
    - -
    -
    - Edward King 0 - -
    -
    -
    - 32 - - London, Park Lane no. 0 - - - Delete - -
    - -
    -
    - Edward King 1 - -
    -
    -
    - 32 - - London, Park Lane no. 1 - - - Delete - -
    -
    -
    + class="ant-table-body"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + name + + + + age + + + + address + + + + operation + +
    + +
    +
    + Edward King 0 + +
    +
    +
    + 32 + + London, Park Lane no. 0 + + + Delete + +
    + +
    +
    + Edward King 1 + +
    +
    +
    + 32 + + London, Park Lane no. 1 + + + Delete + +
    @@ -2035,95 +2000,90 @@ exports[`test renders ./components/table/demo/edit-row.md correctly 1`] = `
    - -
    - - - - - - - - - - - - - - - - - - - - - - - -
    - - name - - - - age - - - - address - - - - operation - -
    - -
    -
    - Edward King 0 -
    -
    -
    -
    -
    - 32 -
    -
    -
    - London, Park Lane no. 0 - -
    - - - Edit - - -
    -
    -
    -
    + class="ant-table-body"> + + + + + + + + + + + + + + + + + + + + + + + +
    + + name + + + + age + + + + address + + + + operation + +
    + +
    +
    + Edward King 0 +
    +
    +
    +
    +
    + 32 +
    +
    +
    + London, Park Lane no. 0 + +
    + + + Edit + + +
    +
    @@ -2165,140 +2125,135 @@ exports[`test renders ./components/table/demo/expand.md correctly 1`] = `
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - Name - - - - Age - - - - Address - - - - Action - -
    - - - John Brown - - 32 - - New York No. 1 Lake Park - - - Delete - -
    - - - Jim Green - - 42 - - London No. 1 Lake Park - - - Delete - -
    - - - Joe Black - - 32 - - Sidney No. 1 Lake Park - - - Delete - -
    -
    -
    + class="ant-table-body"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + Name + + + + Age + + + + Address + + + + Action + +
    + + + John Brown + + 32 + + New York No. 1 Lake Park + + + Delete + +
    + + + Jim Green + + 42 + + London No. 1 Lake Park + + + Delete + +
    + + + Joe Black + + 32 + + Sidney No. 1 Lake Park + + + Delete + +
    @@ -2340,396 +2295,391 @@ exports[`test renders ./components/table/demo/expand-children.md correctly 1`] =
    - -
    - - - - - - - - - - + + + + +
    - - + class="ant-table-body"> + + + + + + + + + + - + + + + + + + + + + + + + + + + + + - - - - + + + + + + - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    + + - - Name + + + + + Name + + + + Age + + + + Address + +
    + + - - Age + + + + + + + John Brown sr. + + 60 + + New York No. 1 Lake Park +
    - - + + + + + + John Brown jr. + + 30 + + New York No. 3 Lake Park +
    + + - 72 - - London No. 1 Lake Park -
    - - - - - - - Joe Black - - 32 - - Sidney No. 1 Lake Park -
    - -
    + + + +
    + + + Joe Black + + 32 + + Sidney No. 1 Lake Park +
    @@ -2772,96 +2722,17 @@ exports[`test renders ./components/table/demo/fixed-columns.md correctly 1`] = ` class="ant-table-content">
    - +
    -
    - - - - - - - - - - - - - - - - - - - - - -
    - - Full Name - - - - Age - -
    - - John Brown - - 32 -
    - - Jim Green - - 40 -
    -
    -
    - -
    -
    - -
    + class="ant-table-body-inner"> + class="ant-table-fixed"> - - - - - - - - - @@ -2878,60 +2749,6 @@ exports[`test renders ./components/table/demo/fixed-columns.md correctly 1`] = ` Age - - - - - - - - - 32 - - - - - - - - - @@ -3002,38 +2780,256 @@ exports[`test renders ./components/table/demo/fixed-columns.md correctly 1`] = ` class=""> 40 + + +
    - - Column 1 - - - - Column 2 - - - - Column 3 - - - - Column 4 - - - - Column 5 - - - - Column 6 - - - - Column 7 - - - - Column 8 - - - - Action - -
    - New York Park - - New York Park - - New York Park - - New York Park - - New York Park - - New York Park - - New York Park - - New York Park - - - action - -
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + Full Name + + + + Age + + + + Column 1 + + + + Column 2 + + + + Column 3 + + + + Column 4 + + + + Column 5 + + + + Column 6 + + + + Column 7 + + + + Column 8 + + + + Action + +
    + + John Brown + + 32 + + New York Park + + New York Park + + New York Park + + New York Park + + New York Park + + New York Park + + New York Park + + New York Park + + + action + +
    + + Jim Green + + 40 + + London Park + + London Park + + London Park + + London Park + + London Park + + London Park + + London Park + + London Park + + + action + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + - - - - - - - + +
    + + Action + +
    - London Park - - London Park - - London Park - - London Park - - London Park - - London Park - - London Park - - London Park + + action +
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - -
    - - Action - -
    - - action - -
    - - action - -
    -
    -
    -
    +
    @@ -3140,9 +3084,40 @@ exports[`test renders ./components/table/demo/fixed-columns-header.md correctly class="ant-table-content">
    - +
    + + + + + + + + + + + +
    + + Full Name + + + + Age + +
    +
    +
    + class="ant-table-body-inner"> @@ -3151,319 +3126,6 @@ exports[`test renders ./components/table/demo/fixed-columns-header.md correctly - - - - - - -
    - - Full Name - - - - Age - -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - Edrward 0 - - 32 -
    - - Edrward 1 - - 32 -
    - - Edrward 2 - - 32 -
    - - Edrward 3 - - 32 -
    - - Edrward 4 - - 32 -
    - - Edrward 5 - - 32 -
    - - Edrward 6 - - 32 -
    - - Edrward 7 - - 32 -
    - - Edrward 8 - - 32 -
    - - Edrward 9 - - 32 -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - Full Name - - - - Age - - - - Column 1 - - - - Column 2 - - - - Column 3 - - - - Column 4 - - - - Column 5 - - - - Column 6 - - - - Column 7 - - - - Column 8 - - - - Action - -
    -
    -
    - - - - - - - - - - - - - - 32 - - - - - - - - - @@ -3532,45 +3155,6 @@ exports[`test renders ./components/table/demo/fixed-columns-header.md correctly class=""> 32 - - - - - - - - - @@ -3585,45 +3169,6 @@ exports[`test renders ./components/table/demo/fixed-columns-header.md correctly class=""> 32 - - - - - - - - - @@ -3638,45 +3183,6 @@ exports[`test renders ./components/table/demo/fixed-columns-header.md correctly class=""> 32 - - - - - - - - - @@ -3691,45 +3197,6 @@ exports[`test renders ./components/table/demo/fixed-columns-header.md correctly class=""> 32 - - - - - - - - - @@ -3744,45 +3211,6 @@ exports[`test renders ./components/table/demo/fixed-columns-header.md correctly class=""> 32 - - - - - - - - - @@ -3797,45 +3225,6 @@ exports[`test renders ./components/table/demo/fixed-columns-header.md correctly class=""> 32 - - - - - - - - - @@ -3850,45 +3239,6 @@ exports[`test renders ./components/table/demo/fixed-columns-header.md correctly class=""> 32 - - - - - - - - - @@ -3903,45 +3253,6 @@ exports[`test renders ./components/table/demo/fixed-columns-header.md correctly class=""> 32 - - - - - - - - - @@ -3956,38 +3267,808 @@ exports[`test renders ./components/table/demo/fixed-columns-header.md correctly class=""> 32 + + +
    - London Park no. 0 - - London Park no. 0 - - London Park no. 0 - - London Park no. 0 - - London Park no. 0 - - London Park no. 0 - - London Park no. 0 - - London Park no. 0 - - - action - -
    - London Park no. 1 - - London Park no. 1 - - London Park no. 1 - - London Park no. 1 - - London Park no. 1 - - London Park no. 1 - - London Park no. 1 - - London Park no. 1 - - - action - -
    - London Park no. 2 - - London Park no. 2 - - London Park no. 2 - - London Park no. 2 - - London Park no. 2 - - London Park no. 2 - - London Park no. 2 - - London Park no. 2 - - - action - -
    - London Park no. 3 - - London Park no. 3 - - London Park no. 3 - - London Park no. 3 - - London Park no. 3 - - London Park no. 3 - - London Park no. 3 - - London Park no. 3 - - - action - -
    - London Park no. 4 - - London Park no. 4 - - London Park no. 4 - - London Park no. 4 - - London Park no. 4 - - London Park no. 4 - - London Park no. 4 - - London Park no. 4 - - - action - -
    - London Park no. 5 - - London Park no. 5 - - London Park no. 5 - - London Park no. 5 - - London Park no. 5 - - London Park no. 5 - - London Park no. 5 - - London Park no. 5 - - - action - -
    - London Park no. 6 - - London Park no. 6 - - London Park no. 6 - - London Park no. 6 - - London Park no. 6 - - London Park no. 6 - - London Park no. 6 - - London Park no. 6 - - - action - -
    - London Park no. 7 - - London Park no. 7 - - London Park no. 7 - - London Park no. 7 - - London Park no. 7 - - London Park no. 7 - - London Park no. 7 - - London Park no. 7 - - - action - -
    - London Park no. 8 - - London Park no. 8 - - London Park no. 8 - - London Park no. 8 - - London Park no. 8 - - London Park no. 8 - - London Park no. 8 - - London Park no. 8 - - - action - -
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + Full Name + + + + Age + + + + Column 1 + + + + Column 2 + + + + Column 3 + + + + Column 4 + + + + Column 5 + + + + Column 6 + + + + Column 7 + + + + Column 8 + + + + Action + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + Edrward 0 + + 32 + + London Park no. 0 + + London Park no. 0 + + London Park no. 0 + + London Park no. 0 + + London Park no. 0 + + London Park no. 0 + + London Park no. 0 + + London Park no. 0 + + + action + +
    + + Edrward 1 + + 32 + + London Park no. 1 + + London Park no. 1 + + London Park no. 1 + + London Park no. 1 + + London Park no. 1 + + London Park no. 1 + + London Park no. 1 + + London Park no. 1 + + + action + +
    + + Edrward 2 + + 32 + + London Park no. 2 + + London Park no. 2 + + London Park no. 2 + + London Park no. 2 + + London Park no. 2 + + London Park no. 2 + + London Park no. 2 + + London Park no. 2 + + + action + +
    + + Edrward 3 + + 32 + + London Park no. 3 + + London Park no. 3 + + London Park no. 3 + + London Park no. 3 + + London Park no. 3 + + London Park no. 3 + + London Park no. 3 + + London Park no. 3 + + + action + +
    + + Edrward 4 + + 32 + + London Park no. 4 + + London Park no. 4 + + London Park no. 4 + + London Park no. 4 + + London Park no. 4 + + London Park no. 4 + + London Park no. 4 + + London Park no. 4 + + + action + +
    + + Edrward 5 + + 32 + + London Park no. 5 + + London Park no. 5 + + London Park no. 5 + + London Park no. 5 + + London Park no. 5 + + London Park no. 5 + + London Park no. 5 + + London Park no. 5 + + + action + +
    + + Edrward 6 + + 32 + + London Park no. 6 + + London Park no. 6 + + London Park no. 6 + + London Park no. 6 + + London Park no. 6 + + London Park no. 6 + + London Park no. 6 + + London Park no. 6 + + + action + +
    + + Edrward 7 + + 32 + + London Park no. 7 + + London Park no. 7 + + London Park no. 7 + + London Park no. 7 + + London Park no. 7 + + London Park no. 7 + + London Park no. 7 + + London Park no. 7 + + + action + +
    + + Edrward 8 + + 32 + + London Park no. 8 + + London Park no. 8 + + London Park no. 8 + + London Park no. 8 + + London Park no. 8 + + London Park no. 8 + + London Park no. 8 + + London Park no. 8 + + + action + +
    + + Edrward 9 + + 32 + + London Park no. 9 + + London Park no. 9 + + London Park no. 9 + + London Park no. 9 + + London Park no. 9 + + London Park no. 9 + + London Park no. 9 + + London Park no. 9 + + + action + +
    +
    +
    +
    +
    + + + + + + + + + +
    + + Action + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    - London Park no. 9 + + action +
    - London Park no. 9 + + action +
    - London Park no. 9 + + action +
    - London Park no. 9 + + action +
    - London Park no. 9 + + action +
    - London Park no. 9 + + action +
    - London Park no. 9 + + action +
    - London Park no. 9 + + action +
    + + action + +
    - -
    -
    - -
    - - - - - - - - - -
    - - Action - -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - action - -
    - - action - -
    - - action - -
    - - action - -
    - - action - -
    - - action - -
    - - action - -
    - - action - -
    - - action - -
    - - action - -
    -
    -
    -
    +
    @@ -4224,962 +4162,957 @@ exports[`test renders ./components/table/demo/fixed-header.md correctly 1`] = `
    - -
    - - - - - - - - - - - - - -
    - - Name - - - - Age - - - - Address - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - Edward King 0 - - 32 - - London, Park Lane no. 0 -
    - - Edward King 1 - - 32 - - London, Park Lane no. 1 -
    - - Edward King 2 - - 32 - - London, Park Lane no. 2 -
    - - Edward King 3 - - 32 - - London, Park Lane no. 3 -
    - - Edward King 4 - - 32 - - London, Park Lane no. 4 -
    - - Edward King 5 - - 32 - - London, Park Lane no. 5 -
    - - Edward King 6 - - 32 - - London, Park Lane no. 6 -
    - - Edward King 7 - - 32 - - London, Park Lane no. 7 -
    - - Edward King 8 - - 32 - - London, Park Lane no. 8 -
    - - Edward King 9 - - 32 - - London, Park Lane no. 9 -
    - - Edward King 10 - - 32 - - London, Park Lane no. 10 -
    - - Edward King 11 - - 32 - - London, Park Lane no. 11 -
    - - Edward King 12 - - 32 - - London, Park Lane no. 12 -
    - - Edward King 13 - - 32 - - London, Park Lane no. 13 -
    - - Edward King 14 - - 32 - - London, Park Lane no. 14 -
    - - Edward King 15 - - 32 - - London, Park Lane no. 15 -
    - - Edward King 16 - - 32 - - London, Park Lane no. 16 -
    - - Edward King 17 - - 32 - - London, Park Lane no. 17 -
    - - Edward King 18 - - 32 - - London, Park Lane no. 18 -
    - - Edward King 19 - - 32 - - London, Park Lane no. 19 -
    - - Edward King 20 - - 32 - - London, Park Lane no. 20 -
    - - Edward King 21 - - 32 - - London, Park Lane no. 21 -
    - - Edward King 22 - - 32 - - London, Park Lane no. 22 -
    - - Edward King 23 - - 32 - - London, Park Lane no. 23 -
    - - Edward King 24 - - 32 - - London, Park Lane no. 24 -
    - - Edward King 25 - - 32 - - London, Park Lane no. 25 -
    - - Edward King 26 - - 32 - - London, Park Lane no. 26 -
    - - Edward King 27 - - 32 - - London, Park Lane no. 27 -
    - - Edward King 28 - - 32 - - London, Park Lane no. 28 -
    - - Edward King 29 - - 32 - - London, Park Lane no. 29 -
    - - Edward King 30 - - 32 - - London, Park Lane no. 30 -
    - - Edward King 31 - - 32 - - London, Park Lane no. 31 -
    - - Edward King 32 - - 32 - - London, Park Lane no. 32 -
    - - Edward King 33 - - 32 - - London, Park Lane no. 33 -
    - - Edward King 34 - - 32 - - London, Park Lane no. 34 -
    - - Edward King 35 - - 32 - - London, Park Lane no. 35 -
    - - Edward King 36 - - 32 - - London, Park Lane no. 36 -
    - - Edward King 37 - - 32 - - London, Park Lane no. 37 -
    - - Edward King 38 - - 32 - - London, Park Lane no. 38 -
    - - Edward King 39 - - 32 - - London, Park Lane no. 39 -
    - - Edward King 40 - - 32 - - London, Park Lane no. 40 -
    - - Edward King 41 - - 32 - - London, Park Lane no. 41 -
    - - Edward King 42 - - 32 - - London, Park Lane no. 42 -
    - - Edward King 43 - - 32 - - London, Park Lane no. 43 -
    - - Edward King 44 - - 32 - - London, Park Lane no. 44 -
    - - Edward King 45 - - 32 - - London, Park Lane no. 45 -
    - - Edward King 46 - - 32 - - London, Park Lane no. 46 -
    - - Edward King 47 - - 32 - - London, Park Lane no. 47 -
    - - Edward King 48 - - 32 - - London, Park Lane no. 48 -
    - - Edward King 49 - - 32 - - London, Park Lane no. 49 -
    -
    -
    + class="ant-table-header"> + + + + + + + + + + + + + +
    + + Name + + + + Age + + + + Address + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + Edward King 0 + + 32 + + London, Park Lane no. 0 +
    + + Edward King 1 + + 32 + + London, Park Lane no. 1 +
    + + Edward King 2 + + 32 + + London, Park Lane no. 2 +
    + + Edward King 3 + + 32 + + London, Park Lane no. 3 +
    + + Edward King 4 + + 32 + + London, Park Lane no. 4 +
    + + Edward King 5 + + 32 + + London, Park Lane no. 5 +
    + + Edward King 6 + + 32 + + London, Park Lane no. 6 +
    + + Edward King 7 + + 32 + + London, Park Lane no. 7 +
    + + Edward King 8 + + 32 + + London, Park Lane no. 8 +
    + + Edward King 9 + + 32 + + London, Park Lane no. 9 +
    + + Edward King 10 + + 32 + + London, Park Lane no. 10 +
    + + Edward King 11 + + 32 + + London, Park Lane no. 11 +
    + + Edward King 12 + + 32 + + London, Park Lane no. 12 +
    + + Edward King 13 + + 32 + + London, Park Lane no. 13 +
    + + Edward King 14 + + 32 + + London, Park Lane no. 14 +
    + + Edward King 15 + + 32 + + London, Park Lane no. 15 +
    + + Edward King 16 + + 32 + + London, Park Lane no. 16 +
    + + Edward King 17 + + 32 + + London, Park Lane no. 17 +
    + + Edward King 18 + + 32 + + London, Park Lane no. 18 +
    + + Edward King 19 + + 32 + + London, Park Lane no. 19 +
    + + Edward King 20 + + 32 + + London, Park Lane no. 20 +
    + + Edward King 21 + + 32 + + London, Park Lane no. 21 +
    + + Edward King 22 + + 32 + + London, Park Lane no. 22 +
    + + Edward King 23 + + 32 + + London, Park Lane no. 23 +
    + + Edward King 24 + + 32 + + London, Park Lane no. 24 +
    + + Edward King 25 + + 32 + + London, Park Lane no. 25 +
    + + Edward King 26 + + 32 + + London, Park Lane no. 26 +
    + + Edward King 27 + + 32 + + London, Park Lane no. 27 +
    + + Edward King 28 + + 32 + + London, Park Lane no. 28 +
    + + Edward King 29 + + 32 + + London, Park Lane no. 29 +
    + + Edward King 30 + + 32 + + London, Park Lane no. 30 +
    + + Edward King 31 + + 32 + + London, Park Lane no. 31 +
    + + Edward King 32 + + 32 + + London, Park Lane no. 32 +
    + + Edward King 33 + + 32 + + London, Park Lane no. 33 +
    + + Edward King 34 + + 32 + + London, Park Lane no. 34 +
    + + Edward King 35 + + 32 + + London, Park Lane no. 35 +
    + + Edward King 36 + + 32 + + London, Park Lane no. 36 +
    + + Edward King 37 + + 32 + + London, Park Lane no. 37 +
    + + Edward King 38 + + 32 + + London, Park Lane no. 38 +
    + + Edward King 39 + + 32 + + London, Park Lane no. 39 +
    + + Edward King 40 + + 32 + + London, Park Lane no. 40 +
    + + Edward King 41 + + 32 + + London, Park Lane no. 41 +
    + + Edward King 42 + + 32 + + London, Park Lane no. 42 +
    + + Edward King 43 + + 32 + + London, Park Lane no. 43 +
    + + Edward King 44 + + 32 + + London, Park Lane no. 44 +
    + + Edward King 45 + + 32 + + London, Park Lane no. 45 +
    + + Edward King 46 + + 32 + + London, Park Lane no. 46 +
    + + Edward King 47 + + 32 + + London, Park Lane no. 47 +
    + + Edward King 48 + + 32 + + London, Park Lane no. 48 +
    + + Edward King 49 + + 32 + + London, Park Lane no. 49 +
    @@ -5229,314 +5162,42 @@ exports[`test renders ./components/table/demo/grouping-columns.md correctly 1`] class="ant-table-content">
    - +
    + + + + + + + + + +
    + + Name + + +
    +
    +
    + class="ant-table-body-inner"> - - - - - -
    - - Name - - -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - John Brown -
    - - John Brown -
    - - John Brown -
    - - John Brown -
    - - John Brown -
    - - John Brown -
    - - John Brown -
    - - John Brown -
    - - John Brown -
    - - John Brown -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - Name - - - - - Other - - - - Company - - - - Gender - -
    - - Age -
    - - - - - - -
    -
    -
    - - Address - - - - Company Address - - - - Company Name - -
    - - Street - - - - Block - -
    - - Building - - - - Door No. - -
    -
    -
    - - - - - - - - - - - John Brown + + - - - - - - John Brown + + - - - - - - John Brown + + - - - - - - John Brown + + - - - - - - John Brown - - - - - - - @@ -5738,30 +5299,599 @@ exports[`test renders ./components/table/demo/grouping-columns.md correctly 1`] style="padding-left:0px;" /> John Brown - - - - - - + + +
    - 1 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co - - M + + John Brown
    - 2 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co - - M + + John Brown
    - 3 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co - - M + + John Brown
    - 4 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co - - M + + John Brown
    - 5 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co - - M -
    - 6 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co -
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + Name + + + + + Other + + + + Company + + + + Gender + +
    + + Age +
    + + + + + + +
    +
    +
    + + Address + + + + Company Address + + + + Company Name + +
    + + Street + + + + Block + +
    + + Building + + + + Door No. + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + John Brown + + 1 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
    + + John Brown + + 2 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
    + + John Brown + + 3 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
    + + John Brown + + 4 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
    + + John Brown + + 5 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
    + + John Brown + + 6 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
    + + John Brown + + 7 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
    + + John Brown + + 8 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
    + + John Brown + + 9 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
    + + John Brown + + 10 + + Lake Park + + C + + 2035 + + Lake Street 42 + + SoftLake Co + + M +
    +
    +
    +
    +
    + + + + + + + + + +
    + + Gender + +
    +
    +
    +
    + + + + + + - - - - - - + + - - - - - - + + - - - - - - + + + + - - - - - + +
    M @@ -5771,35 +5901,11 @@ exports[`test renders ./components/table/demo/grouping-columns.md correctly 1`] class="ant-table-row ant-table-row-level-0"> - - John Brown - - 7 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co + M
    M @@ -5809,35 +5915,11 @@ exports[`test renders ./components/table/demo/grouping-columns.md correctly 1`] class="ant-table-row ant-table-row-level-0"> - - John Brown - - 8 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co + M
    M @@ -5847,35 +5929,11 @@ exports[`test renders ./components/table/demo/grouping-columns.md correctly 1`] class="ant-table-row ant-table-row-level-0"> - - John Brown - - 9 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co + M
    M @@ -5885,35 +5943,18 @@ exports[`test renders ./components/table/demo/grouping-columns.md correctly 1`] class="ant-table-row ant-table-row-level-0"> - - John Brown + M
    - 10 - - Lake Park - - C - - 2035 - - Lake Street 42 - - SoftLake Co + M
    M @@ -5922,121 +5963,7 @@ exports[`test renders ./components/table/demo/grouping-columns.md correctly 1`]
    - -
    -
    - -
    - - - - - - - - - -
    - - Gender - -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - M -
    - M -
    - M -
    - M -
    - M -
    - M -
    - M -
    - M -
    - M -
    - M -
    -
    -
    -
    +
    @@ -6118,169 +6045,164 @@ exports[`test renders ./components/table/demo/head.md correctly 1`] = `
    - -
    - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + +
    - - Name -
    - - - - - - -
    + class="ant-table-body"> + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - -
    + + Name +
    + + class="anticon anticon-caret-up" /> -
    - - Age -
    - - - - - - -
    -
    -
    - - Address -
    - - - - - - -
    + + class="anticon anticon-caret-down" /> -
    + + + + + + + Age +
    - John Brown - -
    - 32 - - New York No. 1 Lake Park -
    + class="ant-table-column-sorter-up off" + title="↑"> + + - Jim Green - - 42 - - London No. 1 Lake Park -
    + class="ant-table-column-sorter-down off" + title="↓"> + + + + + + + + Address +
    - Joe Black - -
    - 32 - - Sidney No. 1 Lake Park -
    + class="ant-table-column-sorter-up off" + title="↑"> + + - Jim Red - - 32 - - London No. 2 Lake Park -
    - -
    + class="ant-table-column-sorter-down off" + title="↓"> + + + + + +
    + + John Brown + + 32 + + New York No. 1 Lake Park +
    + + Jim Green + + 42 + + London No. 1 Lake Park +
    + + Joe Black + + 32 + + Sidney No. 1 Lake Park +
    + + Jim Red + + 32 + + London No. 2 Lake Park +
    @@ -6322,210 +6244,205 @@ exports[`test renders ./components/table/demo/jsx.md correctly 1`] = `
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - Name - - - - Age - - - - Address - - - - Action - -
    - - First Name - - - - Last Name - -
    - - John - - Brown - - 32 - - New York No. 1 Lake Park - - - - Action 一 - - - - Delete - - - - More actions - - - -
    - - Jim - - Green - - 42 - - London No. 1 Lake Park - - - - Action 一 - - - - Delete - - - - More actions - - - -
    - - Joe - - Black - - 32 - - Sidney No. 1 Lake Park - - - - Action 一 - - - - Delete - - - - More actions - - - -
    -
    -
    + class="ant-table-body"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + Name + + + + Age + + + + Address + + + + Action + +
    + + First Name + + + + Last Name + +
    + + John + + Brown + + 32 + + New York No. 1 Lake Park + + + + Action 一 + + + + Delete + + + + More actions + + + +
    + + Jim + + Green + + 42 + + London No. 1 Lake Park + + + + Action 一 + + + + Delete + + + + More actions + + + +
    + + Joe + + Black + + 32 + + Sidney No. 1 Lake Park + + + + Action 一 + + + + Delete + + + + More actions + + + +
    @@ -6567,197 +6484,192 @@ exports[`test renders ./components/table/demo/nested-table.md correctly 1`] = `
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - Name - - - - Platform - - - - Version - - - - Upgraded - - - - Creator - - - - Date - - - - Action - -
    - - - Screem - - iOS - - 10.3.4.5654 - - 500 - - Jack - - 2014-12-24 23:12:00 - - - Publish - -
    - - - Screem - - iOS - - 10.3.4.5654 - - 500 - - Jack - - 2014-12-24 23:12:00 - - - Publish - -
    - - - Screem - - iOS - - 10.3.4.5654 - - 500 - - Jack - - 2014-12-24 23:12:00 - - - Publish - -
    -
    -
    + class="ant-table-body"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + Name + + + + Platform + + + + Version + + + + Upgraded + + + + Creator + + + + Date + + + + Action + +
    + + + Screem + + iOS + + 10.3.4.5654 + + 500 + + Jack + + 2014-12-24 23:12:00 + + + Publish + +
    + + + Screem + + iOS + + 10.3.4.5654 + + 500 + + Jack + + 2014-12-24 23:12:00 + + + Publish + +
    + + + Screem + + iOS + + 10.3.4.5654 + + 500 + + Jack + + 2014-12-24 23:12:00 + + + Publish + +
    @@ -6824,169 +6736,164 @@ exports[`test renders ./components/table/demo/reset-filter.md correctly 1`] = `
    - -
    - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + +
    - - Name -
    - - - - - - -
    + class="ant-table-body"> + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - -
    + + Name +
    + + class="anticon anticon-caret-up" /> -
    - - Age -
    - - - - - - -
    -
    -
    - - Address -
    - - - - - - -
    + + class="anticon anticon-caret-down" /> -
    + + + + + + + Age +
    - John Brown - -
    - 32 - - New York No. 1 Lake Park -
    + class="ant-table-column-sorter-up off" + title="↑"> + + - Jim Green - - 42 - - London No. 1 Lake Park -
    + class="ant-table-column-sorter-down off" + title="↓"> + + + + + + + + Address +
    - Joe Black - -
    - 32 - - Sidney No. 1 Lake Park -
    + class="ant-table-column-sorter-up off" + title="↑"> + + - Jim Red - - 32 - - London No. 2 Lake Park -
    - -
    + class="ant-table-column-sorter-down off" + title="↓"> + + + + + +
    + + John Brown + + 32 + + New York No. 1 Lake Park +
    + + Jim Green + + 42 + + London No. 1 Lake Park +
    + + Joe Black + + 32 + + Sidney No. 1 Lake Park +
    + + Jim Red + + 32 + + London No. 2 Lake Park +
    @@ -7029,212 +6936,207 @@ exports[`test renders ./components/table/demo/row-selection.md correctly 1`] = `
    - -
    - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + +
    - - - - - - Name - - - - Age - - - - Address - -
    - - - - + class="ant-table-body"> + + + + + + + + + + - - - - - + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - -
    + + - 32 - - New York No. 1 Lake Park -
    - - + class="ant-checkbox"> + + - + + + + + + Name + + + + Age + + + + Address + +
    + + - 42 - - London No. 1 Lake Park -
    - - + class="ant-checkbox"> + + - + + + + + + John Brown + + + 32 + + New York No. 1 Lake Park +
    + + - 32 - - Sidney No. 1 Lake Park -
    - - + class="ant-checkbox"> + + - + + + + + + Jim Green + + + 42 + + London No. 1 Lake Park +
    + + - 99 - - Sidney No. 1 Lake Park -
    - - + class="ant-checkbox"> + + + + + +
    + + + Joe Black + + + 32 + + Sidney No. 1 Lake Park +
    + + + + + + + Disabled User + + + 99 + + Sidney No. 1 Lake Park +
    @@ -7290,403 +7192,398 @@ exports[`test renders ./components/table/demo/row-selection-and-operation.md cor
    - -
    - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + +
    - - - - - - Name - - - - Age - - - - Address - -
    - - - - + class="ant-table-body"> + + + + + + + + + + - - - - - + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - -
    + + - 32 - - London, Park Lane no. 0 -
    - - + class="ant-checkbox"> + + - + + + + + + Name + + + + Age + + + + Address + +
    + + - 32 - - London, Park Lane no. 1 -
    - - + class="ant-checkbox"> + + - + + + + + Edward King 0 + + 32 + + London, Park Lane no. 0 +
    + + - 32 - - London, Park Lane no. 2 -
    - - + class="ant-checkbox"> + + - + + + + + Edward King 1 + + 32 + + London, Park Lane no. 1 +
    + + - 32 - - London, Park Lane no. 3 -
    - - + class="ant-checkbox"> + + - + + + + + Edward King 2 + + 32 + + London, Park Lane no. 2 +
    + + - 32 - - London, Park Lane no. 4 -
    - - + class="ant-checkbox"> + + - + + + + + Edward King 3 + + 32 + + London, Park Lane no. 3 +
    + + - 32 - - London, Park Lane no. 5 -
    - - + class="ant-checkbox"> + + - + + + + + Edward King 4 + + 32 + + London, Park Lane no. 4 +
    + + - 32 - - London, Park Lane no. 6 -
    - - + class="ant-checkbox"> + + - + + + + + Edward King 5 + + 32 + + London, Park Lane no. 5 +
    + + - 32 - - London, Park Lane no. 7 -
    - - + class="ant-checkbox"> + + - + + + + + Edward King 6 + + 32 + + London, Park Lane no. 6 +
    + + - 32 - - London, Park Lane no. 8 -
    - - + class="ant-checkbox"> + + - + + + + + Edward King 7 + + 32 + + London, Park Lane no. 7 +
    + + - 32 - - London, Park Lane no. 9 -
    - - + class="ant-checkbox"> + + + + + +
    + + Edward King 8 + + 32 + + London, Park Lane no. 8 +
    + + + + + + Edward King 9 + + 32 + + London, Park Lane no. 9 +
    @@ -7761,100 +7658,95 @@ exports[`test renders ./components/table/demo/size.md correctly 1`] = `
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - Name - - - - Age - - - - Address - -
    - - John Brown - - 32 - - New York No. 1 Lake Park -
    - - Jim Green - - 42 - - London No. 1 Lake Park -
    - - Joe Black - - 32 - - Sidney No. 1 Lake Park -
    -
    -
    + class="ant-table-body"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + Name + + + + Age + + + + Address + +
    + + John Brown + + 32 + + New York No. 1 Lake Park +
    + + Jim Green + + 42 + + London No. 1 Lake Park +
    + + Joe Black + + 32 + + Sidney No. 1 Lake Park +
    @@ -7896,100 +7788,95 @@ exports[`test renders ./components/table/demo/size.md correctly 1`] = `
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - Name - - - - Age - - - - Address - -
    - - John Brown - - 32 - - New York No. 1 Lake Park -
    - - Jim Green - - 42 - - London No. 1 Lake Park -
    - - Joe Black - - 32 - - Sidney No. 1 Lake Park -
    -
    -
    + class="ant-table-body"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + Name + + + + Age + + + + Address + +
    + + John Brown + + 32 + + New York No. 1 Lake Park +
    + + Jim Green + + 42 + + London No. 1 Lake Park +
    + + Joe Black + + 32 + + Sidney No. 1 Lake Park +
    From e289ce8b3161737101de81f7411637ce75910f3a Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 19 Feb 2017 14:26:30 +0800 Subject: [PATCH 65/88] Fix Table fixed column z-index issue, close #4937 --- components/table/style/index.less | 1 - 1 file changed, 1 deletion(-) diff --git a/components/table/style/index.less b/components/table/style/index.less index c4d80202fe..c07507fa8a 100644 --- a/components/table/style/index.less +++ b/components/table/style/index.less @@ -508,7 +508,6 @@ position: absolute; top: 0; overflow: hidden; - z-index: 1; transition: box-shadow .3s ease; border-radius: 0; table { From f5b0536d42fc0526c76a6b374561888601843971 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 19 Feb 2017 15:06:37 +0800 Subject: [PATCH 66/88] improve demo code style --- components/input/demo/tooltip.md | 55 +++++++++++++------------------- 1 file changed, 23 insertions(+), 32 deletions(-) diff --git a/components/input/demo/tooltip.md b/components/input/demo/tooltip.md index 3c65c61af3..f3c9318412 100644 --- a/components/input/demo/tooltip.md +++ b/components/input/demo/tooltip.md @@ -43,38 +43,37 @@ class NumericInput extends React.Component { // '.' at the end or only '-' in the input box. onBlur = () => { - const { value } = this.props; + const { value, onBlur, onChange } = this.props; if (value.charAt(value.length - 1) === '.' || value === '-') { - this.props.onChange({ value: value.slice(0, -1) }); + onChange({ value: value.slice(0, -1) }); } - if (this.props.onBlur) { - this.props.onBlur(); + if (onBlur) { + onBlur(); } } render() { const { value } = this.props; - const title = (value ? - ( + const title = value ? ( + {value !== '-' ? formatNumber(value) : '-'} - ) : ''); + + ) : ''; return ( -
    - - - -
    + + + ); } } @@ -89,11 +88,7 @@ class NumericInputDemo extends React.Component { } render() { const { value } = this.state; - return ( -
    - -
    - ); + return ; } } @@ -111,8 +106,4 @@ or the height is not enough when content is empty */ .numeric-input .numeric-input-title { font-size: 14px; } - -.numeric-input-demo { - width: 120px; -} ```` From 173b8c46ad40a310a9d9ba2510c769dffdec855b Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 19 Feb 2017 15:21:46 +0800 Subject: [PATCH 67/88] Fix input demo tooltip --- .../__tests__/__snapshots__/demo.test.js.snap | 18 +++++++----------- components/input/demo/tooltip.md | 9 +++------ 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/components/input/__tests__/__snapshots__/demo.test.js.snap b/components/input/__tests__/__snapshots__/demo.test.js.snap index 539f20ecdc..27a22a770f 100644 --- a/components/input/__tests__/__snapshots__/demo.test.js.snap +++ b/components/input/__tests__/__snapshots__/demo.test.js.snap @@ -405,15 +405,11 @@ exports[`test renders ./components/input/demo/textarea.md correctly 1`] = ` `; exports[`test renders ./components/input/demo/tooltip.md correctly 1`] = ` -
    -
    - -
    -
    + `; diff --git a/components/input/demo/tooltip.md b/components/input/demo/tooltip.md index f3c9318412..93217e8648 100644 --- a/components/input/demo/tooltip.md +++ b/components/input/demo/tooltip.md @@ -40,7 +40,6 @@ class NumericInput extends React.Component { this.props.onChange(value); } } - // '.' at the end or only '-' in the input box. onBlur = () => { const { value, onBlur, onChange } = this.props; @@ -51,14 +50,13 @@ class NumericInput extends React.Component { onBlur(); } } - render() { const { value } = this.props; const title = value ? ( {value !== '-' ? formatNumber(value) : '-'} - ) : ''; + ) : 'Input a number'; return ( @@ -87,8 +85,7 @@ class NumericInputDemo extends React.Component { this.setState({ value }); } render() { - const { value } = this.state; - return ; + return ; } } From 18ec5933b7c6a92e1b189d607dd3b867520198ca Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 19 Feb 2017 17:02:58 +0800 Subject: [PATCH 68/88] fix old react documentation links --- components/table/index.en-US.md | 2 +- components/table/index.zh-CN.md | 2 +- components/transfer/index.en-US.md | 2 +- components/transfer/index.zh-CN.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/table/index.en-US.md b/components/table/index.en-US.md index da0daf677f..8f3e3bc985 100644 --- a/components/table/index.en-US.md +++ b/components/table/index.en-US.md @@ -156,7 +156,7 @@ class NameColumn extends Table.Column {} ## Note -According to [React documentation](http://facebook.github.io/react/docs/multiple-components.html#dynamic-children), every child in array should be assigned a unique key. The value inside `dataSource` and `columns` should follow this in Table, and `dataSource[i].key` would be treated as key value defaultly for `dataSource`. +According to [React documentation](https://facebook.github.io/react/docs/lists-and-keys.html#keys), every child in array should be assigned a unique key. The value inside `dataSource` and `columns` should follow this in Table, and `dataSource[i].key` would be treated as key value defaultly for `dataSource`. If `dataSource[i].key` is not existed, then you should specify the primary key of dataSource value via `rowKey`. If not, warnings like above will show in browser console. diff --git a/components/table/index.zh-CN.md b/components/table/index.zh-CN.md index edde2bfe53..da2c79d874 100644 --- a/components/table/index.zh-CN.md +++ b/components/table/index.zh-CN.md @@ -156,7 +156,7 @@ class NameColumn extends Table.Column {} ## 注意 -按照 React 的[规范](http://facebook.github.io/react/docs/multiple-components.html#dynamic-children),所有的组件数组必须绑定 key。在 Table 中,`dataSource` 和 `columns` 里的数据值都需要指定 `key` 值。对于 `dataSource` 默认将每列数据的 `key` 属性作为唯一的标识。 +按照 [React 的规范](https://facebook.github.io/react/docs/lists-and-keys.html#keys),所有的组件数组必须绑定 key。在 Table 中,`dataSource` 和 `columns` 里的数据值都需要指定 `key` 值。对于 `dataSource` 默认将每列数据的 `key` 属性作为唯一的标识。 如果你的数据没有这个属性,务必使用 `rowKey` 来指定数据列的主键。若没有指定,控制台会出现以下的提示,表格组件也会出现各类奇怪的错误。 diff --git a/components/transfer/index.en-US.md b/components/transfer/index.en-US.md index 211abdc344..e7e613c609 100644 --- a/components/transfer/index.en-US.md +++ b/components/transfer/index.en-US.md @@ -37,7 +37,7 @@ One or more elements can be selected from either column, one click on the proper ## Warning -According the [standard](http://facebook.github.io/react/docs/multiple-components.html#dynamic-children) of React, the key should always be supplied directly to the elements in the array. In Transfer, the keys should be set on the elements included in `dataSource` array. By default, `key` property is used as an unique identifier. +According the [standard](http://facebook.github.io/react/docs/lists-and-keys.html#keys) of React, the key should always be supplied directly to the elements in the array. In Transfer, the keys should be set on the elements included in `dataSource` array. By default, `key` property is used as an unique identifier. If there's no `key` in your data, you should use `rowKey` to specify the key that will be used for uniquely identify each element. ```jsx diff --git a/components/transfer/index.zh-CN.md b/components/transfer/index.zh-CN.md index 64fc2e4ba1..ca5b4cad04 100644 --- a/components/transfer/index.zh-CN.md +++ b/components/transfer/index.zh-CN.md @@ -39,7 +39,7 @@ title: Transfer ## 注意 -按照 React 的[规范](http://facebook.github.io/react/docs/multiple-components.html#dynamic-children),所有的组件数组必须绑定 key。在 Transfer 中,`dataSource`里的数据值需要指定 `key` 值。对于 `dataSource` 默认将每列数据的 `key` 属性作为唯一的标识。 +按照 React 的[规范](http://facebook.github.io/react/docs/lists-and-keys.html#keys),所有的组件数组必须绑定 key。在 Transfer 中,`dataSource`里的数据值需要指定 `key` 值。对于 `dataSource` 默认将每列数据的 `key` 属性作为唯一的标识。 如果你的数据没有这个属性,务必使用 `rowKey` 来指定数据列的主键。 From ae67f5cc204ab9ae59088e4e02166fe123fb4ea9 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 19 Feb 2017 18:20:56 +0800 Subject: [PATCH 69/88] update doc --- docs/react/getting-started.en-US.md | 4 ++-- docs/react/getting-started.zh-CN.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/react/getting-started.en-US.md b/docs/react/getting-started.en-US.md index e42fc3c56b..bebb1325bd 100644 --- a/docs/react/getting-started.en-US.md +++ b/docs/react/getting-started.en-US.md @@ -3,7 +3,7 @@ order: 1 title: Getting Started --- -Ant Design React is dedicated to providing a **good development experience** for programmers. +Ant Design React is dedicated to providing a **good development experience** for programmers and make sure that you had installed [Node.js](https://nodejs.org/)(> v4.x) correctly. --- @@ -23,7 +23,7 @@ Such features, together with packaging the production version are covered in thi ### 1. Installation -> Please make sure that you had installed [Node.js](https://nodejs.org/en/)(> v4.x) before using `antd-init`. +[antd-init](https://github.com/ant-design/antd-init/) is a demo only scaffold tool. If you want to create real world projects, [dva-cli](https://github.com/dvajs/dva-cli) is our recommendation. ```bash $ npm install antd-init -g diff --git a/docs/react/getting-started.zh-CN.md b/docs/react/getting-started.zh-CN.md index 1195e43389..62015ce1c8 100644 --- a/docs/react/getting-started.zh-CN.md +++ b/docs/react/getting-started.zh-CN.md @@ -7,7 +7,7 @@ Ant Design React 致力于提供给程序员**愉悦**的开发体验。 --- -在开始之前,推荐先学习 [React](http://facebook.github.io/react/) 和 [ES2015](http://babeljs.io/docs/learn-es2015/)。 +在开始之前,推荐先学习 [React](http://facebook.github.io/react/) 和 [ES2015](http://babeljs.io/docs/learn-es2015/),并确认 已经正确安装和配置了 [Node.js](https://nodejs.org/) v4.x 或以上。 ## 第一个例子 @@ -22,7 +22,7 @@ Ant Design React 致力于提供给程序员**愉悦**的开发体验。 ### 1. 安装脚手架工具 -> 使用 `antd-init` 前,务必确认 [Node.js](https://nodejs.org/en/) 已经升级到 v4.x 或以上。 +[antd-init](https://github.com/ant-design/antd-init/) 是一个用于演示 antd 如何使用的脚手架工具,真实项目建议使用 [dva-cli](https://github.com/dvajs/dva-cli)。 ```bash $ npm install antd-init -g From eb29fdada3e45fbf682ab4995457ce136b3f275f Mon Sep 17 00:00:00 2001 From: Wei Zhu Date: Sun, 19 Feb 2017 20:12:41 +0800 Subject: [PATCH 70/88] docs: Rewrite AutoComplete demos to ES6 component --- components/auto-complete/demo/antd.md | 25 ++++++++++--------- components/auto-complete/demo/basic.md | 20 +++++++-------- .../auto-complete/demo/non-case-sensitive.md | 14 ++++++----- components/auto-complete/demo/options.md | 20 +++++++-------- .../auto-complete/demo/uncertain-category.md | 20 +++++++-------- 5 files changed, 51 insertions(+), 48 deletions(-) diff --git a/components/auto-complete/demo/antd.md b/components/auto-complete/demo/antd.md index 2abfe91500..d47dccd00a 100644 --- a/components/auto-complete/demo/antd.md +++ b/components/auto-complete/demo/antd.md @@ -20,13 +20,12 @@ function onSelect(value) { console.log('onSelect', value); } -const Complete = React.createClass({ - getInitialState() { - return { - dataSource: [], - }; - }, - handleChange(value) { +class Complete extends React.Component { + state = { + dataSource: [], + } + + handleChange = (value) => { this.setState({ dataSource: !value ? [] : [ value, @@ -34,10 +33,12 @@ const Complete = React.createClass({ value + value + value, ], }); - }, - handleKeyPress(ev) { + } + + handleKeyPress = (ev) => { console.log('handleKeyPress', ev); - }, + } + render() { const { dataSource } = this.state; return ( @@ -51,8 +52,8 @@ const Complete = React.createClass({