feat: 更换Pagination组件
This commit is contained in:
@ -31,16 +31,15 @@
|
||||
<a-spin v-if="loading" tip="AI分析中" />
|
||||
|
||||
<div v-if="listData.total > 0" class="pagination-box flex justify-end ignore-export">
|
||||
<a-pagination
|
||||
<Pagination
|
||||
:total="listData.total"
|
||||
size="mini"
|
||||
show-total
|
||||
show-jumper
|
||||
show-page-size
|
||||
size="small"
|
||||
:showTotal="(total: number) => `共 ${total} 条`"
|
||||
showSizeChanger
|
||||
showQuickJumper
|
||||
:current="query.page"
|
||||
:page-size="query.pageSize"
|
||||
:pageSize="query.page_size"
|
||||
@change="onPageChange"
|
||||
@page-size-change="onPageSizeChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@ -73,7 +72,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from 'vue';
|
||||
import { Button, Tabs, Space } from 'ant-design-vue';
|
||||
import { Button, Tabs, Space, Pagination } from 'ant-design-vue';
|
||||
const { TabPane } = Tabs;
|
||||
import PlacementGuideList from './components/table-data/placementGuideList.vue';
|
||||
import listSearchForm from './components/table-data/listSearchForm.vue';
|
||||
@ -106,8 +105,9 @@ const query = reactive({
|
||||
const currentComponent = computed(() => {
|
||||
return tabData.value === 'placement_guide' ? PlacementGuideList : GuideListHistory;
|
||||
});
|
||||
const onPageChange = (current) => {
|
||||
const onPageChange = (current: number, pageSize: number) => {
|
||||
query.page = current;
|
||||
query.page_size = pageSize;
|
||||
onSearch();
|
||||
};
|
||||
const onPageSizeChange = (pageSize) => {
|
||||
|
||||
Reference in New Issue
Block a user