Слияние кода завершено, страница обновится автоматически
type | category | cols | title |
---|---|---|---|
Data Entry |
Components |
1 |
ImageCrop |
crop the image.
crop the image.
Property | Description | Type | Default |
---|---|---|---|
aspect | Aspect of crop area , width / height | number | 1 / 1 |
shape | Shape of crop area, 'rect' or 'round' | string | 'rect' |
grid | Show grid of crop area (third-lines) | boolean | false |
zoom | Enable zoom for image | boolean | true |
rotate | Enable rotate for image | boolean | false |
beforeCrop | Called before modal open, if return false , it'll not open | (file: UploadFile, uploadFiles: UploadFile[]) => boolean | |
onCancel | Called modal cancel | onCancel?: () => void | |
onOk | Called modal cancel | { url: string, blob: Blob,area:Area }=> void | |
modalVisible | control the modal visibility | boolean | ture |
serverCrop | when use upload the crop info to server and naturl image blob | boolean | false |
onCropComplete | crop complete callback | ({ url: string, blob: Blob, area: Area }) => void | |
cropContent | crop area render | (crop: ReactElement<EasyCropProps>) => React.ReactElement<any> | |
modalProps | modal props can't change the onOk , onCancel | ModalProps |
This component can be used to upload avatar, and add the preview
Property | Description | Type | Default |
---|---|---|---|
visible | The Modal can visibale | boolean | false |
onClose | callback when the Modal close | (visible: boolean) => void; | |
onUploadOk | callback when upload the avatar | (res: any) => void; | |
uploadUrl | the upload url | string | |
uploadFaild | call back when the upload failed | () => void; | |
uploadError | call back when the server is error | (error: any) => void; | |
handleUpload | call back when click the save button | (area: AvatarArea) => void; | |
cropComplete | call back when crop the finished | (imageState: any) => void; | |
title | the title of avatar upload | string | React.ReactElement; | |
previewTitle | the title of avatar preview | string | React.ReactElement; | |
reloadTitle | the title of avatar reupload | string | React.ReactElement; | |
uploadProps | config of upload | UploadProps | |
modalProps | config of modal | ModalProps | |
limit | limit of the type and size of the avatar | boolean | {type: 'jpeg,png,jpg',size: 1024,} |
previewList | defined the preview list | number[] | [80, 48, 34] |
editorWidth | crop width | number | 380 |
editorHeight | crop height | number | 380 |
rectSize | size of the crop area | number | 280 |
axiosConfig | the upload axios config | AxiosRequestConfig |
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )