From d1dca6491e6c8cfe481e8737bb0a814754fc4a78 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Tue, 01 Jul 2025 10:10:42 +0800
Subject: [PATCH] feat:算法仓库分页重置
---
src/views/algorithmRepository/algorithmRepository.vue | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/views/algorithmRepository/algorithmRepository.vue b/src/views/algorithmRepository/algorithmRepository.vue
index adadf1a..5de3851 100644
--- a/src/views/algorithmRepository/algorithmRepository.vue
+++ b/src/views/algorithmRepository/algorithmRepository.vue
@@ -58,9 +58,10 @@
</div>
</div>
- <div
+ <div v-if="detailData.length > 0" class="pictureBox">
+ <div
class="pictureitem"
- v-if="detailData.length > 0"
+
v-loading="loading"
element-loading-text="加载中"
>
@@ -79,6 +80,7 @@
</div>
</div>
</div>
+ </div>
<el-empty class="custom-empty" v-else>
<template #description>
<span class="custom-text">暂无数据</span>
@@ -88,7 +90,7 @@
<el-pagination
class="pageStyle"
background
- :page-sizes="[10, 20, 30, 50]"
+ :page-sizes="[15, 20, 30, 50]"
v-model:current-page="params.current"
v-model:page-size="params.size"
layout="total, prev, pager, next,sizes, jumper"
@@ -160,9 +162,6 @@
}
getalgorithmList(detailParams,{ current: params.value.current,
size: params.value.size,}).then(res => {
-
- console.log('算法仓库',res.data.data);
-
loading.value = true;
detailData.value = res.data.data.records;
total.value = res.data.data.total;
@@ -195,6 +194,8 @@
const goback = () => {
showDetail.value = false;
activeItem.value = null;
+ params.value.current =1
+ params.value.size=15
};
// 分页大小改变
const handleSizeChange = val => {
@@ -284,8 +285,14 @@
}
.algorithItemDetail {
padding: 20px;
-
+
+ .pictureBox {
+ // height: 625px;
+ height: pxToVh(760);
+ overflow: auto;
+ }
.pictureitem {
+
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 14px;
--
Gitblit v1.9.3