prs_frontend/src/components/InterviewerInfoPop/EnclosureTabs/index.jsx
2022-07-20 18:39:11 +08:00

50 lines
1.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React from 'react'
import './index.css'
import { UploadOutlined } from '@ant-design/icons'
import { Button, message, Upload,Input } from 'antd'
const props = {
name: 'file',
action: 'https://www.mocky.io/v2/5cc8019d300000980a055e76',
headers: {
authorization: 'authorization-text',
},
onChange(info) {
if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList)
}
if (info.file.status === 'done') {
message.success(`${info.file.name} file uploaded successfully`)
} else if (info.file.status === 'error') {
message.error(`${info.file.name} file upload failed.`)
}
},
}
export default function EnclosureTabs() {
return (
<div className="EnclosureTabs-box">
<h2>附件</h2>
<Upload {...props}>
<Button icon={<UploadOutlined />}>附件上传</Button>
</Upload>
<p>
支持文档图片压缩包视频音频设计文件等格式文件单次上传文件总量请小于50MB
</p>
<h2>个人链接</h2>
<Input.Group compact>
<Input
style={{
width: 'calc(100% - 70px)',
}}
defaultValue="请输入"
/>
<Button type="primary">保存</Button>
</Input.Group>
</div>
)
}