Skip to content

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

Merged
wangyaju merged 2 commits intoDevCloudFE:masterfrom
yangtuantuan:master
Jun 2, 2021
Merged

feat(autoHide): whether to auto hide the pagination component#105
wangyaju merged 2 commits intoDevCloudFE:masterfrom
yangtuantuan:master

Conversation

@yangtuantuan
Copy link
Copy Markdown
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
| 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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