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) +})