lew-ui 1.7.14 → 1.7.16

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/dist/index.es.js CHANGED
@@ -9508,10 +9508,13 @@ const _hoisted_2$9 = ["onClick"];
9508
9508
  const _sfc_main$h = defineComponent({
9509
9509
  __name: "LewPagination",
9510
9510
  props: paginationProps,
9511
- emits: ["change", "update:currentPage"],
9511
+ emits: ["change", "update:currentPage", "update:pageSize"],
9512
9512
  setup(__props, { emit }) {
9513
9513
  const props = __props;
9514
- const { total, currentPage, pageSizeOptions } = useVModels(props, emit);
9514
+ const { total, currentPage, pageSize, pageSizeOptions } = useVModels(
9515
+ props,
9516
+ emit
9517
+ );
9515
9518
  const state = reactive({
9516
9519
  toPage: void 0,
9517
9520
  pageSize: props.pageSize,
@@ -9551,10 +9554,11 @@ const _sfc_main$h = defineComponent({
9551
9554
  });
9552
9555
  const changePage = (page) => {
9553
9556
  page = Math.floor(page);
9554
- if (page < 1 || page > totalPages.value || page === currentPage.value) {
9557
+ if (page < 1 || page > totalPages.value) {
9555
9558
  return;
9556
9559
  }
9557
9560
  currentPage.value = page;
9561
+ pageSize.value = state.pageSize;
9558
9562
  emit("change", {
9559
9563
  currentPage: currentPage.value,
9560
9564
  pageSize: state.pageSize