Skip to content

Commit

Permalink
fix(upload): fix upload confirm bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yehuozhili committed Jun 30, 2020
1 parent 1797b59 commit ecb7d71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bigbear-ui",
"version": "0.2.4",
"version": "0.2.5",
"description": "Neumorphic component library for React;基于React制作的拟物风格组件库",
"keywords": [
"component",
Expand Down
4 changes: 3 additions & 1 deletion src/components/Upload/upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ function Upload(props: UploadProps) {
};
const handleSubmit = useCallback(
(files: FileList | null) => {
if (inputRef.current) {
inputRef.current.setAttribute("value", "");
}
let resFiles;
files ? (resFiles = files) : (resFiles = file);
if (customSubmit) {
Expand Down Expand Up @@ -300,7 +303,6 @@ function Upload(props: UploadProps) {
onChange={handleChange}
multiple={multiple}
accept={accept}
value={""}
></input>
<Button onClick={buttonclick} {...uploadBtnAtr}>
{uploadBtn}
Expand Down

0 comments on commit ecb7d71

Please sign in to comment.