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(autoHide): whether to auto hide the pagination component #105

Merged
merged 2 commits into from
Jun 2, 2021
Merged

feat(autoHide): whether to auto hide the pagination component #105

merged 2 commits into from
Jun 2, 2021

Conversation

yangtuantuan
Copy link
Contributor

autoHide is true and pageSizeOptions [0]> total does not display pagination
update the doc and demo

autoHide is true and pageSizeOptions [0]> total does not display pagination
update the doc and demo
@@ -37,7 +37,8 @@ In the page:
| lite | `boolean` | false | Optional. Specifies Whether to switch to the simplified mode. | [Simplified mode](demo#minimalist-model) |
| showPageSelector | `boolean` | true | Optional. Whether to display the page number drop-down list in simplified mode. | [Simplified mode](demo#minimalist-model) |
| haveConfigMenu | `boolean` | false | Optional. Whether to display the configuration in simplified mode | [Simplified mode](demo#minimalist-model) |
| autoFixPageIndex | `boolean` | true | Optional. Indicates whether to automatically correct the page number when the page size is changed. If the pageIndex is processed in the `pageSizeChange` event, you are advised to set the value to `false` | [Simplified Mode](demo#minimalist-model) |.
| autoFixPageIndex | `boolean` | true | Optional. Indicates whether to automatically correct the page number when the page size is changed. If the pageIndex is processed in the `pageSizeChange` event, you are advised to set the value to `false` | [Simplified Mode](demo#minimalist-model) |
| autoHide | `boolean` | false | Optional, whether to hide automatically, autoHide is true and pageSizeOptions[0] > total do not show pagination | [Simplified Mode](demo#minimalist-model) |.
Copy link
Collaborator

Choose a reason for hiding this comment

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

很易用的功能点~

@@ -1,4 +1,4 @@
<div class="devui-pagination">
<div class="devui-pagination" [hidden]="!(autoHide && pageSizeOptions[0] < total)">
Copy link
Collaborator

Choose a reason for hiding this comment

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

组件并未严格限定pageSizeOption是从小到大排序,这个判断可能有些许不严谨,需要页数小于pageSizeOption中的最小值是隐藏

Copy link
Contributor Author

@yangtuantuan yangtuantuan May 8, 2021

Choose a reason for hiding this comment

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

重新commit了判断了最小值,请再review 下是否合理

8c43efe

@@ -1,4 +1,4 @@
<div class="devui-pagination">
<div class="devui-pagination" [hidden]="!(autoHide && minPageSizeOptions < total)">
Copy link
Collaborator

Choose a reason for hiding this comment

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

判定条件有问题,Demo中Pagination默认都隐藏了

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改为 [hidden]="autoHide && total < minPageSizeOptions"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

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

Successfully merging this pull request may close these issues.

4 participants