Quellcode durchsuchen

回评限制时,放开分页器,动态pageSize

刘洋 vor 1 Jahr
Ursprung
Commit
c35351d074
2 geänderte Dateien mit 9 neuen und 4 gelöschten Zeilen
  1. 2 2
      src/devLoginParams.ts
  2. 7 2
      src/features/mark/MarkHistory.vue

+ 2 - 2
src/devLoginParams.ts

@@ -60,8 +60,8 @@ export const LOGIN_CONFIG = {
   // loginName: "spj432-01",
   // loginName: "liuyang",
   password: "123456",
-  examId: "235",
-  markerId: "3368",
+  examId: "295",
+  markerId: "3333",
   // markerId: "2692",
   // markerId: "482",
   // markerId: "483",

+ 7 - 2
src/features/mark/MarkHistory.vue

@@ -108,7 +108,6 @@
       </div>
     </a-spin>
     <div
-      v-if="!hasLimit"
       class="tw-flex tw-justify-between tw-place-content-center tw-mt-2 pager-container"
     >
       <div class="tw-font-bold" style="line-height: 30px">
@@ -159,7 +158,13 @@ const remarkCount = computed(() => {
   return store.setting?.remarkCount;
 });
 const limitPageSize = computed(() => {
-  return typeof remarkCount.value == "number" ? remarkCount.value : 20;
+  return typeof remarkCount.value == "number"
+    ? remarkCount.value <= 20
+      ? remarkCount.value
+      : currentPage * 20 > remarkCount.value
+      ? remarkCount.value % 20
+      : 20
+    : 20;
 });
 const hasLimit = computed(() => {
   console.log("remarkCount.value:", remarkCount.value);