fix loading animation bug

This commit is contained in:
Gitshaoxiang
2020-04-03 19:07:10 +08:00
parent 0cce7f09ef
commit 58deb9b749
2 changed files with 3 additions and 4 deletions
+2 -3
View File
@@ -465,11 +465,10 @@
* Render progress bar
*/
function progressbar (ref) {
barE2.style.display = "block";
var loaded = ref.loaded;
var total = ref.total;
var step = ref.step;
var num;
!barEl && init();
@@ -480,7 +479,7 @@
} else {
num = Math.floor(loaded / total * 100);
}
barE2.style.display = "block";
barEl.style.opacity = 1;
barEl.style.width = num >= 95 ? '100%' : num + '%';
if (num == Infinity) {
+1 -1
View File
File diff suppressed because one or more lines are too long