diff --git a/src/pagination/pagination.tsx b/src/pagination/pagination.tsx index c49fee721b..6c60928b5e 100755 --- a/src/pagination/pagination.tsx +++ b/src/pagination/pagination.tsx @@ -1,4 +1,4 @@ -import { defineComponent, computed, ref, watch, toRefs } from 'vue'; +import { defineComponent, computed, ref, watch, toRefs, getCurrentInstance } from 'vue'; import isNaN from 'lodash/isNaN'; import { PageFirstIcon as TdPageFirstIcon, @@ -30,6 +30,8 @@ export default defineComponent({ props, setup(props: TdPaginationProps) { + const { emit } = getCurrentInstance(); + const { modelValue, pageSize, current } = toRefs(props); const renderTNodeJSX = useTNodeJSX(); const [innerCurrent, setInnerCurrent] = useVModel( @@ -151,9 +153,13 @@ export default defineComponent({ previous: prev, pageSize: innerPageSize.value, }; - setInnerCurrent(current, pageInfo); + if (isTriggerChange !== false) { + setInnerCurrent(current, pageInfo); props.onChange?.(pageInfo); + } else { + // 非主动更改时应仅更新modelValue不触发onCurrentChange事件 + emit('update:modelValue', current); } } };