diff --git a/components/config-provider/__tests__/__snapshots__/components.test.js.snap b/components/config-provider/__tests__/__snapshots__/components.test.js.snap index 0ff571740c..acf6552695 100644 --- a/components/config-provider/__tests__/__snapshots__/components.test.js.snap +++ b/components/config-provider/__tests__/__snapshots__/components.test.js.snap @@ -17369,92 +17369,90 @@ exports[`ConfigProvider components Upload configProvider 1`] = `
-
-
- - + + + - + + + + xxx.png + + + - xxx.png - - - - - - + + + + + - - - + + + + -
+
@@ -17480,92 +17478,90 @@ exports[`ConfigProvider components Upload normal 1`] = `
-
-
- - + + + - + + + + xxx.png + + + - xxx.png - - - - - - + + + + + - - - + + + + -
+
@@ -17591,92 +17587,90 @@ exports[`ConfigProvider components Upload prefixCls 1`] = `
-
-
- - + + + - + + + + xxx.png + + + - xxx.png - - - - - - + + + + + - - - + + + + -
+
diff --git a/components/upload/UploadList.tsx b/components/upload/UploadList.tsx index 74d48f7695..7cfddc5e06 100644 --- a/components/upload/UploadList.tsx +++ b/components/upload/UploadList.tsx @@ -234,13 +234,11 @@ export default class UploadList extends React.Component { ); const dom = (
-
-
{iconAndPreview}
- {actions} - - {progress} - -
+
{iconAndPreview}
+ {actions} + + {progress} +
); const listContainerNameClass = classNames({ diff --git a/components/upload/__tests__/__snapshots__/demo.test.js.snap b/components/upload/__tests__/__snapshots__/demo.test.js.snap index bdcd76daaa..08c27a69be 100644 --- a/components/upload/__tests__/__snapshots__/demo.test.js.snap +++ b/components/upload/__tests__/__snapshots__/demo.test.js.snap @@ -40,206 +40,6 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = `
-
- -
-
- - -
- -
-
- -
-
-
-
-
-
-
@@ -264,17 +64,42 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = ` - zzz.png + xxx.png + + + + + @@ -304,6 +129,175 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = `
+ +
+
+ + + +
+
+
+
+ + + + + + zzz.png + + + + + + + + + +
@@ -353,19 +347,162 @@ exports[`renders ./components/upload/demo/fileList.md correctly 1`] = `
-
+ +
+ +
+ + +`; + +exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = ` +
+ +
+
+ +
+ + + + + + + + + + +
+
+
+
+ +
+ + + + + + + + + + + + + + +
+
+
+
+ +
+ + + + + + + + + + + + + + +
+
+
+
+ +
+ + + + + + + + + + + + + + +
+
+
+
+
+
+ + + + + + image.png + + +
+ + + + + + + + + + +
+
+
+
+ +
+`; + +exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = ` +
+ + - -`; - -exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = ` -
- -
-
- -
-
- - - - - - - - - - - - - - -
-
- -
-
- -
-
- - - - - - - - - - - - - - -
-
-
-
-
- -
-
- - - - - - - - - - - - - - -
-
-
-
-
- -
-
- - - - - - - - - - - - - - -
-
-
-
-
-
-
-
- - - - - - image.png - - -
- - - - - - - - - - -
-
-
-
-
- -
-`; - -exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = ` -
- -
-
-
-
-
- - + + + - + + + + + + + + yyy.png + + + - yyy.png - - - - - - + + + + -
+
@@ -1232,148 +1210,59 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = ` - -
- diff --git a/components/upload/__tests__/__snapshots__/uploadlist.test.js.snap b/components/upload/__tests__/__snapshots__/uploadlist.test.js.snap index 9961cf2cc9..38e067dbfe 100644 --- a/components/upload/__tests__/__snapshots__/uploadlist.test.js.snap +++ b/components/upload/__tests__/__snapshots__/uploadlist.test.js.snap @@ -33,67 +33,65 @@ exports[`Upload List handle error 1`] = `
-
-
- - + + + - + + + + foo.png + + + - foo.png - - - - - - + + + + -
+
@@ -135,85 +133,83 @@ exports[`Upload List should be uploading when upload a file 1`] = `
-
-
- - + + + - + + + + foo.png + + + - foo.png - - - - - - + + + + -
+ +
+
-
-
+
+
-
-
+ class="ant-progress-bg" + style="width: 0%; height: 2px;" + />
@@ -260,110 +256,108 @@ exports[`Upload List should be uploading when upload a file 2`] = `
-
-
- - + + + - + + + + foo.png + + + - foo.png - - - - - - + + + + + - - - + + + + -
+ +
+
-
-
+
+
-
-
+ class="ant-progress-bg" + style="width: 0%; height: 2px;" + />
@@ -410,25 +404,66 @@ exports[`Upload List should non-image format file preview 1`] = ` -
- - - -
-
- - @@ -727,25 +514,47 @@ exports[`Upload List should non-image format file preview 1`] = `
- @@ -839,88 +605,105 @@ exports[`Upload List should non-image format file preview 1`] = `
- @@ -932,88 +715,105 @@ exports[`Upload List should non-image format file preview 1`] = `
- @@ -1025,88 +825,86 @@ exports[`Upload List should non-image format file preview 1`] = `
- @@ -1118,88 +916,86 @@ exports[`Upload List should non-image format file preview 1`] = `
- @@ -1211,88 +1007,86 @@ exports[`Upload List should non-image format file preview 1`] = `
- @@ -1304,88 +1098,268 @@ exports[`Upload List should non-image format file preview 1`] = ` + +
+ + @@ -1428,41 +1402,39 @@ exports[`Upload List should support showRemoveIcon and showPreviewIcon 1`] = `
- @@ -1473,63 +1445,61 @@ exports[`Upload List should support showRemoveIcon and showPreviewIcon 1`] = `
-
-
diff --git a/components/upload/style/index.less b/components/upload/style/index.less index 4fcd465bc5..b975491555 100644 --- a/components/upload/style/index.less +++ b/components/upload/style/index.less @@ -443,6 +443,8 @@ } .anticon-picture + .@{upload-item}-name { + position: absolute; + bottom: 10px; display: block; }