Commit 17e91ab6 authored by liujiangnan's avatar liujiangnan

fix: 上传进度条控制

parent ac7dd246
...@@ -119,8 +119,7 @@ export class UploadVideoComponent implements OnChanges, OnDestroy { ...@@ -119,8 +119,7 @@ export class UploadVideoComponent implements OnChanges, OnDestroy {
break; break;
case 'progress': case 'progress':
this.progress = info.event.percent; this.doProgress(info.event.percent);
this.doProgress(this.progress);
break; break;
} }
} }
...@@ -199,7 +198,8 @@ export class UploadVideoComponent implements OnChanges, OnDestroy { ...@@ -199,7 +198,8 @@ export class UploadVideoComponent implements OnChanges, OnDestroy {
doProgress = (p) => { doProgress = (p) => {
if (p > 1) { if (p > 1) {
p = 1; this.progress = p;
return;
} }
if (p < 0) { if (p < 0) {
p = 0; p = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment