Skip to content

Commit

Permalink
fix(baInput):修复上传组件的文件状态可能错误的问题 close #IACBVV
Browse files Browse the repository at this point in the history
  • Loading branch information
build-admin committed Jul 24, 2024
1 parent 69e7878 commit a99f87e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/src/components/baInput/components/baUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ const onElChange = (file: UploadFileExt, files: UploadFiles) => {
fileUpload(fd, { uuid: uuid() }, props.forceLocal, {
onUploadProgress: (evt: AxiosProgressEvent) => {
const progressEvt = evt as UploadProgressEvent
if (evt.total && evt.total > 0) {
if (evt.total && evt.total > 0 && ['ready', 'uploading'].includes(file.status!)) {
progressEvt.percent = (evt.loaded / evt.total) * 100
file.status = 'uploading'
file.percentage = Math.round(progressEvt.percent)
Expand Down

0 comments on commit a99f87e

Please sign in to comment.