注册时使用公共组件上传营业执照附件
This commit is contained in:
@ -20,6 +20,7 @@ import {
|
||||
AttachmentSection,
|
||||
} from './CommonFormSections';
|
||||
import { validateFileSize } from '@/utils/utils';
|
||||
import FileUpload from '@/components/FileUpload/FileUpload';
|
||||
|
||||
const { Option } = Select;
|
||||
const { TextArea } = Input;
|
||||
@ -73,16 +74,23 @@ const DomesticForm: React.FC<DomesticFormProps> = ({
|
||||
label="营业执照附件"
|
||||
extra="pdf,jpg,jpeg,png类型的文件,大小不超过10MB"
|
||||
rules={[{ required: true, message: '请上传营业执照附件' }]}
|
||||
// getValueProps={(value) => {
|
||||
// return {
|
||||
// value: value?.length > 0 ? value[0]?.url : undefined,
|
||||
// };
|
||||
// }}
|
||||
getValueFromEvent={(value) => {
|
||||
return value?.length > 0 ? value[0]?.url : undefined;
|
||||
}}
|
||||
>
|
||||
<Upload
|
||||
name="businessLicense"
|
||||
action="/api/upload"
|
||||
<FileUpload
|
||||
listType="text"
|
||||
maxCount={1}
|
||||
beforeUpload={(file) => validateFileSize(file, 10, ['pdf', 'jpg', 'jpeg', 'png'])}
|
||||
maxSize={10}
|
||||
allowedTypes={['pdf', 'jpg', 'jpeg', 'png']}
|
||||
>
|
||||
<Button icon={<UploadOutlined />}>上传文件</Button>
|
||||
</Upload>
|
||||
</FileUpload>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
|
Reference in New Issue
Block a user