feat(frontend): 分页 pageSize 持久化到 localStorage,刷新后自动恢复

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
QTom
2026-03-18 10:53:27 +08:00
parent 9f6ab6b817
commit dfe99507b8
15 changed files with 57 additions and 14 deletions

View File

@@ -395,6 +395,7 @@ import { ref, reactive, computed, onMounted, onUnmounted, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import { useAppStore } from '@/stores/app'
import { useClipboard } from '@/composables/useClipboard'
import { getPersistedPageSize } from '@/composables/usePersistedPageSize'
import { adminAPI } from '@/api/admin'
import { formatDateTime } from '@/utils/format'
import type { RedeemCode, RedeemCodeType, Group, GroupPlatform, SubscriptionType } from '@/types'
@@ -532,7 +533,7 @@ const filters = reactive({
})
const pagination = reactive({
page: 1,
page_size: 20,
page_size: getPersistedPageSize(),
total: 0,
pages: 0
})