feat(autoHide): whether to auto hide the pagination component#105
Merged
wangyaju merged 2 commits intoDevCloudFE:masterfrom Jun 2, 2021
yangtuantuan:master
Merged
feat(autoHide): whether to auto hide the pagination component#105wangyaju merged 2 commits intoDevCloudFE:masterfrom yangtuantuan:master
wangyaju merged 2 commits intoDevCloudFE:masterfrom
yangtuantuan:master
Conversation
autoHide is true and pageSizeOptions [0]> total does not display pagination update the doc and demo
ZOUJIELynn
reviewed
Apr 30, 2021
devui/pagination/doc/api-en.md
Outdated
| | 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) |. |
| @@ -1,4 +1,4 @@ | |||
| <div class="devui-pagination"> | |||
| <div class="devui-pagination" [hidden]="!(autoHide && pageSizeOptions[0] < total)"> | |||
Collaborator
There was a problem hiding this comment.
组件并未严格限定pageSizeOption是从小到大排序,这个判断可能有些许不严谨,需要页数小于pageSizeOption中的最小值是隐藏
Contributor
Author
There was a problem hiding this comment.
重新commit了判断了最小值,请再review 下是否合理
| @@ -1,4 +1,4 @@ | |||
| <div class="devui-pagination"> | |||
| <div class="devui-pagination" [hidden]="!(autoHide && minPageSizeOptions < total)"> | |||
Collaborator
There was a problem hiding this comment.
判定条件有问题,Demo中Pagination默认都隐藏了
Contributor
Author
There was a problem hiding this comment.
已修改为 [hidden]="autoHide && total < minPageSizeOptions"
判断pageSizeOptions最小值
ZOUJIELynn
approved these changes
May 31, 2021
Simplelegant
approved these changes
Jun 2, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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