diff --git a/docs/en-US/component/pagination.md b/docs/en-US/component/pagination.md index 64384dda19..0628672f1f 100644 --- a/docs/en-US/component/pagination.md +++ b/docs/en-US/component/pagination.md @@ -84,6 +84,7 @@ pagination/more-elements | next-text | text for the next button | ^[string] | '' | | next-icon | icon for the next button, has a lower priority than `next-text` | ^[string] / ^[Component] | ArrowRight | | disabled | whether Pagination is disabled | ^[boolean] | false | +| teleported ^(2.3.13) | whether Pagination select dropdown is teleported to the body | ^[boolean] | true | | hide-on-single-page | whether to hide when there's only one page | ^[boolean] | false | :::warning diff --git a/packages/components/pagination/src/components/sizes.ts b/packages/components/pagination/src/components/sizes.ts index 7f45efbac2..256faaf9c4 100644 --- a/packages/components/pagination/src/components/sizes.ts +++ b/packages/components/pagination/src/components/sizes.ts @@ -16,6 +16,7 @@ export const paginationSizesProps = buildProps({ type: String, }, disabled: Boolean, + teleported: Boolean, size: { type: String, values: componentSizes, diff --git a/packages/components/pagination/src/components/sizes.vue b/packages/components/pagination/src/components/sizes.vue index 956216c68a..a5f230de7a 100644 --- a/packages/components/pagination/src/components/sizes.vue +++ b/packages/components/pagination/src/components/sizes.vue @@ -5,6 +5,7 @@ :disabled="disabled" :popper-class="popperClass" :size="size" + :teleported="teleported" :validate-event="false" @change="handleChange" > diff --git a/packages/components/pagination/src/pagination.ts b/packages/components/pagination/src/pagination.ts index f04ec59ff7..275d9b492c 100644 --- a/packages/components/pagination/src/pagination.ts +++ b/packages/components/pagination/src/pagination.ts @@ -137,6 +137,13 @@ export const paginationProps = buildProps({ type: iconPropType, default: () => ArrowRight, }, + /** + * @description whether Pagination size is teleported to body + */ + teleported: { + type: Boolean, + default: true, + }, /** * @description whether to use small pagination */ @@ -369,6 +376,7 @@ export default defineComponent({ pageSizes: props.pageSizes, popperClass: props.popperClass, disabled: props.disabled, + teleported: props.teleported, size: props.small ? 'small' : 'default', }), slot: slots?.default?.() ?? null,