From 41c828f9d2d9bb79cbec8da694d40b83d94ad520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=A2=A6=E8=BF=9C?= <1063331231@qq.com> Date: Fri, 18 Jul 2025 16:57:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=AF=92=E5=8E=86=E5=8F=B2=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=89=8D=E7=AB=AF=E9=9D=99=E6=80=81=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/audit/History.vue | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/src/components/audit/History.vue b/src/components/audit/History.vue index b4fe8fe..ad25f5d 100644 --- a/src/components/audit/History.vue +++ b/src/components/audit/History.vue @@ -3,7 +3,7 @@ import { syncSendCmd } from 'apis/system' import { ElLoading } from 'element-plus' import { FtMessage } from 'libs/message' -import { onMounted, ref } from 'vue' +import { computed, onMounted, ref } from 'vue' import HistoryDetail from '../setting/HistoryDetail.vue' // const settingStore = useSettingStore() @@ -126,6 +126,17 @@ const onClose = () => { // const deleteBtnVisible = computed(() => { // return systemStore.systemUser?.name === 'admin' // }) +const currentPage = ref(1) +const pageSize = ref(9) +const handleCurrentChange = (page: number) => { + currentPage.value = page +} +// 计算当前页数据 +const currentPageData = computed(() => { + const start = (currentPage.value - 1) * pageSize.value + const end = start + pageSize.value + return tableData.value?.slice(start, end) +})