修复了小数点

This commit is contained in:
luyuan 2020-11-23 14:51:23 +08:00
parent 8ccc7e7b0d
commit a472d4e251
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
3 changed files with 11 additions and 4 deletions

View File

@ -960,7 +960,8 @@ export default defineComponent({
issum = false;
const res = await uploadflie(file.file, (info: any) => {
console.log(info);
const jindu = info.percent.toFixed(2) * 100
let jindu: number = info.percent.toFixed(2) * 100;
jindu = parseInt(jindu + "");
uploadprogress.value = jindu > 0 ? jindu : 1;
});
userinfo.value.video = res.video.url;

View File

@ -231,7 +231,9 @@ export default defineComponent({
const res = await uploadflie(file.file, (info: any) => {
console.log(info);
uploadpicprogress.value = info.percent.toFixed(2) * 100;
let jindu: number = info.percent.toFixed(2) * 100;
jindu = parseInt(jindu + "");
uploadpicprogress.value = jindu || 1;
});
console.log(res);
form.value.img = res.video.url;

View File

@ -511,7 +511,9 @@ export default defineComponent({
uploadprogress.value = 1;
const res = await uploadflie(file.file, (info: any) => {
console.log(info);
const jindu = info.percent.toFixed(2) * 100
// const jindu = info.percent.toFixed(2) * 100
let jindu: number = info.percent.toFixed(2) * 100;
jindu = parseInt(jindu + "");
uploadprogress.value = jindu > 0 ? jindu : 1;
});
console.log(res);
@ -525,7 +527,9 @@ export default defineComponent({
uploadpicprogress.value = 1;
const res = await uploadflie(file.file, (info: any) => {
console.log(info);
uploadpicprogress.value = info.percent.toFixed(2) * 100 || 1;
let jindu: number = info.percent.toFixed(2) * 100;
jindu = parseInt(jindu + "");
uploadpicprogress.value = jindu || 1;
});
console.log(res);