+ {!(uploadNumber !== 0 && uploadNumber! <= flist.length) && (
+
+
+
+
+ )}
+ {confirm && !(uploadNumber !== 0 && uploadNumber! <= flist.length) && (
+
+
+ {file &&
+ Array.from(file).map((item, index) => {
+ if (customShowChoose) {
+ return customShowChoose(item);
+ } else {
+ return (
+
+ );
+ }
+ })}
+
+
handleSubmit(null)}>
+ {submitBtn ? submitBtn : }
+
+
+ )}
+ {type === "img" && (
+
+ )}
+ {type === "progress" &&
}
+
+ );
+}
+
+Upload.defaultProps = {
+ url: "http://localhost:6699/user/uploadAvatar",
+ confirm: false,
+ type: "default",
+ uploadBtn: "Upload",
+ uploadNumber: 0
+};
+
+export default Upload;
diff --git a/src/components/Upload/uploadlist.tsx b/src/components/Upload/uploadlist.tsx
new file mode 100644
index 0000000..4724fcb
--- /dev/null
+++ b/src/components/Upload/uploadlist.tsx
@@ -0,0 +1,97 @@
+import React, { useMemo, memo } from "react";
+import Icon from "../Icon";
+import { ProgressBar } from "./upload";
+import Progress from "../Progress";
+import Alert from "../Alert";
+import Avatar from "../Avatar";
+import { UpdateFilist } from "./upload";
+
+interface UploadListProps {
+ flist: ProgressBar[];
+ onRemove: (item: ProgressBar) => void;
+}
+
+function UploadList(props: UploadListProps) {
+ const { flist, onRemove } = props;
+ return (
+