Compare commits

...

986 Commits
0.7.2 ... 0.9.4

Author SHA1 Message Date
afc163
5bcdcc3fce fix 0.9.3 error 2015-11-04 10:59:19 +08:00
afc163
39f8613379 check the React version is available
Conflicts:
	package.json
2015-11-03 11:06:42 +08:00
afc163
2b3c6d6cfb update install antd-bin version 2015-10-27 14:27:02 +08:00
afc163
ac31536e75 update versionsHistory 2015-10-26 17:34:23 +08:00
afc163
1ccd553e17 bump 0.9.2 2015-10-26 17:29:22 +08:00
afc163
4daa815fe4 update document for 0.9.x 2015-10-26 17:12:40 +08:00
afc163
9b5311791e just hide toottip overlay when there is no title
avoid rerender children when title is changed
2015-10-26 16:36:36 +08:00
afc163
11b47aa79b no show toolitp when there is no title 2015-10-25 14:55:45 +08:00
afc163
fbe8454cd1 Merge branch 'master' of github.com:ant-design/ant-design 2015-10-24 15:14:23 +08:00
偏右
b9c7fdaaf9 Merge pull request #426 from Pyiner/master
fix `_target` to `target`
2015-10-23 16:35:55 +08:00
Pyiner
340a1702b6 fix _target to target 2015-10-23 16:31:15 +08:00
afc163
3ffda2c4a1 Fix demo links 2015-10-22 10:30:13 +08:00
afc163
704c8dbacc update 404.html 2015-10-19 19:51:28 +08:00
afc163
16500c9936 404 page 2015-10-19 19:40:38 +08:00
afc163
7e5630f97d Fix key warnings 2015-10-19 19:40:28 +08:00
afc163
1ea1a62d19 fix version select order 2015-10-19 18:04:54 +08:00
afc163
4978cbe914 Add document version switch in footer, #406 2015-10-19 17:57:44 +08:00
Benjy Cui
d12425a11e chore: upgrade react-slick in order to work with React@0.14.x 2015-10-19 15:01:30 +08:00
Benjy Cui
3be9ad0ad0 refactor: joinClasses is removed in React@0.14.x 2015-10-19 15:01:17 +08:00
偏右
27477784ee Merge pull request #407 from coderhaoxin/fix-menu-z-index
fix menu z-index, to be smaller than 1000 (dialog, mask, modal)
2015-10-19 13:54:11 +08:00
haoxin
57ff6037af fix menu z-index, to be smaller than 1000 (dialog, mask, modal) 2015-10-19 13:12:39 +08:00
simaQ
b35a7a9a15 Merge pull request #401 from kevyu/master
fix btn-group mixin bug
2015-10-16 12:01:31 +08:00
Haibin Yu
469231c5e7 fix btn-group mixin bug 2015-10-15 23:36:48 +08:00
afc163
ed7114e25e update modal info 2015-10-15 11:26:07 +08:00
afc163
9ef14500f3 Fix datepicker defaultValue, closes #391 2015-10-14 18:09:28 +08:00
afc163
d1f7fcfecc Fix font spec page style 2015-10-14 16:44:30 +08:00
偏右
8c55c16194 Merge pull request #383 from kevyu/master
fix text-color typo in popover.less
2015-10-14 13:58:19 +08:00
Haibin Yu
3faa1535db fix text-color typo in popover.less 2015-10-14 13:28:37 +08:00
yiminghe
fb43a1b86d fix anim server render 2015-10-13 12:52:41 +08:00
afc163
a085adcf05 Add react to devDeps 2015-10-12 10:20:17 +08:00
afc163
ac3eaaf6ea update stableVersion 2015-10-09 15:42:03 +08:00
afc163
c98c3eef57 bump 0.9.1 2015-09-26 01:00:29 +08:00
afc163
05347da926 not emit fetch when there is no dataSource change, #347 2015-09-26 00:56:15 +08:00
afc163
094ae9bbbf update upload document 2015-09-24 19:43:02 +08:00
afc163
5008844de7 update CHANGELOG 2015-09-24 18:42:16 +08:00
afc163
8384512bf9 0.9.1-beta13 2015-09-24 18:39:07 +08:00
afc163
147b4ac49b Add overlayClassName to popover and tooltip 2015-09-24 18:38:31 +08:00
afc163
b31fe3e1e2 fix select style 2015-09-24 22:16:28 +08:00
afc163
e36c2412a2 fix select text overflow style, close #338 2015-09-24 21:54:19 +08:00
afc163
ecafaa5bdb update CHANGELOG.md 2015-09-24 19:33:29 +08:00
afc163
ab7f72875a Add expand icon background 2015-09-24 19:14:26 +08:00
afc163
752ef0a141 Make chrome transition animation smoothly 2015-09-23 21:37:11 +08:00
afc163
ce2aeb48a8 improve input number handler 2015-09-23 20:48:08 +08:00
afc163
388ecf954c update CHANGELOG.md format 2015-09-23 18:50:51 +08:00
afc163
28c72c1601 remove alert 2015-09-23 15:31:25 +08:00
afc163
8cc42581bb 0.9.1-beta12 2015-09-23 15:28:43 +08:00
afc163
5799633ca2 Move static into site direactory 2015-09-23 15:19:30 +08:00
afc163
52b639faba Should update table data when changing pageSize
fix #317
2015-09-23 14:28:08 +08:00
afc163
74b2c8fcc1 update pagination document 2015-09-23 14:13:31 +08:00
偏右
9700f38a75 Merge pull request #333 from ant-design/pagination
添加 pageSize 发生变化的回调。 #317
2015-09-23 14:12:01 +08:00
Yuwei Ba
a08fa60930 添加 pageSize 发生变化的回调。 #317 2015-09-23 13:58:56 +08:00
afc163
103938d932 Merge branch 'master' of github.com:ant-design/ant-design 2015-09-23 12:38:48 +08:00
afc163
4f77e3c0be update CHANGELOG.md 2015-09-23 12:38:09 +08:00
偏右
ce97d81cc6 Merge pull request #330 from ant-design/fix/328
progress bar style bugfix
2015-09-23 12:04:34 +08:00
唐帅佶
ffd304bf0c progress bar style bugfix 2015-09-23 11:56:38 +08:00
afc163
d809ad2de9 update CHANGELOG.md 2015-09-23 11:45:17 +08:00
afc163
374dca4660 Fix user-select in switch control 2015-09-23 11:44:39 +08:00
afc163
8436a1a108 Fix style of search input in select 2015-09-23 11:42:46 +08:00
afc163
f8b587157d show handler when hover input number control 2015-09-23 11:40:18 +08:00
afc163
abf2bbddf3 expand slider handle area 2015-09-23 11:35:44 +08:00
afc163
8a45fe3357 update select dropdown style 2015-09-23 11:21:36 +08:00
afc163
67735552bb update progress index.md 2015-09-22 20:14:56 +08:00
afc163
73c1d3f595 update progress demo 2015-09-22 20:11:28 +08:00
afc163
047ab6b099 Fix typo 2015-09-22 15:21:30 +08:00
afc163
176adab763 update modal basic demo 2015-09-22 15:11:29 +08:00
afc163
c5cab1d687 Add confirmLoading prop for Modal
You can use `confirmLoading` to cancel button loading status.

```
onOk() {
  ...
  this.setState({
    confirmLoading: false
  });
}
```

Fix #322
2015-09-22 15:06:10 +08:00
afc163
a6eb7413f4 input can not be hidden in IE8, fix #321 2015-09-22 11:17:18 +08:00
afc163
93b2d73a45 upgrade 0.9.1 CHANGELOG 2015-09-22 11:08:52 +08:00
afc163
961b990f07 upgrade rc-upload to 1.6.x 2015-09-21 11:34:14 +08:00
afc163
d8a2325653 fix start link 2015-09-21 10:30:29 +08:00
afc163
6854a83989 get filename 2015-09-20 13:56:14 +08:00
afc163
df4f747b65 bump new beta 2015-09-19 17:38:22 +08:00
afc163
7d82eccb41 update upload list logic 2015-09-19 17:05:41 +08:00
afc163
4343098426 0.9.1-beta7 2015-09-18 23:32:44 +08:00
afc163
6474cb378b Fix upload try logic 2015-09-18 23:31:07 +08:00
afc163
f9064be300 Fix changelog link, close #300 2015-09-18 21:30:46 +08:00
afc163
63fa44867c update badge style 2015-09-18 17:24:14 +08:00
afc163
f752882b44 0.9.1-beta8 2015-09-18 16:02:23 +08:00
afc163
d6a4094bc4 Allow multiple confirm dialogs popup 2015-09-18 16:00:12 +08:00
afc163
388bf241c5 fix #298 2015-09-18 15:03:04 +08:00
afc163
d8ae9003ea Fix iconfont script url 2015-09-17 20:18:14 +08:00
afc163
a9782057f6 Merge branch 'master' of github.com:ant-design/ant-design 2015-09-17 20:07:25 +08:00
afc163
3289ee28eb Fix logo url 2015-09-17 20:05:51 +08:00
yiminghe
7b4bdc8482 fix placeholder 2015-09-17 19:31:52 +08:00
afc163
8db6fc8c78 fix home page 2015-09-17 18:08:47 +08:00
afc163
51f54fdcf7 fix home page 2015-09-17 18:07:50 +08:00
afc163
7fd7130763 Fix demo 2015-09-17 18:05:06 +08:00
afc163
1b39960901 Fix url 2015-09-17 17:37:15 +08:00
afc163
499ab3949c Merge branch 'master' of gitlab.alipay-inc.com:ant-design/ant-design 2015-09-17 17:29:26 +08:00
afc163
a6832508de Fix absolute site url 2015-09-17 17:29:03 +08:00
羽航
f61777d7b5 Merge branch 'master' of github.com:ant-design/ant-design 2015-09-17 16:41:21 +08:00
羽航
2c2919e877 revert. drop "relative" 2015-09-17 16:41:01 +08:00
偏右
e05eb8b5a7 Add si support 2015-09-17 16:40:12 +08:00
afc163
c85f2852e8 update task deploy 2015-09-17 16:37:42 +08:00
羽航
c6f4af3ce4 update rc-steps to v1.3.2 取消iframe方案 2015-09-17 16:18:11 +08:00
羽航
b88cb9e060 取消iframe方案 2015-09-17 16:17:32 +08:00
羽航
05e36a4018 fix little text 2015-09-17 16:16:53 +08:00
羽航
c28034efa7 update rc-steps v1.3.1 使用iframe来监控resize事件。未来不支持ie8后,再过渡到纯css实现。 2015-09-17 14:18:06 +08:00
afc163
95750472a3 0.9.1-beta7 2015-09-16 21:26:04 +08:00
afc163
2106387a64 Fix slider tooltip style 2015-09-16 20:51:01 +08:00
afc163
8dd0c1b02d update message z-index 2015-09-16 20:29:59 +08:00
afc163
181d20e6ff Merge branch 'master' of github.com:ant-design/ant-design 2015-09-16 20:02:51 +08:00
afc163
f266298553 update upload 2015-09-16 20:02:29 +08:00
yiminghe
0435ca60e3 update filterOption 2015-09-16 19:52:09 +08:00
afc163
74d8ecb1fd Fix IE9 file.status problem 2015-09-16 18:48:22 +08:00
afc163
78d15aabbf Fix initial maxDescriptionWidth for vertical steps 2015-09-16 18:23:51 +08:00
afc163
1d31b8e0be 0.9.1-beta5 2015-09-16 18:04:23 +08:00
yiminghe
d7e989f224 Merge branch 'master' of github.com:ant-design/ant-design 2015-09-16 18:01:13 +08:00
yiminghe
e5de88d043 upgrade upload 2015-09-16 18:00:56 +08:00
jljsj
f9db9478a1 remove motion.js conselo 2015-09-16 17:40:37 +08:00
jljsj
ec41d5f30c Merge branch 'master' of github.com:ant-design/ant-design 2015-09-16 17:37:40 +08:00
jljsj
c06e86ccdb update page-transition video 2015-09-16 17:37:28 +08:00
afc163
f96867b640 fix datepicker panel z-index, ref #264 2015-09-16 16:42:24 +08:00
afc163
df76eeb1a6 Merge branch 'master' of github.com:ant-design/ant-design 2015-09-16 16:31:18 +08:00
afc163
e4577eb1bb update steps demos 2015-09-16 16:28:57 +08:00
jljsj
7a415fa4c6 update tag animationName 2015-09-16 16:19:07 +08:00
jljsj
2bea723782 Merge branch 'master' of github.com:ant-design/ant-design 2015-09-16 15:33:37 +08:00
jljsj
2df9914d8b remove easing and page-transition noinstant:true 2015-09-16 15:33:14 +08:00
羽航
be68b6c40c update rc-steps v1.3.0 2015-09-16 15:22:32 +08:00
羽航
89c34ebceb Merge branch 'master' of github.com:ant-design/ant-design 2015-09-16 14:44:15 +08:00
羽航
f4372f3cbf update rc-steps v1.2.5 Steps组件增加current属性,可自动判断当前正在执行状态。 2015-09-16 14:44:03 +08:00
afc163
4c7deda28b fix rc-menu 2015-09-16 12:34:55 +08:00
afc163
4e23745bc0 0.9.1-beta3 2015-09-16 12:19:40 +08:00
afc163
bd1f13efba show current father menu only 2015-09-16 12:18:17 +08:00
afc163
f0d8f5c55c update menu style and version 2015-09-16 11:29:51 +08:00
afc163
8b70091544 Merge branch 'master' of github.com:ant-design/ant-design 2015-09-15 18:16:50 +08:00
afc163
1b032429f8 Fix datepicker panel background overflow 2015-09-15 18:16:34 +08:00
jljsj
af3b98a742 update enetr-animation from.md 2015-09-15 17:55:56 +08:00
jljsj
f4f0605a5f update basic and enter-data demo 2015-09-15 17:52:16 +08:00
jljsj
d42c248780 Merge branch 'master' of github.com:ant-design/ant-design 2015-09-15 17:41:58 +08:00
jljsj
b52b6c8bbf update enter-animation demo 2015-09-15 17:41:34 +08:00
afc163
9603413223 fix enter-animation router demo 2015-09-15 17:36:27 +08:00
afc163
92351b8981 Merge branch 'master' of github.com:ant-design/ant-design 2015-09-15 17:35:30 +08:00
afc163
961a679a9f upgrade to fit react-router@1.0.0-rc1 2015-09-15 17:35:22 +08:00
afc163
55a028ba71 useless file 2015-09-15 16:32:28 +08:00
jljsj
4b320fb1dc 把modal的fade移到fade.less,modal的fade缺少appear导至第一次出来没动画 2015-09-15 16:15:07 +08:00
jljsj
872b215930 update motion animation-name 2015-09-15 15:00:23 +08:00
jljsj
8a8790831a Merge branch 'master' of github.com:ant-design/ant-design 2015-09-15 14:21:01 +08:00
jljsj
a734954c65 update enter-animation index.md 2015-09-15 14:20:45 +08:00
afc163
278880119d 0.9.1-beta2 2015-09-15 13:35:56 +08:00
偏右
2e087f7c1a Merge pull request #287 from zhujun24/master
fixed expand table icon position
2015-09-15 12:46:36 +08:00
zhujun24
a8f0a2b040 fixed expand table icon position 2015-09-15 12:16:43 +08:00
afc163
88108b9fb9 Fix loading icon position in empty table 2015-09-15 11:40:58 +08:00
afc163
2dd307af42 update document 2015-09-15 01:05:14 +08:00
afc163
5a094b90df Fix form element reset style 2015-09-14 20:22:31 +08:00
afc163
9b7401dcbb Merge branch 'master' of github.com:ant-design/ant-design 2015-09-14 19:55:35 +08:00
afc163
4784025149 simple demo 2015-09-14 19:55:09 +08:00
偏右
48e097c8a4 Merge pull request #284 from zhujun24/master
css container warning
2015-09-14 19:32:32 +08:00
羽航
1aebbc147c update rc-steps to v1.2.4.解决vertical类型的steps的宽度问题 2015-09-14 18:54:56 +08:00
zhujun24
9038ebcb11 Merge branch 'master' of github.com:ant-design/ant-design 2015-09-14 18:08:10 +08:00
zhujun24
2883e075f9 css container warning 2015-09-14 18:02:14 +08:00
jljsj
59b0bc8ecd Merge branch 'master' of github.com:ant-design/ant-design 2015-09-14 17:01:55 +08:00
jljsj
f9b816a49e updata enetr-animation use-method 2015-09-14 17:01:35 +08:00
afc163
9c74d28933 fix iconfont page style 2015-09-14 15:19:44 +08:00
afc163
13ebd2d76d Fix pagination in table 2015-09-14 13:38:19 +08:00
afc163
c6aaeb9932 Fix instant progress bar position 2015-09-14 10:36:24 +08:00
afc163
de581aebcb 0.9.1-beta1 2015-09-14 00:53:06 +08:00
afc163
c2b80ddb60 update Changelog 2015-09-14 00:40:44 +08:00
afc163
b2dd01a0e8 bump 0.9.0 2015-09-14 00:37:09 +08:00
afc163
b4c3a01d40 Change dep version 2015-09-14 00:35:38 +08:00
afc163
7b48b4ce6a update CHANGELOG 2015-09-14 00:34:34 +08:00
afc163
fcc8c26166 Add error status for upload file item 2015-09-14 00:28:39 +08:00
偏右
8d6b3be20f Merge pull request #275 from zhujun24/master
fixed flex layout, ref 257
2015-09-14 00:02:18 +08:00
zhujun24
515e294000 fixed flex layout, ref 257 2015-09-13 11:32:42 +08:00
afc163
8c4d3b0618 Remove timeline item min-height 2015-09-12 18:25:38 +08:00
afc163
6b9cceb5a7 Fix checkbox click area 2015-09-12 14:24:48 +08:00
afc163
a6cad348e8 update CHANGELOG 2015-09-12 12:20:00 +08:00
afc163
f1c9421870 update CHANGELOG 2015-09-12 12:18:26 +08:00
偏右
511ab6edd9 Update CHANGELOG.md 2015-09-12 00:27:31 +08:00
afc163
c7efbb6de0 0.9.0-beta10 2015-09-11 22:42:34 +08:00
afc163
6188fc3c70 update index.md 2015-09-11 18:31:59 +08:00
afc163
482090649e update CHANGELOG.md 2015-09-11 18:13:50 +08:00
afc163
26327b4fa3 Fix instant progress bar position 2015-09-11 17:54:52 +08:00
afc163
a1d5030174 rollback blur mask 2015-09-11 17:11:00 +08:00
jljsj
1f5cc32aaa update blur.less 2015-09-11 16:51:20 +08:00
jljsj
a1d9cb310a Merge branch 'master' of github.com:ant-design/ant-design 2015-09-11 16:47:08 +08:00
jljsj
9d5bc12db0 add modal bg blur, remove motion blur 2015-09-11 16:46:28 +08:00
afc163
7830718358 some noinstant link 2015-09-11 15:36:53 +08:00
afc163
e3f34537a1 Merge branch 'master' of github.com:ant-design/ant-design 2015-09-11 15:01:30 +08:00
afc163
b4b3198ad3 update CHANGELOG 2015-09-11 15:01:14 +08:00
偏右
27dc4e333b Merge pull request #249 from ant-design/enterAnimation0.4.0
Enter animation0.4.0
2015-09-11 14:59:49 +08:00
afc163
7d14e69f81 Merge branch 'master' of github.com:ant-design/ant-design 2015-09-11 14:57:43 +08:00
afc163
b4a2fc3524 Add instant, improve site speed 2015-09-11 14:57:32 +08:00
jljsj
3474caac0c add zoom bulr, add motion blur to modal 2015-09-11 14:37:39 +08:00
jljsj
c7fd8285c1 updata slide scale(.8). add zoomBig 2015-09-11 14:02:00 +08:00
jljsj
d3f40e37c5 updata enter-leave show 2015-09-11 13:38:40 +08:00
SimaQ
c5ddeec465 fix: slider 气泡样式问题。 Closes #259 2015-09-11 12:18:54 +08:00
jljsj
365fc535e0 update enter-animation demo 2015-09-11 12:02:08 +08:00
afc163
273b30bff7 Merge branch 'master' of github.com:ant-design/ant-design 2015-09-11 11:30:24 +08:00
jljsj
1fc30ef0c3 updata enter-animation index.md 2015-09-11 11:12:30 +08:00
偏右
ab4fe36dbe Merge pull request #267 from ant-design/beta
add beta
2015-09-11 10:59:49 +08:00
yiminghe
f8ae3cf3b9 add beta 2015-09-11 10:58:16 +08:00
afc163
1c19ad1b6d Merge branch 'master' of github.com:ant-design/ant-design 2015-09-11 10:51:50 +08:00
偏右
14c1d8fe32 Merge pull request #265 from ant-design/publish
fix publish
2015-09-11 10:49:25 +08:00
yiminghe
58b7324ad2 add css 2015-09-11 10:47:18 +08:00
yiminghe
1f0a1b253d clean 2015-09-11 10:46:47 +08:00
yiminghe
7872e14091 clean 2015-09-11 10:46:07 +08:00
yiminghe
cc16da4a9f fix publish 2015-09-11 10:29:26 +08:00
afc163
05eaf52aca 0.9.0-beta9 2015-09-10 22:00:53 +08:00
yiminghe
0fafa86cac upgrade select 2015-09-10 18:12:50 +08:00
jljsj
10ad6e29be update enterAnimation version 2015-09-10 17:03:47 +08:00
jljsj
2e829690d0 update enterAnimation style is object and string 2015-09-10 16:20:24 +08:00
afc163
268da85fcc update select style 2015-09-10 12:27:24 +08:00
afc163
6ca6d1062a 0.9.0-beta8 2015-09-10 12:22:24 +08:00
afc163
c3ffa14ec5 Change expanded row background color 2015-09-10 12:21:41 +08:00
afc163
b4e98f2f1d Merge branch 'master' of github.com:ant-design/ant-design 2015-09-10 12:08:17 +08:00
afc163
3af86e4286 Fix style of super long tag in multiple select 2015-09-10 12:07:58 +08:00
低位
704604435b Merge pull request #258 from zhujun24/master
add expand table
2015-09-10 12:07:29 +08:00
jljsj
d415ed4561 update enterAnimation demo 2015-09-10 11:21:23 +08:00
zhujun24
af6a8d31ee optimize 2015-09-10 11:15:36 +08:00
zhujun24
d589ed251e modify CHANGELOG.md 2015-09-10 11:13:04 +08:00
zhujun24
95465a6794 add expand table 2015-09-10 11:04:31 +08:00
afc163
3b1184c79a update documentation 2015-09-09 22:57:18 +08:00
afc163
32b5035113 update documentation 2015-09-09 22:56:26 +08:00
afc163
d2fac30c7f update upload index.md 2015-09-09 22:41:51 +08:00
afc163
b35f85751b update table api 2015-09-09 22:37:22 +08:00
jljsj
6c2f15241a update enterAnimation version 2015-09-09 17:43:40 +08:00
jljsj
bee8da2f50 update enterAnimation router.md 2015-09-09 17:08:12 +08:00
jljsj
196d2cb9cf updata enterAnimation index.md 2015-09-09 17:01:29 +08:00
jljsj
bfd173ac4e updata enterAnimation router deom text 2015-09-09 15:07:46 +08:00
jljsj
0c18be6556 updata enterAnimation demo text 2015-09-09 15:05:06 +08:00
jljsj
3dbd766c24 updata enterAnimation router.md title 2015-09-09 15:02:37 +08:00
afc163
ea1a9f0a3d Fix multiple upload onChange event 2015-09-09 14:58:17 +08:00
jljsj
9b56e3753d Merge branch 'master' of github.com:ant-design/ant-design into enterAnimation0.4.0 2015-09-09 14:52:36 +08:00
jljsj
a48acc2fab update enterAnimation router add 2015-09-09 14:52:16 +08:00
afc163
47af941dc4 Fix badge image 2015-09-09 10:25:58 +08:00
jljsj
78f298ff4b updata enterAnimation index.md 2015-09-08 18:27:47 +08:00
afc163
4910109789 0.9.0-beta6 2015-09-08 18:26:42 +08:00
afc163
897315784d Fix info.fileList in multiple upload 2015-09-08 18:26:18 +08:00
jljsj
eba40467a4 Merge branch 'master' of github.com:ant-design/ant-design into enterAnimation0.4.0 2015-09-08 18:22:40 +08:00
jljsj
261835e786 update enterAnimation 2015-09-08 18:22:30 +08:00
afc163
5c00b0e66b Fix publish problem 2015-09-08 18:17:15 +08:00
afc163
346337936a update multiple upload demo 2015-09-08 18:05:55 +08:00
afc163
f229f86a75 Fix multiple upload 2015-09-08 17:47:07 +08:00
afc163
1056af34a7 Fix multiple select style 2015-09-08 16:38:19 +08:00
afc163
f0a7167a49 use button[type="button"] to prevent default submit behavior 2015-09-08 16:02:43 +08:00
afc163
9c523bd14f update CHANGELOG 2015-09-08 15:42:48 +08:00
afc163
ff6697b951 Remove build-in message display in Upload component 2015-09-08 15:38:28 +08:00
afc163
6dbb7ba8ba update confirm modal button text 2015-09-08 15:03:02 +08:00
afc163
475f358ccc update style.css 2015-09-08 14:48:16 +08:00
afc163
03a300ff46 update introduce.md 2015-09-08 14:05:03 +08:00
afc163
0ac1f76553 Fix visible state bug in handleCancel 2015-09-08 12:38:21 +08:00
afc163
26a1ce78ab update download.md 2015-09-08 12:15:00 +08:00
afc163
0695a887ef update CHANGELOG 2015-09-08 12:12:21 +08:00
afc163
0a9d641a82 Change RadioGroup display to inline-block 2015-09-08 12:10:48 +08:00
afc163
f785d7b891 antd.confirm() is deprecated, use antd.Modal.confirm() instead 2015-09-08 11:42:10 +08:00
afc163
a63e2f8c0c Remove console.log 2015-09-07 21:48:30 +08:00
jljsj
dec9bc74e5 Merge branch 'master' of github.com:ant-design/ant-design into enterAnimation0.4.0 2015-09-07 18:38:05 +08:00
jljsj
59b1f1c4fa update enter-animation 2015-09-07 18:37:07 +08:00
偏右
4e5c15bab7 Merge pull request #246 from zhujun24/master
continue api position
2015-09-07 15:52:48 +08:00
zhujun24
29638d3d3b rename pending api 2015-09-07 15:26:42 +08:00
afc163
1a3614c72c Fix radio button style 2015-09-07 15:14:57 +08:00
zhujun24
f3bbf778f8 continue api position 2015-09-07 15:13:59 +08:00
afc163
68e44f3080 update demo text 2015-09-07 12:32:31 +08:00
afc163
4eb21ea5bc 0.9.0-beta3 2015-09-07 12:29:23 +08:00
afc163
e786f54c15 update CHANGELOG 2015-09-07 12:28:25 +08:00
afc163
1e5271491e Add loading message 2015-09-07 12:27:09 +08:00
afc163
24b1ad0ca9 fix CHANGELOG link 2015-09-07 11:57:11 +08:00
偏右
478d1e8668 Merge pull request #245 from zhujun24/master
equal height line
2015-09-07 11:51:20 +08:00
afc163
4296d9cf9b update Modal 2015-09-07 11:50:46 +08:00
afc163
75d710a1b8 Add some info type Modal, close #244 2015-09-07 11:48:57 +08:00
zhujun24
2510a68dca equal height line 2015-09-07 11:31:37 +08:00
afc163
579ad01fc5 rollback for reqwest 2015-09-07 11:24:28 +08:00
afc163
5a47594a86 update timeline text 2015-09-07 10:43:48 +08:00
afc163
b25b48b6e5 fix reqwest 2015-09-07 10:20:20 +08:00
afc163
eaad577e79 Fix xhr2 bug, ded/reqwest#207 2015-09-07 10:13:42 +08:00
偏右
f2ef4de9e0 Merge pull request #238 from zhujun24/master
optimize
2015-09-07 10:10:25 +08:00
zhujun24
7d95c56fcf search keyword sort 2015-09-02 20:50:18 +08:00
zhujun24
4a61592ff6 optimize 2015-09-02 12:12:11 +08:00
afc163
a2c8fbe5b2 Fix aside link 2015-09-01 22:37:18 +08:00
afc163
9355052359 update timeline style 2015-09-01 22:20:27 +08:00
afc163
108a469c79 0.9.0-beta2 2015-09-01 22:16:34 +08:00
afc163
ca980bf149 update README.md 2015-09-01 22:15:43 +08:00
afc163
72c4120480 update CHANGELOG, display it in ant.design 2015-09-01 22:13:50 +08:00
afc163
124c33ac0a update CHANGELOG 2015-09-01 21:57:27 +08:00
afc163
409c9d57fd update timeline style 2015-09-01 21:56:26 +08:00
偏右
53a1da5182 Merge pull request #235 from zhujun24/component-timeline
timeline
2015-09-01 21:47:49 +08:00
zhujun24
082104a2ae optimize code 2015-09-01 21:39:29 +08:00
zhujun24
3e3ff021b6 Merge remote-tracking branch 'upstream/master' into component-timeline 2015-09-01 21:15:40 +08:00
zhujun24
018a62886d add timeline 2015-09-01 21:15:31 +08:00
afc163
5516f7866c Fix radio button style 2015-09-01 18:23:46 +08:00
afc163
8ba3dedeec update badge index.md 2015-09-01 17:48:22 +08:00
afc163
c6f75d6be4 Fix whitespace 2015-09-01 17:43:42 +08:00
afc163
058199ed2c update steps 2015-09-01 17:43:08 +08:00
afc163
20ae732f14 update badge style 2015-09-01 17:26:06 +08:00
afc163
034b561948 Fix PropTypes 2015-09-01 17:19:31 +08:00
afc163
3165da4246 update badge 2015-09-01 17:16:51 +08:00
偏右
d60ffeeafe Merge pull request #233 from zhujun24/vertical-steps
restore vertical steps
2015-09-01 16:23:07 +08:00
afc163
691b0147b1 update eslintrc and fix code 2015-09-01 16:19:39 +08:00
zhujun24
f34ed22d1a Merge remote-tracking branch 'upstream/component-timeline' into component-timeline 2015-09-01 15:41:53 +08:00
zhujun24
6f0ba9142e restore vertical steps 2015-09-01 15:30:51 +08:00
afc163
23243844ba update devDeps
fix #231
2015-09-01 15:13:39 +08:00
偏右
96921d1303 Merge pull request #230 from ant-design/upgrade-react-slick
upgrade react-slick to 0.7
2015-09-01 14:46:52 +08:00
sorrycc
8cbd9ae6f9 upgrade react-slick to 0.7 2015-09-01 14:30:24 +08:00
afc163
6ecbed5b53 update CHANGELOG 2015-09-01 14:09:08 +08:00
偏右
598bfc9aad Merge pull request #229 from ant-design/component-badge
Add component badge
2015-09-01 14:07:51 +08:00
afc163
af2425d7d5 Add component badge 2015-09-01 13:59:45 +08:00
afc163
c5be535a3e Add timeline component 2015-09-01 11:47:12 +08:00
afc163
37a9f72c0f Merge branch 'master' of github.com:ant-design/ant-design 2015-09-01 11:36:43 +08:00
yiminghe
b6ec8b9ec1 Merge pull request #226 from ant-design/upload-filelist
重构 Upload API
2015-09-01 11:29:52 +08:00
yiminghe
b4a3d3e4d9 optimize 2015-09-01 11:28:36 +08:00
yiminghe
af30f55e7a optimize 2015-09-01 11:26:33 +08:00
低位
16004a4b7c Merge pull request #227 from zhujun24/vertical-steps
description font-size 12px
2015-09-01 11:22:01 +08:00
zhujun24
dfa34ef999 description font-size 12px 2015-09-01 11:19:59 +08:00
afc163
0c65ab40a7 update Datepicker CHANGELOG 2015-09-01 11:18:54 +08:00
afc163
8b7a2a4dee update steps index.md 2015-09-01 11:16:08 +08:00
偏右
e0f2eb214e Merge pull request #225 from zhujun24/vertical-steps
Vertical steps
2015-09-01 11:06:06 +08:00
afc163
d8384a3791 Fix datepicker can not be set to null 2015-09-01 10:59:12 +08:00
afc163
95f2e82f4e Change version 2015-09-01 01:06:48 +08:00
afc163
5b76d65ee7 update CHANGELOG for Upload 2015-09-01 01:05:55 +08:00
afc163
42708fe45d Refractor upload API
1. Remove limit urlResolver and onRemove
2. Remove onSuccess onProgress onError
3. Add onChange
4. Add fileList and defaultFileList props
2015-09-01 00:55:49 +08:00
afc163
f50342b2ba use onChange 2015-09-01 00:55:49 +08:00
afc163
03cc7cbffa Change variable name 2015-09-01 00:55:48 +08:00
zhujun24
663d3d02fe remove useless style 2015-08-31 20:51:45 +08:00
zhujun24
9a7814396e vertical re-stpes 1.2.1 2015-08-31 20:24:47 +08:00
yiminghe
fbad793d3d upgrade select 2015-08-31 19:41:58 +08:00
afc163
3f693f517e update CHANGELOG 2015-08-31 17:52:45 +08:00
afc163
2c43ee3a09 update CHANGELOG 2015-08-31 17:41:52 +08:00
afc163
f7308fbb48 Replace reqwest via reqwest-without-xhr2
Fork reqwest to https://github.com/ant-design/reqwest,
Remove xhr2 dependency cause it is useless in browser side, it will
cause some bugs in different pack solutions, waiting offcial repo resolve this problem: https://github.com/ded/reqwest/issues/204

ref: #216
2015-08-31 17:31:12 +08:00
afc163
3a5d76ee51 Fix collapse animation 2015-08-31 16:58:27 +08:00
afc163
9dcd2a05ea update datepicker document 2015-08-31 16:45:03 +08:00
afc163
1ef898e92a fix datepicker panel line-height 2015-08-31 16:43:25 +08:00
afc163
bd90c36b1e Merge branch 'master' of github.com:ant-design/ant-design 2015-08-31 16:28:43 +08:00
afc163
55ed5f1cab update site style 2015-08-31 16:28:35 +08:00
chencheng (云谦)
0c40b6af68 typo fix 2015-08-31 16:13:58 +08:00
zhujun24
d720a908a0 Merge remote-tracking branch 'upstream/master' into vertical-steps 2015-08-31 15:16:02 +08:00
afc163
6c8cf955af Merge branch 'master' of github.com:ant-design/ant-design 2015-08-31 13:33:24 +08:00
afc163
cffe0f3ae3 update CHANGELOG 2015-08-31 12:38:26 +08:00
yiminghe
a6d12c39d0 Merge branch 'master' of github.com:ant-design/ant-design 2015-08-31 12:20:20 +08:00
yiminghe
0eb9e95feb revert select style 2015-08-31 12:20:04 +08:00
afc163
5461ec5c89 Merge branch 'master' of github.com:ant-design/ant-design 2015-08-31 12:14:57 +08:00
afc163
938b249261 update CHANGELOG 2015-08-31 12:14:47 +08:00
afc163
e77cca572b Add limit prop for upload 2015-08-31 12:13:55 +08:00
yiminghe
3ec73ec965 fix open animation 2015-08-31 12:10:54 +08:00
afc163
f146c5312a update CHANGELOG 2015-08-31 12:03:20 +08:00
afc163
23fce559b0 Fix autoclose duration 2015-08-29 13:02:37 +08:00
afc163
21f70f8570 update text 2015-08-28 18:47:49 +08:00
afc163
e45fbaad7f empty table should not have pagination 2015-08-28 17:30:37 +08:00
afc163
4c54644116 Add empty style for table 2015-08-28 17:20:02 +08:00
afc163
f101c3231e Add urlResolver, support display remote file url in list
拿到请求回调数据里的远程文件地址,展示在文件列表中方便下载
2015-08-28 16:12:19 +08:00
afc163
cf22c35a1d Merge branch 'master' of github.com:ant-design/ant-design 2015-08-28 15:25:45 +08:00
afc163
90e8296949 Fix table key warning 2015-08-28 15:22:09 +08:00
sorrycc
975c4d784f fix(carousel): fade 效果下不允许拖拽, Close #212 2015-08-28 13:55:36 +08:00
afc163
74b0bb28d1 update demo code 2015-08-28 11:15:53 +08:00
zhujun24
b875855652 modify style 2015-08-28 11:09:10 +08:00
yiminghe
065c16a95f fix download 2015-08-28 10:45:54 +08:00
afc163
11fda3bf07 0.8.1-beta2 2015-08-28 00:12:38 +08:00
afc163
4e89f5002b Fix eslint problems 2015-08-28 00:11:56 +08:00
afc163
6d2dcc4539 allow dataSourse controlled by parent in local mode 2015-08-27 23:55:25 +08:00
afc163
c799326e7f default pagination current page 2015-08-27 23:53:42 +08:00
afc163
9b8abb2199 loading should be in remote mode 2015-08-27 23:52:59 +08:00
yiminghe
30efa794d7 fix download 2015-08-27 17:51:21 +08:00
yiminghe
4a252ab8a8 Merge branch 'master' of github.com:ant-design/ant-design 2015-08-27 17:35:26 +08:00
yiminghe
f9450f14df remove file on file failture 2015-08-27 17:35:10 +08:00
偏右
c704569bfe Merge pull request #213 from chenjiahan/patch-1
percent拼写错误
2015-08-27 16:56:15 +08:00
yiminghe
97ac458507 add res for upload 2015-08-27 16:53:53 +08:00
Neverland
574b6992c4 percent拼写错误 2015-08-27 16:41:30 +08:00
yiminghe
3cc4a374db update docs 2015-08-27 15:57:25 +08:00
yiminghe
c2b4b60267 add onRemove for upload 2015-08-27 15:46:23 +08:00
yiminghe
61bd8abab0 add onRemove for upload 2015-08-27 15:45:38 +08:00
zhujun24
3118ee32e3 optimize code 2015-08-27 14:36:02 +08:00
yiminghe
06aa5877e2 fix children map 2015-08-27 13:34:38 +08:00
zhujun24
8a99d0bc5a add vertical steps 2015-08-27 13:20:31 +08:00
yiminghe
4bf5e4e3f4 fix children map 2015-08-27 13:18:23 +08:00
偏右
5022bfef13 Merge pull request #209 from hanai/patch-1
Update form.less
2015-08-27 12:54:31 +08:00
Hanai
f96f70f685 Update form.less
fix style
2015-08-27 12:48:38 +08:00
jljsj
c83ae1bcfc 修改zoom的缩小点比例 2015-08-27 12:22:49 +08:00
afc163
bdcff2a973 Merge branch 'master' of github.com:ant-design/ant-design 2015-08-27 10:39:25 +08:00
afc163
5987f933f1 typo 2015-08-27 10:39:13 +08:00
偏右
67c6ea9f6d Merge pull request #208 from genie88/dev
fix typo fix #207
2015-08-27 10:20:34 +08:00
genie
33def08f61 fix typo fix #207 2015-08-27 09:34:10 +08:00
偏右
802027a728 Merge pull request #202 from chenxsan/patch-1
fixed typo
2015-08-26 22:16:34 +08:00
afc163
a63ca0febd Fix responsive of site 2015-08-26 22:16:20 +08:00
陈三
97f7be1832 fixed typo 2015-08-26 22:00:48 +08:00
zhujun24
f664275a1e add big vertical steps 2015-08-26 18:28:29 +08:00
偏右
c1ea01b0a6 Merge pull request #201 from Cee/master
Fix documentation format
2015-08-26 17:16:28 +08:00
Cee Cirno
c33461ec1d Remove semicolons 2015-08-26 17:00:15 +08:00
Cee Cirno
1c0cccd7ed Add spacing 2015-08-26 16:58:45 +08:00
afc163
91048da7d7 update started demo 2015-08-26 16:38:55 +08:00
afc163
38cbaf1239 dataSource clone config should not be overwrited by origin config, fix #200 2015-08-26 14:08:46 +08:00
afc163
3a843f3829 update 2015-08-26 11:20:34 +08:00
afc163
461ffdf421 Fix select demo, close #195 2015-08-26 11:09:43 +08:00
afc163
35f64c436e Fix demo, #196 2015-08-26 11:02:13 +08:00
afc163
bdf13797cb update documentation 2015-08-25 20:29:34 +08:00
afc163
328cfadba5 Fix motion documentation 2015-08-25 20:26:06 +08:00
afc163
9591cbb825 update documentation 2015-08-25 20:16:29 +08:00
afc163
c33569e4d1 ref #190 2015-08-25 18:38:34 +08:00
afc163
ed4beaf57c beta1 2015-08-25 17:39:56 +08:00
afc163
859ffdacb1 0.8.1-beta 2015-08-25 17:39:26 +08:00
afc163
19af7309e1 Merge branch '0.8.0' 2015-08-25 17:39:07 +08:00
yiminghe
f79273ce8b update style 2015-08-25 17:33:24 +08:00
yiminghe
109e283e15 add MonthCalendar 2015-08-25 17:33:01 +08:00
偏右
f1fede86d4 Update README.md 2015-08-25 17:17:46 +08:00
afc163
8c2c65adf4 update modal custom.md 2015-08-25 17:08:43 +08:00
afc163
e6d92e37b1 update modal default props 2015-08-25 16:56:08 +08:00
afc163
47bb3d620d update button/index.md 2015-08-25 16:49:27 +08:00
afc163
6f7bf156b8 fix #191 2015-08-25 16:40:02 +08:00
afc163
94c9081c83 default modal width change to 520px 2015-08-25 16:25:08 +08:00
afc163
18bc4994dc 0.8.0 2015-08-25 15:24:06 +08:00
afc163
b3b06273f7 fix typography.md 2015-08-25 15:06:08 +08:00
偏右
114eeaa500 Merge pull request #189 from ant-design/0.8.0
0.8.0
2015-08-25 14:28:27 +08:00
afc163
3456e1122e update object-assign version 2015-08-25 14:25:03 +08:00
afc163
1845bc0633 update index.md 2015-08-25 14:15:46 +08:00
afc163
8527f52f8f Fix safari bug of site 2015-08-25 14:01:41 +08:00
然则
9f340d85e3 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-25 13:20:52 +08:00
然则
408fd5b8b9 up tree version 2015-08-25 13:20:38 +08:00
afc163
375e365263 update style 2015-08-25 12:06:29 +08:00
afc163
e01c653e17 className 2015-08-25 12:01:01 +08:00
afc163
73e11d9165 Update code font family 2015-08-25 11:48:01 +08:00
yiminghe
221fe81221 add open anim 2015-08-25 11:12:13 +08:00
yiminghe
70d04d9d31 add open anim 2015-08-25 11:11:21 +08:00
jljsj
51013a68d9 修改导航收起时没效果 2015-08-25 11:04:44 +08:00
yiminghe
afe77270c6 fix tree anim 2015-08-25 11:03:46 +08:00
afc163
81b41e5015 clean webpack.config.min 2015-08-24 21:27:41 +08:00
afc163
f97e0c6c03 beta7 2015-08-24 21:16:00 +08:00
afc163
820ed5c891 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-24 21:09:59 +08:00
afc163
86c90f0109 只有 dataSource 的变化才能从外面触发新请求
另外,is-equals-shallow 的比较始终是 false,因为 props.columns 是 array
2015-08-24 21:08:00 +08:00
然则
da01d52c6c Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-24 20:21:31 +08:00
然则
af22a48fbb up tree selected style 2015-08-24 20:21:06 +08:00
afc163
217a43f2ad shorter duration 2015-08-24 19:47:20 +08:00
afc163
f48dc8d086 fix safari flash bug 2015-08-24 19:34:31 +08:00
偏右
adb2843df6 Merge pull request #188 from ant-design/new-menu-animation
Add menu animation
2015-08-24 19:25:38 +08:00
afc163
583cd739ef refractor code 2015-08-24 19:21:14 +08:00
jljsj
6b66ad7dbf 去除行效果了 2015-08-24 18:32:06 +08:00
yiminghe
faf7aea2d5 add tree animation 2015-08-24 18:28:00 +08:00
jljsj
c2be1cbf81 Add menu animation 2015-08-24 18:18:46 +08:00
然则
2df2310296 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-24 18:14:02 +08:00
然则
d29a215e74 up tree and add velocity-animate 2015-08-24 18:12:07 +08:00
jljsj
4bca4f9d7a Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-24 18:10:58 +08:00
jljsj
ab00daf330 updata enter-animation style 2015-08-24 18:06:47 +08:00
afc163
65aad17756 update home iconfont 2015-08-24 18:06:30 +08:00
afc163
33c06507b4 Fix enter-animation demo 2015-08-24 18:01:41 +08:00
afc163
d1a0f9ac80 update text 2015-08-24 17:26:42 +08:00
afc163
04cd5ff349 update tree demo 2015-08-24 16:54:42 +08:00
afc163
4008aa92bd Add slider tip animation, #134 2015-08-24 16:43:54 +08:00
afc163
c9b700aed4 Fix overhigh z-index, #186 2015-08-24 16:38:19 +08:00
afc163
d72b68a804 update select dropdown style 2015-08-24 16:09:18 +08:00
afc163
29e5994236 update introduce.md 2015-08-24 16:03:21 +08:00
afc163
018b25bfae update documentation 2015-08-24 15:57:00 +08:00
afc163
ae859acc31 fix #185 typo 2015-08-24 15:36:42 +08:00
afc163
5bfe60771c beta6 2015-08-24 15:13:51 +08:00
afc163
e57773d8c5 It is ok to install xhr2 in browser 2015-08-24 15:02:57 +08:00
afc163
7e6152c5ca update design spec category 2015-08-24 14:35:47 +08:00
afc163
7a01d55b2a Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-24 14:34:33 +08:00
afc163
f75d787f54 Add 0.8.0 Changelog 2015-08-24 14:31:56 +08:00
yiminghe
552b45ab98 revert port 2015-08-24 14:31:43 +08:00
yiminghe
3a0ff5c552 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-24 14:30:19 +08:00
yiminghe
60c1f06bb1 expost calendar 2015-08-24 14:30:08 +08:00
afc163
4897b4d3f5 Add prefix to keyframes 2015-08-24 12:27:13 +08:00
yiminghe
7a6f190e9e upgrade animate 2015-08-24 00:50:22 +08:00
yiminghe
3b3ae23fe2 update animate 2015-08-24 00:31:49 +08:00
偏右
0e6c48387d Merge pull request #184 from ant-design/collapse-compatibility
feat: Collapse兼容ie8和Safari
2015-08-23 16:41:53 +08:00
翰文
9137920f2d feat: Collapse兼容ie8和Safari
closes #138, #161

Conflicts:
	style/components/collapse.less
2015-08-23 16:31:51 +08:00
afc163
4a51421bfa hide notFoundContent when combobox 2015-08-23 16:00:05 +08:00
偏右
4967d9dfef Merge pull request #183 from zhujun24/fix-ie-safari
fixed collapse IE8/Safari
2015-08-23 15:52:39 +08:00
afc163
eaaca383f8 Fix table filter dropdown style 2015-08-23 15:51:45 +08:00
afc163
36030e269b Fix select style 2015-08-23 15:42:38 +08:00
zhujun24
6d959a601b fixed collapse IE8/Safari 2015-08-23 15:33:15 +08:00
afc163
583d885b40 Fix select className 2015-08-23 15:13:21 +08:00
afc163
94a0440f42 Fix iconfont 2015-08-23 14:46:11 +08:00
afc163
97ccc96ab0 update site style 2015-08-22 21:08:18 +08:00
afc163
d7ff80342f update spec/introduce.md 2015-08-22 20:51:10 +08:00
afc163
a2fb1774e7 update site 2015-08-22 20:33:43 +08:00
afc163
e78190cb2e Fix form demo 2015-08-22 20:28:00 +08:00
afc163
dd397f8935 Fix radio group 2015-08-22 20:22:02 +08:00
afc163
fdf19520d6 Add component type 2015-08-22 20:16:24 +08:00
afc163
0e6a587c11 Update size sidebar style 2015-08-22 19:16:35 +08:00
afc163
89407aa12a Change site struction 2015-08-22 19:13:06 +08:00
afc163
51816a9eb4 search select menu style update 2015-08-22 17:24:31 +08:00
afc163
8ac2177bc7 sidebar update 2015-08-22 17:21:47 +08:00
afc163
6905ad697c Remove nodemos meta 2015-08-22 16:36:07 +08:00
afc163
95708254a8 update head nav 2015-08-22 16:33:18 +08:00
afc163
781931721f Remove unused code 2015-08-22 14:46:45 +08:00
afc163
7ae4b4ad76 use global index as upload item key 2015-08-22 14:45:03 +08:00
afc163
a9117da971 Fix autoComplete style 2015-08-22 14:39:05 +08:00
afc163
7909033158 className in select 2015-08-22 14:23:58 +08:00
yiminghe
3795111cff Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-21 23:37:32 +08:00
yiminghe
43e948f815 upgrade dropdown 2015-08-21 23:36:10 +08:00
偏右
f79cf1b482 Merge pull request #181 from ant-design/radio-button
Radio button
2015-08-21 19:21:26 +08:00
afc163
0d33c0d9e4 Add radio button style 2015-08-21 19:16:03 +08:00
afc163
0d33a5fbb4 Add radio button in radio 2015-08-21 18:24:09 +08:00
afc163
e23372b6e8 update upload animation code style 2015-08-21 17:37:54 +08:00
afc163
3a134c7219 Fix tag closing meaning 2015-08-21 17:27:29 +08:00
jljsj
b89c0a5f4c Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-21 17:12:52 +08:00
jljsj
ab09f9e537 add tag and uploadlist motion 2015-08-21 17:12:42 +08:00
afc163
f260b2145f update description 2015-08-21 17:00:33 +08:00
afc163
1fd8703767 remove file.uid 2015-08-21 16:43:18 +08:00
afc163
53ce7a25c1 Add breadcrumbName 2015-08-21 16:41:39 +08:00
然则
71f4d3f95f Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-21 16:21:33 +08:00
然则
d7b4bbb289 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-21 16:19:49 +08:00
afc163
727710c1eb Fix upload close file item bug 2015-08-21 16:19:28 +08:00
然则
87bbaea8d9 fixed #138 not full 2015-08-21 16:19:17 +08:00
afc163
6313d98349 update button demo 2015-08-21 15:58:04 +08:00
afc163
e3e9c9d314 same problem as #179 2015-08-21 15:56:13 +08:00
偏右
873a78b826 Merge pull request #179 from zhujun24/fix-datepicker
fixed form demo select defaultValue
2015-08-21 15:51:09 +08:00
偏右
fd3b22a1f9 Merge pull request #178 from zhujun24/fix-datepicker
fixed datepicker time panel border
2015-08-21 15:39:50 +08:00
zhujun24
ae97429f6f fixed form demo select defaultValue 2015-08-21 15:35:51 +08:00
zhujun24
956061f119 fixed Datepicker time panel border 2015-08-21 15:33:49 +08:00
afc163
be1716d83a update dropdown demo 2015-08-21 15:22:09 +08:00
afc163
d100fd4fa8 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-21 15:15:58 +08:00
afc163
b32fc009b1 Fix select style 2015-08-21 15:14:21 +08:00
yiminghe
d69f22ba5d Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-21 14:54:56 +08:00
yiminghe
c4b5b186ae render to body 2015-08-21 14:54:37 +08:00
afc163
10284a997c Fix upload bug in safari and ie8/9, ref #138 2015-08-21 14:46:12 +08:00
afc163
69412f4ca3 ignore xhr2 2015-08-20 21:03:08 +08:00
afc163
328722a090 update docs/getting-started.md 2015-08-20 20:58:42 +08:00
afc163
aabf57a117 beta5 2015-08-20 20:53:59 +08:00
afc163
b48e54cd66 update iconfont and adjust some icon size 2015-08-20 20:52:16 +08:00
afc163
cd4d98266c react-router@1.x as devDependency 2015-08-20 20:33:21 +08:00
afc163
42c6a05a38 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-20 20:31:05 +08:00
偏右
a694d61635 Merge pull request #177 from ant-design/breadcrumb-react-router-1.x
Fit breadcrumb to react-router@1.x, close #172
2015-08-20 19:56:25 +08:00
afc163
bec1c69669 Fit breadcrumb to react-router@1.x, close #172 2015-08-20 19:52:56 +08:00
SimaQ
972ceadc4a Merge branch '0.8.0' of https://github.com/ant-design/ant-design into 0.8.0 2015-08-20 18:57:07 +08:00
SimaQ
680b36c3e9 fix: forbid copy paste event on password validation, and optimize the interacitve. 2015-08-20 18:56:21 +08:00
sorrycc
12c17f7dd3 update get-started.md, Close #169 2015-08-20 18:19:51 +08:00
afc163
01c5f1675a code style 2015-08-20 18:09:28 +08:00
yiminghe
fd0083e6e3 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-20 17:47:15 +08:00
yiminghe
0a1cfccd22 upgrade select. Fixes #170 2015-08-20 17:46:12 +08:00
偏右
b77191e1ed Merge pull request #176 from zhujun24/format
Format Demo
2015-08-20 17:28:10 +08:00
zhujun24
fefd039242 format alert & notification demo var xxx = antd.xxx 2015-08-20 17:16:53 +08:00
zhujun24
29b9088788 Merge remote-tracking branch 'upstream/0.8.0' 2015-08-20 17:14:29 +08:00
偏右
64cd19666a Merge pull request #174 from ant-design/lesslint
Lesslint
2015-08-20 17:06:16 +08:00
afc163
2940cd2696 fix build 2015-08-20 17:01:57 +08:00
afc163
75e3a6c561 Merge branch '0.8.0' into lesslint 2015-08-20 16:56:24 +08:00
afc163
f0931ece66 Add lesslint and fix less code style 2015-08-20 16:55:42 +08:00
yiminghe
d2e7253c51 fix tabs style 2015-08-20 16:47:41 +08:00
偏右
400f23939d Merge pull request #164 from zhujun24/fix-ie
input-number arrow
2015-08-20 16:28:28 +08:00
SimaQ
0a2424f52a Merge branch '0.8.0' of https://github.com/ant-design/ant-design into 0.8.0 2015-08-20 15:48:01 +08:00
zhujun24
b739b1f9f1 Merge branch 'fix-ie' 2015-08-20 15:47:22 +08:00
SimaQ
fcc8785e93 fix: fix datepicker style bug in inline-form. 2015-08-20 15:47:13 +08:00
zhujun24
337cee6845 Merge remote-tracking branch 'upstream/0.8.0' 2015-08-20 15:47:09 +08:00
zhujun24
a2c573cb5a fixed collape margin, ref #138 2015-08-20 15:45:16 +08:00
zhujun24
6bdf0c4974 fixed inputNumber arrow, ref #138 2015-08-20 15:38:57 +08:00
zhujun24
c15a840bcf input-number arrow 2015-08-20 15:28:57 +08:00
afc163
e03d2488e5 update document 2015-08-20 15:04:34 +08:00
jljsj
02b6112946 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-20 14:58:33 +08:00
jljsj
13da44faa1 add validation icon motion 2015-08-20 14:58:09 +08:00
afc163
71b3f93d1f update webpack middleware config 2015-08-20 13:58:05 +08:00
afc163
9b28e46d4c still use Magic offsetWidth set 2015-08-20 13:56:08 +08:00
afc163
75fca79313 remove magic code, use getBoundingClientRect replace offsetWidth 2015-08-20 13:48:17 +08:00
afc163
970aa4f846 Update code style 2015-08-20 13:17:17 +08:00
jljsj
8274cce09e add alert close animation 2015-08-20 13:06:47 +08:00
afc163
a37ca606cc Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-20 11:46:28 +08:00
afc163
59ea12f172 Fix tag render 2015-08-20 11:46:02 +08:00
sorrycc
d897263d5b fix: Carousel don't work in IE8, ref: #138 2015-08-20 11:34:43 +08:00
afc163
e5419c79ef update log in terminal 2015-08-19 21:49:47 +08:00
偏右
846935763d Merge pull request #163 from ant-design/popconfirm
render popup to body
2015-08-19 21:45:46 +08:00
afc163
b72443327b minimized static files in ant.design 2015-08-19 21:44:31 +08:00
偏右
bb55bf4441 Update README.md 2015-08-19 21:40:13 +08:00
然则
332bde91ef Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-19 21:19:26 +08:00
然则
10c6a84874 up tree and checkbox style 2015-08-19 21:19:11 +08:00
afc163
ee7c34077d Fix clear both problem again 2015-08-19 21:11:08 +08:00
afc163
f03f21c509 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-19 20:54:00 +08:00
afc163
45c6895c61 Fix clear both problem 2015-08-19 20:50:51 +08:00
然则
98407fef15 ie8 fix 2015-08-19 20:42:34 +08:00
yiminghe
85c30ab0ad render popup to body 2015-08-19 20:16:20 +08:00
yiminghe
a46f694766 render popup to body 2015-08-19 20:12:34 +08:00
afc163
8c91030b01 submenu hover background bug 2015-08-19 19:26:28 +08:00
afc163
13fd2d8b46 Fix root menu hover bug 2015-08-19 19:23:30 +08:00
afc163
e2ceed2dc6 Remove unused statement 2015-08-19 19:21:40 +08:00
afc163
cbd5a81a22 do not remove element manully when closing tag 2015-08-19 19:19:35 +08:00
afc163
733307d3de Fix menu hover background 2015-08-19 18:59:08 +08:00
afc163
3d975e4495 code style 2015-08-19 17:50:20 +08:00
偏右
d47324f6c6 Merge pull request #162 from ant-design/tagAnimation
Tag animation
2015-08-19 17:41:33 +08:00
jljsj
357cd5e37d add dom.remove 2015-08-19 17:35:18 +08:00
jljsj
ac27a1814d add tag animation 2015-08-19 17:26:55 +08:00
afc163
d612c82fda Remove overflow:hidden from table container 2015-08-19 16:10:08 +08:00
jljsj
eb0ecaa035 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-19 15:46:44 +08:00
jljsj
25c8df1db6 updata easeing add quint 2015-08-19 15:46:33 +08:00
afc163
29de017602 fix iconfont position bug in safari 2015-08-19 15:28:22 +08:00
afc163
ac00c2549d update README.md 2015-08-19 15:15:07 +08:00
afc163
3bf7dce466 beta4 2015-08-19 14:10:58 +08:00
yiminghe
6929f060a6 fix case 2015-08-19 14:09:13 +08:00
afc163
ea298befa5 update optionGroup Demo 2015-08-19 13:50:57 +08:00
afc163
6cfdca61a8 Only leave onCheck, remove onSelect from antd API 2015-08-19 13:50:26 +08:00
afc163
fb75c3318c Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-19 13:30:01 +08:00
afc163
9b1bbc855b webpack progress plugin 2015-08-19 13:24:51 +08:00
然则
5ae755a8ba up tree readme 2015-08-19 12:28:25 +08:00
然则
2bcd7ef34f Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-19 12:23:28 +08:00
然则
3bba2b7972 fix conflict 2015-08-19 12:23:00 +08:00
afc163
d46b790493 update slider style 2015-08-19 12:20:03 +08:00
然则
011970fe38 up tree api 2015-08-19 12:18:10 +08:00
afc163
6e542e4972 update tree 2015-08-19 11:45:08 +08:00
afc163
cfaf31b47c update demo title 2015-08-19 11:41:44 +08:00
afc163
568a23930c anticon-large => anticon-appstore 2015-08-19 11:31:14 +08:00
afc163
00a0f7b2b0 move API to bottom 2015-08-19 11:26:30 +08:00
afc163
8ff9059316 update highlight code box style 2015-08-19 10:15:28 +08:00
afc163
281dd27e96 short delay for detecting mousePosition 2015-08-19 10:09:44 +08:00
afc163
3b658406bb improve menu style 2015-08-18 22:51:01 +08:00
afc163
37ead7359c cursor text over placeholder 2015-08-18 22:47:23 +08:00
yiminghe
b584e6d863 Merge pull request #149 from ant-design/improve-modal-mouse-position
改进 modal 的 mousePosition 获取方式
2015-08-18 22:35:45 +08:00
afc163
c3294dfc64 use arrow function 2015-08-18 20:27:40 +08:00
afc163
e95e557077 detect mousePosition in click event 2015-08-18 18:36:31 +08:00
afc163
452426d6f5 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-18 17:52:56 +08:00
SimaQ
3b70fc147f Merge branch '0.8.0' of https://github.com/ant-design/ant-design into 0.8.0 2015-08-18 17:48:39 +08:00
SimaQ
40dcdb0003 fix: hack rgba for ie8. 2015-08-18 17:48:26 +08:00
afc163
7fa9d6a6e8 Fix table header text align, ref #138 2015-08-18 17:48:24 +08:00
SimaQ
e49a057d49 fix: fix icon style for icon-slider demo 2015-08-18 17:34:27 +08:00
翰文
c1b409662d chore: 更新upload文档和依赖版本 2015-08-18 17:31:37 +08:00
afc163
6b305b3b30 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-18 17:20:39 +08:00
afc163
24aba9ea24 Fix table header text align, ref #138 2015-08-18 17:18:49 +08:00
SimaQ
552da03f3b Merge branch '0.8.0' of https://github.com/ant-design/ant-design into 0.8.0 2015-08-18 17:15:30 +08:00
SimaQ
b99dffbd09 fix: fix Browser compatibility for .ant-form-inline. 2015-08-18 17:15:08 +08:00
afc163
fc71504c78 beta3 2015-08-18 17:12:07 +08:00
afc163
322e09210e close button should be visible at downloading status 2015-08-18 17:06:23 +08:00
afc163
1e7cf6d364 button should inside children 2015-08-18 17:05:56 +08:00
afc163
24b81829a1 code style 2015-08-18 16:58:07 +08:00
afc163
52b32e2ec6 set webpack-dev-middleware lazy false because it is fast a lot 2015-08-18 16:55:25 +08:00
afc163
542883515a Fix inline menu arrow direction 2015-08-18 16:39:26 +08:00
afc163
77651c0621 update code style 2015-08-18 16:24:18 +08:00
afc163
192f150bc2 use rc-util addEventListener 2015-08-18 16:21:56 +08:00
afc163
42de63ad08 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-18 16:04:03 +08:00
afc163
90deb00e06 update tree code and demo style, improve css 2015-08-18 16:03:13 +08:00
偏右
f93a046bb5 Merge pull request #156 from zhujun24/fix-ie
Fix ie
2015-08-18 15:42:40 +08:00
afc163
f9b7482b91 customize upload button children by user 2015-08-18 15:33:48 +08:00
zhujun24
34466d2dde fix dropdown border-top IE8 2015-08-18 15:31:08 +08:00
afc163
3cdaea4452 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-18 15:30:48 +08:00
afc163
a14f8abbfb ignore xhr2 2015-08-18 15:30:02 +08:00
zhujun24
862036b1d5 fix tabs left arrow color IE9 2015-08-18 14:58:18 +08:00
zhujun24
4d42cc7201 merge pagination commit 2015-08-18 14:46:22 +08:00
偏右
363ecca6b6 Merge pull request #155 from ant-design/fix-pagination-center
修复分页组件在 IE8 不能居中的问题
2015-08-18 14:41:06 +08:00
偏右
f458e318ff Merge pull request #154 from zhujun24/fix-demo
slider demo input-number value & fixed demo htmlFor
2015-08-18 14:40:52 +08:00
zhujun24
bc633e4ff9 Merge remote-tracking branch 'upstream/0.8.0' 2015-08-18 14:36:51 +08:00
偏右
e91cfbe2c3 Merge pull request #153 from ant-design/replace-jquery-ajax
Replace jQuery.ajax via reqwest
2015-08-18 14:34:37 +08:00
Yuwei Ba
b95df15f7b 修复分页组件在 IE8 不能居中的问题 2015-08-18 14:31:00 +08:00
afc163
5264263849 Replace jQuery.ajax via reqwest, fix #142
https://github.com/ded/reqwest

need xhr2 as peerDependency
2015-08-18 14:30:55 +08:00
zhujun24
0e5eac7108 slider demo input-number value & fixed demo htmlFor 2015-08-18 14:28:32 +08:00
yiminghe
d087793cdf fix menu expander 2015-08-18 14:28:28 +08:00
Yuwei Ba
d8e62e8762 Merge pull request #151 from ant-design/fix-pagination
Fix quirk color in IE9.
2015-08-18 14:18:55 +08:00
afc163
dc62d38456 fix code style 2015-08-18 14:03:44 +08:00
afc163
a08024563d fix code style 2015-08-18 14:02:55 +08:00
Yuwei Ba
a77e5085de Fix quirk color in IE9.
Disable IE filter.
2015-08-18 13:40:38 +08:00
afc163
c0c9b4a8d5 remove this.onDocumentMousemove 2015-08-18 13:21:48 +08:00
afc163
ee8335856c Only listen mousemove once
初始化时监听, 共享同一个 mousePosition
2015-08-18 13:19:00 +08:00
afc163
f4964626d9 open confirm from current mouse position 2015-08-18 13:15:16 +08:00
afc163
56b06e168f get mousePosition from mousemove listener for more elegant API 2015-08-18 12:26:19 +08:00
偏右
d098c09946 Merge pull request #148 from zhujun24/notification
remove btnClose and demo
2015-08-18 11:50:40 +08:00
afc163
1c5e3485e7 Fix cancel button can not close modal
1. 关闭取消按钮的修复
2. 优化 loading 按钮的效果
2015-08-18 11:46:07 +08:00
zhujun24
4bb76f0d73 remove btnClose and demo 2015-08-18 11:12:32 +08:00
yiminghe
58bd830f40 remove btnClick 2015-08-18 00:57:02 +08:00
yiminghe
a15e428155 fix select placeholder for ie10. Fixes #145 2015-08-18 00:42:03 +08:00
yiminghe
099999ffc1 support mousePosition 2015-08-17 23:46:09 +08:00
yiminghe
867c4f2a85 support mousePosition 2015-08-17 23:42:52 +08:00
afc163
f31f6f2b8e fix ie8 opacity 2015-08-17 20:44:40 +08:00
偏右
7af4457c94 Merge pull request #140 from zhujun24/notification
optimize close function
2015-08-17 18:17:08 +08:00
afc163
6b32f18f79 improve table filter dropdown 2015-08-17 18:14:39 +08:00
afc163
659f373899 fix filter menu style in table 2015-08-17 18:04:46 +08:00
zhujun24
1c5b6fe0c7 Merge branch 'master' into notification 2015-08-17 18:03:12 +08:00
zhujun24
7334a07025 modify popconfirm & popover & tooltip placement 2015-08-17 17:55:39 +08:00
zhujun24
e8923b5d46 Merge remote-tracking branch 'upstream/0.8.0' into notification 2015-08-17 17:49:27 +08:00
ioldfish
cb2a711ee2 Merge branch '0.8.0' of https://github.com/ant-design/ant-design into 0.8.0 2015-08-17 17:35:27 +08:00
ioldfish
1b78c4fc90 merge from fortree 2015-08-17 17:32:59 +08:00
afc163
662f8889bf fix menu-item link, #139 2015-08-17 17:28:48 +08:00
afc163
fab3280ed2 code style update 2015-08-17 17:03:16 +08:00
afc163
3922656566 RadioGroup defaultValue 2015-08-17 16:54:42 +08:00
afc163
9d5e0a2e58 remove unused state visible 2015-08-17 16:44:38 +08:00
afc163
539ac64998 除了自定义页脚外,点击取消不需要手动设置关闭 2015-08-17 16:42:33 +08:00
zhujun24
bcaa2ed0f5 optimize close function 2015-08-17 15:58:38 +08:00
afc163
4af25dffb2 code style 2015-08-17 15:17:04 +08:00
afc163
315e61a33d fix react-slick bug via adding matchMedia polyfill 2015-08-17 15:12:59 +08:00
afc163
b6f34c5dde Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-17 13:59:28 +08:00
afc163
906b30b796 update menu props 2015-08-17 13:58:21 +08:00
偏右
4745c00a8c Merge pull request #135 from zhujun24/color
label htmlFor
2015-08-17 13:23:19 +08:00
zhujun24
d3784423ac label htmlFor 2015-08-17 13:16:36 +08:00
afc163
96f136205e update deps 2015-08-17 13:06:01 +08:00
ioldfish
cbcceab1e9 fix style 2015-08-17 12:50:02 +08:00
ioldfish
40e998f377 update api 2015-08-17 12:49:19 +08:00
afc163
72e001117c update collaspe arrow animation 2015-08-17 12:27:03 +08:00
然则
4b705d7c85 up less 2015-08-17 12:17:20 +08:00
afc163
30bc776509 update motion.md 2015-08-17 11:26:53 +08:00
然则
ad02ebe114 up mixin fn 2015-08-17 00:24:39 +08:00
然则
23948c8588 up checkbox 2015-08-16 20:38:58 +08:00
然则
bf52026789 up tree and checkbox 2015-08-16 20:04:42 +08:00
然则
61f061b00f up api 2015-08-15 23:45:25 +08:00
afc163
2eecc1071b update eslint and fix indent problems 2015-08-15 15:08:55 +08:00
afc163
d0abead2c8 update typography 2015-08-15 14:43:17 +08:00
afc163
b6047bf769 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-15 14:34:49 +08:00
yiminghe
fea0870a41 update menu 2015-08-15 00:07:40 +08:00
然则
82bf118a73 up iconfont 2015-08-14 23:28:20 +08:00
afc163
f93d05d2c8 update spec/colors 2015-08-14 22:06:31 +08:00
偏右
1edb882aaa Merge pull request #132 from zhujun24/color
Color page
2015-08-14 21:57:47 +08:00
zhujun24
0d4342d45d color page 2015-08-14 20:10:17 +08:00
afc163
0d4e396f2a fix select check size 2015-08-14 18:30:54 +08:00
afc163
466238b1f8 beta2 2015-08-14 18:21:04 +08:00
偏右
079220be80 Merge pull request #131 from ant-design/improve-menu
改进 menu 的样式
2015-08-14 18:19:34 +08:00
afc163
de38390271 改进 menu 的样式
参照 ant-design 的视觉稿微调
2015-08-14 18:16:41 +08:00
afc163
edc0f4bbc0 modal custom footer demo 2015-08-14 14:35:15 +08:00
afc163
14c046b87d Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-14 14:22:04 +08:00
afc163
ce5d7b9d9c update rc-upload to 1.3.0, modify onError arguments 2015-08-14 14:17:22 +08:00
yiminghe
ac50ae3632 upgrade menu 2015-08-14 13:09:53 +08:00
zhujun24
8461a662bb Merge remote-tracking branch 'upstream/0.8.0' 2015-08-14 11:02:49 +08:00
yiminghe
f4b0a8fee8 update menu style 2015-08-13 17:31:09 +08:00
yiminghe
b3af79ab24 upgrade. Fixes #127 2015-08-13 16:39:51 +08:00
chencheng (云谦)
39701f89da typo fix 2015-08-13 16:19:37 +08:00
偏右
622e39cfa3 Merge pull request #128 from zhujun24/notification
Notification
2015-08-12 18:19:43 +08:00
zhujun24
460733257d Merge branch 'notification' 2015-08-12 18:13:08 +08:00
zhujun24
ba2c4cf4ff fixed notification animate bug 2015-08-12 18:08:06 +08:00
zhujun24
94b2afc1ff Merge remote-tracking branch 'upstream/0.8.0' into notification 2015-08-12 16:50:32 +08:00
afc163
2cdfd0126b Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-12 16:21:17 +08:00
afc163
f975a891a6 selected check style should be in select-dropdown rather than dropdown 2015-08-12 16:18:15 +08:00
jljsj
603ee1549c 更新动画里的easeing的demo 2015-08-12 15:38:54 +08:00
jljsj
c6787592e3 Merge branches '0.8.0' and '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-12 14:58:40 +08:00
jljsj
5b47891c52 更新enterAnimation版本与demo 2015-08-12 14:57:45 +08:00
afc163
f6aaefa43f remove useless code for sorter className 2015-08-12 13:04:13 +08:00
afc163
d1b581be06 fix table dataSource propTypes 2015-08-12 12:51:33 +08:00
偏右
c8eb2483de Merge pull request #126 from ant-design/fix-table2
Fix table2
2015-08-12 12:47:56 +08:00
afc163
dfff7ef86b fix sort and filter 2015-08-12 12:47:04 +08:00
afc163
fb5632b61b Merge branch 'fix-table2' of github.com:ant-design/ant-design into fix-table2 2015-08-12 11:59:51 +08:00
yiminghe
f8f1fd292c fix sort 2015-08-12 11:59:03 +08:00
yiminghe
5241f6a472 rebase 2015-08-12 11:57:44 +08:00
yiminghe
d95d4e4aea fix sort 2015-08-12 11:50:07 +08:00
afc163
ea8572d7a4 Do not modify props in Table 2015-08-12 11:46:42 +08:00
yiminghe
e24850f42d disabled prop modify 2015-08-12 11:26:36 +08:00
yiminghe
222545b771 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-11 23:33:29 +08:00
yiminghe
79e54f03f5 upgrade menu 2015-08-11 23:32:49 +08:00
afc163
3ad54f42e0 @link-color split from @primary-color 2015-08-11 21:25:25 +08:00
afc163
f0c77e7004 update color var 2015-08-11 21:16:12 +08:00
afc163
56122af642 update docs/download.md 2015-08-11 21:07:49 +08:00
afc163
137e40acae bordered table 2015-08-11 20:05:52 +08:00
afc163
3be09f62f5 disable tree link 2015-08-11 17:10:06 +08:00
afc163
f5afbf16aa Improve table ajax dataSource
1. Add ajax data params support
2. improve dataSource.clone for new config
2015-08-11 16:57:17 +08:00
然则
6da7db4ec2 up rc-tree version 2015-08-10 20:23:18 +08:00
yiminghe
6bba4f755c Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-10 17:57:52 +08:00
yiminghe
eef1da7ed6 upgrade menu 2015-08-10 17:57:28 +08:00
zhujun24
fa416e6bf9 Merge branch 'notification' 2015-08-10 16:54:54 +08:00
zhujun24
16daf359a7 Merge branch 'input-size' 2015-08-10 16:54:14 +08:00
zhujun24
b3651a4be4 Merge remote-tracking branch 'upstream/0.8.0' into notification 2015-08-10 16:52:43 +08:00
afc163
e7ca8c9af8 react-component/select#19 2015-08-10 16:35:51 +08:00
afc163
ebf0168ece update select size in form 2015-08-10 16:24:15 +08:00
afc163
804da578de Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-10 16:21:21 +08:00
偏右
df8ccf6d46 Merge pull request #121 from zhujun24/input-size
Input size
2015-08-10 16:21:00 +08:00
zhujun24
dee35bd833 optimize code style 2015-08-10 15:39:50 +08:00
afc163
caa86aa185 typo 2015-08-10 15:33:46 +08:00
afc163
3acb9d4eba update datepicker demo 2015-08-10 15:14:47 +08:00
zhujun24
f85248726d form input large size 2015-08-10 14:34:25 +08:00
zhujun24
ea3f38a58a unify size api name 2015-08-10 13:22:50 +08:00
afc163
9f1b188f87 fix remove logic in upload 2015-08-09 18:23:18 +08:00
afc163
f9157ab8c4 code style 2015-08-09 18:13:46 +08:00
偏右
bcb1cbf2ac Merge pull request #123 from ant-design/feature-upload
Feature upload
2015-08-09 18:06:16 +08:00
afc163
dae05a55c4 merge 2015-08-09 18:05:50 +08:00
afc163
b68ec83e36 优化 upload 实现
1. 使用 Upload.dragger 代替 type
2. 将拖拽上传的内容区域交给用户自己实现
3. 改进 uploadList 的实现方式, 尽量避免使用 Dom 操作
4. 优化样式展现
2015-08-09 18:00:20 +08:00
玄寂
63cf7bb742 feat: add upload component 2015-08-08 23:37:35 +08:00
zhujun24
e3e17376f0 selece size 2015-08-08 19:11:10 +08:00
zhujun24
7b64e31ea3 inputNumber size 2015-08-08 17:59:57 +08:00
yiminghe
aa6722b0d2 upgrade slider 2015-08-08 00:49:48 +08:00
zhujun24
ce05e8fc03 Merge branch 'alert' 2015-08-07 20:50:58 +08:00
yiminghe
4f381b0301 fix #120 2015-08-07 19:21:02 +08:00
jljsj
e1a6cfc72a updata enterAnimation version 2015-08-07 17:07:19 +08:00
afc163
87b76b86b0 update img 2015-08-07 12:36:44 +08:00
afc163
c0c2c22eb2 disable color design spec 2015-08-07 12:32:37 +08:00
afc163
a671afbd3d Merge branch 'design-spec' into 0.8.0 2015-08-07 12:26:47 +08:00
afc163
0d41181c1b update component text 2015-08-07 12:20:30 +08:00
afc163
43dbc2f24b code style fix 2015-08-07 11:10:46 +08:00
afc163
bba4f9df42 ant-affix 2015-08-07 11:04:22 +08:00
afc163
4c8d3994a2 improve code style 2015-08-07 10:58:15 +08:00
afc163
f2889b344f Merge branch '0.8.0' into design-spec 2015-08-07 10:56:11 +08:00
afc163
6b72cc2e93 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-07 10:56:04 +08:00
偏右
cee218be33 Merge pull request #119 from ant-design/datasource
fix datasource
2015-08-07 10:55:40 +08:00
afc163
9b68103643 prefix className for affix 2015-08-07 10:50:52 +08:00
SimaQ
575af92b92 update email validation demo 2015-08-07 09:57:12 +08:00
yiminghe
d60fca4993 fix datasource 2015-08-07 01:03:42 +08:00
yiminghe
ed549a19b3 upgrade rc-menu 2015-08-07 00:34:06 +08:00
yiminghe
454e5cc22b upgrade rc-select. Fixes #118 2015-08-07 00:16:21 +08:00
afc163
e958481e00 rollback dep version 2015-08-06 21:49:52 +08:00
zhujun24
72e760d0bd bug still exist 2015-08-06 20:55:30 +08:00
SimaQ
ac1852117b update 2015-08-06 18:58:37 +08:00
zhujun24
ec462fde00 merge 0.8.0 2015-08-06 18:28:48 +08:00
afc163
8a4c6c37be code style 2015-08-06 17:42:13 +08:00
yiminghe
9616341007 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-06 16:50:20 +08:00
yiminghe
4d203b6e67 add menu 2015-08-06 16:49:54 +08:00
afc163
c2933a8e52 update tabs style 2015-08-06 16:47:01 +08:00
afc163
f8b19f3bc8 update deps 2015-08-06 15:42:03 +08:00
偏右
0640683f66 Merge pull request #117 from ant-design/fix-notification
Fix notification
2015-08-06 15:35:22 +08:00
afc163
a22e135a78 Add duration config for notification 2015-08-06 15:32:18 +08:00
afc163
9963c41029 improve code style 2015-08-06 15:19:45 +08:00
afc163
287c9ec5fd remove config global top demo of notification 2015-08-06 15:13:30 +08:00
afc163
d82154825c typo 2015-08-06 14:11:02 +08:00
afc163
3446d87c9c Add defaultValue for datepicker 2015-08-06 12:23:49 +08:00
afc163
67a200ee30 添加联动的选择框, fix #115 2015-08-06 12:06:05 +08:00
ioldfish
817e5ff72a upadte tree style 2015-08-06 09:17:40 +08:00
SimaQ
2bccf59028 correct typo 2015-08-06 08:59:00 +08:00
afc163
f63994b62f Merge branch '0.8.0' into design-spec 2015-08-05 22:03:47 +08:00
afc163
8b338e626a fix margin right 2015-08-05 22:03:24 +08:00
afc163
9a200ec782 update text 2015-08-05 21:18:34 +08:00
SimaQ
2e47b732c0 Merge branch '0.8.0' of https://github.com/ant-design/ant-design into 0.8.0 2015-08-05 17:56:26 +08:00
SimaQ
1d6f5a88ae remove the clear button of a text input control in IE10 and plus 2015-08-05 17:54:19 +08:00
afc163
2a321dd22f update colors spec 2015-08-05 17:39:20 +08:00
ioldfish
0065270e7f update ant-tree style 2015-08-05 17:38:02 +08:00
SimaQ
5a47d35d1e fix: required label style has bug in ie 2015-08-05 16:56:41 +08:00
SimaQ
76677a2a2a update the interactive method for email validation 2015-08-05 14:47:47 +08:00
afc163
4802e1c139 Merge branch '0.8.0' into design-spec 2015-08-05 14:11:30 +08:00
afc163
6d2cf352c3 return promise object from fetch 2015-08-05 11:04:00 +08:00
afc163
cfaabbb825 Improve dataSource implementation
1. move advance-ajax to ajax demo
2. remove plain object dataSource support
3. use propTypes over judgement of constructor
2015-08-05 10:58:21 +08:00
afc163
3c95c727b3 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-05 10:21:35 +08:00
SimaQ
9fcae54f84 format code style and add some words 2015-08-05 10:12:12 +08:00
逸达
b97d01f288 遵循格式要求 2015-08-05 01:44:21 +08:00
逸达
7ba8e08b5a 加入Table 远程模式支持由外界发起请求方法 2015-08-05 01:42:37 +08:00
afc163
df7aa84191 fix datepicker style in form item 2015-08-04 20:22:45 +08:00
afc163
6502bc3015 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-04 20:01:53 +08:00
偏右
902ca1dc93 Merge pull request #113 from ant-design/adjustOrientOnCalendarOverflow
fix adjustOrientOnCalendarOverflow
2015-08-04 20:01:41 +08:00
yiminghe
10ff094b46 typo 2015-08-04 18:44:07 +08:00
yiminghe
0e58688dc2 fix adjustOrientOnCalendarOverflow 2015-08-04 18:42:41 +08:00
zhujun24
3c003cd00a remove top.md add duration.md 2015-08-04 17:43:51 +08:00
afc163
d0e7da6c7c update some demo text 2015-08-04 17:07:31 +08:00
afc163
dde45c2e6c Merge branch '0.8.0' into design-spec 2015-08-04 16:58:50 +08:00
afc163
fcb3297269 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-04 16:54:55 +08:00
偏右
ce6b131b64 Merge pull request #111 from zhujun24/notification
Notification
2015-08-04 16:54:47 +08:00
afc163
5c9f8e60ea Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-04 16:54:25 +08:00
afc163
e6d2b71fb7 Add some design spec document 2015-08-04 16:54:08 +08:00
afc163
164e7c3c30 update markdown style 2015-08-04 16:53:41 +08:00
zhujun24
b57f110e2d modify text and style 2015-08-04 16:07:31 +08:00
zhujun24
7e379b8e47 fixed style 2015-08-04 15:48:00 +08:00
yiminghe
dcb0d89f51 fix notice api 2015-08-04 15:20:43 +08:00
yiminghe
807b5530e4 Merge pull request #110 from ant-design/fix-notification
fix notification
2015-08-04 15:18:38 +08:00
yiminghe
ebc4aac58e fix notification 2015-08-04 15:16:10 +08:00
sorrycc
968b640fc2 add resize event for affix 2015-08-04 15:03:00 +08:00
sorrycc
e79150ed39 fix(affix): offset 2015-08-04 14:57:28 +08:00
SimaQ
5c9fdbaeb6 Merge branch '0.8.0' of https://github.com/ant-design/ant-design into 0.8.0 2015-08-04 14:42:05 +08:00
SimaQ
48c4d24434 modify ant-input-lg's font-size 2015-08-04 14:41:30 +08:00
afc163
8106e246af Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-08-04 11:45:50 +08:00
偏右
2fe97eb8ee Merge pull request #88 from zhujun24/notification
Notification
2015-08-04 11:45:40 +08:00
afc163
9ebbe8b82a code box id hash 2015-08-04 11:36:04 +08:00
SimaQ
2fc0e0b2a9 Merge branch '0.8.0' of https://github.com/ant-design/ant-design into 0.8.0 2015-08-04 08:48:34 +08:00
zhujun24
befde97f70 remove defaultClose 2015-08-03 19:23:25 +08:00
afc163
2507bba7a4 update markdown style, min file 2015-08-03 18:43:23 +08:00
afc163
2b058603a1 upgrade es5-shim version 2015-08-03 18:41:54 +08:00
zhujun24
216af6d8df 为什么撤销不掉对closable.md的修改 2015-08-03 18:20:21 +08:00
afc163
755bc78999 update markdown style 2015-08-03 18:19:58 +08:00
afc163
72a1a3c3f8 Add stable version in home page 2015-08-03 18:17:16 +08:00
zhujun24
cb96fc370d remove alert change 2015-08-03 18:14:04 +08:00
zhujun24
f7c7bbe76f config top 2015-08-03 18:00:22 +08:00
偏右
196261633e Merge pull request #107 from ant-design/Carousel
add Carousel
2015-08-03 17:57:40 +08:00
sorrycc
830e503218 remove css prefix 2015-08-03 17:49:09 +08:00
sorrycc
cb1ce102ff move style declaractions under .ant-carousel 2015-08-03 17:45:58 +08:00
sorrycc
6b7f2e543b dots element take place 2015-08-03 17:43:06 +08:00
sorrycc
ebf1c3ed25 add Carousel 2015-08-03 17:43:05 +08:00
afc163
e7641557ca fix col responsive view 2015-08-03 17:40:58 +08:00
afc163
ad2e78ce80 fix #94 2015-08-03 17:39:29 +08:00
偏右
babcb6ac8c Merge pull request #109 from ant-design/affix
add Affix
2015-08-03 17:18:02 +08:00
sorrycc
eb4f468b49 add Affix 2015-08-03 17:12:50 +08:00
afc163
ee91436840 update datepicker size style 2015-08-03 16:57:03 +08:00
偏右
c87c37329c Merge pull request #108 from zhujun24/input-size
component input size
2015-08-03 16:47:55 +08:00
afc163
3bf5a86c21 fix select group style 2015-08-03 16:43:23 +08:00
afc163
c351ae5b37 fix #33 via upgrade es5-shim version 2015-08-03 16:37:05 +08:00
zhujun24
fc6fe4ecd0 datepicker size lg sm 2015-08-03 16:16:07 +08:00
ioldfish
0cfd895310 Merge branch '0.8.0' of https://github.com/ant-design/ant-design into 0.8.0 2015-08-03 16:13:43 +08:00
ioldfish
936e5e8369 包装rc-tree,样式待修改 2015-08-03 16:11:56 +08:00
ioldfish
c18af7db79 包装rc-tree,样式待修改 2015-08-03 16:07:21 +08:00
jljsj
0673ba9d16 更新转场新增按钮交互与更新motion里的select 2015-08-03 16:04:24 +08:00
zhujun24
0a79201536 merge conflict index.js 2015-08-03 15:22:04 +08:00
zhujun24
4ef0ac9e9b add icon style and top 2015-08-03 15:17:12 +08:00
SimaQ
0af7f72db5 Merge branch '0.8.0' of https://github.com/ant-design/ant-design into 0.8.0 2015-08-03 13:44:40 +08:00
偏右
9917f92558 Merge pull request #106 from ant-design/feat-add-validation
feat: add form-validation
2015-08-03 13:43:36 +08:00
SimaQ
5f70cf024a feat: add form-validation 2015-08-03 13:39:58 +08:00
Emma
6a25963da4 Merge pull request #105 from ant-design/revert-102-feat-add-validation
Revert 102 feat add validation
2015-08-03 13:18:45 +08:00
偏右
8516f308e5 Revert "表单校验" 2015-08-03 13:12:13 +08:00
zhujun24
8e9cc615dc merge origin 2015-08-03 12:09:52 +08:00
Emma
a6a53ab235 Merge pull request #102 from ant-design/feat-add-validation
添加表单校验
2015-08-03 11:54:54 +08:00
zhujun24
47606396c3 remove alert alter 2015-08-03 11:38:55 +08:00
SimaQ
19560e2d75 update 2015-08-03 11:32:45 +08:00
zhujun24
95c098e61f merge 0.8.0 2015-08-03 09:47:59 +08:00
然则
fcd8a7fd3f fix #99 2015-08-01 17:51:55 +08:00
afc163
f62aa38ee8 Add components index.md 2015-08-01 14:08:04 +08:00
afc163
d7af23d93a merge master 2015-08-01 14:04:04 +08:00
zhujun24
a4f6890dec merge 0.8.0 2015-07-31 18:19:36 +08:00
zhujun24
725a2aa7ad remove customClose 2015-07-31 18:13:32 +08:00
SimaQ
e74845896c update form demo 2015-07-31 16:26:09 +08:00
SimaQ
ed43331251 update instruction 2015-07-31 16:03:24 +08:00
afc163
c766b3225b Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-07-31 15:32:58 +08:00
jljsj
ffe79a9160 updata md 2015-07-31 15:25:48 +08:00
afc163
15551bfa55 fix dep 2015-07-31 15:15:47 +08:00
jljsj
0c04548a78 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-07-31 13:56:45 +08:00
jljsj
e80a0d843b updata spec motion 2015-07-31 13:56:33 +08:00
afc163
7d0413fbb6 修复本地模式排序头状态失效 2015-07-31 12:41:42 +08:00
afc163
988bdf09bc 空的筛选项应该返回全量数据 2015-07-31 11:54:46 +08:00
afc163
a0d416d4a1 code style 2015-07-31 11:47:00 +08:00
yiminghe
cc58965426 fix table 2015-07-31 10:40:23 +08:00
SimaQ
4a2159800f add password validation demo 2015-07-31 10:40:17 +08:00
SimaQ
d2d5efa723 update validate style 2015-07-31 10:39:00 +08:00
SimaQ
d6e0678fba update validation basic demo 2015-07-31 10:39:00 +08:00
SimaQ
9cda1103e8 update demo 2015-07-31 10:39:00 +08:00
SimaQ
9718bc9de7 update form validate stylr 2015-07-31 10:39:00 +08:00
SimaQ
d97da23e3a add form-validation demo 2015-07-31 10:39:00 +08:00
SimaQ
7653aab6bc update form demo 2015-07-31 10:38:59 +08:00
SimaQ
c25d3b2e14 update form validation style 2015-07-31 10:38:59 +08:00
yiminghe
5aa19b5567 fix message 2015-07-31 00:01:37 +08:00
afc163
e00a562ca9 优化 Tag 关闭的逻辑, #84 2015-07-30 23:52:44 +08:00
yiminghe
19e2c2700a stable 2015-07-30 21:55:16 +08:00
yiminghe
eb42ada2cd Merge pull request #100 from ant-design/fix-message
fix message
2015-07-30 21:33:34 +08:00
yiminghe
d64c40ffee fix message 2015-07-30 21:32:12 +08:00
zhujun24
3c05b56a2d modify notification #88 2015-07-30 21:04:52 +08:00
afc163
5c0fabe855 update enter animation document 2015-07-30 19:11:39 +08:00
afc163
dd5f8ba468 update developing version 2015-07-30 18:50:05 +08:00
afc163
ded87acbb3 improve layout demo display 2015-07-30 18:44:39 +08:00
afc163
7a670887d8 update progress demo 2015-07-30 18:42:11 +08:00
afc163
9d6913739d Merge branch 'master' into 0.8.0 2015-07-30 18:40:36 +08:00
afc163
f586514cd7 update progress style 2015-07-30 18:39:52 +08:00
偏右
9656efd720 Merge pull request #97 from ant-design/progress-bar
增加showInfo配置
2015-07-30 18:20:54 +08:00
夏奈
fc9e268cfa showInfo 是否显示数值配置 2015-07-30 18:19:56 +08:00
偏右
f97fa9d146 Merge pull request #98 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2015-07-30 17:46:59 +08:00
The Gitter Badger
9c6f742863 Added Gitter badge 2015-07-30 09:46:27 +00:00
夏奈
bbac575112 showInfo 是否显示数值配置 2015-07-30 17:27:41 +08:00
afc163
bd5805a0e4 Merge branch 'master' into 0.8.0 2015-07-30 17:25:20 +08:00
afc163
a2b4bcb008 bump 0.7.3 2015-07-30 17:20:07 +08:00
夏奈
7703b57882 transition 2015-07-30 16:26:42 +08:00
偏右
714c5faa1c Merge pull request #96 from ant-design/progress-bar
Progress bar
2015-07-30 16:12:49 +08:00
夏奈
1bb6711a00 颜色修改 2015-07-30 15:54:08 +08:00
afc163
8f39e43f72 improve components search dropdown style 2015-07-30 15:33:45 +08:00
夏奈
5f1fad2a18 progress bar active 2015-07-30 15:14:00 +08:00
夏奈
df16cc2118 progress bar active 2015-07-30 15:07:38 +08:00
夏奈
3299740968 progress bar 和 progress circle api分开 2015-07-30 14:26:41 +08:00
偏右
4135a00e79 Merge pull request #84 from ant-design/components-tag
Components tag
2015-07-30 13:01:09 +08:00
偏右
95dde2aeea Merge pull request #93 from ant-design/message-global-config
support config message top globally
2015-07-30 11:49:53 +08:00
afc163
b607ab32cf support config message top globally 2015-07-30 11:47:46 +08:00
zhujun24
9667b49701 Merge branch 'master' into notification 2015-07-30 11:33:21 +08:00
偏右
e792a7d10b Merge pull request #92 from zhujun24/alert-icon-text
modify icon and text
2015-07-30 11:26:42 +08:00
zhujun24
dcc482aa28 merge from alert-icon-text 2015-07-30 11:26:16 +08:00
zhujun24
e7fd922429 modify icon and text 2015-07-30 11:20:14 +08:00
afc163
43c53f1d8d loading button should be unhandlable 2015-07-30 11:15:03 +08:00
afc163
741b7f2896 Merge branch 'master' into 0.8.0 2015-07-30 11:00:11 +08:00
afc163
e067bcd7a5 merge from 0.8.0 2015-07-30 10:52:30 +08:00
zhujun24
26df3480ff Merge branch 'alert' into notification 2015-07-30 10:50:11 +08:00
zhujun24
36473be278 merge new-alert-merge 2015-07-30 10:41:48 +08:00
zhujun24
75032b0322 remodify alert icon ang text 2015-07-30 10:38:40 +08:00
夏奈
fc69971f99 progress bar 和 progress circle api分开 2015-07-29 23:36:27 +08:00
夏奈
ef3f753470 progress bar style 2015-07-29 23:32:24 +08:00
afc163
b8ef693afc button loading animation effect 2015-07-29 22:23:55 +08:00
夏奈
a85586844c progress bar style 2015-07-29 22:20:05 +08:00
zhujun24
718751d063 merge 0.8.0 2015-07-29 21:07:02 +08:00
zhujun24
a7cb87b64d merge from 0.8.0 2015-07-29 20:43:44 +08:00
zhujun24
554d363520 modify icon and text 2015-07-29 20:24:07 +08:00
afc163
3c47cf2039 set event as onClose argument 2015-07-29 20:13:42 +08:00
zhujun24
42024530d0 notification 2015-07-29 20:08:16 +08:00
afc163
35c7b96f26 update alert description 2015-07-29 18:45:56 +08:00
afc163
706caa855f update alert component 2015-07-29 18:44:56 +08:00
偏右
e4b9ce0f6e Merge pull request #86 from zhujun24/alert
fixed three problems
2015-07-29 18:30:28 +08:00
afc163
ee71eb88a8 rm motion from components 2015-07-29 18:28:35 +08:00
afc163
28863a263c fix easing.md 2015-07-29 18:09:29 +08:00
afc163
612015bfbb update doc style 2015-07-29 17:35:24 +08:00
zhujun24
a45bcd4d07 fixed closable introduce in index.md 2015-07-29 17:33:28 +08:00
afc163
e2d8ad16cd fix header nav highlight 2015-07-29 17:25:45 +08:00
afc163
a671778b03 fix page height 2015-07-29 17:24:38 +08:00
afc163
7276554fd5 修改站点结构,开放设计文档 2015-07-29 17:23:11 +08:00
zhujun24
cdbbc4d34e fixed three problems 2015-07-29 17:22:36 +08:00
yiminghe
4c0cbd846c fix tabs anim 2015-07-29 16:49:05 +08:00
afc163
9acba5d4ae change category 2015-07-29 16:30:26 +08:00
afc163
d13a565b3d update component style 2015-07-29 16:00:18 +08:00
偏右
5bc99bbe26 Merge pull request #83 from zhujun24/alert
Alert
2015-07-29 15:38:08 +08:00
afc163
4eb849c783 fix boolean expression always true 2015-07-29 15:29:29 +08:00
zhujun24
2eb253f0ed fixed close style 2015-07-29 15:22:47 +08:00
afc163
3807c2ce31 Merge branch '0.8.0' of github.com:ant-design/ant-design into 0.8.0 2015-07-29 15:08:24 +08:00
偏右
16a02f0a99 Merge pull request #81 from ant-design/enter-animation
Enter animation
2015-07-29 15:07:42 +08:00
afc163
d32b9bfeac 修改 enter-animation 文档 2015-07-29 15:02:19 +08:00
jljsj
9fc8e7bb88 updata enter-animaiton index.md 2015-07-29 14:53:02 +08:00
jljsj
a13b5d3b02 updata js 0.1.3 and md 2015-07-29 14:50:00 +08:00
afc163
6f70303e90 Fix table, 当数据量少于每页数量时,直接设置数据 2015-07-29 14:01:15 +08:00
yiminghe
ee10b7c7d8 fix ant-select 2015-07-29 12:50:41 +08:00
jljsj
1559d44c96 updata specs and child node Animation 2015-07-29 12:17:18 +08:00
afc163
8a638a0c65 update devDependencies 2015-07-29 11:13:02 +08:00
zhujun24
c494da18aa optimize alert 2015-07-29 10:27:31 +08:00
偏右
a4c286fe10 Update README.md 2015-07-28 21:39:57 +08:00
afc163
65d6f32e18 update radio API document 2015-07-28 20:22:37 +08:00
afc163
09c0bd7c4b update tag demo and document 2015-07-28 20:15:25 +08:00
afc163
2e0be628a7 update tag style 2015-07-28 20:03:10 +08:00
afc163
2b85689477 update animation demo 2015-07-28 18:33:40 +08:00
jljsj
8f1a616b2e add enterAnimation 2015-07-28 17:55:40 +08:00
afc163
6344e9151b Add component tag 2015-07-28 17:08:06 +08:00
jljsj
d8ce9894a8 updata demo 2015-07-28 16:08:52 +08:00
jljsj
fe0ea83ebd updata 2015-07-28 16:06:45 +08:00
jljsj
fbb7a99a9e updata 2015-07-28 15:42:43 +08:00
zhujun24
19a2604b71 notification half 2015-07-28 15:40:28 +08:00
afc163
b6fe8021f8 render when change dataSource 2015-07-28 15:20:33 +08:00
jljsj
87c68279e1 add enterAnimation 2015-07-28 15:16:51 +08:00
zhujun24
405b85b60b close icon style 2015-07-28 14:52:01 +08:00
afc163
695d27b290 update version to 0.7.3-beta3 2015-07-28 14:03:53 +08:00
afc163
ba61ebd54b 支持动态传入分页信息 2015-07-28 14:02:18 +08:00
afc163
7aa01c464e change index.md title 2015-07-28 12:33:09 +08:00
afc163
699a6c9ad3 Add enter-animation 2015-07-28 12:32:27 +08:00
afc163
fb3b16ddc2 修复本地模式的 table 分页 current 页面失效的问题 2015-07-28 12:26:54 +08:00
zhujun24
eea48ffe16 Alert component 2015-07-27 20:53:08 +08:00
afc163
b7d204967d Refactor node pagination code, Add noPagination demo 2015-07-27 19:58:51 +08:00
afc163
deb00174aa update version 2015-07-27 19:27:12 +08:00
afc163
14116da375 fix pagination showQuickJumper typo 2015-07-27 19:24:14 +08:00
afc163
3442cc7832 fix pagination false bug 2015-07-27 19:23:51 +08:00
afc163
6007d4d840 version change to 0.7.3 2015-07-27 19:23:30 +08:00
afc163
b1085ecf38 update version to 0.8.0-beta 2015-07-27 17:26:59 +08:00
298 changed files with 10998 additions and 3202 deletions

View File

@@ -1,34 +1,43 @@
{
"rules": {
"indent": [
2,
2
],
"quotes": [
2,
"single"
],
"linebreak-style": [
2,
"unix"
],
"semi": [
2,
"always"
],
"react/react-in-jsx-scope": 1,
"react/jsx-uses-react": 1
},
"extends": ["eslint-config-airbnb"],
"env": {
"es6": true,
"browser": true,
"node": true
},
"ecmaFeatures": {
"jsx": true,
"modules": true
"jsx": true
},
"parser": "babel-eslint",
"plugins": [
"react"
]
"react",
"babel"
],
"rules": {
"constructor-super": 2,
"comma-dangle": 0,
"func-names": 0,
"guard-for-in": 0,
"one-var": [2, { "initialized": "never" }],
"prefer-const": 0,
"key-spacing": 0,
"no-eq-null": 0,
"no-else-return": 0,
"no-param-reassign": 0,
"no-this-before-super": 2,
"no-undef": 2,
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
"babel/object-shorthand": 0,
"react/jsx-boolean-value": 0,
"react/jsx-no-duplicate-props": 2,
"react/prop-types": [2, { "ignore": [ "children", "className", "style" ] }],
"react/sort-comp": 0,
"react/wrap-multilines": 0,
"react/no-multi-comp": 0,
"react/prop-types": 0,
"space-after-keywords": 0,
"space-before-blocks": 0,
"space-before-function-paren": 0,
"spaced-comment": 0,
"vars-on-top": 0
}
}

6
.lesslintrc Normal file
View File

@@ -0,0 +1,6 @@
{
"import": false,
"require-newline": false,
"leading-zero": false,
"single-comment": false
}

6
.si.yml Normal file
View File

@@ -0,0 +1,6 @@
before_deploy:
- tnpm install && tnpm update
- tnpm run just-deploy
options:
branch: 'master'
dist: '_site'

6
404.html Normal file
View File

@@ -0,0 +1,6 @@
<p>找不到此页,三秒后返回首页...</p>
<script>
setTimeout(function() {
location.href = '/';
}, 3000);
</script>

View File

@@ -1,4 +1,96 @@
## 0.7.2 (2015-07-27)
# 更新日志
- category: 4
---
## 0.9.4 `2015-11-04`
* 增加对 React 版本的检测提示机制0.9.x 序列只能使用 `react@~0.13.3`
## 0.9.2 `2015-10-26`
* Tooltip 的 title 为空时不展示浮层。[9b53117](9b5311791e73270c7c16a602ac74dd59719a5f76)
* 修复 Upload 文件列表链接的 target 属性。[340a170](340a1702b6a7b065ac02d417c891e1886dfe470d)
* 修复 Datepicker 设置 defaultValue 时星期顺序错误的问题。[9ef1450](9ef14500f3abfcc7081f8dceab8187ec835e3918)
* 修复一些小的样式问题。
## 0.9.1 `2015-09-26`
* 添加 Pagination pageSize 发生变化的回调。[#317](https://github.com/ant-design/ant-design/issues/317)
* 升级依赖 rc-upload 到 1.6.x修复 IE8/9 下的兼容性问题。
* 升级依赖 rc-steps 到 1.3.x。
* 新增 current 属性,方便配置当前的步骤。[#290](https://github.com/ant-design/ant-design/issues/290)
* 修复因滚动条影响页面宽度导致的错位问题。
* 升级依赖 rc-menu 到 1.5.x。
* 新增 onSelect 回调中返回参数 keyPath从而支持只展开当前父级菜单的交互方式。[demo](http://ant.design/components/menu/#demo-sider-current)
* 修复 hover 类型的弹出菜单能响应点击事件的问题。[react-component/menu#14](https://github.com/react-component/menu/issues/14)
* 修复一个 Table 的分页无法正确展示的问题。[#253](https://github.com/ant-design/ant-design/issues/253)
* 修复一个 combobox 选择框无法选中的问题。[0435ca6](https://github.com/ant-design/ant-design/commit/0435ca60e3b574bac3808a10ba3db62f482335fd)
* 修复 Radio.Button 在 IE 8 下不可用的问题。[#321](https://github.com/ant-design/ant-design/issues/321)
* 适配 breadcrumb 面包屑组件和 `react-router@1.0.0-rc1`
* 修复只能同时弹出一个 Modal 通知框的问题。[d6a4094](https://github.com/ant-design/ant-design/commit/d6a4094bc4c72acd05be001c7e46dbd17092001a)
* 升级依赖 rc-tooltip 到 2.8.0,增加 overlayClassName 属性。
* 部分组件交互和视觉效果修正。
## 0.9.0 `2015-09-14`
* 新增 [timeline](components/timeline/) 和 [badge](components/badge/) 组件。
* 优化弹出层类组件的动画效果,使其更加流畅。
* 部分文案更新。
* 优化主站在小分辨率屏幕下的样式。
* 使用 instantclick 改造主站,加载速度有明显提升。
* antd-bin 升级到 [0.6.x](https://github.com/ant-design/antd-bin/blob/master/HISTORY.md) 。
* Upload **重构了 API 接口,不向下兼容**,支持自定义的功能扩展。
* 新增 `onChange(file) {}` 接口,移出原来的 `onSuccess``onProgess``onError` 等接口。
* 新增 `fileList``defaultFileList` 属性,以满足更多的自定义功能,具体见演示。
* 设置 fileList 数组项的 url 属性可以作为链接展示在文件列表中方便下载。
* 移除内建的上传成功或失败的信息提示,业务可自行实现。
* 修正多文件选择上传时文件列表只展示一个文件的问题。
* Table
* 新增可展开的 table。[#258](https://github.com/ant-design/ant-design/pull/258)
* 新增无数据的展示样式。[4c54644](https://github.com/ant-design/ant-design/commit/4c54644116d46cb2510d2d475234529bad60e5d5)
* 修复本地模式 `dataSource` 无法更新的问题。[6d2dcc4](https://github.com/ant-design/ant-design/commit/6d2dcc45393b6ec0ad1ba73caf8b1ec42353743f)
* 修复远程模式 loading 失效的问题。[9b8abb2](https://github.com/ant-design/ant-design/commit/9b8abb219934c246970a84200818aa8f85974bdf)
* 用 [reqwest-without-xhr2](http://npmjs.com/reqwest-without-xhr2) 代替了 reqwest解决某些开发环境下 xhr2 依赖的问题。
* Select
* 增加 label 属性,允许多选模式下展示标签(原来只能显示 value 值)。[演示](http://react-component.github.io/select/examples/mul-suggest.html)
* 修复 combobox 模式下 value 失效的问题。
* Notification 修复不会自动消失的问题。[23fce55](https://github.com/ant-design/ant-design/commit/23fce559b0b2faf4e0b686a92dbcdd045727a464)
* Steps 新增竖版的步骤条。
* Carousel 修复 fade 模式下可以拖拽的问题。#212
* Collapse 修复动画不生效的问题。
* Datepicker 修复无法设置为空值的问题。
* Modal
* 添加 [通知类型](http://ant.design/components/modal/#demo-info) 的对话框函数。
*`Modal.confirm()` 代替 `confirm()` 方法。
* 修改为需要在 onCancel 手动设置 visible 属性来关闭。
* Message 添加 [加载中类型](http://ant.design/components/message/#demo-loading)。
* Radio 修改 Radio.Group 容器的盒模型属性为 inline-block 。
* Enter Animation
* 大幅度的重构,全新 API 的设计。
* 支持和 react-router 结合使用。
## 0.8.0 `2015-08-25`
这个版本是第一个稳定版,组件经过三期迭代,基本到齐,并有大量改进和变化,不向下兼容。
* 新增九个组件 `menu``upload``carousel``tree``notification``validation``affix``alert``enterAnimation`。目前共有组件 34 个,基本能满足后台类项目的组件需求。
* 新增设计文档部分,包括文字、色彩、动画。
* 重新梳理了设计和 React 实现部分的关系,强调了 Ant Design 的设计属性,并更新了网站的信息结构。
* 构建工具 `antd-bin` 升级到 `0.4.0` 版本,支持合并 webpack 配置热替换HMR等特性[详见](https://github.com/ant-design/antd-bin)。
* 组件动画优化和补充,体验更加流畅动感。
* 排查并修复 IE 和 safari 等浏览器的兼容问题。
* 大量代码重构,演示代码补充,文档更新、以及样式上的优化。
## 0.7.3 `2015-07-30`
* 小幅重构了 Table 分页,修复了分页导致的数据不展示的问题。
* 更新了部分文档。
## 0.7.2 `2015-07-27`
* 修复本地模式下 pagination 为 false 时数据无法显示的 [问题](https://github.com/ant-design/ant-design/commit/1954586665e59031eae5d2c8b2cdb08f83d64fcb)。
* 重构了 message 组件。
@@ -6,14 +98,14 @@
* 部分代码切换至 ES6 模式。
* 修正了部分组件的样式和演示,优化部分动画。
## 0.7.1 (2015-07-22)
## 0.7.1 `2015-07-22`
* 修复了 Table 组件的 pagination 为 false 时分页未消失的 [问题](https://github.com/ant-design/ant-design/commit/01a6c0f1e6707b72a54ef30d073d148a87b391a8)。
* select 组件[选中后默认显示标签内容](https://github.com/ant-design/ant-design/issues/50)(原来是显示 value
* 修正了部分组件的样式和演示。
* 打包文件为 [umd 模式](https://github.com/ant-design/ant-design/commit/9b7b940cb417429d8fc57d83e252991b043d0f2f)。
## 0.7.0 (2015-07-21)
## 0.7.0 `2015-07-21`
* 第一个公开版本,发布 `layout``iconfont``button``form``checkbox``radio``switch``slider``input-number``datepicker``select``tabs``steps``breadcrumb``collapse``pagination``modal``message``dropdown``popover``popconfirm``tooltip``progress``table` 等组件。
* 发布 [Ant Design 首页](http://ant.design/) 和入门文档。

View File

@@ -1,15 +1,13 @@
# Ant Design [![](https://img.shields.io/travis/ant-design/ant-design.svg?style=flat-square)](https://travis-ci.org/ant-design/ant-design) [![npm package](https://img.shields.io/npm/v/antd.svg?style=flat-square)](https://www.npmjs.org/package/antd) [![Dependency Status](https://david-dm.org/ant-design/ant-design.svg?style=flat-square)](https://david-dm.org/ant-design/ant-design)
# Ant Design [![](https://img.shields.io/travis/ant-design/ant-design.svg?style=flat-square)](https://travis-ci.org/ant-design/ant-design) [![npm package](https://img.shields.io/npm/v/antd.svg?style=flat-square)](https://www.npmjs.org/package/antd) [![Join the chat at https://gitter.im/ant-design/ant-design](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ant-design/ant-design?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
An enterprise grade front-end development language and React-based implementation.
Design documents and component implementations are still being revised so several pages are not yet complete. We are currently planning a release version for August.
An enterprise-class UI design language and React-based implementation.
![](https://t.alipayobjects.com/images/rmsweb/T11aVgXc4eXXXXXXXX.svg)
## Features
- An enterprise-grade graphical design language and framework for financial applications
- Rich library of React UI components.
- An enterprise-class graphical design language and framework for financial applications
- Rich library of UI components base on [React Component](http://react-component.github.io/badgeboard/).
- A Component development model based on React.
- Backed by the npm ecosystem.
- webpack-based debug builds supporting ES6
@@ -18,9 +16,7 @@ Design documents and component implementations are still being revised so severa
## Usage example
```jsx
var antd = require('antd');
var Datepicker = antd.Datepicker;
import { Datepicker } from 'antd';
React.render(<Datepicker />, mountNode);
```
@@ -35,31 +31,10 @@ React.render(<Datepicker />, mountNode);
- [React modules](http://react-component.github.io/)
- [React style guide](https://github.com/react-component/react-component.github.io/blob/master/docs/en-US/component-code-style.md)
- [React component design guide](https://github.com/react-component/react-component.github.io/blob/master/docs/en-US/component-design.md)
- [Developer Instruction](https://github.com/ant-design/ant-design/wiki/%E7%BD%91%E7%AB%99%E5%92%8C%E7%BB%84%E4%BB%B6%E5%BC%80%E5%8F%91%E8%AF%B4%E6%98%8E)
- [Versioning Release Note](https://github.com/ant-design/ant-design/wiki/%E7%89%88%E6%9C%AC%E5%8F%91%E5%B8%83%E6%B5%81%E7%A8%8B)
## Contributing
We welcome all contributions, please 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).
## Development
#### Building locally
```bash
$ npm start
```
Then open `http://127.0.0.1:8000`.
#### [Website](http://ant.design) deployment
```bash
$ npm run deploy
```
#### Creating a release build
```bash
$ npm run release
```

View File

@@ -1,15 +1,17 @@
# Ant Design [![](https://img.shields.io/travis/ant-design/ant-design.svg?style=flat-square)](https://travis-ci.org/ant-design/ant-design) [![npm package](https://img.shields.io/npm/v/antd.svg?style=flat-square)](https://www.npmjs.org/package/antd) [![Dependency Status](https://david-dm.org/ant-design/ant-design.svg?style=flat-square)](https://david-dm.org/ant-design/ant-design)
# Ant Design [![](https://img.shields.io/travis/ant-design/ant-design.svg?style=flat-square)](https://travis-ci.org/ant-design/ant-design) [![npm package](https://img.shields.io/npm/v/antd.svg?style=flat-square)](https://www.npmjs.org/package/antd) [![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)
一套企业级的前端设计语言和基于 React 实现。
一套企业级的 UI 设计语言和 React 实现。
设计文档和组件实现均在紧密整理和开发中,部分页面可能不完善,预计 8 月份释出正式版本。
![](https://t.alipayobjects.com/images/rmsweb/T11aVgXc4eXXXXXXXX.svg)
<p align="center">
<a href="http://ant.design">
<img width="360" src="https://t.alipayobjects.com/images/rmsweb/T1B9hfXcdvXXXXXXXX.svg">
</a>
</p>
## 特性
- 企业级金融产品的交互语言和视觉体系
- 丰富实用的 React UI 组件。
- 提炼自企业级后台产品的交互语言和视觉风格
- [React Component](http://react-component.github.io/badgeboard/) 基础上二次封装的丰富实用的 UI 组件。
- 基于 React 的组件化开发模式。
- 背靠 npm 生态圈。
- 基于 webpack 的调试构建方案,支持 ES6。
@@ -18,9 +20,7 @@
## 示例
```jsx
var antd = require('antd');
var Datepicker = antd.Datepicker;
import { Datepicker } from 'antd';
React.render(<Datepicker />, mountNode);
```
@@ -29,38 +29,15 @@ React.render(<Datepicker />, mountNode);
- [首页](http://ant.design/)
- [文档](http://ant.design/docs/introduce)
- [组件](http://ant.design/components/)
- [构建调试工具](https://github.com/ant-design/antd-bin)
- [构建调试 antd-bin](https://github.com/ant-design/antd-bin)
- [开发计划](https://github.com/ant-design/ant-design/issues/9)
- [修改记录](CHANGELOG.md)
- [React 模块](http://react-component.github.io/)
- [React 代码规范](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-code-style.md)
- [组件设计原则](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-design.md)
- [网站和组件开发说明](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/%E7%89%88%E6%9C%AC%E5%8F%91%E5%B8%83%E6%B5%81%E7%A8%8B)
## 如何贡献
我们欢迎任何形式的贡献,有任何建议或意见您可以进行 [Pull Request](https://github.com/ant-design/ant-design/pulls),或者给我们[提问](https://github.com/ant-design/ant-design/issues)。
## 开发说明
#### 本地调试
```bash
$ npm install
$ npm start
```
然后访问 http://127.0.0.1:8000 。
#### [网站](http://ant.design)部署
```bash
$ npm run deploy
```
#### 版本构建
```bash
$ npm run release
```
我们欢迎任何形式的贡献,有任何建议或意见您可以进行 [Pull Request](https://github.com/ant-design/ant-design/pulls),或者给我们 [提问](https://github.com/ant-design/ant-design/issues)。

View File

@@ -0,0 +1,17 @@
# 基本
- order: 0
最简单的用法。
---
````jsx
var Affix = antd.Affix;
React.render(
<Affix>
<button className="ant-btn ant-btn-primary">固定在顶部</button>
</Affix>
, document.getElementById('components-affix-demo-basic'));
````

View File

@@ -0,0 +1,17 @@
# 偏移
- order: 1
达到一定的偏移量才触发。
---
````jsx
var Affix = antd.Affix;
React.render(
<Affix offset={75}>
<button className="ant-btn ant-btn-primary">固定在距离顶部 75px 的位置</button>
</Affix>
, document.getElementById('components-affix-demo-offset'));
````

107
components/affix/index.jsx Normal file
View File

@@ -0,0 +1,107 @@
import React from 'react';
import rcUtil from 'rc-util';
function getScroll(w, top) {
let ret = w['page' + (top ? 'Y' : 'X') + 'Offset'];
let method = 'scroll' + (top ? 'Top' : 'Left');
if (typeof ret !== 'number') {
let d = w.document;
//ie6,7,8 standard mode
ret = d.documentElement[method];
if (typeof ret !== 'number') {
//quirks mode
ret = d.body[method];
}
}
return ret;
}
function getOffset(element) {
let rect = element.getBoundingClientRect();
let body = document.body;
let clientTop = element.clientTop || body.clientTop || 0;
let clientLeft = element.clientLeft || body.clientLeft || 0;
let scrollTop = getScroll(window, true);
let scrollLeft = getScroll(window);
return {
top: rect.top + scrollTop - clientTop,
left: rect.left + scrollLeft - clientLeft
};
}
let Affix = React.createClass({
getDefaultProps() {
return {
offset: 0
};
},
propTypes: {
offset: React.PropTypes.number
},
getInitialState() {
return {
affix: false,
affixStyle: null
};
},
handleScroll() {
let affix = this.state.affix;
let scrollTop = getScroll(window, true);
let elemOffset = getOffset(this.getDOMNode());
if (!affix && (elemOffset.top - this.props.offset) < scrollTop) {
this.setState({
affix: true,
affixStyle: {
top: this.props.offset,
left: elemOffset.left,
width: this.getDOMNode().offsetWidth
}
});
}
if (affix && (elemOffset.top - this.props.offset) > scrollTop) {
this.setState({
affix: false,
affixStyle: null
});
}
},
componentDidMount() {
this.scrollEvent = rcUtil.Dom.addEventListener(window, 'scroll', this.handleScroll);
this.resizeEvent = rcUtil.Dom.addEventListener(window, 'resize', this.handleScroll);
},
componentWillUnmount() {
if (this.scrollEvent) {
this.scrollEvent.remove();
}
if (this.resizeEvent) {
this.resizeEvent.remove();
}
},
render() {
const className = rcUtil.classSet({
[this.props.className]: this.props.className,
'ant-affix': this.state.affix
});
return (
<div {...this.props}>
<div className={className} style={this.state.affixStyle}>
{this.props.children}
</div>
</div>
);
}
});
module.exports = Affix;

View File

@@ -1,7 +1,21 @@
# Affix
- category: Components
- chinese: 固
- chinese: 固
---
将页面元素钉在可视范围。
## 何时使用
当内容区域比较长,需要滚动页面时,这部分内容对应的操作或者导航需要在滚动范围内始终展现。常用于侧边菜单和按钮组合。
页面可视范围过小时,慎用此功能以免遮挡页面内容。
## API
| 成员 | 说明 | 类型 | 默认值 |
|-------------|----------------|--------------------|--------------|
| offset | 达到指定偏移量后触发 | Number | 0 |

View File

@@ -0,0 +1,14 @@
# 基本
- order: 0
最简单的用法,适用于简短的警告提示。
---
````jsx
var Alert = antd.Alert;
React.render(<Alert message="成功提示的文案" type="success" />
, document.getElementById('components-alert-demo-basic'));
````

View File

@@ -0,0 +1,27 @@
# 可关闭的警告提示
- order: 1
显示关闭按钮,点击可关闭警告提示。
---
````jsx
var Alert = antd.Alert;
var onClose = function(e) {
console.log(e, '我要被关闭啦!');
};
React.render(<div>
<Alert message="警告提示的文案"
type="warn"
closable
onClose={onClose} />
<Alert message="错误提示的文案"
description="错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍"
type="error"
closable
onClose={onClose} />
</div>, document.getElementById('components-alert-demo-closable'));
````

View File

@@ -0,0 +1,16 @@
# 自定义关闭
- order: 4
可以自定义关闭,自定义的文字会替换原先的关闭 `Icon`
---
````jsx
var Alert = antd.Alert;
var link = <a href="javascript:;">不再提醒</a>
React.render(
<Alert message="消息提示的文案" type="info" closeText={link} />
, document.getElementById('components-alert-demo-close-type'));
````

View File

@@ -0,0 +1,28 @@
# 含有辅助性文字介绍
- order: 2
含有辅助性文字介绍的警告提示。
---
````jsx
var Alert = antd.Alert;
React.render(<div>
<Alert message="成功提示的文案"
description="成功提示的辅助性文字介绍成功提示的辅助性文字介绍成功提示的辅助性文字介绍成功提示的辅助性文字介绍"
type="success" />
<Alert message="消息提示的文案"
description="消息提示的辅助性文字介绍消息提示的辅助性文字介绍消息提示的辅助性文字介绍"
type="info" />
<Alert
message="警告提示的文案"
description="警告提示的辅助性文字介绍警告提示的辅助性文字介绍"
type="warn" />
<Alert
message="错误提示的文案"
description="错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍错误提示的辅助性文字介绍"
type="error" />
</div>, document.getElementById('components-alert-demo-description'));
````

View File

@@ -0,0 +1,19 @@
# 四种样式
- order: 3
共有四种样式`success``info``warn``error`
---
````jsx
var Alert = antd.Alert;
React.render(<div>
<Alert message="成功提示的文案" type="success" />
<Alert message="消息提示的文案" type="info" />
<Alert message="警告提示的文案" type="warn" />
<Alert message="错误提示的文案" type="error" />
</div>,
document.getElementById('components-alert-demo-style'));
````

View File

@@ -0,0 +1,95 @@
import React from 'react';
import Animate from 'rc-animate';
export default React.createClass({
getDefaultProps() {
return {
prefixCls: 'ant-alert'
};
},
getInitialState() {
return {
closing: true,
closed: false
};
},
handleClose(e) {
let dom = React.findDOMNode(this);
dom.style.height = dom.offsetHeight + 'px';
// Magic code
// 重复一次后才能正确设置 height
dom.style.height = dom.offsetHeight + 'px';
this.setState({
closing: false
});
if (this.props.onClose) {
this.props.onClose.call(this, e);
}
},
animationEnd() {
this.setState({
closed: true,
closing: true
});
},
render() {
let iconClass = this.props.description ?
'ant-alert-with-description-icon anticon-' : 'ant-alert-icon anticon-';
switch (this.props.type) {
case 'success':
iconClass += 'check-circle';
break;
case 'info':
iconClass += 'info-circle';
break;
case 'error':
iconClass += 'exclamation-circle';
break;
case 'warn':
iconClass += 'question-circle';
break;
default:
iconClass += 'default';
}
let html;
let closeName = !this.state.closing ? ' ' + this.props.prefixCls + '-close' : '';
if (this.props.description) {
let close = this.props.closable ?
<a onClick={this.handleClose} className={'ant-alert-with-description-close-icon'}>
<span className="ant-alert-with-description-close-icon-x"></span>
</a> : '';
html = <div data-show={this.state.closing} className={'ant-alert-with-description ant-alert-with-description-' + this.props.type + closeName}>
<i className={'anticon ' + iconClass}></i>
<p className={'ant-alert-with-description-message'}>{this.props.message}</p>
<span className={'ant-alert-with-description-description'}>{this.props.description}</span>
{close}
</div>;
} else {
if (this.props.closeText) {
html = <div data-show={this.state.closing} className={'ant-alert ant-alert-' + this.props.type + closeName}>
<i className={'anticon ' + iconClass}></i>
<span className={'ant-alert-description'}>{this.props.message}</span>
<span onClick={this.handleClose} className={'ant-alert-close-text'}>{this.props.closeText}</span>
</div>;
} else {
let close = this.props.closable ?
<a onClick={this.handleClose} className={'ant-alert-close-icon'}>
<span className="ant-alert-close-icon-x"></span>
</a> : '';
html = <div data-show={this.state.closing} className={'ant-alert ant-alert-' + this.props.type + closeName}>
<i className={'anticon ' + iconClass}></i>
<span className={'ant-alert-description'}>{this.props.message}</span>
{close}
</div>;
}
}
return this.state.closed ? null : <Animate
component=""
showProp="data-show"
transitionName="slide-up"
onEnd={this.animationEnd}>
{html}
</Animate>;
}
});

View File

@@ -1,6 +1,25 @@
# Alert
- category: CSS
- chinese: 通知栏
- category: Components
- chinese: 警告提示
- type: 展示
---
警告提示,展现需要关注的信息。
## 何时使用
- 当某个页面需要向用户显示警告的信息时。
- 非浮层的静态展现形式,始终展现,不会自动消失,用户可以点击关闭。
## API
| 参数 | 说明 | 类型 | 默认值 |
|----------- |--------------------------------------------------------- | ---------- |-------|
| type | 必选参数,指定警告提示的样式,有四种选择`success``info``warn``error` | String | 无 |
| closable | 可选参数,默认不显示关闭按钮 | Boolean | 无 |
| closeText | 可选参数,自定义关闭按钮 | String | 无 |
| message | 必选参数,警告提示内容 | String | 无 |
| description | 可选参数,警告提示的辅助性文字介绍 | String | 无 |
| onClose | 可选参数,关闭时触发的回调函数 | Function | 无 |

View File

@@ -0,0 +1,20 @@
# 大数字
- order: 1
超过 99 的会显示为 `99+`
---
````jsx
var Badge = antd.Badge;
React.render(<div>
<Badge count="99">
<a href="#" className="head-example"></a>
</Badge>
<Badge count="200">
<a href="#" className="head-example"></a>
</Badge>
</div>, document.getElementById('components-badge-demo-99plus'));
````

View File

@@ -0,0 +1,30 @@
# 基本
- order: 0
简单的徽章展示。
---
````jsx
var Badge = antd.Badge;
React.render(
<Badge count="5">
<a href="#" className="head-example"></a>
</Badge>
, document.getElementById('components-badge-demo-basic'));
````
````css
.ant-badge {
margin-right: 16px;
}
.head-example {
width: 42px;
height: 42px;
border-radius: 6px;
background: #eee;
display: inline-block;
}
````

View File

@@ -0,0 +1,29 @@
# 讨嫌的小红点
- order: 3
没有具体的数字。
---
````jsx
var Badge = antd.Badge;
React.render(<div>
<Badge dot={true}>
<i className="anticon anticon-notification"></i>
</Badge>
<Badge dot={true}>
<a href="#">一个链接</a>
</Badge>
</div>, document.getElementById('components-badge-demo-dot'));
````
<style>
.anticon-notification {
width: 16px;
height: 16px;
line-height: 16px;
font-size: 16px;
}
</style>

View File

@@ -0,0 +1,19 @@
# 可点击
- order: 2
用 a 标签进行包裹即可。
---
````jsx
var Badge = antd.Badge;
React.render(
<a href="#">
<Badge count="5">
<span className="head-example"></span>
</Badge>
</a>
, document.getElementById('components-badge-demo-link'));
````

View File

@@ -0,0 +1,49 @@
import React, { cloneElement } from 'react';
const prefixCls = 'ant-badge';
class AntBadge extends React.Component {
constructor(props) {
super(props);
this.state = {
count: props.count
};
}
render() {
if (this.props.dot) {
return <span className={prefixCls} {...this.props}>
{this.props.children}
<sup className={prefixCls + '-dot'}></sup>
</span>;
}
let count = this.state.count;
if (!count) {
return cloneElement(this.props.children);
} else {
count = count >= 100 ? '99+' : count;
return (
<span className={prefixCls} title={this.state.count} {...this.props}>
{this.props.children}
<sup className={prefixCls + '-count'}>{count}</sup>
</span>
);
}
}
}
AntBadge.defaultProps = {
prefixCls: prefixCls,
count: null,
dot: false
};
AntBadge.propTypes = {
count: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.number
]),
dot: React.PropTypes.bool
};
export default AntBadge;

26
components/badge/index.md Normal file
View File

@@ -0,0 +1,26 @@
# Badge
- category: Components
- chinese: 徽标数
- type: 展示
---
图标右上角的圆形徽标数字。
## 何时使用
一般出现在通知图标或头像的右上角,用于显示需要处理的消息条数,通过醒目视觉形式吸引用户处理。
## API
```jsx
<Badge count="5">
<a href="#" className="head-example"></a>
</Badge>
```
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|----------------|----------------------------------|------------|---------|--------|
| count | 展示的数字,大于 99 时显示为 99+ | Number | | |
| dot | 不展示数字,只有一个小红点 | boolean | | false |

View File

@@ -2,16 +2,16 @@
- order: 2
`react-router@0.13.x` 进行结合使用。
`react-router@1.x` 进行结合使用。
---
````jsx
var Router = require('react-router');
var Route = Router.Route;
var Link = Router.Link;
var RouteHandler = Router.RouteHandler;
var Breadcrumb = require('antd/lib/breadcrumb');
var ReactRouter = require('react-router');
var Router = ReactRouter.Router;
var Route = ReactRouter.Route;
var Link = ReactRouter.Link;
var Breadcrumb = require('antd').Breadcrumb;
var Apps = React.createClass({
render() {
@@ -22,36 +22,34 @@ var Apps = React.createClass({
}
});
var App = React.createClass({
var Home = React.createClass({
render() {
return (<div>
<div className="demo-nav">
<Link to="/">首页</Link>
<Link to="/apps">应用列表</Link>
</div>
<RouteHandler />
{this.props.children || 'Home'}
<div style={{
marginBottom: 15,
marginTop: 15,
paddingBottom: 15,
borderBottom: '1px dashed #ccc'
}}>点击上面的导航切换页面,面包屑在下面:</div>
<Breadcrumb Router={Router} />
<Breadcrumb {...this.props} router={ReactRouter} />
</div>);
}
});
var routes = (
<Route name="首页" path="/" handler={App} ignoreScrollBehavior>
<Route name="应用列表" path="/apps" handler={Apps}>
<Route name="应用:id" path="/apps/:id" handler={App} />
React.render((
<Router>
<Route name="home" breadcrumbName="首页" path="/" component={Home} ignoreScrollBehavior>
<Route name="apps" breadcrumbName="应用列表" path="apps" component={Apps}>
<Route name="app" breadcrumbName="应用:id" path=":id" />
</Route>
</Route>
</Route>
);
Router.run(routes, Router.HashLocation, (Root) => {
React.render(<Root />, document.getElementById('components-breadcrumb-demo-router'));
});
</Router>
), document.getElementById('components-breadcrumb-demo-router'));
````
<style>

View File

@@ -3,9 +3,12 @@ import React from 'react';
let prefixCls = 'ant-breadcrumb';
let BreadcrumbItem = React.createClass({
propTypes: {
href: React.PropTypes.string
},
render() {
var link = <a className={prefixCls + '-link'} {...this.props}>{this.props.children}</a>;
var slash = <span className={prefixCls + '-slash'}>/</span>;
let link = <a className={prefixCls + '-link'} {...this.props}>{this.props.children}</a>;
let slash = <span className={prefixCls + '-slash'}>/</span>;
if (typeof this.props.href === 'undefined') {
link = <span className={prefixCls + '-link'} {...this.props}>{this.props.children}</span>;
}
@@ -14,24 +17,28 @@ let BreadcrumbItem = React.createClass({
});
let Breadcrumb = React.createClass({
contextTypes: {
router: React.PropTypes.func
propTypes: {
router: React.PropTypes.object,
routes: React.PropTypes.array,
params: React.PropTypes.object
},
render() {
var crumbs, routes, params;
if (this.context.router && this.props.Router) {
var Link = this.props.Router.Link;
routes = this.context.router.getCurrentRoutes();
params = this.context.router.getCurrentParams();
let crumbs;
let ReactRouter = this.props.router;
let routes = this.props.routes;
let params = this.props.params;
if (routes && routes.length > 0 && ReactRouter) {
let Link = ReactRouter.Link;
crumbs = routes.map(function(route, i) {
var name = route.name.replace(/\:(.*)/g, function(replacement, key) {
let name = route.breadcrumbName.replace(/\:(.*)/g, function(replacement, key) {
return params[key] || replacement;
});
var link;
let link;
let path = route.path.indexOf('/') === 0 ? route.path : ('/' + route.path);
if (i === routes.length - 1) {
link = <span>{name}</span>;
} else {
link = <Link to={route.path} params={params}>{name}</Link>;
link = <Link to={path} params={params}>{name}</Link>;
}
return <BreadcrumbItem key={name}>{link}</BreadcrumbItem>;
});

View File

@@ -2,7 +2,7 @@
- category: Components
- chinese: 面包屑
- order: 8
- type: 导航
---
@@ -13,3 +13,28 @@
- 当系统拥有超过两级以上的层级结构时;
- 当需要告知用户“你在哪里”时;
- 当需要向上导航的功能时。
## API
```html
<Breadcrumb>
<Breadcrumb.Item>首页</Breadcrumb.Item>
<Breadcrumb.Item href="">应用中心</Breadcrumb.Item>
<Breadcrumb.Item href="">应用列表</Breadcrumb.Item>
<Breadcrumb.Item>某应用</Breadcrumb.Item>
</Breadcrumb>
```
### Breadcrumb
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|-----------|------------------------------------------|------------|---------|--------|
| router | 可传入 react-router 的实例 | Object | | - |
| routes | router 的路由栈信息 | Array | | - |
| params | 路由的参数 | Object | | - |
### Breadcrumb.Item
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|-----------|------------------------------------------|------------|---------|--------|
| href | 链接,如不传则不可点击 | string | | - |

View File

@@ -2,16 +2,48 @@
- order: 7
点击后进入加载状态。
加载按钮。最后一个按钮演示点击后进入加载状态。
---
````html
<button class="ant-btn ant-btn-primary ant-btn-circle">
<span class="anticon anticon-loading"></span>
</button>
<button class="ant-btn ant-btn-primary">
<span>加载按钮</span>
<span class="anticon anticon-loading"></span>
</button>
````jsx
var App = React.createClass({
getInitialState() {
return {
loading: false
};
},
enterLoading() {
this.setState({
loading: true
});
},
render() {
var loadingClass = this.state.loading ? 'ant-btn-loading' : '';
return <div>
<button className="ant-btn ant-btn-primary ant-btn-lg ant-btn-loading">
加载中
</button>
<button className="ant-btn ant-btn-primary ant-btn-loading">
加载中
</button>
<button className="ant-btn ant-btn-primary ant-btn-sm ant-btn-loading">
加载中
</button>
<br />
<button className={'ant-btn ant-btn-primary ' + loadingClass} onClick={this.enterLoading}>
点击变加载
</button>
</div>;
}
});
React.render(<App />, document.getElementById('components-button-demo-loading'));
````
<style>
#components-button-demo-loading .ant-btn {
margin-right: 8px;
margin-bottom: 12px;
}
</style>

View File

@@ -1,8 +1,8 @@
# Button
- category: CSS
- category: Components
- chinese: 按钮
- order: 2
- type: 基本
---
@@ -17,8 +17,6 @@
- 按钮的基础样式为 `ant-btn`
在这里我们统一使用 **ant** 作为类名空间,当然你也可以自定义(通过覆盖 `@css-prefix` 变量即可)。
- 通过类组装的形式来产生不同的按钮样式,推荐遵循如下顺序:
```
.ant-btn
@@ -39,3 +37,5 @@
| `.ant-btn-circle` `.ant-btn-circle-outline` | 用于创建圆形按钮,`.ant-btn-circle-outline` 为描边按钮。 |
| `.ant-btn-lg` `.ant-btn-sm` | 定义按钮大小尺寸,目前提供三种尺寸:大中小,默认为中。 |
| `.ant-btn-group` | 按钮组合,通过按钮组容器把一组按钮放在同一行里。 |
> 当按钮只有两个汉字时,需要在两字中加空格。

View File

@@ -0,0 +1,21 @@
# 自动切换
- order: 3
定时切换下一张。
---
````jsx
var Carousel = antd.Carousel;
React.render(
<Carousel autoplay="true">
<div><h3>1</h3></div>
<div><h3>2</h3></div>
<div><h3>3</h3></div>
<div><h3>4</h3></div>
</Carousel>
, document.getElementById('components-carousel-demo-autoplay'));
````

View File

@@ -0,0 +1,20 @@
# 基本
- order: 0
最简单的用法。
---
````jsx
var Carousel = antd.Carousel;
React.render(
<Carousel>
<div><h3>1</h3></div>
<div><h3>2</h3></div>
<div><h3>3</h3></div>
<div><h3>4</h3></div>
</Carousel>
, document.getElementById('components-carousel-demo-basic'));
````

View File

@@ -0,0 +1,21 @@
# 渐显
- order: 2
切换效果为渐显。
---
````jsx
var Carousel = antd.Carousel;
React.render(
<Carousel effect="fade">
<div><h3>1</h3></div>
<div><h3>2</h3></div>
<div><h3>3</h3></div>
<div><h3>4</h3></div>
</Carousel>
, document.getElementById('components-carousel-demo-fade'));
````

View File

@@ -0,0 +1,20 @@
# 垂直
- order: 1
垂直显示。
---
````jsx
var Carousel = antd.Carousel;
React.render(
<Carousel vertical="true">
<div><h3>1</h3></div>
<div><h3>2</h3></div>
<div><h3>3</h3></div>
<div><h3>4</h3></div>
</Carousel>
, document.getElementById('components-carousel-demo-vertical'));
````

View File

@@ -0,0 +1,33 @@
import Carousel from 'react-slick';
import React from 'react';
import assign from 'object-assign';
const AntCarousel = React.createClass({
getDefaultProps() {
return {
dots: true,
arrows: false
};
},
render() {
let props = assign({}, this.props);
if (props.effect === 'fade') {
props.fade = true;
props.draggable = false;
}
let className = 'ant-carousel';
if (props.vertical) {
className = className + ' ant-carousel-vertical';
}
return (
<div className={className}>
<Carousel {...props} />
</div>
);
}
});
export default AntCarousel;

View File

@@ -2,5 +2,40 @@
- category: Components
- chinese: 走马灯
- type: 展示
---
旋转木马,一组轮播的区域。
## 何时使用
- 当有一组平级的内容。
- 当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。
- 常用于一组图片或卡片轮播。
## API
| 参数 | 说明 | 类型 | 默认值 |
|------------------|----------------------------------------------|----------|---------------------------------|
| effect | 动画效果函数,可取 scrollx, fade | String | scrollx |
| arrow | 是否显示前后翻页箭头 | Boolean | false |
| dots | 是否显示面板指示点 | Boolean | true |
| vertical | 垂直显示 | Boolean | false |
| autoplay | 是否自动切换 | Boolean | false |
| easing | 动画效果 | String | linear |
| onChange | 切换面板的回调 | Function | 无
<style>
.ant-carousel .slick-slide {
text-align: center;
height: 100px;
line-height: 100px;
background: #71B5DE;
color: #fff;
overflow: hidden;
}
#components-carousel-demo-vertical .ant-carousel {
margin-right: 35px;
}
</style>

View File

@@ -3,8 +3,11 @@ import React from 'react';
export default React.createClass({
getDefaultProps() {
return {prefixCls: 'ant-checkbox'};
}, render() {
return <Checkbox {...this.props}/>;
return {
prefixCls: 'ant-checkbox'
};
},
render() {
return <Checkbox {...this.props} />;
}
});

View File

@@ -2,7 +2,7 @@
- category: Components
- chinese: 多选框
- order: 1
- type: 表单
---

View File

@@ -2,7 +2,7 @@
- category: Components
- chinese: 折叠面板
- order: 9
- type: 展示
---

View File

@@ -0,0 +1,43 @@
let velocity;
if (typeof document !== 'undefined' && typeof window !== 'undefined') {
velocity = require('velocity-animate');
}
function animate(node, show, transitionName, done) {
let ok;
function complete() {
if (!ok) {
ok = true;
done();
}
}
// Fix safari flash bug
node.style.display = show ? 'block' : 'none';
velocity(node, transitionName, {
duration: 240,
complete: complete,
easing: 'easeInOutQuad'
});
return {
stop() {
velocity(node, 'finish');
complete();
}
};
}
const animation = {
enter(node, done) {
return animate(node, false, 'slideDown', done);
},
leave(node, done) {
return animate(node, true, 'slideUp', done);
},
appear(node, done) {
return animate(node, false, 'slideDown', done);
},
};
module.exports = animation;

View File

@@ -11,6 +11,6 @@
var Datepicker = antd.Datepicker;
React.render(
<Datepicker value="" />
<Datepicker defaultValue="2012-12-12" />
, document.getElementById('components-datepicker-demo-basic'));
````

View File

@@ -0,0 +1,19 @@
# 三种大小
- order: 1
三种大小的输入框,大的用在表单中,中的为默认。
---
````jsx
var Datepicker = antd.Datepicker;
React.render(
<div>
<Datepicker size="large" />
<Datepicker />
<Datepicker size="small" />
</div>
, document.getElementById('components-datepicker-demo-size'));
````

View File

@@ -1,7 +1,5 @@
import React from 'react';
import Calendar from 'rc-calendar';
const Datepicker = Calendar.Picker;
import Calendar, {MonthCalendar, Picker as Datepicker} from 'rc-calendar';
import GregorianCalendar from 'gregorian-calendar';
import zhCn from 'gregorian-calendar/lib/locale/zh-cn';
import CalendarLocale from 'rc-calendar/lib/locale/zh-cn';
@@ -10,72 +8,114 @@ import DateTimeFormat from 'gregorian-calendar-format';
// 和顶部文案保持一致
import Locale from 'gregorian-calendar-format/lib/locale/zh-cn';
Locale.shortMonths = ['1月', '2月', '3月', '4月', '5月', '6月',
'7月', '8月', '9月', '10月', '11月', '12月'];
'7月', '8月', '9月', '10月', '11月', '12月'];
// 以下两行代码
// 给没有初始值的日期选择框提供本地化信息
let defaultCalendarValue = new GregorianCalendar(zhCn);
defaultCalendarValue.setTime(Date.now());
export default React.createClass({
getInitialState() {
var value;
if (this.props.value) {
value = new GregorianCalendar(zhCn);
value.setTime(new Date(this.props.value).valueOf());
}
return {
value: value
};
},
componentWillReceiveProps(nextProps) {
if (nextProps.value) {
var value = new GregorianCalendar(zhCn);
value.setTime(new Date(nextProps.value).valueOf());
this.setState({
function createPicker(TheCalendar) {
return React.createClass({
getInitialState() {
let value;
if (this.props.value) {
value = new GregorianCalendar(zhCn);
value.setTime(new Date(this.props.value).valueOf());
}
return {
value: value
};
},
componentWillReceiveProps(nextProps) {
if ('value' in nextProps) {
let value = null;
if (nextProps.value) {
value = new GregorianCalendar(zhCn);
value.setTime(new Date(nextProps.value).valueOf());
}
this.setState({
value: value
});
}
},
getDefaultProps() {
return {
format: 'yyyy-MM-dd',
placeholder: '请选择日期',
transitionName: 'slide-up',
onSelect() {
}
};
},
handleChange(v) {
this.setState({
value: v
});
this.props.onSelect(new Date(v.getTime()));
},
render() {
let calendar = (
<TheCalendar
disabledDate={this.props.disabledDate}
locale={CalendarLocale}
orient={['top', 'left']}
defaultValue={defaultCalendarValue}
showTime={this.props.showTime}
prefixCls="ant-calendar"
showOk={this.props.showTime}
showClear={false} />
);
let sizeClass = '';
if (this.props.size === 'large') {
sizeClass = ' ant-input-lg';
} else if (this.props.size === 'small') {
sizeClass = ' ant-input-sm';
}
let defaultValue;
if (this.props.defaultValue) {
defaultValue = new GregorianCalendar(zhCn);
defaultValue.setTime(new Date(this.props.defaultValue).valueOf());
}
return (
<Datepicker
transitionName={this.props.transitionName}
disabled={this.props.disabled}
trigger={<span className="ant-calendar-picker-icon" />}
calendar={calendar}
adjustOrientOnCalendarOverflow={{x: true, y: false}}
formatter={new DateTimeFormat(this.props.format)}
value={this.state.value}
defaultValue={defaultValue}
prefixCls="ant-calendar-picker"
style={this.props.style}
onChange={this.handleChange}>
<input
placeholder={this.props.placeholder}
className={'ant-calendar-picker-input ant-input' + sizeClass}/>
</Datepicker>
);
}
},
});
}
const AntDatePicker = createPicker(Calendar);
const AntMonthPicker = createPicker(MonthCalendar);
const AntCalendar = React.createClass({
getDefaultProps() {
return {
format: 'yyyy-MM-dd',
placeholder: '请选择日期',
transitionName: 'slide-up',
onSelect: function () {}
locale: CalendarLocale,
prefixCls: 'ant-calendar',
};
},
handleChange(v) {
this.setState({
value: v
});
this.props.onSelect(new Date(v.getTime()));
},
render() {
var calendar = (
<Calendar
disabledDate={this.props.disabledDate}
locale={CalendarLocale}
orient={['top', 'left']}
defaultValue={defaultCalendarValue}
showTime={this.props.showTime}
prefixCls="ant-calendar"
showOk={this.props.showTime}
showClear={false}/>
);
return (
<Datepicker
transitionName={this.props.transitionName}
disabled={this.props.disabled}
trigger={<span className="ant-calendar-picker-icon" />}
calendar={calendar}
adjustOrientOnCalendarOverflow={false}
formatter={new DateTimeFormat(this.props.format)}
value={this.state.value}
prefixCls="ant-calendar-picker"
onChange={this.handleChange}>
<input placeholder={this.props.placeholder} className="ant-calendar-picker-input ant-input" />
</Datepicker>
);
return <Calendar {...this.props}/>;
}
});
AntDatePicker.Calendar = AntCalendar;
AntDatePicker.MonthPicker = AntMonthPicker;
export default AntDatePicker;

View File

@@ -2,7 +2,7 @@
- category: Components
- chinese: 日期选择框
- order: 5
- type: 表单
---
@@ -12,23 +12,25 @@
当用户需要输入一个日期/时间,可以点击标准输入框,弹出日期面板进行选择。支持键盘操作。
## API
```html
<Datepicker value="2015-01-01" />
```
## API
| 参数 | 说明 | 类型 | 默认值 |
|--------------|----------------|----------|--------------|
| value | 日期 | string | 无 |
| defaultValue | 默认日期 | string | 无 |
| format | 展示的日期格式 | string | "yyyy-MM-dd" |
| disabledDate | 不可选择的日期 | function | 无 |
| onSelect | 选择日期的回调 | function | 无 |
| showTime | 显示时间选择条 | boolean | false |
| disabled | 禁用 | bool | false |
| size | 输入框大小,`large` 高度为 32px`small` 为 22px默认是 28px | string | 无 |
<style>
.code-box-demo .ant-calendar-picker-input {
width: 200px;
.code-box-demo .ant-calendar-picker {
margin: 0 12px 12px 0;
}
</style>

View File

@@ -1,4 +1,4 @@
# 基本
# 触发事件
- order: 3
@@ -9,11 +9,11 @@
````jsx
var Menu = antd.Menu;
var Dropdown = antd.Dropdown;
var onClick = function (key){
var onSelect = function ({key}){
alert('选中了菜单' + key);
};
var menu = <Menu onClick={onClick}>
var menu = <Menu onSelect={onSelect}>
<Menu.Item key="1">第一个菜单项</Menu.Item>
<Menu.Item key="2">第二个菜单项</Menu.Item>
<Menu.Item key="3">第三个菜单项</Menu.Item>

View File

@@ -2,7 +2,7 @@
- category: Components
- chinese: 下拉菜单
- order: 13
- type: 展示
---
@@ -10,18 +10,19 @@
## 何时使用
当页面元素过多时,用此组件可以收纳元素。点击或移入触点,会出现一个下拉菜单。可在列表中进行选择,并执行相应的命令。
当页面上的操作命令过多时,用此组件可以收纳操作元素。点击或移入触点,会出现一个下拉菜单。可在列表中进行选择,并执行相应的命令。
## API
属性如下
| 成员 | 说明 | 类型 | 默认值 |
|-------------|----------------|--------------------|--------------|
| trigger | 触发下行为 | "click" or "hover" | hover |
| overlay | 菜单节点 | React.Element | 无 |
| 成员 | 说明 | 类型 | 默认值 |
|-------------|------------------|--------------------|--------------|
| trigger | 触发下拉的行为 | "click" or "hover" | hover |
| overlay | 菜单节点 | React.Element | 无 |
| onSelect | 选择后的回调 | function(e) {} | 无 |
菜单可由 `antd.Menu` 取得,可设置 `onClick` 回调,菜单还包括菜单项 `antd.Menu.Item`,分割线 `antd.Menu.Divider`
菜单可由 `antd.Menu` 取得,可设置 `onSelect` 回调,菜单还包括菜单项 `antd.Menu.Item`,分割线 `antd.Menu.Divider`
> 注意: Menu.Item 必须设置唯一的 key 属性。

View File

@@ -0,0 +1,66 @@
# 进场和离场
- order: 1
自动。
---
````jsx
var EnterAnimation = antd.EnterAnimation;
var Test = React.createClass({
getInitialState() {
return {
show: true
}
},
onClick() {
this.setState({
show: !this.state.show
})
},
render() {
return (
<div>
<div style={{marginBottom: 20}}>
<button className="ant-btn ant-btn-primary" onClick={this.onClick}>切换</button>
</div>
<EnterAnimation>
{this.state.show ?
<div className="demo-content" key='a'>
<div className="demo-kp">
<ul>
<li></li>
<li></li>
<li></li>
</ul>
</div>
<div className="demo-listBox">
<div className="demo-list">
<div className="title"></div>
<ul>
<li></li>
<li></li>
<li></li>
</ul>
</div>
</div>
</div> : null}
</EnterAnimation>
</div>
);
}
});
React.render(<Test />
, document.getElementById('components-enter-animation-demo-basic'));
````
<style>
#components-enter-animation-demo-basic {
text-align: center;
overflow: hidden;
margin: 20px auto;
}
</style>

View File

@@ -0,0 +1,76 @@
# 指定节点动画进出场
- order: 3
通过加上 `enter-data` 属性来指定需要动画进场的元素,并且可以定义每个元素的动画效果。
---
````jsx
var EnterAnimation = antd.EnterAnimation;
var Test = React.createClass({
getInitialState() {
return {
enter: {
type: 'right',
interval: .1,
},
leave: {
type:'left',
interval: 0.03
},
show: true
}
},
onClick() {
this.setState({
show: !this.state.show
})
},
render() {
return (
<div>
<div style={{marginBottom: 20}}>
<button className="ant-btn ant-btn-primary" onClick={this.onClick}>切换</button>
</div>
<EnterAnimation enter={this.state.enter} leave={this.state.leave}>
{this.state.show ? <div key='enter-data'>
<div className="demo-content">
<div className="demo-kp">
<ul>
<li enter-data></li>
<li enter-data></li>
<li enter-data></li>
</ul>
</div>
<div className="demo-listBox">
<div className="demo-list">
<div className="title" enter-data={{type: 'bottom', queueId: 1}}></div>
<ul>
<li enter-data={{type: 'bottom', queueId: 1}}></li>
<li enter-data={{type: 'bottom', queueId: 1}}></li>
<li enter-data={{type: 'bottom', queueId: 1}}></li>
</ul>
</div>
</div>
</div>
</div> : null}
</EnterAnimation>
</div>
)
}
});
React.render(<Test />
, document.getElementById('components-enter-animation-demo-enter-data'));
````
<style>
#components-enter-animation-demo-enter-data {
text-align: center;
overflow: hidden;
margin: 18px auto;
}
</style>

View File

@@ -0,0 +1,82 @@
# 配置进出场的样式
- order: 2
配置进出场动画样式。
---
````jsx
var EnterAnimation = antd.EnterAnimation;
var Test = React.createClass({
getInitialState() {
return {
enter:{
type: 'right',
interval: 0.3,
callback:() => {
console.log('enter');
}
},
leave:{
type: 'left',
interval: .1,
callback:() => {
console.log('leave');
}
},
show:true,
}
},
onClick() {
this.setState({
show:!this.state.show,
})
},
render() {
return (
<div>
<div style={{marginBottom: 20}}>
<button className="ant-btn ant-btn-primary" onClick={this.onClick}>切换</button>
</div>
<EnterAnimation enter={this.state.enter} leave={this.state.leave}>
{this.state.show ?
<div className="demo-content" key='demo'>
<div className="demo-kp">
<ul>
<li></li>
<li></li>
<li></li>
</ul>
</div>
<div className="demo-listBox">
<div className="demo-list">
<div className="title"></div>
<ul>
<li></li>
<li></li>
<li></li>
</ul>
</div>
</div>
</div> : null}
</EnterAnimation>
</div>
);
}
});
React.render(<Test />
, document.getElementById('components-enter-animation-demo-enter-leave'));
````
<style>
#components-enter-animation-demo-enter-leave {
text-align: center;
overflow: hidden;
margin: 20px auto;
}
</style>

View File

@@ -0,0 +1,101 @@
# 表单动画进出场
- order: 6
表单组合的进场与出场动画。
---
````jsx
var EnterAnimation = antd.EnterAnimation;
var Select = antd.Select;
var Option = Select.Option;
var Checkbox = antd.Checkbox;
var Radio = antd.Radio;
var RadioGroup = antd.Radio.Group;
var Test = React.createClass({
getInitialState() {
return {
enter: {
type: 'right',
callback: null,
interval: 0.1
},
leave: {
type: 'left',
reverse: true,
interval: 0.05,
ease:'cubic-bezier(0.55, 0.085, 0.68, 0.53)',
callback: ()=> {
console.log('出场结束')
}
},
show: true
}
},
onClick() {
this.setState({
show: !this.state.show
})
},
render() {
return (
<div>
<div style={{marginBottom: 20, textAlign: 'center'}}>
<button className="ant-btn ant-btn-primary" onClick={this.onClick}>切换</button>
</div>
<EnterAnimation enter={this.state.enter} leave={this.state.leave} component='form' className="ant-form-horizontal">
{this.state.show ? <div key='from'>
<div className="ant-form-item ant-form-item-compact">
<label htmlFor="userName" className="col-6" required>用户名:</label>
<div className="col-6">
<p className="ant-form-text">大眼萌 minion</p>
</div>
</div>
<div className="ant-form-item">
<label htmlFor="password" className="col-6" required>密码:</label>
<div className="col-14">
<input className="ant-input" type="password" id="password" placeholder="请输入密码"/>
</div>
</div>
<div className="ant-form-item ant-form-item-compact">
<label className="col-6" required>您的性别:</label>
<div className="col-14">
<RadioGroup value="male">
<Radio value="male">男的</Radio>
<Radio value="female">女的</Radio>
</RadioGroup>
</div>
</div>
<div className="ant-form-item">
<label htmlFor="remark" className="col-6" required>备注:</label>
<div className="col-14">
<textarea className="ant-input" id="remark" placeholder="随便写"></textarea>
<p className="ant-form-explain">随便写点什么</p>
</div>
</div>
<div className="ant-form-item ant-form-item-compact">
<div className="col-14 col-offset-6">
<label>
<Checkbox />
同意
</label>
</div>
</div>
<div className="row">
<div className="col-16 col-offset-6">
<input type="submit" className="ant-btn ant-btn-primary" value="确 定" />
</div>
</div>
</div> : null}
</EnterAnimation>
</div>
)
}
});
React.render(<Test />
, document.getElementById('components-enter-animation-demo-form'));
````

View File

@@ -0,0 +1,95 @@
# 页面的进场和离场
- order: 5
页面的进场和离场。
---
````jsx
var EnterAnimation = antd.EnterAnimation;
var Test = React.createClass({
getInitialState() {
return {
show: true,
enter:{
type:'right',
ease:'cubic-bezier(0.19, 1, 0.22, 1)'
},
leave:{
type:'left',
ease:'cubic-bezier(0.455, 0.03, 0.515, 0.955)',
reverse:true,
interval:0.05
}
}
},
onClick() {
this.setState({
show: !this.state.show
})
},
render() {
return (
<div>
<div style={{marginBottom: 20}}>
<button className="ant-btn ant-btn-primary" onClick={this.onClick}>切换</button>
</div>
<EnterAnimation enter={this.state.enter} leave={this.state.leave}>
{this.state.show ? <div key='a'>
<div className="demo-header" enter-data leave-data={{type:'alpha'}}>
<div className="logo" leave-data={{type:'left'}}>
<img width="30" src="https://t.alipayobjects.com/images/rmsweb/T1B9hfXcdvXXXXXXXX.svg" />
<span>logo</span>
</div>
<ul >
<li enter-data leave-data={{type:'right'}}></li>
<li enter-data leave-data={{type:'right'}}></li>
<li enter-data leave-data={{type:'right'}}></li>
<li enter-data leave-data={{type:'right'}}></li>
<li enter-data leave-data={{type:'right'}}></li>
</ul>
</div>
<div className="demo-content" >
<div className="demo-title" enter-data={{type:'bottom'}} leave-data={{type:'bottom',queueId:1}}>我是标题</div>
<div className="demo-kp">
<ul>
<li enter-data={{interval:0.05}} leave-data={{type:'bottom',queueId:1}}></li>
<li enter-data={{interval:0.05}} leave-data={{type:'bottom',queueId:1}}></li>
<li enter-data={{interval:0.05}} leave-data={{type:'bottom',queueId:1,delay:0.2}}></li>
</ul>
</div>
<div className="demo-title" enter-data={{type:'bottom'}} leave-data={{type:'bottom',queueId:2}}>我是标题</div>
<div className="demo-listBox">
<div className="demo-list">
<div className="title" enter-data={{type:'bottom'}} leave-data={{queueId:2}}></div>
<ul>
<li enter-data={{type:'bottom'}} leave-data={{queueId:2}}></li>
<li enter-data={{type:'bottom'}} leave-data={{queueId:2}}></li>
<li enter-data={{type:'bottom'}} leave-data={{queueId:2}}></li>
<li enter-data={{type:'bottom'}} leave-data={{queueId:2}}></li>
<li enter-data={{type:'bottom'}} leave-data={{queueId:2}}></li>
</ul>
</div>
</div>
</div>
<div className="demo-footer" enter-data={{type:'bottom'}} leave-data={{queueId:2}}></div>
</div> : null}
</EnterAnimation>
</div>
);
}
});
React.render(<Test />
, document.getElementById('components-enter-animation-demo-page'));
````
<style>
#components-enter-animation-demo-page {
text-align: center;
overflow: hidden;
margin: 20px auto;
}
</style>

View File

@@ -0,0 +1,99 @@
# Router 默认进出场
- order: 7
router 组合的进场与出场动画。
---
````jsx
var ReactRouter = require('react-router');
var Router = ReactRouter.Router;
var Route = ReactRouter.Route;
var Link = ReactRouter.Link;
var EnterAnimation = antd.EnterAnimation;
var Menu = antd.Menu;
var App = React.createClass({
getInitialState: function () {
return {};
},
clickPage() {
this.setState({
enter: {delay: 0.3},
leave: {delay: 0}
});
},
render() {
var key = this.props.location.pathname;
return (
<div>
<Menu style={{marginBottom: 20}} mode="horizontal">
<Menu.Item key='home'>
<Link to="/" onClick={this.clickPage}>首页</Link>
</Menu.Item>
<Menu.Item key='page1'>
<Link to="/page1" onClick={this.clickPage}>Page 1</Link>
</Menu.Item>
<Menu.Item key='page2'>
<Link to="/page2" onClick={this.clickPage}>Page 2</Link>
</Menu.Item>
</Menu>
<EnterAnimation className='demo-router-wap' enter={this.state.enter} leave={this.state.leave}>
{React.cloneElement(this.props.children || <div key='home' className='demo-router-child'><h1>Home</h1><div>这是首页</div></div>, {key: key})}
</EnterAnimation>
</div>
);
}
});
var Page1 = React.createClass({
render() {
return (
<div className="demo-router-child">
<h1>Page 1</h1>
<p><Link to="/page2">A link to page 2 should be active</Link>依次进场</p>
<p><Link to="/page2">A link to page 2 should be active</Link>依次进场</p>
<p><Link to="/page2">A link to page 2 should be active</Link>依次进场</p>
<p><Link to="/page2">A link to page 2 should be active</Link>依次进场</p>
<p><Link to="/page2">A link to page 2 should be active</Link>改变样式</p>
</div>
);
}
});
var Page2 = React.createClass({
render() {
return (
<div className="demo-router-child">
<h1>Page 2</h1>
<p><Link to="/page1">a link to page 1 </Link>我是页面2.</p>
<p><Link to="/page1">a link to page 1 </Link>我是页面2.</p>
<p><Link to="/page1">a link to page 1 </Link>我是页面2.</p>
<p><Link to="/page1">a link to page 1 </Link>我是页面2.</p>
</div>
);
}
});
React.render((
<Router>
<Route path="/" component={App} ignoreScrollBehavior>
<Route path="page1" component={Page1} />
<Route path="page2" component={Page2} />
</Route>
</Router>
), document.getElementById('components-enter-animation-demo-router'));
````
<style>
#components-enter-animation-demo-router {
text-align: center;
}
.demo-router-wap{
position: relative;
transition: height .5s;
width: 300px;
margin: auto;
}
.demo-router-child{
text-align:left;
}
</style>

View File

@@ -0,0 +1,27 @@
# 默认
- order: 0
最简单的进场例子。
---
````jsx
var EnterAnimation = antd.EnterAnimation;
React.render(
<EnterAnimation>
<ul key="key">
<li>依次进场</li>
<li>依次进场</li>
<li>依次进场</li>
<li>依次进场</li>
<li>依次进场</li>
<li>依次进场</li>
<li>依次进场</li>
<li>依次进场</li>
</ul>
</EnterAnimation>
, document.getElementById('components-enter-animation-demo-simple'));
````

View File

@@ -0,0 +1,78 @@
# style 自定义样式动画进出场
- order: 4
通过加上属性里的 `style` 来自定义 CSS 动画进出场。
---
````jsx
var EnterAnimation = antd.EnterAnimation;
var Test = React.createClass({
getInitialState() {
return {
enter: {
style: {
transform: "translateX(50px)",
opacity: 0
},
interval: .1,
},
leave: {
interval: 0.03
},
show: true
}
},
onClick() {
this.setState({
show: !this.state.show
})
},
render() {
return (
<div>
<div style={{marginBottom: 20}}>
<button className="ant-btn ant-btn-primary" onClick={this.onClick}>切换</button>
</div>
<EnterAnimation enter={this.state.enter} leave={this.state.leave}>
{this.state.show ? <div key='enter-data'>
<div className="demo-content">
<div className="demo-kp">
<ul>
<li enter-data></li>
<li enter-data></li>
<li enter-data></li>
</ul>
</div>
<div className="demo-listBox">
<div className="demo-list">
<div className="title" enter-data={{style: {transform: 'translateY(30px)', opacity: 0}, queueId: 1}}></div>
<ul>
<li enter-data={{style: {transform: 'translateY(30px)', opacity: 0}, queueId: 1}}></li>
<li enter-data={{style: {transform: 'translateY(30px)', opacity: 0}, queueId: 1}}></li>
<li enter-data={{style: {transform: 'translateY(30px)', opacity: 0}, queueId: 1}}></li>
</ul>
</div>
</div>
</div>
</div> : null}
</EnterAnimation>
</div>
)
}
});
React.render(<Test />
, document.getElementById('components-enter-animation-demo-style'));
````
<style>
#components-enter-animation-demo-style {
text-align: center;
overflow: hidden;
margin: 18px auto;
}
</style>

View File

@@ -0,0 +1,12 @@
import React from 'react';
import EnterAnimation from 'enter-animation';
class AntEnterAnimation extends React.Component {
render() {
return <EnterAnimation {...this.props} />;
}
}
AntEnterAnimation.to = EnterAnimation.to;
export default AntEnterAnimation;

View File

@@ -0,0 +1,252 @@
# EnterAnimation
- category: Components
- chinese: 进场动画
---
通过简单的配置对一组元素添加串行的进场动画效果。
## 何时使用
- 从内容A到内容B的转变过程时能有效的吸引用户注意力突出视觉中心提高整体视觉效果。
- 小的信息元素排布或块状较多的情况下,根据一定的路径层次依次进场,区分维度层级,来凸显量级,使页面转场更加流畅和舒适,提高整体视觉效果和产品的质感。
## API
元素依次进场。
```html
<EnterAnimation>
<div key='demo'>
<div>依次进场</div>
<div>依次进场</div>
<div>依次进场</div>
<div>依次进场</div>
</div>
</EnterAnimation>
```
如子节点有 `enter-data` 值,则只执行有 `enter-data` 的节点的动画,相反所有子节点上都没有 `enter-data` 值,则执行遍历 dom 下一级节点来执行动画。
```html
<EnterAnimation enter={type:'left',delay:2}>
<div key='demo'>
<div>
<div enter-data>
依次进场
</div>
</div>
<div enter-data>依次进场</div>
<div enter-data={{type: 'bottom'}}>依次进场,并修改动画效果</div>
<div>没有动画</div>
</div>
</EnterAnimation>
```
### <EnterAnimation />
|参数 |类型 |默认值 |详细 |
|-----------------|-------|-------------|----------------------------------------------------|
|enter|object| `{type:'right'}` |管理进场数据|
|leave|object| null |管理当前元素出场的数据, null 时继承 enter 里的所有标签的值 |
|component|string| `div` | EnterAnimation 替换的标签名|
### enter = {} | leave = {}
|参数 |类型 |默认值 |详细 |
|-----------------|-------|-------------|----------------------------------------------------|
|type |string |`right` |内置动画样式:<br/> `alpha` `left` `right` `top` `bottom` `scale` `scaleBig` `scaleX` `scaleY` |
|style |object / string |null |同上, style 的样式动画, `type` 有值,此项无效。<br/>如 `{transform:'translateX(100px)'}``'transform: translateX(100px)'`|
|duration |number |0.5 |每个动画的时间,以秒为单位|
|ease |string|`cubic-bezier(0.165, 0.84, 0.44, 1);`|样式缓动,只支持 css 样式缓动;|
|delay |number |0 |整个区块的延时,以秒为单位|
|reverse |boolean|false |是否倒放,从最后一个 dom 开始往上播放|
|interval |number |0.1 |递增延时值,以秒为单位|
|callback |function|null |动画结束回调|
### 一级标签key
|参数 |类型 |详细 |
|-----------------|-------|----------------------------------------------------|
|key|string|必需,控制进出场;|
### 子标签
|参数 |类型 |默认值 |详细 |
|-----------------|-------|-----------|----------------------------------------------------|
|enter-data |object | `{type:'right'}` |子标签进场参数|
|leave-data |object | `enter-data` |子标签出场参数|
#### enter-data = {} | leave-data = {}
|参数 |类型 |默认值 |详细 |
|-----------------|-----------------|----------------|----------------------------------------------------|
|type |string |`right` |同标签里的 `type`,覆盖标签里的值|
|style |object / string |null |同标签里的 `style`,覆盖标签里的值|
|duration |number |0.5 |同标签里的 `duration`,覆盖标签里的值|
|ease |string |`cubic-bezier(0.165, 0.84, 0.44, 1)`|同标签里的 `ease`,覆盖标签里的值|
|delay |number |0 |当前动画的延时,依照结构递增以上的 `interval`|
|queueId |number |0 |动画的线程|
> 由于使用了 CSS3 动画,所以 `IE9` 及更早的版本将没有进场效果。
<style>
.code-box-demo .demo-header {
width: 100%;
background: #ebedee;
height: 30px;
}
.code-box-demo .demo-header ul {
float: right;
margin-right: 5px;
}
.code-box-demo .demo-header ul li {
width: 50px;
height: 30px;
float: left;
background: #e4e4e4;
margin-left: 5px;
}
.code-box-demo .demo-header ul li:before {
margin: 10px auto;
width: 20px;
height: 10px;
background: #ebeded;
}
.code-box-demo .demo-header .logo {
float: left;
margin: 0px auto 0 10px;
line-height: 32px;
}
.code-box-demo .demo-header .logo img{
margin:auto
}
.code-box-demo .demo-header .logo span {
display: block;
float: right;
}
.code-box-demo .demo-content {
width: 80%;
margin: 10px auto;
}
.code-box-demo .demo-content .demo-title {
text-align:left;
background: #a4a4a4;
width: 40%;
height: 20px;
line-height: 20px;
color: #ebeded;
text-indent:10px
}
.code-box-demo .demo-content .demo-listBox {
margin-top: 10px;
}
.code-box-demo .demo-content .demo-listBox .demo-list .title {
height: 30px;
background: #cacaca;
overflow: hidden;
}
.code-box-demo .demo-content .demo-listBox .demo-list .title:before,.code-box-demo .demo-content .demo-listBox .demo-list .title:after{
width: 30%;
height: 5px;
background: #ebeded;
float:left;
margin:12px 35px 0;
}
.code-box-demo .demo-content .demo-listBox .demo-list .title:after{
width:15%;
float:right;
margin:12px 10px 0;
}
.code-box-demo .demo-content .demo-listBox .demo-list ul li {
height: 25px;
background: #ebeded;
border-bottom: 1px solid #cacaca;
overflow: hidden;
padding: 5px 15px;
}
.code-box-demo .demo-content .demo-listBox .demo-list ul li:before {
width: 10px;
height: 5px;
background: #cacaca;
float: left;
margin-top:4px
}
.code-box-demo .demo-content .demo-listBox .demo-list ul li:after {
width: 50%;
height: 5px;
background: #cacaca;
float: left;
margin-left: 10px;
margin-top: 4px;
}
.code-box-demo .demo-content .demo-kp {
margin: 10px auto;
}
.code-box-demo .demo-content .demo-kp ul li {
display: inline-block;
width: 32%;
height: 40px;
background: #cacaca;
color: #ebeded;
text-align: left;
padding: 10px;
margin-right: calc(2%);
}
.code-box-demo .demo-content .demo-kp ul li:last-child {
margin-right: 0%;
}
.code-box-demo .demo-content .demo-kp ul li:after {
width: 60%;
height: 5px;
background: #ebeded;
float: left;
margin-top: 7px;
}
.code-box-demo .demo-content .demo-kp ul li:before {
background: #ebeded;
float: left;
width: 15px;
height: 15px;
margin:2px 10% 0 0;
}
.code-box-demo .demo-footer {
margin-top: 10px;
background: #cacaca;
height: 40px;
float: left;
width: 100%;
display: table;
}
.code-box-demo .demo-footer:before {
width: 60%;
height: 5px;
background: #ededed;
margin: 10px auto 0;
}
.code-box-demo .demo-footer:after {
width: 30%;
height: 5px;
background: #ededed;
margin: 5px auto;
}
.code-box-demo .demo-header ul li:before,
.code-box-demo .demo-content .demo-kp ul li:before,
.code-box-demo .demo-content .demo-kp ul li:after,
.code-box-demo .demo-content .demo-listBox .demo-list .title:before,
.code-box-demo .demo-content .demo-listBox .demo-list .title:after,
.code-box-demo .demo-content .demo-listBox .demo-list ul li:before,
.code-box-demo .demo-content .demo-listBox .demo-list ul li:after,
.code-box-demo .demo-footer:before,
.code-box-demo .demo-footer:after {
display: block;
content: "";
}
</style>

View File

@@ -13,7 +13,7 @@ var Select = antd.Select;
var Option = Select.Option;
var Checkbox = antd.Checkbox;
var Radio = antd.Radio;
var RadioGroup = antd.RadioGroup;
var RadioGroup = antd.Radio.Group;
function handleSelectChange(value) {
console.log('selected ' + value);
@@ -22,21 +22,21 @@ function handleSelectChange(value) {
React.render(
<form className="ant-form-horizontal">
<div className="ant-form-item">
<label className="col-6">输入框:</label>
<label htmlFor="control-input" className="col-6">输入框:</label>
<div className="col-14">
<input type="text" className="ant-input" placeholder="Please enter..." />
<input type="text" className="ant-input" id="control-input" placeholder="Please enter..." />
</div>
</div>
<div className="ant-form-item">
<label className="col-6">文本域:</label>
<label htmlFor="control-textarea" className="col-6">文本域:</label>
<div className="col-14">
<textarea className="ant-input"></textarea>
<textarea className="ant-input" id="control-textarea"></textarea>
</div>
</div>
<div className="ant-form-item">
<label className="col-6">Select 选择器:</label>
<div className="col-14">
<Select value="lucy" style={{width:200}} onChange={handleSelectChange}>
<Select size="large" defaultValue="lucy" style={{width:200}} onChange={handleSelectChange}>
<Option value="jack">jack</Option>
<Option value="lucy">lucy</Option>
<Option value="disabled" disabled>disabled</Option>
@@ -48,13 +48,13 @@ React.render(
<label className="col-6">Checkbox 多选框:</label>
<div className="col-18">
<label className="ant-checkbox-vertical">
<Checkbox /> 选项一
<Checkbox />选项一
</label>
<label className="ant-checkbox-vertical">
<Checkbox /> 选项二
<Checkbox />选项二
</label>
<label className="ant-checkbox-vertical">
<Checkbox disabled={true} /> 选项三(不可选)
<Checkbox disabled={true} />选项三(不可选)
</label>
</div>
</div>

View File

@@ -4,29 +4,29 @@
`<form>` 标签添加 `.ant-form-horizontal` 类(这让 `.ant-form-item` 表现为栅格系统中的 `row`),并结合使用我们提供的 [栅格系统](http://ant.design/components/layout/),可以实现 label 标签和表单控件的水平排列。
如需将一行静态文本和 `<label>` 标签置于同一行,则只需为 `<p>` 标签添加 `.ant-form-text` 类即可。
如需将一行静态文本和 `<label>` 标签置于同一行,则只需为标签添加 `.ant-form-text` 类即可。
`label` 标签添加 `required` 属性,表示该项必选。
**注意**对于表单域(`.ant-form-item`) 为静态文本、`checkbox``radio`以及`input[type="file"]`的,其高度不同于一般的表单域,需要在 `.ant-form-item` 类后再加上 `.ant-form-item-compact`
**注意**在我们的设计里,表单域(`.ant-form-item`) 为静态文本、`checkbox``radio`以及`input[type="file"]`的,其高度不同于一般的表单域,需要在 `.ant-form-item` 类后再加上 **`.ant-form-item-compact`**
---
````jsx
var Checkbox = antd.Checkbox;
var Radio = antd.Radio;
var RadioGroup = antd.RadioGroup;
var RadioGroup = antd.Radio.Group;
React.render(
<form className="ant-form-horizontal">
<div className="ant-form-item ant-form-item-compact">
<label for="userName" className="col-6" required>用户名:</label>
<label htmlFor="userName" className="col-6" required>用户名:</label>
<div className="col-6">
<p className="ant-form-text">大眼萌 minion</p>
</div>
</div>
<div className="ant-form-item">
<label for="password" className="col-6" required>密码:</label>
<label htmlFor="password" className="col-6" required>密码:</label>
<div className="col-14">
<input className="ant-input" type="password" id="password" placeholder="请输入密码"/>
</div>
@@ -41,9 +41,9 @@ React.render(
</div>
</div>
<div className="ant-form-item">
<label for="password" className="col-6" required>备注:</label>
<label htmlFor="remark" className="col-6" required>备注:</label>
<div className="col-14">
<textarea className="ant-input" placeholder="随便写"></textarea>
<textarea className="ant-input" id="remark" placeholder="随便写"></textarea>
<p className="ant-form-explain">随便写点什么</p>
</div>
</div>

View File

@@ -2,7 +2,7 @@
- order: 1
在**视口宽度大于等于 768px **时,你可以为 `<form>` 标签添加 `.ant-form-inline` 类可使其表现为 inline-block 级别的控件。
你可以为 `<form>` 标签添加 `.ant-form-inline` 类可使其表现为 inline-block 级别的控件。
---
@@ -12,12 +12,12 @@ var Checkbox = antd.Checkbox;
React.render(
<form className="ant-form-inline">
<div className="ant-form-item">
<label for="userName">账户:</label>
<label htmlFor="userName">账户:</label>
<input className="ant-input" type="text" id="userName" placeholder="请输入账户名" />
</div>
<div className="ant-form-item">
<label for="password">密码:</label>
<input className="ant-input" type="password" id="password" placeholder="请输入密码" />
<label htmlFor="password2">密码:</label>
<input className="ant-input" type="password" id="password2" placeholder="请输入密码" />
</div>
<div className="ant-form-item">
<label className="ant-checkbox-inline">

View File

@@ -4,8 +4,6 @@
带标签的输入框:使用 `.ant-input-group` 类并结合 `.ant-input-group-addon` 类可以创建带标签的输入框。
输入框组合:`.ant-inputs` 类由多个 `.ant-inputs-item` 组成,使多个 Input 可以在一行显示出来。
---
````jsx
@@ -15,31 +13,31 @@ var Option = Select.Option;
React.render(
<form className="ant-form-horizontal">
<div className="ant-form-item">
<label className="col-6" for="site1">标签输入框:</label>
<label className="col-6" htmlFor="site1">标签输入框:</label>
<div className="col-16">
<div className="ant-input-group">
<span className="ant-input-group-addon" id="basic-addon1">Http://</span>
<input type="text" id="site1" className="ant-input" value="mysite.com" />
<input type="text" id="site1" className="ant-input" defaultValue="mysite.com" />
</div>
</div>
</div>
<div className="ant-form-item">
<label className="col-6" for="site3">标签输入框:</label>
<label className="col-6" htmlFor="site3">标签输入框:</label>
<div className="col-16">
<div className="ant-input-group">
<span className="ant-input-group-addon" id="basic-addon3">Http://</span>
<input type="text" className="ant-input" id="site3" value="mysite" />
<input type="text" className="ant-input" id="site3" defaultValue="mysite" />
<span className="ant-input-group-addon" id="basic-addon4">.com</span>
</div>
</div>
</div>
<div className="ant-form-item">
<label className="col-6" for="site4">select 标签输入框:</label>
<label className="col-6" htmlFor="site4">select 标签输入框:</label>
<div className="col-16">
<div className="ant-input-group">
<input type="text" className="ant-input" id="site4" placeholder="www.mysite" />
<div className="ant-input-group-wrap">
<Select value=".com" style={{width:65}}>
<Select defaultValue=".com" style={{width:70}}>
<Option value=".com">.com</Option>
<Option value=".jp">.jp</Option>
<Option value=".cn">.cn</Option>
@@ -50,7 +48,7 @@ React.render(
</div>
</div>
<div className="ant-form-item">
<label className="col-6">输入身份证:</label>
<label className="col-6" htmlFor="certNo1">输入身份证:</label>
<div className="col-16">
<div className="ant-input-group">
<div className="col-6">
@@ -68,12 +66,12 @@ React.render(
</div>
</div>
</div>
<div className="ant-form-item has-error">
<label className="col-6">电话号码:</label>
<div className="ant-form-item">
<label className="col-6" htmlFor="tel1">电话号码:</label>
<div className="col-16">
<div className="row">
<div className="col-4">
<input className="ant-input" type="text" id="tel1" value="086" />
<input className="ant-input" type="text" id="tel1" defaultValue="086" />
</div>
<div className="col-2">
<p className="ant-form-split">--</p>
@@ -92,7 +90,6 @@ React.render(
</div>
</div>
</div>
<p className="ant-form-explain">请输入正确的电话号码</p>
</div>
</div>
</form>

View File

@@ -41,7 +41,7 @@ React.render(
<div className="ant-form-item">
<label className="col-8" required>InputNumber 数字输入框:</label>
<div className="col-10">
<InputNumber min={1} max={10} defaultValue={3} onChange={onInputNumberChange} style={{width:100}}/>
<InputNumber size="large" min={1} max={10} defaultValue={3} onChange={onInputNumberChange} style={{width:100}}/>
<span className="ant-form-text"> 台机器</span>
</div>
</div>
@@ -57,21 +57,21 @@ React.render(
</div>
</div>
<div className="ant-form-item">
<label for="" className="col-8" required>Switch 开关:</label>
<label htmlFor="" className="col-8" required>Switch 开关:</label>
<div className="col-10">
<Switch />
</div>
</div>
<div className="ant-form-item">
<label for="" className="col-8" required>Slider 滑动输入条:</label>
<label htmlFor="" className="col-8" required>Slider 滑动输入条:</label>
<div className="col-10">
<Slider marks={["A","B","C","D","E","F","G"]} />
</div>
</div>
<div className="ant-form-item">
<label for="" className="col-8" required>Select 选择器:</label>
<label htmlFor="" className="col-8" required>Select 选择器:</label>
<div className="col-16">
<Select value="lucy" style={{width:200}} onChange={handleSelectChange}>
<Select size="large" defaultValue="lucy" style={{width:200}} onChange={handleSelectChange}>
<Option value="jack">jack</Option>
<Option value="lucy">lucy</Option>
<Option value="disabled" disabled>disabled</Option>
@@ -80,7 +80,7 @@ React.render(
</div>
</div>
<div className="ant-form-item">
<label for="" className="col-8" required>Datepicker 日期选择框:</label>
<label htmlFor="" className="col-8" required>Datepicker 日期选择框:</label>
<div className="col-6">
<Datepicker />
</div>
@@ -92,7 +92,7 @@ React.render(
</div>
</div>
<div className="ant-form-item has-error">
<label for="" className="col-8" required>Datepicker 校验:</label>
<label htmlFor="" className="col-8" required>Datepicker 校验:</label>
<div className="col-6">
<Datepicker />
</div>

View File

@@ -8,7 +8,7 @@
将以上三种校验状态类添加到这些控件的父级元素即可。
另外为输入框添加反馈图标,可以更好地反馈当前的校验状态,使用 `.has-feedback` 类包裹 input 输入框即可。
另外为输入框添加反馈图标,可以更好地反馈当前的校验状态,使用 `.has-feedback` 类包裹 input 输入框即可,在这里校验状态类就要和 `.has-feedback` 类同级
**注意**: 反馈图标只能使用在文本输入框 `<input class="ant-input">` 元素上。
@@ -39,41 +39,37 @@
<div class="ant-form-item">
<label class="col-5" for="validating">校验中:</label>
<div class="col-12">
<div class="has-feedback">
<div class="has-feedback is-validating">
<input class="ant-input" type="text" id="validating" value="我是被校验的内容"/>
<i class="anticon anticon-loading"></i>
<div class="ant-form-explain">信息审核中...</div>
</div>
<div class="ant-form-explain">信息审核中...</div>
</div>
</div>
<div class="ant-form-item has-success">
<div class="ant-form-item">
<label class="col-5" for="input1">成功校验:</label>
<div class="col-12">
<div class="has-feedback">
<div class="has-feedback has-success">
<input class="ant-input" type="text" id="input1" value="我是正文"/>
<i class="anticon anticon-check-circle"></i>
</div>
</div>
</div>
<div class="ant-form-item has-error">
<div class="ant-form-item">
<label class="col-5" for="input2">失败校验:</label>
<div class="col-12">
<div class="has-feedback">
<div class="has-feedback has-error">
<input class="ant-input" type="text" id="input2" value="无效选择"/>
<i class="anticon anticon-cross-circle"></i>
<div class="ant-form-explain">请输入数字和字母组合</div>
</div>
<div class="ant-form-explain">请输入数字和字母组合</div>
</div>
</div>
<div class="ant-form-item has-warning">
<div class="ant-form-item">
<label class="col-5" for="input3">警告校验:</label>
<div class="col-12">
<div class="has-feedback">
<div class="has-feedback has-warning">
<input class="ant-input" type="text" id="input3" value="前方高能预警"/>
<i class="anticon anticon-exclamation-circle"></i>
</div>
</div>
</div>

View File

@@ -1,8 +1,8 @@
# Form
- category: CSS
- category: Components
- chinese: 表单
- order: 3
- type: 表单
---
@@ -16,8 +16,6 @@
- 水平排列:`.ant-form-horizontal` 类可以实现 `label` 标签和表单控件的水平排列;
- 行内排列:`.ant-form-inline` 类可使其表现为 inline-block 级别的控件。
**注**: `.ant-form-inline` 类只适用于**视口宽度大于等于 768px **的情形。
### 表单域
表单一定会包含表单域,表单域可以是输入控件,标准表单域,标签,下拉菜单,文本域等。

View File

@@ -1,9 +1,9 @@
# Iconfont
- category: CSS
- category: Components
- chinese: 字体图标
- order: 1
- nodemos: true
- type: 基本
- noinstant: true
---
@@ -26,7 +26,7 @@
使用时所有的图标都需要一个基类 `.anticon` 和对应每个图标的类。在这里,我们使用 `<i>` 标签,如下面代码演示使用即可。
```html
<i class="anticon anticon-link"></i>
<i className="anticon anticon-link"></i>
```
> 点击图标复制代码。
@@ -391,8 +391,8 @@
<span class="anticon-class">laptop</span>
</li>
<li>
<i class="anticon anticon-large"></i>
<span class="anticon-class">large</span>
<i class="anticon anticon-appstore"></i>
<span class="anticon-class">appstore</span>
</li>
<li>
<i class="anticon anticon-line-chart"></i>
@@ -520,6 +520,7 @@ ul.anticons-list {
margin: 20px 0;
list-style: none;
width: 120%;
overflow: hidden;
}
ul.anticons-list li {
float: left;
@@ -573,7 +574,7 @@ ul.anticons-list li.copied:after {
}
</style>
<script src="/static/ZeroClipboard.js"></script>
<script src="../../static/ZeroClipboard.js"></script>
<script>
$(function() {
ZeroClipboard.config({

View File

@@ -1 +0,0 @@
<meta http-equiv="refresh" content="0; url=/components/layout" />

View File

@@ -1,6 +1,6 @@
# 不可用
- order: 0
- order: 2
点击按钮切换可用状态。

View File

@@ -0,0 +1,29 @@
# 三种大小
- order: 1
三种大小的数字输入框,当 size 分别为 `large``small` 时,输入框高度为 `32px``22px` ,默认高度为 `28px`
---
````jsx
var InputNumber = antd.InputNumber;
function onChange(value) {
console.log('changed', value);
}
React.render(
<div>
<InputNumber size="large" min={1} max={100000} defaultValue={3} onChange={onChange} />
<InputNumber min={1} max={100000} defaultValue={3} onChange={onChange} />
<InputNumber size="small" min={1} max={100000} defaultValue={3} onChange={onChange} />
</div>
, document.getElementById('components-input-number-demo-size'));
````
````css
.ant-input-number{
margin-right: 10px;
}
````

View File

@@ -8,6 +8,12 @@ export default React.createClass({
};
},
render() {
return <InputNumber style={{width: 90}} {...this.props} />;
let sizeClass = '';
if (this.props.size === 'large') {
sizeClass = 'ant-input-number-lg';
} else if (this.props.size === 'small') {
sizeClass = 'ant-input-number-sm';
}
return <InputNumber className={sizeClass} style={{width: 90}} {...this.props} />;
}
});

View File

@@ -2,7 +2,7 @@
- category: Components
- chinese: 数字输入框
- order: 4
- type: 表单
---
@@ -25,3 +25,4 @@
| defaultValue | 初始值 | Number | |
| onChange | 变化回调 | Function | |
| disabled | 禁用 | Boolean | false |
| size | 输入框大小 | String | 无 |

View File

@@ -1,8 +1,9 @@
# Layout
- category: CSS
- category: Components
- chinese: 布局
- order: 0
- type: 基本
- cols: 1
---

View File

@@ -0,0 +1,47 @@
# 顶部导航
- order: 0
水平的顶部导航菜单。
---
````jsx
var Menu = antd.Menu;
var SubMenu = Menu.SubMenu;
var App = React.createClass({
getInitialState() {
return {
current: 'mail'
}
},
handleClick(e) {
console.log('click ', e);
this.setState({
current: e.key
});
},
render() {
return <Menu onClick={this.handleClick} selectedKeys={[this.state.current]} mode="horizontal">
<Menu.Item key="mail">
<i className="anticon anticon-mail"></i>导航一
</Menu.Item>
<Menu.Item key="app">
<i className="anticon anticon-appstore"></i>导航二
</Menu.Item>
<SubMenu title={<span><i className="anticon anticon-setting"></i>导航 - 子菜单</span>}>
<Menu.Item key="setting:1">选项1</Menu.Item>
<Menu.Item key="setting:2">选项2</Menu.Item>
<Menu.Item key="setting:3">选项3</Menu.Item>
<Menu.Item key="setting:4">选项4</Menu.Item>
</SubMenu>
<Menu.Item key="alipay">
<a href="http://www.alipay.com/" target="_blank">导航四 - 链接</a>
</Menu.Item>
</Menu>
}
});
React.render(<App />, document.getElementById('components-menu-demo-horizontal'));
````

View File

@@ -0,0 +1,64 @@
# 只展开当前父级菜单
- order: 2
点击菜单,收起其他展开的所有菜单,保持菜单聚焦简洁。
---
````jsx
var Menu = antd.Menu;
var SubMenu = Menu.SubMenu;
var Sider = React.createClass({
getInitialState() {
return {
current: '1',
openKeys: []
}
},
handleClick(e) {
console.log('click ', e);
this.setState({
current: e.key,
openKeys: e.keyPath.slice(1)
});
},
onToggle(info){
this.setState({
openKeys: info.openKeys
});
},
render() {
return <Menu onClick={this.handleClick}
style={{width:240}}
openKeys={this.state.openKeys}
onOpen={this.onToggle}
onClose={this.onToggle}
selectedKeys={[this.state.current]}
mode="inline">
<SubMenu key="sub1" title={<span><i className="anticon anticon-mail"></i><span>导航一</span></span>}>
<Menu.Item key="1">选项1</Menu.Item>
<Menu.Item key="2">选项2</Menu.Item>
<Menu.Item key="3">选项3</Menu.Item>
<Menu.Item key="4">选项4</Menu.Item>
</SubMenu>
<SubMenu key="sub2" title={<span><i className="anticon anticon-appstore"></i><span>导航二</span></span>}>
<Menu.Item key="5">选项5</Menu.Item>
<Menu.Item key="6">选项6</Menu.Item>
<SubMenu key="sub3" title="三级导航">
<Menu.Item key="7">选项7</Menu.Item>
<Menu.Item key="8">选项8</Menu.Item>
</SubMenu>
</SubMenu>
<SubMenu key="sub4" title={<span><i className="anticon anticon-setting"></i><span>导航三</span></span>}>
<Menu.Item key="9">选项9</Menu.Item>
<Menu.Item key="10">选项10</Menu.Item>
<Menu.Item key="11">选项11</Menu.Item>
<Menu.Item key="12">选项12</Menu.Item>
</SubMenu>
</Menu>;
}
});
React.render(<Sider />, document.getElementById('components-menu-demo-sider-current'));
````

View File

@@ -0,0 +1,55 @@
# 内嵌菜单
- order: 1
垂直菜单,子菜单内嵌在菜单区域。
---
````jsx
var Menu = antd.Menu;
var SubMenu = Menu.SubMenu;
var Sider = React.createClass({
getInitialState() {
return {
current: '1'
}
},
handleClick(e) {
console.log('click ', e);
this.setState({
current: e.key
});
},
render() {
return <Menu onClick={this.handleClick}
style={{width:240}}
defaultOpenKeys={['sub1']}
selectedKeys={[this.state.current]}
mode="inline">
<SubMenu key="sub1" title={<span><i className="anticon anticon-mail"></i><span>导航一</span></span>}>
<Menu.Item key="1">选项1</Menu.Item>
<Menu.Item key="2">选项2</Menu.Item>
<Menu.Item key="3">选项3</Menu.Item>
<Menu.Item key="4">选项4</Menu.Item>
</SubMenu>
<SubMenu key="sub2" title={<span><i className="anticon anticon-appstore"></i><span>导航二</span></span>}>
<Menu.Item key="5">选项5</Menu.Item>
<Menu.Item key="6">选项6</Menu.Item>
<SubMenu key="sub3" title="三级导航">
<Menu.Item key="7">选项7</Menu.Item>
<Menu.Item key="8">选项8</Menu.Item>
</SubMenu>
</SubMenu>
<SubMenu key="sub4" title={<span><i className="anticon anticon-setting"></i><span>导航三</span></span>}>
<Menu.Item key="9">选项9</Menu.Item>
<Menu.Item key="10">选项10</Menu.Item>
<Menu.Item key="11">选项11</Menu.Item>
<Menu.Item key="12">选项12</Menu.Item>
</SubMenu>
</Menu>;
}
});
React.render(<Sider />, document.getElementById('components-menu-demo-sider'));
````

View File

@@ -0,0 +1,41 @@
# 垂直菜单
- order: 3
子菜单是弹出的形式。
---
````jsx
var Menu = antd.Menu;
var MenuItem = Menu.Item;
var SubMenu = Menu.SubMenu;
function handleClick(e) {
console.log('click', e);
}
React.render(<Menu onClick={handleClick} style={{width:240}} mode="vertical">
<SubMenu key="sub1" title={<span><i className="anticon anticon-mail"></i><span>导航一</span></span>}>
<MenuItem key="1">选项1</MenuItem>
<MenuItem key="2">选项2</MenuItem>
<MenuItem key="3">选项3</MenuItem>
<MenuItem key="4">选项4</MenuItem>
</SubMenu>
<SubMenu key="sub2" title={<span><i className="anticon anticon-appstore"></i><span>导航二</span></span>}>
<MenuItem key="5">选项5</MenuItem>
<MenuItem key="6">选项6</MenuItem>
<SubMenu key="sub3" title="三级导航">
<MenuItem key="7">选项7</MenuItem>
<MenuItem key="8">选项8</MenuItem>
</SubMenu>
</SubMenu>
<SubMenu key="sub4" title={<span><i className="anticon anticon-setting"></i><span>导航三</span></span>}>
<MenuItem key="9">选项9</MenuItem>
<MenuItem key="10">选项10</MenuItem>
<MenuItem key="11">选项11</MenuItem>
<MenuItem key="12">选项12</MenuItem>
</SubMenu>
</Menu>
, document.getElementById('components-menu-demo-vertical'));
````

37
components/menu/index.jsx Normal file
View File

@@ -0,0 +1,37 @@
import React from 'react';
import Menu from 'rc-menu';
import animation from '../common/openAnimation';
const AntMenu = React.createClass({
getDefaultProps() {
return {
prefixCls: 'ant-menu'
};
},
render() {
let openAnimation = '';
switch (this.props.mode) {
case 'horizontal':
openAnimation = 'slide-up';
break;
case 'vertical':
openAnimation = 'zoom-big';
break;
case 'inline':
openAnimation = animation;
break;
default:
}
if (this.props.mode === 'inline') {
return <Menu {...this.props} openAnimation={openAnimation} />;
} else {
return <Menu {...this.props} openTransitionName={openAnimation} />;
}
}
});
AntMenu.Divider = Menu.Divider;
AntMenu.Item = Menu.Item;
AntMenu.SubMenu = Menu.SubMenu;
export default AntMenu;

View File

@@ -2,5 +2,52 @@
- category: Components
- chinese: 导航菜单
- cols: 1
- type: 导航
---
为页面和功能提供导航的菜单列表。
## 何时使用
导航菜单是一个网站的灵魂,用户依赖导航在各个页面中进行跳转。一般分为顶部导航和侧边导航,顶部导航提供全局性的类目和功能,侧边导航提供多级结构来收纳和排列网站架构。
```html
<Menu>
<MenuItem>菜单项</MenuItem>
<SubMenu title="子菜单">
<MenuItem>子菜单项</MenuItem>
</SubMenu>
</Menu>
```
## API
### Menu props
| 参数 | 说明 | 类型 | 默认值 |
|----------|----------------|----------|--------------|
| mode | 菜单类型 | enum: 'vertical', 'horizontal', 'inline' | vertical |
| selectedKeys | 当前选中的菜单项 key 数组 | | |
| defaultSelectedKeys | 初始选中的菜单项 key 数组 | | |
| openKeys | 当前展开的菜单项 key 数组 | | |
| defaultOpenKeys | 初始展开的菜单项 key 数组 | | |
| onSelect | 被选中时调用,参数 {item, key, selectedKeys} 对象 | function | 无 |
| onDeselect | 取消选中时调用,参数 {item, key, selectedKeys} 对象,仅在 multiple 生效 | function | 无 |
| onClick | 点击 menuitem 调用此函数,参数为 {item, key} | function | 无 |
| style | 根节点样式 | object | | |
### Menu.Item props
| 参数 | 说明 | 类型 | 默认值 |
|----------|----------------|----------|--------------|
| disabled | 是否禁用 | Boolean | false |
| key | item 的唯一标志 | String | | |
### Menu.SubMenu props
| 参数 | 说明 | 类型 | 默认值 |
|----------|----------------|----------|--------------|
| title | 子菜单项值 | String or React.Element | |
| children | (MenuItem or SubMenu)[] | 子菜单的菜单项 | | |

View File

@@ -1,8 +1,8 @@
# 基本
# 修改延时
- order: 4
全局提示 - 操作成功提示,并自定义时长`10s`,默认时长`1.5s`
自定义时长 `10s`,默认时长`1.5s`
---

View File

@@ -1,8 +1,8 @@
# 基本
# 错误或失败
- order: 1
全局提示 - 操作失败反馈。
操作失败反馈。
---

View File

@@ -1,8 +1,8 @@
# 基本
# 普通提示
- order: 2
全局提示 - 提醒反馈。
信息提醒反馈。
---

View File

@@ -0,0 +1,20 @@
# 加载中
- order: 5
进行全局 loading异步自行移除。
---
````jsx
var message = antd.message;
var success = function() {
var hide = message.loading('正在执行中...', 0);
// 异步手动移除
setTimeout(hide, 2500);
};
React.render(<button className="ant-btn" onClick={success}>显示加载中...</button>
, document.getElementById('components-message-demo-loading'));
````

View File

@@ -1,13 +1,14 @@
# 基本
# 成功
- order: 0
全局提示 - 操作成功提示
操作成功反馈
---
````jsx
var message = antd.message;
var success = function() {
message.success('这是一条成功的提示');
};

View File

@@ -2,40 +2,63 @@ import React from 'react';
import Notification from 'rc-notification';
let defaultDuration = 1.5;
let top;
let messageInstance;
let key = 1;
function getMessageInstance() {
return Notification.newInstance({
messageInstance = messageInstance || Notification.newInstance({
prefixCls: 'ant-message',
transitionName: 'move-up',
style: {} // 覆盖原来的样式
style: {
top: top
} // 覆盖原来的样式
});
return messageInstance;
}
function notice(content, duration = defaultDuration, type) {
function notice(content, duration = defaultDuration, type, onClose) {
let iconClass = ({
'info': 'anticon-info-circle ant-message-info',
'success': 'anticon-check-circle ant-message-success',
'error': 'anticon-exclamation-circle ant-message-error'
'error': 'anticon-exclamation-circle ant-message-error',
'loading': 'anticon-loading ant-message-loading'
})[type];
getMessageInstance().notice({
key: 'simpleMessage',
let instance = getMessageInstance();
instance.notice({
key: key,
duration: duration,
style: {},
content: <div className="ant-message-custom-content">
<i className={'anticon ' + iconClass}></i>
<span>{content}</span>
</div>
</div>,
onClose: onClose
});
return (function() {
let target = key++;
return function() {
instance.removeNotice(target);
};
})();
}
export default {
info(content, duration) {
notice(content, duration, 'info');
info(content, duration, onClose) {
return notice(content, duration, 'info', onClose);
},
success(content, duration) {
notice(content, duration, 'success');
success(content, duration, onClose) {
return notice(content, duration, 'success', onClose);
},
error(content, duration) {
notice(content, duration, 'error');
error(content, duration, onClose) {
return notice(content, duration, 'error', onClose);
},
loading(content, duration, onClose) {
return notice(content, duration, 'loading', onClose);
},
config(options) {
if (options.top) {
top = options.top;
}
}
};

View File

@@ -2,7 +2,7 @@
- category: Components
- chinese: 全局提示
- order: 12
- type: 展示
---
@@ -18,6 +18,7 @@
- `message.success(content, duration)`
- `message.error(content, duration)`
- `message.info(content, duration)`
- `message.loading(content, duration)`
组件提供了三个静态方法,参数如下:
@@ -25,3 +26,18 @@
|------------|----------------|----------------------------|--------------|
| content | 提示内容 | React.Element or String | 无 |
| duration | 自动关闭的延时 | number | 1.5 |
还提供了一个全局配置方法:
- `message.config(options)`
```js
message.config({
top: 100
});
```
| 参数 | 说明 | 类型 | 默认值 |
|------------|--------------------|----------------------------|--------------|
| top | 消息距离顶部的位置 | Number | 24px |

View File

@@ -1,23 +1,31 @@
import React from 'react';
import Dialog from 'rc-dialog';
var div;
import Dialog from './index';
export default function (props) {
var d;
let div = document.createElement('div');
document.body.appendChild(div);
let d;
props = props || {};
props.iconClassName = props.iconClassName || 'anticon-exclamation-circle';
var width = props.width || 375;
props.iconClassName = props.iconClassName || 'anticon-question-circle';
let width = props.width || 416;
// 默认为 true保持向下兼容
if (!('okCancel' in props)) {
props.okCancel = true;
}
function close() {
d.setState({
visible: false
});
React.unmountComponentAtNode(div);
}
function onCancel() {
var cancelFn = props.onCancel;
let cancelFn = props.onCancel;
if (cancelFn) {
var ret;
let ret;
if (cancelFn.length) {
ret = cancelFn(close);
} else {
@@ -35,9 +43,9 @@ export default function (props) {
}
function onOk() {
var okFn = props.onOk;
let okFn = props.onOk;
if (okFn) {
var ret;
let ret;
if (okFn.length) {
ret = okFn(close);
} else {
@@ -54,29 +62,35 @@ export default function (props) {
}
}
var body = <div className="ant-confirm-body">
let body = <div className="ant-confirm-body">
<i className={'anticon ' + props.iconClassName}></i>
<span className="ant-confirm-title">{props.title}</span>
<div className="ant-confirm-content">{props.content}</div>
</div>;
var footer = <div className="ant-confirm-btns">
let footer = <div className="ant-confirm-btns">
<button type="button" className="ant-btn-default ant-btn ant-btn-lg" onClick={onCancel}> </button>
<button type="button" className="ant-btn-primary ant-btn ant-btn-lg" onClick={onOk}> </button>
</div>;
if (!div) {
div = document.createElement('div');
document.body.appendChild(div);
if (props.okCancel) {
footer = <div className="ant-confirm-btns">
<button type="button" className="ant-btn-default ant-btn ant-btn-lg" onClick={onCancel}> </button>
<button type="button" className="ant-btn-primary ant-btn ant-btn-lg" onClick={onOk}> </button>
</div>;
} else {
footer = <div className="ant-confirm-btns">
<button type="button" className="ant-btn-primary ant-btn ant-btn-lg" onClick={onOk}>知道了</button>
</div>;
}
React.render(<Dialog
prefixCls="ant-modal"
className="ant-confirm"
renderToBody={false}
visible={true}
closable={false}
title=""
transitionName="zoom"
footer=""
maskTransitionName="fade" width={width}>
<div style={{zoom: 1, overflow: 'hidden'}}>{body} {footer}</div>
</Dialog>, div, function () {

View File

@@ -9,11 +9,9 @@
````jsx
var Modal = antd.Modal;
var Test = React.createClass({
getInitialState(){
return{
visible: false
}
var App = React.createClass({
getInitialState() {
return { visible: false };
},
showModal() {
this.setState({
@@ -23,11 +21,11 @@ var Test = React.createClass({
handleOk() {
console.log('点击了确定');
this.setState({
confirmLoading: false,
visible: false
});
},
handleCancel() {
console.log('点击了取消');
this.setState({
visible: false
});
@@ -35,10 +33,8 @@ var Test = React.createClass({
render() {
return <div>
<button className="ant-btn ant-btn-primary" onClick={this.showModal}>显示对话框</button>
<Modal title="第一个 Modal"
visible={this.state.visible}
onOk={this.handleOk}
onCancel={this.handleCancel}>
<Modal title="第一个 Modal" visible={this.state.visible}
confirmLoading={this.state.confirmLoading} onOk={this.handleOk} onCancel={this.handleCancel}>
<p>对话框的内容</p>
<p>对话框的内容</p>
<p>对话框的内容</p>
@@ -47,6 +43,5 @@ var Test = React.createClass({
}
});
React.render(<Test/> , document.getElementById('components-modal-demo-basic'));
React.render(<App /> , document.getElementById('components-modal-demo-basic'));
````

View File

@@ -7,7 +7,7 @@
---
````jsx
var confirm = antd.confirm;
var confirm = antd.Modal.confirm;
function showConfirm(){
confirm({
@@ -15,8 +15,8 @@ function showConfirm(){
content: '一些解释',
onOk: function() {
alert('1 秒后关闭');
return new Promise(function(resolve){
setTimeout(resolve,1000);
return new Promise(function(resolve) {
setTimeout(resolve, 1000);
});
},
onCancel: function() {}

View File

@@ -7,7 +7,7 @@
---
````jsx
var confirm = antd.confirm;
var confirm = antd.Modal.confirm;
function showConfirm(){
confirm({

View File

@@ -26,11 +26,11 @@ var Test = React.createClass({
this.setState({
ModalText: '对话框将在两秒后关闭'
});
setTimeout((function() {
setTimeout(() => {
this.setState({
visible: false
});
}).bind(this), 2000);
}, 2000);
},
handleCancel() {
console.log('点击了取消');

View File

@@ -17,11 +17,13 @@ var Test = React.createClass({
};
},
showModal() {
this.setState({ visible: true });
this.setState({
visible: true
});
},
handleOk() {
this.setState({ loading: true });
setTimeout(()=> {
setTimeout(() => {
this.setState({ loading: false, visible: false });
}, 3000);
},
@@ -37,10 +39,9 @@ var Test = React.createClass({
visible={this.state.visible}
title="对话框标题" onOk={this.handleOk} onCancel={this.handleCancel}
footer={[
<button key="back" className="ant-btn" onClick={this.handleCancel}>返 回</button>,
<button key="submit" className="ant-btn ant-btn-primary" onClick={this.handleOk}>
<button key="back" className="ant-btn ant-btn-lg" onClick={this.handleCancel}>返 回</button>,
<button key="submit" className={'ant-btn ant-btn-primary ant-btn-lg ' + (this.state.loading?'ant-btn-loading':'')} onClick={this.handleOk}>
提 交
<i className={'anticon anticon-loading'+(this.state.loading?'':'hide')}></i>
</button>
]}>
<p>对话框的内容</p>

View File

@@ -0,0 +1,40 @@
# 信息提示
- order: 5
各种类型的信息提示,只提供一个按钮用于关闭。
---
````jsx
var Modal = antd.Modal;
function info() {
Modal.info({
title: '这是一条通知信息',
content: '一些附加信息一些附加信息一些附加信息',
onOk: function() {}
});
}
function success() {
Modal.success({
title: '这是一条通知信息',
content: '一些附加信息一些附加信息一些附加信息'
});
}
function error() {
Modal.error({
title: '这是一条通知信息',
content: '一些附加信息一些附加信息一些附加信息'
});
}
React.render(<div>
<button className="ant-btn" onClick={info}>信息提示</button>
<button className="ant-btn" onClick={success}>成功提示</button>
<button className="ant-btn" onClick={error}>失败提示</button>
</div>, document.getElementById('components-modal-demo-info'));
````

View File

@@ -1,59 +1,117 @@
import React from 'react';
import Dialog from 'rc-dialog';
import { Dom } from 'rc-util';
import confirm from './confirm';
function noop() {
}
export default React.createClass({
getInitialState() {
return {
visible: false,
confirmLoading: false
};
},
handleCancel() {
var d = this.refs.d;
d.requestClose();
},
let mousePosition;
let mousePositionEventBinded;
let AntModal = React.createClass({
getDefaultProps() {
return {
prefixCls: 'ant-modal',
onOk: noop,
onCancel: noop
onCancel: noop,
width: 520,
transitionName: 'zoom',
maskAnimation: 'fade'
};
},
getInitialState() {
return {
confirmLoading: false,
visible: this.props.visible
};
},
handleCancel() {
this.props.onCancel();
},
handleOk() {
this.setState({
confirmLoading: true
});
if (typeof this.props.onOk) {
this.props.onOk();
}
this.props.onOk();
},
componentWillReceiveProps(nextProps) {
let newState = {};
if ('visible' in nextProps) {
// 隐藏后去除按钮 loading 效果
newState.visible = nextProps.visible;
// 隐藏后默认去除按钮 loading 效果
if (!nextProps.visible) {
this.setState({
confirmLoading: false
});
newState.confirmLoading = false;
}
}
if ('confirmLoading' in nextProps) {
newState.confirmLoading = nextProps.confirmLoading;
}
this.setState(newState);
},
componentDidMount() {
if (mousePositionEventBinded) {
return;
}
// 只有点击事件支持从鼠标位置动画展开
Dom.addEventListener(document.body, 'click', function onDocumentMousemove(e) {
mousePosition = {
x: e.pageX,
y: e.pageY
};
// 20ms 内发生过点击事件,则从点击位置动画展示
// 否则直接 zoom 展示
// 这样可以兼容非点击方式展开
setTimeout(() => mousePosition = null, 20);
});
mousePositionEventBinded = true;
},
render() {
var loadingIcon = this.state.confirmLoading ?
<i className="anticon anticon-loading"></i> : '';
var props = this.props;
var footer = props.footer || [
let loadingClass = this.state.confirmLoading ? ' ant-btn-loading' : '';
let props = this.props;
let defaultFooter = [
<button key="cancel" type="button" className="ant-btn ant-btn-lg" onClick={this.handleCancel}> </button>,
<button key="confirm" type="button" className="ant-btn ant-btn-primary ant-btn-lg" onClick={this.handleOk}>
{loadingIcon}
<button key="confirm"
type="button"
className={'ant-btn ant-btn-primary ant-btn-lg' + loadingClass}
onClick={this.handleOk}>
</button>
];
return <Dialog transitionName="zoom" onBeforeClose={props.onCancel} visible={this.state.visible} maskAnimation="fade" width="500" footer={footer} {...props} ref="d" />;
let footer = props.footer || defaultFooter;
let visible = this.state.visible;
return <Dialog onClose={this.handleCancel} footer={footer} {...props}
visible={visible} mousePosition={mousePosition} />;
}
});
AntModal.info = function (props) {
props.iconClassName = 'anticon-info-circle';
props.okCancel = false;
return confirm(props);
};
AntModal.success = function (props) {
props.iconClassName = 'anticon-check-circle';
props.okCancel = false;
return confirm(props);
};
AntModal.error = function (props) {
props.iconClassName = 'anticon-exclamation-circle';
props.okCancel = false;
return confirm(props);
};
AntModal.confirm = function (props) {
props.okCancel = true;
return confirm(props);
};
export default AntModal;

View File

@@ -1,6 +1,6 @@
# Modal
- order: 11
- type: 展示
- category: Components
- chinese: 对话框
@@ -12,7 +12,7 @@
需要用户处理事务,又不希望跳转页面以致打断工作流程时,可以使用 `Modal` 在当前页面正中打开一个浮层,承载相应的操作。
另外当需要一个简洁的确认框询问用户时,可以使用精心封装好的 `ant.confirm()`
另外当需要一个简洁的确认框询问用户时,可以使用精心封装好的 `ant.Modal.confirm()` 等方法
## API
@@ -20,21 +20,36 @@
| 参数 | 说明 | 类型 | 默认值 |
|------------|----------------|------------------|--------------|
| visible | 对话框是否可见 | Boolean | 无 |
| confirmLoading | 确定按钮 loading | Boolean | 无 |
| title | 标题 | React.Element | 无 |
| onOk | 点击确定回调 | function | 无 |
| onOk | 点击确定回调 | function | 无 |
| onCancel | 点击遮罩层或右上角叉或取消按钮的回调 | function | 无 |
| width | 宽度 | String or Number | 500 |
| width | 宽度 | String or Number | 520 |
| footer | 底部内容 | React.Element | 确定取消按钮 |
### confirm()
### Modal.xxx()
`confirm` 为一个方法,参数为 object具体属性如下
包括
- `Modal.info`
- `Modal.success`
- `Modal.error`
- `Modal.confirm`
以上均为一个函数,参数为 object具体属性如下
| 参数 | 说明 | 类型 | 默认值 |
|------------|----------------|------------------|--------------|
| title | 标题 | React.Element or String | 无 |
| onOk | 点击确定回调,参数为关闭函数,返回 promise 时 resolve 后自动关闭 | function | 无 |
| onCancel | 取消回调,参数为关闭函数,返回 promise 时 resolve 后自动关闭 | function | 无 |
| width | 宽度 | String or Number | 375 |
| iconClassName | 图标样式名 | String | anticon-exclamation-circle |
| width | 宽度 | String or Number | 416 |
| iconClassName | 图标样式名 | String | anticon-question-circle |
<style>
.code-box-demo .ant-btn {
margin-right: 8px;
}
</style>

View File

@@ -1,39 +0,0 @@
# Motion
- category: CSS
- chinese: 组件动画
- order: 4
- cols: 1
---
## 组件的动画
通过设置组件的 `transitionName` 指定组件动画。
| 组件 | 中文名 | 采用动画 |
|--------------|---------------------|-------------------------------------------------|
| popover | 气泡浮出层 | `zoom-up` `zoom-down` `zoom-left` `zoom-right` |
| popconfirm | 气泡确认框 | `zoom-up` `zoom-down` `zoom-left` `zoom-right` |
| tooltip | 文字提示框 | `zoom-up` `zoom-down` `zoom-left` `zoom-right` |
| modal | 弹出框 | `zoom` |
| confirm | 弹出确认框 | `zoom` |
| message | 信息提示条 | `move-up` |
| dropdown | 下拉菜单 | `slide-up` |
| select | 选择框 | `slide-up` |
| datepicker | 日期选择框 | `slide-up` |
## 缓动函数
在以上组件的动画不适合时,请用以下缓动。
|名称 |参数 |说明与适用 |
|-------------------|------------------------------------------|---------------------------|
|@ease-out | `cubic-bezier(0.215, 0.61, 0.355, 1);` |默认后缓动;适合元素展开时; |
|@ease-in | `cubic-bezier(0.55, 0.055, 0.675, 0.19);`|默认前缓动;适合元素关闭时; |
|@ease-in-out | `cubic-bezier(0.645, 0.045, 0.355, 1);` |默认前后缓动;适合元素移动; |
|@ease-out-back | `cubic-bezier(0.18, 0.89, 0.32, 1.28);` |结束回动;适合弹出框出现时; |
|@ease-in-back | `cubic-bezier(0.6, -0.3, 0.74, 0.05);` |开始回动;适合弹出框关闭; |
|@ease-in-out-back | `cubic-bezier(0.68, -0.55, 0.27, 1.55);` |前后回动; |
|@ease-out-circ | `cubic-bezier(0.08, 0.82, 0.17, 1);` |圆形后缓动;适合元素展开时; |
|@ease-in-circ | `cubic-bezier(0.6, 0.04, 0.98, 0.34);` |圆形前缓动;适合元素关闭时; |
|@ease-in-out-circ | `cubic-bezier(0.78, 0.14, 0.15, 0.86);` |圆形缓动;适合元素移动; |

View File

@@ -0,0 +1,24 @@
# 基本
- order: 0
最简单的用法,五秒后自动关闭。
---
````jsx
var notification = antd.Notification;
var openNotification = function() {
notification.open({
message: "这是标题",
description: "这是提示框的文案这是提示框的文案这是提示框的文案这是提示框的文案这是提示框的文案这是提示框的文案这是提示框的文案"
});
};
React.render(
<div>
<button className='ant-btn ant-btn-primary' onClick={openNotification}>打开通知提醒框</button>
</div>,
document.getElementById('components-notification-demo-basic'));
````

View File

@@ -0,0 +1,24 @@
# 自动关闭的延时
- order: 1
自定义通知框自动关闭的延时,默认`4.5s`,取消自动关闭只要将该值设为 `0` 即可。
---
````jsx
var notification = antd.Notification;
var openNotification = function() {
var args = {
message: "这是标题",
description: "这是提示框的文案这是提示框的文案这是提示框的文案这是提示框的文案这是提示框的文案这是提示框的文案这是提示框的文案",
duration: 10
};
notification.open(args);
};
React.render(
<button className='ant-btn ant-btn-primary' onClick={openNotification}>打开通知提醒框</button>
, document.getElementById('components-notification-demo-duration'));
````

View File

@@ -0,0 +1,30 @@
# 回调函数
- order: 3
点击关闭按钮时触发回调函数。
---
````jsx
var notification = antd.Notification;
var close = function() {
console.log("我被默认的关闭按钮关闭了!");
};
var openNotification = function() {
var args = {
message: "这是标题",
description: "这是提示框的文案这是提示框示框的文案这是提示是提示框的文案这是提示框的文案",
onClose: close
};
notification.open(args);
};
React.render(
<div>
<button className='ant-btn ant-btn-primary' onClick={openNotification}>打开通知提醒框</button>
</div>,
document.getElementById('components-notification-demo-onclose'));
````

View File

@@ -0,0 +1,39 @@
# 自定义
- order: 4
自定义关闭按钮的样式和文字。
---
````jsx
var notification = antd.Notification;
var close = function(){
console.log('我被默认的关闭按钮关闭了!');
}
var openNotification = function() {
var key='open'+Date.now();
var btnClick = function() {
// 隐藏提醒框
notification.close(key);
};
var btn = <button className="ant-btn ant-btn-primary ant-btn-sm" onClick={btnClick}>
自定义关闭按钮并触发回调函数
</button>;
notification.open({
message: "这是标题",
description: "这是提示框的文案这是提示框示框的文案这是提示是提示框的文案这是提示框的文案",
btn: btn,
key: key,
onClose: close
});
};
React.render(
<div>
<button className="ant-btn ant-btn-primary" onClick={openNotification}>打开通知提醒框</button>
</div>,
document.getElementById('components-notification-demo-with-btn'));
````

View File

@@ -0,0 +1,34 @@
# 带有Icon的通知提醒框
- order: 2
通知提醒框左侧有图标。
---
````jsx
var notification = antd.Notification;
var openNotificationWithIcon = function(type) {
return function(){
notification[type]({
message: "这是标题",
description: "这是提示框的文案这是提示框示框的文案这是提示是提示框的文案这是提示框的文案"
});
};
};
React.render(<div>
<button className="ant-btn" onClick={openNotificationWithIcon('success')}>成功</button>
<button className="ant-btn" onClick={openNotificationWithIcon('info')}>消息</button>
<button className="ant-btn" onClick={openNotificationWithIcon('warn')}>警告</button>
<button className="ant-btn" onClick={openNotificationWithIcon('error')}>错误</button>
</div>
, document.getElementById('components-notification-demo-with-icon'));
````
<style>
.code-box-demo .ant-btn {
margin-right: 1em;
}
</style>

View File

@@ -0,0 +1,120 @@
import React from 'react';
import Notification from 'rc-notification';
import assign from 'object-assign';
let top = 24;
let notificationInstance;
function getNotificationInstance() {
if (notificationInstance) {
return notificationInstance;
}
notificationInstance = Notification.newInstance({
prefixCls: 'ant-notification',
style: {
top: top,
right: 0
}
});
return notificationInstance;
}
function notice(args) {
let duration;
if (args.duration === undefined) {
duration = 4.5;
} else {
duration = args.duration;
}
if (args.icon) {
let prefixCls = ' ant-notification-notice-content-icon-';
let iconClass = 'anticon anticon-';
switch (args.icon) {
case 'success':
iconClass += 'check-circle-o';
break;
case 'info':
iconClass += 'info-circle-o';
break;
case 'error':
iconClass += 'exclamation-circle-o';
break;
case 'warn':
iconClass += 'question-circle-o';
break;
default:
iconClass += 'info-circle';
}
getNotificationInstance().notice({
content: <div>
<i className={iconClass + prefixCls + 'icon-' + args.icon + prefixCls + 'icon'}></i>
<p className={prefixCls + 'message'}>{args.message}</p>
<p className={prefixCls + 'description'}>{args.description}</p>
</div>,
duration: duration,
closable: true,
onClose: args.onClose,
style: {}
});
} else {
let prefixCls = 'ant-notification-notice-content-';
if (!args.btn) {
getNotificationInstance().notice({
content: <div>
<p className={prefixCls + 'message'}>{args.message}</p>
<p className={prefixCls + 'description'}>{args.description}</p>
</div>,
duration: duration,
closable: true,
onClose: args.onClose,
style: {}
});
} else {
getNotificationInstance().notice({
content: <div>
<p className={prefixCls + 'message'}>{args.message}</p>
<p className={prefixCls + 'description'}>{args.description}</p>
<span className={prefixCls + 'btn'}>
{args.btn}
</span>
</div>,
duration: duration,
closable: true,
onClose: args.onClose,
key: args.key,
style: {}
});
}
}
}
let api = {
open(args){
notice(args);
},
close(key){
if (notificationInstance) {
notificationInstance.removeNotice(key);
}
},
config(options) {
top = isNaN(options.top) ? 24 : options.top;
}
};
['success', 'info', 'warn', 'error'].forEach((type) => {
api[type] = (args) => {
let newArgs = assign({}, args, {
icon: type
});
return api.open(newArgs);
};
});
export default api;

View File

@@ -1,6 +1,51 @@
# Notification
- category: Components
- chinese: 系统通知框
- chinese: 通知提醒
- type: 展示
---
全局展示通知提醒信息。
## 何时使用
在系统右上角显示通知提醒信息。经常用于以下情况:
- 较为复杂的通知内容。
- 带有交互的通知,给出用户下一步的行动点。
- 系统主动推送。
## API
- `notification.success(config)`
- `notification.error(config)`
- `notification.info(config)`
- `notification.warn(config)`
- `notification.open(config)`
- `notification.close(key: String)`
config 参数如下:
| 参数 | 说明 | 类型 | 默认值 |
|----------- |--------------------------------------------- | ----------- |--------|
| message | 通知提醒标题,必选 | React.Element or String | 无 |
| description | 通知提醒内容,必选 | React.Element or String | 无 |
| btn | 自定义关闭按钮 | React.Element | 无 |
| key | 当前通知唯一标志 | String | 无 |
| onClose | 点击默认关闭按钮时触发的回调函数 | Function | 无 |
| duration | 默认 4.5 秒后自动关闭,配置为 null 则不自动关闭 | Number | 4.5 |
还提供了一个全局配置方法,需要在调用前提前配置,一次有效。
- `notification.config(options)`
```js
message.config({
top: 100
});
```
| 参数 | 说明 | 类型 | 默认值 |
|------------|--------------------|----------------------------|--------------|
| top | 消息距离顶部的位置 | Number | 24px |

View File

@@ -13,7 +13,11 @@ function onChange(page) {
console.log(page);
}
function onShowSizeChange(current, pageSize) {
console.log(current, pageSize);
}
React.render(
<Pagination showSizeChanger={true} onChange={onChange} total={500} />,
<Pagination showSizeChanger={true} onShowSizeChange={onShowSizeChange} onChange={onChange} total={500} />,
document.getElementById('components-pagination-demo-changer'));
````

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