zy-react-library 1.0.59 → 1.0.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,6 +19,8 @@ export interface UploadProps extends Omit<AntUploadProps, "fileList"> {
19
19
  uploadButtonText?: string;
20
20
  /** 要上传的文件类型,默认为 image */
21
21
  fileType?: "image" | "video" | "document";
22
+ /** 获取上传过服务器删除的附件 */
23
+ onGetRemoveFile?: (file: UploadFile) => void;
22
24
  }
23
25
 
24
26
  /**
@@ -28,7 +30,3 @@ export interface UploadProps extends Omit<AntUploadProps, "fileList"> {
28
30
  declare const Upload: FC<UploadProps>;
29
31
 
30
32
  export default Upload;
31
-
32
- // 视频:数量默认1个,且只支持mp4格式,单个文件大小默认100M
33
- // 文件:数量默认4个,且只支持pdf、doc、docx格式
34
- // 图片:数量默认4个,且只支持jpg、jpeg、png格式
@@ -193,7 +193,7 @@ const Upload = (props) => {
193
193
 
194
194
  // 删除文件
195
195
  const handleRemove = (file) => {
196
- if (file.originFileObj)
196
+ if (!file.originFileObj)
197
197
  onGetRemoveFile?.(file);
198
198
  return onRemove?.(file);
199
199
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zy-react-library",
3
3
  "private": false,
4
- "version": "1.0.59",
4
+ "version": "1.0.60",
5
5
  "type": "module",
6
6
  "description": "",
7
7
  "author": "LiuJiaNan",