vue-devui 1.5.15-hotfix.3 → 1.5.15-hotfix.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/button/index.es.js +8 -2
- package/button/index.umd.js +9 -9
- package/date-picker-pro/index.es.js +8 -2
- package/date-picker-pro/index.umd.js +10 -10
- package/package.json +1 -1
- package/pagination/index.es.js +12 -2
- package/pagination/index.umd.js +17 -17
- package/table/index.es.js +8 -2
- package/table/index.umd.js +2 -2
- package/time-picker/index.es.js +8 -2
- package/time-picker/index.umd.js +6 -6
- package/types/button/src/button-types.d.ts +5 -0
- package/types/pagination/src/pagination-types.d.ts +4 -0
- package/types/pagination/src/pagination.d.ts +9 -0
- package/vue-devui.es.js +21 -5
- package/vue-devui.umd.js +21 -21
package/package.json
CHANGED
package/pagination/index.es.js
CHANGED
|
@@ -9653,6 +9653,10 @@ const paginationProps = {
|
|
|
9653
9653
|
},
|
|
9654
9654
|
onPageSizeChange: {
|
|
9655
9655
|
type: Function
|
|
9656
|
+
},
|
|
9657
|
+
maxPage: {
|
|
9658
|
+
type: Number,
|
|
9659
|
+
default: 0
|
|
9656
9660
|
}
|
|
9657
9661
|
};
|
|
9658
9662
|
const paginationInjectionKey = Symbol("d-pagination");
|
|
@@ -10738,10 +10742,16 @@ var Pagination = defineComponent({
|
|
|
10738
10742
|
goToText,
|
|
10739
10743
|
pageIndex,
|
|
10740
10744
|
showJumpButton,
|
|
10741
|
-
haveConfigMenu
|
|
10745
|
+
haveConfigMenu,
|
|
10746
|
+
maxPage
|
|
10742
10747
|
} = toRefs(props);
|
|
10743
10748
|
const ns2 = useNamespace("pagination");
|
|
10744
|
-
const totalPages = computed(() =>
|
|
10749
|
+
const totalPages = computed(() => {
|
|
10750
|
+
if (maxPage.value) {
|
|
10751
|
+
return Math.min(Math.ceil(props.total / props.pageSize), maxPage.value);
|
|
10752
|
+
}
|
|
10753
|
+
return Math.ceil(props.total / props.pageSize);
|
|
10754
|
+
});
|
|
10745
10755
|
const litePageOptions = computed(() => liteSelectOptions(totalPages.value));
|
|
10746
10756
|
const cursor = computed({
|
|
10747
10757
|
get() {
|