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

Merge 07754975dad74045e10d148aa808447cf69d8d9a into 97fb638ac289866672024b60939fd7e8232deb43

This commit is contained in:
Nexpro 2024-10-08 15:52:10 +08:00 committed by GitHub
commit 44db56139b
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()
},
})
//