From cf77d46493ffad2ea715b66ec4dc5ee53c1d83db Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 13 Jan 2016 22:26:40 +0800 Subject: [PATCH 1/5] fix search icon --- style/core/iconfont.less | 1 - 1 file changed, 1 deletion(-) diff --git a/style/core/iconfont.less b/style/core/iconfont.less index e62df6778..4fa743fb7 100644 --- a/style/core/iconfont.less +++ b/style/core/iconfont.less @@ -65,7 +65,6 @@ .@{iconfont-css-prefix}-search:before {content:"\e690";} .@{iconfont-css-prefix}-share-alt:before {content:"\e68e";} .@{iconfont-css-prefix}-setting:before {content:"\e68d";} -.@{iconfont-css-prefix}-search:before {content:"\e68c";} .@{iconfont-css-prefix}-poweroff:before {content:"\e68b";} .@{iconfont-css-prefix}-picture:before {content:"\e689";} .@{iconfont-css-prefix}-phone:before {content:"\e688";} From 027a69b0f0592d06b8bf8d422408a1b0c3cd6745 Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 13 Jan 2016 22:32:42 +0800 Subject: [PATCH 2/5] hide multiple upload demo --- components/upload/demo/multiple.md | 1 + components/upload/index.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/upload/demo/multiple.md b/components/upload/demo/multiple.md index 57bc033d2..a02a46460 100644 --- a/components/upload/demo/multiple.md +++ b/components/upload/demo/multiple.md @@ -1,6 +1,7 @@ # 多文件选择 - order: 5 +- hidden: 5 按住 ctrl 可选择多个文件,`ie10+` 支持。 diff --git a/components/upload/index.md b/components/upload/index.md index f490a4ce3..bcbbcbf73 100644 --- a/components/upload/index.md +++ b/components/upload/index.md @@ -24,7 +24,7 @@ | action | 必选参数, 上传的地址 | String | 无 | | data | 可选参数, 上传所需参数 | Object | 无 | | showUploadList | 可选参数, 是否展示 uploadList, 默认开启 | Boolean | true | -| multiple | 可选参数, 是否支持多选文件,支持 `ie10+` | Boolean | false | +| multiple | 可选参数, 是否支持多选文件,`ie10+` 支持。开启后按住 ctrl 可选择多个文件。 | Boolean | false | | accept | 可选参数, 接受上传的文件类型, 详见 input accept Attribute | String | 无 | | beforeUpload | 可选参数, 上传文件之前的钩子,参数为上传的文件,若返回 `false` 或者 Promise 则停止上传。**注意:该方法不支持老 IE**。 | Function | 无 | | onChange | 可选参数, 上传文件改变时的状态,详见 onChange | Function | 无 | From fdcc665c8066f1a5a33498010ae8fc19d8115b91 Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 13 Jan 2016 22:39:02 +0800 Subject: [PATCH 3/5] merge drag upload demo --- components/upload/demo/drag-simple.md | 32 ------------------------- components/upload/demo/drag.md | 34 ++++++++++++++------------- 2 files changed, 18 insertions(+), 48 deletions(-) delete mode 100644 components/upload/demo/drag-simple.md diff --git a/components/upload/demo/drag-simple.md b/components/upload/demo/drag-simple.md deleted file mode 100644 index e1d384a88..000000000 --- a/components/upload/demo/drag-simple.md +++ /dev/null @@ -1,32 +0,0 @@ -# 拖拽上传 - -- order: 4 - -样式简单一些。 - ---- - -````jsx -import { Upload, Icon } from 'antd'; -const Dragger = Upload.Dragger; - -const props = { - name: 'file', - showUploadList: false, - action: '/upload.do' -}; - -ReactDOM.render( - - - , - mountNode -); -```` - -````css -#components-upload-demo-drag-simple { - width: 246px; - height: 146px; -} -```` diff --git a/components/upload/demo/drag.md b/components/upload/demo/drag.md index de230a4d7..5932e07df 100644 --- a/components/upload/demo/drag.md +++ b/components/upload/demo/drag.md @@ -13,23 +13,25 @@ const Dragger = Upload.Dragger; const props = { name: 'file', showUploadList: false, - action: '/upload.do' + action: '/upload.do', }; ReactDOM.render( - -

- -

-

点击或将文件拖拽到此区域上传

-

支持单个或批量上传,严禁上传公司内部资料及其他违禁文件

-
, - mountNode -); -```` - -````css -#components-upload-demo-drag { - height: 180px; -} +
+
+ + + +
+
+ +

+ +

+

点击或将文件拖拽到此区域上传

+

支持单个或批量上传,严禁上传公司内部资料及其他违禁文件

+
+
+
+, mountNode); ```` From 63476680bd38fb7434ef0f5123d0edd8b620b620 Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 13 Jan 2016 22:43:55 +0800 Subject: [PATCH 4/5] Add upload inline item demo, ref #859 --- components/upload/demo/picture-style.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/components/upload/demo/picture-style.md b/components/upload/demo/picture-style.md index 308244379..0d2259dc2 100644 --- a/components/upload/demo/picture-style.md +++ b/components/upload/demo/picture-style.md @@ -4,7 +4,7 @@ 上传文件为图片,可展示本地缩略图。 -`IE8/9` 不支持浏览器本地缩略图展示([ref](https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL)),可以写 `thumbUrl` 属性来代替。 +`IE8/9` 不支持浏览器本地缩略图展示([Ref](https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL)),可以写 `thumbUrl` 属性来代替。 --- @@ -30,10 +30,28 @@ const props = { }; ReactDOM.render( +
+
+
+ + + +
, mountNode); ```` + +````css +/* 加几行样式将上传项变成平铺样式 */ +.upload-list-inline .ant-upload-list-item { + display: inline-block; + width: 200px; + margin-right: 8px; +} +```` From 644c43f4e094e225f67d9223c39518d0292f4f3f Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 13 Jan 2016 22:46:05 +0800 Subject: [PATCH 5/5] fix demo style --- site/static/style.css | 1 + 1 file changed, 1 insertion(+) diff --git a/site/static/style.css b/site/static/style.css index c13a8fd70..48155d133 100644 --- a/site/static/style.css +++ b/site/static/style.css @@ -911,6 +911,7 @@ footer ul li > a { font-size: 12px; margin: 0.5em 0; padding-right: 25px; + width: 100%; } .code-box .collapse {