瀏覽代碼

下一页翻页判断

Michael Wang 4 年之前
父節點
當前提交
1edbf49d2d
共有 2 個文件被更改,包括 8 次插入4 次删除
  1. 4 2
      src/components/inspect/MarkHistory.vue
  2. 4 2
      src/components/mark/MarkHistory.vue

+ 4 - 2
src/components/inspect/MarkHistory.vue

@@ -85,8 +85,10 @@ export default defineComponent({
       }
     }
     function nextPage() {
-      currentPage.value += 1;
-      updateHistoryTask({ pageNumber: currentPage.value });
+      if (store.historyTasks.length >= 10) {
+        currentPage.value += 1;
+        updateHistoryTask({ pageNumber: currentPage.value });
+      }
     }
 
     return {

+ 4 - 2
src/components/mark/MarkHistory.vue

@@ -95,8 +95,10 @@ export default defineComponent({
       }
     }
     function nextPage() {
-      currentPage.value += 1;
-      updateHistoryTask({ pageNumber: currentPage.value });
+      if (store.historyTasks.length >= 10) {
+        currentPage.value += 1;
+        updateHistoryTask({ pageNumber: currentPage.value });
+      }
     }
 
     return {