| | |
| | | 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'; |
| | |
| | | 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); |
| | | |