1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2025-05-01 06:39:01 +08:00

Merge 07754975dad74045e10d148aa808447cf69d8d9a into 359f68395562cf9a3f26e4650b28d0e9fe7f8cba

This commit is contained in:
Nexpro 2024-09-25 11:30:38 +08:00 committed by GitHub
commit 1e1704a12d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -69,6 +69,13 @@ const props = defineProps({
isPagination: {
type: Boolean,
default: true,
},
/**
* @isShowSizePicker 是否显示每页条数选择
*/
isShowSizePicker: {
type: Boolean,
default: false,
},
scrollX: {
type: Number,
@ -116,6 +123,16 @@ const pagination = reactive({
prefix({ itemCount }) {
return `${itemCount} 条数据`
},
pageSizes: [10, 20, 50, 100],
showSizePicker: props.isShowSizePicker,
onChange: (page) => {
pagination.page = page
},
onUpdatePageSize: (pageSize) => {
pagination.pageSize = pageSize
pagination.page = 1
handleQuery()
},
})
//