panhui há 4 anos atrás
pai
commit
9cac078f84
2 ficheiros alterados com 3 adições e 2 exclusões
  1. 1 1
      src/plugins/imageUrl.js
  2. 2 1
      src/views/Home.vue

+ 1 - 1
src/plugins/imageUrl.js

@@ -26,7 +26,7 @@ function draw(list, prepath) {
 }
 
 function drawList(list, index = 0, ctx, prepath) {
-  if (index < list.length - 1) {
+  if (index < list.length) {
     return getImg(path.resolve(prepath, list[index]), ctx).then(() => {
       return drawList(list, index + 1, ctx, prepath);
     });

+ 2 - 1
src/views/Home.vue

@@ -38,7 +38,7 @@ export default {
       total: 0,
       now: 0,
       max: 100,
-      type: 0,
+      type: 1,
     };
   },
   computed: {
@@ -108,6 +108,7 @@ export default {
       }
     },
     drawType2(_map) {
+      console.log(_map);
       const allkeys = [..._map.keys()].sort((a, b) => {
         return Number(a) - Number(b);
       });