上传直接出进度条

This commit is contained in:
luyuan 2020-11-19 10:24:09 +08:00
parent 3dba6dca46
commit a7024c98af
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3

View File

@ -518,9 +518,10 @@ export default defineComponent({
}
const ifallowpic = ref<boolean>(false);
async function uploadspic(file: AntUpload) {
uploadpicprogress.value = 1;
const res = await uploadflie(file.file, (info: any) => {
console.log(info);
uploadpicprogress.value = info.percent.toFixed(2) * 100;
uploadpicprogress.value = info.percent.toFixed(2) * 100 || 1;
});
console.log(res);