Skip to content
Merged
1 change: 0 additions & 1 deletion components/button/button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import LoadingOutlined from '@ant-design/icons-vue/LoadingOutlined';
import buttonTypes from './buttonTypes';
import { filterEmpty, getListeners } from '../_util/props-util';
import { ConfigConsumerProps } from '../config-provider';

// eslint-disable-next-line no-console
const rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/;
const isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);
Expand Down
18 changes: 10 additions & 8 deletions components/upload/UploadList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import { getOptionProps, initDefaultProps, getListeners } from '../_util/props-u
import getTransitionProps from '../_util/getTransitionProps';
import { ConfigConsumerProps } from '../config-provider';
import { previewImage, isImageUrl } from './utils';
import Icon from '../icon';
import {
UploadOutlined, PaperClipOutlined, PictureOutlined, FileOutlined,
DeleteOutlined, DownloadOutlined, EyeOutlined,
} from '@ant-design/icons-vue';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

直接写到路径,不然还是全量引入了

import Tooltip from '../tooltip';
import Progress from '../progress';
import classNames from 'classnames';
Expand Down Expand Up @@ -93,13 +96,13 @@ export default {

const list = items.map(file => {
let progress;
let icon = <Icon type={file.status === 'uploading' ? 'loading' : 'paper-clip'} />;
let icon = file.status === 'uploading' ? <UploadOutlined /> : <PaperClipOutlined />;

if (listType === 'picture' || listType === 'picture-card') {
if (listType === 'picture-card' && file.status === 'uploading') {
icon = <div class={`${prefixCls}-list-item-uploading-text`}>{locale.uploading}</div>;
} else if (!file.thumbUrl && !file.url) {
icon = <Icon class={`${prefixCls}-list-item-thumbnail`} type="picture" theme="twoTone" />;
icon = <PictureOutlined class={`${prefixCls}-list-item-thumbnail`} theme="twoTone" />;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有theme了

} else {
const thumbnail = isImageUrl(file) ? (
<img
Expand All @@ -108,7 +111,7 @@ export default {
class={`${prefixCls}-list-item-image`}
/>
) : (
<Icon type="file" class={`${prefixCls}-list-item-icon`} theme="twoTone" />
<FileOutlined class={`${prefixCls}-list-item-icon`} theme="twoTone" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

);
icon = (
<a
Expand Down Expand Up @@ -150,12 +153,11 @@ export default {
typeof file.linkProps === 'string' ? JSON.parse(file.linkProps) : file.linkProps;

const removeIcon = showRemoveIcon ? (
<Icon type="delete" title={locale.removeFile} onClick={() => this.handleClose(file)} />
<DeleteOutlined title={locale.removeFile} onClick={() => this.handleClose(file)} />
) : null;
const downloadIcon =
showDownloadIcon && file.status === 'done' ? (
<Icon
type="download"
<DownloadOutlined
title={locale.downloadFile}
onClick={() => this.handleDownload(file)}
/>
Expand Down Expand Up @@ -218,7 +220,7 @@ export default {
onClick={e => this.handlePreview(file, e)}
title={locale.previewFile}
>
<Icon type="eye-o" />
<EyeOutlined />
</a>
) : null;
const actions = listType === 'picture-card' && file.status !== 'uploading' && (
Expand Down
Loading