fix: #24519 Upload delete icon cannot be navigate via keyboard (#24615)

* fix: Upload delete icon cannot be navigate via keyboard

* update Upload style dependencies
This commit is contained in:
Teng YANG 2020-06-01 13:29:22 +08:00 committed by GitHub
parent 68a185a08f
commit 19ca646ef3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 476 additions and 362 deletions

View File

@ -37627,15 +37627,16 @@ exports[`ConfigProvider components Upload configProvider 1`] = `
<span <span
class="config-upload-list-item-card-actions " class="config-upload-list-item-card-actions "
> >
<a <button
class="config-btn config-upload-list-item-card-actions-btn config-btn-text config-btn-sm config-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -37652,7 +37653,7 @@ exports[`ConfigProvider components Upload configProvider 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -37730,15 +37731,16 @@ exports[`ConfigProvider components Upload configProvider componentSize large 1`]
<span <span
class="config-upload-list-item-card-actions " class="config-upload-list-item-card-actions "
> >
<a <button
class="config-btn config-upload-list-item-card-actions-btn config-btn-text config-btn-sm config-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -37755,7 +37757,7 @@ exports[`ConfigProvider components Upload configProvider componentSize large 1`]
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -37833,15 +37835,16 @@ exports[`ConfigProvider components Upload configProvider componentSize middle 1`
<span <span
class="config-upload-list-item-card-actions " class="config-upload-list-item-card-actions "
> >
<a <button
class="config-btn config-upload-list-item-card-actions-btn config-btn-text config-btn-sm config-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -37858,7 +37861,7 @@ exports[`ConfigProvider components Upload configProvider componentSize middle 1`
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -37936,15 +37939,16 @@ exports[`ConfigProvider components Upload configProvider virtual and dropdownMat
<span <span
class="ant-upload-list-item-card-actions " class="ant-upload-list-item-card-actions "
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -37961,7 +37965,7 @@ exports[`ConfigProvider components Upload configProvider virtual and dropdownMat
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -38039,15 +38043,16 @@ exports[`ConfigProvider components Upload normal 1`] = `
<span <span
class="ant-upload-list-item-card-actions " class="ant-upload-list-item-card-actions "
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -38064,7 +38069,7 @@ exports[`ConfigProvider components Upload normal 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -38142,15 +38147,16 @@ exports[`ConfigProvider components Upload prefixCls 1`] = `
<span <span
class="ant-upload-list-item-card-actions " class="ant-upload-list-item-card-actions "
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -38167,7 +38173,7 @@ exports[`ConfigProvider components Upload prefixCls 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>

View File

@ -9,12 +9,13 @@ import EyeOutlined from '@ant-design/icons/EyeOutlined';
import DeleteOutlined from '@ant-design/icons/DeleteOutlined'; import DeleteOutlined from '@ant-design/icons/DeleteOutlined';
import DownloadOutlined from '@ant-design/icons/DownloadOutlined'; import DownloadOutlined from '@ant-design/icons/DownloadOutlined';
import { cloneElement, isValidElement } from '../_util/reactNode';
import { UploadListProps, UploadFile, UploadListType } from './interface'; import { UploadListProps, UploadFile, UploadListType } from './interface';
import { previewImage, isImageUrl } from './utils'; import { previewImage, isImageUrl } from './utils';
import Tooltip from '../tooltip'; import Tooltip from '../tooltip';
import Progress from '../progress'; import Progress from '../progress';
import { ConfigConsumer, ConfigConsumerProps } from '../config-provider'; import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
import { cloneElement, isValidElement } from '../_util/reactNode'; import Button, { ButtonProps } from '../button';
export default class UploadList extends React.Component<UploadListProps, any> { export default class UploadList extends React.Component<UploadListProps, any> {
static defaultProps = { static defaultProps = {
@ -98,23 +99,36 @@ export default class UploadList extends React.Component<UploadListProps, any> {
return icon; return icon;
}; };
handleActionIconRender = (customIcon: React.ReactNode, callback: () => void, title?: string) => { handleActionIconRender = (
customIcon: React.ReactNode,
callback: () => void,
prefixCls: string,
title?: string,
) => {
const btnProps: ButtonProps = {
type: 'text',
size: 'small',
title,
onClick: (e: React.MouseEvent<HTMLElement>) => {
callback();
if (isValidElement(customIcon) && customIcon.props.onClick) {
customIcon.props.onClick(e);
}
},
className: `${prefixCls}-list-item-card-actions-btn`,
};
if (isValidElement(customIcon)) { if (isValidElement(customIcon)) {
return cloneElement(customIcon, { const btnIcon = cloneElement(customIcon, {
...customIcon.props, ...customIcon.props,
title, onClick: () => {},
onClick: (e: React.MouseEvent<HTMLElement>) => {
callback();
if (customIcon.props.onClick) {
customIcon.props.onClick(e);
}
},
}); });
return <Button {...btnProps} icon={btnIcon} />;
} }
return ( return (
<span title={title} onClick={callback}> <Button {...btnProps}>
{customIcon} <span>{customIcon}</span>
</span> </Button>
); );
}; };
@ -195,28 +209,21 @@ export default class UploadList extends React.Component<UploadListProps, any> {
typeof file.linkProps === 'string' ? JSON.parse(file.linkProps) : file.linkProps; typeof file.linkProps === 'string' ? JSON.parse(file.linkProps) : file.linkProps;
const removeIcon = showRemoveIcon const removeIcon = showRemoveIcon
? (customRemoveIcon && ? this.handleActionIconRender(
this.handleActionIconRender( customRemoveIcon || <DeleteOutlined />,
customRemoveIcon, () => this.handleClose(file),
() => this.handleClose(file), prefixCls,
locale.removeFile, locale.removeFile,
)) || (
<DeleteOutlined title={locale.removeFile} onClick={() => this.handleClose(file)} />
) )
: null; : null;
const downloadIcon = const downloadIcon =
showDownloadIcon && file.status === 'done' showDownloadIcon && file.status === 'done'
? (customDownloadIcon && ? this.handleActionIconRender(
this.handleActionIconRender( customDownloadIcon || <DownloadOutlined />,
customDownloadIcon, () => this.handleDownload(file),
() => this.handleDownload(file), prefixCls,
locale.downloadFile, locale.downloadFile,
)) || (
<DownloadOutlined
title={locale.downloadFile}
onClick={() => this.handleDownload(file)}
/>
) )
: null; : null;
const downloadOrDelete = listType !== 'picture-card' && ( const downloadOrDelete = listType !== 'picture-card' && (
@ -226,8 +233,8 @@ export default class UploadList extends React.Component<UploadListProps, any> {
listType === 'picture' ? 'picture' : '' listType === 'picture' ? 'picture' : ''
}`} }`}
> >
{downloadIcon && <a title={locale.downloadFile}>{downloadIcon}</a>} {downloadIcon}
{removeIcon && <a title={locale.removeFile}>{removeIcon}</a>} {removeIcon}
</span> </span>
); );
const listItemNameClass = classNames({ const listItemNameClass = classNames({

View File

@ -177,28 +177,33 @@ exports[`renders ./components/upload/demo/crop-image.md correctly 1`] = `
</svg> </svg>
</span> </span>
</a> </a>
<span <button
aria-label="delete" class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
class="anticon anticon-delete"
role="img"
tabindex="-1"
title="Remove file" title="Remove file"
type="button"
> >
<svg <span
aria-hidden="true" aria-label="delete"
class="" class="anticon anticon-delete"
data-icon="delete" role="img"
fill="currentColor" tabindex="-1"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
> >
<path <svg
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" aria-hidden="true"
/> class=""
</svg> data-icon="delete"
</span> fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"
/>
</svg>
</span>
</button>
</span> </span>
</div> </div>
</span> </span>
@ -373,15 +378,16 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = `
<span <span
class="ant-upload-list-item-card-actions " class="ant-upload-list-item-card-actions "
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -398,7 +404,7 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -452,15 +458,16 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = `
<span <span
class="ant-upload-list-item-card-actions " class="ant-upload-list-item-card-actions "
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -477,7 +484,7 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -530,15 +537,16 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = `
<span <span
class="ant-upload-list-item-card-actions " class="ant-upload-list-item-card-actions "
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -555,7 +563,7 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -788,28 +796,33 @@ exports[`renders ./components/upload/demo/file-type.md correctly 1`] = `
</svg> </svg>
</span> </span>
</a> </a>
<span <button
aria-label="delete" class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
class="anticon anticon-delete"
role="img"
tabindex="-1"
title="Remove file" title="Remove file"
type="button"
> >
<svg <span
aria-hidden="true" aria-label="delete"
class="" class="anticon anticon-delete"
data-icon="delete" role="img"
fill="currentColor" tabindex="-1"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
> >
<path <svg
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" aria-hidden="true"
/> class=""
</svg> data-icon="delete"
</span> fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"
/>
</svg>
</span>
</button>
</span> </span>
</div> </div>
</span> </span>
@ -902,28 +915,33 @@ exports[`renders ./components/upload/demo/file-type.md correctly 1`] = `
</svg> </svg>
</span> </span>
</a> </a>
<span <button
aria-label="delete" class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
class="anticon anticon-delete"
role="img"
tabindex="-1"
title="Remove file" title="Remove file"
type="button"
> >
<svg <span
aria-hidden="true" aria-label="delete"
class="" class="anticon anticon-delete"
data-icon="delete" role="img"
fill="currentColor" tabindex="-1"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
> >
<path <svg
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" aria-hidden="true"
/> class=""
</svg> data-icon="delete"
</span> fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"
/>
</svg>
</span>
</button>
</span> </span>
</div> </div>
</span> </span>
@ -1017,28 +1035,33 @@ exports[`renders ./components/upload/demo/file-type.md correctly 1`] = `
</svg> </svg>
</span> </span>
</a> </a>
<span <button
aria-label="delete" class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
class="anticon anticon-delete"
role="img"
tabindex="-1"
title="Remove file" title="Remove file"
type="button"
> >
<svg <span
aria-hidden="true" aria-label="delete"
class="" class="anticon anticon-delete"
data-icon="delete" role="img"
fill="currentColor" tabindex="-1"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
> >
<path <svg
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" aria-hidden="true"
/> class=""
</svg> data-icon="delete"
</span> fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"
/>
</svg>
</span>
</button>
</span> </span>
</div> </div>
</div> </div>
@ -1131,28 +1154,33 @@ exports[`renders ./components/upload/demo/file-type.md correctly 1`] = `
</svg> </svg>
</span> </span>
</a> </a>
<span <button
aria-label="delete" class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
class="anticon anticon-delete"
role="img"
tabindex="-1"
title="Remove file" title="Remove file"
type="button"
> >
<svg <span
aria-hidden="true" aria-label="delete"
class="" class="anticon anticon-delete"
data-icon="delete" role="img"
fill="currentColor" tabindex="-1"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
> >
<path <svg
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" aria-hidden="true"
/> class=""
</svg> data-icon="delete"
</span> fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"
/>
</svg>
</span>
</button>
</span> </span>
</div> </div>
</div> </div>
@ -1237,28 +1265,33 @@ exports[`renders ./components/upload/demo/file-type.md correctly 1`] = `
</svg> </svg>
</span> </span>
</a> </a>
<span <button
aria-label="delete" class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
class="anticon anticon-delete"
role="img"
tabindex="-1"
title="Remove file" title="Remove file"
type="button"
> >
<svg <span
aria-hidden="true" aria-label="delete"
class="" class="anticon anticon-delete"
data-icon="delete" role="img"
fill="currentColor" tabindex="-1"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
> >
<path <svg
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" aria-hidden="true"
/> class=""
</svg> data-icon="delete"
</span> fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"
/>
</svg>
</span>
</button>
</span> </span>
</div> </div>
</div> </div>
@ -1411,15 +1444,16 @@ exports[`renders ./components/upload/demo/fileList.md correctly 1`] = `
<span <span
class="ant-upload-list-item-card-actions " class="ant-upload-list-item-card-actions "
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -1436,7 +1470,7 @@ exports[`renders ./components/upload/demo/fileList.md correctly 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -1521,28 +1555,33 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
</svg> </svg>
</span> </span>
</a> </a>
<span <button
aria-label="delete" class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
class="anticon anticon-delete"
role="img"
tabindex="-1"
title="Remove file" title="Remove file"
type="button"
> >
<svg <span
aria-hidden="true" aria-label="delete"
class="" class="anticon anticon-delete"
data-icon="delete" role="img"
fill="currentColor" tabindex="-1"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
> >
<path <svg
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" aria-hidden="true"
/> class=""
</svg> data-icon="delete"
</span> fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"
/>
</svg>
</span>
</button>
</span> </span>
</div> </div>
</span> </span>
@ -1611,28 +1650,33 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
</svg> </svg>
</span> </span>
</a> </a>
<span <button
aria-label="delete" class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
class="anticon anticon-delete"
role="img"
tabindex="-1"
title="Remove file" title="Remove file"
type="button"
> >
<svg <span
aria-hidden="true" aria-label="delete"
class="" class="anticon anticon-delete"
data-icon="delete" role="img"
fill="currentColor" tabindex="-1"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
> >
<path <svg
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" aria-hidden="true"
/> class=""
</svg> data-icon="delete"
</span> fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"
/>
</svg>
</span>
</button>
</span> </span>
</div> </div>
</span> </span>
@ -1701,28 +1745,33 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
</svg> </svg>
</span> </span>
</a> </a>
<span <button
aria-label="delete" class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
class="anticon anticon-delete"
role="img"
tabindex="-1"
title="Remove file" title="Remove file"
type="button"
> >
<svg <span
aria-hidden="true" aria-label="delete"
class="" class="anticon anticon-delete"
data-icon="delete" role="img"
fill="currentColor" tabindex="-1"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
> >
<path <svg
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" aria-hidden="true"
/> class=""
</svg> data-icon="delete"
</span> fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"
/>
</svg>
</span>
</button>
</span> </span>
</div> </div>
</span> </span>
@ -1791,28 +1840,33 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
</svg> </svg>
</span> </span>
</a> </a>
<span <button
aria-label="delete" class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
class="anticon anticon-delete"
role="img"
tabindex="-1"
title="Remove file" title="Remove file"
type="button"
> >
<svg <span
aria-hidden="true" aria-label="delete"
class="" class="anticon anticon-delete"
data-icon="delete" role="img"
fill="currentColor" tabindex="-1"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
> >
<path <svg
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" aria-hidden="true"
/> class=""
</svg> data-icon="delete"
</span> fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"
/>
</svg>
</span>
</button>
</span> </span>
</div> </div>
</span> </span>
@ -1906,28 +1960,33 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
</svg> </svg>
</span> </span>
</a> </a>
<span <button
aria-label="delete" class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
class="anticon anticon-delete"
role="img"
tabindex="-1"
title="Remove file" title="Remove file"
type="button"
> >
<svg <span
aria-hidden="true" aria-label="delete"
class="" class="anticon anticon-delete"
data-icon="delete" role="img"
fill="currentColor" tabindex="-1"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
> >
<path <svg
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" aria-hidden="true"
/> class=""
</svg> data-icon="delete"
</span> fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"
/>
</svg>
</span>
</button>
</span> </span>
</div> </div>
</div> </div>
@ -2068,15 +2127,16 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
<span <span
class="ant-upload-list-item-card-actions picture" class="ant-upload-list-item-card-actions picture"
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -2093,7 +2153,7 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -2160,15 +2220,16 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
<span <span
class="ant-upload-list-item-card-actions picture" class="ant-upload-list-item-card-actions picture"
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -2185,7 +2246,7 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -2279,15 +2340,16 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
<span <span
class="ant-upload-list-item-card-actions picture" class="ant-upload-list-item-card-actions picture"
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -2304,7 +2366,7 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -2371,15 +2433,16 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
<span <span
class="ant-upload-list-item-card-actions picture" class="ant-upload-list-item-card-actions picture"
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -2396,7 +2459,7 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -2614,24 +2677,25 @@ exports[`renders ./components/upload/demo/upload-custom-action-icon.md correctly
<span <span
class="ant-upload-list-item-card-actions " class="ant-upload-list-item-card-actions "
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm"
title="Download file" title="Download file"
type="button"
> >
<span <span>
title="Download file"
>
download download
</span> </span>
</a> </button>
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="star" aria-label="star"
class="anticon anticon-star" class="anticon anticon-star"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -2648,7 +2712,7 @@ exports[`renders ./components/upload/demo/upload-custom-action-icon.md correctly
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -2702,24 +2766,25 @@ exports[`renders ./components/upload/demo/upload-custom-action-icon.md correctly
<span <span
class="ant-upload-list-item-card-actions " class="ant-upload-list-item-card-actions "
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm"
title="Download file" title="Download file"
type="button"
> >
<span <span>
title="Download file"
>
download download
</span> </span>
</a> </button>
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="star" aria-label="star"
class="anticon anticon-star" class="anticon anticon-star"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -2736,7 +2801,7 @@ exports[`renders ./components/upload/demo/upload-custom-action-icon.md correctly
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -2789,15 +2854,16 @@ exports[`renders ./components/upload/demo/upload-custom-action-icon.md correctly
<span <span
class="ant-upload-list-item-card-actions " class="ant-upload-list-item-card-actions "
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="star" aria-label="star"
class="anticon anticon-star" class="anticon anticon-star"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -2814,7 +2880,7 @@ exports[`renders ./components/upload/demo/upload-custom-action-icon.md correctly
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>

View File

@ -70,15 +70,16 @@ exports[`Upload List handle error 1`] = `
<span <span
class="ant-upload-list-item-card-actions " class="ant-upload-list-item-card-actions "
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -95,7 +96,7 @@ exports[`Upload List handle error 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -176,15 +177,16 @@ exports[`Upload List should be uploading when upload a file 1`] = `
<span <span
class="ant-upload-list-item-card-actions " class="ant-upload-list-item-card-actions "
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -201,7 +203,7 @@ exports[`Upload List should be uploading when upload a file 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -303,15 +305,16 @@ exports[`Upload List should be uploading when upload a file 2`] = `
<span <span
class="ant-upload-list-item-card-actions " class="ant-upload-list-item-card-actions "
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -328,7 +331,7 @@ exports[`Upload List should be uploading when upload a file 2`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -441,15 +444,16 @@ exports[`Upload List should non-image format file preview 1`] = `
<span <span
class="ant-upload-list-item-card-actions picture" class="ant-upload-list-item-card-actions picture"
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -466,7 +470,7 @@ exports[`Upload List should non-image format file preview 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -508,15 +512,16 @@ exports[`Upload List should non-image format file preview 1`] = `
<span <span
class="ant-upload-list-item-card-actions picture" class="ant-upload-list-item-card-actions picture"
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -533,7 +538,7 @@ exports[`Upload List should non-image format file preview 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -595,15 +600,16 @@ exports[`Upload List should non-image format file preview 1`] = `
<span <span
class="ant-upload-list-item-card-actions picture" class="ant-upload-list-item-card-actions picture"
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -620,7 +626,7 @@ exports[`Upload List should non-image format file preview 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -682,15 +688,16 @@ exports[`Upload List should non-image format file preview 1`] = `
<span <span
class="ant-upload-list-item-card-actions picture" class="ant-upload-list-item-card-actions picture"
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -707,7 +714,7 @@ exports[`Upload List should non-image format file preview 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -749,15 +756,16 @@ exports[`Upload List should non-image format file preview 1`] = `
<span <span
class="ant-upload-list-item-card-actions picture" class="ant-upload-list-item-card-actions picture"
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -774,7 +782,7 @@ exports[`Upload List should non-image format file preview 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -816,15 +824,16 @@ exports[`Upload List should non-image format file preview 1`] = `
<span <span
class="ant-upload-list-item-card-actions picture" class="ant-upload-list-item-card-actions picture"
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -841,7 +850,7 @@ exports[`Upload List should non-image format file preview 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -883,15 +892,16 @@ exports[`Upload List should non-image format file preview 1`] = `
<span <span
class="ant-upload-list-item-card-actions picture" class="ant-upload-list-item-card-actions picture"
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -908,7 +918,7 @@ exports[`Upload List should non-image format file preview 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -950,15 +960,16 @@ exports[`Upload List should non-image format file preview 1`] = `
<span <span
class="ant-upload-list-item-card-actions picture" class="ant-upload-list-item-card-actions picture"
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -975,7 +986,7 @@ exports[`Upload List should non-image format file preview 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -1017,15 +1028,16 @@ exports[`Upload List should non-image format file preview 1`] = `
<span <span
class="ant-upload-list-item-card-actions picture" class="ant-upload-list-item-card-actions picture"
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -1042,7 +1054,7 @@ exports[`Upload List should non-image format file preview 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -1084,15 +1096,16 @@ exports[`Upload List should non-image format file preview 1`] = `
<span <span
class="ant-upload-list-item-card-actions picture" class="ant-upload-list-item-card-actions picture"
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<span <span
aria-label="delete" aria-label="delete"
class="anticon anticon-delete" class="anticon anticon-delete"
role="img" role="img"
tabindex="-1" tabindex="-1"
title="Remove file"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -1109,7 +1122,7 @@ exports[`Upload List should non-image format file preview 1`] = `
/> />
</svg> </svg>
</span> </span>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -1194,15 +1207,15 @@ exports[`Upload List should support removeIcon and downloadIcon 1`] = `
<span <span
class="ant-upload-list-item-card-actions picture" class="ant-upload-list-item-card-actions picture"
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<i <i>
title="Remove file"
>
RM RM
</i> </i>
</a> </button>
</span> </span>
</span> </span>
</div> </div>
@ -1247,24 +1260,24 @@ exports[`Upload List should support removeIcon and downloadIcon 1`] = `
<span <span
class="ant-upload-list-item-card-actions picture" class="ant-upload-list-item-card-actions picture"
> >
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Download file" title="Download file"
type="button"
> >
<i <i>
title="Download file"
>
DL DL
</i> </i>
</a> </button>
<a <button
class="ant-btn ant-upload-list-item-card-actions-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
title="Remove file" title="Remove file"
type="button"
> >
<i <i>
title="Remove file"
>
RM RM
</i> </i>
</a> </button>
</span> </span>
</span> </span>
</div> </div>

View File

@ -119,6 +119,7 @@
color: @text-color-secondary; color: @text-color-secondary;
font-size: @font-size-base; font-size: @font-size-base;
} }
.@{iconfont-css-prefix}-plus { .@{iconfont-css-prefix}-plus {
color: @disabled-color; color: @disabled-color;
font-size: 30px; font-size: 30px;
@ -176,15 +177,26 @@
&-card-actions { &-card-actions {
position: absolute; position: absolute;
right: 0; right: 0;
opacity: 0;
&-btn {
opacity: 0;
}
&-btn.@{ant-prefix}-btn-sm {
height: 20px;
line-height: 1;
}
&.picture { &.picture {
top: 25px; top: 22px;
line-height: 1; line-height: 0;
}
&-btn:focus,
&.picture &-btn {
opacity: 1; opacity: 1;
} }
.@{iconfont-css-prefix} { .@{iconfont-css-prefix} {
padding-right: 6px;
color: @upload-actions-color; color: @upload-actions-color;
} }
} }
@ -236,7 +248,7 @@
opacity: 1; opacity: 1;
} }
&:hover &-card-actions { &:hover &-card-actions-btn {
opacity: 1; opacity: 1;
} }
@ -250,7 +262,9 @@
.@{iconfont-css-prefix} { .@{iconfont-css-prefix} {
color: @error-color; color: @error-color;
} }
opacity: 1; &-btn {
opacity: 1;
}
} }
&-progress { &-progress {
@ -271,9 +285,11 @@
padding: @padding-xs; padding: @padding-xs;
border: @border-width-base @upload-picture-card-border-style @border-color-base; border: @border-width-base @upload-picture-card-border-style @border-color-base;
border-radius: @border-radius-base; border-radius: @border-radius-base;
&:hover { &:hover {
background: transparent; background: transparent;
} }
&-error { &-error {
border-color: @error-color; border-color: @error-color;
} }
@ -313,6 +329,7 @@
&[fill='#e6f7ff'] { &[fill='#e6f7ff'] {
fill: color(~`colorPalette('@{error-color}', 1) `); fill: color(~`colorPalette('@{error-color}', 1) `);
} }
&[fill='#1890ff'] { &[fill='#1890ff'] {
fill: @error-color; fill: @error-color;
} }
@ -389,12 +406,14 @@
&.@{upload-prefix-cls}-list::after { &.@{upload-prefix-cls}-list::after {
display: none; display: none;
} }
&-container { &-container {
float: left; float: left;
width: @upload-picture-card-size; width: @upload-picture-card-size;
height: @upload-picture-card-size; height: @upload-picture-card-size;
margin: 0 @margin-xs @margin-xs 0; margin: 0 @margin-xs @margin-xs 0;
} }
.@{upload-item} { .@{upload-item} {
float: left; float: left;
width: @upload-picture-card-size; width: @upload-picture-card-size;
@ -443,6 +462,7 @@
font-size: 16px; font-size: 16px;
cursor: pointer; cursor: pointer;
transition: all 0.3s; transition: all 0.3s;
&:hover { &:hover {
color: @text-color-inverse; color: @text-color-inverse;
} }
@ -484,6 +504,7 @@
.@{upload-item}-info { .@{upload-item}-info {
height: auto; height: auto;
&::before, &::before,
.@{iconfont-css-prefix}-eye, .@{iconfont-css-prefix}-eye,
.@{iconfont-css-prefix}-delete { .@{iconfont-css-prefix}-delete {

View File

@ -2,5 +2,6 @@ import '../../style/index.less';
import './index.less'; import './index.less';
// style dependencies // style dependencies
import '../../button/style';
import '../../progress/style'; import '../../progress/style';
import '../../tooltip/style'; import '../../tooltip/style';