fix(pager): fix init pager-size error when not match page-sizes (#3566)
This commit is contained in:
parent
bb72b19e6a
commit
1034ef5a9f
|
@ -91,6 +91,7 @@ export const renderless = (
|
|||
showPager: computed(() => api.computedShowPager()),
|
||||
internalLayout: computed(() => api.computedInternalLayout()),
|
||||
totalText: computed(() => api.computedTotalText()),
|
||||
internalPageSizes: computed(() => props.pageSizes || [10, 20, 30, 40, 50, 100]),
|
||||
internalPageCount: computed(() => api.computedInternalPageCount()),
|
||||
showJumperSuffix: designConfig?.state?.showJumperSuffix ?? true,
|
||||
align: computed(() => props.align || designConfig?.state?.align || 'right'),
|
||||
|
|
|
@ -34,8 +34,7 @@ export const pagerProps = {
|
|||
type: String
|
||||
},
|
||||
pageSizes: {
|
||||
type: Array as PropType<number[]>,
|
||||
default: () => [10, 20, 30, 40, 50, 100]
|
||||
type: Array as PropType<number[]>
|
||||
},
|
||||
pagerCount: {
|
||||
type: Number,
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
<div class="tiny-pager__selector-body">
|
||||
<ul class="tiny-pager__selector-poplist">
|
||||
<li
|
||||
v-for="(sizeItem, sizeIndex) in pageSizes"
|
||||
v-for="(sizeItem, sizeIndex) in state.internalPageSizes"
|
||||
:key="sizeIndex"
|
||||
:class="['list-item', sizeItem === state.internalPageSize ? 'is-selected select-pre' : '']"
|
||||
:title="String(sizeItem)"
|
||||
|
|
Loading…
Reference in New Issue