-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(pagination) : add size
prop
#16858
base: dev
Are you sure you want to change the base?
Conversation
BREAKING CHANGE : size closed element-plus#16830
# Conflicts: # packages/components/pagination/src/pagination.ts
👋 @webvs2, seems like this is your first time contribution to element-plus.
|
🧪 Playground Preview: https://element-plus.run/?pr=16858 |
size
prop
I think it would also be good to add unified global setting size support to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to use useFormSize to get size for el-pagination. |
The purpose of this function is to get the size of the previous level rather than just relying on the global, and the use is that if the size is set like 'from', it is actually good to use the local t mentioned above, right? |
useFormSize obtains size in the order of props, formItem, form, globalConfig |
Yes, I looked at what the function does so it makes more sense to rely on the parent, which I will adjust |
We should keep |
I do not understand |
We can add a new |
就是新旧api都先留着,旧的api可以在下个大版本中删除 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can also add reminders for attribute changes
useDeprecated()
Co-authored-by: qiang <qw13131wang@gmail.com>
{ | ||
[ns.m('small')]: props.small, | ||
[ns.m(String(_size!.value))]: true, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ns.m(_size.value),
Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com>
font-size: getCssVar('pagination-font-size-large'); | ||
} | ||
|
||
.#{$namespace}-select .#{$namespace}-input { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the width here does not need to be changed, keep it consistent with the above.
What do you think? cc @kooriookami @tolking
@@ -67,7 +67,8 @@ pagination/more-elements | |||
|
|||
| Name | Description | Type | Default | | |||
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------ | | |||
| small | whether to use small pagination | ^[boolean] | false | | |||
| small ^(deprecated) | whether to use small pagination | ^[boolean] | false | | |||
| size ^(2.7.4) | pagination size | ^[enum]`'large'\| 'default'\| 'small'` | 'default' | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version number needs to be updated.
Please make sure these boxes are checked before submitting your PR, thank you!
dev
branch.close #16830