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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-devui",
3
- "version": "1.5.15-hotfix.3",
3
+ "version": "1.5.15-hotfix.4",
4
4
  "license": "MIT",
5
5
  "description": "DevUI components based on Vite and Vue3",
6
6
  "keywords": [
@@ -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(() => Math.ceil(props.total / props.pageSize));
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() {