AnnexUpload.jsx 466 Bytes
Newer Older
DarkForst's avatar
DarkForst committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
import {useState} from "react"
import { Upload, message, Button } from 'antd';
import { UploadOutlined } from '@ant-design/icons';

const AnnexUpload = ({show , onFileChange}) => {
    const onChange = ({file , fileList}) => {
        console.log(fileList)
        onFileChange(fileList)
    }

    return <Upload showUploadList={false} onChange={onChange}>
        <Button icon={<UploadOutlined />}>上传文件</Button>
    </Upload>
}

export default AnnexUpload;