mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-04 04:08:34 +08:00
feat(components): [el-pagination] add teleported prop (#14072)
* fix(components): [pagination] 修复toplayer全屏模式下分页下拉框无法显示问题 分页组件新增teleported参数 默认为true 便于用户控制size下拉框是否插入body closed #14070 * docs(docs): [pagination] Add a teleported attribute closed #14070 * fix(components): [pagination] teleported props default value delete set teleported default value closed #14070 * fix(components): [pagination] change the default value of teleported change the default value of teleported to true * Update docs/en-US/component/pagination.md Co-authored-by: qiang <qw13131wang@gmail.com> --------- Co-authored-by: shaojia.cheng <shaojia.cheng@arvetech.net> Co-authored-by: qiang <qw13131wang@gmail.com>
This commit is contained in:
parent
ce2315d734
commit
9a60a90e1e
@ -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
|
||||
|
@ -16,6 +16,7 @@ export const paginationSizesProps = buildProps({
|
||||
type: String,
|
||||
},
|
||||
disabled: Boolean,
|
||||
teleported: Boolean,
|
||||
size: {
|
||||
type: String,
|
||||
values: componentSizes,
|
||||
|
@ -5,6 +5,7 @@
|
||||
:disabled="disabled"
|
||||
:popper-class="popperClass"
|
||||
:size="size"
|
||||
:teleported="teleported"
|
||||
:validate-event="false"
|
||||
@change="handleChange"
|
||||
>
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user