feat: 更换Pagination组件

This commit is contained in:
renxiaodong
2025-09-04 23:30:41 +08:00
parent 3f5249c731
commit 8b42a67e9f
21 changed files with 183 additions and 215 deletions

View File

@ -53,16 +53,15 @@
/>
</Table>
<div class="pagination-row">
<a-pagination
<Pagination
:total="pageInfo.total"
size="mini"
show-total
show-jumper
show-page-size
size="small"
:showTotal="(total, range) => `共 ${total} 条`"
showSizeChanger
showQuickJumper
:current="pageInfo.page"
:page-size="pageInfo.pageSize"
:pageSize="pageInfo.pageSize"
@change="onPageChange"
@page-size-change="onPageSizeChange"
/>
</div>
</div>
@ -71,7 +70,7 @@
<script setup lang="ts">
import { reactive, ref } from 'vue';
import { Button, Input, Space, Table } from 'ant-design-vue';
import { Button, Input, Space, Table, Pagination } from 'ant-design-vue';
const pageInfo = reactive({
page: 1,
@ -86,11 +85,13 @@ const listResult = reactive({
data: [],
total: 0,
});
const onPageSizeChange = () => {};
const tableData = ref([]);
const handleChange = () => {};
const onPageChange = () => {};
const columns = [
const onPageChange = (page: number, pageSize:number) => {
pageInfo.page = page;
pageInfo.pageSize = pageSize;
};
const columns = [
{
title: '服务/产品',
dataIndex: 'service_name',

View File

@ -83,16 +83,15 @@
/>
</Table>
<div class="pagination-row">
<a-pagination
<Pagination
:total="pageInfo.total"
size="mini"
show-total
show-jumper
show-page-size
size="small"
:showTotal="(total, range) => `共 ${total} 条`"
showSizeChanger
showQuickJumper
:current="pageInfo.page"
:page-size="pageInfo.pageSize"
:pageSize="pageInfo.pageSize"
@change="onPageChange"
@page-size-change="onPageSizeChange"
/>
</div>
</div>
@ -100,7 +99,7 @@
</template>
<script setup lang="ts">
import { Button, Input, Space, Table } from 'ant-design-vue';
import { Button, Input, Space, Pagination, Table } from 'ant-design-vue';
import { reactive, ref } from 'vue';
const pageInfo = reactive({
@ -113,7 +112,10 @@ const query = reactive({
});
const handleChange = () => {};
const onPageChange = () => {};
const onPageChange = (page: number, pageSize:number) => {
pageInfo.page = page;
pageInfo.pageSize = pageSize;
};
const onPageSizeChange = () => {};
const tableData = ref([]);