yxw 2023-11-24 16:25:24 +08:00
parent 663fd786f3
commit 19c5336294
1 changed files with 1 additions and 4 deletions

View File

@ -190,10 +190,8 @@
// 添加文件上传的监听
// onprogress:进度监听事件,只要上传文件的进度发生了变化,就会自动的触发这个事件
newxhr.upload.onprogress = function (e) {
let percent = (e.loaded / e.total) * 100 + '%'
console.log(percent)
// $('div').css('width', percent)
}
return newxhr
},
@ -239,8 +237,7 @@
console.log(res)
}
})
},
dataType: 'json'
}
})
})
})