Compare commits

...

994 Commits
2.2.0 ... 2.7.1

Author SHA1 Message Date
乐仪
1306c4656d - version -> 2.7.1
- rc-pagination -> ~1.7.0
- fix site bug
2017-02-10 20:32:55 +08:00
陆离
9711c6bbf6 Anchor position with offsetTop bug (#4817)
+ close #4706
 + `<Anchor offset={x} />` will calculate target position correctly.
2017-02-10 16:34:10 +08:00
Benjy Cui
5d2513ce91 docs: update img 2017-02-10 13:55:17 +08:00
afc163
948edb227f fix tabs border radius 2017-02-10 13:24:24 +08:00
Benjy Cui
6fdc6ff19a site: homepage will switch to right lang, close: #4552 2017-02-10 12:12:13 +08:00
Benjy Cui
a14bb37ae5 site: can search with google now, close: #4814 2017-02-10 11:46:57 +08:00
Benjy Cui
34edd91207 chore: remove useless code 2017-02-10 09:43:33 +08:00
Warren Seymour
7010dd018d Add 'middle' as a valid value for Table.props.size (#4819) 2017-02-09 22:43:58 +08:00
ddcat1115
16ad027988 change version slector position (#4799) 2017-02-09 19:46:23 +08:00
Benjy Cui
251930f183 docs: fix some link 2017-02-09 17:55:26 +08:00
Benjy Cui
bdd5be88f2 site: generate link with locale 2017-02-09 17:55:26 +08:00
Benjy Cui
a950a1298a site: upgrade bisheng to 0.21.0 2017-02-09 17:55:26 +08:00
afc163
ac23cca8b3 Fix missing ts types for TabPane, close #4776 2017-02-09 16:25:16 +08:00
afc163
df2982aacf Fix spec/layout demo, close #4816 2017-02-09 16:22:03 +08:00
afc163
d1b91bcc99 Fix direction of pop animation for Dropdown, ref #4811 2017-02-09 15:45:51 +08:00
ddcat1115
d71252ea12 improve Layout.Sider's animation effect (#4812) 2017-02-09 15:20:06 +08:00
afc163
5a643418d2 docs: Add missing demo and document fo Dropdown[placement], close #4811 2017-02-09 15:09:32 +08:00
Benjy Cui
c88cdc60ce docs: update docs for form, close: #4802 2017-02-09 14:50:25 +08:00
afc163
10199e5d96 docs: update customize theme doc
ref: dvajs/dva#562 dvajs/dva#575
2017-02-09 14:44:36 +08:00
afc163
4ec6bf3bcd Fix a strange cover bug with Affix, close #4800 2017-02-09 11:43:41 +08:00
偏右
e0c2b872ce upgrade @types/react version (#4741)
ref DefinitelyTyped/DefinitelyTyped#14284
2017-02-09 11:09:32 +08:00
zhenzong
fdaf15d16c fix issue #4783 (#4788) 2017-02-09 11:09:22 +08:00
陆离
fc3f4e1922 fix AutoComplete size (#4768)
*  fix AutoComplete size

 + close #4766

* use input mixin

* use css variables

*  use children directly instead of React.Children.toArray

 + close #4778
2017-02-09 10:45:42 +08:00
afc163
637c479c4c Fix Tabs in IE9, close #4795 2017-02-08 17:16:48 +08:00
afc163
5b14b4f1eb docs: update Col missing API in english doc 2017-02-08 15:22:33 +08:00
yiminghe
dbae84c83d add version (#4751)
* add version

* add version to dist
2017-02-08 14:53:18 +08:00
陆离
3789e0cbbb Affix listener bug fix (#4756)
*  Affix listener bug fix

 + close #4755
 + close #4760
 + clearScrollEventListeners before setTargetEventListeners
 + add tests for throttle
 + append affix test case

*  genMockFn -> fn()
2017-02-08 14:44:43 +08:00
Wei Zhu
f84dfbbaa9 Fix table filter in JSX (#4765)
Fix #4759
2017-02-08 14:43:00 +08:00
afc163
a07c71165a demo: update table demo code style 2017-02-08 14:42:33 +08:00
偏右
75a4b06e44 Unified border radius, close #4772 (#4773) 2017-02-08 14:21:29 +08:00
afc163
f9ee19ae05 Improve breadcrumb separator color for darker background 2017-02-08 14:09:27 +08:00
afc163
3bc202a721 update link to cn version 2017-02-08 13:15:19 +08:00
afc163
50ccc3ad7d fix link, #4793 2017-02-08 13:14:38 +08:00
afc163
33c171c04b docs: update for compatibility 2017-02-08 11:33:41 +08:00
Benjy Cui
9ed06dea8a docs: remove outdated warning, ref: #4783 2017-02-08 09:40:25 +08:00
Chikara Chan
64f6a71cc9 fix: should not render useless className when type is undefined (#4784) 2017-02-08 09:31:09 +08:00
zerob4wl
a39d435925 Update without-form-create.md (#4781)
typo
2017-02-07 21:38:14 +08:00
afc163
93e152268c remove it.only, ref #4779 2017-02-07 21:21:51 +08:00
afc163
a585f603d0 Fix Table selection page-jumping issue, close #4779 2017-02-07 21:09:51 +08:00
afc163
de185ddc19 docs: update text 2017-02-07 19:56:08 +08:00
afc163
cf22bb926a site: update footer style 2017-02-07 19:54:30 +08:00
afc163
ef5df24936 fix InputNumber onChange argument type 2017-02-07 17:27:28 +08:00
afc163
d8f6accbba docs: update input number api 2017-02-07 17:26:40 +08:00
afc163
1e55c145cc docs: update babel option 2017-02-07 17:20:59 +08:00
afc163
94f5a07f68 Add rowKey link into console warning message 2017-02-07 15:32:44 +08:00
afc163
168cec0dd1 docs: move Release Schedule to changelog 2017-02-07 15:22:16 +08:00
afc163
ac40780265 site: update footer link 2017-02-07 14:57:09 +08:00
Benjy Cui
5d7fc8c2b8 chore: add comment for tricky code 2017-02-07 12:10:20 +08:00
Benjy Cui
c565d42847 Revert "chore: remove useless code, close: #4402"
This reverts commit 9b77a21a16.
2017-02-07 12:05:12 +08:00
afc163
10d6486b4d docs: fix markdown link 2017-02-07 00:40:37 +08:00
Benjy Cui
9b77a21a16 chore: remove useless code, close: #4402 2017-02-06 18:04:37 +08:00
Benjy Cui
0408c8c133 style: update code style to fix lint 2017-02-06 15:12:02 +08:00
Benjy Cui
d2b8d65c87 style: update code style to please lint, close: #2179 2017-02-06 12:09:58 +08:00
Benjy Cui
382dd86475 chore: replace lesshint with stylelint 2017-02-06 12:09:58 +08:00
afc163
2196774b7f update less code style 2017-02-06 10:54:59 +08:00
Benjy Cui
766cded638 docs: update docs for Grid, close: #4744 2017-02-06 10:28:59 +08:00
Jesper We
f7aaa0d399 Fix issues with the new Swedish locale provider. (#4762) 2017-02-05 22:18:10 +08:00
afc163
0eb5c689a3 remove type="ghost" from demo 2017-02-04 22:35:33 +08:00
afc163
a5d69b893b add blank 2017-02-04 18:32:31 +08:00
afc163
a67264d68c Add aliases for icon naming style, close #4758 2017-02-04 18:10:25 +08:00
afc163
dbc2895899 Add Changelog 2017-02-04 18:06:57 +08:00
afc163
8775e7de5e Fix scroll Table lagging issue in IE, close #4522 2017-02-04 17:58:48 +08:00
afc163
70a0cc0940 fix badge borderColor 2017-02-04 01:14:10 +08:00
afc163
1a5f0f9fa7 remove whitespaces 2017-02-04 01:13:35 +08:00
afc163
b0fede60f7 update changelog 2017-02-03 19:04:12 +08:00
afc163
fb421f10e0 Change another approach to fix #4637
avoid issues like #4750 and #4753 caused by old way
2017-02-03 19:01:06 +08:00
偏右
f786f607cf Fix misplace Badge when browser zoom above 100% (#4749)
close #4747 #4290 #4176
2017-02-03 14:20:42 +08:00
afc163
24b1e1913a update button text 2017-02-01 12:00:12 +08:00
afc163
c17fc7c2ad remove blank line 2017-01-31 22:03:20 +08:00
afc163
a53e0668e1 update changelog for tree-select 2017-01-31 22:02:47 +08:00
afc163
5f8988a266 fix ghost primary button hover border color 2017-01-31 21:27:23 +08:00
afc163
f976eb8f1e Lock @types/react for #4741 temporarily 2017-01-31 21:14:16 +08:00
afc163
d79a08c468 update links 2017-01-31 21:12:52 +08:00
afc163
98ad1a9186 site: update home 2017-01-31 21:00:45 +08:00
afc163
99317b4661 Fix changelog PR link 2017-01-31 20:42:33 +08:00
afc163
9f06925a79 update Changelog 2017-01-31 16:10:48 +08:00
Graeme Yeates
1006015ef0 Add border customization variables (#4734)
* Add border customization variables (#4712)

* Make border styles customizable (fixes #4712)
2017-01-31 16:05:10 +08:00
afc163
7381cc95fe update input test case 2017-01-31 16:03:14 +08:00
afc163
767c4ab70d docs: update LocalProvider doc 2017-01-31 15:08:35 +08:00
afc163
99e7139634 docs: update LocalProvider doc 2017-01-31 15:08:07 +08:00
afc163
611b6acb11 site: update Home button text 2017-01-31 15:05:17 +08:00
afc163
3a3efc3e5a test input auto calculate height 2017-01-30 20:05:47 +08:00
afc163
30b2fa2c37 Move locale files 2017-01-30 18:20:57 +08:00
afc163
c9335c56ad update Dependency Status url 2017-01-30 18:09:37 +08:00
afc163
53b94a5996 site: update start button style 2017-01-30 17:44:25 +08:00
afc163
2b41f098c7 update changelog for input-number 2017-01-30 12:54:02 +08:00
afc163
ffcdbb66ab docs: improve changelog 2017-01-30 12:50:49 +08:00
afc163
b6b507d6be docs: improve changelog 2017-01-30 12:50:39 +08:00
RaoHai
2e0bfe975a 2.7.0 🎉 2017-01-30 12:17:15 +08:00
陆离
faf14df55e Merge pull request #4732 from ant-design/feature-2.7
antd 2.7 features
2017-01-30 11:23:48 +08:00
afc163
dda37d873b update LocaleProvider documentation 2017-01-27 17:54:57 +08:00
afc163
490a90b46f Add localProvider test for more language 2017-01-27 17:49:20 +08:00
afc163
95a74044b0 fix eslint warning 2017-01-27 17:26:52 +08:00
afc163
f2bb4afd4d Merge from master 2017-01-27 17:23:51 +08:00
Rex
aadf623dc6 support notification pop up from topLeft or bottomRight or bottomLeft (#4700)
* update snapshots

* update snapshots

* support notification pop up from topLeft or bottomRight or bottomLeft

* update snapshots

* 1. add test
2. update doc
3. support `placement` arguments in `open` method

* update doc

* update doc.
2017-01-27 17:12:25 +08:00
paranoidjk
f2e19c16be fix(transfer): checkall should response to filter result; fix #4654 (#4665) 2017-01-27 17:08:12 +08:00
Wei Zhu
85086f14b6 Using a special static property for type detecting (#4673)
Related issue: #4655
2017-01-27 17:08:05 +08:00
afc163
1a3ea43ebe Fix style prop of spin 2017-01-27 14:27:18 +08:00
Penghan Wang
29081542e6 doc: fix checkbox description error (#4731) 2017-01-27 13:54:15 +08:00
Benjy Cui
0d2b8989bc chore: update scripts 2017-01-27 11:32:03 +08:00
Penghan Wang
8a412ae260 doc: improve document for Form validateFields (#4730) 2017-01-27 10:39:09 +08:00
Andrey G
a96dd7a9f3 *up rc-menu (fixed bug with SubMenu) (#4727) 2017-01-26 19:10:45 +08:00
Benjy Cui
f0bdbfdd97 chore: improve readability for npm scripts 2017-01-26 17:04:31 +08:00
Bo Chen
f0adb4dc5f site: run ant-design on windows #4725
* 5hours's work

* 过年好!!

* lint issue
2017-01-26 16:51:06 +08:00
Valentin Vichnal
6c0dba60e7 Create reverseArrow prop for Sider (#4611)
Create reverseArrow prop for Sider
2017-01-26 12:30:37 +08:00
陆离
e270fa87af Mention in controlled mode suggestions bug fix (#4718)
*  Mention in controlled mode suggestions bug fix

 + close #4716
2017-01-26 12:09:26 +08:00
陆离
340385d34d pass style props to Affix (#4715)
+ close #4701
2017-01-26 12:08:40 +08:00
陆离
5cd111d486 recalculate width while resize (#4676)
+ close #4645
 + throttleByAnimationFrameDecorator as a function decorator
2017-01-26 11:23:54 +08:00
Benjy Cui
879bc9320c docs: update docs for Tooltip, close: #4724 2017-01-26 10:56:24 +08:00
Walter Barbagallo
5e3618c26d Fix Popover demo typo (#4703) 2017-01-25 21:27:14 +08:00
afc163
1ce6f7fc35 remove unused varable @layout-content-margin, close #4714 2017-01-25 21:18:06 +08:00
Simon Waloschek
fd233cf430 Added German locale (#4686)
* Added German locale

* Added German locale for pagination
2017-01-25 21:12:27 +08:00
Marius Ileana
882ecc370a Review of docs/spec/layout/demo/ceiling.md (#4709)
Small review corrections.
2017-01-25 21:11:02 +08:00
Marius Ileana
d2e862d3af Update aside.md (#4707)
Small review corrections.
2017-01-25 21:10:51 +08:00
Marius Ileana
a963fd1c60 Review of docs/spec/layout/demo/top.md (#4710)
Small review corrections.
2017-01-25 21:10:42 +08:00
afc163
a7517c7000 docs: update react-fa link 2017-01-25 12:00:38 +08:00
Wei Zhu
6a83118597 Upgrade rc-tree-select to 1.9.0 (#4698) 2017-01-25 11:15:41 +08:00
Marius Ileana
def370ee33 Update aside-collapse.md (#4708)
Small corrections as part of my review.
2017-01-25 11:12:04 +08:00
偏右
0dfdace923 Keep bundle size warning out of server side 2017-01-24 21:38:43 +08:00
afc163
edf9ebb0ef Fix Button font size inside Dropdown, close #4705 2017-01-24 17:59:17 +08:00
afc163
f4e887b784 remove steps demo 2017-01-24 16:07:03 +08:00
afc163
f3b2e155b5 style: Select height should flex with @input-height variable, close #4694 2017-01-24 15:20:06 +08:00
afc163
70188ae40e Merge branch 'feature-2.7' of github.com:ant-design/ant-design into feature-2.7 2017-01-24 15:10:34 +08:00
afc163
75128c8e22 fix ts error, ref #4675 2017-01-24 15:10:25 +08:00
afc163
e5a735e888 fix ts error, ref #4675 2017-01-24 15:10:04 +08:00
afc163
f4021d5255 Fix default locale in Upload, close #4697 2017-01-24 15:02:54 +08:00
afc163
a81bf8f73e use file.thumbUrl for <img /> in priority, close #4653 2017-01-24 14:59:39 +08:00
偏右
f850993fda More types of Button (#4679)
* Add Button[ghost] property, close #4625

* Add danger button

close #1308

* update API doc about ghost and danger property
2017-01-23 22:24:36 +08:00
afc163
128d35b391 update Changelog for semver 2017-01-23 21:12:19 +08:00
偏右
273c089aad Add test case for LocalProvider (#4693) 2017-01-23 21:08:16 +08:00
afc163
bb54dce712 Add test case for Menu openKeys undefined bug
ref #4677 and #4692
2017-01-23 19:10:50 +08:00
afc163
720ea3690a expand dot responsive area 2017-01-23 16:18:49 +08:00
afc163
eb2a02618f update steps API 2017-01-23 16:09:34 +08:00
afc163
179f030d45 Remove labelPlacement 2017-01-23 16:04:05 +08:00
afc163
cd9c85c969 fix code demo type 2017-01-23 15:52:03 +08:00
ddcat1115
09397187ac Steps support progressDot and labelPlacement (#4659) 2017-01-23 14:37:40 +08:00
afc163
52577054ad fix site style breaks when there is lib directory 2017-01-23 14:31:21 +08:00
afc163
5b9d8f0e5a Fix style of Tabs[tabPosition&type="card"], close #4669 2017-01-23 14:11:14 +08:00
kacjay
1ed890c095 fix Menu selected change error (#4677)
protect none parameter[openKeys, defaultOpenKeys] Menu
2017-01-23 13:55:39 +08:00
Gray Choi
bde7d1c624 Translate layout specification (#4542)
* create english index file

* tanslated the index

* tanslated aside.md

* adjust code format

* translated aside-collapse.md

* translated ceiling.md

* translated top.md

* translated top-aside.md
2017-01-23 11:08:46 +08:00
caoyi
cebf3a4c9e docs: fix Mention props API (#4683) 2017-01-22 19:49:08 +08:00
afc163
fa10c9dee0 adjust page margin in small device, ref #4682 2017-01-22 19:31:25 +08:00
afc163
04a94a691e site: update sider menu order 2017-01-22 19:16:54 +08:00
afc163
7518fde405 Fix align issue inside InputGroup, close #4680 2017-01-22 18:50:12 +08:00
afc163
bcd3b63c50 update tag colorful demo 2017-01-22 16:23:11 +08:00
afc163
9598169f90 fix tag snapshot test 2017-01-22 16:21:18 +08:00
afc163
f343d6c606 fix tag snapshot test 2017-01-22 16:20:20 +08:00
afc163
a183ee8ede Adjust Tag vertical-align and margin 2017-01-22 16:09:13 +08:00
afc163
b2ee5b2319 Adjust Tag vertical-align and margin 2017-01-22 16:08:54 +08:00
Wei Zhu
f91ac37ad3 docs: Oops, no onHover event. 2017-01-22 15:05:32 +08:00
Wei Zhu
774b778474 docs: Add note to Popconfirm, Popover and tooltip about child node.
Related issue: #4672
2017-01-22 14:29:24 +08:00
afc163
2d2534321a Fix Table fixed header align issue, close #4637 2017-01-22 11:15:14 +08:00
afc163
0b2342f9c2 update README.md 2017-01-22 01:19:04 +08:00
afc163
2292a8e6c5 update README.md 2017-01-22 01:15:29 +08:00
Wei Zhu
c681e8acf2 docs: Add backquote to default value 2017-01-21 22:35:42 +08:00
afc163
896bd7e55b fix site style breaks when there is lib directory 2017-01-20 21:41:24 +08:00
Wei Zhu
d596299210 Bump version 2017-01-20 21:34:34 +08:00
afc163
5a8d15333d site: update header style 2017-01-20 20:52:12 +08:00
Wei Zhu
703ccadb83 Add 2.6.4 CHANGELOG (#4667) 2017-01-20 20:23:43 +08:00
Wei Zhu
77b78a9389 docs: Unify type naming (#4636)
* Unify name of ReactNode type in document

* Lowser all string type name

* Lowercase all number type name

* Lowercase all boolean type name

* Unify array type

* Lowercase all object type name

* Unify mutilple types
2017-01-20 20:10:50 +08:00
ddcat1115
d2c00fae4b fix Layout demo (#4661)
* fix Layout demo

* update snapshot
2017-01-20 20:09:59 +08:00
afc163
67da059874 fix demo language 2017-01-20 18:39:13 +08:00
afc163
35523be6e9 Merge from master 2017-01-20 18:28:09 +08:00
陆离
bee522133e docs: Autocomplete optionLabelProp document (#4663)
close #4656
2017-01-20 16:16:31 +08:00
Wei Zhu
823ac6c139 fix TableColumnConfig exporting, #4660 2017-01-20 16:08:20 +08:00
afc163
9c6ce3fe48 fix RangePicker snapshot 2017-01-20 14:12:06 +08:00
afc163
e245facb48 Fix table snapshots 2017-01-20 13:43:39 +08:00
afc163
6c98d94b0d site: improve style of toc and color page 2017-01-20 13:41:26 +08:00
Benjy Cui
eb254572b7 site: upgrade bisheng to 0.20.0 2017-01-20 11:48:38 +08:00
afc163
2004c13653 Add semver link 2017-01-20 11:47:31 +08:00
afc163
fae7fd1658 Fix default value of Table showHeader, close #4658 2017-01-20 11:34:08 +08:00
偏右
48ea23e026 Update README-zh_CN.md 2017-01-20 01:10:06 +08:00
偏右
fd1ae531f4 Update README.md 2017-01-20 01:07:13 +08:00
Wei Zhu
fd861d6c0d Tweak empty table border (#4650) 2017-01-19 22:40:30 +08:00
afc163
ddc7054751 Fix fixed column table border radius 2017-01-19 21:51:53 +08:00
afc163
1db0e06bc4 Fix Table[small]'s title and footer border, close #4647 2017-01-19 21:49:03 +08:00
afc163
5203cabb8f update comment 2017-01-19 17:36:02 +08:00
afc163
fe5f8910dd Hide scroll bar in fixed header of table, close #4637 2017-01-19 16:08:21 +08:00
Benjy Cui
3e17551b7e site: improve build speed 2017-01-19 15:22:53 +08:00
afc163
e90189db8d site: improve style of component demo toc 2017-01-19 15:09:03 +08:00
afc163
df0426b2c9 workaround for table loading style in safari, close #4622 2017-01-19 15:08:28 +08:00
afc163
9189d3cc5d Fix Cascader[disabled] style with defaultValue, close #4648 2017-01-19 14:25:44 +08:00
Benjy Cui
e3758168e4 fix: should switch to right panels, close: #4561 (#4614)
* fix: should switch to right panels, close: #4561

* docs: update demo
2017-01-19 13:55:04 +08:00
Richard D. Worth
c427c3c4b9 lightweight.en-US.md typo 'while' -> 'whole' (#4643) 2017-01-19 09:00:56 +08:00
Richard D. Worth
e7f329a168 invitation.en-US.md change "" to &quot; (#4644) 2017-01-19 09:00:31 +08:00
afc163
bc842e2a67 Merge branch 'master' of github.com:ant-design/ant-design 2017-01-17 20:30:53 +08:00
Benjy Cui
11bcb58685 site: reduce bundle size 2017-01-17 15:24:13 +08:00
afc163
8f57451d8c fix snap test for cascader upgrade 2017-01-17 13:45:26 +08:00
afc163
34fec11e31 upgrade @types/react 2017-01-17 12:13:57 +08:00
afc163
83fbdf80cc upgrade rc-input-number for #4265 2017-01-17 12:10:39 +08:00
afc163
3a5d08383a upgrade rc-cascader and support keyboard, close #4411 2017-01-17 12:10:17 +08:00
afc163
ebc6d9d2c2 Merge branch 'master' of github.com:ant-design/ant-design 2017-01-17 11:47:44 +08:00
偏右
13952d451e Update README-zh_CN.md 2017-01-17 00:11:22 +08:00
偏右
5ad748c1fd Update README.md 2017-01-17 00:10:37 +08:00
偏右
0a68959207 Fix openKeys and defaultOpenKeys of Menu, close #3783 (#4609) 2017-01-16 21:13:59 +08:00
afc163
75abadac84 Add doc about clearing Modal old state 2017-01-16 14:30:07 +08:00
Benjy Cui
d0ddf94d78 docs: update deps for site 2017-01-16 12:19:45 +08:00
afc163
b7c5fb40ae update home page style 2017-01-16 12:05:03 +08:00
afc163
95bc803dc3 update doc 2017-01-16 11:35:44 +08:00
pd4d10
ca4697be55 doc: Fix star count (#4610) 2017-01-16 10:08:20 +08:00
chencheng (云谦)
82581f2217 fix(docs): port is not correct, Close #4607 (#4612) 2017-01-16 10:01:42 +08:00
afc163
efd1d1e89d Improve carousel default style 2017-01-15 22:48:57 +08:00
afc163
8d91206da1 Add react-fa 2017-01-15 15:14:54 +08:00
afc163
abd264ebf0 fix test case name 2017-01-15 14:37:22 +08:00
afc163
784915e55b Fix DatePicker time scroll issue, close #4412 2017-01-15 14:10:20 +08:00
afc163
041457fa5e fix typo 2017-01-15 13:39:44 +08:00
afc163
b245659887 update API table style 2017-01-15 13:15:30 +08:00
afc163
1bf0bab2a7 bump 2.6.3 2017-01-15 00:30:28 +08:00
afc163
55da11db22 Fix Popconfirm not response, close #4606 2017-01-15 00:27:02 +08:00
afc163
fc32c751ca update doc 2017-01-14 22:49:40 +08:00
afc163
a1a46ae57a update Changelog 2017-01-14 21:58:33 +08:00
afc163
25f95d467a remove update self, ref ant-design/antd-tools#29 2017-01-14 21:48:03 +08:00
afc163
9f1f932386 fix eslintignore 2017-01-14 21:30:09 +08:00
afc163
fd6fc86b21 improve form validating style 2017-01-14 20:59:37 +08:00
偏右
a0d27426e8 Add Changelog for 2.6.2 (#4603) 2017-01-14 20:55:29 +08:00
paranoidjk
4d3f574d05 fix: typo; caused by #4435 2017-01-14 17:07:17 +08:00
afc163
c3a2b44f58 Fix strong site anchor truncation in IE
screenshot:
https://zos.alipayobjects.com/rmsportal/jtXxUhVBfEslRIpDvwhP.png
2017-01-14 16:59:02 +08:00
kun sam
b6217e62df add warning when using Breadcrumb without its Item (#4435)
* add warning when using Breadcrumb without its Item

fix issue ' Warning: Unknown prop `separator` on <div> tag. When I using Breadcrumb #4403'

ps: 我是个前端beginner, - ( ゜- ゜)つロ, 这是我第一个PR welcome, 如果写错或者还有更好的写法请大神指正。thanks

* remove compatible and use type as condition

按照 @benjycui 的意见去掉了兼容项,并使用type判断
2017-01-14 15:25:37 +08:00
Rex
6e33285890 fix onVisibleChange arguments error (#4589)
* fix onVisibleChange arguments error

* add test

* trigger travis
2017-01-14 15:23:02 +08:00
Wei Zhu
c09cf95daa Fix Table filter test 2017-01-13 23:30:39 +08:00
偏右
6e3565b983 Add Form[hideRequiredMark] (#4500)
* Add Form[hideRequiredMark]

* omit hideRequiredMark

* Add test case for Form[hideRequiredMark]
2017-01-13 21:52:48 +08:00
偏右
10396419b5 Add preset color Tag (#4571)
* Add preset color Tag, close #4528

* Use color back over presetColor

* fix snap

* simplify isPresetColor
2017-01-13 21:25:55 +08:00
陆离
46c200896f Customize Input Component of AutoComplete (#4483)
* cherry-pick

* remove useless files

* remove useless files

* Group ts

* update interface

* ReactElement
2017-01-13 21:19:23 +08:00
Wei Zhu
65d1f721d3 Fix Table multiple levels filter menu (#4548)
fix #4541
2017-01-13 21:13:31 +08:00
Brett Lamy
78fe0a686f Update index.tsx (#4537) 2017-01-13 21:13:22 +08:00
偏右
3423d27493 When form layout is vertical, keep the colon inside label, close #4593 (#4599) 2017-01-13 21:12:31 +08:00
afc163
6a073c8c6e fix snap test 2017-01-13 19:03:59 +08:00
Hans Chan
3d58a3f608 docs: add property colon for Form.Item (#4505)
* docs: 修改错别字

* docs: add property `colon` for Form.Item

`colon` is available since 2.0.0-beta.1
2017-01-13 19:03:59 +08:00
Hans Chan
927581bb84 docs: add property colon for Form.Item (#4505)
* docs: 修改错别字

* docs: add property `colon` for Form.Item

`colon` is available since 2.0.0-beta.1
2017-01-13 18:05:24 +08:00
偏右
e032fa6a62 adjust entry file (#4594) 2017-01-13 17:48:30 +08:00
Benjy Cui
c4c1078f2d docs: update demos for Calendar 2017-01-13 17:11:26 +08:00
Benjy Cui
eeae03d681 docs: remove useless code 2017-01-13 15:14:06 +08:00
Benjy Cui
e459562cdc site: fix target demo highlight, close: #4545 2017-01-13 14:59:14 +08:00
afc163
d013952398 remove unused doc 2017-01-12 21:51:40 +08:00
afc163
de544ad21b fix useless className 2017-01-12 20:38:20 +08:00
Benjy Cui
ff67c6eee6 docs: add documentation of third-party and awesomeness (#4559)
* docs: add documentation of third-party and awesomeness

* docs: merge install.md into introduce.md

* docs: update recommendation components list
2017-01-12 17:57:04 +08:00
afc163
6a015f00e6 upgrade @types/react 2017-01-12 13:57:35 +08:00
Benjy Cui
75c0ade1ce test: update snapshot 2017-01-12 10:38:14 +08:00
Benjy Cui
97221a6f63 css: fix style issue, close: #4415 2017-01-12 10:35:17 +08:00
wallverb
c01ee02758 chore: Change AutoCompleteProps to extend SelectProps (#4565)
* Change AutoCompleteProps to extend SelectProps

* Extract common props into AbstractSelectProps
2017-01-12 09:23:56 +08:00
Tao Zhang
477fde8b7f docs: Updated form description (#4574) 2017-01-12 09:09:59 +08:00
Wei Zhu
0ff50fc79d docs: Update Table JSX api note 2017-01-12 00:03:35 +08:00
afc163
4654db312f Fix some lesshint problems 2017-01-11 21:45:09 +08:00
afc163
1dd5fce324 ignore lint temp js/jsx files in components 2017-01-11 21:25:52 +08:00
afc163
65f2d8eb71 shorter demo code 2017-01-11 20:20:38 +08:00
afc163
f978b52ce3 remove blanks 2017-01-11 20:08:52 +08:00
Wei Zhu
8a2b3470ef Document using Table in TypeScript (#4568)
* Allow any valid ReactElement as Table.Column

* Document using Table in TypeScript
2017-01-11 19:52:43 +08:00
VTHINKXIE
b305a9c7e7 update link of ant.design of angular 2 (#4570) 2017-01-11 19:21:37 +08:00
afc163
af9a2cd8fb update modal style 2017-01-11 19:15:16 +08:00
afc163
e0999eaec3 fix code indent 2017-01-11 11:32:17 +08:00
bokzor
47fcd7651f feat: Add french locale (#4538)
* add french locale

* Add french locale
2017-01-11 10:28:47 +08:00
afc163
29324ca59d Add less variables for TimePicker panel width, close #4194 2017-01-10 22:10:37 +08:00
afc163
3f5aebe85b Fix Table column.filteredValue null problem, ref #4550 2017-01-10 20:52:53 +08:00
偏右
aa89addcc2 Improve upload list (#4516)
* support prevent removing when return value is false, close #4456

* Add showRemoveIcon & showPreviewIcon into showUploadList

close #4384 & #4351

* fix typo
2017-01-10 20:15:02 +08:00
afc163
dc00b9ee96 Fix Search block again, close #4540 2017-01-10 15:11:43 +08:00
afc163
6af0842be8 fix table demo snapshot 2017-01-10 14:10:44 +08:00
afc163
088ecf18a4 cleaner demo 2017-01-10 14:09:19 +08:00
afc163
75b50e9731 wider the selection column and expand column of Table 2017-01-10 14:03:04 +08:00
afc163
1042681bcd Fix Table filter dropdown style 2017-01-10 13:46:52 +08:00
Benjy Cui
3fa5d10da3 Merge branch 'master' into feature-2.7 2017-01-10 10:50:40 +08:00
afc163
920a084c21 carousel should be undraggable and text-seletable defaultly 2017-01-09 23:21:18 +08:00
afc163
e66604cab3 optimize progress active style 2017-01-09 23:05:18 +08:00
afc163
8d25da0c3a Fix English grammar
follow
611c981346 (commitcomment-20407445)
2017-01-09 22:37:57 +08:00
afc163
611c981346 change slogan 2017-01-09 22:10:32 +08:00
afc163
01859fc581 update input doc 2017-01-09 22:03:10 +08:00
wallverb
a47c200f7c Fix validateTrigger type (#4536)
* Update validateTrigger type

* Update validateTrigger doc for en-US

* Update validateTrigger doc for zh-CN
2017-01-09 21:20:40 +08:00
afc163
69d6a23645 site: fix image 2017-01-09 21:14:22 +08:00
afc163
765ae70cf5 site: fix image 2017-01-09 21:08:19 +08:00
afc163
452aa84d9d fix table test case typo 2017-01-09 21:06:04 +08:00
afc163
d0727df147 update doc about Import on Demand 2017-01-09 21:03:12 +08:00
afc163
1c493ad798 Fix error when Table[pagination] change, close #4532 2017-01-09 20:49:00 +08:00
afc163
7548f2068f remove comment 2017-01-09 19:35:41 +08:00
Benjy Cui
5fd3baaff0 docs: update outdated docs 2017-01-09 18:00:30 +08:00
Benjy Cui
f436b5c2f4 deps: upgrade rc-form, close: #4374 2017-01-09 17:40:01 +08:00
afc163
82d18db79f Improve collapse style and add a custom style panel demo 2017-01-09 17:19:26 +08:00
Benjy Cui
0aabdb3d8b fix: locale should follow LocaleProvider, close: #4495 (#4503)
* fix: locale should follow LocaleProvider, close: #4495

* test: update snapshot

* fix: fix some bugs
2017-01-09 16:25:58 +08:00
Benjy Cui
b96601decb test: update snapshot 2017-01-09 14:56:14 +08:00
afc163
37541e3bfe Fix Search block style 2017-01-09 14:24:08 +08:00
afc163
361169a3e4 use yarn over npm in create-react-app doc 2017-01-09 13:50:49 +08:00
afc163
b5d0acee45 Merge branch 'master' into feature-2.7 2017-01-09 12:56:36 +08:00
afc163
6dcfa9519c fix snapshot 2017-01-09 12:56:16 +08:00
afc163
6a8c88fd6b Merge branch 'master' into feature-2.7 2017-01-09 12:10:30 +08:00
afc163
c208aea654 demo: fix duplicate key 2017-01-09 12:10:08 +08:00
Benjy Cui
dd43704108 site: fix key 2017-01-09 12:01:15 +08:00
afc163
1835961af1 Merge branch 'feature-2.7' of github.com:ant-design/ant-design into feature-2.7 2017-01-09 11:54:44 +08:00
afc163
c040c410e2 Merge branch 'master' into feature-2.7 2017-01-09 11:54:29 +08:00
afc163
024e398ad0 Fix lint for latest eslint-config-airbnb 2017-01-09 11:51:56 +08:00
Wei Zhu
6eb09fe98f Keep js[x] files ignoring 2017-01-09 11:34:06 +08:00
Hans Chan
ef6c19e97b docs: add property colon for Form.Item (#4505)
* docs: 修改错别字

* docs: add property `colon` for Form.Item

`colon` is available since 2.0.0-beta.1
2017-01-09 11:03:35 +08:00
afc163
a0f57a2094 update Changelog 2017-01-08 20:10:00 +08:00
afc163
5361ff7351 update Changelog 2017-01-08 20:08:52 +08:00
afc163
de0805899f update links 2017-01-08 20:06:51 +08:00
afc163
7d75a2673a components/date-picker/locale/sv_SE.jsx 2017-01-08 19:24:55 +08:00
Sean Sun
456860f61c imporve the user experience of the official site (#4457)
* normalize code based on lint message

* listening url changes instead of writing hard code

* change listen
2017-01-08 19:16:13 +08:00
Pixy Yuan
a2bef2b87e feat: Modal.confirm add maskClosable option (#4488) (#4490)
* feat: Modal.confirm add maskClosable option (#4488)

* feat: Modal.confirm add maskClosable option (#4488)
2017-01-08 19:14:28 +08:00
Jesper We
c6f6de3605 feat: Add support for Swedish locale (#4455)
* Swedish locale

* Create sv_SE.tsx

* Create sv_SE.tsx

* Create sv_SE.tsx
2017-01-08 19:14:28 +08:00
Rex
93128d1481 feat: add slider vertical style (#4473) 2017-01-08 19:14:02 +08:00
陆离
f54e822930 feat: Transfer on search change (#4464)
*  add `onSearchChange(direction: 'left'|'right') => void ` of Transfer

* typo
2017-01-08 19:14:02 +08:00
Benjy Cui
df18edda79 chore: update link to locale format 2017-01-08 19:14:02 +08:00
Jesper We
11ebc915eb feat: Add support for Swedish locale (#4455)
* Swedish locale

* Create sv_SE.tsx

* Create sv_SE.tsx

* Create sv_SE.tsx
2017-01-08 19:14:01 +08:00
Wei Zhu
f6c0e69af5 cleanup npm scripts (#4499)
* Cleanup npm scripts

* Lint fix

* Don't need ignore js files

* Upgrade jest

* Add components index.tsx test
2017-01-08 17:04:09 +08:00
ddcat1115
6495ef3592 fix Layout style (#4506)
* fix #4459

* improve
2017-01-08 17:03:47 +08:00
afc163
b978937af8 fix jest snapshot 2017-01-08 16:59:34 +08:00
afc163
8e77e1710d move ga script into head 2017-01-07 23:30:33 +08:00
afc163
9e4885d959 update select doc 2017-01-07 22:15:22 +08:00
afc163
c0ec375e8e Fix documentation links, close #4496 2017-01-07 22:09:17 +08:00
afc163
237871da32 update spin document 2017-01-07 22:07:09 +08:00
afc163
31d6aca303 move spin variables to default.less 2017-01-07 22:04:52 +08:00
afc163
92c3bef888 Adjust spin style 2017-01-07 22:03:40 +08:00
afc163
1a8f000e35 update doc 2017-01-07 21:28:44 +08:00
Rafael Cosman
b10fa928f1 Improves english of README.md (#4512)
Hi. I'm a fan of this project and a native English speaker. I thought I'd take a minute to fix a few English usage issues in the README. Happy to help with other documentation if I have time.
2017-01-07 14:53:39 +08:00
Benjy Cui
3f20979fd7 bump 2.6.1 2017-01-06 18:15:30 +08:00
afc163
1fbebd4ecf Fix a Cascader align bug 2017-01-06 16:55:38 +08:00
afc163
0d38fefb00 Fix Menu[theme=dark] selected and disabled style, #4440 2017-01-06 11:36:54 +08:00
afc163
1b10733e47 Update tree doc 2017-01-06 10:46:25 +08:00
afc163
343b3dfc08 update Changelog 2017-01-06 10:43:00 +08:00
Benjy Cui
435eed2e23 site: fix lang change in home page 2017-01-06 09:08:36 +08:00
afc163
0187384445 refactor for code style 2017-01-06 01:33:09 +08:00
feng zhi hao
0780b64099 style: fix header text color in home page (#4477) 2017-01-05 20:35:56 +08:00
afc163
e2b8aee202 fix snapshot 2017-01-05 17:24:14 +08:00
afc163
41ff783868 Add name type for Input, close #4479 2017-01-05 17:19:50 +08:00
afc163
657c707a79 Hide useless prop Form[horizontal] 2017-01-05 16:57:41 +08:00
afc163
53371dfe3e Add plain text form item in demo, close #4465 2017-01-05 16:40:21 +08:00
afc163
9df1eb91db Add form layout demo and fix vertical form style 2017-01-05 16:32:50 +08:00
afc163
a53bb4bfe4 simplify Input.Search code 2017-01-05 15:53:04 +08:00
afc163
26d3c506b3 simplify select combobox demo 2017-01-05 15:47:19 +08:00
afc163
ec35121bae update demo title 2017-01-05 15:35:43 +08:00
afc163
c4ac4d1eca fix Input prefix and suffix vertical align style 2017-01-05 15:34:30 +08:00
Benjy Cui
d4132ac558 chore: add missing definition for Modal 2017-01-05 12:08:43 +08:00
陆离
a0498e436f docs: add document for afterClose props for Modal (#4448)
+ close #4445
2017-01-05 12:06:27 +08:00
Wei Zhu
4305ca7ab0 docs: Docment Select.defaultActiveFirstOption 2017-01-04 18:46:39 +08:00
陆离
e36039acf8 chore: Spinning Pagination of table while loading (#4462)
*  Spinning Pagination of table while loading

 - close #4461

* update snapshots of table
2017-01-04 18:43:11 +08:00
afc163
cfcf72e70e update doc 2017-01-04 15:25:53 +08:00
afc163
6750c0b82b Make color value can be selectable 2017-01-04 15:13:55 +08:00
afc163
4443db4de6 css code style 2017-01-04 14:28:56 +08:00
afc163
2c6881a24a Fix error colorPalette is not defined in some situations
close ant-design/ant-motion#44
2017-01-04 14:27:45 +08:00
afc163
56bd431cc6 clean demo 2017-01-04 11:07:49 +08:00
afc163
11f509a972 clean demo 2017-01-04 11:00:58 +08:00
Benjy Cui
9d92066d1f chore: update data-picker detail, ref: #4415 2017-01-04 10:48:40 +08:00
chencheng (云谦)
0230385e95 docs: update practical-projects (#4385) 2017-01-04 10:11:53 +08:00
afc163
d4993ce3e0 Fix less compile error 2017-01-03 20:11:13 +08:00
Benjy Cui
4db6d3b915 site: fix language switch in Firefox, close: #4360 2017-01-03 18:03:02 +08:00
偏右
15b81d7ec8 test: Add test case for components/index.tsx (#4450) 2017-01-03 16:15:05 +08:00
Benjy Cui
29e598a3f3 docs: add missing docs for Option[title] 2017-01-03 16:00:34 +08:00
Jialei
96d3093b14 fix: placeholder in time-picker can be empty string (#4446) 2017-01-03 15:32:43 +08:00
Benjy Cui
fe706ebf0d chore: update ISSUE_TEMPLATE.md 2017-01-03 15:00:41 +08:00
偏右
8f3dc0f16e Update introduce.en-US.md 2017-01-03 14:21:42 +08:00
afc163
3ecc5f6c85 Fix search text color in Home page 2017-01-03 00:17:23 +08:00
afc163
d0df37ed42 Fix Menu[theme="dark"] text color, close #4440 2017-01-03 00:12:23 +08:00
afc163
372a44a92a update doc about startsWith 2017-01-02 23:45:20 +08:00
Edd Hannay
ec2bec5417 Add tokenSeparators prop to Select TS definitions (#4441)
[The documentation](https://ant.design/components/select/) lists the `tokenSeparators` property on the `Select` component, but the TypeScript definition for the component does not contain the `tokenSeparators` property. The underlying `rc-select` component [defines tokenSeparators](https://github.com/react-component/select/blob/master/src/Select.jsx#L79) as `PropTypes.arrayOf(PropTypes.string)`, so I've added it as an optional TypeScript property of type `string[]`.

- Add tokenSeparators to SelectProps in Select Component
2017-01-02 19:11:13 +08:00
乐仪
ffa7f9b1ba CHANGELOG - v2.6 2017-01-02 02:14:40 +08:00
ddcat1115
c5b154294e add attribute compact for InputGroup (#4309)
* add attribute `compact` for InputGroup

* improve
2017-01-02 00:12:41 +08:00
偏右
d811ebee5c New color system (#4426)
* Add new color patterns algorithm

* Add color palettes

* update other colors

* fix gray color

* update more tint/shade to colorPalette

* new font color

* Update doc for new color system

* improve doc style
2017-01-01 22:20:06 +08:00
afc163
fb6858c3cc Fix hasFeedback and Select style detail for #4436 2017-01-01 17:39:27 +08:00
Jesper We
d258ace146 Fix #4431 Overlapping graphics with<Select> in <Form.Item ... hasFeedback={true} (#4436) 2017-01-01 17:20:08 +08:00
afc163
793a2d284e Add spin demo test snapshot 2017-01-01 15:42:54 +08:00
陆离
7f7d94068a add delay props of Spin (#4424)
*  add `delay` props of Spin

 + close 4306
 + Specifies a delay for loading state. If `spinning` ends during delay, loading state won't appear.

* improves
2017-01-01 01:13:34 +08:00
Rex
1b8a280614 support suffix (#4283)
* support suffix

* optimize prefix and suffix

* 1. Optimize prefix and suffix implementation
2. Improve the api document
3. Optimize `Input.Search` implementation

* update snapshots
2017-01-01 01:06:19 +08:00
偏右
e4bee3425a Upgrade rc form (#4430)
* support nested form item name by upgrade rc-form

react-component/form#48

* Fix dynamic form demo
2016-12-31 23:47:07 +08:00
Wei Zhu
2390c055aa Ignore yarn.lock 2016-12-31 20:27:23 +08:00
Wei Zhu
f2dbf83216 Specify eslint-plugin-markdown version since yarn complains it. 2016-12-31 20:27:13 +08:00
afc163
c0a44adb56 Fix Cascader[disabled] background, close #4434 2016-12-31 16:08:58 +08:00
afc163
c285f5f651 fix snapshot 2016-12-30 22:36:10 +08:00
afc163
45051aebac fix changelog 2016-12-30 21:54:09 +08:00
afc163
237d6ab62b fix layout demo 2016-12-30 21:44:10 +08:00
偏右
0062867274 Feature 2.6 (#4429)
* new Layout Component (#4087)

* change Anchor type

* new Layout

* Component update && add snap

* Revert "new Layout Component" (#4131)

* add Layout (#4169)

* add Layout

* update

* fix snapshot

* Improve layout component

1. update demo code
2. drop `position` of Sider
3. improve demo style
2016-12-30 21:41:28 +08:00
afc163
c3982b02aa Fix monthCellContentRender and wrong documentation, close #4394 2016-12-30 15:04:13 +08:00
Wei Zhu
0a3e57a61e Using padding for node gaps, fix #4371 (#4398) 2016-12-30 14:32:34 +08:00
Kevin Ivan
fd469ea1a5 grammar typo (#4379) 2016-12-30 14:30:20 +08:00
Rex
c8a16b10bd fix the blue border in some scenes (#4382) 2016-12-30 14:27:23 +08:00
afc163
959fc6b2e3 update docs 2016-12-30 14:13:43 +08:00
afc163
2583798cce Add demo for Case-insensitive search Select, close #4408 2016-12-30 14:05:27 +08:00
afc163
20cd35abe3 fix demo 2016-12-30 14:05:27 +08:00
Wei Zhu
29e4717fe3 Fallback table record key to data index. (#4397)
In last PR #4185, we removed data index from record key, it
leads to inconformity behavior.
2016-12-30 13:50:11 +08:00
afc163
f816455421 update Changelog 2016-12-30 13:45:44 +08:00
afc163
7f41114ab7 fix site layout back 2016-12-30 13:44:24 +08:00
afc163
662b213137 Fix Menu[dark] item background, close #4414 again 2016-12-30 13:16:30 +08:00
afc163
35d91d8dee Fix Menu[dark] item background, close #4414 2016-12-30 12:16:29 +08:00
Wei Zhu
42f98e6779 docs: fix typo. 2016-12-29 21:41:46 +08:00
可乐
2e4e1fcaef 避免 value 正好是数字 0 (#4401) 2016-12-29 13:42:14 +08:00
偏右
3deb8ec590 Delete .hound.yml 2016-12-28 20:08:36 +08:00
ddcat1115
c4b637b7de site: fix site style (#4386) 2016-12-28 17:54:07 +08:00
afc163
967b9a77a9 update doc 2016-12-28 15:50:59 +08:00
afc163
8852dfd767 update doc titles 2016-12-28 15:45:37 +08:00
afc163
047476efaf update customize-theme doc 2016-12-28 00:23:32 +08:00
afc163
d570d03698 improve document for Form setFields, close #4370 2016-12-27 21:14:00 +08:00
afc163
22a0604ed5 update doc for babelrc 2016-12-27 21:07:16 +08:00
afc163
869fc54cf7 fix snapshots 2016-12-27 19:32:36 +08:00
afc163
668c481110 Fix table radius without column header, close #4373 2016-12-27 18:24:30 +08:00
afc163
e91f4f2335 improve style code 2016-12-27 17:57:17 +08:00
afc163
3e00fa8e64 update dynamic-settings table demo 2016-12-27 17:47:27 +08:00
afc163
b0a5601c98 fix less variables in slider 2016-12-27 17:04:10 +08:00
afc163
9b8a26ba17 upgrade code style 2016-12-26 19:46:01 +08:00
afc163
d81c425588 fix snapshot 2016-12-26 18:24:00 +08:00
afc163
f07f33d879 fix snapshots 2016-12-26 11:16:28 +08:00
Babajide Fowotade
8c0692f5e7 Fix babel dir path to modify in create-react-app docs (#4362) 2016-12-26 11:15:36 +08:00
afc163
7602faed65 improve playground.md 2016-12-25 21:31:33 +08:00
afc163
1ef76b40ec update Slider doc 2016-12-25 21:10:14 +08:00
afc163
ee17abfa9d Add Grid playground demo 2016-12-25 21:09:49 +08:00
afc163
0d0d63a741 Improve responsive layout of Pagination, close #4349 2016-12-25 19:55:12 +08:00
afc163
27b3cdab05 better responsive page layout 2016-12-25 19:18:08 +08:00
Alexandre Kirszenberg
517720895d Dropdown.Button as a single non-wrappable element (#4355) 2016-12-24 23:12:37 +08:00
RaoHai
72e136405e 2.5.3 🎄🎄🎄 2016-12-24 15:55:26 +08:00
afc163
cd056e8923 update README.md 2016-12-23 18:06:28 +08:00
afc163
cee6fa49e8 Improve layout spec demo style 2016-12-23 17:58:37 +08:00
Benjy Cui
4b08601f0f style: update code style 2016-12-22 17:09:11 +08:00
Benjy Cui
588f0c3d1c chore: expose loadData for Cascader, close: #4215 2016-12-22 16:35:37 +08:00
Benjy Cui
4967d36d2a docs: update demos order for Cascader 2016-12-22 16:23:33 +08:00
afc163
25f8095b67 Add Menu[inlineIndent] documentation 2016-12-22 15:06:37 +08:00
chencheng (云谦)
7a67f5ce0f docs: update pratical-projects for dva-cli@0.7 (#4322) 2016-12-22 14:25:01 +08:00
偏右
ee5a8beca1 Add doc about using antd with create-react-app (#4294)
* Add doc about using antd with create-react-app, close #2526

* translate to english

* update comment

* update
2016-12-22 14:24:50 +08:00
Benjy Cui
114016dd4e chore: add alias for getTooltipContainer 2016-12-22 12:08:17 +08:00
Benjy Cui
8b3e488485 docs: update docs for Tooltip Popconfirm Popover 2016-12-22 12:00:57 +08:00
afc163
2d19ea8344 Add comment 2016-12-22 11:54:03 +08:00
afc163
489d7cf997 Keep Search same default width as Input, close #4334 2016-12-22 11:53:53 +08:00
afc163
6d142b11eb update install documentation 2016-12-21 19:34:20 +08:00
afc163
08893a47cb fix card snap 2016-12-21 12:19:48 +08:00
afc163
215c2fd7af Fix nested Tabs style, close #4317 2016-12-21 12:00:42 +08:00
afc163
07c39529bb Merge branch 'master' of github.com:ant-design/ant-design 2016-12-21 11:45:39 +08:00
Wei Zhu
3dc2ed6a64 Add forgotten snap back. 2016-12-21 00:53:35 +08:00
Wei Zhu
ba9d95bba9 Simplify module export test 2016-12-21 00:00:46 +08:00
Edd Hannay
8382023409 docs: fix typo in Form demo (#4313)
- Rename checkPassowrd function checkPassword
2016-12-20 20:28:44 +08:00
HJin.me
0e92fa3f23 chore: improve Cascader and Tooltip's get(Popup|Tooltip)Container declaration (#4303) 2016-12-20 14:37:33 +08:00
afc163
847a60ee56 Learn card loading animation from hashnode.com 2016-12-20 12:22:45 +08:00
Benjy Cui
e6052d5832 docs: update demo for badge 2016-12-20 11:06:40 +08:00
afc163
ecd2e57ef2 controlled DatePicker should not be clear 2016-12-20 11:01:10 +08:00
Benjy Cui
77801ff436 fix: CI failed and ts null check 2016-12-20 10:23:25 +08:00
Benjy Cui
3ec2c1bcfa Revert "site: use cdn to improve performance, close: #3646"
This reverts commit 5d72c6d7e5.
2016-12-20 10:19:17 +08:00
Benjy Cui
f3c55c6ef8 Revert "site: use cdn to improve performance, close: #3646"
This reverts commit 47f56eab23.
2016-12-20 10:19:06 +08:00
Wei Zhu
8018529582 Ensure checkbox props cache is cleared after dataSource changes. (#4288)
Fix #4245
2016-12-19 21:10:06 +08:00
Benjy Cui
47f56eab23 site: use cdn to improve performance, close: #3646 2016-12-19 20:22:29 +08:00
Benjy Cui
5d72c6d7e5 site: use cdn to improve performance, close: #3646 2016-12-19 18:08:07 +08:00
Benjy Cui
9f2e6c8baa docs: update demo for SSR 2016-12-19 17:54:25 +08:00
afc163
0620d52adc Allow to config top multiply 2016-12-19 16:50:20 +08:00
Benjy Cui
62c22f31a9 docs: update demo for table 2016-12-19 16:45:58 +08:00
Sergio Crisostomo
7bc43493c1 docs: Add info about how to turn off pagination (#4285) 2016-12-19 16:37:29 +08:00
Sean Sun
b345074065 fix the lack of '*-offset-0' / '*-push-0' styles, close #4223 (#4281) 2016-12-19 16:18:39 +08:00
Benjy Cui
1351b5da5d refactor: remove splitObject 2016-12-19 15:19:15 +08:00
Benjy Cui
4758302ad5 deps: upgrade antd-tools, close: #4208 2016-12-19 14:01:52 +08:00
Rex
ca8e88971a fix: callback is triggered only when the value changes (#4278)
* callback is triggered only when the value changes

* optimize lastValue assignment
2016-12-19 10:52:47 +08:00
afc163
e1d73eb424 update form documentation 2016-12-18 14:54:12 +08:00
afc163
5043a165f5 update english docs 2016-12-16 22:10:47 +08:00
afc163
655533f9ff Add release schedule in README, close #4178 2016-12-16 20:51:55 +08:00
afc163
48de73b721 Fix a FormItem mis-align bug, close #4271 2016-12-16 20:24:50 +08:00
Rex
05e9587ec8 <CheckboxGroup /> support className (#4276) 2016-12-16 20:23:36 +08:00
afc163
60606d0e37 update changelog link 2016-12-16 19:19:05 +08:00
Benjy Cui
d7498c0af6 Test transfer (#4191)
* refactor: use Checkbox directly

* test: add test case for Transfer
2016-12-16 17:59:52 +08:00
Wei Zhu
d7a110552b Don't use index as row key. (#4185)
* Ensure warning if key is undefined.

* Ensure getRecordKey receives index

* Remove rowKey's second parameter from doc.
2016-12-16 17:53:08 +08:00
Benjy Cui
ba0dce98f5 chore: add warning for invalid usage, ref: #4274 2016-12-16 17:12:48 +08:00
Patrick Gidich
21ec9cb985 fix: issue with TypeScript for children of LocaleProvider (#4234)
Similar to issue:
https://github.com/ant-design/ant-design/issues/4140

Fixed in similar manner to how this issue was resolved:
a28743f648 (diff-9ae0a9df19960a2d1b9608f30f6b19b3)

children?: React.ReactElement<any>
2016-12-16 16:42:50 +08:00
BK Heleth
a973ae18b5 docs: update document (#4263) 2016-12-16 16:38:14 +08:00
Wei Zhu
92edf23d4e docs: Fix search tree demo expand, close #4233 2016-12-15 21:45:56 +08:00
feng zhi hao
6e416f4746 optimize Radio declaration (#4260)
chore: optimize Radio declaration (#4260)
2016-12-15 16:25:15 +08:00
Wei Zhu
c547569d05 docs: Document callback parameters for Pagination 2016-12-15 16:07:04 +08:00
afc163
1f9e61ee69 update default font family 2016-12-15 15:31:28 +08:00
Wei Zhu
9a9db2411b Unify badge style 2016-12-15 15:28:22 +08:00
afc163
5b48656b82 Fix Menu[vertical] selected item background, close #4253 2016-12-15 12:12:35 +08:00
afc163
d9b6ff5c8f revert switch height 2016-12-15 12:06:38 +08:00
Pierre
827aa2f94c style: remove hardcoded inputs height (#4175)
* remove hardcoded inputs height

* revert pagination input height

* revert pagination input heights bis
2016-12-15 11:17:09 +08:00
duzliang
304ced31bb docs: Update CHANGELOG.zh-CN.md (#4249)
修改【### 2.x 不兼容改动】中的错别字
2016-12-15 09:29:37 +08:00
80ea247fa9 fix(Dropdown): onVisibleChange param. (#4252)
* fix(Dropdown): onVisibleChange param.

* doc(Dropdown): update onVisibleChange argument
2016-12-14 20:33:13 +07:00
afc163
bda303a38e fix snap 2016-12-14 18:11:01 +08:00
afc163
dc4cfd3e5f Improve notification style when there is no descrption 2016-12-14 18:07:36 +08:00
afc163
99824d3e9f remove unused className 2016-12-14 17:58:06 +08:00
afc163
b7597e947f update notification demo code style 2016-12-14 17:57:15 +08:00
afc163
a8293c7f43 Merge branch 'master' of github.com:ant-design/ant-design 2016-12-14 15:49:33 +08:00
Wei Zhu
587b874fc8 tests: Add button tests 2016-12-14 15:44:38 +08:00
afc163
47c8445b80 revert pre-commit version 2016-12-14 15:40:13 +08:00
Wei Zhu
666e80a1ba tests: Fix table import 2016-12-14 15:38:26 +08:00
Wei Zhu
07103b9fb6 Don't ignore test files. 2016-12-14 14:48:09 +08:00
Wei Zhu
17a0a33283 Restructure tests. 2016-12-14 14:41:39 +08:00
764cd9439d fix(Cascader): onChange's first parameter should be string Array #4231 (#4232) 2016-12-13 21:28:39 +07:00
afc163
dba6b70e38 update upload API, #863 2016-12-13 18:48:11 +08:00
Benjy Cui
f0d1b94163 site: should remove locale info when switch to old site, close: #4224 2016-12-13 14:19:23 +08:00
afc163
7cf4192c4e Add demo snap 2016-12-13 13:48:37 +08:00
afc163
6c99f3a2cb downgrade pre-commit for observing/pre-commit#89 2016-12-13 13:29:27 +08:00
afc163
303fc113c2 Add coordinated form demo 2016-12-13 13:28:16 +08:00
afc163
a15d2c014a update labelInValue description 2016-12-13 11:44:59 +08:00
afc163
9dfe19f544 update labelInValue description 2016-12-13 11:43:31 +08:00
afc163
f1c828c71d update links 2016-12-12 20:44:40 +08:00
afc163
b4089638a4 fix home page background 2016-12-12 13:43:52 +08:00
Benjy Cui
a985c15872 deps: upgrade rc-upload 2016-12-12 12:08:15 +08:00
Jieraaa
abba1558c4 style:fix the bug of pseudo class (#4210) 2016-12-11 23:55:30 +08:00
弘树@阿里
e280b1ac4b docs: Update introduce.zh-CN.md (#4193)
* Update introduce.zh-CN.md

save dependency for `antd` using `npm i`

* Update introduce.zh-CN.md

Modify `-S` to `--save`

* Update introduce.en-US.md

add `--save` for `npm install`
2016-12-11 18:28:46 +08:00
afc163
16808eeadb fix test snap 2016-12-11 14:08:15 +08:00
afc163
3af1821bde remove whitespaces 2016-12-11 14:05:19 +08:00
afc163
f83b2c111e fix eslint warning 2016-12-11 14:01:14 +08:00
afc163
b912f1cea6 Fix DatePicker[showTime] default width 2016-12-11 13:59:06 +08:00
Wei Zhu
86a2cf326d Bump version 2016-12-10 21:39:44 +08:00
Wei Zhu
c1c2e13b9d 2.5.2 CHANGELOG (#4198) 2016-12-10 21:12:46 +08:00
Rex
bc937aceb8 <Input /> addon have spacing when in table (#4201) 2016-12-10 01:03:16 +08:00
Benjy Cui
3e14ab3a0d site: improve UX in first load 2016-12-09 14:24:38 +08:00
Benjy Cui
b768533100 site: update html indentation 2016-12-09 14:14:31 +08:00
Wei Zhu
7413c61b23 Add missing semicolon. 2016-12-09 13:10:33 +08:00
陆离
5b779e8e8e Exposing onFocus and onBlur callback of Mention (#4164)
*  Expose `onFocus` and `onBlur` callback of Mention

 + close #4163

* add event arguments
2016-12-09 13:03:09 +08:00
Benjy Cui
60da9909d3 site: improve loading performance (#4112)
* site: should generate html file for both of en and cn, ref: #3934

* site: remove loading animation

* site: fix header menu highlight

* site: improve detail

* deps: update
2016-12-09 13:02:16 +08:00
chchen
3382abde65 css: set dropdown's background color with @component-background (#4160) 2016-12-09 10:35:13 +08:00
Benjy Cui
383101830a docs: update demo 2016-12-08 18:15:10 +08:00
Benjy Cui
192ca5d898 css: update icon code, close: #4189 2016-12-08 17:01:51 +08:00
Wei Zhu
66f7b050eb Read initial visible state from column.filterDropdownVisible if it's available. (#4182)
fix #4162
2016-12-08 11:18:35 +08:00
Wei Zhu
e1efc29150 Enable Table sortOrder test. 2016-12-08 11:17:13 +08:00
Benjy Cui
36a4304de4 style: update code style for test case 2016-12-08 11:08:13 +08:00
Babajide Fowotade
19b04422ef docs: fix broken changelog link on introduce page (#4177) 2016-12-08 09:00:54 +08:00
Wei Zhu
536aed3ffe Improve Table testing (#4151) 2016-12-07 20:59:20 +08:00
Benjy Cui
000085eb36 style: update code style for Transfer 2016-12-07 18:08:52 +08:00
Wei Zhu
1f36734cb6 Update snapshots for tabs 2016-12-07 11:53:14 +08:00
Benjy Cui
d94f0ab09a docs: update EditableTagGroup demo 2016-12-07 11:08:30 +08:00
Benjy Cui
904be38493 docs: update locale format (#4150) 2016-12-07 10:45:20 +08:00
Benjy Cui
4afb7b4b33 fix: unify selected options format, close: #4096 (#4134) 2016-12-07 10:43:06 +08:00
Benjy Cui
c48d7b557e fix: container component should not use transform, close: #3943 2016-12-07 10:39:26 +08:00
kdenz
aab32236c6 hours array should be from 0 to 23, not 0 to 59 (#4157) 2016-12-07 10:05:31 +08:00
Joe Hsu
3fe99ea973 docs: double negative (#4161) 2016-12-07 09:20:09 +08:00
陆离
f36f1625f1 add anchor-testing (#4154)
* add anchor-testing

* recover EOF blank
2016-12-06 18:42:20 +08:00
Wei Zhu
bd1334065d Exclude style/index.tsx from coverage resport. 2016-12-06 17:14:01 +08:00
Chris Kelly
ff2d55481e docs: Update loading.md (#4128) 2016-12-06 16:46:12 +08:00
Babajide Fowotade
1a4d9159b3 docs: Fix typo on introduce.md (#4149) 2016-12-06 16:36:55 +08:00
Benjy Cui
ec6cec67fd chore: remove useless config, for .babelrc existing 2016-12-06 16:18:58 +08:00
Benjy Cui
49e9523283 docs: add PR welcomed badge 2016-12-06 15:42:50 +08:00
Benjy Cui
273faafaa2 fix: should use moment.isMoment, close: #4147 2016-12-06 14:21:17 +08:00
Benjy Cui
883066820a docs: add translation for spec 2016-12-06 11:48:52 +08:00
Benjy Cui
59f0e6254b docs: add i18n link, ref: #3895 2016-12-06 10:19:51 +08:00
Benjy Cui
37140bf5e0 deps: upgrade rc-slider 2016-12-06 09:47:02 +08:00
Benjy Cui
9afea0f47d test: update snapshot 2016-12-06 09:27:21 +08:00
8ed8b25d73 fix(Tooltip): close #4140 (#4141) 2016-12-05 23:53:20 +08:00
Wei Zhu
9701825c23 Using collectCoverageFrom instead of coveragePathIgnorePatterns 2016-12-05 17:57:49 +08:00
afc163
1a37b44dad update template 2016-12-05 16:54:56 +08:00
afc163
03eff769be Fix menu item hover color 2016-12-05 16:15:22 +08:00
afc163
9006d74034 Change Anchor category 2016-12-05 13:18:17 +08:00
D & R
57bb12ca3c fix: radio button在disabled和checked状态多了点box-shadow (#4114) 2016-12-05 13:15:49 +08:00
afc163
65431a3981 update site api style 2016-12-05 13:09:05 +08:00
afc163
03d6bdc942 update input API doc 2016-12-05 13:05:58 +08:00
afc163
392805e0e5 update getting-started 2016-12-05 12:02:30 +08:00
afc163
4c116aaa3a Fix snap test 2016-12-05 11:47:42 +08:00
afc163
f9bad27469 Fix DatePicker input style 2016-12-05 00:27:03 +08:00
afc163
99df18139b Improve Menu selected design 2016-12-04 19:26:11 +08:00
afc163
ca1f16556c fix snap test 2016-12-04 17:53:52 +08:00
afc163
fcdc375f77 update table demo detail style 2016-12-04 17:47:45 +08:00
afc163
779a62093d group column header should be text align centered 2016-12-04 17:43:24 +08:00
afc163
bf8b1bf6a9 fix docs 2016-12-04 17:37:26 +08:00
afc163
eacfe25e19 bump 2.5.1 2016-12-04 17:16:58 +08:00
afc163
c4700210e8 upgrade eslint-plugin-babel 2016-12-04 17:15:31 +08:00
afc163
4ac50c660c improve transfer style 2016-12-04 17:08:29 +08:00
afc163
d2644e3c11 Fix snap test 2016-12-04 16:57:38 +08:00
偏右
304ccf1ea5 Changelog 2.5.1 (#4119)
* changelog for 2.5.1

* Add changelog for 2.x

* remove upgrade-note

* update changelog
2016-12-04 16:56:20 +08:00
afc163
4e589af9b6 Revert loading icon to 1/4 circle 2016-12-04 16:53:59 +08:00
afc163
ad911d8dfa Change way to fix #4092 2016-12-04 16:42:49 +08:00
afc163
5815ce514a Add Radio in form demo, close #3910 2016-12-04 16:19:55 +08:00
afc163
9c3c2d7c0c Fix snap test 2016-12-04 16:01:45 +08:00
afc163
264f02d98f Fix steps icon size and some detail, close #3817 2016-12-04 15:50:54 +08:00
afc163
f5775fec73 Add breadcrumb docs about #4106 2016-12-04 15:17:17 +08:00
afc163
89fee0a987 update README (#4124) 2016-12-04 14:16:10 +08:00
afc163
ab37e056f1 improve English expression 2016-12-04 00:35:47 +08:00
afc163
2ba1e8f3ef clean table demo 2016-12-03 17:50:41 +08:00
afc163
89cf3a88e6 only icon down under Dropdown has smaller size, close #4023 2016-12-03 17:48:10 +08:00
afc163
c06d205833 Fix snap test 2016-12-03 17:33:46 +08:00
afc163
0e97fae3f5 fix vertical-align of ButtonGroup 2016-12-03 17:15:06 +08:00
afc163
cf11a4f809 remove button-nested-icon font-size setting 2016-12-03 17:11:28 +08:00
afc163
c639c3a796 update snap test 2016-12-03 16:23:35 +08:00
afc163
c7c886fda6 Improve Affix target demo code style, close #4037 2016-12-03 16:20:53 +08:00
afc163
82902855db fix ts error 2016-12-03 15:51:44 +08:00
afc163
8df23e2d06 revert value undefined for resetFields, close #3846 2016-12-03 15:50:36 +08:00
afc163
bf562c95f1 Fix fixed table empty z-index, close #4016 2016-12-03 15:43:26 +08:00
afc163
37af26fbdf update select demo 2016-12-03 15:35:39 +08:00
afc163
75173dd7b0 Fix Slider[disabled] focus handler style, close #4045 2016-12-03 15:31:42 +08:00
afc163
0e1f154aab Add doc and demo for AutoComplete[placeholder], close #4044 2016-12-03 15:31:41 +08:00
afc163
0bb71e6a6f Fix Input[type=textarea] popover misalign bug, close #4092 2016-12-03 15:31:41 +08:00
Wei Zhu
65b2429ed2 Fix grouping column filter. (#4113) 2016-12-03 15:13:10 +08:00
afc163
edd57defa5 use moment.isMoment
http://momentjs.com/docs/#/query/is-a-moment/
2016-12-03 14:48:44 +08:00
afc163
4184e7c8ac fix input-number snap 2016-12-03 14:44:10 +08:00
afc163
575f0dbc21 change LocaleProvider's component type 2016-12-02 21:06:21 +08:00
afc163
e8cb51e024 fix header 2016-12-02 18:28:41 +08:00
afc163
752392a964 Improve home page style in Mobile device 2016-12-02 18:17:03 +08:00
afc163
c0e9f8c52e fix link 2016-12-02 17:00:40 +08:00
ChrisFan
3df84e33c6 docs: update 开发脚手架 link 2016-12-02 15:46:42 +08:00
afc163
c4b6130daa Merge branch 'master' of github.com:ant-design/ant-design 2016-12-02 15:16:59 +08:00
afc163
2270598f2e update doc 2016-12-02 15:12:01 +08:00
Benjy Cui
c4d8c4770c Add upgrade warning (#4028)
* chore: add upgrade warning for time related value

* chore: update warning

* chore: update demo url
2016-12-02 15:07:33 +08:00
Benjy Cui
a939769069 fix: Tooltip support multi children, close: #3924 (#4105) 2016-12-02 15:07:03 +08:00
Benjy Cui
f3ffae9e54 css: fix icon size in button, close: #4023 (#4080)
* css: fix icon size in button, close: #4023

* test: update snapshot for Button demo
2016-12-02 15:06:59 +08:00
afc163
5370df346c Add transition to input addon 2016-12-02 14:04:44 +08:00
afc163
af3d1ff6ef upgrade rc-input-number 2016-12-02 13:58:09 +08:00
jiang
adad537532 Update motion.md (#4109) 2016-12-02 13:29:14 +08:00
Wei Zhu
d2918d2456 Fix rowSelection defauleChecked 2016-12-02 11:36:05 +08:00
afc163
3802f08191 Fix wrong description about Select[allowClear] (#4101) 2016-12-01 22:28:43 +08:00
Benjy Cui
643463c9f2 refactor: update code style 2016-12-01 22:05:49 +08:00
Benjy Cui
39eb19ad9b fix: Popconfirm[visible] should be controlled prop, close: #4068 2016-12-01 22:05:49 +08:00
Benjy Cui
01dbcbe4af css: should not reset fieldset style, close: #4090 2016-12-01 16:46:05 +08:00
Benjy Cui
47a9c80e82 docs: update demo style 2016-12-01 16:15:24 +08:00
Benjy Cui
d8d065af33 css: width should be set on TimePicker wrapper 2016-12-01 16:11:51 +08:00
Benjy Cui
75c09cb481 css: Form.Item[extra] should be block, close: #4089 2016-12-01 11:25:34 +08:00
Benjy Cui
04269ecb40 docs: hide Button[shape=circle-outline], close: #4077 2016-12-01 11:13:38 +08:00
Ashish Chaudhary
1593140912 Fixes minor typo 2016-11-30 22:31:54 +08:00
Zack Craig
f62fa38ebd Re-word description of upload component (#4085)
Just a little bit of rewording for english speakers, same stuff, just sounds better.
2016-11-30 22:31:30 +08:00
lehug
b4d4af64a1 docs: “決定”更改为“决定” (#4073)
修正错别字,“決定”更改为“决定”。
2016-11-30 15:18:23 +08:00
Benjy Cui
e0e700cddd docs: improve detail of demo for layout, close: #4066 2016-11-30 10:54:42 +08:00
Andrey G
a307a7acf7 refactor: remove unnecessary computed props for classNames (#4055)
* remove unnecessary computed props for classNames

* rollback autocomplete optimization for possible css style order issue

* update snapshots

* remove more unnecessary computed props at Input
2016-11-30 10:20:23 +08:00
陆离
ee2654dbe1 fix: Anchor issue while scrolling window fast (#4054)
*  Anchor issue while scrolling window fast

 + close #4503

* another implement...
2016-11-30 10:10:31 +08:00
ashishg-qburst
5db5fed7b9 docs: fix typos and grammar on spec/introduce (#4062) 2016-11-29 23:04:39 +08:00
Will Chen
6b774a1343 docs: improve docs' detail (#4050) 2016-11-29 17:13:24 +08:00
afc163
6f3eafd061 fix snap test 2016-11-29 14:23:43 +08:00
Benjy Cui
7cb033c545 docs: use a more meaningful commit 2016-11-29 14:15:58 +08:00
afc163
3be71e41bf upgrade slider demo style 2016-11-29 13:17:08 +08:00
Benjy Cui
932443099a css: use @component-background, ref: #4040 2016-11-29 11:56:10 +08:00
Benjy Cui
7f4569cc02 docs: update docs typo 2016-11-29 11:35:46 +08:00
Benjy Cui
510f08cadc docs: update environment support section 2016-11-29 11:34:38 +08:00
Benjy Cui
fb4d505801 deps: upgrade moment, close: #4018 2016-11-29 10:08:43 +08:00
cathayandy
addb6e44dc Fix #4039. Replace background-color: #fff with background: @body-background (#4040) 2016-11-29 09:54:54 +08:00
Dorian
7325cdb37a docs: Fixes link typo in docs (#4036) 2016-11-28 21:00:26 +08:00
afc163
6b0c34bb24 fix tslint 2016-11-28 19:14:43 +08:00
afc163
7d75f6e3de Fix focus style of Form Controls, close #4035 2016-11-28 19:01:14 +08:00
偏右
afb845d944 Update package.json 2016-11-28 17:26:24 +08:00
Benjy Cui
32abe10b43 docs: update changelog 2016-11-28 15:33:21 +08:00
Wei Zhu
9c2b197163 docs: fix principle link [ci skip] 2016-11-28 14:32:36 +08:00
afc163
58d5fafa19 Fix Button loading animation transition in Firefox 2016-11-26 23:39:06 +08:00
afc163
0ed98a5574 remove background of code 2016-11-26 21:07:27 +08:00
afc163
2aeccd4955 update doc link 2016-11-26 16:07:01 +08:00
Benjy Cui
7ade6013df bump 2.5.0 2016-11-26 14:49:38 +08:00
Benjy Cui
bc856e787c docs: update change log (#4006) 2016-11-26 14:48:35 +08:00
afc163
2034126e00 keep old style for compatibility 2016-11-26 14:39:30 +08:00
afc163
3705130315 update snapshot 2016-11-26 14:39:30 +08:00
afc163
13020b7737 fix style 2016-11-26 14:39:30 +08:00
afc163
87f230f57b refactor Input.Search 2016-11-26 14:39:30 +08:00
Wei Zhu
13e13f333d fix: Wrap custom filterDropdown by FilterDropdownMenuWrapper, fix #4010 (#4013) 2016-11-25 16:24:24 +08:00
Benjy Cui
1c58e5ba4b docs: adjust order 2016-11-25 15:34:25 +08:00
陆离
72fad02024 chore: Anchor 动画优化。 (#4011)
- close #3832
 - 点击后给样式就行了, 不要把动画删掉
2016-11-25 15:05:19 +08:00
Wei Zhu
86f1fa030a Fix: table columns not update (#4009) 2016-11-25 15:04:25 +08:00
Benjy Cui
59e0c6a4c1 docs: update demo for upload 2016-11-25 15:00:28 +08:00
Wei Zhu
bd55d21f83 style: Fix jsx-no-multiline-js (#3994)
* Fix jsx-no-multiline-js

* TimePicker addon test

* Transfer search test
2016-11-25 12:03:39 +08:00
Nathan Tavares Nascimento
c97e687edd feature: add pt_BR locale support (#4004) 2016-11-25 09:44:28 +08:00
Pierre Neter
76c8351fc4 docs: Update reponsive-more.md (#4003) 2016-11-25 09:41:47 +08:00
Pierre Neter
38706e16bc docs: Update reponsive.md (#4002) 2016-11-25 09:41:29 +08:00
afc163
dfd15f8a56 Add dingding Icon, close #3961 2016-11-24 18:01:49 +08:00
afc163
e091efa2b5 fix transfer snapshots 2016-11-24 17:47:56 +08:00
Benjy Cui
dc2fb9c2ff test: update snpashot 2016-11-24 17:44:40 +08:00
Benjy Cui
f5cc937c8f fix: Upload should work without children 2016-11-24 17:44:40 +08:00
afc163
9183ef0ede Fix Transfer notFound, close #3996 2016-11-24 17:22:54 +08:00
Wei Zhu
5713a7cd39 test: Enabel menu demo testing (#3997) 2016-11-24 17:09:03 +08:00
afc163
c6c5a0c3a1 fix demo focus error 2016-11-24 16:16:27 +08:00
afc163
7c79a1c294 Fix wrong loading icon in Tree, close #3993 2016-11-24 15:04:17 +08:00
Wei Zhu
52f6f992b3 style: Fix jsx self close, #3966 (#3968) 2016-11-24 14:09:43 +08:00
ddcat1115
73c776e73d feat: Input add NumericInput demo & update searchInput demo (#3861)
* Input
add NumericInput demo
update searchInput

* Input

- add Input.Search
- update NumericInput

* snap update
2016-11-24 14:03:57 +08:00
偏右
91b2242f44 Merge pull request #3983 from visvadw/patch-2
Small typos and review
2016-11-24 10:58:39 +08:00
Benjy Cui
f110472c93 test: update snapshot for demo 2016-11-24 10:54:51 +08:00
Benjy Cui
e6300e0128 docs: update demo for Tag, close: #3984 2016-11-24 10:51:28 +08:00
Marius Ileana
57fa4cbb52 Small typos and review 2016-11-23 22:13:21 +02:00
afc163
f2f3c5f15a update alert style 2016-11-24 00:34:31 +08:00
afc163
fe09c26c50 fix footer link 2016-11-24 00:30:56 +08:00
afc163
179f526077 update badge link 2016-11-23 21:37:09 +08:00
afc163
540d51fe8d update spec/introduce.md 2016-11-23 21:09:42 +08:00
afc163
03360c2bf3 Fix demo test snapshot files 2016-11-23 20:38:57 +08:00
afc163
f3df6205a4 fix RangePicker placeholder not working bug 2016-11-23 20:35:34 +08:00
afc163
a8c4f53922 remove unused code in demo 2016-11-23 20:24:36 +08:00
afc163
2260701865 improve demo detail 2016-11-23 20:17:44 +08:00
afc163
6ccaf71841 Add onCellClick API in doc for #3774 2016-11-23 19:45:09 +08:00
偏右
fec52a24c5 feat: Add more icons and improve some icons design (#3977) 2016-11-23 17:55:14 +08:00
Wei Zhu
ccbebe60cc style: Fix jsx alignment, #3966 (#3967) 2016-11-23 17:53:10 +08:00
Albert Zheng
5e1b679dfb chore: Fixed two compiling errors reported by tsc 2.0.10. (#3969) 2016-11-23 17:52:29 +08:00
flashback313
63dadc1efa css: Flashback313 fix checkbox style (#3980)
* Update mixin.less

* fix left2right
2016-11-23 17:47:15 +08:00
Wei Zhu
0acc7d592c Breadcrumb router demo test 2016-11-23 16:37:58 +08:00
Wei Zhu
5bd8977d75 Datepicker locale demo test 2016-11-23 16:31:54 +08:00
Wei Zhu
206a327ade Fix tests
1. run all same demo test on node as jsom
2. mock date
3. create a setup file for common settings
4. skip breadcrumb router demo test
2016-11-22 23:14:57 -09:00
afc163
7dbeb13093 fix reqwest Peer dependency xhr2 2016-11-23 16:01:47 +08:00
afc163
e089f39048 fix ci timezone 2016-11-23 14:30:21 +08:00
afc163
f6f63606ea fix test snap via mocking Date.now 2016-11-23 12:15:23 +08:00
Benjy Cui
e610314461 docs: add PR welcomed section (#3955) 2016-11-23 12:10:09 +08:00
afc163
7b61b84145 Add missing doc for DatePicker[placeholder] 2016-11-23 11:30:05 +08:00
afc163
3b8ac48e6b update DatePicker demo format 2016-11-23 11:23:18 +08:00
afc163
b34c4ed423 update AUTHORS.txt 2016-11-23 11:18:59 +08:00
afc163
f533f20b38 remove some unused deps 2016-11-23 11:15:55 +08:00
偏右
c8caf3a08c Merge pull request #3953 from nimojs/master
<script src="...> => <script src="...">
2016-11-22 19:39:24 +08:00
偏右
bb8ec2f836 Merge pull request #3959 from nimojs/patch-1
es6-shim  for ie10/11
2016-11-22 19:38:02 +08:00
Nimo
e5f289f1a3 es6-shim for ie10/11 2016-11-22 19:36:11 +08:00
Benjy Cui
6c5fc4ef7f test: remove useless test command, ref: #3916 2016-11-22 17:41:11 +08:00
Nimo
2013202386 <script src="...> => <script src="...">
script src 缺少 "
2016-11-22 17:36:21 +08:00
afc163
c5d9205a2b fix node snap 2016-11-22 15:42:09 +08:00
afc163
42c6f92f50 fix snap test 2016-11-22 15:19:18 +08:00
afc163
66678dd415 fix snap test 2016-11-22 15:04:35 +08:00
afc163
7ce0598cc3 update badge 2016-11-22 15:02:21 +08:00
afc163
0dffd230a8 update TimePicker demo code style 2016-11-22 14:59:09 +08:00
afc163
21a4b08392 update badge 2016-11-22 14:56:55 +08:00
afc163
109d72ea70 update home button style 2016-11-22 14:53:35 +08:00
afc163
0613a1b065 update doc 2016-11-22 14:47:56 +08:00
afc163
e62dc08d2c improve preview icon display logic, #3644 2016-11-22 14:44:16 +08:00
Wei Zhu
57f5d299af Check in snapshots 2016-11-22 14:39:40 +08:00
afc163
e552880c32 update upload detail 2016-11-22 14:29:07 +08:00
afc163
f77d568322 fix upload prefixCls 2016-11-22 14:29:07 +08:00
Wei Zhu
d20572bdab test: demo snapshot testing (#3916)
* Run snapshot testing against all demos

* Split demo tests

* ignore coverage folder

* Upgrade antd-demo-jest

* enable cache

* intergate with coveralls.io

* Add node test

* Set worker to 2

https://github.com/facebook/jest/issues/1742

* config coverage

* Set default supportServerRender to true
2016-11-22 13:43:53 +08:00
Wei Zhu
4b1722e95d fix: wrong select all checkbox displaying when pagination changes (#3904) 2016-11-22 13:42:45 +08:00
偏右
7748471fa0 feat: Add range into showTotal (#2240#issuecomment-234766623) (#3863) 2016-11-22 10:12:14 +08:00
Wei Zhu
ed455c01d1 feat: Implement Table.Column and Table.ColumnGroup (#3868)
* Implement Table.Column and Table.ColumnGroup

* Upgrade rc-table
2016-11-22 10:11:12 +08:00
Benjy Cui
1c26bca8fe docs: update demo for Pagination, close: #3944 2016-11-22 09:49:25 +08:00
afc163
9febc9e71e update Changelog 2016-11-21 20:06:55 +08:00
Benjy Cui
f250bdcc98 docs: update demo for form 2016-11-21 18:29:36 +08:00
afc163
70e1e26771 bigger tree icon 2016-11-21 18:17:12 +08:00
afc163
927dae6159 fix header select position 2016-11-21 17:54:17 +08:00
afc163
89c9da8121 update readme 2016-11-21 17:50:51 +08:00
jiang
ca881823f2 site: update home (#3939) 2016-11-21 17:48:39 +08:00
Benjy Cui
c3064949cc docs: update demos for Slider 2016-11-21 16:37:04 +08:00
Benjy Cui
dd0be2e82f css: fix style of Slider[marks], close: #3872 2016-11-21 16:10:46 +08:00
Benjy Cui
4ee2b9d930 site: SSR for official website (#3903)
* site: ssr for Layout

* site: SSR for site

* fix: ssr for Anchor

* chore: add ssr test

* chore: update deploy script

* site: udpate detail

* site: revert animation for site

* site: fix loading animation
2016-11-21 14:39:15 +08:00
afc163
34f353deb0 update form API doc 2016-11-21 14:28:20 +08:00
乐仪
84d036bfef version -> 2.4.3 2016-11-21 14:15:03 +08:00
afc163
16c2ee69ab update rate api doc 2016-11-21 13:56:35 +08:00
afc163
b51b18acd6 fix image background 2016-11-21 12:32:40 +08:00
Benjy Cui
1ae5bb9845 chore: remove quick selector label, ref: #3753 2016-11-21 11:41:33 +08:00
ddcat1115
cd2a1438b7 docs: Table add editable demos (#3922) 2016-11-21 11:29:55 +08:00
ddcat1115
51971be12a Merge pull request #3753 from ant-design/feat-date-picker
feat: basic impl of RangePicker[ranges], ref: #1418
2016-11-21 10:45:56 +08:00
afc163
485e22f38d Add sketch template file in resource page 2016-11-20 19:52:39 +08:00
偏右
3caa85b3f3 Merge pull request #3908 from ant-design/docs-customize-theme
Docs customize theme
2016-11-20 19:17:59 +08:00
afc163
6af5c54e6c unify checkbox and expand icon width of Table 2016-11-20 19:09:46 +08:00
ddcat1115
259de9dbab Merge pull request #3824 from ant-design/upgrade-default-theme
Upgrade default theme
2016-11-19 22:29:32 +08:00
ddcat1115
34d00559fc Merge pull request #3869 from RaoHai/mentionOnSelectData
[Document only] onSelect of `Mention` component pass extra data
2016-11-19 22:26:21 +08:00
Benjy Cui
c94f577416 style: update code style for Anchor 2016-11-18 17:25:30 +08:00
Benjy Cui
db035aa691 style: update code style for Anchor 2016-11-18 17:02:57 +08:00
afc163
21b3f70ab3 adjust slider margin 2016-11-18 16:21:37 +08:00
afc163
5982e94456 Add screenshot 2016-11-18 16:16:34 +08:00
afc163
7af7e8382d Add customize-theme.md 2016-11-18 15:38:36 +08:00
RaoHai
1287f2a19f object -> any 2016-11-18 14:31:46 +08:00
afc163
231b2b9dae upgrade some site style 2016-11-18 14:24:50 +08:00
afc163
42b4df295c update site for primary-color change 2016-11-18 14:24:50 +08:00
afc163
ca9ed27445 upgrade demo primary-color 2016-11-18 14:24:50 +08:00
afc163
2c9339039c change @primary-color and default border-radius 2016-11-18 14:24:50 +08:00
afc163
6205118c31 update code font family 2016-11-18 13:55:28 +08:00
afc163
5b77cf7452 add doc 2016-11-18 11:58:22 +08:00
afc163
cc1f1be8bd fix ts error 2016-11-18 11:31:02 +08:00
afc163
a6e09ccfd0 fix Badge z-index, close #3898 2016-11-18 11:26:29 +08:00
Benjy Cui
38fd7f6feb chore: improve detail 2016-11-18 10:22:11 +08:00
Benjy Cui
e5deba620d css: improve style according to design, ref: #1418 2016-11-18 10:22:11 +08:00
Benjy Cui
f499a026ce feat: basic impl of RangePicker[ranges], ref: #1418 2016-11-18 10:22:11 +08:00
Benjy Cui
b5fcb85c24 deps: lock antd-tools 2016-11-18 10:04:51 +08:00
ddcat1115
18dcc09751 Merge pull request #3837 from ant-design/feat-custom-table-column-filter
controlled filterDropdown props
2016-11-17 23:52:17 +08:00
ddcat1115
29001ffe4c Merge pull request #3830 from ant-design/fix-popover
Let Checkbox and Radio response hover events
2016-11-17 22:59:31 +08:00
afc163
16fdb00282 No need Radio[key] in RadioGroup 2016-11-17 17:50:26 +08:00
afc163
33ad640b0f feedback icon should not affect user operation (#3891) 2016-11-17 17:33:00 +08:00
afc163
1c23189b1d update select style 2016-11-17 17:08:38 +08:00
Benjy Cui
30b7318d38 deps: update dev dependencies 2016-11-17 17:00:37 +08:00
afc163
3c9272a60f Add hover z-index to cover other card 2016-11-17 14:29:48 +08:00
afc163
c20239829d Fix InputNumber vertial-align
https://github.com/ant-design/ant-design/issues/3866#issuecomment-261148256
2016-11-17 12:16:25 +08:00
ddcat1115
260665d1c2 Merge pull request #3853 from RaoHai/anchorLinkFix
Anchor link fix
2016-11-17 11:38:29 +08:00
偏右
c2a4cdb17c Merge pull request #3874 from waywardmonkeys/more-typo-fixes
Typo fixes.
2016-11-16 22:16:26 +08:00
偏右
9b7a3d4b82 Merge pull request #3873 from waywardmonkeys/site-typo-fixes
Site typo fixes.
2016-11-16 22:16:13 +08:00
Bruce Mitchener
9fd1f88441 Site typo fixes. 2016-11-16 20:34:28 +07:00
Bruce Mitchener
36508ffabd Typo fixes. 2016-11-16 20:33:37 +07:00
afc163
fc79d6f967 stronger active Progress 2016-11-16 21:01:09 +08:00
afc163
4f7eff39fd fix error controls style 2016-11-16 20:13:00 +08:00
afc163
489a62b139 add .hound.yml 2016-11-16 18:03:04 +08:00
RaoHai
b0bdfcb94c onSelect of Mention component pass extra data
+ close #3867
2016-11-16 17:16:32 +08:00
afc163
200d3715e3 update tests/index.test.js 2016-11-16 12:53:21 +08:00
afc163
5b3df08ade use @input-placeholder-color in select and mention, close #3858 2016-11-16 11:34:25 +08:00
afc163
34b4200220 adjust search input style for combobox change (#3855) 2016-11-15 21:59:29 +08:00
afc163
0d63e5f6b5 Fix select[combobox] vertical align, close #3855 2016-11-15 21:54:22 +08:00
afc163
321f4e1402 update demo style 2016-11-15 21:19:02 +08:00
afc163
9e6439b06c fix title and footer height according to Table[size] 2016-11-15 20:06:41 +08:00
afc163
92d77e4c5d Add internal link 2016-11-15 19:16:23 +08:00
偏右
7e5cb09a2d Merge pull request #3850 from waywardmonkeys/missing-dashed-button-doc
docs: Button: Add `dashed` to type property description.
2016-11-15 19:06:59 +08:00
afc163
36003d03ac improve demo code style 2016-11-15 16:44:00 +08:00
RaoHai
146f3180aa lint fix 2016-11-15 15:33:13 +08:00
偏右
e1e8003e54 Merge pull request #3818 from ant-design/chore-check-files
chore: check whether compiled files are valid
2016-11-15 15:29:33 +08:00
偏右
c37663752c Merge pull request #3771 from ant-design/improve-testing
Introduce jest snapshots
2016-11-15 15:29:28 +08:00
afc163
aa635b9132 Merge branch 'master' of github.com:ant-design/ant-design 2016-11-15 15:21:51 +08:00
afc163
b69fd4bf9f fix lints 2016-11-15 15:21:13 +08:00
Benjy Cui
e2b6054cc4 style: update code style 2016-11-15 15:18:40 +08:00
RaoHai
12c974660e Anchor 优化
+ using `document.getElementById` instead of `document.querySelector`
+ ink will scroll to target position directly
2016-11-15 15:15:34 +08:00
偏右
b37845ef0c Merge pull request #3851 from waywardmonkeys/fix-typos
Fix some typos.
2016-11-15 15:12:03 +08:00
afc163
dde040e3e8 fix lints 2016-11-15 15:10:01 +08:00
afc163
f9319e244b Add compatible css centered demo code, close #3849 2016-11-15 15:02:30 +08:00
Bruce Mitchener
a1ee6bfa22 Fix some typos. 2016-11-15 13:44:35 +07:00
Bruce Mitchener
b875a6104b docs: Button: Add dashed to type property description. 2016-11-15 13:30:17 +07:00
afc163
1750fc754c Merge branch 'master' of github.com:ant-design/ant-design 2016-11-15 14:13:29 +08:00
afc163
bc45f43042 Fix Menu Devider style and document, close #3813 2016-11-15 14:12:25 +08:00
偏右
1ae4816cd0 fix format props of RangePicker (#3831)
+ close #3808
2016-11-15 14:03:20 +08:00
afc163
68fb601f99 Merge branch 'master' of github.com:ant-design/ant-design 2016-11-15 12:03:24 +08:00
afc163
ab8f8e4506 update table demo 2016-11-15 12:01:06 +08:00
chencheng (云谦)
b95800aa04 Merge pull request #3842 from parlop/patch-1
fix typo toturial to tutorial
2016-11-14 22:14:52 +08:00
parlop
7526d7be08 fix typo toturial to tutorial
fix typo toturial to tutorial
2016-11-14 09:12:05 -05:00
afc163
d8516ee8df adjust progress vertical align 2016-11-14 22:06:07 +08:00
RaoHai
d4269f8f30 fix format props of RangePicker
+ close #3808
2016-11-14 20:27:51 +08:00
afc163
b0f366cb0f Fix TreeSelect[multiple] placeholder margin bug, close #3841 2016-11-14 20:15:51 +08:00
afc163
fc3d320872 much better way for #3748 and fix ok close animation 2016-11-14 19:38:24 +08:00
afc163
82fa3ed2a5 update DatePicker doc and demo 2016-11-14 19:13:37 +08:00
afc163
1850e4b7cf fix disabled today style 2016-11-14 19:00:17 +08:00
afc163
b54d0ccc31 Fix active Switch style, close #3838 2016-11-14 18:52:50 +08:00
Meck
92df002fb0 Introduce jest snapshots 2016-11-14 18:50:23 +08:00
afc163
a6d2de1a7b controlled filterDropdown props, close #3003 2016-11-14 17:53:02 +08:00
Benjy Cui
76b91812f4 site: fix type order, ref: #3758 2016-11-14 15:53:47 +08:00
Benjy Cui
a0de4d6865 chore: check whether compiled files are valid 2016-11-14 15:03:16 +08:00
afc163
4b2e9bbd23 Fix non-bordered Table column header border radius
https://zos.alipayobjects.com/rmsportal/khxltYwtEiBKtHE.png
2016-11-14 14:37:04 +08:00
afc163
05213a5827 update table demos 2016-11-14 14:26:08 +08:00
afc163
169e6cf99c update doc 2016-11-14 14:16:12 +08:00
afc163
b6455e2546 fix path 2016-11-14 13:20:00 +08:00
afc163
a7153e6e24 Fix mention style detail 2016-11-14 12:21:58 +08:00
Benjy Cui
bbef274aae feat: expose DatePicker[showToday], ref: #3793 2016-11-14 11:57:12 +08:00
Meck
0a30315a32 Let Checkbox and Radio response hover events
Close #3455
2016-11-14 11:55:32 +08:00
afc163
a1fe873bd9 update links 2016-11-14 11:08:26 +08:00
feng zhi hao
b6fbc266c5 add declaration in DatePicker (#3829) 2016-11-14 10:57:52 +08:00
afc163
ff803c2762 fix anchor style according to design file 2016-11-13 19:08:52 +08:00
afc163
3bdfe5bb88 adjust switch style 2016-11-13 18:22:47 +08:00
afc163
de64779546 speed up loading icon 2016-11-13 18:19:23 +08:00
afc163
5400cacd13 bump 2.4.2 2016-11-13 16:33:39 +08:00
afc163
ee8ac670b9 change jest config 2016-11-13 16:03:59 +08:00
Benjy Cui
449db1499b deps: lock deps to patch (#3816) 2016-11-13 15:53:50 +08:00
Wei Zhu
b0c7a714ad Don't pass visible to Dropdown if it's not exits. (#3821)
fix #3815
2016-11-13 15:53:02 +08:00
afc163
8457267dad update changelog for 2.4.1, #3811 2016-11-13 15:51:46 +08:00
afc163
24bd14d843 update CHANGELOG 2016-11-11 20:11:02 +08:00
afc163
f93e2a8df0 update CHANGELOG 2016-11-11 20:09:40 +08:00
afc163
3c9ccccf61 Fix Header select 2016-11-11 19:47:11 +08:00
RaoHai
27232a8561 bump to 2.4.0 🤘🏿 2016-11-11 19:21:47 +08:00
Benjy Cui
26c5c8e11c fix: should work with latest rc-time-picker (#3810) 2016-11-11 18:23:11 +08:00
Wei Zhu
7dc0328c60 Fix table border when using cell merging (#3806) 2016-11-11 17:57:27 +08:00
jiang
f703e00c0f Home fix (#3807)
* fix home

* update Banner min height
2016-11-11 17:56:05 +08:00
afc163
f206cc4c90 downgrade eslint-plugin-jsx-a11y 2016-11-11 17:55:10 +08:00
Benjy Cui
c073e78074 fix: should work with timepicker without minutes and so on, ref: #3793 (#3799) 2016-11-11 17:50:48 +08:00
afc163
ad808953fd Merge branch 'master' of github.com:ant-design/ant-design 2016-11-11 16:34:36 +08:00
afc163
ae8f3c5b56 clean devDeps 2016-11-11 16:34:26 +08:00
Benjy Cui
88d428bcc4 docs: update demo 2016-11-11 16:29:49 +08:00
afc163
7879421ec2 upgrade some devDeps 2016-11-11 16:28:05 +08:00
Benjy Cui
d4b5b701bd docs: update demos for TimePicker 2016-11-11 16:06:11 +08:00
Wei Zhu
926425d8ec Pass visible and onVisibleChange to Dropdown, fix #3779 (#3782) 2016-11-11 15:26:57 +08:00
Wei Zhu
0e6ac6bc4c Optimize table selection (#3757)
* Extract SelectionRadio, SelectionCheckbox, SelectionCheckboxAll

* Add some tests
2016-11-11 15:26:51 +08:00
afc163
be9ed0388c Fix form controls focused error style 2016-11-11 15:08:02 +08:00
afc163
d6288e5994 Fix TimePicker panel style (#3793) 2016-11-11 14:44:37 +08:00
afc163
524a421d72 upgrade rc-time-picker to 2.2.0, support TimePicker[format="HH"] (#3793) 2016-11-11 14:28:29 +08:00
Benjy Cui
4da0ae4f42 docs: update demos for DatePicker, ref: #3793 2016-11-11 12:08:18 +08:00
afc163
02422417d6 Merge branch 'master' of github.com:ant-design/ant-design 2016-11-11 00:57:24 +08:00
afc163
01f5b61982 Add position relative for table cell 2016-11-11 00:57:14 +08:00
Benjy Cui
e7cf2a4f3f docs: update demos for Form, close: #3558 2016-11-10 16:11:22 +08:00
ddcat1115
ed7d82f4cd Merge pull request #3671 from ant-design/feat-tag
feat: make Tag checkable, close: #3560
2016-11-10 16:05:02 +08:00
Benjy Cui
8fa50cfddc docs: add meaningful demo for CheckableTag 2016-11-10 14:32:17 +08:00
Benjy Cui
751b597df1 docs: update demo variable name 2016-11-10 11:44:12 +08:00
afc163
850e713e7f Improve text overflow for MenuItem and AnchorLink, close #3712 2016-11-10 11:35:12 +08:00
Benjy Cui
e64f04cee5 feat: CheckableTag, close: #3560 2016-11-10 11:20:52 +08:00
Benjy Cui
8dcdd12bef feat: bring Tag[color] back, close: #3773 2016-11-10 11:12:09 +08:00
afc163
cbec9c5db1 Merge branch 'master' of github.com:ant-design/ant-design 2016-11-10 11:10:30 +08:00
afc163
9cc05c530b Add iView link, iview/iview#55 2016-11-10 11:09:58 +08:00
Benjy Cui
b75201485d docs: update change log for 2.3.2 (#3776)
* fix: infinite loop, ref: #3759

* bump 2.3.2
2016-11-10 10:30:50 +08:00
afc163
88d470220b Fix wrong error style for Form Validation 2016-11-09 22:25:39 +08:00
afc163
51dae474cc fix form demo align 2016-11-09 22:12:21 +08:00
afc163
5d2a2cc39b Add @highlight-color less variables 2016-11-09 21:30:02 +08:00
afc163
64e549be9d fix anchor ball 2016-11-09 21:12:26 +08:00
afc163
19be7db53f improve anchor detail 2016-11-09 21:06:43 +08:00
afc163
563f8120cd fix Checkbox border 2016-11-09 20:38:57 +08:00
afc163
1903990315 update transfer doc 2016-11-09 20:37:10 +08:00
afc163
733a4cdc40 remove default chinese text in Transfer (#3768) 2016-11-09 20:30:31 +08:00
陆离
45d2182137 fix some anchor bug (#3777)
* fix some anchor bug

* lint
2016-11-09 20:17:02 +08:00
Wei Zhu
0fa41ebfb9 Fix small table style (#3761)
* Tweak small table style, fix #3743

* Add checkbox switch to dynamic settings demo

* Add fixed header to dynamic settings demo
2016-11-09 20:16:57 +08:00
afc163
451ef78778 Merge branch 'master' of github.com:ant-design/ant-design 2016-11-09 19:58:01 +08:00
afc163
d0f2ff83b6 Fix scroll page will trigger setState in Header 2016-11-09 19:55:14 +08:00
jiang
9afec1a638 Update README.md 2016-11-09 18:17:41 +08:00
afc163
5aafe0d8de Fix tag[style] not working (#3773) 2016-11-09 17:10:05 +08:00
afc163
df4509bbda Improve Carousel default UI style 2016-11-09 16:56:49 +08:00
afc163
156242053f update demo 2016-11-09 15:26:56 +08:00
afc163
5c29fe41f7 improve anchor style 2016-11-09 15:26:22 +08:00
afc163
db68af8e72 Merge branch 'master' of github.com:ant-design/ant-design 2016-11-09 14:46:28 +08:00
afc163
c04707d3e3 fix demo z-index 2016-11-09 14:45:50 +08:00
ddcat1115
c32256c204 docs: add searchable Tree demo (#3693) 2016-11-09 14:45:49 +08:00
ddcat1115
228b7328d3 docs: Steps demo update (#3708)
* Steps demo update

* update
2016-11-09 14:45:10 +08:00
afc163
3b08a6479c Merge branch 'master' of github.com:ant-design/ant-design 2016-11-09 14:44:05 +08:00
ddcat1115
0baef0627e docs: 调整组件导航结构 (#3758)
- Layout 更名为 Grid
2016-11-09 14:43:32 +08:00
afc163
74932b5de9 Add className and style props for Anchor 2016-11-09 14:43:12 +08:00
afc163
ec3f20936e update anchor style 2016-11-09 14:40:31 +08:00
afc163
2df6476572 update anchor docs 2016-11-09 14:22:38 +08:00
Benjy Cui
4d2bdfd93d docs: update docs for form 2016-11-09 10:16:36 +08:00
afc163
a91a7208a6 update steps demo 2016-11-08 21:51:28 +08:00
afc163
2d0f532f73 Improve checkbox and radio style (ref #3590) 2016-11-08 21:42:46 +08:00
afc163
0d013be7fa fix iconfont-size-under-12px mixin 2016-11-08 21:25:57 +08:00
afc163
5aea5b24ef update select demo code style 2016-11-08 21:23:29 +08:00
afc163
0ec4276eab @font-size-lg (#1752) 2016-11-08 21:07:01 +08:00
afc163
4844d92709 remove unused variable 2016-11-08 20:59:25 +08:00
afc163
e4974ac72a use @font-size-base (#1752) 2016-11-08 20:57:07 +08:00
afc163
0a48c62dcb use @text-color 2016-11-08 20:50:59 +08:00
afc163
9b81fe86d9 clear less variables and add @text-color-secondary 2016-11-08 20:48:03 +08:00
afc163
64899c5da2 Merge branch 'master' of github.com:ant-design/ant-design 2016-11-08 18:04:08 +08:00
afc163
a7b384112e es6-shim for ie10/11 2016-11-08 18:03:22 +08:00
Benjy Cui
5782253a0f fix: infinite loop, ref: #3759 2016-11-08 16:22:36 +08:00
Wei Zhu
c72612435e Merge pull request #3736 from ant-design/feat-transfer
Feat Transfer selectedKeys
2016-11-08 16:11:45 +08:00
afc163
8dd48e0e26 adjust for #3760 2016-11-08 14:10:51 +08:00
afc163
6bf9ac4e04 Fix Steps vertical align style, close #3760 2016-11-08 13:46:11 +08:00
afc163
f98005a696 update meta description 2016-11-08 12:03:20 +08:00
afc163
e6dd9a93d0 expand Input addon icon click area, close #3714 2016-11-08 11:46:41 +08:00
afc163
985d20ad80 Fix spin compatibility, close #3755 2016-11-07 17:53:12 +08:00
afc163
6c16d738ee upgrade deps and fix lints 2016-11-07 15:55:14 +08:00
afc163
b9cba392c9 Merge branch 'master' of github.com:ant-design/ant-design 2016-11-07 15:42:21 +08:00
afc163
8f01552e0f better way to fixing #3748 2016-11-07 15:41:03 +08:00
Benjy Cui
b9863f044c site: update deps 2016-11-07 14:57:51 +08:00
afc163
0acbba9838 fix DatePicker[showTime] now link, close #3748 2016-11-07 14:52:57 +08:00
afc163
1fde7de404 update index.js 2016-11-07 14:03:45 +08:00
afc163
52e649a9fb Merge branch 'master' of github.com:ant-design/ant-design 2016-11-07 14:02:16 +08:00
afc163
6d91290f95 remove vue-antd 2016-11-07 14:02:07 +08:00
Benjy Cui
7042e09a99 feat: add controlled property Transfer[selectedKeys], close: #3729 2016-11-07 13:52:24 +08:00
Meck
7af9a01a40 Merge branch 'release-2.3.1' 2016-11-07 12:11:35 +08:00
Benjy Cui
b39d96ec75 refactor: make variables' name meaningful 2016-11-07 12:11:11 +08:00
Meck
449a982f92 Bump version 2016-11-07 11:59:07 +08:00
Meck
446315faf4 2.3.1 CHANGELOG 2016-11-07 11:59:07 +08:00
Benjy Cui
9360c02129 docs: update docs about resetFields, close: #3746 2016-11-07 11:55:58 +08:00
Benjy Cui
d8ea555ee8 docs: update menu demo 2016-11-07 11:55:58 +08:00
Meck
e02d77b3df Styles should be exported as well. 2016-11-07 11:48:28 +08:00
Wei Zhu
a3962d5869 Merge pull request #3720 from RaoHai/anchor
Anchor Component
2016-11-07 11:13:44 +08:00
RaoHai
03b4edee4a AnchorLink -> Link and bug fix 2016-11-07 11:04:36 +08:00
蔡伦
1e95ad9bad fix typo (#3744) 2016-11-07 11:02:53 +08:00
Wei Zhu
b08dd6d1f9 Merge pull request #3741 from JimmyLv/patch-1
Update practical-projects.zh-CN.md
2016-11-06 18:17:14 +08:00
afc163
224281f425 fix responsive menu style 2016-11-06 17:09:06 +08:00
afc163
8895776fad Merge branch 'master' of github.com:ant-design/ant-design 2016-11-06 15:45:50 +08:00
afc163
ebe2379a95 fix radio-button doc link 2016-11-06 15:45:39 +08:00
Meck
b64ea0edcc Add Collapse to CHANGELOG 2016-11-06 15:11:00 +08:00
偏右
7f422c9e18 Feat collapse bordered (#3698)
* update ts types

* Add borderless style Collapse, close #3559

* update Collapse mix demo

* update demo description
2016-11-06 15:06:34 +08:00
afc163
ba9949adcc Merge branch 'master' of github.com:ant-design/ant-design 2016-11-06 15:05:22 +08:00
afc163
af2cec65c5 improve TimePicker addon style 2016-11-06 14:53:29 +08:00
afc163
63a15f0d92 fix time-picker style 2016-11-06 14:41:34 +08:00
Meck
d9dd3114c3 Bump version 2016-11-06 14:36:11 +08:00
Wei Zhu
caf09cd99e Release 2.3.0 (#3735)
* docs: add change log for 2.3.0

* Update dependencies.

* Add TimePicker addon demo
2016-11-06 14:32:47 +08:00
Wei Zhu
e4b35e02d2 Merge pull request #3715 from ant-design/feat-lazy-load-transfer
Improve transfer perfermance via importing react-lazy-load
2016-11-06 13:31:30 +08:00
afc163
d3788034e5 remove hover card border 2016-11-05 16:54:00 +08:00
afc163
d4e13e7616 update layout 2016-11-05 15:46:50 +08:00
偏右
952f8aabbc Update README.md 2016-11-05 15:35:28 +08:00
吕立青
5cebea6b47 Update practical-projects.zh-CN.md
Just fixed small typo.
2016-11-05 15:31:43 +08:00
RaoHai
954c3a13f1 remove useless files and sentences 2016-11-05 09:24:36 +08:00
afc163
afb49f95d0 separate item component 2016-11-04 16:52:57 +08:00
afc163
e253cce993 change react-lazy-load default props 2016-11-04 15:16:16 +08:00
afc163
7373ce0758 Add react-lazy-load for Transfer perfermance, close #2860 2016-11-04 15:08:39 +08:00
afc163
6a1b1476be improve transfer style 2016-11-04 15:08:39 +08:00
afc163
45b8a9b507 Merge branch 'master' of github.com:ant-design/ant-design 2016-11-04 13:57:05 +08:00
afc163
894a4ceb53 remove unnecessary demo (#3690) 2016-11-04 13:52:30 +08:00
jiang
33a30ae927 update spin animation style (#3722)
* update spin animation style

* update spin animation

* update code
2016-11-04 13:50:32 +08:00
afc163
7f974877bc update Tree document (#3730) 2016-11-04 11:55:20 +08:00
Benjy Cui
ad88118373 feat: support Radio.Group[children] = undefined | null, ref: #3721 2016-11-04 09:38:57 +08:00
RaoHai
b6f9ac4058 test fix 2016-11-03 19:28:28 +08:00
RaoHai
0a0e14d610 Anchor Component
+ close #3557
2016-11-03 19:20:49 +08:00
RaoHai
616ecf1980 waiting for sketch 2016-11-03 19:20:49 +08:00
RaoHai
ef720db420 anchor 2016-11-03 19:20:49 +08:00
afc163
bd8482c893 update doc 2016-11-03 16:59:42 +08:00
afc163
d44271ce45 Fix badge initial position jump bug again, close #3709 2016-11-03 16:58:51 +08:00
denzw
5fb01c8300 修复上传组件卡片样式时,新增加上传图片不能预览的问题 (#3706) 2016-11-03 13:43:34 +08:00
Benjy Cui
01ddb398c7 feat: add Radio.Group[className] 2016-11-03 11:33:26 +08:00
Meck
7d2328b910 docs: improve 2016-11-03 10:44:41 +08:00
Meck
d10026b094 Using tidle range 2016-11-03 10:44:41 +08:00
Benjy Cui
81a8b65e6a docs: improve UX of demo 2016-11-03 10:27:34 +08:00
afc163
fba7d62648 Merge branch 'master' of github.com:ant-design/ant-design 2016-11-02 18:10:34 +08:00
afc163
d0c34380d4 simplify form demo code 2016-11-02 18:08:48 +08:00
Wei Zhu
5c711a275e deps: update rc-select (#3692)
* Update rc-select

* Add automatic tokenization demo
2016-11-02 17:35:05 +08:00
afc163
4ae2467668 Merge branch 'master' of github.com:ant-design/ant-design 2016-11-02 16:55:50 +08:00
afc163
24f71ac6be remove some blanks 2016-11-02 16:55:15 +08:00
Meck
ae5f8c1a04 Merge branch 'RaoHai-mention-suggestion-fixed' 2016-11-02 15:51:38 +08:00
Wei Zhu
e4b6ccf7f0 docs: add dynamic setting demo for table (#3690) 2016-11-02 15:09:54 +08:00
Meck
248f0d12ad Fix typo 2016-11-02 15:04:42 +08:00
afc163
137299f4c8 blur DatePicker[showTime] will trigger onChange 2016-11-02 15:02:21 +08:00
Benjy Cui
168370fb82 docs: remove documentation about timezone 2016-11-02 13:59:28 +08:00
afc163
6e6970dbd5 Merge branch 'master' of github.com:ant-design/ant-design 2016-11-02 13:58:21 +08:00
afc163
7fad45403e changelog for 2.2.1 2016-11-02 13:57:51 +08:00
Benjy Cui
2dc5b11c43 docs: update docs about timezone 2016-11-02 13:47:05 +08:00
Benjy Cui
59805843e5 docs: merge mix demo into validate-other 2016-11-02 12:13:52 +08:00
afc163
f443032caa Merge branch 'master' of github.com:ant-design/ant-design 2016-11-02 12:06:02 +08:00
afc163
82c816fbc9 Fix controlled DatePicker[showTime] not working, close #3665 2016-11-02 12:03:13 +08:00
Benjy Cui
d198c63a68 docs: update demo, close: #3673 2016-11-02 11:42:12 +08:00
Benjy Cui
7372893b8e docs: add demo for without Form.create, ref: #3594 2016-11-02 11:24:52 +08:00
afc163
20bbf43ccd Fix Transfer ssr bug, close #3686 2016-11-02 11:14:21 +08:00
Benjy Cui
1eb3d68656 docs: simplify demo 2016-11-02 10:47:50 +08:00
afc163
f40ba76ba7 Merge branch 'master' of github.com:ant-design/ant-design 2016-11-01 16:11:43 +08:00
afc163
7e73725c68 update form demo 2016-11-01 16:11:06 +08:00
Benjy Cui
29a732e3a9 docs: fix typo, close: #3672 2016-11-01 15:30:02 +08:00
afc163
a105876ff1 update style 2016-11-01 15:08:31 +08:00
afc163
479e975d29 Improve API table style 2016-11-01 15:02:48 +08:00
afc163
14cbb03dc1 fix link 2016-11-01 14:47:52 +08:00
afc163
fa06625de0 Fix popover arrow style in nested example, close #3448 2016-11-01 12:34:39 +08:00
afc163
b54020ea01 Merge branch 'master' of github.com:ant-design/ant-design 2016-11-01 12:02:49 +08:00
afc163
8c68e8f64b improve tabs switch animation 2016-11-01 11:58:43 +08:00
Benjy Cui
60ecb3c628 refactor: each message should warn just once 2016-11-01 11:10:11 +08:00
Benjy Cui
0b7856b712 fix: should check undefined value, close: #3665 2016-11-01 10:12:34 +08:00
Benjy Cui
048e3c9246 docs: update demo for time-relate controls 2016-11-01 10:11:02 +08:00
Meck
984a03e203 docs: add a note for AutoComplete's API 2016-11-01 09:50:42 +08:00
afc163
fc6ce27fd5 Merge branch 'master' of github.com:ant-design/ant-design 2016-11-01 00:55:56 +08:00
afc163
002f3f5127 Fix Radio[disabled] style and add label-hovering style, close #3590 2016-11-01 00:54:47 +08:00
Nathan Wells
d997dc9e1e typo (#3663) 2016-10-31 23:32:16 +08:00
ddcat1115
ad9cfe8914 Button add Multiple Buttons demo (#3660) 2016-10-31 19:31:43 +08:00
Benjy Cui
b2e6bdcf94 feat: deprecate Tag[color], ref: #3560 2016-10-31 17:58:12 +08:00
afc163
44f61ac987 smaller Icon[loading] 2016-10-31 17:41:45 +08:00
Benjy Cui
4b5353b457 docs: add demo for mapPropsToFields, close: #3493 2016-10-31 16:33:25 +08:00
RaoHai
42d06e1f0e fix getPopupDomNode 2016-10-31 15:58:15 +08:00
RaoHai
c5a043b4c8 Mention Improvement
+ add `getSuggestionContainer` callback function, which allow users modify the
 container element of suggestions dropdown.
 + the suggestions dropdown will mount on `document.body` defaultly, instead of
 on editor.
 + close #3588
2016-10-31 15:58:15 +08:00
Benjy Cui
037d739fa4 docs: update demo order 2016-10-31 15:42:57 +08:00
Benjy Cui
49e5bfa7ca docs: add demo for customized form control, close: #3585, ref: #3594 2016-10-31 15:03:48 +08:00
Benjy Cui
27708b702c docs: update docs for upload, ref: #3651 2016-10-31 13:44:13 +08:00
edgji
ea4e98d5f7 docs: add documentation and reference for customRequest (#3651) 2016-10-31 13:36:40 +08:00
feng zhi hao
edb41f4420 update types in Tabs and FormItem (#3653)
* update types in Tabs and FormItem

* remove children prop in FormItem and Tabs
2016-10-31 13:15:13 +08:00
偏右
1deea83a05 refactor: keep index.js as entry (#3397) 2016-10-31 12:09:06 +08:00
Benjy Cui
915ebd6a28 deps: update rc-slider 2016-10-31 12:01:38 +08:00
afc163
baa0c53132 code style 2016-10-30 21:00:33 +08:00
Benjy Cui
746790a44e docs: update Affix demos 2016-10-30 15:11:22 +08:00
Benjy Cui
e7fb3447a2 style: fix lint 2016-10-30 12:44:47 +08:00
Benjy Cui
a7d335ec7a docs: update docs detail 2016-10-30 12:43:59 +08:00
Benjy Cui
2cb147f96d docs: should not expose prefixCls to developer 2016-10-30 10:40:33 +08:00
afc163
1e1a3e755c update document 2016-10-29 15:49:56 +08:00
afc163
216f046f3b Change badge count title to raw value, close #3645 2016-10-29 15:26:05 +08:00
afc163
83ba6d96b4 upgrade normalize to 5.0 manually 2016-10-29 14:30:41 +08:00
865 changed files with 52127 additions and 8901 deletions

View File

@@ -1,3 +1,6 @@
{
"presets": ["es2015", "react", "stage-0"]
"presets": ["es2015", "react", "stage-0"],
"plugins": [
"add-module-exports"
]
}

6
.eslintignore Normal file
View File

@@ -0,0 +1,6 @@
components/**/*.js
components/**/*.jsx
!.eslintrc.js
!components/*/__tests__/*
!components/*/demo/*
!components/*/style/*

View File

@@ -3,7 +3,7 @@ const eslintrc = {
env: {
browser: true,
node: true,
mocha: true,
jasmine: true,
jest: true,
es6: true,
},
@@ -27,6 +27,7 @@ const eslintrc = {
'react/prop-types': 0,
'react/jsx-first-prop-new-line': 0,
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx', '.md'] }],
'import/extensions': 0,
'import/no-unresolved': 0,
'import/no-extraneous-dependencies': 0,
'no-param-reassign': 0,
@@ -39,6 +40,7 @@ const eslintrc = {
'jsx-a11y/no-static-element-interactions': 0,
'jsx-a11y/anchor-has-content': 0,
'react/no-danger': 0,
'comma-dangle': ['error', 'always-multiline'],
},
};

View File

@@ -19,7 +19,7 @@ Tips: choose the corresponding documentation with versions selector which in the
### 2. Make sure that your question is about Ant Design, not React
Someone may think all of the questions that he/she meets in developing are about Ant Design, but it's not true. So, please read [React's documentaion](http://facebook.github.io/react/docs/getting-started.html) or just Google(not Baidu, seriously) your questions with keywork *React* first. If you are sure that your question is about Ant Design, go ahead.
Someone may think all of the questions that he/she meets in developing are about Ant Design, but it's not true. So, please read [React's documentation](http://facebook.github.io/react/docs/getting-started.html) or just Google (not Baidu, seriously) your questions with keyword *React* first. If you are sure that your question is about Ant Design, go ahead.
### 3. Read the FAQ and search the issues list of Ant Design
@@ -48,9 +48,11 @@ If you believe that Ant Design should provide some features, but it does not. Yo
## Tips about Pull Request
**Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)
It's welcomed to pull request. And there are some tips about that:
1. It is a good habit to create a feature request issue to disscuss whether the feature is necessary before you implement it. However, it's unnecessary to create an issue to claim that you found a typo or improved the readability of documentaion, just create a pull request.
1. It is a good habit to create a feature request issue to discuss whether the feature is necessary before you implement it. However, it's unnecessary to create an issue to claim that you found a typo or improved the readability of documentation, just create a pull request.
1. Run `npm run lint` and fix those errors before committing in order to keep consistent code style.
1. Rebase before creating a PR to keep commit history clear.
1. Add some descriptions and refer relative issues for you PR.

View File

@@ -5,31 +5,28 @@ antd 的用法咨询,建议通过以下渠道,官方 issues 目前没有足
1. [Stack Overflow](http://stackoverflow.com/questions/tagged/antd)
2. [Segment Fault](https://segmentfault.com/t/antd)(中文)
3. [Gitter](https://gitter.im/ant-design/ant-design)
如果是报告 bug请按照下列格式书写并务必提供复现步骤否则恕难解决感谢您的支持。
-->
#### 发生问题的环境是:
#### Environment(required)
<!-- 务必提供 -->
- antd version:
- OS and its version:
- Browser and its version:
- antd 版本:
- 操作系统及其版本:
- 浏览器及其版本:
#### What did you do? Please provide steps to re-produce your problem.
#### 您做了什么?请提供尽可能详细的重现步骤。
<!-- e.g. I just imported Button from antd -->
<!-- 如:引入 antd 了 Button -->
#### What do you expected?
#### 您期待的结果是:
<!-- e.g. It works fine as official website -->
<!-- 如:像官网一样正常显示 -->
#### What happen?
#### 实际上的结果是:
<!-- e.g. Style is not as expected. (And it will be better to provide screenshot) -->
<!-- 如:样式错位了,最好提供截图 -->
#### Re-producible online demo
#### 可重现的在线演示
<!-- 请修改并 Fork http://codepen.io/benjycui/pen/KgPZrE?editors=001 -->
<!-- Please fork http://codepen.io/benjycui/pen/KgPZrE?editors=001 to re-produce you issue -->

6
.gitignore vendored
View File

@@ -27,6 +27,10 @@ dist
/lib
elasticsearch-*
config/base.yaml
/.vscode/
/coverage
yarn.lock
components/**/*.js
components/**/*.jsx
/.vscode/
!components/**/__tests__/*.js
!components/**/__tests__/*.js.snap

18
.jest.node.json Normal file
View File

@@ -0,0 +1,18 @@
{
"setupFiles": [
"./tests/setup.js"
],
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"md"
],
"transform": {
"\\.tsx?$": "./node_modules/typescript-babel-jest",
"\\.js$": "./node_modules/babel-jest",
"\\.md$": "./node_modules/antd-demo-jest"
},
"testRegex": "demo\\.test\\.js$",
"testEnvironment": "node"
}

View File

@@ -1,21 +0,0 @@
{
"propertyOrdering": false,
"hexLength": "short",
"stringQuotes": false,
"decimalZero": false,
"importantRule": false,
"zeroUnit": "no_unit",
"qualifyingElement": false,
"duplicateProperty": false,
"importPath": false,
"finalNewline": false,
"newlineAfterBlock": false,
"maxCharPerLine": false,
"excludedFiles": [
"components/layout/style/mixin.less",
"components/style/core/base.less",
"components/style/core/iconfont.less",
"components/style/core/normalize.less",
"components/style/mixins/compatibility.less"
]
}

23
.stylelintrc Normal file
View File

@@ -0,0 +1,23 @@
{
"extends": "stylelint-config-standard",
"rules": {
"at-rule-empty-line-before": null,
"at-rule-name-space-after": null,
"declaration-bang-space-before": null,
"declaration-empty-line-before": null,
"function-comma-newline-after": null,
"function-name-case": null,
"function-parentheses-newline-inside": null,
"function-max-empty-lines": null,
"function-whitespace-after": null,
"indentation": null,
"number-leading-zero": null,
"number-no-trailing-zeros": null,
"rule-empty-line-before": null,
"selector-combinator-space-after": null,
"selector-list-comma-newline-after": null,
"selector-pseudo-element-colon-notation": null,
"unit-no-unknown": null,
"value-list-max-empty-lines": null
}
}

View File

@@ -4,3 +4,12 @@ language: node_js
node_js:
- "6"
env:
- MAX_WORKERS=2
script:
- npm run test-all
after_script:
- cat ./coverage/lcov.info | node_modules/coveralls/bin/coveralls.js

View File

@@ -1,11 +1,17 @@
Albert Zheng <lisong.zheng@gmail.com>
Andrew Murray <radarhere@gmail.com>
Andrey G <plandem@gmail.com>
Benjy Cui <benjytrys@gmail.com>
Bernie <bernie.wangbj@gmail.com>
Bozhao <yubz86@gmail.com>
Bruce Mitchener <bruce.mitchener@gmail.com>
Bruno Maia <bruno.mm.maia@gmail.com>
C <4019980@qq.com>
Cam Song <neosoyn@gmail.com>
Catalin Miron <mironcatalin@gmail.com>
Cee Cirno <i@cee.moe>
Cody Chan <int64ago@gmail.com>
Danny Hoower Antonio Viasus Avila <danjavia@gmail.com>
Daqi Song <dqaria@gmail.com>
DengYun <tdzl2003@gmail.com>
Eddie Xie <oeddyo@gmail.com>
@@ -16,19 +22,25 @@ Gray Choi <gray.choi.1988@gmail.com>
Guan Hao <raptium@gmail.com>
Haibin Yu <haibin.yu@oceanwing.com>
Hanai <ihanai1991@gmail.com>
ImJoeHs <865439601@qq.com>
Infinity <305870677@qq.com>
James <james@schoolshape.com>
Jerry Bendy <jerry@icewingcc.com>
Junyu Zhan <irrigator@yeah.net>
KgTong <kgtong1992@gmail.com>
Leon Shi <superRaytin@163.com>
Leon Shi <superRaytin@gmail.com>
Liu Yang <zation1@gmail.com>
LongYinan <lynweklm@gmail.com>
MG12 <wuzhao.mail@gmail.com>
Ma Tianxiao <matx2215@outlook.com>
Marius Ileana <visvadw@gmail.com>
Marshall Chen <Juniors.fei@gmail.com>
Meck <yesmeck@gmail.com>
Mr.Tone <vector@malubei.com>
Nathan Wells <nwwells@gmail.com>
Neverland <chenjiahan@buaa.edu.cn>
Nimo <nimo.jser@gmail.com>
Pyiner <lijiuyang1992@gmail.com>
Qiaosen Huang <joesonw@gmail.com>
RaoHai <surgesoft@gmail.com>
@@ -49,10 +61,12 @@ bang <sqibang@gmail.com>
bang88 <sqibang@gmail.com>
chencheng (云谦) <sorrycc@gmail.com>
ddcat1115 <ddcat1115@gmail.com>
denzw <denzw@21cn.com>
detailyang <detailyang@gmail.com>
devqin <devqin@gmail.com>
djorkaeff <djorkae55@gmail.com>
ecofe <150641329@qq.com>
edgji <j.edgji@gmail.com>
elrrrrrrr <elrrrrrrr@gmail.com>
ezpub <ez.foro@gmail.com>
feng zhi hao <fzhihao@outlook.com>
@@ -63,15 +77,18 @@ hi-caicai <hi@cai-cai.me>
ioldfish <fish.wangl@gmail.com>
jasonslyvia <jasonslyvia@gmail.com>
jiang <155259966@qq.com>
jinouwuque <ee2win@gmail.com>
kagawagao <kingsongao1221@gmail.com>
kaifei <150641329@qq.com>
kasinooya <kasinooya@gmail.com>
kayw <kayw@outlook.com>
leon.shi <superRaytin@163.com>
lgmcolin <gengmin.lgm@gmail.com>
lgmcolin <lgmcolin@gmail.com>
lixiaochou077 <qi.liqi07@gmail.com>
lizhaocai <lzc09008@gmail.com>
muzuiget <muzuiget@gmail.com>
parlop <parlop@gmail.com>
pizn <pizner@gmail.com>
plandem <plandem@gmail.com>
popomore <sakura9515@gmail.com>
@@ -88,6 +105,7 @@ tom <caolvchong@gmail.com>
ustccjw <317713370@qq.com>
warmhug <hualei5280@gmail.com>
wizawu <wizawu@gmail.com>
xiaofan2406 <xiaofan2406@gmail.com>
yeliex <yeliex@yeliex.com>
yiminghe <yiminghe@gmail.com>
yubozhao <yubz86@gmail.com>
@@ -99,9 +117,15 @@ zhaocai <lzc09008@gmail.com>
zhujun24 <zhujun87654321@gmail.com>
zilong <jzlxiaohei@163.com>
zinkey <yaya@uloveit.com.cn>
zuiidea <zuiiidea@gmail.com>
偏右 <afc163@gmail.com>
逸达 <dqaria@gmail.com>
蔡伦 <sliuqin@gmail.com>
陆离 <surgesoft@gmail.com>
低位 <zhujun87654321@gmail.com>
广彬-梁 <326741518@qq.com>
闲耘™ <hotoo.cn@gmail.com>
吕立青 <jimmy.jinglv@gmail.com>
马斯特 <sd4399340@126.com>
马金花儿 <o.o@mug.dog>
白羊座小葛 <abeyuhang@gmail.com>

View File

@@ -1,14 +1,361 @@
---
order: 3
order: 6
title: Change Log
toc: false
timeline: true
---
If you want to read change logs before `2.0.0`, please visit [GitHub](https://github.com/ant-design/ant-design/releases?after=2.0.0).
`antd` strictly follows [Semantic Versioning 2.0.0](http://semver.org/).
#### Release Schedule
* Weekly release: patch version at the end of every week for routine bugfix (anytime for urgent bugfix).
* Monthly release: minor version at the end of every month for new features.
* Major version release is not included in this schedule for breadking change and new features.
If you want to read change logs before `2.0.0`, please visit [GitHub](https://github.com/ant-design/ant-design/blob/1.x-stable/CHANGELOG.md).
---
## 2.7.1
`2017-02-10`
- **Affix**
- Fix the problem of element been hidden when hover on. [#4800](https://github.com/ant-design/ant-design/issues/4800)
- Fix event listener can not be removed. [#4755](https://github.com/ant-design/ant-design/issues/4755)
- Fix can not be unfixed when scrolling fastly. [#4760](https://github.com/ant-design/ant-design/issues/4760)
- **Anchor** Fix the location problem when offsetTop has been set. [#4706](https://github.com/ant-design/ant-design/issues/4706)
- **AutoComplete**
- Fix the wrong size. [#4766](https://github.com/ant-design/ant-design/issues/4766)
- Fix adding error character automatically. [#4778](https://github.com/ant-design/ant-design/issues/4778)
- **Dropdown** Add the documentation and demo about positioning of Dropdown menus. [#4811](https://github.com/ant-design/ant-design/issues/4811)
- **Grid** Delete the useless class in non-flex mode. [#4784](https://github.com/ant-design/ant-design/pull/4784) [@chikara-chan](https://github.com/chikara-chan)
- **Icon** Unified naming style(original names remain valid while new names been added). [#4758](https://github.com/ant-design/ant-design/issues/4758)
- **Layout** Improve Sider's animation effect. [#4752](https://github.com/ant-design/ant-design/issues/4752)
- **LocaleProvider** Fix issues with the new Swedish locale provider. [pull-4762](https://github.com/ant-design/ant-design/pull/4762) [@JesperWe](https://github.com/JesperWe)
- **RangePicker** Fix the overlapping problem about the date icon. [#4783](https://github.com/ant-design/ant-design/issues/4783) [@zhenzong](https://github.com/zhenzong)
- **Table**
- Support `size='middle'` 。[#4819](https://github.com/ant-design/ant-design/pull/4819) [@warrenseymour](https://github.com/warrenseymour)
- Fix controlled filter does not work with JSX style. [#4759](https://github.com/ant-design/ant-design/issues/4759)
- Fix switch pagination problem. [#4779](https://github.com/ant-design/ant-design/issues/4779)
- Fix performance issues under IE11. [#4522](https://github.com/ant-design/ant-design/issues/4522)
- **Tabs** Fix content missing problem since the second tab pane. [#4795](https://github.com/ant-design/ant-design/issues/4795)
- **rc-pagination** Upgrade to ~1.7.0, support showLessItems, and add pageSize as onChange's second argument.
- **Global optimization**
- Make some bugfixes and optimizations about documentation、link and style.
- Use stylelint instead of lesslint, and fix some lint issues. [#2179](https://github.com/ant-design/ant-design/issues/2179)
- Unify border radius to 4px. [#4772](https://github.com/ant-design/ant-design/issues/4772)
- Support `import { version } from 'antd'` . [#4751](https://github.com/ant-design/ant-design/pull/4751)
- **Site**
- Add default locale looking-up in Home Page. [#4552](https://github.com/ant-design/ant-design/issues/4552)
- Can search with Google. [#4814](https://github.com/ant-design/ant-design/issues/4814)
- Change the position of version switch. [pull-4799](https://github.com/ant-design/ant-design/pull/4799)
## 2.7.0
`2017-02-03`
* Added `danger` button and `ghost` button style. [#4679](https://github.com/ant-design/ant-design/pull/4679)
* Input element of AutoComplete can be customized. [#4483](https://github.com/ant-design/ant-design/pull/4483)
* Upgrade rc-cascader to `0.11.0`, keyborad interactions supported. [#4411](https://github.com/ant-design/ant-design/pull/4411)
* More popup directions are supported in notification. [#4732](https://github.com/ant-design/ant-design/pull/4700)
* Upgrade rc-steps to `2.3.0`, added `progressDot` property of Steps, which allows users to customize the display for Steps with progress dot style.
* Upgrade rc-input-number to `3.0.0`
* Input behavious will trigger `onChange` callback now.[#4265](https://github.com/ant-design/ant-design/pull/4265)
* Fixed `onKeyUp`. [#4717](https://github.com/ant-design/ant-design/issues/4717)
* Added `vertical` mode of Slider. [#4473](https://github.com/ant-design/ant-design/pull/4473)
* Tag
* Added preset colors. [#4571](https://github.com/ant-design/ant-design/pull/4571)
* Improvement vertical-align and margin.
* Add German localization for LocaleProvider.[#4686](https://github.com/ant-design/ant-design/pull/4686)
* Add Swedish localization for LocaleProvider. [#4455](https://github.com/ant-design/ant-design/pull/4455)
* Add French localization for LocaleProvider. [#4538](https://github.com/ant-design/ant-design/pull/4538)
* Added `onSearchChange` callback of Transfer. [#4464](https://github.com/ant-design/ant-design/pull/4464)
* Added `maskClosable` property of Modal.confirm. [#4488](https://github.com/ant-design/ant-design/pull/4488), [#4488](https://github.com/ant-design/ant-design/pull/4490)
* Added `hideRequiredMark` property if Form. [#4732](https://github.com/ant-design/ant-design/pull/4732)
* Improvement upload list of Upload. [#4516](https://github.com/ant-design/ant-design/pull/4516)
* Upgrade rc-select to `6.7.1`.
* Fixed duplication `onChange` callback. [#156@rc-select](https://github.com/react-component/select/pull/156)
* Fixed displaying of initial value. [#152@rc-select](https://github.com/react-component/select/pull/152)
* Upgrade rc-tree-select to `1.9.0`.
* Added `treeDefaultExpandedKeys` property.[#43@rc-tree-select](https://github.com/react-component/tree-select/pull/43)
* Fixed an overflow-wrap issue. [#42@rc-tree-select](https://github.com/react-component/tree-select/pull/42)
* Added less variables: `@border-style-base` `@border-width-base` `@btn-danger-color` `@btn-danger-bg` and etc.
* Fixed Badge misplace issue when browser zoom above 100%. [#4747](https://github.com/ant-design/ant-design/issues/4747) [#4290](https://github.com/ant-design/ant-design/issues/4290)
* Fixed a mis-align issue of fixed header Table. [#4750](https://github.com/ant-design/ant-design/issues/4750)
* Fixed Table scrolling lag issue in IE. [#4522](https://github.com/ant-design/ant-design/issues/4522)
* Add icon aliases: `addfile` => `file-add``addfolder` => `folder-open`, and the old type names are still working. [#4758](https://github.com/ant-design/ant-design/issues/4758)
## 2.6.4
`2017-01-20`
* Improve RangePicker when selecting a preset date.[#4561](https://github.com/ant-design/ant-design/issues/4561)
* Fix DatePicker select time scroll issue.[#4412](https://github.com/ant-design/ant-design/issues/4412)
* Fix issue resulting in vertical Menu can't be controlled.[#3783](https://github.com/ant-design/ant-design/issues/3783)
* Fix Cascader's style when it's disabled.[#4648](https://github.com/ant-design/ant-design/issues/4648)
* Table
* Improve Table fixed header's scrollbar style.[#4637](https://github.com/ant-design/ant-design/issues/4637)
* Fix issue resulting in Table's header flashes when `loading` is true in Safari.[#4622](https://github.com/ant-design/ant-design/issues/4622)
* Fix multiple border issues. [#4647](https://github.com/ant-design/ant-design/issues/4647)、[#4635](https://github.com/ant-design/ant-design/issues/4635)
* Fix `showHeader`'s default value.[#4658](https://github.com/ant-design/ant-design/issues/4658)
* Fix missing `TableColumnConfig` type.[#4660](https://github.com/ant-design/ant-design/issues/4660)
## 2.6.3
`2017-01-15`
* Fixed issue introduced in `2.6.2` that Popconfirm is not working. [#4606](https://github.com/ant-design/ant-design/issues/4606)
## 2.6.2
`2017-01-14`
* Added a Third-Party Library Page for recommending other greet react components. [Link](/docs/react/recommendation)
* Fixed misplaced Sider of Layout. [#4459](https://github.com/ant-design/ant-design/issues/4459)
* Fixed Input.Search wrong block layout and misplaced icon. [#4540](https://github.com/ant-design/ant-design/issues/4540)
* Added a customize Collapse panel demo. [Link](/components/collapse/#components-collapse-demo-custom)
* Table
* Enlarged the width of selection column and expand column.
* Fixed not-available pagination issue when property `pagination` is changed. [#4532](https://github.com/ant-design/ant-design/issues/4532)
* Fixed that three level filter menu is not working. [#4541](https://github.com/ant-design/ant-design/issues/4541)
* Fixed `column.filteredValue` issue of cannot being set to `null`.
* Now Carousel is undragglble and text-selectable defaultly.
* Added warnings when non-BreadcrumbItem node is nested under Breadcrumb. [#4403](https://github.com/ant-design/ant-design/issues/4403)
* Fixed Tooltip hidden issue when `onVisibleChange(visible)` return `true`. [#4579](https://github.com/ant-design/ant-design/issues/4579)
* Make TreeSelect panel default height smaller than screen height. [#4537](https://github.com/ant-design/ant-design/pull/4537)
* Added less variables of TimePicker and Spin.
* Replaced arrows of DatePicker year panel by year text. [#4415](https://github.com/ant-design/ant-design/issues/4415)
* Fixed TypeScript definites of AutoComplete and Form `[options.validateTrigger]`.
* Improved the animation details of Spin and Progress.
## 2.6.1
`2017-1-6`
* Fix style problem for Menu dark theme. [#4440](https://github.com/ant-design/ant-design/issues/4440)
* Fix TypeScript interface definition for `Select[tokenSeparators]` `Modal[afterClose]` `Input[name]` and so on. [#4441](https://github.com/ant-design/ant-design/pull/4441) [@eddhannay](https://github.com/eddhannay)
* Fix that `TimePicker[placeholder]` cannot be set to empty string. [#4446](https://github.com/ant-design/ant-design/pull/4446) [@jialeicui](https://github.com/jialeicui)
* Fix style problem in DatePicker year panel. [#4415](https://github.com/ant-design/ant-design/issues/4415)
* Fix that Table loading doesn't mask Pagination. [#4461](https://github.com/ant-design/ant-design/issues/4461)
* Fix align style for `Input[prefix|suffix]`. [commit](https://github.com/ant-design/ant-design/commit/c4ac4d1eca53ae2f6f4a1e15210b43745f283534)
* Fix align style for Cascader. [commit](https://github.com/ant-design/ant-design/commit/1fbebd4ecfff432e1b2261c9dfee4b9f471e7b1f)
## 2.6.0
`2017-1-2`
- Brand new color system. [pull/4426](https://github.com/ant-design/ant-design/pull/4426)
- Brand new color algorithm replacing the tint/shade system.
- Brand new color palattes generated by new algorithm. [Link](http://ant.design/docs/spec/colors)
- Change default font color.
- Add Layout component. [#3534](https://github.com/ant-design/ant-design/issues/3534)
- Add Grid playground demo. [commit/ee17ab](https://github.com/ant-design/ant-design/commit/ee17abfa9d0362c6f9baab4a9a09e57574583246)
- Input
- Support prefix and suffix. [#4226](https://github.com/ant-design/ant-design/issues/4226) [@ystarlongzi](https://github.com/ystarlongzi)
- InputGroup support compact display mode. [pull/4309](https://github.com/ant-design/ant-design/pull/4309)
- Spin support delayed display. [#4306](https://github.com/ant-design/ant-design/issues/4306)
- Fix the dislocation problem of Pagination in low resolution. [#4349](https://github.com/ant-design/ant-design/issues/4349)
- Fix wrapping display of Dropdown.Button. [pull/4355](https://github.com/ant-design/ant-design/pull/4355) [@Morhaus](https://github.com/Morhaus)
- Fix wrong background color of Cascader in disabled status. [#4434](https://github.com/ant-design/ant-design/issues/4434)
- Fix MonthPicker[monthCellContentRender] doesn't work, and some documentation errors. [#4394](https://github.com/ant-design/ant-design/issues/4394)
- Fix the extra border of ButtonGroup. [#4382](https://github.com/ant-design/ant-design/pull/4382) [@ystarlongzi](https://github.com/ystarlongzi)
- Fix wrong background color of the Submenu(horizontal mode). [#4414](https://github.com/ant-design/ant-design/issues/4414)
- Fix overlapping graphics with Select/Cascader in Form.Item with hasFeedback. [#4431](https://github.com/ant-design/ant-design/issues/4431) [@JesperWe](https://github.com/JesperWe)
- Reset border-radius of the first row in Table without header. [#4373](https://github.com/ant-design/ant-design/issues/4373)
- Improve the drag performance of Tree. [#4371](https://github.com/ant-design/ant-design/issues/4371)
- Improve official website and documentation, fix some bugs.
- Update rc-form to support nested style of getFieldDecorator[id].
## 2.5.3
`2016-12-24` 🎄🎄🎄
* Supports TypeScript@2.1. [#4208](https://github.com/ant-design/ant-design/issues/4208)
* Fix style issue resulting in nested Tabs. [#4317](https://github.com/ant-design/ant-design/issues/4317)
* Fix `onChange` callback issue resulting in Radio. [#4242](https://github.com/ant-design/ant-design/issues/4242) [@ystarlongzi](https://github.com/ystarlongzi)
* Fix a FormItem mis-aligin bug. [#4271](https://github.com/ant-design/ant-design/issues/4271)
* Fix background issue resulting in selected element of veritcal Menu.[#4253](https://github.com/ant-design/ant-design/issues/4253)
* Improve arguments type of `onVisibleChange` callback of Dropdown.[#4236](https://github.com/ant-design/ant-design/issues/4236) [@bang88](https://github.com/bang88)
* Improve first argument type of `onChange` callback of Cascader.[#4231](https://github.com/ant-design/ant-design/issues/4231) [@bang88](https://github.com/bang88)
* Improve default width of Datepicker[showTime]. [b912f1c](https://github.com/ant-design/ant-design/commit/b912f1cea6f470c16b8dd90554883460161cef47)
## 2.5.2
`2016-12-10`
* Improve selected item style of Menu.
* Fix issue resulting in Mention not responses `onFocus` and `onBlur`. [#4163](https://github.com/ant-design/ant-design/issues/4163)
* Fix issue resulting in there is a redundant shadow between `disabled` and `checked` Radio. [#4114](https://github.com/ant-design/ant-design/pull/4114) @jdz321
* Fix error when setting Momment `defaultValue` or `value` on RangePicker, TimePicker, Calendar. [#4147](https://github.com/ant-design/ant-design/issues/4147)
* Fix issue resulting in Affix disappears when it's uesed in animated Tabs. [#3943](https://github.com/ant-design/ant-design/issues/3943)
* Fix issue resulting in Cascader passes different `selectedOptions` to `onChange` when manually selecting and selecting by search. [#4096](https://github.com/ant-design/ant-design/issues/4096)
* Fix issue resulting in Tabs get offset, when too many tabs are opening. [#3637](https://github.com/ant-design/ant-design/issues/3637)
* Table
* Align text of grouped parent header to center.
* Fix issue resulting in `filterDropdownVisible` can't be set correctly. [#4162](https://github.com/ant-design/ant-design/issues/4162)
## 2.5.1
`2016-12-03`
* Improve website experience on mobile devices.
* Add some migrate warnings for `1.x` to `2.x`.
* ToolTip, Popover, Popconfirm support to wrap text node and multiple node directly now. [#3924](https://github.com/ant-design/ant-design/issues/3924)
* Anchor
* Fix current position bug when scroll fastly. [#4053](https://github.com/ant-design/ant-design/issues/4053)
* Fix a bug of parent component ref node is undefined. [#4037](https://github.com/ant-design/ant-design/issues/4037)
* Table
* Fix a selection problem when setting defaultChecked in rowSelection. [#4020](https://github.com/ant-design/ant-design/issues/4020)
* Fix grouping column title cannot work with filters. [#4099](https://github.com/ant-design/ant-design/issues/4099)
* Fix a misplace bug when using Popover over `Input[type="textarea"]`. [#4092](https://github.com/ant-design/ant-design/issues/4092)
* Fix Popconfirm `visible` is not-working problem. [#4068](https://github.com/ant-design/ant-design/issues/4068)
* Fix TimePicker can not override width by `style.width`.
* Unify Steps icon size. [#3817](https://github.com/ant-design/ant-design/issues/3817)
* Fix style details of Form, Button, Slider, Table.
## 2.5.0
`2016-11-25`
* Change the default theme to Alipay style and improve lots of style details.
* Supports server-side rendering. (`Mention` will throw warning for [draft-js](https://github.com/facebook/draft-js/issues/385)' issue)
* Introduce [Jest Snapshot](https://facebook.github.io/jest/docs/tutorial-react.html#snapshot-testing) to test the structure of components and SSR issues.
* Improve official website and documentation.
* Add [document](https://ant.design/docs/react/customize-theme) for customizing theme.
* Add [Sketch template files](https://ant.design/docs/resource/download).
* `LocaleProvider` supports Brazilian. [#4004](https://github.com/ant-design/ant-design/pull/4004) [@nathantn](https://github.com/nathantn)
* DatePicker
* DatePicker can determine whether to show "Today" button. [commit](https://github.com/ant-design/ant-design/commit/bbef274aae169d142e3e7e3ea0af922d48e6dd64)
* RangePicker can set presetted ranges. [demo](https://ant.design/components/date-picker/#components-date-picker-demo-presetted-ranges)
* Fix "Now" button doesn't work while `DatePicker[showTime]` is set. [#3748](https://github.com/ant-design/ant-design/issues/3748)
* Fix `RangePicker[format]` should work. [#3808](https://github.com/ant-design/ant-design/issues/3808)
* Add and update some icons. [#3977](https://github.com/ant-design/ant-design/pull/3977)
* New component `Input.Search`. [demo](https://ant.design/components/input/#components-input-demo-search-input)
* Mention onSelect event will get complete record. [#3867](https://github.com/ant-design/ant-design/issues/3867)
* Pagination can get current range. [demo](https://ant.design/components/pagination/#components-pagination-demo-total)
* Table
* We can control the visible of customized `filterDropdown`. [demo](https://ant.design/components/table/#components-table-demo-custom-filter-panel)
* Supports JSX-style columns. [demo](https://ant.design/components/table/#components-table-demo-jsx)
* Can listen the click event of table cell. [#3774](https://github.com/ant-design/ant-design/issues/3774)
* Fix border radius of head of border-less table.
* Fix that height of title and footer don't follow `Table[size]`. [commit](https://github.com/ant-design/ant-design/commit/9e6439b06cd099ab384a4a2f026f0def6e12bf23)
* Fix issue with selected status. [#3900](https://github.com/ant-design/ant-design/issues/3900)
* Upload
* Fix that children could not be `null`.
* Fix logic of preview. [commit](https://github.com/ant-design/ant-design/commit/e552880c32aaa3f5b0fb09a5e1fb7454c24d5378)
* Fix `z-index` of Badge. [#3898](https://github.com/ant-design/ant-design/issues/3898)
* Fix alignment of multi-line Checkbox. [#3971](https://github.com/ant-design/ant-design/issues/3971) [@flashback313](https://github.com/flashback313)
* Fix alignment of InputNumber while using with other form controls. [#3866(comment)](https://github.com/ant-design/ant-design/issues/3866#issuecomment-261148256)
* Fix style of `Menu.Divider`. [#3813](https://github.com/ant-design/ant-design/issues/3813)
* Fix that Popover should support Checkbox and Radio as children. [#3455](https://github.com/ant-design/ant-design/issues/3455)
* Fix height of `Select[combobox]`. [#3855](https://github.com/ant-design/ant-design/issues/3855)
* Fix style of actived Switch. [#3838](https://github.com/ant-design/ant-design/issues/3838)
* Fix that Transfer doesn't show "Not Found" while there is no search result. [#3996](https://github.com/ant-design/ant-design/issues/3996)
* Fix style of placeholder of TreeSelect. [#3841](https://github.com/ant-design/ant-design/issues/3841)
* Fix compile errors in TypeScript. [#3969](https://github.com/ant-design/ant-design/pull/3969) [@AlbertZheng](https://github.com/AlbertZheng)
* Fix that feedback icon should not affect users' operation. [#3891](https://github.com/ant-design/ant-design/issues/3891)
## 2.4.3
`2016-11-17`
* Fix errors in `Anchor` about querySelector, and make some experience Optimization .[#3832](https://github.com/ant-design/ant-design/issues/3832) [#3844](https://github.com/ant-design/ant-design/issues/3844)
## 2.4.2
`2016-11-13`
* Fix `Dropdown.Button` cannot popup menu.[#3815](https://github.com/ant-design/ant-design/issues/3815)
## 2.4.1
`2016-11-11`
* Fix `2.4.0` missing index files.
## 2.4.0
`2016-11-11`
* Adjust components structure.
* New [Anchor](https://ant.design/components/anchor) Component.
* Fix less variables `@font-size-base` and `@text-color`, add `@font-size-lg` `@text-color-secondary`.
* Add new props `selectedKeys` for `Transfer` component [#3729]. (https://github.com/ant-design/ant-design/issues/3729)
* Add `Tag` selected status.
* Fix `Dropdown.Button` not support `visible` and `onVisibleChange`. [#3779](https://github.com/ant-design/ant-design/issues/3779)
* Fix `Now` button of `DatePicker[showTime]`. [#3748](https://github.com/ant-design/ant-design/issues/3748)
* Fix style of `Steps` in vertical mode. [#3760](https://github.com/ant-design/ant-design/issues/3760)
* Fix style compatibility of `Spin` in IE10+.[#3755](https://github.com/ant-design/ant-design/issues/3755)
* Fix default style of `Carousel` component.
* Fix focus logic of `Mention` component. [#3801](https://github.com/ant-design/ant-design/issues/3801)
* Fix animate bug of `Progress` component. [#3784](https://github.com/ant-design/ant-design/issues/3784)
* Fix focus bug of `Select` component. [#3778](https://github.com/ant-design/ant-design/issues/3778)
* Fix `TimePicker` not support `format="HH"` bug. [#3793](https://github.com/ant-design/ant-design/issues/3793)
* Fix `Input` `suffix` mouse event responsive area. [#3714](https://github.com/ant-design/ant-design/issues/3714)
* Improve performance of `Table` selection. [#3757](https://github.com/ant-design/ant-design/pull/3757)
* Improve Carousel default UI style.
* Improve style of `Checkbox` and `Radio`. [#3590](https://github.com/ant-design/ant-design/issues/3590)
* Fix style of DatePickek, Form, Table.
## 2.3.2
`2016-11-09`
* Fix dead loop while using `getFieldProps`.
## 2.3.1
`2016-11-07`
* Add missing `dist/antd.css` back.
## 2.3.0
`2016-11-04`
* Upgrade normalize.css to 5.0.
* Point main file to `lib/index.js` in package.json. [#3397](https://github.com/ant-design/ant-design/pull/3397)
* A brand new `Spin` design.
* Add `addon` for `TimePicker` to allow render some addon to its bottom.
* Add `onDragEnd` for `Tree`.
* Add `bordered` for `Collapse`.
* Improve `Tabs` switch animation.
* Improve `Radio` and `Checkbox` style when it's disabled and mouse hovered. [#3590](https://github.com/ant-design/ant-design/issues/3590)
* Optimize `Transfer` performance.[#2860](https://github.com/ant-design/ant-design/issues/2860)
* Fix nested `Popover` style issue. [#3448](https://github.com/ant-design/ant-design/issues/3448)
* Fix issue resulting in server side render `Transfer` failed. [#3686](https://github.com/ant-design/ant-design/issues/3686)
* Fix issue resulting in preview image not display when `Upload` in `picture-card` mode. [#3706](https://github.com/ant-design/ant-design/pull/3706) [@denzw](https://github.com/denzw)
* DatePicker
* `onChange` will be triggered when `DatePicker` in `showTime` mode on blur now.
* Add `monthCellContentRender` for `MonthPicker`.
* `Rangepicker` can input time manually now.[#3718](https://github.com/ant-design/ant-design/issues/3718)
* Add czech locale/translations.
* Badge
* Improve number over 99 displaying when mouse hovering. [#3645](https://github.com/ant-design/ant-design/issues/3645)
* Fix moving animation when using `Badge` alone. [#3709](https://github.com/ant-design/ant-design/issues/3709)
* Mention
* Fix issue resulting in `Mention` will be covered by `Table`. [#3588](https://github.com/ant-design/ant-design/issues/3588)
* Add `getSuggestionContainer` to allow specify container. [#3658](https://github.com/ant-design/ant-design/pull/3658)
* Tag
* Deprecate `color`. [#3560](https://github.com/ant-design/ant-design/issues/3560)
* Add `type`. [#3560](https://github.com/ant-design/ant-design/issues/3560)
* Add `checkable`. [#3560](https://github.com/ant-design/ant-design/issues/3560)
* Radio.Group
* Add `className`.
* `null` or `undefined` `children` will be ignored.
* Select
* Add `tokenSeparators` to support automatic tokenization. [#2071](https://github.com/ant-design/ant-design/issues/2071)
* Add `onFocus` callback. [#3587](https://github.com/ant-design/ant-design/issues/3587)
* Fix issue resulting in Select can't display correct selected item text in `combobox` mode. [#3401](https://github.com/ant-design/ant-design/issues/3401)
## 2.2.1
`2016-11-02`
* Fix controlled DatePicker[showTime] not working bug. [#3665](https://github.com/ant-design/ant-design/issues/3665)
## 2.2.0
`2016-10-28`
@@ -27,7 +374,6 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi
* New icons `bulb` `select` `like-o` `dislike-o`.
* Adjust existing icons `loading` `like` `dislike`.
* Improve the TypeScript definition of Card & DatePicker & Icon & Table. [@infeng](https://github.com/infeng) [3468](https://github.com/ant-design/ant-design/pull/3468) [#3603](https://github.com/ant-design/ant-design/pull/3603) [#3531](https://github.com/ant-design/ant-design/pull/3531)
* Fix Cascader `defaultValue` should work. [#3470](https://github.com/ant-design/ant-design/issues/3470)
* Fix the alignment of Button & Input & DatePicker & Select. [#3481](https://github.com/ant-design/ant-design/issues/3481)
* DatePicker
@@ -97,7 +443,7 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi
- Fix developers cannot call methods of react-slick. [#3164](https://github.com/ant-design/ant-design/issues/3164)
- Fix Steps.Step[icon] should support React.ReactNode. [#3159](https://github.com/ant-design/ant-design/issues/3159)
- Fix server-side render for Affix. [#3216](https://github.com/ant-design/ant-design/issues/3216)
- Fix Mention should supoort `onSelect` `placeholder`. [#3236](https://github.com/ant-design/ant-design/issues/3236) [#3226](https://github.com/ant-design/ant-design/issues/3226)
- Fix Mention should support `onSelect` `placeholder`. [#3236](https://github.com/ant-design/ant-design/issues/3236) [#3226](https://github.com/ant-design/ant-design/issues/3226)
- Fix Transfer cannot work with `getFieldDecorator`.
- Fix LocaleProvider doesn't work for time-related components.
- Fix Cascader doesn't show search text in search mode.
@@ -126,6 +472,8 @@ If you meet any problem while you try to upgrade from `antd@1.0.0`, feel free to
### 2.x Breaking changes
> We suggest you upgrade to lastest version of `2.x`.
There are some breaking changes in `antd@2.0.0`, and you need to modify your code to work with it.
* `value` and `defaultValue` of all the time-related components will not support type `String/Date`, please use [moment](http://momentjs.com/):
@@ -139,7 +487,7 @@ There are some breaking changes in `antd@2.0.0`, and you need to modify your cod
- <Calendar defaultValue={new Date('2010-10-10')} />
+ <Calendar defaultValue={moment('2010-10-10', 'YYYY-MM-DD')} />
```
* Parameters of type `Date/GregorianCalendar` of functions such as `onChange` and `onPanelChange`, plus other callback functions had been changed to type moment. Please consult [APIs of gregorian-calendar](https://github.com/yiminghe/gregorian-calendar) and [APIs of moment](http://momentjs.com/docs/), and update your code accordingly. And you can consult this [commit](https://github.com/ant-design/ant-design/commit/5a4ebe535f0353089b30ac331bc4fb7877963371) to see how to upate.
* Parameters of type `Date/GregorianCalendar` of functions such as `onChange` and `onPanelChange`, plus other callback functions had been changed to type moment. Please consult [APIs of gregorian-calendar](https://github.com/yiminghe/gregorian-calendar) and [APIs of moment](http://momentjs.com/docs/), and update your code accordingly. And you can consult this [commit](https://github.com/ant-design/ant-design/commit/4026221d451b246956983bb42140142d4a48b7d7) to see how to update.
Because the return value of `JSON.stringy(date: moment)` will lost time zone, we should use `.format` to convert date to string first, see related issue [#3082](https://github.com/ant-design/ant-design/issues/3082) for details:
```js
@@ -237,6 +585,6 @@ The following change will throw some warnings in the console and it will still w
* [dva@1.0.0](https://github.com/dvajs/dva) is published and it is officially recommended framework [in real world](http://ant.design/docs/react/practical-projects).
* The officially recommended scaffold is [dva-cli](https://github.com/dvajs/dva-cli) now, the old `antd-init` is just for studying and demo.
## 1.0.0
## 1.11.4
Visit [GitHub](https://github.com/ant-design/ant-design/releases?after=2.0.0) to read change logs from `0.x` to `1.x`
Visit [GitHub](https://github.com/ant-design/ant-design/blob/1.x-stable/CHANGELOG.md) to read change logs from `0.x` to `1.x`.

View File

@@ -1,14 +1,360 @@
---
order: 3
order: 6
title: 更新日志
toc: false
timeline: true
---
如果需要查看 `0.12.x` 及之前的更新日志,请移步 [GitHub](https://github.com/ant-design/ant-design/releases?after=1.0.0)
`antd` 严格遵循 [Semantic Versioning 2.0.0](http://semver.org/lang/zh-CN/) 语义化版本规范
#### 发布周期
* patch 版本:每周末会进行日常 bugfix 更新。(如果有紧急的 bugfix则任何时候都可发布
* minor 版本:每月发布一个带有新特性的版本。
* 大版本号:含有破坏性更新和新特性,不在发布周期内。
如果需要查看 `2.0.0` 之前的更新日志,请移步 [GitHub](https://github.com/ant-design/ant-design/blob/1.x-stable/CHANGELOG.md)。
---
## 2.7.1
`2017-02-10`
- **Affix**
- 修复 hover 时元素被隐藏的问题。[#4800](https://github.com/ant-design/ant-design/issues/4800)
- 修复 event listener 未被正确移除的问题。[#4755](https://github.com/ant-design/ant-design/issues/4755)
- 修复快速滚动时不能正确复位的问题。[#4760](https://github.com/ant-design/ant-design/issues/4760)
- **Anchor** 修复了有 offsetTop 时的定位问题。[#4706](https://github.com/ant-design/ant-design/issues/4706)
- **AutoComplete**
- 修复了 size 问题。[#4766](https://github.com/ant-design/ant-design/issues/4766)
- 修复了自动加入其他字符的问题。[#4778](https://github.com/ant-design/ant-design/issues/4778)
- **Dropdown** 补充了之前缺失的弹出框位置设定相关的文档及示例。[#4811](https://github.com/ant-design/ant-design/issues/4811)
- **Grid** 去掉了非 flex 模式下栅格的无用 class。[#4784](https://github.com/ant-design/ant-design/pull/4784) [@chikara-chan](https://github.com/chikara-chan)
- **Icon** 统一了命名风格(添加了别名,原有命名依然有效)。[#4758](https://github.com/ant-design/ant-design/issues/4758)
- **Layout** 修复了侧边布局动效不平滑的问题。[#4752](https://github.com/ant-design/ant-design/issues/4752)
- **LocaleProvider** 修复了瑞典语相关问题。[pull-4762](https://github.com/ant-design/ant-design/pull/4762) [@JesperWe](https://github.com/JesperWe)
- **RangePicker** 修复了图标与表单校验反馈图标重叠的问题。[#4783](https://github.com/ant-design/ant-design/issues/4783) [@zhenzong](https://github.com/zhenzong)
- **Table**
- 支持 `size='middle'` 。[#4819](https://github.com/ant-design/ant-design/pull/4819) [@warrenseymour](https://github.com/warrenseymour)
- 修复过滤功能在 JSX 模式下不生效的问题。[#4759](https://github.com/ant-design/ant-design/issues/4759)
- 修复分页跳转问题。[#4779](https://github.com/ant-design/ant-design/issues/4779)
- 修复IE11下的性能问题。[#4522](https://github.com/ant-design/ant-design/issues/4522)
- **Tabs** 修复了在 IE9 中从第二个标签页起都显示空白的问题。[#4795](https://github.com/ant-design/ant-design/issues/4795)
- **rc-pagination** 升级至 ~1.7.0,支持 showLessItemsonChange 增加 pageSize 参数。
- **全局性优化**
- 修复或优化了一些了文档,链接,样式细节。
- 接入 stylelint 以替代 lesslint修复一些 lint 问题。[#2179](https://github.com/ant-design/ant-design/issues/2179)
- border-radius 统一为 4px。[#4772](https://github.com/ant-design/ant-design/issues/4772)
- 支持 `import { version } from 'antd'` 。[#4751](https://github.com/ant-design/ant-design/pull/4751)
- **网站**
- 首页自动选择语言。[#4552](https://github.com/ant-design/ant-design/issues/4552)
- 接入 Google 作为文档的全文本搜索。[#4814](https://github.com/ant-design/ant-design/issues/4814)
- 改变版本切换 Select 的位置。[pull-4799](https://github.com/ant-design/ant-design/pull/4799)
## 2.7.0
`2017-02-03`
* Button 新增 `danger``ghost` 属性。[#4679](https://github.com/ant-design/ant-design/pull/4679)
* AutoComplete 支持自定义输入框的用法。 [#4483](https://github.com/ant-design/ant-design/pull/4483)
* 升级了 rc-cascader 到 0.11.0,支持键盘操作。[#4411](https://github.com/ant-design/ant-design/pull/4411)
* notification 支持更多弹出方向。[#4732](https://github.com/ant-design/ant-design/pull/4700)
* 升级了 rc-steps 到 2.3.0Steps 新增 `progressDot` 属性,支持自定义点状步骤条的样式。[#4659](https://github.com/ant-design/ant-design/pull/4659)
* 升级了 rc-input-number 到 3.0.0
* 现在输入时也会触发 `onChange`。[#4265](https://github.com/ant-design/ant-design/pull/4265)
* 修复了 `onKeyUp` 事件。[#4717](https://github.com/ant-design/ant-design/issues/4717)
* Slider 增加 `veritical` 模式。[#4473](https://github.com/ant-design/ant-design/pull/4473)
* Tag
- 增加了预设颜色。[#4571](https://github.com/ant-design/ant-design/pull/4571)
- 调整了垂直对齐和默认间距。
* 添加了对德语的支持。[#4686](https://github.com/ant-design/ant-design/pull/4686)
* 添加了对瑞典语的支持。[#4455](https://github.com/ant-design/ant-design/pull/4455)
* 添加了对法语的支持。[#4538](https://github.com/ant-design/ant-design/pull/4538)
* Transfer 添加了 `onSearchChange` 回调。 [#4464](https://github.com/ant-design/ant-design/pull/4464)
* Modal.confirm 添加了 maskClosable 配置项。[#4488](https://github.com/ant-design/ant-design/pull/4488), [#4488](https://github.com/ant-design/ant-design/pull/4490)
* Form 增加 `hideRequiredMark` 属性。[#4732](https://github.com/ant-design/ant-design/pull/4732)
* 改进了 Upload 的列表图片预览。 [#4516](https://github.com/ant-design/ant-design/pull/4516)
* 升级了 rc-select 到 6.7.1。
* 修复了 Select 的 `onChange` 回调重复触发的问题。[#156@rc-select](https://github.com/react-component/select/pull/156)
* 修复了 Select 显示初始化值的问题。[#152@rc-select](https://github.com/react-component/select/pull/152)
* 升级 rc-tree-select 到 `1.9.0`
* 新增 `treeDefaultExpandedKeys` 属性。[#43@rc-tree-select](https://github.com/react-component/tree-select/pull/43)
* 修复了文字溢出换行问题。[#42@rc-tree-select](https://github.com/react-component/tree-select/pull/42)
* 新增 less 变量: `@border-style-base` `@border-width-base` `@btn-danger-color` `@btn-danger-bg` 等。
* 修复了 Badge 在页面放大时错位的问题。[#4747](https://github.com/ant-design/ant-design/issues/4747) [#4290](https://github.com/ant-design/ant-design/issues/4290)
* 修复一个固定表头的表格错位问题。[#4750](https://github.com/ant-design/ant-design/issues/4750)
* 修复一个 IE 下表格滚动时卡顿的问题。[#4522](https://github.com/ant-design/ant-design/issues/4522)
* 添加别名以修正图标命名风格:`addfile` => `file-add``addfolder` => `folder-open`,原有的命名依然有效。[#4758](https://github.com/ant-design/ant-design/issues/4758)
## 2.6.4
`2017-01-20`
* 优化 RangePicker 选择预设时间时的界面显示。[#4561](https://github.com/ant-design/ant-design/issues/4561)
* 修复 DatePicker 选择时间界面的滚动问题。[#4412](https://github.com/ant-design/ant-design/issues/4412)
* 修复 Menu 在 `vertical` 的受控模式下,子菜单不会弹出的问题。[#3783](https://github.com/ant-design/ant-design/issues/3783)
* 修复 Cascader 禁用时的值显示样式问题。[#4648](https://github.com/ant-design/ant-design/issues/4648)
* Table
* 优化固定表头的滚动条显示。[#4637](https://github.com/ant-design/ant-design/issues/4637)
* 修复在 Safari 下显示 loading 效果时表头会闪烁的问题。[#4622](https://github.com/ant-design/ant-design/issues/4622)
* 修复多处边框问题。[#4647](https://github.com/ant-design/ant-design/issues/4647)、[#4635](https://github.com/ant-design/ant-design/issues/4635)
* 修复 showHeader 的默认值不为 `false` 的问题。[#4658](https://github.com/ant-design/ant-design/issues/4658)
* 修复找不到 `TableColumnConfig` 的类型定义的问题。[#4660](https://github.com/ant-design/ant-design/issues/4660)
## 2.6.3
`2017-01-15`
* 修复 `2.6.2` 中 Popconfirm 不可用的问题。[#4606](https://github.com/ant-design/ant-design/issues/4606)
## 2.6.2
`2017-01-14`
* 新增社区精选组件页面。[链接](/docs/react/recommendation-cn)
* 修复一个内容过长导致 Layout 侧边布局错位的问题。[#4459](https://github.com/ant-design/ant-design/issues/4459)
* 修复 Input.Search 输入框和图标错位的问题。[#4540](https://github.com/ant-design/ant-design/issues/4540)
* 补充了一个自定义灰底样式的 Collapse 折叠面板的例子。[链接](/components/collapse-cn/#components-collapse-demo-custom)
* Table
* 调大了 Table 选择框和展开按钮的列宽度。
* 修复 `pagination` 属性切换后分页不可用的问题。[#4532](https://github.com/ant-design/ant-design/issues/4532)
* 修复不支持三级筛选菜单的问题。[#4541](https://github.com/ant-design/ant-design/issues/4541)
* 修复 `column.filteredValue` 无法设置为 `null` 的问题。
* 调整 Carousel 为默认不可拖拽和文字可选择。
* 增加了 Breadcrumb 内嵌非 Breadcrumb.Item 元素时的警告提示。[#4403](https://github.com/ant-design/ant-design/issues/4403)
* 修复 Tooltip 在 `onVisibleChange(visible)` 返回 `true` 时不展示的问题。[#4579](https://github.com/ant-design/ant-design/issues/4579)
* 优化 TreeSelect 内容过长时的面板高度。[#4537](https://github.com/ant-design/ant-design/pull/4537)
* 补充了 TimePicker 和 Spin 的组件样式变量。
* 用年份代替了 DatePicker 年份选择面板上的箭头。[#4415](https://github.com/ant-design/ant-design/issues/4415)
* 修复 AutoComplete 和 Form `[options.validateTrigger]` 的 TypeScript 定义。
* 优化 Spin、Progress 的动画细节效果。
## 2.6.1
`2017-1-6`
* 修复 Menu dark theme 样式问题。[#4440](https://github.com/ant-design/ant-design/issues/4440)
* 修复 `Select[tokenSeparators]` `Modal[afterClose]` `Input[name]` 等的 TypeScript interface 定义。[#4441](https://github.com/ant-design/ant-design/pull/4441) [@eddhannay](https://github.com/eddhannay)
* 修复 `TimePicker[placeholder]` 无法置空的问题。[#4446](https://github.com/ant-design/ant-design/pull/4446) [@jialeicui](https://github.com/jialeicui)
* 修复 DatePicker 等年份选择面板折行问题。[#4415](https://github.com/ant-design/ant-design/issues/4415)
* 修复 Table loading 状态分页器可操作的问题。[#4461](https://github.com/ant-design/ant-design/issues/4461)
* 修复 `Input[prefix|suffix]` 垂直对齐问题。[commit](https://github.com/ant-design/ant-design/commit/c4ac4d1eca53ae2f6f4a1e15210b43745f283534)
* 修复 Cascader 对齐问题。[commit](https://github.com/ant-design/ant-design/commit/1fbebd4ecfff432e1b2261c9dfee4b9f471e7b1f)
## 2.6.0
`2017-1-2`
- 采用全新的色彩系统。[pull/4426](https://github.com/ant-design/ant-design/pull/4426)
- 使用新的算法函数代替 `tint/shade`
- 利用算法生成的新版色板。[色板演示](http://ant.design/docs/spec/colors)
- 调整默认文字颜色。
- 增加 Layout 布局组件。[#3534](https://github.com/ant-design/ant-design/issues/3534)
- 增加 Grid 栅格配置器示例。[commit/ee17ab](https://github.com/ant-design/ant-design/commit/ee17abfa9d0362c6f9baab4a9a09e57574583246)
- Input
- 增加 prefix 和 suffix 属性,支持前后缀配置。[#4226](https://github.com/ant-design/ant-design/issues/4226) [@ystarlongzi](https://github.com/ystarlongzi)
- InputGroup 增加 compact 属性,支持紧凑型展示。[pull/4309](https://github.com/ant-design/ant-design/pull/4309)
- Spin 增加延迟显示属性 delay。[#4306](https://github.com/ant-design/ant-design/issues/4306)
- 修复 Pagination 在低分辨率下的错位问题。[#4349](https://github.com/ant-design/ant-design/issues/4349)
- 修复 Dropdown.Button 换行的问题。[pull/4355](https://github.com/ant-design/ant-design/pull/4355) [@Morhaus](https://github.com/Morhaus)
- 修复 Cascader disabled 状态底色的问题。[#4434](https://github.com/ant-design/ant-design/issues/4434)
- 修复 MonthPicker monthCellContentRender 属性无效的问题,并修正了错误的文档。[#4394](https://github.com/ant-design/ant-design/issues/4394)
- 修复 ButtonGroup 存在多余蓝色边框的问题。[#4382](https://github.com/ant-design/ant-design/pull/4382) [@ystarlongzi](https://github.com/ystarlongzi)
- 修复 Menu horizontal 模式子菜单选择项背景色错误的问题。[#4414](https://github.com/ant-design/ant-design/issues/4414)
- 修复配置了 hasFeedback 的 Select/Cascader 下拉箭头被遮盖的问题。[#4431](https://github.com/ant-design/ant-design/issues/4431) [@JesperWe](https://github.com/JesperWe)
- Table 没有 header 时,第一行改为非圆角。[#4373](https://github.com/ant-design/ant-design/issues/4373)
- 优化 Tree 的拖拽效果。[#4371](https://github.com/ant-design/ant-design/issues/4371)
- 进行了一些文档或示例优化、文档错误修正以及网站样式问题修复。
- 升级 rc-form 底层依赖getFieldDecorator 的 id 支持嵌套式写法。
## 2.5.3
`2016-12-24` 🎄🎄🎄
* 支持 TypeScript@2.1。[#4208](https://github.com/ant-design/ant-design/issues/4208)
* 修正了 Tabs 嵌套时的样式问题。 [#4317](https://github.com/ant-design/ant-design/issues/4317)
* 修正了 Radio 在当前项选中时,再次点击仍会触发 onChange 的问题。 [#4242](https://github.com/ant-design/ant-design/issues/4242) [@ystarlongzi](https://github.com/ystarlongzi)
* 修正了 Form 多列栅格式的表单排列方式布局异常。 [#4271](https://github.com/ant-design/ant-design/issues/4271)
* 修正了 Menu 竖直方向的当前选择项的背景问题。[#4253](https://github.com/ant-design/ant-design/issues/4253)
* 优化了 Dropdown 的 `onVisibleChange` 回调参数 Type 类型。[#4236](https://github.com/ant-design/ant-design/issues/4236)
* 优化了 Cascader 的 `onChange` 回调参数的 Type 类型。[#4231](https://github.com/ant-design/ant-design/issues/4231)
* 优化了 Datepicker[showTime] 的默认宽度 [b912f1c](https://github.com/ant-design/ant-design/commit/b912f1cea6f470c16b8dd90554883460161cef47)
## 2.5.2
`2016-12-10`
* 优化 Menu 已选择项的样式。
* 修复 Mention 不能响应 `onFocus``onBlur` 的问题。[#4163](https://github.com/ant-design/ant-design/issues/4163)
* 修复 `disabled``checked` 的 Radio 之间会多一条阴影的问题。[#4114](https://github.com/ant-design/ant-design/pull/4114) @jdz321
* 修复 RangePicker、TimePicker、Calendar 设置 Moment 的 `defaultValue``value` 时也会报错的问题。[#4147](https://github.com/ant-design/ant-design/issues/4147)
* 修复 Affix 在开启动画的 Tabs 里使用时会消失的问题。[#3943](https://github.com/ant-design/ant-design/issues/3943)
* 修复 Cascader 手动选择和搜索选择时 `onChange` 接收到的 `selectedOptions` 不同的问题。[#4096](https://github.com/ant-design/ant-design/issues/4096)
* 修复 Tabs 页增加到一定数量时会产生偏移的问题。[#3637](https://github.com/ant-design/ant-design/issues/3637)
* Table
* 居中对齐表头分组的父表头。
* 修正设置 filterDropdownVisible 时不生效的问题。[#4162](https://github.com/ant-design/ant-design/issues/4162)
## 2.5.1
`2016-12-03`
* 提升网站首页在移动端访问的体验。
* 补充从 `1.x` 升级到 `2.x` 时的组件改动警告提示。[#4028](https://github.com/ant-design/ant-design/pull/4028)
* 现在 ToolTip、Popover、Popconfirm 支持直接包裹文本节点和多个节点。[#3924](https://github.com/ant-design/ant-design/issues/3924)
* Anchor
* 修复快速滚动时的定位问题。[#4053](https://github.com/ant-design/ant-design/issues/4053)
* 修复 target 指定父元素 ref 时无效的问题。[#4037](https://github.com/ant-design/ant-design/issues/4037)
* Table
* 修复设置 defaultChecked 时的一个选中问题。[#4020](https://github.com/ant-design/ant-design/issues/4020)
* 修复分组表头中筛选功能无法使用的问题。[#4099](https://github.com/ant-design/ant-design/issues/4099)
* 修复在 `Input[type="textarea"]` 上使用 Popover 定位错误问题。[#4092](https://github.com/ant-design/ant-design/issues/4092)
* 修复 Popconfirm 的 `visible` 属性失效的问题。[#4068](https://github.com/ant-design/ant-design/issues/4068)
* 修复 TimePicker 无法设置 `style.width` 的问题。
* 修复 Steps 自定义图标和默认图标大小不一致的问题。[#3817](https://github.com/ant-design/ant-design/issues/3817)
* 修复 Form、Button、Slider、Table 等组件的一些样式细节。
## 2.5.0
`2016-11-25`
* 默认主题风格修改为支付宝钱包风格,及大量样式优化。
* 支持服务端渲染。Mention 会因为 [draft-js](https://github.com/facebook/draft-js/issues/385) 的问题有 warning
* 引入 [Jest Snapshot](https://facebook.github.io/jest/docs/tutorial-react.html#snapshot-testing) 测试组件结构及服务端渲染问题。
* 官网及文档优化。
* 新增自定义主题的 [文档](https://ant.design/docs/react/customize-theme)。
* 新增 [Sketch 资源文件](https://ant.design/docs/resource/download)。
* LocaleProvider 新增巴西语支持。[#4004](https://github.com/ant-design/ant-design/pull/4004) [@nathantn](https://github.com/nathantn)
* DatePicker
* DatePicker 现在可以决定是否展示 “今天” 按钮。[commit](https://github.com/ant-design/ant-design/commit/bbef274aae169d142e3e7e3ea0af922d48e6dd64)
* RangePicker 现在可以自定义快捷选择。[demo](https://ant.design/components/date-picker/#components-date-picker-demo-presetted-ranges)
* 修复 DatePicker 设置 `showTime` 后 “此刻” 按钮失效的问题。[#3748](https://github.com/ant-design/ant-design/issues/3748)
* 修复 `RangePicker[format]` 失效的问题。[#3808](https://github.com/ant-design/ant-design/issues/3808)
* 新增并优化部分 Icon。[#3977](https://github.com/ant-design/ant-design/pull/3977)
* 新增 Input.Search 控件。[demo](https://ant.design/components/input/#components-input-demo-search-input)
* Mention onSelect 事件现在可以获取完整的数据。[#3867](https://github.com/ant-design/ant-design/issues/3867)
* Pagination 现在支持展示当前页的索引范围。[demo](https://ant.design/components/pagination/#components-pagination-demo-total)
* Table
* 自定义筛选的显示隐藏现在可以通过代码控制。[demo](https://ant.design/components/table/#components-table-demo-custom-filter-panel)
* 支持 JSX 风格的方式设置 columns。[demo](https://ant.design/components/table/#components-table-demo-jsx)
* 现在可以监听单元格的点击事件。[#3774](https://github.com/ant-design/ant-design/issues/3774)
* 修复无边框 Table 头部的圆角样式问题。
* 修复 title 和 footer 高度不随 `Table[size]` 变化的问题。[commit](https://github.com/ant-design/ant-design/commit/9e6439b06cd099ab384a4a2f026f0def6e12bf23)
* 修复选中状态出错的问题。[#3900](https://github.com/ant-design/ant-design/issues/3900)
* Upload
* 修复 children 不能为 `null` 的问题。
* 修复预览逻辑的问题。[commit](https://github.com/ant-design/ant-design/commit/e552880c32aaa3f5b0fb09a5e1fb7454c24d5378)
* 修复 Badge 会覆盖其他组件的问题。[#3898](https://github.com/ant-design/ant-design/issues/3898)
* 修复多行 Checkbox 样式不对齐的问题。[#3971](https://github.com/ant-design/ant-design/issues/3971) [@flashback313](https://github.com/flashback313)
* 修复 InputNumber 与其它表单控件不对齐的问题。[#3866(comment)](https://github.com/ant-design/ant-design/issues/3866#issuecomment-261148256)
* 修复 `Menu.Divider` 样式问题。[#3813](https://github.com/ant-design/ant-design/issues/3813)
* 修复 Popover 直接内嵌 Checkbox 和 Radio 无效的问题。[#3455](https://github.com/ant-design/ant-design/issues/3455)
* 修复 Select combobox 高度异常问题。[#3855](https://github.com/ant-design/ant-design/issues/3855)
* 修复 Switch actived 后的样式问题。[#3838](https://github.com/ant-design/ant-design/issues/3838)
* 修复 Transfer 搜索无结果时不展示 “Not Found” 提示的问题。[#3996](https://github.com/ant-design/ant-design/issues/3996)
* 修复 TreeSelect 占位符的样式问题。[#3841](https://github.com/ant-design/ant-design/issues/3841)
* 修复 TypeScript 编译报错的问题。[#3969](https://github.com/ant-design/ant-design/pull/3969) [@AlbertZheng](https://github.com/AlbertZheng)
* 修复表单反馈图标影响用户操作的问题。[#3891](https://github.com/ant-design/ant-design/issues/3891)
## 2.4.3
`2016-11-17`
* 修复 `Anchor` 内部 querySelector 报错,并做了一些体验优化 。[#3832](https://github.com/ant-design/ant-design/issues/3832) [#3844](https://github.com/ant-design/ant-design/issues/3844)
## 2.4.2
`2016-11-13`
* 修复 `Dropdown.Button` 不弹出的问题。[#3815](https://github.com/ant-design/ant-design/issues/3815)
## 2.4.1
`2016-11-11`
* 修复 `2.4.0` 组件 index 文件丢失的问题。
## 2.4.0
`2016-11-11`
* 调整了组件的导航结构。
* 新增 [Anchor](https://ant.design/components/anchor) 锚点组件。
* 整理了样式变量,修复 `@font-size-base``@text-color` 在部分组件无效的问题,新增 `@font-size-lg` `@text-color-secondary`,并移除了部分无用的变量。
* `Transfer` 组件新增了受控属性 `selectedKeys`。[#3729](https://github.com/ant-design/ant-design/issues/3729)
* `Tag` 新增选中状态。
* 修复 `Dropdown.Button` 不支持 `visible``onVisibleChange` 的问题。[#3779](https://github.com/ant-design/ant-design/issues/3779)
* 修复 `DatePicker[showTime]`` 的 `此刻` 按钮。[#3748](https://github.com/ant-design/ant-design/issues/3748)
* 修复 `Steps` 竖直方向的样式。[#3760](https://github.com/ant-design/ant-design/issues/3760)
* 修复 `Spin` 组件在 IE10+ 的样式问题。[#3755](https://github.com/ant-design/ant-design/issues/3755)
* 修复 `Mention` 组件的 focus 逻辑. [#3801](https://github.com/ant-design/ant-design/issues/3801)
* 修复 `Progress` 组件的动画问题。[#3784](https://github.com/ant-design/ant-design/issues/3784)
* 修复 `Select` 搜索时的丢失焦点问题。[#3778](https://github.com/ant-design/ant-design/issues/3778)
* 修复 `TimePicker` 不支持 `format="HH"` 等格式的问题。[#3793](https://github.com/ant-design/ant-design/issues/3793)
* 修复 `Input``suffix` 部分区域中鼠标事件无法响应的问题。[#3714](https://github.com/ant-design/ant-design/issues/3714)
* 优化了 `Table` 选择的性能。[#3757](https://github.com/ant-design/ant-design/pull/3757)
* 优化 `Carousel` 的默认样式。
* 优化 `Checkbox``Radio` 的样式。[#3590](https://github.com/ant-design/ant-design/issues/3590)
* 修复 `DatePicker``Form``Table` 等组件的样式细节。
## 2.3.2
`2016-11-09`
* 修复使用 `getFieldProps` 会导致死循环的问题。
## 2.3.1
`2016-11-07`
* 修正上个版本缺少 `dist/antd.css` 的问题。
## 2.3.0
`2016-11-04`
* 升级 normalize.css 到 5.0。
* package.json 的 main 换成了 `lib/index.js`。[#3397](https://github.com/ant-design/ant-design/pull/3397)
* 全新的 `Spin` 设计。
* `TimePicker` 新增了 `addon` 以支持自定义的附加内容。
* `Tree` 新增了 `onDragEnd`
* `Collapse` 新增了 `bordered`
* 优化 `Tabs` 切换时的动画效果。
* 优化 `Radio``Checkbox` 在禁用和鼠标停留时的样式。[#3590](https://github.com/ant-design/ant-design/issues/3590)
* 优化 `Transfer` 的性能。[#2860](https://github.com/ant-design/ant-design/issues/2860)
* 修复 `Popover` 嵌套时的样式问题。[#3448](https://github.com/ant-design/ant-design/issues/3448)
* 修复 `Transfer` 服务端渲染报错的问题。[#3686](https://github.com/ant-design/ant-design/issues/3686)
* 修复 `Upload` `picture-card` 模式下新上传的图片不显示预览的问题。[#3706](https://github.com/ant-design/ant-design/pull/3706) [@denzw](https://github.com/denzw)
* DatePicker
*`showTime` 模式下现在失去焦点也会触发 `onChange`
* `MonthPicker` 增加了 `monthCellContentRender`
* `RangePicker` 现在可以手动输入时间了。[#3718](https://github.com/ant-design/ant-design/issues/3718)
* 新增了捷克语的翻译。
* Badge
* 优化鼠标停留时超过 99 的数字显示。[#3645](https://github.com/ant-design/ant-design/issues/3645)
* 修复单独使用时会有移动动画的问题。[#3709](https://github.com/ant-design/ant-design/issues/3709)
* Mention
* 修复会被 `Table` 遮住的问题。[#3588](https://github.com/ant-design/ant-design/issues/3588)
* 新增 `getSuggestionContainer` 来指定容器。[#3658](https://github.com/ant-design/ant-design/pull/3658)
* Tag
* 废弃 `color` 属性。[#3560](https://github.com/ant-design/ant-design/issues/3560)
* 新增 `type`。[#3560](https://github.com/ant-design/ant-design/issues/3560)
* 新增 `checkable`。[#3560](https://github.com/ant-design/ant-design/issues/3560)
* Radio.Group
* 新增 `className`
* `children``null``undefined` 时现在会被忽略。
* Select
* 新增 `tokenSeparators` 支持粘贴时自动分词。[#2071](https://github.com/ant-design/ant-design/issues/2071)
* 新增 `onFocus` 回调。[#3587](https://github.com/ant-design/ant-design/issues/3587)
* 修复 `combobox` 模式下选中项不能正确显示的问题。[#3401](https://github.com/ant-design/ant-design/issues/3401)
## 2.2.1
`2016-11-02`
* 修复 Form 中 DatePicker[showTime](受控)无法使用的问题。[#3665](https://github.com/ant-design/ant-design/issues/3665)
## 2.2.0
`2016-10-28`
@@ -27,7 +373,6 @@ timeline: true
* 新增 `bulb` `select` `like-o` `dislike-o`
* 调整 `loading` `like` `dislike`
* 优化 Card DatePicker Icon Table 的 TypeScript 定义。[@infeng](https://github.com/infeng) [3468](https://github.com/ant-design/ant-design/pull/3468) [#3603](https://github.com/ant-design/ant-design/pull/3603) [#3531](https://github.com/ant-design/ant-design/pull/3531)
* 修复 Cascader `defaultValue` 失效的问题。[#3470](https://github.com/ant-design/ant-design/issues/3470)
* 修复在一行内同时使用 Button Input DatePicker Select 时对齐的问题。[#3481](https://github.com/ant-design/ant-design/issues/3481)
* DatePicker
@@ -124,6 +469,8 @@ timeline: true
### 2.x 不兼容改动
> 建议从 `1.x` 升级时,直接升级到 `2.x` 的最新版本。
此版本有部分不兼容的改动,升级时确保修改相应的使用代码。
* 时间类组件的 `value``defaultValue` 不再支持 `String/Date` 类型,请使用 [moment](http://momentjs.com/)。
@@ -137,9 +484,9 @@ timeline: true
- <Calendar defaultValue={new Date('2010-10-10')} />
+ <Calendar defaultValue={moment('2010-10-10', 'YYYY-MM-DD')} />
```
* 时间类组件的 `onChange` 和 `onPanelChange` 及其他回调函数中为 `Date/GregorianCalendar` 类型的参数,均修改为 moment 类型,两者 API 有所不同,但功能基本一致,请对照 [moment 的 API 文档](http://momentjs.com/docs/) 和 [gregorian-calendar 的文档](https://github.com/yiminghe/gregorian-calendar) 进行修改。你也可以参考这个 [commit](https://github.com/ant-design/ant-design/commit/5a4ebe535f0353089b30ac331bc4fb7877963371) 来进行修改。
* 时间类组件的 `onChange` 和 `onPanelChange` 及其他回调函数中为 `Date/GregorianCalendar` 类型的参数,均修改为 moment 类型,两者 API 有所不同,但功能基本一致,请对照 [moment 的 API 文档](http://momentjs.com/docs/) 和 [gregorian-calendar 的文档](https://github.com/yiminghe/gregorian-calendar) 进行修改。你也可以参考这个 [commit](https://github.com/ant-design/ant-design/commit/4026221d451b246956983bb42140142d4a48b7d7) 来进行修改。
由于 `JSON.stringy(date: moment)` 返回的值会丢失时区设置,所以要先使用 `.format` 把日期转成字符串,相关 issue 见 [#3082](https://github.com/ant-design/ant-design/issues/3082)
由于 `JSON.stringify(date: moment)` 返回的值会丢失时区设置,所以要先使用 `.format` 把日期转成字符串,相关 issue 见 [#3082](https://github.com/ant-design/ant-design/issues/3082)
```js
handleSubmit() {
const values = this.props.form.getFieldsValue();
@@ -236,446 +583,6 @@ timeline: true
* [dva@1.0.0](https://github.com/dvajs/dva) 也已经发布,并推荐 [在实战项目中使用](http://ant.design/docs/react/practical-projects)。
* 脚手架工具推荐使用 [dva-cli](https://github.com/dvajs/dva-cli),原来的 `antd-init` 以后仅会用于学习以及 demo。
## 1.11.2
## 1.11.4
`2016-09-26`
- 修复 Popover 内嵌 Badge 后失效的问题。[#3109](https://github.com/ant-design/ant-design/issues/3109)
- 修复 Modal 内嵌的 Button 在某些情况下与 Modal 的滚动不同步的问题。[#3031](https://github.com/ant-design/ant-design/issues/3031)
## 1.11.1
`2016-09-14`
- 修复 Menu 设置成 `theme=dark` 后,链接点击无效的问题。[#2929](https://github.com/ant-design/ant-design/issues/2929)
- 修复迷你型 Table 表头与内容不对齐的问题。[#2933](https://github.com/ant-design/ant-design/issues/2933)
- 修复 Cascader hover 样式。[#3015](https://github.com/ant-design/ant-design/issues/3015)
- 修复 Upload 上传多个文件时,`onChange` 调用不正确的问题。[#3001](https://github.com/ant-design/ant-design/issues/3001)
- 修复 TimePicker 报错样式的问题。[#2973](https://github.com/ant-design/ant-design/issues/2973)
- 修复 Calendar 控件的年度选择下拉内容截断的问题。[#2927](https://github.com/ant-design/ant-design/issues/2927)
## 1.11.0
`2016-09-01`
- `Tooltip` `Popover` `Popconfirm` 修正默认对齐方式为边缘对齐,增加 arrowPointAtCenter 属性用于箭头指向中心的行为。[commit 977e2e3](https://github.com/ant-design/ant-design/commit/977e2e32fc40968846c8201ed72bdc3818375d2f)
- `Table`
- 移除数据中添加的 `indexForSort`。[#2501](https://github.com/ant-design/ant-design/issues/2501)
- 修复 `pagination` 属性中 `defaultPageSize` 不生效的问题。[#2874](https://github.com/ant-design/ant-design/issues/2874)
- 修复数据为空时固定列出现重复提示的问题。[#2812](https://github.com/ant-design/ant-design/issues/2812)
- 给树形子数据增加排序功能。[#2839](https://github.com/ant-design/ant-design/issues/2839)
- `InputNumber` 样式问题修复。[#2876](https://github.com/ant-design/ant-design/issues/2876)
- 修复手动导入 less 文件时 input error 样式被 focus 样式覆盖的问题。[#2916](https://github.com/ant-design/ant-design/issues/2916)
- index.d.ts 中补充了一些缺失的声明,修复 `Form` 中 typescript 语法检查报错的问题。[#2885](https://github.com/ant-design/ant-design/issues/2885)
- 升级 react-slick 依赖到 `0.13`。
## 1.10.0
`2016-08-20`
- Affix 和 BackTop 新增 `target` 属性,支持指定滚动容器。[#2718](https://github.com/ant-design/ant-design/issues/2718)
- 文档页面加上编辑按钮,方便社区贡献。[#2325](https://github.com/ant-design/ant-design/issues/2325)
- 升级 rc-cascader 依赖,修复一个 `loadData` 属性和表单结合使用的问题。[#2767](https://github.com/ant-design/ant-design/issues/2767)
- 修复 `editable-card` 类型的 Tabs 没有关闭图标的问题。[#2747](https://github.com/ant-design/ant-design/issues/2747)
- Menu 修正默认 `z-index`。[#2762](https://github.com/ant-design/ant-design/issues/2762)
- 修正 Select 组件在 IE 下的一些样式问题。[#2741](https://github.com/ant-design/ant-design/issues/2741)
## 1.9.1
`2016-08-16`
- 修复 `editable-card` 类型的 Tabs 设置 `activeKey` 无效的问题。[#2725](https://github.com/ant-design/ant-design/issues/2725)
- 修复一个 Table 的样式兼容性问题。[#2723](https://github.com/ant-design/ant-design/issues/2723)
- 更新 axure 部件库。[#2714](https://github.com/ant-design/ant-design/issues/2714)
## 1.9.0
`2016-08-15`
- Transfer 修复在火狐下 item 文案过长时只显示省略号的问题。[#2674](https://github.com/ant-design/ant-design/issues/2674)
- Input 修复 `autosize` 模式下特定场景中不能输入中文及光标定位不准的问题。[#2666](https://github.com/ant-design/ant-design/issues/2666) [#2239](https://github.com/ant-design/ant-design/issues/2239)
- Tabs 修复 `type="editable-card"` 模式下的 `children` 解析问题。[#2658](https://github.com/ant-design/ant-design/issues/2658)
- Radio 修复若干 less 硬编码问题。[#2424](https://github.com/ant-design/ant-design/issues/2424)
- Upload 的 rc-upload 依赖升级至 2.x引入的变化有
- 增加 `disabled` 属性。[#2645](https://github.com/ant-design/ant-design/issues/2645)
- 取消上传时会自动 abort 上传请求。[#2571](https://github.com/ant-design/ant-design/issues/2571) [#2518](https://github.com/ant-design/ant-design/issues/2518)
- Table
- 修复 spin 在可滚动区域的定位问题。[#2652](https://github.com/ant-design/ant-design/issues/2652)
- 修复无数据时 提示样式错位的问题。[#2663](https://github.com/ant-design/ant-design/issues/2663)
- Popover 修复设定 `getTooltipContainer` 后会导致内嵌 DatePicker 样式失效的问题。[#2675](https://github.com/ant-design/ant-design/issues/2675)
- Modal 修复重复卸载组件导致的报错。[#2688](https://github.com/ant-design/ant-design/issues/2688)
- 升级 rc-slider 组件依赖。
## 1.8.0
`2016-08-08`
- 修复可关闭 Tabs 组件只有一个 Tab 的时候报错的问题。[#2559](https://github.com/ant-design/ant-design/issues/2559)
- 修复 Datepicker 在 IE8 下关闭图标。[#2584](https://github.com/ant-design/ant-design/issues/2584)
- Tags 支持自定义标签颜色。[#2585](https://github.com/ant-design/ant-design/issues/2585)
- TreeSelect 修复未找到内容时的样式。[9cee9f](https://github.com/ant-design/ant-design/commit/9cee9f103a4729572358206c81cba84e2fdc20f5)
- Modal 适配小屏幕。[#2597](https://github.com/ant-design/ant-design/issues/2597)
- 修复了 Row 组件在同一行闭合会报错的问题。[#2603](https://github.com/ant-design/ant-design/issues/2603)
- Table 的 `rowSelection.onChange` 的参数 `selectedRows` 现在和 `selectedRowKeys` 保持一致。[#2566](https://github.com/ant-design/ant-design/issues/2603)
- Checkbox 和 Radio 现在支持 `onClick` 属性。
## 1.7.0
`2016-07-30`
友情提示 [Ant Design Mobile](http://mobile.ant.design) 已经发布。
- Table
- 现可以定义页头。[demo](http://ant.design/components/table#components-table-demo-bordered)
- 修复当 `rowKey` 为 `String` 时的报错问题。[#2500](https://github.com/ant-design/ant-design/issues/2500)
- 修复 `Table` 会修改 `dataSource` 里面的值的问题。[#2501](https://github.com/ant-design/ant-design/issues/2501)
- Form 现在不再需要显式传递 `form={this.props.form}`。
- 优化 Breadcrumb.Item 的 hover 效果。
- 优化 Progress 的动画效果。
- DatePicker
- 优化清除按钮样式。
- 修复点击 `此刻` 时不触发 `onChange` 的问题。[#1902](https://github.com/ant-design/ant-design/issues/1902)
- Menu
- 修复子菜单中的 Item 被选中后,父级元素无样式变化的问题。[#2414](https://github.com/ant-design/ant-design/issues/2414)
- 修复 Menu.Item disabled 后的样式问题。
- TreeSelect
- treeNodes 可以设置是否可选。[#2401](https://github.com/ant-design/ant-design/issues/2401)
- 修复多选模式下进行搜索会把已选项清掉的问题。[#2393](https://github.com/ant-design/ant-design/issues/2393)
- 修复 TreeSelect 会修改原数据的问题。[#2459](https://github.com/ant-design/ant-design/issues/2459)
- 修复了 Select 组件 placeholder 溢出的问题。[#2480](https://github.com/ant-design/ant-design/pull/2480)
- 修复 Timeline.Item 无法自定义边框颜色的问题。[#2479](https://github.com/ant-design/ant-design/issues/2479)
- 修复 Spin 显示突兀的问题。[#2398](https://github.com/ant-design/ant-design/issues/2398)
- 修复 Cascader 选项文字过长导致的样式问题。[#2515](https://github.com/ant-design/ant-design/issues/2515)
## 1.6.5
`2016-07-16`
- 修复 Input 的 `value prop on input should not be null` 警告并且导致在表单中无法重置的问题。[#2335](https://github.com/ant-design/ant-design/issues/2335)
- 优化 FormItem 的布局实现,修复表单布局不支持响应式布局的问题。[#2305](https://github.com/ant-design/ant-design/issues/2305)
- 修复带时间的 DatePicker 的 onChange 触发逻辑。[#2399](https://github.com/ant-design/ant-design/issues/2399#issuecomment-232893146)
- 修复 Transfer 搜索后全选的问题。[#2396](https://github.com/ant-design/ant-design/issues/2396)
- 修复 Cascader 样式会被 ant-input 样式覆盖的问题。[#2400](https://github.com/ant-design/ant-design/issues/2400)
- 修复 Table 删除数据时导致当前页数溢出的问题。[#2301](https://github.com/ant-design/ant-design/pull/2301)
- 修复 resize 浏览器时 Affix 元素没有和原来的位置同步的问题。[#1987](https://github.com/ant-design/ant-design/issues/1987)
- 给 Affix 元素添加占位,修复固定时页面跳动的问题。
- 修复 Select combobox 模式会导致页面出现横向滚动条的问题。[#2353](https://github.com/ant-design/ant-design/issues/2353)
- 修复 Upload 组件已上传文件链接点击无效的问题。[#2331](https://github.com/ant-design/ant-design/issues/2331)
- 修复 Upload 上传过程中删除图片后的报错问题。[#2342](https://github.com/ant-design/ant-design/issues/2342)
## 1.6.4
`2016-07-08`
- 修复组件在 react@15.2.0 下报 Unknown props 警告的问题。[#2258](https://github.com/ant-design/ant-design/issues/2258)
- `Table`
- 修复 filterDropDown 中内容未改变也会调用 onChange 的问题。[#2228](https://github.com/ant-design/ant-design/issues/2228)
- 修复设置 scroll.y 高度后导致内容无法对齐的问题。[#2227](https://github.com/ant-design/ant-design/issues/2227)
- `Form`
- 修复 `FormItem` 中带空格后缀的冒号替换问题关联issue[#1877](https://github.com/ant-design/ant-design/issues/1877)
- demo 优化。
- `Transfer`
- 修复重复 render 的问题,性能优化。[#2112](https://github.com/ant-design/ant-design/issues/2112)
- 优化搜索逻辑,修复搜索时未对特殊字符进行处理的问题。[#2260](https://github.com/ant-design/ant-design/issues/2260)
- 清除按钮样式优化。
- 修复 `Steps` 最后一步多余横线隐藏的问题。
- 修复 `Cascader` small size 样式下沉 1px以及 hover/click 样式残缺的问题。[#2234](https://github.com/ant-design/ant-design/issues/2234)
- 修复 `RangePicker` 无清除按钮的问题。[#2252](https://github.com/ant-design/ant-design/issues/2252)
## 1.6.3
`2016-07-04`
- 修复 Transfer 的一个 unmount 的错误。[#2206](https://github.com/ant-design/ant-design/pull/2206)
- 修复了 Badge、Alert、Menu、Tag、Checkbox、Radio 组件的一些样式细节问题。
## 1.6.2
`2016-06-27`
- 修复 Table、Transfer 的样式错位问题。
- 修复 DatePicker 的一个样式问题。[#2182](https://github.com/ant-design/ant-design/issues/2182)
- 优化 Menu 的 hover 样式响应性能。
## 1.6.1
`2016-06-24`
- 回滚一个未完成的 DatePicker 时间选项改造效果。
## 1.6.0
`2016-06-24`
- 新增置顶组件 [BackTop](/components/back-top)。
- 全新的 [Spin](/components/spin) 样式。
- 给 `Modal.xxx` 系列方法添加了 `{ destory }` 的访问值,方便事后销毁。[#2110](https://github.com/ant-design/ant-design/issues/2110)
- Table 的 `rowKey` 属性支持直接使用字符串。[#2058](https://github.com/ant-design/ant-design/issues/2058)
- Table 增加 `column.filterDropdown` 属性用于自定义渲染筛选菜单的浮层。[#1736](https://github.com/ant-design/ant-design/issues/1736)
- 修复 Tooltip、Popover、Popconfirm 设置 `onVisibleChange` 后失效的问题。[#2134](https://github.com/ant-design/ant-design/issues/2134)
- 修复在 IE8 下 Checkbox 的勾样式变形的问题。[#2148](https://github.com/ant-design/ant-design/issues/2148)
- 优化 Checkbox、Radio 失效状态的文字颜色。[#2114](https://github.com/ant-design/ant-design/issues/2114)
- 优化 Checkbox、Radio 的默认边距过于拥挤的问题。[#2137](https://github.com/ant-design/ant-design/issues/2137)
- 优化 Pagination 在暗色背景下的样式。[#2126](https://github.com/ant-design/ant-design/issues/2126)
- 修复 Table 固定列时内容无法换行和高度对齐的问题,同时修复了一个 Chrome 下的表格内容错位问题。[#2130](https://github.com/ant-design/ant-design/issues/2130)
- 修复一个 Table 的 `rowSelection` 设为 null 时可能导致报错的问题。[#2127](https://github.com/ant-design/ant-design/issues/2127)
- 修复在 IE8 下点击 Table 选择框报错的问题。[#2154](https://github.com/ant-design/ant-design/issues/2154)
- 小幅优化了 Transfer 的渲染性能。[#2112](https://github.com/ant-design/ant-design/issues/2112)
- 将 DatePicker 的清除按钮从面板上移到外部输入框,解决用户容易误解为关闭的问题。[#1708](https://github.com/ant-design/ant-design/issues/1708)
- Upload 的 `onPreview` 现在没有 `file.url` 时也能生效。[#2163](https://github.com/ant-design/ant-design/issues/2163)
## 1.5.1
`2016-06-21`
- 修复一个 TypeScript 定义文件的语法错误。
- 修复 Table 固定表头高度和滚动条样式问题。
## 1.5.0
`2016-06-17`
- 升级 `rc-form` 到 0.17,支持 `getFieldProps('xx.yy')` 的写法,并支持单多选控件进行关联。[#](https://github.com/react-component/form/pull/21)
- Input 的 `addonBefore` 和 `addonAfter` 支持内嵌选择框。[#1927](https://github.com/ant-design/ant-design/issues/1927)
- 优化了两个 DatePicker 组成的时间范围选择演示的体验。
- 优化一个多个对话框的遮罩层高度的问题。[#2009](https://github.com/ant-design/ant-design/issues/2009)
- 优化 Table 的 `getCheckboxProps` 的调用次数。[#2086](https://github.com/ant-design/ant-design/issues/2086)
- 修复 Table 固定列时,表头无法左右滚动的问题。[#2068](https://github.com/ant-design/ant-design/issues/2068)
- 修复小型表格固定表头的样式。[#2023](https://github.com/ant-design/ant-design/issues/2023)
- 修复 Tabs 的 `tabPosition` 为左右时样式错位的问题。[#2046](https://github.com/ant-design/ant-design/issues/2046)
- 修复 RangePicker 的日期范围背景丢失的问题。
- 修复 Switch 失效状态下文字颜色太浅的问题。[#2051](https://github.com/ant-design/ant-design/issues/2051)
- 修复一个 Select 的 `disabled` 选项依然可以被移除的问题。[#2034](https://github.com/ant-design/ant-design/issues/2034)
- 修复官方站点在 IE 下的报错问题。
## 1.4.1
`2016-06-12`
- 修复一个展开 Tabs 会导致表格宽度溢出的问题。[#2013](https://github.com/ant-design/ant-design/issues/2013)
- 修复一个某些情况下表格布局被破坏的问题。
## 1.4.0
`2016-06-12`
此版本之后你可能会遇到 [#2030](https://github.com/ant-design/ant-design/issues/2030),请使用 `react@15+` 或 `npm@3+`。
- `Input[type="textarea"]` 支持自动调整高度。 [#](http://ant.design/components/input#components-input-demo-autosize-textarea)
- `Breadcrumb`
- `nameRender` 新增 `route` 和 `params` 参数。 [#1999](https://github.com/ant-design/ant-design/issues/1999)
- `linkRender` 新增 `paths` 参数。
- 再次修复 `Table` 组件 `rowSelection.onChange` 与 `onRowClick` 冲突问题。 [#1470](https://github.com/ant-design/ant-design/issues/1470)
- 修复 `Form.Item` 中 `Input` 高度抖动问题。 [#1955](https://github.com/ant-design/ant-design/issues/1955)
- 修复高级搜索的 `ant-advanced-search-form` 样式丢失的问题。
## 1.3.2
`2016-06-06`
- 修复全局模式下引用 antdIE8 环境报错的问题。 [#1970](https://github.com/ant-design/ant-design/issues/1970)
## 1.3.1
`2016-06-06`
- 修复 `Message` `Notification` 找不到的问题。 [#1968](https://github.com/ant-design/ant-design/issues/1968)
## 1.3.0
`2016-06-02`
- Transfer 组件增加 `rowKey` 属性,可自定义数据源主键。 [#1900](https://github.com/ant-design/ant-design/issues/1900)
- Tag 组件 `default` 类型的样式增加边框,防止淹没在背景中。 [#1910](https://github.com/ant-design/ant-design/issues/1910)
- Table
- 修复筛选为单选时仍旧展示多选框的问题。 [#1880](https://github.com/ant-design/ant-design/issues/1880)
- 修复 fixed left 的固定列会覆盖 rowSelection 的 Checkbox 的问题。 [#1829](https://github.com/ant-design/ant-design/issues/1829)
- 升级 rc-table 依赖
- 修复了 fixed 列中数据重复展示以及一些错位问题。 [#1898](https://github.com/ant-design/ant-design/issues/1898)
- `dataIndex` 支持内嵌属性的写法。 [react-component/table#46](https://github.com/react-component/table/issues/46)
- 修复了 v1.2.0 新增加的组件属性的 TypeScript 定义。 [#1933](https://github.com/ant-design/ant-design/issues/1933)
- Form 修复 label中冒号的国际化问题采用样式实现冒号不再需要手动输入冒号。 [#1877](https://github.com/ant-design/ant-design/issues/1877)
- 修复 DatePicker 组件点击『此刻』失效的问题,并进行了一些代码优化。 [#1902](https://github.com/ant-design/ant-design/issues/1902)
- 升级 rc-upload 依赖,修复了 IE10 中第二次上传同一文件不触发 `onChange` 的问题。 [058af3c](https://github.com/ant-design/ant-design/commit/b15a4e3165be5e4db995d3fe75d4d557c7f21c61)
- 文档使用 [bisheng](https://github.com/benjycui/bisheng) 重构。
## 1.2.1
`2016-05-27`
- 修复一个 Select 组件的文字重复问题。
## 1.2.0
`2016-05-26`
- Input 组件的文档现在和 Form 分离。 [3c98d3](https://github.com/ant-design/ant-design/commit/3c98d3f80f4ec80066756adc3b4108141d4383ca)
- Affix
- 新增了 `onChange` 属性。当固定状态改变时回调 [#1777](https://github.com/ant-design/ant-design/issues/1777)
- 找回了从 affixStyle 中走失的 `width` 属性,修复固定后错位的问题。[#1820](https://github.com/ant-design/ant-design/issues/1820)
- Table
- 修复了 Table 组件的分页相关的一系列问题 [#1669](https://github.com/ant-design/ant-design/issues/1669) [#1842](https://github.com/ant-design/ant-design/issues/1842)
- 修复了当有列固定在左边时,选择框不显示的问题 [#1829](https://github.com/ant-design/ant-design/issues/1829)
- 修复了当 Checkbox 的 label 为数字 0 时, label 不显示的问题 [#1811](https://github.com/ant-design/ant-design/issues/1811)
- 修复 Select combobox 模式下无法重置 `optionLabelProp` 的问题。[#1773](https://github.com/ant-design/ant-design/issues/1773)
- 修复了 Tag 组件为 closeable 时,内部链接无法点击的问题 [#1862](https://github.com/ant-design/ant-design/issues/1862)
- Tab 组件新增 `hideAdd` 属性,用于关闭右边的添加按钮 [#1750](https://github.com/ant-design/ant-design/issues/1750)
- 修复了一个在某些情况下找不到 `normalize.css/normalize.css` 文件的问题。[ant-design/antd-init#52](https://github.com/ant-design/antd-init/issues/52)
- 修复构建文件在 IE8 下报错的问题。[#1804](https://github.com/ant-design/ant-design/issues/1804)
- 更新了第三方依赖。
## 1.1.0
`2016-05-18`
- Cascader 的选择框支持自定义渲染节点,并给 `displayRender` 方法增加了 `selectedOptions` 参数。[#1726](https://github.com/ant-design/ant-design/issues/1726)
- Input.Group 新增 `size` 属性,可设置控件尺寸。[#1732](https://github.com/ant-design/ant-design/issues/1732)
- Layout 新增常用布局:侧边导航展开收起模式。[#1643](https://github.com/ant-design/ant-design/issues/1643)
- Transfer 支持自定义渲染行数据。[#1664](https://github.com/ant-design/ant-design/issues/1664)
- Upload 的 children 为空时,不再显示上传按钮。[#1610](https://github.com/ant-design/ant-design/issues/1610)
- Table
- 修复 `filter` 过滤数据后显示错误分页的问题。[#1669](https://github.com/ant-design/ant-design/issues/1669)
- 修复 `pagination` 不指定时显示错误分页的问题。[#1683](https://github.com/ant-design/ant-design/issues/1683)
- Modal
- 修复弹出时背景依然跟随滚动的问题。[#1751](https://github.com/ant-design/ant-design/issues/1751)
- 修复关闭按钮获得焦点时的样式问题。[#1668](https://github.com/ant-design/ant-design/issues/1668)
- 将搜索输入框相关样式移到 Input 组件下。[7b7f846](https://github.com/ant-design/ant-design/commit/7b7f8461611e53f4f96ae8d64d37fe28ee8d2553)
- 修复 Select 获得焦点时的样式问题。[#1684](https://github.com/ant-design/ant-design/issues/1684)
- 修复 TreeSelect 占位符样式问题。[#1657](https://github.com/ant-design/ant-design/issues/1657)
- 修复了类型定义以更好地支持 `TypeScript`。[#1696](https://github.com/ant-design/ant-design/pull/1696) [@xujihui1985](https://github.com/xujihui1985)
- 优化了 LocaleProvider。[a3850a4](https://github.com/ant-design/ant-design/commit/a3850a4df84d7055a1a40600919f2f9ba1bbf2b2)
- 其他组件的样式优化。
## 1.0.1
`2016-05-11`
- 修复当 Table 的 `rowSelection.type` 为 'radio' 时的报错。[#1627](https://github.com/ant-design/ant-design/issues/1627)
- 修复 CheckboxGroup 与 `getFieldProps`共用时的问题。[#1631](https://github.com/ant-design/ant-design/issues/1631)
- 修复 RangePicker 中 TimePicker 不会受 locale 控制的问题。[#1635](https://github.com/ant-design/ant-design/issues/1635)
- 修复 Tag 组件缺失的问题。
- 修复 Table 的 className 不在最外层容器上的问题。
- 修复一个样式文件重复打包的问题。
## 1.0.0
`2016-05-09`
很高兴的通知各位,经过四个月时间的紧密开发,`antd@1.0.0` 终于发布了。从去年 5 月 7 日提交第一行代码以来经过整整一年的开发迭代antd 受到社区的大量关注,使用的公司和产品持续增加,已经日趋成熟。这个版本我们重构了底层代码和站点,持续完善现有组件功能和优化细节,其中很多都来自社区的贡献,无法一一感谢,欢迎各位持续关注和鞭策。在升级过程中遇到任何问题,请及时反馈给我们。
### 主要变化
- **兼容 React@15.x**。
- **全新单页站点**,使用 React 和 antd 进行了彻底重构,加载更快,访问更流畅。
- **样式支持按需加载**。可参考 [antd-init](https://github.com/ant-design/antd-init) 的模版代码, 需要配合 [babel-plugin-antd](https://github.com/ant-design/babel-plugin-antd#usage) 插件和 `style` 配置进行使用。[#900](https://github.com/ant-design/ant-design/issues/900)
- **提供独立的构建文件**。[文档](/docs/react/install#浏览器引入)
- 新增卡片组件 [Card](/components/card)。
- 新增评分组件 [Rate](/components/rate)。
- 新增 [LocaleProvider](/components/locale-provider) 组件,提供组件文案的国际化支持,并新增了英语和俄语的语言配置。[#1411](https://github.com/ant-design/ant-design/issues/1411)
- 更好的服务端渲染支持,修复了 Badge、Spin、Calendar、Upload 等组件服务端渲染的问题。
- 新增 antd.d.ts 以更好的支持 TypeScript。[@bang88](https://github.com/bang88)
- 布局组件支持响应式布局和栅格间隔设置。[#1082](https://github.com/ant-design/ant-design/issues/1082)
- Table 支持固定列和横向滚动。[#1265](https://github.com/ant-design/ant-design/issues/1265)
### 不兼容改动
此版本有部分不兼容的改动,升级时确保修改相应的使用代码。
- 推荐使用样式按需加载。如果依然需要整体载入样式,**样式入口文件已变为** `antd/dist/antd.css` 和 `antd/dist/antd.less`。如果你在项目中覆盖了 less 变量less 文件的引用方式也有 [相应变更](https://github.com/ant-design/ant-design/issues/1558#issuecomment-218120000)。
```diff
- import 'antd/lib/index.css'; // import 'antd/style/index.less';
+ import 'antd/dist/antd.css'; // import 'antd/dist/antd.less';
```
- 完全移除了 `0.12` 中废弃的 Validation 组件,可以直接 import [rc-form-validation](https://github.com/react-component/form-validation) 用以代替。[#1096](https://github.com/ant-design/ant-design/issues/1096)
- Breadcrumb.Item 的 `href` 属性被移除,请直接用 `a` 标签包裹可点击的内容。
- Modal 移除了 `align` 属性,现在可以使用 `style` 属性调整位置。
- `Modal.confirm` 等方法的配置项 `iconClassName` 重命名为 `iconType`。
- Select 移除了 `onChange` 中的 `label` 参数,新增了 `labelInValue` 属性。[#1695](https://github.com/ant-design/ant-design/issues/1695)
- 移除了 `import { Form } from 'antd/lib/form';` 的用法,应统一为 `import { Form } from 'antd';` 或 `import Form from 'antd/lib/form';`。
#### 有兼容提示的改动
这里的改动在升级后控制台会出现警告提示,请按提示进行修改。
- 废弃 QueueAnim可以直接 import [rc-queue-anim](https://github.com/react-component/queue-anim) 用以代替。Ant Design 的动效方案已移至 [Ant Motion](http://motion.ant.design/components/queue-anim),欢迎前往探索。
- Affix 的 `offset` 属性重命名为 `offsetTop`。
- Popover 的 `overlay` 属性重命名为 `content`。
- Progress.Line 使用方式改为 `<Progress />` 或 `<Progress type="line" />`。
- Progress.Circle 使用方式改为 `<Progress type="circle" />`。
- Spin 的 `spining` 属性更正为 `spinning`。
- Alert 的 type `warn` 重命名为 `warning`。[#1225](https://github.com/ant-design/ant-design/issues/1225)
- Tree 的 `onExpand` 参数从 `function(node, expanded, expandedKeys)` 调整为 `function(expandedKeys, {expanded, node})`。
### Bug 修复
- 修复 Table 的 `size` 为 `middle` 时,分页器大小无法控制的问题。[#1396](https://github.com/ant-design/ant-design/issues/1396)
- 修复 Table 的 `pagination.defaultCurrent` 失效的问题。
- 修复 Cascader 的 `defaultValue` 没有被 `value` 覆盖的问题。
- 修复 Select 同时设置 `allowClear` `disabled` 时还是会出现清除按钮的问题。[#1480](https://github.com/ant-design/ant-design/issues/1480)
- 修复 Transfer 的 `DataSource` 变化时已选中项没有同步的问题。[#1587](https://github.com/ant-design/ant-design/issues/1587)
- 修复 DatePicker 日期格式与国际化配置不同步的问题。[#1509](https://github.com/ant-design/ant-design/issues/1509)
- 修复 Button 禁用时事件仍然会冒泡的问题。[#1541](https://github.com/ant-design/ant-design/issues/1541)
- 修复 Carousel 自动播放时的卡顿和报错问题。[#1397](https://github.com/ant-design/ant-design/issues/1397)
- 修复 Tabs 的 card 类型内嵌标准 Tabs 时的样式问题。[#1617](https://github.com/ant-design/ant-design/issues/1617)
- 修复 Menu `horizontal` 和 `vertical` 模式不支持受控 `openKeys` 的问题。
### 其他改进
- 样式变量梳理,去除了部分无用的变量,另外还有大量样式细节问题修复。
- 依赖的 normalize.css 升级到 [4.x](https://github.com/necolas/normalize.css/blob/4.1.1/CHANGELOG.md)。
- 使用 ES2016 classes 重构了代码。[@waywardmonkeys](https://github.com/waywardmonkeys)
- Popover、Popconfirm 和 Tooltip 组件根据不同的弹出位置有了更精准方向的弹出动画。
- 补充 Select TreeSelect Switch Radio Checkbox 等组件的 `focus` 表现,增强表单组件的可用性。[#1358](https://github.com/ant-design/ant-design/issues/1358)
- message 和 notification 现在可以全局配置 `duration`。[#1143](https://github.com/ant-design/ant-design/issues/1143)
- DatePicker 和 TimePicker 的 `onChange(date, dateString)` 方法增加第二个参数用于获得格式化后的日期字符串。[#1104](https://github.com/ant-design/ant-design/issues/1104)
- DatePicker 和 DatePicker.RangePicker 现在可以设置内部 TimePikcer 的属性。[#1415](https://github.com/ant-design/ant-design/issues/1415)
- Checkbox
- 支持类似 Radio 的使用方式 `<Checkbox>option</Checkbox>`。[#1029](https://github.com/ant-design/ant-design/issues/1029)
- Checkbox.Group 现在允许 `label` 和 `value` 不同。[#1025](https://github.com/ant-design/ant-design/issues/1025)
- Checkbox.Group 允许单独设置某个 Checkbox 为 `disabled`。[#1218](https://github.com/ant-design/ant-design/issues/1218)
- Breadcrumb
- 支持路由模式下自定义链接 `linkRender`。[#1026](https://github.com/ant-design/ant-design/issues/1026)
- 支持路由模式下自定义最后一项内容 `nameRender`。[#1304](https://github.com/ant-design/ant-design/issues/1304)
- Modal
- 新增 `Modal.warning` 方法。
- 弹出时背景不再跟随滚动。[#1195](https://github.com/ant-design/ant-design/issues/1195)
- Select
- 搜索框和单选选择框合并,以优化视觉和交互效果。
- 优化多选框的选中效果。
- Spin
- 增加延时展示以优化体验。[#1273](https://github.com/ant-design/ant-design/issues/1273)
- 增加 `tip` 属性用于定义加载文案。[#1046](https://github.com/ant-design/ant-design/issues/1046)
- Steps
- 重构布局方式,以支持更灵活的自适应布局和优化了性能,并移除了 `maxDescriptionWidth` 属性。[#1099](https://github.com/ant-design/ant-design/issues/1099)
- 新增 `status` 属性以指定当前步骤状态,同时支持错误步骤的展示。[#1098](https://github.com/ant-design/ant-design/issues/1098)
- Timeline
- 新增 `dot` 属性,可自定义时间轴点。
- 现在可以设置 `className` 和 `style` 的问题。
- `color` 属性现在支持自定义色值。
- Tree
- 当子节点被选中时,自动展开父节点。
- 新增 `checkStrictly` 属性,支持父子节点选中关系脱离。
- Upload
- 在上传文件列表中的文件被删除时,将触发 `onRemove` 事件。[#1240](https://github.com/ant-design/ant-design/issues/1240)
- 增加 `onPreview` 支持文件的自定义预览方式。[#1240](https://github.com/ant-design/ant-design/issues/1240)
- `data` 属性支持设为一个函数,用于动态修改上传参数。[react-component/upload#32](https://github.com/react-component/upload/pull/32)
- Slider `marks` 现在支持 JSX 并可以单独设置某个标记的样式。
- Tag 的 `onClose` 可以使用 `e.preventDefault()` 阻止默认事件。[#1267](https://github.com/ant-design/ant-design/issues/1267)
- Form.Item 在有多个 child 时也可以自动生成错误信息与校验状态,但一个 Form.Item 内仍然只能有一个表单控件。[#1287](https://github.com/ant-design/ant-design/issues/1287)
- Input 新增 `onPressEnter` 属性监听回车事件。
- Table 现在可以通过 `filteredValue` `sortOrder` 控制筛选和排序的状态。[#971](https://github.com/ant-design/ant-design/issues/971)
- Button 增加了 `icon` 属性。[#1199](https://github.com/ant-design/ant-design/issues/1199)
- SubMenu 增加 `onTitleClick` 属性。
- Affix 增加 `offsetBottm` 属性,支持固定在底部。[#1000](https://github.com/ant-design/ant-design/issues/1000)
### 相关工具发布
- [antd-init](http://github.com/ant-design/antd-init) 同步发布 `1.0.0` 版本,享受最新 [ant-tool](https://github.com/ant-tool/) 工具带来的流畅开发体验。
- [Ant Motion](http://motion.ant.design) 全新的动效设计解决方案。
- [Ant UX](http://ux.ant.design/) 发布 1.0 版本,提供多种平台的流程素材支持。
## 0.12.17
去 [GitHub](https://github.com/ant-design/ant-design/releases?after=1.0.0) 查看 `0.12.x` 及之前的更新日志。
去 [GitHub](https://github.com/ant-design/ant-design/blob/1.x-stable/CHANGELOG.md) 查看 `0.x` 到 `1.x` 的 Change Log。

View File

@@ -5,21 +5,26 @@
</p>
# Ant Design
[![](https://img.shields.io/travis/ant-design/ant-design.svg?style=flat-square)](https://travis-ci.org/ant-design/ant-design)
[![Coveralls](https://img.shields.io/coveralls/ant-design/ant-design.svg?style=flat-square)](https://coveralls.io/github/ant-design/ant-design)
[![Dependency Status](https://img.shields.io/gemnasium/react-component/trigger.svg?style=flat-square)](https://gemnasium.com/ant-design/ant-design)
[![npm package](https://img.shields.io/npm/v/antd.svg?style=flat-square)](https://www.npmjs.org/package/antd)
[![NPM downloads](http://img.shields.io/npm/dm/antd.svg?style=flat-square)](https://npmjs.org/package/antd)
[![CDNJS](https://img.shields.io/cdnjs/v/antd.svg?style=flat-square)](https://cdnjs.com/libraries/antd)
[![Dependency Status](https://david-dm.org/ant-design/ant-design.svg?style=flat-square)](https://david-dm.org/ant-design/ant-design)
[![Join the chat at https://gitter.im/ant-design/ant-design](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ant-design/ant-design?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/ant-design/ant-design.svg)](http://isitmaintained.com/project/ant-design/ant-design "Average time to resolve an issue")
[![Join the chat at https://gitter.im/ant-design/ant-design](https://img.shields.io/gitter/room/ant-design/ant-design.svg?style=flat-square)](https://gitter.im/ant-design/ant-design?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
一套企业级的 UI 设计语言和 React 实现。
[README in English](README.md)
## 特性
- 提炼和服务企业级中后台产品的交互语言和视觉风格。
- [React Component](http://react-component.github.io/badgeboard/) 基础上精心封装的高质量 UI 组件。
- 提炼企业级中后台产品的交互语言和视觉风格。
- 开箱即用的高质量 React 组件。
- 使用 TypeScript 构建,提供完整的类型定义文件。
- 基于 npm + webpack + babel + [dora](https://github.com/dora-js/dora) + [dva](https://github.com/dvajs/dva) 的企业级业务开发框架。
- 基于 npm + webpack + [dva](https://github.com/dvajs/dva) 的企业级开发框架。
## 安装
@@ -53,7 +58,7 @@ import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
tsconfig.json
```
```js
{
"compilerOptions": {
"moduleResolution": "node",
@@ -63,23 +68,27 @@ tsconfig.json
}
```
> 注意:设置 `allowSyntheticDefaultImports` 避免 `error TS1192: Module 'react' has no default export` 的错误。
## 链接
- [首页](http://ant.design/)
- [React 实现](http://ant.design/docs/react/introduce)
- [修改记录](CHANGELOG.zh-CN.md)
- [开发脚手架](https://github.com/ant-design/antd-init/)
- [首页](http://ant.design/index-cn)
- [组件文档](http://ant.design/docs/react/introduce-cn)
- [更新日志](CHANGELOG.en-US.md)
- [开发脚手架](https://github.com/dvajs/dva-cli)
- [开发工具文档](http://ant-tool.github.io/)
- [React 基础组件](http://react-component.github.io/)
- [移动端组件](http://mobile.ant.design)
- [React 代码规范](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-code-style.md)
- [组件设计原则](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-design.md)
- [网站和组件开发说明](https://github.com/ant-design/ant-design/wiki/%E7%BD%91%E7%AB%99%E5%92%8C%E7%BB%84%E4%BB%B6%E5%BC%80%E5%8F%91%E8%AF%B4%E6%98%8E)
- [版本发布手册](https://github.com/ant-design/ant-design/wiki/%E8%BD%AE%E5%80%BC%E8%A7%84%E5%88%99%E5%92%8C%E7%89%88%E6%9C%AC%E5%8F%91%E5%B8%83%E6%B5%81%E7%A8%8B)
- [动效](https://motion.ant.design)
- [设计规范速查手册](https://os.alipayobjects.com/rmsportal/HTXUgPGkyyxEivE.png)
- [开发说明](https://github.com/ant-design/ant-design/wiki/Development)
- [版本发布规则](https://github.com/ant-design/ant-design/wiki/%E8%BD%AE%E5%80%BC%E8%A7%84%E5%88%99%E5%92%8C%E7%89%88%E6%9C%AC%E5%8F%91%E5%B8%83%E6%B5%81%E7%A8%8B)
- [社区贡献脚手架和范例](https://github.com/ant-design/ant-design/issues/129)
- [常见问题](https://github.com/ant-design/ant-design/wiki/FAQ)
- [CodePen 模板](http://codepen.io/benjycui/pen/KgPZrE?editors=001)
- [CodePen 模板](http://codepen.io/benjycui/pen/KgPZrE?editors=001) for bug reports
- [Awesome Ant Design](https://github.com/websemantics/awesome-ant-design)
- [定制主题](http://ant.design/docs/react/customize-theme-cn)
## 如何贡献

View File

@@ -5,21 +5,30 @@
</p>
# Ant Design
[![](https://img.shields.io/travis/ant-design/ant-design.svg?style=flat-square)](https://travis-ci.org/ant-design/ant-design)
[![Coveralls](https://img.shields.io/coveralls/ant-design/ant-design.svg?style=flat-square)](https://coveralls.io/github/ant-design/ant-design)
[![Dependency Status](https://img.shields.io/gemnasium/react-component/trigger.svg?style=flat-square)](https://gemnasium.com/ant-design/ant-design)
[![npm package](https://img.shields.io/npm/v/antd.svg?style=flat-square)](https://www.npmjs.org/package/antd)
[![NPM downloads](http://img.shields.io/npm/dm/antd.svg?style=flat-square)](https://npmjs.org/package/antd)
[![CDNJS](https://img.shields.io/cdnjs/v/antd.svg?style=flat-square)](https://cdnjs.com/libraries/antd)
[![Dependency Status](https://david-dm.org/ant-design/ant-design.svg?style=flat-square)](https://david-dm.org/ant-design/ant-design)
[![Join the chat at https://gitter.im/ant-design/ant-design](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ant-design/ant-design?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/ant-design/ant-design.svg)](http://isitmaintained.com/project/ant-design/ant-design "Average time to resolve an issue")
[![Join the chat at https://gitter.im/ant-design/ant-design](https://img.shields.io/gitter/room/ant-design/ant-design.svg?style=flat-square)](https://gitter.im/ant-design/ant-design?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
An enterprise-class UI design language and React-based implementation.
[中文 README](README-zh_CN.md)
## Features
- An enterprise-class design language and high quality UI.
- Graceful UI components out of the box, base on [React Component](http://react-component.github.io/badgeboard/).
- Writen in TypeScript with complete define types.
- A npm + webpack + babel + [dora](https://github.com/dora-js/dora) + [dva](https://github.com/dvajs/dva) development framework.
- An enterprise-class UI design language for web applications.
- A set of high-quality React components out of the box.
- Written in TypeScript with complete define types.
- A npm + webpack + [dva](https://github.com/dvajs/dva) front-end development workflow.
## Let's build a better antd together [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
`antd` is an open source project, improvements are welcomed. If you are interested in contributing to `antd`, you can watch this repository, join in [discussion](https://github.com/ant-design/ant-design/issues?q=is%3Aopen+is%3Aissue+label%3ADiscussion), or try to implement some [features which have been accepted](https://github.com/ant-design/ant-design/issues?q=is%3Aopen+is%3Aissue+label%3A%22PR+welcome%22).
## Install
@@ -47,7 +56,7 @@ import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
- Use [babel-plugin-import](https://github.com/ant-design/babel-plugin-import) (Recommended)
```js
// .babelrc
// .babelrc or babel-loader option
{
"plugins": [["import", { libraryName: "antd", style: "css" }]]
}
@@ -60,25 +69,25 @@ import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
import { DatePicker } from 'antd';
```
- Manually import
- Manual import
```jsx
import DatePicker from 'antd/lib/date-picker'; // just for js
import 'antd/lib/date-picker/style/css'; // with style
```
## Environment Support
## Browser Support
Normal browsers and Internet Explorer 9+.
* Browser: Modern browsers and Internet Explorer 9+.
> [IE8 issues](https://github.com/xcatliu/react-ie8)
* Server-side Rendering
* [Electron](http://electron.atom.io/)
## TypeScript
tsconfig.json
```
```js
{
"compilerOptions": {
"moduleResolution": "node",
@@ -88,24 +97,26 @@ tsconfig.json
}
```
> Note: set `allowSyntheticDefaultImports` to prevent `error TS1192: Module 'react' has no default export`.
## Links
- [Home page](http://ant.design/)
- [UI library](http://ant.design/docs/react/introduce)
- [ChangeLog](CHANGELOG.en-US.md)
- [Scaffold tool](https://github.com/ant-design/antd-init/)
- [Change Log](CHANGELOG.en-US.md)
- [Scaffold tool](https://github.com/dvajs/dva-cli/)
- [Development tool](http://ant-tool.github.io/)
- [React components](http://react-component.github.io/)
- [Mobile UI](http://mobile.ant.design)
- [React style guide](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-code-style.md)
- [React component design guide](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-design.md)
- [Motion](https://motion.ant.design)
- [Developer Instruction](https://github.com/ant-design/ant-design/wiki/Development)
- [Versioning Release Note](https://github.com/ant-design/ant-design/wiki/%E8%BD%AE%E5%80%BC%E8%A7%84%E5%88%99%E5%92%8C%E7%89%88%E6%9C%AC%E5%8F%91%E5%B8%83%E6%B5%81%E7%A8%8B)
- [Boilerplates](https://github.com/ant-design/ant-design/issues/129)
- [FAQ](https://github.com/ant-design/ant-design/wiki/FAQ)
- [CodePen boilerplate](http://codepen.io/benjycui/pen/KgPZrE?editors=001) for bug reports
- [Awesome Ant Design](https://github.com/websemantics/awesome-ant-design)
- [Customize Theme](http://ant.design/docs/react/customize-theme)
## Contributing
We welcome all contributions, please read our [CONTRIBUTING.md](https://github.com/ant-design/ant-design/blob/master/.github/CONTRIBUTING.md) first. You can submit any ideas as [pull requests](https://github.com/ant-design/ant-design/pulls) or as a [GitHub issue](https://github.com/ant-design/ant-design/issues). If you'd like to improve code, check out the [Development Instruction](https://github.com/ant-design/ant-design/wiki/Development) and have a good time! :)
We welcome all contributions, please read our [CONTRIBUTING.md](https://github.com/ant-design/ant-design/blob/master/.github/CONTRIBUTING.md) first. You can submit any ideas as [pull requests](https://github.com/ant-design/ant-design/pulls) or as [GitHub issues](https://github.com/ant-design/ant-design/issues). If you'd like to improve code, check out the [Development Instructions](https://github.com/ant-design/ant-design/wiki/Development) and have a good time! :)

View File

@@ -0,0 +1,54 @@
exports[`antd exports modules correctly 1`] = `
Array [
"Affix",
"Anchor",
"AutoComplete",
"Alert",
"BackTop",
"Badge",
"Breadcrumb",
"Button",
"Calendar",
"Card",
"Collapse",
"Carousel",
"Cascader",
"Checkbox",
"Col",
"DatePicker",
"Dropdown",
"Form",
"Icon",
"Input",
"InputNumber",
"Layout",
"LocaleProvider",
"message",
"Menu",
"Modal",
"notification",
"Pagination",
"Popconfirm",
"Popover",
"Progress",
"Radio",
"Rate",
"Row",
"Select",
"Slider",
"Spin",
"Steps",
"Switch",
"Table",
"Transfer",
"Tree",
"TreeSelect",
"Tabs",
"Tag",
"TimePicker",
"Timeline",
"Tooltip",
"Mention",
"Upload",
]
`;

View File

@@ -0,0 +1,7 @@
import * as antd from '..';
describe('antd', () => {
it('exports modules correctly', () => {
expect(Object.keys(antd)).toMatchSnapshot();
});
});

View File

@@ -0,0 +1,29 @@
import throttleByAnimationFrame from '../throttleByAnimationFrame';
jest.useFakeTimers();
describe('Test utils function', () => {
it('throttle function should work', () => {
const callback = jest.fn();
const throttled = throttleByAnimationFrame(callback);
expect(callback).not.toBeCalled();
throttled();
throttled();
jest.runAllTimers();
expect(callback).toBeCalled();
expect(callback.mock.calls.length).toBe(1);
});
it('throttle function should be canceled', () => {
const callback = jest.fn();
const throttled = throttleByAnimationFrame(callback);
throttled();
throttled.cancel();
jest.runAllTimers();
expect(callback).not.toBeCalled();
});
});

View File

@@ -1,6 +1,6 @@
import assign from 'object-assign';
export default function getLocale(props, context, componentName, getDefaultLocale) {
export function getComponentLocale(props, context, componentName, getDefaultLocale) {
const locale = context && context.antLocale && context.antLocale[componentName] ?
context.antLocale[componentName] : getDefaultLocale();
@@ -8,3 +8,12 @@ export default function getLocale(props, context, componentName, getDefaultLocal
result.lang = assign({}, locale.lang, props.locale.lang);
return result;
}
export function getLocaleCode(context) {
const localeCode = context.antLocale && context.antLocale.locale;
// Had use LocaleProvide but didn't set locale
if (context.antLocale && context.antLocale.exist && !localeCode) {
return 'zh-cn';
}
return localeCode;
}

View File

@@ -1,3 +1,16 @@
const availablePrefixs = ['moz', 'ms', 'webkit'];
function requestAnimationFramePolyfill() {
let lastTime = 0;
return function(callback) {
const currTime = new Date().getTime();
const timeToCall = Math.max(0, 16 - (currTime - lastTime));
const id = window.setTimeout(function() { callback(currTime + timeToCall); }, timeToCall);
lastTime = currTime + timeToCall;
return id;
};
}
export default function getRequestAnimationFrame() {
if (typeof window === 'undefined') {
return () => {};
@@ -5,8 +18,27 @@ export default function getRequestAnimationFrame() {
if (window.requestAnimationFrame) {
return window.requestAnimationFrame;
}
const prefix = ['moz', 'ms', 'webkit'].filter(key => `${key}RequestAnimationFrame` in window)[0];
const prefix = availablePrefixs.filter(key => `${key}RequestAnimationFrame` in window)[0];
return prefix
? window[`${prefix}RequestAnimationFrame`]
: callback => setTimeout(callback, 1000 / 60);
: requestAnimationFramePolyfill();
}
export function cancelRequestAnimationFrame(id) {
if (typeof window === 'undefined') {
return null;
}
if (window.cancelAnimationFrame) {
return window.cancelAnimationFrame(id);
}
const prefix = availablePrefixs.filter(key =>
`${key}CancelAnimationFrame` in window || `${key}CancelRequestAnimationFrame` in window
)[0];
return prefix ?
(window[`${prefix}CancelAnimationFrame`] || window[`${prefix}CancelRequestAnimationFrame`]).call(this, id)
: clearTimeout(id);
}

View File

@@ -0,0 +1,10 @@
export default function isFlexSupported() {
if (typeof window !== 'undefined' && window.document && window.document.documentElement) {
const { documentElement } = window.document;
return 'flex' in documentElement.style ||
'webkitFlex' in documentElement.style ||
'Flex' in documentElement.style ||
'msFlex' in documentElement.style;
}
return false;
}

View File

@@ -1,12 +0,0 @@
export default function splitObject(obj, parts): Array<any> {
const left = {};
const right = {};
Object.keys(obj).forEach((k) => {
if (parts.indexOf(k) !== -1) {
left[k] = obj[k];
} else {
right[k] = obj[k];
}
});
return [left, right];
}

View File

@@ -0,0 +1,47 @@
import getRequestAnimationFrame, { cancelRequestAnimationFrame } from '../_util/getRequestAnimationFrame';
const reqAnimFrame = getRequestAnimationFrame();
export default function throttleByAnimationFrame(fn) {
let requestId;
const later = args => () => {
requestId = null;
fn(...args);
};
const throttled = (...args) => {
if (requestId == null) {
requestId = reqAnimFrame(later(args));
}
};
(throttled as any).cancel = () => cancelRequestAnimationFrame(requestId);
return throttled;
}
export function throttleByAnimationFrameDecorator() {
return function(target, key, descriptor) {
let fn = descriptor.value;
let definingProperty = false;
return {
configurable: true,
get() {
if (definingProperty || this === target.prototype || this.hasOwnProperty(key)) {
return fn;
}
let boundFn = throttleByAnimationFrame(fn.bind(this));
definingProperty = true;
Object.defineProperty(this, key, {
value: boundFn,
configurable: true,
writable: true,
});
definingProperty = false;
return boundFn;
},
};
};
}

View File

@@ -0,0 +1,9 @@
import warning from 'warning';
const warned: { [msg: string]: boolean} = {};
export default (valid: boolean, message: string): void => {
if (!valid && !warned[message]) {
warning(false, message);
warned[message] = true;
}
};

View File

@@ -0,0 +1,68 @@
import React from 'react';
import { mount } from 'enzyme';
import Affix from '..';
import Button from '../../button';
jest.useFakeTimers();
const events = {};
class AffixMounter extends React.Component {
componentDidMount() {
this.container.scrollTop = 100;
this.container.addEventListener = jest.fn().mockImplementation((event, cb) => {
events[event] = cb;
});
}
getTarget = () => {
return this.container;
}
render() {
return (<div
style={{
height: 100,
overflowY: 'scroll',
}}
ref={(node) => { this.container = node; }}
>
<div
className="background"
style={{
paddingTop: 60,
height: 300,
}}
>
<Affix
target={() => this.container}
ref={ele => this.affix = ele}
>
<Button type="primary" >
Fixed at the top of container
</Button>
</Affix>
</div>
</div>);
}
}
describe('Affix Render', () => {
it('Anchor render perfectly', () => {
document.body.innerHTML = '<div id="mounter" />';
const wrapper = mount(<AffixMounter />, { attachTo: document.getElementById('mounter') });
jest.runAllTimers();
wrapper.node.affix.refs.fixedNode.parentNode.getBoundingClientRect = jest.fn(() => {
return {
bottom: 100, height: 28, left: 0, right: 0, top: -50, width: 195,
};
});
events.scroll({
type: 'scroll',
});
jest.runAllTimers();
expect(wrapper.node.affix.state.affixStyle).not.toBe(null);
});
});

View File

@@ -0,0 +1,65 @@
exports[`test renders ./components/affix/demo/basic.md correctly 1`] = `
<div>
<div>
<div
class="">
<button
class="ant-btn ant-btn-primary"
type="button">
<span>
Affix top
</span>
</button>
</div>
</div>
<br />
<div>
<div
class="">
<button
class="ant-btn ant-btn-primary"
type="button">
<span>
Affix bottom
</span>
</button>
</div>
</div>
</div>
`;
exports[`test renders ./components/affix/demo/on-change.md correctly 1`] = `
<div>
<div
class="">
<button
class="ant-btn"
type="button">
<span>
120px to affix top
</span>
</button>
</div>
</div>
`;
exports[`test renders ./components/affix/demo/target.md correctly 1`] = `
<div
class="scrollable-container">
<div
class="background">
<div>
<div
class="">
<button
class="ant-btn ant-btn-primary"
type="button">
<span>
Fixed at the top of container
</span>
</button>
</div>
</div>
</div>
</div>
`;

View File

@@ -0,0 +1,3 @@
import demoTest from '../../../tests/shared/demoTest';
demoTest('affix');

View File

@@ -13,12 +13,19 @@ title:
The simplest usage.
````jsx
````__react
import { Affix, Button } from 'antd';
ReactDOM.render(
<Affix>
<Button type="primary">Affix top</Button>
</Affix>
, mountNode);
<div>
<Affix>
<Button type="primary">Affix top</Button>
</Affix>
<br />
<Affix offsetBottom={0}>
<Button type="primary">Affix bottom</Button>
</Affix>
</div>,
mountNode
);
````

View File

@@ -1,24 +0,0 @@
---
order: 2
title:
zh-CN: 下方固定
en-US: Bottom
---
## zh-CN
固定在屏幕下方。
## en-US
Affix to bottom.
````jsx
import { Affix, Button } from 'antd';
ReactDOM.render(
<Affix offsetBottom={20}>
<Button type="primary">20px to affix bottom</Button>
</Affix>
, mountNode);
````

View File

@@ -1,24 +0,0 @@
---
order: 1
title:
zh-CN: 偏移
en-US: Offset
---
## zh-CN
达到一定的偏移量才触发。
## en-US
Affix element according to offset value.
````jsx
import { Affix, Button } from 'antd';
ReactDOM.render(
<Affix offsetTop={75}>
<Button type="primary">75px to affix top</Button>
</Affix>
, mountNode);
````

View File

@@ -1,5 +1,5 @@
---
order: 3
order: 1
title:
zh-CN: 固定状态改变的回调
en-US: Callback
@@ -13,12 +13,13 @@ title:
Callback with affixed state.
````jsx
````__react
import { Affix, Button } from 'antd';
ReactDOM.render(
<Affix offsetTop={120} onChange={affixed => console.log(affixed)}>
<Button>120px to affix top</Button>
</Affix>
, mountNode);
</Affix>,
mountNode
);
````

View File

@@ -1,5 +1,5 @@
---
order: 4
order: 2
title:
zh-CN: 滚动容器
en-US: Container to scroll.
@@ -11,27 +11,38 @@ title:
## en-US
Set a `target` for 'Affix', which is listen to scroll event of target element (default is `window`).
Set a `target` for 'Affix', which is listen to scroll event of target element (default is `window`).
````jsx
````__react
import { Affix, Button } from 'antd';
const Demo = () => {
return (
<div style={{ height: 100, overflow: 'hidden' }}>
<div style={{ height: '100%', overflowY: 'scroll' }} id="affix-target">
<div style={{ height: 300, backgroundImage: 'url(https://zos.alipayobjects.com/rmsportal/RmjwQiJorKyobvI.jpg)' }}>
<br />
<br />
<br />
<Affix target={() => document.getElementById('affix-target')} offsetTop={20}>
<Button type="primary">Fixed at the top of container</Button>
class Demo extends React.Component {
render() {
return (
<div className="scrollable-container" ref={(node) => { this.container = node; }}>
<div className="background">
<Affix target={() => this.container}>
<Button type="primary">
Fixed at the top of container
</Button>
</Affix>
</div>
</div>
</div>
);
};
);
}
}
ReactDOM.render(<Demo />, mountNode);
````
<style>
#components-affix-demo-target .scrollable-container {
height: 100px;
overflow-y: scroll;
}
#components-affix-demo-target .background {
padding-top: 60px;
height: 300px;
background-image: url('https://zos.alipayobjects.com/rmsportal/RmjwQiJorKyobvI.jpg');
}
</style>

View File

@@ -1,6 +1,6 @@
---
category: Components
type: Other
type: Navigation
title: Affix
---
@@ -8,16 +8,16 @@ Make an element sticky to viewport.
## When To Use
When user browses a long web page, some content need to sticky to viewport. It is common for menus and actions.
When user browses a long web page, some content need to stick to the viewport. This is common for menus and actions.
Please note that Affix should not cover other content in page, especially when the size of viewport is small.
Please note that Affix should not cover other content on the page, especially when the size of the viewport is small.
## API
| Property | Description | Type | Default |
|--------------|-----------------------|----------|--------------|
| offsetTop | Pixels to offset from top when calculating position of scroll | Number | 0 |
| offsetBottom | Pixels to offset from bottom when calculating position of scroll | Number | - |
| offsetTop | Pixels to offset from top when calculating position of scroll | number | 0 |
| offsetBottom | Pixels to offset from bottom when calculating position of scroll | number | - |
| onChange | Callback when affix state is changed | Function(affixed) | - |
**Note:** Children of `Affix` can not be `position: absolute`, but you can set `Affix` as `position: absolute`:

View File

@@ -5,6 +5,7 @@ import classNames from 'classnames';
import shallowequal from 'shallowequal';
import omit from 'omit.js';
import getScroll from '../_util/getScroll';
import { throttleByAnimationFrameDecorator } from '../_util/throttleByAnimationFrame';
function getTargetRect(target): ClientRect {
return target !== window ?
@@ -64,6 +65,7 @@ export default class Affix extends React.Component<AffixProps, any> {
scrollEvent: any;
resizeEvent: any;
timeout: any;
refs: {
fixedNode: HTMLElement;
};
@@ -95,18 +97,16 @@ export default class Affix extends React.Component<AffixProps, any> {
});
}
setPlaceholderStyle(e, placeholderStyle) {
setPlaceholderStyle(placeholderStyle) {
const originalPlaceholderStyle = this.state.placeholderStyle;
if (e.type === 'resize') {
return;
}
if (shallowequal(placeholderStyle, originalPlaceholderStyle)) {
return;
}
this.setState({ placeholderStyle });
}
updatePosition = (e) => {
@throttleByAnimationFrameDecorator()
updatePosition(e) {
let { offsetTop, offsetBottom, offset, target = getDefaultTarget } = this.props;
const targetNode = target();
@@ -144,7 +144,7 @@ export default class Affix extends React.Component<AffixProps, any> {
left: targetRect.left + elemOffset.left,
width: affixNode.offsetWidth,
});
this.setPlaceholderStyle(e, {
this.setPlaceholderStyle({
width: affixNode.offsetWidth,
height: affixNode.offsetHeight,
});
@@ -160,19 +160,27 @@ export default class Affix extends React.Component<AffixProps, any> {
left: targetRect.left + elemOffset.left,
width: affixNode.offsetWidth,
});
this.setPlaceholderStyle(e, {
this.setPlaceholderStyle({
width: affixNode.offsetWidth,
height: affixNode.offsetHeight,
});
} else {
this.setAffixStyle(e, null);
this.setPlaceholderStyle(e, null);
const { affixStyle } = this.state;
if (e.type === 'resize' && affixStyle && affixStyle.position === 'fixed' && affixNode.offsetWidth) {
this.setAffixStyle(e, {...affixStyle, width: affixNode.offsetWidth });
} else {
this.setAffixStyle(e, null);
}
this.setPlaceholderStyle(null);
}
}
componentDidMount() {
const target = this.props.target || getDefaultTarget;
this.setTargetEventListeners(target);
// Wait for parent component ref has its value
this.timeout = setTimeout(() => {
this.setTargetEventListeners(target);
});
}
componentWillReceiveProps(nextProps) {
@@ -187,10 +195,16 @@ export default class Affix extends React.Component<AffixProps, any> {
componentWillUnmount() {
this.clearScrollEventListeners();
clearTimeout(this.timeout);
(this.updatePosition as any).cancel();
}
setTargetEventListeners(getTarget) {
const target = getTarget();
if (!target) {
return;
}
this.clearScrollEventListeners();
this.scrollEvent = addEventListener(target, 'scroll', this.updatePosition);
this.resizeEvent = addEventListener(target, 'resize', this.updatePosition);
}
@@ -209,9 +223,9 @@ export default class Affix extends React.Component<AffixProps, any> {
});
const props = omit(this.props, ['prefixCls', 'offsetTop', 'offsetBottom', 'target']);
const placeholderStyle = { ...this.state.placeholderStyle, ...this.props.style };
return (
<div {...props} style={this.state.placeholderStyle}>
<div {...props} style={placeholderStyle}>
<div className={className} ref="fixedNode" style={this.state.affixStyle}>
{this.props.children}
</div>

View File

@@ -1,7 +1,7 @@
---
category: Components
subtitle: 固钉
type: Other
type: Navigation
title: Affix
---
@@ -17,8 +17,8 @@ title: Affix
| 成员 | 说明 | 类型 | 默认值 |
|-------------|----------------|--------------------|--------------|
| offsetTop | 距离窗口顶部达到指定偏移量后触发 | Number | |
| offsetBottom | 距离窗口底部达到指定偏移量后触发 | Number | |
| offsetTop | 距离窗口顶部达到指定偏移量后触发 | number | |
| offsetBottom | 距离窗口底部达到指定偏移量后触发 | number | |
| target | 设置 `Affix` 需要监听其滚动事件的元素,值为一个返回对应 DOM 元素的函数 | Function | () => window |
| onChange | 固定状态改变时触发的回调函数 | Function(affixed) | 无 |

View File

@@ -0,0 +1,308 @@
exports[`test renders ./components/alert/demo/banner.md correctly 1`] = `
<div>
<div
class="ant-alert ant-alert-warning ant-alert-banner"
data-show="true">
<i
class="anticon anticon-exclamation-circle ant-alert-icon" />
<span
class="ant-alert-message">
Warning text
</span>
<span
class="ant-alert-description" />
</div>
<br />
<div
class="ant-alert ant-alert-warning ant-alert-banner"
data-show="true">
<i
class="anticon anticon-exclamation-circle ant-alert-icon" />
<span
class="ant-alert-message">
Very long warning text warning text text text text text text text
</span>
<span
class="ant-alert-description" />
<a
class="ant-alert-close-icon">
<i
class="anticon anticon-cross" />
</a>
</div>
</div>
`;
exports[`test renders ./components/alert/demo/basic.md correctly 1`] = `
<div
class="ant-alert ant-alert-success ant-alert-no-icon"
data-show="true">
<span
class="ant-alert-message">
Success Text
</span>
<span
class="ant-alert-description" />
</div>
`;
exports[`test renders ./components/alert/demo/closable.md correctly 1`] = `
<div>
<div
class="ant-alert ant-alert-warning ant-alert-no-icon"
data-show="true">
<span
class="ant-alert-message">
Warning Text Warning Text Warning TextW arning Text Warning Text Warning TextWarning Text
</span>
<span
class="ant-alert-description" />
<a
class="ant-alert-close-icon">
<i
class="anticon anticon-cross" />
</a>
</div>
<div
class="ant-alert ant-alert-error ant-alert-with-description ant-alert-no-icon"
data-show="true">
<span
class="ant-alert-message">
Error Text
</span>
<span
class="ant-alert-description">
Error Description Error Description Error Description Error Description Error Description Error Description
</span>
<a
class="ant-alert-close-icon">
<i
class="anticon anticon-cross" />
</a>
</div>
</div>
`;
exports[`test renders ./components/alert/demo/close-text.md correctly 1`] = `
<div
class="ant-alert ant-alert-info ant-alert-no-icon"
data-show="true">
<span
class="ant-alert-message">
Info Text
</span>
<span
class="ant-alert-description" />
<a
class="ant-alert-close-icon">
Close Now
</a>
</div>
`;
exports[`test renders ./components/alert/demo/description.md correctly 1`] = `
<div>
<div
class="ant-alert ant-alert-success ant-alert-with-description ant-alert-no-icon"
data-show="true">
<span
class="ant-alert-message">
Success Text
</span>
<span
class="ant-alert-description">
Success Description Success Description Success Description
</span>
</div>
<div
class="ant-alert ant-alert-info ant-alert-with-description ant-alert-no-icon"
data-show="true">
<span
class="ant-alert-message">
Info Text
</span>
<span
class="ant-alert-description">
Info Description Info Description Info Description Info Description
</span>
</div>
<div
class="ant-alert ant-alert-warning ant-alert-with-description ant-alert-no-icon"
data-show="true">
<span
class="ant-alert-message">
Warning Text
</span>
<span
class="ant-alert-description">
Warning Description Warning Description Warning Description Warning Description
</span>
</div>
<div
class="ant-alert ant-alert-error ant-alert-with-description ant-alert-no-icon"
data-show="true">
<span
class="ant-alert-message">
Error Text
</span>
<span
class="ant-alert-description">
Error Description Error Description Error Description Error Description
</span>
</div>
</div>
`;
exports[`test renders ./components/alert/demo/icon.md correctly 1`] = `
<div>
<div
class="ant-alert ant-alert-success"
data-show="true">
<i
class="anticon anticon-check-circle ant-alert-icon" />
<span
class="ant-alert-message">
Success Tips
</span>
<span
class="ant-alert-description" />
</div>
<div
class="ant-alert ant-alert-info"
data-show="true">
<i
class="anticon anticon-info-circle ant-alert-icon" />
<span
class="ant-alert-message">
Informational Notes
</span>
<span
class="ant-alert-description" />
</div>
<div
class="ant-alert ant-alert-warning"
data-show="true">
<i
class="anticon anticon-exclamation-circle ant-alert-icon" />
<span
class="ant-alert-message">
Warning
</span>
<span
class="ant-alert-description" />
</div>
<div
class="ant-alert ant-alert-error"
data-show="true">
<i
class="anticon anticon-cross-circle ant-alert-icon" />
<span
class="ant-alert-message">
Error
</span>
<span
class="ant-alert-description" />
</div>
<div
class="ant-alert ant-alert-success ant-alert-with-description"
data-show="true">
<i
class="anticon anticon-check-circle-o ant-alert-icon" />
<span
class="ant-alert-message">
success tips
</span>
<span
class="ant-alert-description">
Detailed description and advices about successful copywriting.
</span>
</div>
<div
class="ant-alert ant-alert-info ant-alert-with-description"
data-show="true">
<i
class="anticon anticon-info-circle-o ant-alert-icon" />
<span
class="ant-alert-message">
Informational Notes
</span>
<span
class="ant-alert-description">
Additional description and informations about copywriting.
</span>
</div>
<div
class="ant-alert ant-alert-warning ant-alert-with-description"
data-show="true">
<i
class="anticon anticon-exclamation-circle-o ant-alert-icon" />
<span
class="ant-alert-message">
Warning
</span>
<span
class="ant-alert-description">
This is a warning notice about copywriting.
</span>
</div>
<div
class="ant-alert ant-alert-error ant-alert-with-description"
data-show="true">
<i
class="anticon anticon-cross-circle-o ant-alert-icon" />
<span
class="ant-alert-message">
Error
</span>
<span
class="ant-alert-description">
This is an error message about copywriting.
</span>
</div>
</div>
`;
exports[`test renders ./components/alert/demo/style.md correctly 1`] = `
<div>
<div
class="ant-alert ant-alert-success ant-alert-no-icon"
data-show="true">
<span
class="ant-alert-message">
Success Text
</span>
<span
class="ant-alert-description" />
</div>
<div
class="ant-alert ant-alert-info ant-alert-no-icon"
data-show="true">
<span
class="ant-alert-message">
Info Text
</span>
<span
class="ant-alert-description" />
</div>
<div
class="ant-alert ant-alert-warning ant-alert-no-icon"
data-show="true">
<span
class="ant-alert-message">
Warning Text
</span>
<span
class="ant-alert-description" />
</div>
<div
class="ant-alert ant-alert-error ant-alert-no-icon"
data-show="true">
<span
class="ant-alert-message">
Error Text
</span>
<span
class="ant-alert-description" />
</div>
</div>
`;

View File

@@ -0,0 +1,3 @@
import demoTest from '../../../tests/shared/demoTest';
demoTest('alert');

View File

@@ -13,7 +13,7 @@ title:
When `Alert` is used as banner, it has particular style, Icon and `type`(warning) are specified by default.
````jsx
````__react
import { Alert } from 'antd';
ReactDOM.render(

View File

@@ -13,7 +13,7 @@ title:
The simplest usage for short messages.
````jsx
````__react
import { Alert } from 'antd';
ReactDOM.render(

View File

@@ -13,7 +13,7 @@ title:
To show close button.
````jsx
````__react
import { Alert } from 'antd';
const onClose = function (e) {

View File

@@ -13,7 +13,7 @@ title:
Replace the default icon with customized text.
````jsx
````__react
import { Alert } from 'antd';
ReactDOM.render(

View File

@@ -13,7 +13,7 @@ title:
Additional description for alert message.
````jsx
````__react
import { Alert } from 'antd';
ReactDOM.render(<div>

View File

@@ -13,7 +13,7 @@ title:
Decent icon make information more clear and more friendly.
````jsx
````__react
import { Alert } from 'antd';
ReactDOM.render(<div>

View File

@@ -13,7 +13,7 @@ title:
There are 4 types of Alert: `success`, `info`, `warning`, `error`.
````jsx
````__react
import { Alert } from 'antd';
ReactDOM.render(<div>

View File

@@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Feedback
title: Alert
---
@@ -9,17 +9,17 @@ Alert component for feedback.
## When To Use
- When you need to show alert messages for users.
- When you need a persist static container, and closable by user actions.
- When you need a persistent static container which is closable by user actions.
## API
| Property | Description | Type | Default |
|----------- |--------------------------------------------------------- | ---------- |-------|
| type | Type of Alert styles, options:`success`, `info`, `warning`, `error` | String | `info` |
| closable | Whether Alert can be closed | Boolean | - |
| closeText | Close text to show | React.Node | - |
| message | Content of Alert | React.Node | - |
| description | Additional content of Alert | React.Node | - |
| type | Type of Alert styles, options:`success`, `info`, `warning`, `error` | string | `info` |
| closable | Whether Alert can be closed | boolean | - |
| closeText | Close text to show | string\|ReactNode | - |
| message | Content of Alert | string\|ReactNode | - |
| description | Additional content of Alert | string\|ReactNode | - |
| onClose | Callback when close Alert | Function | - |
| showIcon | Whether to show icon | Boolean | false |
| banner | Whether to show as banner | Boolean | false |
| showIcon | Whether to show icon | boolean | false |
| banner | Whether to show as banner | boolean | false |

View File

@@ -93,21 +93,25 @@ export default class Alert extends React.Component<AlertProps, any> {
iconType += '-o';
}
let alertCls = classNames({
[prefixCls]: true,
let alertCls = classNames(prefixCls, {
[`${prefixCls}-${type}`]: true,
[`${prefixCls}-close`]: !this.state.closing,
[`${prefixCls}-with-description`]: !!description,
[`${prefixCls}-no-icon`]: !showIcon,
[`${prefixCls}-banner`]: !!banner,
[className]: !!className,
});
}, className);
// closeable when closeText is assigned
if (closeText) {
closable = true;
}
const closeIcon = closable ? (
<a onClick={this.handleClose} className={`${prefixCls}-close-icon`}>
{closeText || <Icon type="cross" />}
</a>
) : null;
return this.state.closed ? null : (
<Animate
component=""
@@ -119,9 +123,7 @@ export default class Alert extends React.Component<AlertProps, any> {
{showIcon ? <Icon className={`${prefixCls}-icon`} type={iconType} /> : null}
<span className={`${prefixCls}-message`}>{message}</span>
<span className={`${prefixCls}-description`}>{description}</span>
{closable ? <a onClick={this.handleClose} className={`${prefixCls}-close-icon`}>
{closeText || <Icon type="cross" />}
</a> : null}
{closeIcon}
</div>
</Animate>
);

View File

@@ -1,7 +1,7 @@
---
category: Components
subtitle: 警告提示
type: Views
type: Feedback
title: Alert
---
@@ -16,12 +16,12 @@ title: Alert
| 参数 | 说明 | 类型 | 默认值 |
|----------- |--------------------------------------------------------- | ---------- |-------|
| type | 指定警告提示的样式,有四种选择 `success``info``warning``error` | String | `info` |
| closable | 默认不显示关闭按钮 | Boolean | 无 |
| closeText | 自定义关闭按钮 | React.Node | 无 |
| message | 警告提示内容 | React.Node | 无 |
| description | 警告提示的辅助性文字介绍 | React.Node | 无 |
| type | 指定警告提示的样式,有四种选择 `success``info``warning``error` | string | `info` |
| closable | 默认不显示关闭按钮 | boolean | 无 |
| closeText | 自定义关闭按钮 | string\|ReactNode | 无 |
| message | 警告提示内容 | string\|ReactNode | 无 |
| description | 警告提示的辅助性文字介绍 | string\|ReactNode | 无 |
| onClose | 关闭时触发的回调函数 | Function | 无 |
| showIcon | 是否显示辅助图标 | Boolean | false |
| banner | 是否用作顶部公告 | Boolean | false |
| showIcon | 是否显示辅助图标 | boolean | false |
| banner | 是否用作顶部公告 | boolean | false |

View File

@@ -16,8 +16,8 @@
}
&-icon {
font-size: 14px;
top: 9px;
font-size: @font-size-lg;
top: 9.5px;
left: 16px;
position: absolute;
}
@@ -29,32 +29,32 @@
}
&-success {
border: 1px solid tint(@success-color, 80%);
background-color: tint(@success-color, 90%);
border: @border-width-base @border-style-base @green-2;
background-color: @green-1;
.@{alert-prefix-cls}-icon {
color: @success-color;
}
}
&-info {
border: 1px solid tint(@primary-color, 80%);
background-color: tint(@primary-color, 90%);
border: @border-width-base @border-style-base @primary-2;
background-color: @primary-1;
.@{alert-prefix-cls}-icon {
color: @primary-color;
}
}
&-warning {
border: 1px solid tint(@warning-color, 80%);
background-color: tint(@warning-color, 90%);
border: @border-width-base @border-style-base @yellow-2;
background-color: @yellow-1;
.@{alert-prefix-cls}-icon {
color: @warning-color;
}
}
&-error {
border: 1px solid tint(@error-color, 80%);
background-color: tint(@error-color, 90%);
border: @border-width-base @border-style-base @red-2;
background-color: @red-1;
.@{alert-prefix-cls}-icon {
color: @error-color;
}
@@ -71,7 +71,7 @@
cursor: pointer;
.@{iconfont-css-prefix}-cross {
color: @legend-color;
color: @text-color-secondary;
transition: color .3s ease;
&:hover {
color: #404040;
@@ -113,7 +113,7 @@
}
&-with-description &-message {
font-size: 14px;
font-size: @font-size-lg;
color: @heading-color;
display: block;
margin-bottom: 4px;

View File

@@ -0,0 +1,105 @@
import React from 'react';
import classNames from 'classnames';
import AnchorHelper, { scrollTo } from './anchorHelper';
export interface AnchorLinkProps {
href: string;
onClick: (href: string, component: Element) => void;
active?: boolean;
prefixCls?: string;
children?: any;
title?: React.ReactNode;
offsetTop: number;
bounds: number;
target?: () => HTMLElement | Window;
affix?: boolean;
}
export default class AnchorLink extends React.Component<AnchorLinkProps, any> {
static contextTypes = {
anchorHelper: React.PropTypes.any,
};
static defaultProps = {
href: '#',
prefixCls: 'ant-anchor',
};
context: {
anchorHelper: AnchorHelper;
};
private _component: Element;
setActiveAnchor() {
const { bounds, offsetTop, href, affix } = this.props;
const { anchorHelper } = this.context;
const active = affix && anchorHelper && anchorHelper.getCurrentAnchor(offsetTop, bounds) === href;
if (active && anchorHelper) {
anchorHelper.setActiveAnchor(this._component);
}
}
componentDidMount() {
this.setActiveAnchor();
}
componentDidUpdate() {
this.setActiveAnchor();
}
renderAnchorLink = (child) => {
const { href } = child.props;
if (href) {
this.context.anchorHelper.addLink(href);
return React.cloneElement(child, {
onClick: this.props.onClick,
prefixCls: this.props.prefixCls,
affix: this.props.affix,
offsetTop: this.props.offsetTop,
});
}
return child;
}
refsTo = (component) => {
this._component = component;
}
scrollTo = (e) => {
e.preventDefault();
const { onClick, href } = this.props;
const { anchorHelper } = this.context;
if (onClick) {
onClick(href, this._component);
} else {
e.stopPreventDefault();
const scrollToFn = anchorHelper ? anchorHelper.scrollTo : scrollTo;
scrollToFn(href, this.props.offsetTop);
}
}
render() {
const { prefixCls, href, children, title, bounds, offsetTop, affix } = this.props;
const { anchorHelper } = this.context;
const active = affix && anchorHelper && anchorHelper.getCurrentAnchor(offsetTop, bounds) === href;
const cls = classNames({
[`${prefixCls}-link`]: true,
[`${prefixCls}-link-active`]: active,
});
return (
<div className={cls}>
<a
ref={this.refsTo}
className={`${prefixCls}-link-title`}
onClick={this.scrollTo}
href={href}
title={typeof title === 'string' ? title : ''}
>
{title}
</a>
{React.Children.map(children, this.renderAnchorLink)}
</div>
);
}
}

View File

@@ -0,0 +1,20 @@
import React from 'react';
import { mount } from 'enzyme';
import Anchor from '..';
const { Link } = Anchor;
describe('Anchor Render', () => {
it('Anchor render perfectly', () => {
const wrapper = mount(
<Anchor>
<Link href="#API" title="API" />
</Anchor>
);
wrapper.find('a[href="#API"]').simulate('click');
wrapper.node.handleScroll();
expect(wrapper.node.state).not.toBe(null);
});
});

View File

@@ -0,0 +1,122 @@
exports[`test renders ./components/anchor/demo/basic.md correctly 1`] = `
<div>
<div
class="">
<div
class="ant-anchor-wrapper">
<div
class="ant-anchor">
<div
class="ant-anchor-ink">
<span
class="ant-anchor-ink-ball animated" />
</div>
<div
class="ant-anchor-link">
<a
class="ant-anchor-link-title"
href="#components-anchor-demo-basic"
title="Basic demo">
Basic demo
</a>
</div>
<div
class="ant-anchor-link">
<a
class="ant-anchor-link-title"
href="#components-anchor-demo-fixed"
title="Fixed demo">
Fixed demo
</a>
</div>
<div
class="ant-anchor-link">
<a
class="ant-anchor-link-title"
href="#API"
title="API">
API
</a>
<div
class="ant-anchor-link">
<a
class="ant-anchor-link-title"
href="#Anchor-Props"
title="Anchor Props">
Anchor Props
</a>
</div>
<div
class="ant-anchor-link">
<a
class="ant-anchor-link-title"
href="#Link-Props"
title="Link Props">
Link Props
</a>
</div>
</div>
</div>
</div>
</div>
</div>
`;
exports[`test renders ./components/anchor/demo/fixed.md correctly 1`] = `
<div
class="ant-anchor-wrapper">
<div
class="ant-anchor fixed">
<div
class="ant-anchor-ink">
<span
class="ant-anchor-ink-ball animated" />
</div>
<div
class="ant-anchor-link">
<a
class="ant-anchor-link-title"
href="#components-anchor-demo-basic"
title="Basic demo">
Basic demo
</a>
</div>
<div
class="ant-anchor-link">
<a
class="ant-anchor-link-title"
href="#components-anchor-demo-fixed"
title="Fixed demo">
Fixed demo
</a>
</div>
<div
class="ant-anchor-link">
<a
class="ant-anchor-link-title"
href="#API"
title="API">
API
</a>
<div
class="ant-anchor-link">
<a
class="ant-anchor-link-title"
href="#Anchor-Props"
title="Anchor Props">
Anchor Props
</a>
</div>
<div
class="ant-anchor-link">
<a
class="ant-anchor-link-title"
href="#Link-Props"
title="Link Props">
Link Props
</a>
</div>
</div>
</div>
</div>
`;

View File

@@ -0,0 +1,3 @@
import demoTest from '../../../tests/shared/demoTest';
demoTest('anchor');

View File

@@ -0,0 +1,129 @@
import getScroll from '../_util/getScroll';
import getRequestAnimationFrame from '../_util/getRequestAnimationFrame';
export const reqAnimFrame = getRequestAnimationFrame();
export const easeInOutCubic = (t, b, c, d) => {
const cc = c - b;
t /= d / 2;
if (t < 1) {
return cc / 2 * t * t * t + b;
}
return cc / 2 * ((t -= 2) * t * t + 2) + b;
};
export function getDefaultTarget() {
return typeof window !== 'undefined' ?
window : null;
}
export function getOffsetTop(element): number {
if (!element) {
return 0;
}
if (!element.getClientRects().length) {
return 0;
}
const rect = element.getBoundingClientRect();
if ( rect.width || rect.height ) {
const doc = element.ownerDocument;
const docElem = doc.documentElement;
return rect.top - docElem.clientTop;
}
return rect.top;
}
export type Section = {
top: number;
bottom: number;
section: any;
};
export function scrollTo(href, offsetTop = 0, target = getDefaultTarget, callback = () => {}) {
const scrollTop = getScroll(target(), true);
const targetElement = document.getElementById(href.substring(1));
if (!targetElement) {
return;
}
const eleOffsetTop = getOffsetTop(targetElement);
const targetScrollTop = scrollTop + eleOffsetTop - offsetTop;
const startTime = Date.now();
const frameFunc = () => {
const timestamp = Date.now();
const time = timestamp - startTime;
window.scrollTo(window.pageXOffset, easeInOutCubic(time, scrollTop, targetScrollTop, 450));
if (time < 450) {
reqAnimFrame(frameFunc);
} else {
callback();
}
};
reqAnimFrame(frameFunc);
history.pushState(null, '', href);
}
class AnchorHelper {
private links: Array<string>;
private currentAnchor: HTMLElement | null;
private _activeAnchor: string;
constructor() {
this.links = [];
this.currentAnchor = null;
this._activeAnchor = '';
}
addLink(link) {
if (this.links.indexOf(link) === -1) {
this.links.push(link);
}
}
getCurrentActiveAnchor(): HTMLElement | null {
return this.currentAnchor;
}
setActiveAnchor(component) {
this.currentAnchor = component;
}
getCurrentAnchor(offsetTop: number = 0, bounds = 5) {
let activeAnchor = '';
if (typeof document === 'undefined') {
return activeAnchor;
}
const linksPositions = (this.links
.map(section => {
const target = document.getElementById(section.substring(1));
if (target && getOffsetTop(target) < offsetTop + bounds) {
const top = getOffsetTop(target);
if (top <= offsetTop + bounds) {
return {
section,
top,
bottom: top + target.clientHeight,
};
}
}
return null;
})
.filter(section => section !== null) as Array<Section>);
if (linksPositions.length) {
const maxSection = linksPositions.reduce((prev, curr) => curr.top > prev.top ? curr : prev);
return maxSection.section;
}
return '';
}
scrollTo(href, offsetTop, target = getDefaultTarget, callback = () => {}) {
scrollTo(href, offsetTop, target, callback);
}
}
export default AnchorHelper;

View File

@@ -0,0 +1,36 @@
---
order: 0
title:
zh-CN: 基本
en-US: Basic
---
## zh-CN
最简单的用法。
## en-US
The simplest usage.
```__react
import { Anchor } from 'antd';
const { Link } = Anchor;
ReactDOM.render(
<Anchor>
<Link href="#components-anchor-demo-basic" title="Basic demo" />
<Link href="#components-anchor-demo-fixed" title="Fixed demo" />
<Link href="#API" title="API">
<Link href="#Anchor-Props" title="Anchor Props" />
<Link href="#Link-Props" title="Link Props" />
</Link>
</Anchor>
, mountNode);
```
<style>
.code-box-demo .ant-affix {
z-index: 11;
}
</style>

View File

@@ -0,0 +1,30 @@
---
order: 2
title:
zh-CN: 固定
en-US: Fixed Anchor
---
## zh-CN
不浮动,状态不随页面滚动变化。
## en-US
Do not change state when page is scrolling.
```__react
import { Anchor } from 'antd';
const { Link } = Anchor;
ReactDOM.render(
<Anchor affix={false}>
<Link href="#components-anchor-demo-basic" title="Basic demo" />
<Link href="#components-anchor-demo-fixed" title="Fixed demo" />
<Link href="#API" title="API">
<Link href="#Anchor-Props" title="Anchor Props" />
<Link href="#Link-Props" title="Link Props" />
</Link>
</Anchor>
, mountNode);
```

View File

@@ -0,0 +1,29 @@
---
category: Components
type: Other
cols: 2
title: Anchor
---
Hyperlinks to scroll on one page.
## When To Use
For displaying anchor hyperlinks on page and jumping between them.
## API
### Anchor Props
| Property | Description | Type | Default |
|--------------|-----------------------|----------|--------------|
| offsetTop | Pixels to offset from top when calculating position of scroll | number | 0 |
| offsetBottom | Pixels to offset from bottom when calculating position of scroll | number | - |
| bounds | Bounding distance of anchor area | number | 5(px) |
### Link Props
| Property | Description | Type | Default |
|-------------|----------------|--------------------|--------------|
| href | target of hyperlink | string | |
| title | content of hyperlink | string\|ReactNode | |

142
components/anchor/index.tsx Normal file
View File

@@ -0,0 +1,142 @@
import React from 'react';
import classNames from 'classnames';
import addEventListener from 'rc-util/lib/Dom/addEventListener';
import AnchorLink from './AnchorLink';
import Affix from '../affix';
import AnchorHelper, { getDefaultTarget } from './anchorHelper';
export interface AnchorProps {
target: () => HTMLElement | Window;
children: React.ReactNode;
prefixCls?: string;
offsetTop?: number;
bounds?: number;
className?: string;
style?: React.CSSProperties;
affix?: boolean;
}
export default class Anchor extends React.Component<AnchorProps, any> {
static Link = AnchorLink;
static defaultProps = {
prefixCls: 'ant-anchor',
affix: true,
};
static childContextTypes = {
anchorHelper: React.PropTypes.any,
};
refs: {
ink?: any;
};
private scrollEvent: any;
private anchorHelper: AnchorHelper;
private _avoidInk: boolean;
constructor(props) {
super(props);
this.state = {
activeAnchor: null,
animated: true,
};
this.anchorHelper = new AnchorHelper();
}
handleScroll = () => {
this.setState({
activeAnchor: this.anchorHelper.getCurrentAnchor(this.props.offsetTop, this.props.bounds),
});
}
getChildContext() {
return {
anchorHelper: this.anchorHelper,
};
}
componentDidMount() {
this.handleScroll();
this.updateInk();
this.scrollEvent = addEventListener((this.props.target || getDefaultTarget)(), 'scroll', this.handleScroll);
}
componentWillUnmount() {
if (this.scrollEvent) {
this.scrollEvent.remove();
}
}
componentDidUpdate() {
if (!this._avoidInk) {
this.updateInk();
}
}
updateInk = () => {
const activeAnchor = this.anchorHelper.getCurrentActiveAnchor();
if (activeAnchor) {
this.refs.ink.style.top = `${activeAnchor.offsetTop + activeAnchor.clientHeight / 2 - 4.5}px`;
}
}
clickAnchorLink = (href, component) => {
this._avoidInk = true;
this.refs.ink.style.top = `${component.offsetTop + component.clientHeight / 2 - 4.5}px`;
this.anchorHelper.scrollTo(href, this.props.offsetTop, getDefaultTarget, () => {
this._avoidInk = false;
});
}
renderAnchorLink = (child) => {
const { href } = child.props;
if (href) {
this.anchorHelper.addLink(href);
return React.cloneElement(child, {
onClick: this.clickAnchorLink,
prefixCls: this.props.prefixCls,
bounds: this.props.bounds,
affix: this.props.affix,
offsetTop: this.props.offsetTop,
});
}
return child;
}
render() {
const { prefixCls, offsetTop, style, className = '', affix } = this.props;
const { activeAnchor, animated } = this.state;
const inkClass = classNames({
[`${prefixCls}-ink-ball`]: true,
animated,
visible: !!activeAnchor,
});
const wrapperClass = classNames({
[`${prefixCls}-wrapper`]: true,
}, className);
const anchorClass = classNames(prefixCls, {
'fixed': !affix,
});
const anchorContent = (
<div className={wrapperClass} style={style}>
<div className={anchorClass}>
<div className={`${prefixCls}-ink`} >
<span className={inkClass} ref="ink" />
</div>
{React.Children.map(this.props.children, this.renderAnchorLink)}
</div>
</div>
);
return !affix ? anchorContent : (
<Affix offsetTop={offsetTop}>
{anchorContent}
</Affix>
);
}
}

View File

@@ -0,0 +1,30 @@
---
category: Components
subtitle: 锚点
cols: 2
type: Other
title: Anchor
---
用于跳转到页面指定位置。
## 何时使用
需要展现当前页面上可供跳转的锚点链接,以及快速在锚点之间跳转。
## API
### Anchor Props
| 成员 | 说明 | 类型 | 默认值 |
|-------------|----------------|--------------------|--------------|
| offsetTop | 距离窗口顶部达到指定偏移量后触发 | number | |
| offsetBottom | 距离窗口底部达到指定偏移量后触发 | number | |
| bounds | 锚点区域边界 | number | 5(px) |
### Link Props
| 成员 | 说明 | 类型 | 默认值 |
|-------------|----------------|--------------------|--------------|
| href | 锚点链接 | string | |
| title | 文字内容 | string\|ReactNode | |

View File

@@ -0,0 +1,78 @@
@import "../../style/themes/default";
.@{ant-prefix} {
&-anchor {
position: relative;
&-wrapper {
background-color: @component-background;
}
&-ink {
position: absolute;
height: 100%;
left: 0;
top: 0;
&:before {
content: ' ';
position: relative;
width: 2px;
height: 100%;
display: block;
background-color: @border-color-split;
margin: 0 auto;
}
&-ball {
display: none;
position: absolute;
width: 9px;
height: 9px;
border-radius: 9px;
border: 3px solid @primary-color;
background-color: @component-background;
left: 50%;
transition: top .3s ease-in-out;
transform: translateX(-50%);
&.visible {
display: inline-block;
}
}
}
&.fixed &-ink &-ink-ball {
display: none;
}
}
&-anchor-link {
padding: 8px 0 8px 18px;
line-height: 1;
& & {
padding-top: 6px;
padding-bottom: 6px;
}
&-title {
display: block;
position: relative;
transition: all .3s;
color: @text-color;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 8px;
}
&-title:only-child {
margin-bottom: 0;
}
&-active > &-title {
color: @primary-color;
}
& > & {
font-size: @font-size-base;
}
}
}

View File

@@ -0,0 +1,2 @@
import '../../style/index.less';
import './index.less';

View File

@@ -0,0 +1,130 @@
exports[`test renders ./components/auto-complete/demo/antd.md correctly 1`] = `
<div
class="ant-select-show-search ant-select-auto-complete ant-select ant-select-combobox ant-select-enabled"
style="width:200px;">
<div
aria-autocomplete="list"
aria-expanded="false"
aria-haspopup="true"
class="ant-select-selection
ant-select-selection--single"
role="combobox">
<div
class="ant-select-selection__rendered">
<div
class="ant-select-selection__placeholder"
style="display:block;user-select:none;-webkit-user-select:none;"
unselectable="unselectable">
input here
</div>
<ul>
<li
class="ant-select-search ant-select-search--inline">
<div
class="ant-select-search__field__wrap">
<textarea
class="ant-input ant-select-search__field"
style="height:50px;" />
<span
class="ant-select-search__field__mirror" />
</div>
</li>
</ul>
</div>
<span
class="ant-select-arrow"
style="user-select:none;-webkit-user-select:none;"
unselectable="unselectable">
<b />
</span>
</div>
</div>
`;
exports[`test renders ./components/auto-complete/demo/basic.md correctly 1`] = `
<div
class="ant-select-show-search ant-select-auto-complete ant-select ant-select-combobox ant-select-enabled"
style="width:200px;">
<div
aria-autocomplete="list"
aria-expanded="false"
aria-haspopup="true"
class="ant-select-selection
ant-select-selection--single"
role="combobox">
<div
class="ant-select-selection__rendered">
<div
class="ant-select-selection__placeholder"
style="display:block;user-select:none;-webkit-user-select:none;"
unselectable="unselectable">
input here
</div>
<ul>
<li
class="ant-select-search ant-select-search--inline">
<div
class="ant-select-search__field__wrap">
<input
class="ant-input ant-input ant-select-search__field"
type="text"
value="" />
<span
class="ant-select-search__field__mirror" />
</div>
</li>
</ul>
</div>
<span
class="ant-select-arrow"
style="user-select:none;-webkit-user-select:none;"
unselectable="unselectable">
<b />
</span>
</div>
</div>
`;
exports[`test renders ./components/auto-complete/demo/options.md correctly 1`] = `
<div
class="ant-select-show-search ant-select-auto-complete ant-select ant-select-combobox ant-select-enabled"
style="width:200px;">
<div
aria-autocomplete="list"
aria-expanded="false"
aria-haspopup="true"
class="ant-select-selection
ant-select-selection--single"
role="combobox">
<div
class="ant-select-selection__rendered">
<div
class="ant-select-selection__placeholder"
style="display:block;user-select:none;-webkit-user-select:none;"
unselectable="unselectable">
input here
</div>
<ul>
<li
class="ant-select-search ant-select-search--inline">
<div
class="ant-select-search__field__wrap">
<input
class="ant-input ant-input ant-select-search__field"
type="text"
value="" />
<span
class="ant-select-search__field__mirror" />
</div>
</li>
</ul>
</div>
<span
class="ant-select-arrow"
style="user-select:none;-webkit-user-select:none;"
unselectable="unselectable">
<b />
</span>
</div>
</div>
`;

View File

@@ -0,0 +1,20 @@
import React from 'react';
import { mount } from 'enzyme';
import AutoComplete from '..';
describe('AutoComplete with Custom Input Element Render', () => {
it('AutoComplete with custom Input render perfectly', () => {
const wrapper = mount(
<AutoComplete dataSource={['12345', '23456', '34567']}>
<textarea />
</AutoComplete>
);
expect(wrapper.find('textarea').length).toBe(1);
wrapper.find('textarea').simulate('change', { target: { value: '123' } });
const dropdownWrapper = mount(wrapper.find('Trigger').node.getComponent());
expect(dropdownWrapper.find('MenuItem').length).toBe(1);
expect(dropdownWrapper.find('MenuItem').props().value).toBe('12345');
});
});

View File

@@ -0,0 +1,3 @@
import demoTest from '../../../tests/shared/demoTest';
demoTest('auto-complete');

View File

@@ -0,0 +1,58 @@
---
order: 3
title:
zh-CN: 自定义输入组件
en-US: Customize Input Component
---
## zh-CN
自定义输入组件。
## en-US
Customize Input Component
````__react
import { AutoComplete } from 'antd';
function onSelect(value) {
console.log('onSelect', value);
}
const Complete = React.createClass({
getInitialState() {
return {
dataSource: [],
};
},
handleChange(value) {
this.setState({
dataSource: !value ? [] : [
value,
value + value,
value + value + value,
],
});
},
handleKeyPress(ev) {
console.log('handleKeyPress', ev);
},
render() {
const { dataSource } = this.state;
return (
<AutoComplete
dataSource={dataSource}
style={{ width: 200 }}
onSelect={onSelect}
onChange={this.handleChange}
placeholder="input here"
>
<textarea onKeyPress={this.handleKeyPress} style={{ height: 50 }}/>
</AutoComplete>
);
},
});
ReactDOM.render(<Complete />, mountNode);
````

View File

@@ -13,7 +13,7 @@ title:
Basic Usage, set datasource of autocomplete with `dataSource` property.
````jsx
````__react
import { AutoComplete } from 'antd';
function onSelect(value) {
@@ -43,6 +43,7 @@ const Complete = React.createClass({
style={{ width: 200 }}
onSelect={onSelect}
onChange={this.handleChange}
placeholder="input here"
/>
);
},

View File

@@ -13,7 +13,7 @@ title:
You could pass `AutoComplete.Option` as children of `AutoComplete`, instead of using `dataSource`
````jsx
````__react
import { AutoComplete } from 'antd';
const Option = AutoComplete.Option;
@@ -42,6 +42,7 @@ const Complete = React.createClass({
<AutoComplete
style={{ width: 200 }}
onChange={this.handleChange}
placeholder="input here"
>
{children}
</AutoComplete>

View File

@@ -1,6 +1,6 @@
---
category: Components
type: Form Controls
type: Data Entry
cols: 1
title: AutoComplete
---
@@ -9,7 +9,7 @@ Autocomplete function of input field.
## When To Use
When need to use autocomplete function.
When there is a need for autocomplete functionality.
## API
@@ -17,14 +17,17 @@ When need to use autocomplete function.
const dataSource = ['12345', '23456', '34567'];
<AutoComplete dataSource={dataSource} />
```
Since `AutoComplete` is based on `Select`, so besides the following API, `AutoComplete` has the same API as `Select`.
| Property | Description | Type | Default |
|----------------|----------------------------------|------------|--------|
| dataSource | Data source for autocomplete | Array | |
| value | selected option | String/Array<String>/{key: String, label: React.Node}/Array<{key, label}> | - |
| defaultValue | Initial selected option. | string/Array<String> | - |
| dataSource | Data source for autocomplete | [DataSourceItemType](https://git.io/vMMKF)[] | |
| value | selected option | string\|string[]\|{ key: string, label: string\|ReactNode }\|Array<{ key: string, label: string\|ReactNode }> | - |
| defaultValue | Initial selected option. | string\|string[]\|{ key: string, label: string\|ReactNode }\|Array<{ key: string, label: string\|ReactNode }> | - |
| allowClear | Show clear button, effective in multiple mode only. | boolean | false |
| onChange | Called when select an option or input value change, or value of input is changed | function(value, label) | - |
| onSelect | Called when a option is selected. param is option's value and option instance. | function(value, option) | - |
| disabled | Whether disabled select | boolean | false |
| placeholder | placeholder of input | string | - |
| children (for dataSource) | Data source for autocomplet | React.ReactElement<OptionProps> / Array<React.ReactElement<OptionProps>> | - |
| children (for customize input element) | customize input element | HTMLInputElement / HTMLTextAreaElement / React.ReactElement<InputProps> | `<Input />` |

View File

@@ -1,5 +1,7 @@
import React from 'react';
import Select, { OptionProps, OptGroupProps } from '../select';
import { findDOMNode } from 'react-dom';
import Select, { AbstractSelectProps, OptionProps, OptGroupProps } from '../select';
import Input from '../input';
import { Option, OptGroup } from 'rc-select';
import classNames from 'classnames';
@@ -11,21 +13,45 @@ export interface SelectedValue {
export interface DataSourceItemObject { value: string; text: string; };
export type DataSourceItemType = string | DataSourceItemObject;
export interface AutoCompleteProps {
export interface InputProps {
onChange?: React.FormEventHandler<any>;
value: any;
}
export type ValidInputElement =
HTMLInputElement |
HTMLTextAreaElement |
React.ReactElement<InputProps>;
export interface AutoCompleteProps extends AbstractSelectProps {
size?: 'large' | 'small' | 'default';
className?: string;
notFoundContent?: Element;
dataSource: DataSourceItemType[];
prefixCls?: string;
transitionName?: string;
optionLabelProp?: string;
choiceTransitionName?: string;
showSearch?: boolean;
defaultValue?: string | Array<any> | SelectedValue | Array<SelectedValue>;
value?: string | Array<any> | SelectedValue | Array<SelectedValue>;
allowClear?: boolean;
onChange?: (value: string | Array<any> | SelectedValue | Array<SelectedValue>) => void;
onSelect?: (value: string | Array<any> | SelectedValue | Array<SelectedValue>, option: Object) => any;
disabled?: boolean;
children: ValidInputElement |
React.ReactElement<OptionProps> |
Array<React.ReactElement<OptionProps>>;
}
class InputElement extends React.Component<any, any> {
private ele: Element;
focus = () => {
(findDOMNode(this.ele) as HTMLInputElement).focus();
}
blur = () => {
(findDOMNode(this.ele) as HTMLInputElement).blur();
}
render() {
return React.cloneElement(this.props.children, {
...this.props,
ref: ele => this.ele = ele,
}, null);
}
}
export default class AutoComplete extends React.Component<AutoCompleteProps, any> {
@@ -44,6 +70,14 @@ export default class AutoComplete extends React.Component<AutoCompleteProps, any
antLocale: React.PropTypes.object,
};
getInputElement = () => {
const { children } = this.props;
const element = children && React.isValidElement(children) && children.type !== Option ?
React.Children.only(this.props.children) :
<Input/>;
return <InputElement className="ant-input">{element}</InputElement>;
}
render() {
let {
size, className = '', notFoundContent, prefixCls, optionLabelProp, dataSource, children,
@@ -54,29 +88,42 @@ export default class AutoComplete extends React.Component<AutoCompleteProps, any
[`${prefixCls}-sm`]: size === 'small',
[className]: !!className,
[`${prefixCls}-show-search`]: true,
[`${prefixCls}-auto-complete`]: true,
});
const options = children || (dataSource ? dataSource.map((item) => {
switch (typeof item) {
case 'string':
return <Option key={item}>{item}</Option>;
case 'object':
return (
<Option key={(item as DataSourceItemObject).value}>
{(item as DataSourceItemObject).text}
</Option>
);
default:
throw new Error('AutoComplete[dataSource] only supports type `string[] | Object[]`.');
}
}) : []);
let options;
const childArray = React.Children.toArray(children);
if (childArray.length && (childArray[0] as React.ReactElement<any>).type === Option) {
options = children;
} else {
options = dataSource ? dataSource.map((item) => {
if (React.isValidElement(item)) {
return item;
}
switch (typeof item) {
case 'string':
return <Option key={item}>{item}</Option>;
case 'object':
return (
<Option key={(item as DataSourceItemObject).value}>
{(item as DataSourceItemObject).text}
</Option>
);
default:
throw new Error('AutoComplete[dataSource] only supports type `string[] | Object[]`.');
}
}) : [];
}
return (
<Select {...this.props}
<Select
{...this.props}
className={cls}
optionLabelProp={optionLabelProp}
combobox
notFoundContent={notFoundContent} >
getInputElement={this.getInputElement}
notFoundContent={notFoundContent}
>
{options}
</Select>
);

View File

@@ -1,7 +1,7 @@
---
category: Components
subtitle: 自动完成
type: Form Controls
type: Data Entry
cols: 1
title: AutoComplete
---
@@ -18,14 +18,18 @@ title: AutoComplete
const dataSource = ['12345', '23456', '34567'];
<AutoComplete dataSource={dataSource} />
```
因为 `AutoComplete` 是基于 `Select` 封装的,所以除了以下 API 外,`AutoComplete``Select` 拥有一样的 API。
| 参数 | 说明 | 类型 | 默认值 |
|----------------|----------------------------------|------------|---------|
| dataSource | 自动完成的数据源 | Array | |
| value | 指定当前选中的条目 | String/Array<String>/{key: String, label: React.Node}/Array<{key, label}> | 无 |
| defaultValue | 指定默认选中的条目 | String/Array<String>/{key: String, label: React.Node}/Array<{key, label}> | 无 |
| dataSource | 自动完成的数据源 | [DataSourceItemType](https://git.io/vMMKF)[] | |
| value | 指定当前选中的条目 | string\|string[]\|{ key: string, label: string\|ReactNode }\|Array<{ key: string, label: string\|ReactNode }> | 无 |
| defaultValue | 指定默认选中的条目 | string\|string[]\|{ key: string, label: string\|ReactNode }\|Array<{ key: string, label: string\|ReactNode}> | 无 |
| allowClear | 支持清除, 单选模式有效 | boolean | false |
| onChange | 选中 option或 input 的 value 变化时,调用此函数 | function(value) | 无 |
| onSelect | 被选中时调用,参数为选中项的 value 值 | function(value, option) | 无 |
| disabled | 是否禁用 | boolean | false |
| placeholder | 输入框提示 | string | - |
| children (自动完成的数据源) | 自动完成的数据源 | React.ReactElement<OptionProps> / Array<React.ReactElement<OptionProps>> | - |
| children (自定义输入框) | 自定义输入框 | HTMLInputElement / HTMLTextAreaElement / React.ReactElement<InputProps> | `<Input />` |
| optionLabelProp | 回填到选择框的 Option 的属性值,默认是 Option 的子元素。比如在子元素需要高亮效果时,此值可以设为 `value`。 | string | `children` |

View File

@@ -0,0 +1,65 @@
@import "../../style/themes/default";
@import "../../style/mixins/index";
@import "../../input/style/mixin";
@input-prefix-cls: ~"@{ant-prefix}-input";
@select-prefix-cls: ~"@{ant-prefix}-select";
@autocomplete-prefix-cls: ~"@{select-prefix-cls}-auto-complete";
.@{autocomplete-prefix-cls} {
&.@{select-prefix-cls} {
.@{select-prefix-cls} {
&-search--inline {
position: relative;
}
&-selection {
border: 0;
&--single {
height: auto;
}
&__rendered {
margin-left: 0;
margin-right: 0;
line-height: 0;
}
&__placeholder {
margin-left: 8px;
margin-right: 8px;
top: @input-height-base / 2;
}
}
}
.@{input-prefix-cls} {
.input();
background: transparent;
}
&-lg {
.@{select-prefix-cls}-selection__placeholder {
top: @input-height-lg / 2;
}
.@{input-prefix-cls} {
.input-lg();
}
}
&-sm {
.@{select-prefix-cls}-selection__placeholder {
top: @input-height-sm / 2;
}
.@{input-prefix-cls} {
.input-sm();
}
}
.@{input-prefix-cls} {
border: @border-width-base @border-style-base @border-color-base;
&:focus,
&:hover {
.hover;
}
}
}
}

View File

@@ -0,0 +1,21 @@
exports[`test renders ./components/back-top/demo/basic.md correctly 1`] = `
<div>
Scroll down to see the bottom-right
<strong
style="color:rgba(64, 64, 64, 0.6);">
gray
</strong>
button.
</div>
`;
exports[`test renders ./components/back-top/demo/custom.md correctly 1`] = `
<div>
Scroll down to see the bottom-right
<strong
style="color:#57c5f7;">
blue
</strong>
button.
</div>
`;

View File

@@ -0,0 +1,3 @@
import demoTest from '../../../tests/shared/demoTest';
demoTest('back-top');

View File

@@ -13,13 +13,16 @@ title:
The most basic usage.
````jsx
````__react
import { BackTop } from 'antd';
ReactDOM.render(
<div>
<BackTop />
Scroll down to see the bottom right gray button.
</div>
, mountNode);
Scroll down to see the bottom-right
<strong style={{ color: 'rgba(64, 64, 64, 0.6)' }}> gray </strong>
button.
</div>,
mountNode
);
````

View File

@@ -14,26 +14,34 @@ title:
You can customize the style of the button, just note the size limit: no more than `40px * 40px`.
````jsx
````__react
import { BackTop } from 'antd';
const style = {
height: 40,
width: 40,
lineHeight: '40px',
borderRadius: 4,
backgroundColor: '#57c5f7',
color: '#fff',
textAlign: 'center',
fontSize: 20,
};
ReactDOM.render(
<div>
<BackTop style={{ bottom: 100 }}>
<div style={style}>UP</div>
<BackTop>
<div className="ant-back-top-inner">UP</div>
</BackTop>
Scroll down to see the bottom right blue button.
</div>
, mountNode);
Scroll down to see the bottom-right
<strong style={{ color: '#57c5f7' }}> blue </strong>
button.
</div>,
mountNode
);
````
````css
#components-back-top-demo-custom .ant-back-top {
bottom: 100px;
}
#components-back-top-demo-custom .ant-back-top-inner {
height: 40px;
width: 40px;
line-height: 40px;
border-radius: 4px;
background-color: #57c5f7;
color: #fff;
text-align: center;
font-size: 20px;
}
````

View File

@@ -1,6 +1,6 @@
---
category: Components
type: Other
type: Navigation
title: BackTop
---
@@ -20,6 +20,6 @@ title: BackTop
Property | Description | Type | Default
-----|-----|-----|------
visibilityHeight | the `BackTop` button will not show until the scroll height reaches this value | Number | 400
visibilityHeight | the `BackTop` button will not show until the scroll height reaches this value | number | 400
onClick | a callback function, which can be executed when you click the button | Function | -

View File

@@ -99,10 +99,7 @@ export default class BackTop extends React.Component<BackTopProps, any> {
render() {
const { prefixCls = 'ant-back-top', className = '', children } = this.props;
const classString = classNames({
[prefixCls]: true,
[className]: !!className,
});
const classString = classNames(prefixCls, className);
const defaultElement = (
<div className={`${prefixCls}-content`}>
@@ -118,15 +115,15 @@ export default class BackTop extends React.Component<BackTopProps, any> {
'visibilityHeight',
]);
const backTopBtn = this.state.visible ? (
<div {...divProps} className={classString} onClick={this.scrollToTop}>
{children || defaultElement}
</div>
) : null;
return (
<Animate component="" transitionName="fade">
{
this.state.visible ?
<div {...divProps} className={classString} onClick={this.scrollToTop}>
{children || defaultElement}
</div>
: null
}
{backTopBtn}
</Animate>
);
}

View File

@@ -1,6 +1,6 @@
---
category: Components
type: Other
type: Navigation
subtitle: 回到顶部
title: BackTop
---
@@ -20,5 +20,5 @@ title: BackTop
| 参数 | 说明 | 类型 | 默认值 |
|-------------|----------------|--------------------|--------------|
| visibilityHeight | 滚动高度达到此参数值才出现 `BackTop` | Number | 400 |
| visibilityHeight | 滚动高度达到此参数值才出现 `BackTop` | number | 400 |
| onClick | 点击按钮的回调函数 | Function | - |

View File

@@ -1,6 +1,6 @@
import React from 'react';
import { createElement, Component } from 'react';
import {findDOMNode} from 'react-dom';
import { findDOMNode } from 'react-dom';
import isCssAnimationSupported from '../_util/isCssAnimationSupported';
import assign from 'object-assign';
import omit from 'omit.js';
@@ -19,8 +19,7 @@ export interface ScrollNumberProps {
count?: string | number;
component?: string;
onAnimated?: Function;
height?: number;
style: React.CSSProperties;
style?: React.CSSProperties;
}
export default class ScrollNumber extends Component<ScrollNumberProps, any> {
@@ -29,7 +28,6 @@ export default class ScrollNumber extends Component<ScrollNumberProps, any> {
count: null,
onAnimated() {
},
height: 18,
};
lastCount: any;
@@ -105,16 +103,14 @@ export default class ScrollNumber extends Component<ScrollNumberProps, any> {
renderCurrentNumber(num, i) {
const position = this.getPositionByNum(num, i);
const height = this.props.height;
const removeTransition = this.state.animateStarted ||
(getNumberArray(this.lastCount)[i] === undefined);
return createElement('span', {
className: `${this.props.prefixCls}-only`,
style: {
transition: removeTransition && 'none',
WebkitTransform: `translateY(${-position * height}px)`,
transform: `translateY(${-position * height}px)`,
height,
WebkitTransform: `translateY(${-position * 100}%)`,
transform: `translateY(${-position * 100}%)`,
},
key: i,
}, this.renderNumberList(position));
@@ -139,6 +135,12 @@ export default class ScrollNumber extends Component<ScrollNumberProps, any> {
]), {
className: `${this.props.prefixCls} ${this.props.className}`,
});
// allow specify the border
// mock border-color by box-shadow for compatible with old usage:
// <Badge count={4} style={{ backgroundColor: '#fff', color: '#999', borderColor: '#d9d9d9' }} />
if (props.style && props.style.borderColor) {
props.style.boxShadow = `0 0 0 1px ${props.style.borderColor} inset`;
}
return createElement(
this.props.component || 'sup',
props,

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
import demoTest from '../../../tests/shared/demoTest';
demoTest('badge');

View File

@@ -1,27 +0,0 @@
---
order: 1
title:
zh-CN: 大数字
en-US: Overflowed count
---
## zh-CN
超过 99 的会显示为 `99+`
## en-US
`99+` is displayed when count is larger than `99`.
````jsx
import { Badge } from 'antd';
ReactDOM.render(<div>
<Badge count={99}>
<a href="#" className="head-example" />
</Badge>
<Badge count={200}>
<a href="#" className="head-example" />
</Badge>
</div>, mountNode);
````

View File

@@ -13,7 +13,7 @@ title:
Simplest Usage.
````jsx
````__react
import { Badge } from 'antd';
ReactDOM.render(
@@ -23,7 +23,7 @@ ReactDOM.render(
, mountNode);
````
````css
<style>
.ant-badge:not(.ant-badge-status) {
margin-right: 16px;
}
@@ -34,4 +34,4 @@ ReactDOM.render(
background: #eee;
display: inline-block;
}
````
</style>

View File

@@ -13,8 +13,8 @@ title:
The count will be animated as it changes.
````jsx
import { Badge, Button, Icon } from 'antd';
````__react
import { Badge, Button, Icon, Switch } from 'antd';
const ButtonGroup = Button.Group;
const Test = React.createClass({
@@ -35,39 +35,35 @@ const Test = React.createClass({
}
this.setState({ count });
},
onClick() {
this.setState({
show: !this.state.show,
});
onChange(show) {
this.setState({ show });
},
render() {
return (
<div>
<Badge count={this.state.count}>
<a href="#" className="head-example" />
</Badge>
<Badge dot={this.state.show}>
<a href="#" className="head-example" />
</Badge>
<div style={{ marginTop: 10 }}>
<div>
<Badge count={this.state.count}>
<a href="#" className="head-example" />
</Badge>
<ButtonGroup>
<Button type="ghost" onClick={this.decline}>
<Button onClick={this.decline}>
<Icon type="minus" />
</Button>
<Button type="ghost" onClick={this.increase}>
<Button onClick={this.increase}>
<Icon type="plus" />
</Button>
</ButtonGroup>
<Button type="ghost" onClick={this.onClick} style={{ marginLeft: 8 }}>
Switch state
</Button>
</div>
<div style={{ marginTop: 10 }}>
<Badge dot={this.state.show}>
<a href="#" className="head-example" />
</Badge>
<Switch onChange={this.onChange} />
</div>
</div>
);
},
});
ReactDOM.render(
<Test />
, mountNode);
ReactDOM.render(<Test />, mountNode);
````

View File

@@ -13,7 +13,7 @@ title:
This will simply display a red badge, without a specific count.
````jsx
````__react
import { Badge, Icon } from 'antd';
ReactDOM.render(<div>

View File

@@ -1,5 +1,5 @@
---
order: 2
order: 3
title:
zh-CN: 可点击
en-US: Clickable
@@ -13,7 +13,7 @@ title:
The badge can be wrapped with `a` tag to make it linkable.
````jsx
````__react
import { Badge } from 'antd';
ReactDOM.render(

View File

@@ -1,5 +1,5 @@
---
order: 0
order: 1
title:
zh-CN: 独立使用
en-US: Standalone
@@ -15,12 +15,12 @@ title:
Used in standalone when children is empty.
````jsx
````__react
import { Badge } from 'antd';
ReactDOM.render(<div>
<Badge count={25} />
<Badge count={4} style={{ backgroundColor: '#fff', color: '#999', borderColor: '#d9d9d9' }} />
<Badge count={4} style={{ backgroundColor: '#fff', color: '#999', boxShadow: '0 0 0 1px #d9d9d9 inset' }} />
<Badge count={109} style={{ backgroundColor: '#87d068' }} />
</div>, mountNode);
````

View File

@@ -1,22 +1,28 @@
---
order: 6
order: 2
title:
zh-CN: 封顶数字
en-US: Customized overflow count
en-US: Overflow Count
---
## zh-CN
超过 `overflowCount` 的会显示为 `${overflowCount}+`
超过 `overflowCount` 的会显示为 `${overflowCount}+`,默认的 `overflowCount``99`
## en-US
`${overflowCount}+` is displayed when count is larger than `overflowCount`.
`${overflowCount}+` is displayed when count is larger than `overflowCount`. The default value of `overflowCount` is `99`.
````jsx
````__react
import { Badge } from 'antd';
ReactDOM.render(<div>
<Badge count={99}>
<a href="#" className="head-example" />
</Badge>
<Badge count={100}>
<a href="#" className="head-example" />
</Badge>
<Badge count={99} overflowCount={10}>
<a href="#" className="head-example" />
</Badge>

View File

@@ -1,5 +1,5 @@
---
order: 7
order: 6
title:
zh-CN: 状态点
en-US: Status
@@ -13,7 +13,7 @@ title:
Standalone badge with status.
````jsx
````__react
import { Badge } from 'antd';
ReactDOM.render(

View File

@@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Data Display
title: Badge
---
@@ -25,8 +25,8 @@ Badge normally appears in proximity to notification or head picture with eye-cat
| Property | Description | Type | Default |
|----------------|-------------------------|------------|---------|
| count | Number to show in badge | Number | |
| overflowCount | Max count to show | Number | 99 |
| dot | whether to show red dot without number | Boolean | false |
| count | Number to show in badge | number | |
| overflowCount | Max count to show | number | 99 |
| dot | Whether to show red dot without number | boolean | false |
| status | Set Badge as a status dot | Enum{ 'success', 'processing, 'default', 'error', 'warning' } | '' |
| text | If `status` is set, `text` is to set the text of status dot | String | '' |
| text | If `status` is set, `text` is to set the text of status dot | string | '' |

View File

@@ -2,8 +2,7 @@ import React from 'react';
import Animate from 'rc-animate';
import ScrollNumber from './ScrollNumber';
import classNames from 'classnames';
import warning from 'warning';
import splitObject from '../_util/splitObject';
import warning from '../_util/warning';
export interface BadgeProps {
/** Number to show in badge */
@@ -37,30 +36,21 @@ export default class Badge extends React.Component<BadgeProps, any> {
};
render() {
let [{
count, prefixCls, overflowCount, className, style, children, dot, status, text,
}, restProps] = splitObject(
this.props,
['count', 'prefixCls', 'overflowCount', 'className', 'style', 'children', 'dot', 'status', 'text']
);
const { count, prefixCls, overflowCount, className, style, children, dot, status, text, ...restProps } = this.props;
const isDot = dot || status;
count = count > overflowCount ? `${overflowCount}+` : count;
let displayCount = count > overflowCount ? `${overflowCount}+` : count;
// dot mode don't need count
if (isDot) {
count = '';
displayCount = '';
}
// null undefined "" "0" 0
const hidden = (!count || count === '0') && !isDot;
const hidden = (!displayCount || displayCount === '0') && !isDot;
const scrollNumberCls = classNames({
[`${prefixCls}-dot`]: isDot,
[`${prefixCls}-count`]: !isDot,
});
const badgeCls = classNames({
[className]: !!className,
[prefixCls]: true,
const badgeCls = classNames(className, prefixCls, {
[`${prefixCls}-status`]: !!status,
[`${prefixCls}-not-a-wrapper`]: !children,
});
@@ -83,29 +73,31 @@ export default class Badge extends React.Component<BadgeProps, any> {
);
}
const scrollNumber = hidden ? null : (
<ScrollNumber
data-show={!hidden}
className={scrollNumberCls}
count={displayCount}
style={style}
/>
);
const statusText = (hidden || !text) ? null : (
<span className={`${prefixCls}-status-text`}>{text}</span>
);
return (
<span {...restProps} className={badgeCls} title={count}>
<span {...restProps} className={badgeCls} title={count as string}>
{children}
<Animate
component=""
showProp="data-show"
transitionName={`${prefixCls}-zoom`}
transitionName={children ? `${prefixCls}-zoom` : ''}
transitionAppear
>
{
hidden ? null :
<ScrollNumber
data-show={!hidden}
className={scrollNumberCls}
count={count}
style={style}
/>
}
{scrollNumber}
</Animate>
{
hidden || !text ? null :
<span className={`${prefixCls}-status-text`}>{text}</span>
}
{statusText}
</span>
);
}

View File

@@ -1,7 +1,7 @@
---
category: Components
subtitle: 徽标数
type: Views
type: Data Display
title: Badge
---
@@ -26,8 +26,8 @@ title: Badge
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|----------------|----------------------------------|------------|---------|--------|
| count | 展示的数字,大于 overflowCount 时显示为 `${overflowCount}+`,为 0 时隐藏 | Number | | |
| overflowCount | 展示封顶的数字值 | Number | | 99 |
| dot | 不展示数字,只有一个小红点 | Boolean | | false |
| count | 展示的数字,大于 overflowCount 时显示为 `${overflowCount}+`,为 0 时隐藏 | number | | |
| overflowCount | 展示封顶的数字值 | number | | 99 |
| dot | 不展示数字,只有一个小红点 | boolean | | false |
| status | 设置 Badge 为状态点 | Enum | 'success'、'processing'、'default'、'error'、'warning' | '' |
| text | 在设置了 `status` 的前提下有效,设置状态点的文本 | String | | '' |
| text | 在设置了 `status` 的前提下有效,设置状态点的文本 | string | | '' |

View File

@@ -12,20 +12,18 @@
&-count {
position: absolute;
transform: translateX(-50%);
top: -10px;
height: 20px;
border-radius: 10px;
min-width: 20px;
background: @error-color;
border: 1px solid transparent;
top: -@badge-height / 2;
height: @badge-height;
border-radius: @badge-height / 2;
min-width: @badge-height;
background: @highlight-color;
color: #fff;
line-height: 18px;
line-height: @badge-height;
text-align: center;
padding: 0 6px;
font-size: 12px;
font-size: @font-size-base;
white-space: nowrap;
transform-origin: -10% center;
z-index: 10;
font-family: tahoma;
box-shadow: 0 0 0 1px #fff;
a,
@@ -37,12 +35,12 @@
&-dot {
position: absolute;
transform: translateX(-50%);
transform-origin: 0px center;
top: -4px;
height: 8px;
width: 8px;
transform-origin: 0 center;
top: -@badge-dot-size / 2;
height: @badge-dot-size;
width: @badge-dot-size;
border-radius: 100%;
background: @error-color;
background: @highlight-color;
z-index: 10;
box-shadow: 0 0 0 1px #fff;
}
@@ -109,20 +107,15 @@
}
}
a & {
&-count:hover {
background: tint(@error-color, 20%);
}
&-count:active {
background: shade(@error-color, 5%);
}
}
.@{number-prefix-cls} {
overflow: hidden;
&-only {
display: inline-block;
transition: transform .3s @ease-in-out;
height: @badge-height;
> p {
height: @badge-height;
}
}
// for IE8/9 display
&.not-support-css-animation &-only {

View File

@@ -1,15 +1,17 @@
import React from 'react';
import { cloneElement } from 'react';
import warning from 'warning';
import warning from '../_util/warning';
import BreadcrumbItem from './BreadcrumbItem';
import classNames from 'classnames';
export interface BreadcrumbProps {
prefixCls?: string;
routes?: Array<any>;
params?: Object;
separator?: string | React.ReactNode;
separator?: React.ReactNode;
itemRender?: (route: any, params: any, routes: Array<any>, paths: Array<string>) => React.ReactNode;
style?: React.CSSProperties;
className?: string;
};
function getBreadcrumbName(route, params) {
@@ -42,28 +44,28 @@ export default class Breadcrumb extends React.Component<BreadcrumbProps, any> {
static propTypes = {
prefixCls: React.PropTypes.string,
separator: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.element,
]),
separator: React.PropTypes.node,
routes: React.PropTypes.array,
params: React.PropTypes.object,
linkRender: React.PropTypes.func,
nameRender: React.PropTypes.func,
};
constructor(props) {
super();
componentDidMount() {
const props = this.props;
warning(
!('linkRender' in props || 'nameRender' in props),
'`linkRender` and `nameRender` are removed, please use `itemRender` instead.'
'`linkRender` and `nameRender` are removed, please use `itemRender` instead, ' +
'see: http://u.ant.design/item-render.'
);
}
render() {
let crumbs;
const { separator, prefixCls, routes, params = {}, children, itemRender = defaultItemRender } = this.props;
const {
separator, prefixCls, style, className, routes, params = {},
children, itemRender = defaultItemRender,
} = this.props;
if (routes && routes.length > 0) {
const paths: string[] = [];
crumbs = routes.map((route) => {
@@ -86,6 +88,10 @@ export default class Breadcrumb extends React.Component<BreadcrumbProps, any> {
});
} else if (children) {
crumbs = React.Children.map(children, (element: any, index) => {
warning(
element && element.type.__ANT_BREADCRUMB_ITEM,
'Breadcrumb only accetps Breadcrumb.Item as it\'s children'
);
return cloneElement(element, {
separator,
key: index,
@@ -93,7 +99,7 @@ export default class Breadcrumb extends React.Component<BreadcrumbProps, any> {
});
}
return (
<div className={prefixCls}>
<div className={classNames(className, prefixCls)} style={style}>
{crumbs}
</div>
);

View File

@@ -1,30 +1,31 @@
import React from 'react';
import splitObject from '../_util/splitObject';
import { PropTypes } from 'react';
export interface BreadcrumbItemProps {
prefixCls?: string;
separator?: React.ReactNode;
href?: string;
}
export default class BreadcrumbItem extends React.Component<BreadcrumbItemProps, any> {
static __ANT_BREADCRUMB_ITEM = true;
static defaultProps = {
prefixCls: 'ant-breadcrumb',
separator: '/',
};
static propTypes = {
prefixCls: React.PropTypes.string,
separator: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.element,
prefixCls: PropTypes.string,
separator: PropTypes.oneOfType([
PropTypes.string,
PropTypes.element,
]),
href: React.PropTypes.string,
href: PropTypes.string,
};
render() {
const [{ prefixCls, separator, children }, restProps] = splitObject(
this.props, ['prefixCls', 'separator', 'children']
);
const { prefixCls, separator, children, ...restProps } = this.props;
let link;
if ('href' in this.props) {
link = <a className={`${prefixCls}-link`} {...restProps}>{children}</a>;

View File

@@ -0,0 +1,21 @@
import React from 'react';
import { mount } from 'enzyme';
import Breadcrumb from '../Breadcrumb';
describe('Breadcrumb', () => {
it('warns on non-Breadcrumb.Item children', () => {
const MyCom = () => <div>foo</div>;
spyOn(console, 'error');
mount(
<Breadcrumb>
<MyCom />
</Breadcrumb>
);
// eslint-disable-next-line
expect(console.error.calls.count()).toBe(1);
// eslint-disable-next-line
expect(console.error.calls.argsFor(0)[0]).toContain(
'Breadcrumb only accetps Breadcrumb.Item as it\'s children'
);
});
});

View File

@@ -0,0 +1,185 @@
exports[`test renders ./components/breadcrumb/demo/basic.md correctly 1`] = `
<div
class="ant-breadcrumb">
<span>
<span
class="ant-breadcrumb-link">
Home
</span>
<span
class="ant-breadcrumb-separator">
/
</span>
</span>
<span>
<span
class="ant-breadcrumb-link">
<a
href="">
Application Center
</a>
</span>
<span
class="ant-breadcrumb-separator">
/
</span>
</span>
<span>
<span
class="ant-breadcrumb-link">
<a
href="">
Application List
</a>
</span>
<span
class="ant-breadcrumb-separator">
/
</span>
</span>
<span>
<span
class="ant-breadcrumb-link">
An Application
</span>
<span
class="ant-breadcrumb-separator">
/
</span>
</span>
</div>
`;
exports[`test renders ./components/breadcrumb/demo/router.md correctly 1`] = `
<div>
<div
class="demo-nav">
<a
href="#/">
Home
</a>
<a
href="#/apps">
Application List
</a>
</div>
Home Page
<div
class="ant-alert ant-alert-info ant-alert-no-icon"
data-show="true"
style="margin:16px 0;">
<span
class="ant-alert-message">
Click the navigation above to switch:
</span>
<span
class="ant-alert-description" />
</div>
<div
class="ant-breadcrumb">
<span>
<span
class="ant-breadcrumb-link">
<span>
Home
</span>
</span>
<span
class="ant-breadcrumb-separator">
/
</span>
</span>
</div>
</div>
`;
exports[`test renders ./components/breadcrumb/demo/separator.md correctly 1`] = `
<div
class="ant-breadcrumb">
<span>
<span
class="ant-breadcrumb-link">
Home
</span>
<span
class="ant-breadcrumb-separator">
>
</span>
</span>
<span>
<a
class="ant-breadcrumb-link"
href="">
Application Center
</a>
<span
class="ant-breadcrumb-separator">
>
</span>
</span>
<span>
<a
class="ant-breadcrumb-link"
href="">
Application List
</a>
<span
class="ant-breadcrumb-separator">
>
</span>
</span>
<span>
<span
class="ant-breadcrumb-link">
An Application
</span>
<span
class="ant-breadcrumb-separator">
>
</span>
</span>
</div>
`;
exports[`test renders ./components/breadcrumb/demo/withIcon.md correctly 1`] = `
<div
class="ant-breadcrumb">
<span>
<a
class="ant-breadcrumb-link"
href="">
<i
class="anticon anticon-home" />
</a>
<span
class="ant-breadcrumb-separator">
/
</span>
</span>
<span>
<a
class="ant-breadcrumb-link"
href="">
<i
class="anticon anticon-user" />
<span>
Application List
</span>
</a>
<span
class="ant-breadcrumb-separator">
/
</span>
</span>
<span>
<span
class="ant-breadcrumb-link">
Application
</span>
<span
class="ant-breadcrumb-separator">
/
</span>
</span>
</div>
`;

View File

@@ -0,0 +1,12 @@
import { render } from 'enzyme';
import { renderToJson } from 'enzyme-to-json';
import demoTest from '../../../tests/shared/demoTest';
import routerDemo from '../demo/router.md';
demoTest('breadcrumb', { skip: ['router.md'] });
const testMethod = typeof window !== 'undefined' ? test : test.skip;
testMethod('renders ./components/breadcrumb/demo/router.md correctly', () => {
const wrapper = render(routerDemo);
expect(renderToJson(wrapper)).toMatchSnapshot();
});

View File

@@ -13,7 +13,7 @@ title:
The simplest use
````jsx
````__react
import { Breadcrumb } from 'antd';
ReactDOM.render(

View File

@@ -8,15 +8,15 @@ title:
## zh-CN
`react-router@2.x` 进行结合使用。
`react-router@2+` 进行结合使用。
## en-US
Used together with `react-router@2.x`.
Used together with `react-router@2+`.
````jsx
````__react
import { Router, Route, Link, hashHistory } from 'react-router';
import { Breadcrumb } from 'antd';
import { Breadcrumb, Alert } from 'antd';
const Apps = () => (
<ul className="app-list">
@@ -29,24 +29,15 @@ const Apps = () => (
</ul>
);
const Home = props => (
const Home = ({ routes, params, children }) => (
<div>
<div className="demo-nav">
<Link to="/">Home</Link>
<Link to="/apps">Application List</Link>
</div>
{props.children || 'Home'}
<div
style={{
marginBottom: 15,
marginTop: 15,
paddingBottom: 15,
borderBottom: '1px dashed #ccc',
}}
>
Click the navigation above to switch:
</div>
<Breadcrumb {...props} />
{children || 'Home Page'}
<Alert style={{ margin: '16px 0' }} message="Click the navigation above to switch:" />
<Breadcrumb routes={routes} params={params} />
</div>
);

View File

@@ -13,7 +13,7 @@ title:
The separator can be customized by setting the separator property: separator=">"
````jsx
````__react
import { Breadcrumb } from 'antd';
ReactDOM.render(

Some files were not shown because too many files have changed in this diff Show More