Commit a35fb2991a0bae66244f7f9b49189c7aa73db4dc

Authored by 梁灏
1 parent 724a6077

update LoadingBar speed

examples/routers/loading-bar.vue
@@ -19,11 +19,11 @@ @@ -19,11 +19,11 @@
19 } 19 }
20 }, 20 },
21 created () { 21 created () {
22 - this.$Loading.config({  
23 - color: '#5cb85c',  
24 - failedColor: '#f0ad4e',  
25 - height: 5  
26 - }); 22 +// this.$Loading.config({
  23 +// color: '#5cb85c',
  24 +// failedColor: '#f0ad4e',
  25 +// height: 5
  26 +// });
27 } 27 }
28 } 28 }
29 </script> 29 </script>
src/components/loading-bar/index.js
@@ -55,7 +55,7 @@ export default { @@ -55,7 +55,7 @@ export default {
55 }); 55 });
56 56
57 timer = setInterval(() => { 57 timer = setInterval(() => {
58 - percent += Math.floor(Math.random () * 3 + 5); 58 + percent += Math.floor(Math.random () * 3 + 1);
59 if (percent > 95) { 59 if (percent > 95) {
60 clearTimer(); 60 clearTimer();
61 } 61 }