From 7273f7f835e9fc74dc3ba0d0ae12f083c6c3d9a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com> Date: Mon, 11 Nov 2024 16:53:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=99=90=E5=88=B6=E9=A2=98=E7=9B=AE?= =?UTF-8?q?=E4=B8=8A=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../classTask/container/newTask/taskTypeView.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue index 4c4c8b3..949ce72 100644 --- a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue +++ b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue @@ -409,13 +409,20 @@ const fileLoading = ref(false); // 常规作业loading // 下拉滚动参数 -const BASE_LIMIT_COUT = 50; // 总加载额外试题数 -const pageNoMore = computed( () => workResource.entpCourseWorkList.length >= pageParams.value.originCount+BASE_LIMIT_COUT ); +const BASE_LIMIT_COUT = 100; // 总加载额外试题数 +const pageNoMore = computed( () => { + if (pageParams.value.total < 1) { + return false; + } + let count = BASE_LIMIT_COUT >= pageParams.value.total ? pageParams.value.total : pageParams.value.originCount+BASE_LIMIT_COUT; + return workResource.entpCourseWorkList.length >= count; +}); const pageDisabled = computed(() => pageParams.value.loading || pageNoMore.value); const pageParams = ref({ loading: false, // 是否正在加载中 originCount: 0, // 初始条目数量 isFirst: true, // 是否是第一次加载 + total: 0, }) /*** @@ -541,6 +548,7 @@ const handleQueryFromEntpCourseWork= async (queryType) => { if (pageParams.value.isFirst) { pageParams.value.isFirst = false; pageParams.value.originCount = workResource.entpCourseWorkList.length; + pageParams.value.total = parseInt(res.msg); } } pageParams.value.loading = false; @@ -986,6 +994,7 @@ const initPageParams = () => { pageParams.value.loading = false; pageParams.value.isFirst = true; pageParams.value.originCount = 0; + pageParams.value.total = 0; // 初始化分页参数 paginationParams.pageNum = 1; From 1844af01da1f8356eca955afb89d3c0919bd9d16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com> Date: Mon, 11 Nov 2024 16:56:56 +0800 Subject: [PATCH 2/2] 1 --- .../src/views/classTask/container/newTask/taskTypeView.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue index 949ce72..059ad31 100644 --- a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue +++ b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue @@ -409,7 +409,7 @@ const fileLoading = ref(false); // 常规作业loading // 下拉滚动参数 -const BASE_LIMIT_COUT = 100; // 总加载额外试题数 +const BASE_LIMIT_COUT = 50; // 总加载额外试题数 const pageNoMore = computed( () => { if (pageParams.value.total < 1) { return false;