|
@@ -1,6 +1,6 @@
|
|
import CropperImg from '@/components/CropperImg';
|
|
import CropperImg from '@/components/CropperImg';
|
|
import { useOss } from '@/Hook/useOss';
|
|
import { useOss } from '@/Hook/useOss';
|
|
-import { PlusOutlined } from '@ant-design/icons';
|
|
|
|
|
|
+import { PlusOutlined } from '@ant-design/icons';
|
|
import { message, Upload } from 'antd';
|
|
import { message, Upload } from 'antd';
|
|
import { RcFile } from 'antd/es/upload';
|
|
import { RcFile } from 'antd/es/upload';
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
@@ -34,12 +34,12 @@ const UploadImg: React.FC<Props> = ({ value, onChange, size, type, isCropper, is
|
|
<div>
|
|
<div>
|
|
<div style={{ height: 45, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
|
|
<div style={{ height: 45, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
|
|
{' '}
|
|
{' '}
|
|
- <PlusOutlined/>
|
|
|
|
|
|
+ <PlusOutlined />
|
|
</div>
|
|
</div>
|
|
<div style={{ display: 'flex', flexFlow: 'column' }}>
|
|
<div style={{ display: 'flex', flexFlow: 'column' }}>
|
|
<span>上传图片</span>
|
|
<span>上传图片</span>
|
|
<span style={{ color: '#999', fontSize: 10 }}>
|
|
<span style={{ color: '#999', fontSize: 10 }}>
|
|
- {size?.width} * {size?.height}
|
|
|
|
|
|
+ >={size?.width} * >={size?.height}
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -63,7 +63,7 @@ const UploadImg: React.FC<Props> = ({ value, onChange, size, type, isCropper, is
|
|
accept="image/png,image/jpg,image/jpeg"
|
|
accept="image/png,image/jpg,image/jpeg"
|
|
action="#"
|
|
action="#"
|
|
showUploadList={false}
|
|
showUploadList={false}
|
|
- customRequest={() => {}}
|
|
|
|
|
|
+ customRequest={() => { }}
|
|
className={imageUrl ? styles.upLoadTrue : ''}
|
|
className={imageUrl ? styles.upLoadTrue : ''}
|
|
beforeUpload={(file: RcFile): any => {
|
|
beforeUpload={(file: RcFile): any => {
|
|
if (file.size > 10485760) {
|
|
if (file.size > 10485760) {
|