无木
2021-07-27 e32789373eb5b1b531572b59692bf552dac365dc
src/components/Table/src/hooks/usePagination.tsx
@@ -1,6 +1,6 @@
import type { PaginationProps } from '../types/pagination';
import type { BasicTableProps } from '../types/table';
import { computed, unref, ref, ComputedRef } from 'vue';
import { computed, unref, ref, ComputedRef, watchEffect } from 'vue';
import { LeftOutlined, RightOutlined } from '@ant-design/icons-vue';
import { isBoolean } from '/@/utils/is';
import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '../const';
@@ -27,6 +27,16 @@
  const configRef = ref<PaginationProps>({});
  const show = ref(true);
  watchEffect(() => {
    const { pagination } = unref(refProps);
    if (!isBoolean(pagination) && pagination) {
      configRef.value = {
        ...unref(configRef),
        ...(pagination ?? {}),
      };
    }
  });
  const getPaginationInfo = computed((): PaginationProps | boolean => {
    const { pagination } = unref(refProps);