bianjiang 1 jaar geleden
bovenliggende
commit
74527179e4

+ 1 - 1
src/modules/list/actions/canvas.ts

@@ -54,7 +54,7 @@ export default ListModule.action({
         halfOffset += item.offsetY;
       });
       let repeatArr: any = [];
-      const times = Math.ceil(canvas.height / halfOffset);
+      const times = Math.ceil((canvas.height * 2) / halfOffset);
       for (let i = 0; i < times; i++) {
         repeatArr = [...repeatArr, ...arr];
       }

+ 2 - 2
src/modules/list/actions/list.ts

@@ -3,8 +3,8 @@ import ListModule from "..";
 import { queenApi } from "queenjs";
 import { cloneDeep } from "lodash";
 export default ListModule.action({
-  async getAssetList() {
-    if (this.store.list.length > 0) {
+  async getAssetList(init = false) {
+    if (this.store.list.length > 0 && init) {
       return;
     }
     const { deviceCtrl } = useCtx();

+ 1 - 1
src/pages/website/routes/backend/List.tsx

@@ -4,7 +4,7 @@ import { css } from "@linaria/core";
 import { Image } from "@queenjs/ui";
 import { Button, Select, Space, Table } from "ant-design-vue";
 
-import { defineComponent, reactive } from "vue";
+import { defineComponent, nextTick, reactive } from "vue";
 import CategoryModal from "./categoryModal";
 import { queenApi } from "queenjs";
 

+ 1 - 1
src/pages/website/routes/home/index.tsx

@@ -26,7 +26,7 @@ export default defineComponent({
         actions.startListRunning(canvasRef.value);
       });
 
-      actions.getAssetList();
+      actions.getAssetList(true);
     });
 
     return () => (