Skip to content

Commit

Permalink
[Upload] fix: uploadTime missing on using requestMethod (#1567)
Browse files Browse the repository at this point in the history
* fix(web): input-number input number validate

* fix(web): canInputNumber

* fix(web): uploadTime

* revert: uploadTime code

---------

Co-authored-by: sheepluo <[email protected]>
  • Loading branch information
chaishi and sheepluo authored Aug 14, 2023
1 parent f8eb7e1 commit c1eeb32
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/upload/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import isFunction from 'lodash/isFunction';
import isNumber from 'lodash/isNumber';
/* eslint-disable no-param-reassign */
import { isOverSizeLimit } from './utils';
import { getCurrentDate, isOverSizeLimit } from './utils';
import xhr from './xhr';
import log from '../log/log';
import {
Expand Down Expand Up @@ -171,6 +171,8 @@ export function uploadOneRequest(params: HandleUploadParams): Promise<UploadRequ
file.response = response;
file.url = response.url;
file.percent = res.status === 'success' ? 100 : 0;
// 如果上传请求返回结果没有上传日期,则使用电脑当前日期显示
file.uploadTime = response?.uploadTime || getCurrentDate();
});
resultFiles = toUploadFiles;
}
Expand Down

0 comments on commit c1eeb32

Please sign in to comment.