Skip to content
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

Merged
merged 41 commits into from
Jun 21, 2024
Merged

feat(pagination) : add size prop #16858

merged 41 commits into from
Jun 21, 2024

Conversation

webvs2
Copy link
Contributor

@webvs2 webvs2 commented May 14, 2024

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow contributing guide English | (中文 | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer to relative issues for your PR.

close #16830

Copy link

👋 @webvs2, seems like this is your first time contribution to element-plus.

  • Please make sure that you have read our guidelines and code of conduct before making a contribution.
  • You can comment with /label Components:[component_name] to add a label for which component you are working on.
  • You may join our Discord for staying tuned.

@pull-request-triage pull-request-triage bot added 1st contribution Their very first contribution Needs Review labels May 14, 2024
Copy link

github-actions bot commented May 14, 2024

Copy link

Hello @webvs2, thank you for contributing to element-plus, please see our guideline to see how to make contribution

@webvs2 webvs2 changed the title flx [pagination]:add component prop 'size' and related style supplement flx (pagination) : add component prop 'size' and related style supplement May 14, 2024
Copy link

github-actions bot commented May 14, 2024

🧪 Playground Preview: https://element-plus.run/?pr=16858
Please comment the example via this playground if needed.

@btea btea changed the title flx (pagination) : add component prop 'size' and related style supplement feat(pagination) : add `size' prop May 15, 2024
@btea btea changed the title feat(pagination) : add `size' prop feat(pagination) : add size prop May 15, 2024
@btea
Copy link
Collaborator

btea commented May 15, 2024

I think it would also be good to add unified global setting size support to el-pagination. What do you think? cc @element-plus/backers

Copy link

@long4488296 long4488296 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

微信截图_20240515110156-ok

ok!!!

@Liao-js
Copy link
Contributor

Liao-js commented May 15, 2024

I think it would be better to use useFormSize to get size for el-pagination.

@webvs2
Copy link
Contributor Author

webvs2 commented May 16, 2024

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?

@Liao-js
Copy link
Contributor

Liao-js commented May 16, 2024

The purpose of this function is to get the size of the previous level rather than just relying on the global

useFormSize obtains size in the order of props, formItem, form, globalConfig

@webvs2
Copy link
Contributor Author

webvs2 commented Jun 18, 2024

Why font-size is still 16px? It should be the same as default.

image
b本地调试出来的确实是14,是否有缓存嫌疑呢

@kooriookami
Copy link
Member

Why font-size is still 16px? It should be the same as default.

image b本地调试出来的确实是14,是否有缓存嫌疑呢

image

It's weird. I used a new browser. You can see this link.

https://preview-16858-element-plus.surge.sh/en-US/component/pagination.html#more-elements

@webvs2
Copy link
Contributor Author

webvs2 commented Jun 18, 2024

Why font-size is still 16px? It should be the same as default.

image b本地调试出来的确实是14,是否有缓存嫌疑呢

image

It's weird. I used a new browser. You can see this link.

https://preview-16858-element-plus.surge.sh/en-US/component/pagination.html#more-elements

我也在线上链接复现了该问题,这确实奇怪,我在本地也运行了docs:dev,仍然没有本地复现,我将排查问题

@webvs2
Copy link
Contributor Author

webvs2 commented Jun 19, 2024

Why font-size is still 16px? It should be the same as default.

image b本地调试出来的确实是14,是否有缓存嫌疑呢

image
It's weird. I used a new browser. You can see this link.
https://preview-16858-element-plus.surge.sh/en-US/component/pagination.html#more-elements

我也在线上链接复现了该问题,这确实奇怪,我在本地也运行了docs:dev,仍然没有本地复现,我将排查问题

@kooriookami That problem seems to have gone away

webvs2 and others added 2 commits June 19, 2024 14:37
Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com>
@kooriookami kooriookami requested a review from btea June 19, 2024 09:39
@kooriookami
Copy link
Member

I think the small size demo can be removed.

image

@btea
Copy link
Collaborator

btea commented Jun 19, 2024

Maybe we can add a new size effect display here.
image

@kooriookami
Copy link
Member

Maybe we can add a new size effect display here. image

Already have.

@btea
Copy link
Collaborator

btea commented Jun 19, 2024

Oh, I just noticed this.

@webvs2
Copy link
Contributor Author

webvs2 commented Jun 21, 2024

Thanking Everyone ;

@btea btea merged commit a8a2298 into element-plus:dev Jun 21, 2024
9 checks passed
@element-bot element-bot mentioned this pull request Jun 21, 2024
3 tasks
@kwezdj123
Copy link

为什么不顺便把 el-config-provider 全局设置也做了呢,现在全局设置了sizePagination 还是要单独设置size才会生效。

@webvs2 webvs2 deleted the pagination-dev branch June 24, 2024 01:28
@webvs2
Copy link
Contributor Author

webvs2 commented Jun 24, 2024

为什么不顺便把 el-config-provider 全局设置也做了呢,现在全局设置了sizePagination 还是要单独设置size才会生效。

之前的改动丢失了这个特性,#17306

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Component] [pagination] el-config-provider 设置size="small" 后 el-pagination 尺寸错误
7 participants