统一管理后台分页样式
- 新建 AdminTablePagination 组件,统一分页 UI - 改造 6 个前端页面使用统一分页组件: - 管理员管理 - 用户管理 - 申诉管理 - 审计日志 - 公告管理 - 钱包流水 - 订单管理前后端完整改造: - 后端:添加 PaginatedResult 结构,支持 page/page_size 参数 - 前端:API 支持分页参数,页面使用统一分页组件 - 所有列表页分页样式统一为商品管理的 .table-pagination 设计 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import { arbitrateDispute, fetchAdminDisputes, type Dispute } from '@/features/d
|
||||
import { fetchAdminFileBlob } from '@/shared/api/files'
|
||||
import { disputeStatusLabel } from '@/utils/statusLabels'
|
||||
import { formatDateTime } from '@/utils/time'
|
||||
import AdminTablePagination from '../components/AdminTablePagination.vue'
|
||||
|
||||
const loading = ref(false)
|
||||
const submitting = ref(false)
|
||||
@@ -32,9 +33,13 @@ async function loadDisputes() {
|
||||
}
|
||||
}
|
||||
|
||||
function handleSizeChange() {
|
||||
async function handlePageChange() {
|
||||
await loadDisputes()
|
||||
}
|
||||
|
||||
async function handleSizeChange() {
|
||||
currentPage.value = 1
|
||||
loadDisputes()
|
||||
await loadDisputes()
|
||||
}
|
||||
|
||||
function openArbitration(row: Dispute) {
|
||||
@@ -132,17 +137,14 @@ function readError(error: unknown, fallback: string) {
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="pagination-wrap" v-if="total > 0">
|
||||
<el-pagination
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="currentPageSize"
|
||||
:total="total"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
@current-change="loadDisputes"
|
||||
@size-change="handleSizeChange"
|
||||
/>
|
||||
</div>
|
||||
<AdminTablePagination
|
||||
v-if="total > 0"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="currentPageSize"
|
||||
:total="total"
|
||||
:loading="loading"
|
||||
@page-change="handlePageChange"
|
||||
/>
|
||||
|
||||
<el-dialog :model-value="!!activeDispute" title="申诉仲裁" width="560px" @update:model-value="activeDispute = null">
|
||||
<div v-if="activeDispute" class="dialog-body">
|
||||
|
||||
Reference in New Issue
Block a user