From 3fec4463564d0f833862e8a8ef712b516b8cd6fb Mon Sep 17 00:00:00 2001 From: Yuwei Ba Date: Fri, 17 Jul 2015 16:24:00 +0800 Subject: [PATCH 01/10] Add missing dep. --- package.json | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 07838ec1df..f8b411202f 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,9 @@ "framework", "frontend" ], - "contributors": ["ant"], + "contributors": [ + "ant" + ], "repository": { "type": "git", "url": "https://github.com/ant-design/ant-design" @@ -24,13 +26,16 @@ "url": "https://github.com/ant-design/ant-design/issues" }, "main": "lib/index", - "files": ["lib"], + "files": [ + "lib" + ], "license": "MIT", "dependencies": { "gregorian-calendar": "~3.0.0", "gregorian-calendar-format": "~3.0.1", "object-assign": "~3.0.0", "rc-calendar": "~3.10.0", + "rc-checkbox": "~1.0.6", "rc-collapse": "~1.2.2", "rc-dialog": "~4.4.0", "rc-dropdown": "~1.1.1", @@ -39,15 +44,14 @@ "rc-notification": "~1.0.1", "rc-pagination": "^1.0.0", "rc-progress": "~1.0.0", + "rc-radio": "~2.0.0", "rc-select": "~4.4.0", "rc-slider": "~1.2.6", "rc-steps": "~1.1.4", "rc-switch": "~1.2.0", "rc-table": "~3.1.0", "rc-tabs": "~5.2.0", - "rc-tooltip": "~2.4.0", - "rc-checkbox":"~1.0.0", - "rc-radio":"~2.0.0" + "rc-tooltip": "~2.4.0" }, "devDependencies": { "css-animation": "~1.0.3", From 46f00868d19dcb0f7b3074bf109eb57d95dd38ae Mon Sep 17 00:00:00 2001 From: Yuwei Ba Date: Fri, 17 Jul 2015 16:24:09 +0800 Subject: [PATCH 02/10] Use anticon. --- style/components/pagination.less | 41 +++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/style/components/pagination.less b/style/components/pagination.less index 19c4991c6c..f0c3f10800 100644 --- a/style/components/pagination.less +++ b/style/components/pagination.less @@ -53,6 +53,7 @@ } &-jump-prev, &-jump-next { + &:after { content: "•••"; display: block; @@ -73,7 +74,9 @@ &-jump-prev { &:hover { &:after { - content: "‹‹"; + font-family: "anticon"; + content: "\e604"; + transform: rotate(180deg); } } } @@ -81,7 +84,8 @@ &-jump-next { &:hover { &:after { - content: "››"; + font-family: "anticon"; + content: "\e604"; } } } @@ -106,14 +110,19 @@ &-prev, &-next { border: 1px solid #d9d9d9; + font-size: 18px; a { font-size: 16px; color: #666; &:after { display: block; - margin-top: -2px; + height: 28px; + line-height: 28px; + font-size: 10px; + font-family: "anticon"; } + } &:hover { @@ -136,6 +145,25 @@ } } + &-prev { + a { + &:after { + content: "\e611"; + display: block; + transform: rotate(180deg); + } + } + } + + &-next { + a { + &:after { + content: "\e611"; + display: block; + } + } + } + &-disabled { &:hover { border-color: #d9d9d9; @@ -225,6 +253,13 @@ height: 20px; line-height: 20px; border: none; + + a { + &:after { + height: 20px; + line-height: 20px; + } + } } &.mini &-jump-prev, &.mini &-jump-next { From 2a53e9f7454f62bcd2a19518c0521a0bff7a4170 Mon Sep 17 00:00:00 2001 From: Yuwei Ba Date: Mon, 20 Jul 2015 15:01:00 +0800 Subject: [PATCH 03/10] Adjust pagination jump button style. --- style/components/pagination.less | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/style/components/pagination.less b/style/components/pagination.less index f0c3f10800..3e428c5586 100644 --- a/style/components/pagination.less +++ b/style/components/pagination.less @@ -66,6 +66,9 @@ &:hover { &:after { color: @primary-color; + font-size: 8px; + letter-spacing: -1px; + font-family: "anticon"; } } @@ -74,8 +77,7 @@ &-jump-prev { &:hover { &:after { - font-family: "anticon"; - content: "\e604"; + content: "\e611\e611"; transform: rotate(180deg); } } @@ -84,8 +86,7 @@ &-jump-next { &:hover { &:after { - font-family: "anticon"; - content: "\e604"; + content: "\e611\e611"; } } } @@ -110,7 +111,6 @@ &-prev, &-next { border: 1px solid #d9d9d9; - font-size: 18px; a { font-size: 16px; @@ -119,7 +119,7 @@ display: block; height: 28px; line-height: 28px; - font-size: 10px; + font-size: 8px; font-family: "anticon"; } @@ -134,17 +134,6 @@ } } - &-prev { - a:after { - content: "‹"; - } - } - &-next { - a:after { - content: "›"; - } - } - &-prev { a { &:after { From ac3323e15b12bd5fb17ec85decbf794576188bca Mon Sep 17 00:00:00 2001 From: Yuwei Ba Date: Mon, 20 Jul 2015 15:01:38 +0800 Subject: [PATCH 04/10] Use ~ as dep prefix. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f8b411202f..c4bbba4ea7 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "rc-input-number": "~2.0.1", "rc-menu": "~3.4.2", "rc-notification": "~1.0.1", - "rc-pagination": "^1.0.0", + "rc-pagination": "~1.0.0", "rc-progress": "~1.0.0", "rc-radio": "~2.0.0", "rc-select": "~4.4.0", From 4967196f0d14960b1c442735049669adf14f0ae1 Mon Sep 17 00:00:00 2001 From: Yuwei Ba Date: Mon, 20 Jul 2015 15:16:05 +0800 Subject: [PATCH 05/10] Use iconfont-size mixin; --- style/components/pagination.less | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/style/components/pagination.less b/style/components/pagination.less index 3e428c5586..ba61bfe8a8 100644 --- a/style/components/pagination.less +++ b/style/components/pagination.less @@ -59,14 +59,13 @@ display: block; letter-spacing: 2px; color: #ccc; - font-size: 12px; margin-top: 1px; } &:hover { &:after { color: @primary-color; - font-size: 8px; + .iconfont-size-under-12px(8px); letter-spacing: -1px; font-family: "anticon"; } @@ -98,7 +97,7 @@ font-family: Arial; cursor: pointer; color: #666; - font-size: 10px; + .iconfont-size-under-12px(10px); border-radius: 6px; list-style: none; min-width: 28px; From d9cd12cdb6836b07f1088bc1dccafd160f05626f Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 20 Jul 2015 15:31:28 +0800 Subject: [PATCH 06/10] update selected style --- style/components/select.less | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/style/components/select.less b/style/components/select.less index 695a88cefd..1cee9637b2 100644 --- a/style/components/select.less +++ b/style/components/select.less @@ -231,12 +231,16 @@ &-selected { position: relative; &:after { + .iconfont-size-under-12px(9px); + display: inline-block; content: '\e613'; font-family: 'anticon'; font-weight: bold; position: absolute; top: 6px; - right: 16px; + right: 0; + background: tint(@primary-color, 90%); + padding-right: 16px; color: @primary-color; } } From b856228e1379a454491479b206236aadce024639 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 20 Jul 2015 15:32:47 +0800 Subject: [PATCH 07/10] fix iconfont-size mixin --- style/mixins/compatibility.less | 1 + 1 file changed, 1 insertion(+) diff --git a/style/mixins/compatibility.less b/style/mixins/compatibility.less index 860dc696b4..6f41ea71e2 100644 --- a/style/mixins/compatibility.less +++ b/style/mixins/compatibility.less @@ -19,6 +19,7 @@ // for iconfont font size // fix chrome 12px bug, support ie .iconfont-size-under-12px(@iconfontSize) { + display: inline-block; @font-scale: unit(@iconfontSize/@font-size-base); font-size: @font-scale; font-size: ~"@{iconfontSize} \9"; // ie8-9 From 8c22dac4aed40cd8838dc3dad118f5417cad091e Mon Sep 17 00:00:00 2001 From: Yuwei Ba Date: Mon, 20 Jul 2015 15:58:42 +0800 Subject: [PATCH 08/10] Fix scale --- style/components/pagination.less | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/style/components/pagination.less b/style/components/pagination.less index ba61bfe8a8..da561f2718 100644 --- a/style/components/pagination.less +++ b/style/components/pagination.less @@ -74,10 +74,10 @@ } &-jump-prev { + transform: rotate(180deg); &:hover { &:after { content: "\e611\e611"; - transform: rotate(180deg); } } } @@ -97,7 +97,6 @@ font-family: Arial; cursor: pointer; color: #666; - .iconfont-size-under-12px(10px); border-radius: 6px; list-style: none; min-width: 28px; @@ -106,19 +105,20 @@ float: left; text-align: center; transition: all 0.3s ease; + display: inline-block; } &-prev, &-next { border: 1px solid #d9d9d9; a { - font-size: 16px; color: #666; + &:after { + .iconfont-size-under-12px(8px); display: block; - height: 28px; - line-height: 28px; - font-size: 8px; + height: 26px; + line-height: 26px; font-family: "anticon"; } @@ -134,11 +134,11 @@ } &-prev { + transform: rotate(180deg); a { &:after { content: "\e611"; display: block; - transform: rotate(180deg); } } } From 44c5f8cfcad32e64e5ef871518e604cb50ce899d Mon Sep 17 00:00:00 2001 From: Yuwei Ba Date: Mon, 20 Jul 2015 16:01:04 +0800 Subject: [PATCH 09/10] use cross-rotate() --- style/components/pagination.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/style/components/pagination.less b/style/components/pagination.less index da561f2718..b54ec9d99a 100644 --- a/style/components/pagination.less +++ b/style/components/pagination.less @@ -74,7 +74,7 @@ } &-jump-prev { - transform: rotate(180deg); + .cross-rotate(180deg); &:hover { &:after { content: "\e611\e611"; @@ -134,7 +134,7 @@ } &-prev { - transform: rotate(180deg); + .cross-rotate(180deg); a { &:after { content: "\e611"; From 45ce3ad0cae54a8c3d5749a05f5a013f0837305d Mon Sep 17 00:00:00 2001 From: yiminghe Date: Mon, 20 Jul 2015 16:07:02 +0800 Subject: [PATCH 10/10] update get-started --- docs/getting-started.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index bf213613ae..40e94fe354 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -13,7 +13,7 @@ Ant Design 封装了一套基于 React 实现的 UI 组件,可以用 React 的 下面有一个使用了 [日期选择](http://ant.design/components/datepicker) 组件的简单例子。 - + 源码如下: @@ -25,6 +25,7 @@ Ant Design 封装了一套基于 React 实现的 UI 组件,可以用 React 的 + @@ -116,6 +117,7 @@ $ touch index.html + @@ -156,10 +158,10 @@ Ant Design 支持所有的现代浏览器和 IE8+。 + + - -