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

[Pagination] 当分页数量超出 maxPageBtn 时,不是出现省略号,隐藏中间部分页码。而是隐藏 最前面 和 最后面的页码 #911

Closed
yixiaco opened this issue May 30, 2022 · 13 comments
Labels
💪🏻 enhancement New feature or request to be published to be published

Comments

@yixiaco
Copy link
Contributor

yixiaco commented May 30, 2022

tdesign-vue-next 版本

0.15.3

重现链接

https://stackblitz.com/edit/nuxt-starter-lsiiyd?file=pages/index.vue

重现步骤

No response

期望结果

例如搜索引擎百度、google、必应,不允许用户直接跳转到最后一页或第一页

实际结果

只隐藏了第一页和最后一页的图标,实际上还是存在可以跳转第一页和最后一页
image

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

如果showFirstAndLastPageBtn为false时,不应该显示折叠选项也不应该显示第一页与最后一页的快捷按钮
或者折叠选项应该是可控的,可以折叠的个数,如果为0则不折叠等

@github-actions
Copy link
Contributor

👋 @yixiaco,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@github-actions
Copy link
Contributor

github-actions bot commented May 30, 2022

♥️ 有劳 @kidjayhuang @youuss 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @yixiaco

@honkinglin
Copy link
Collaborator

emm 你理解错了,这个是显示快速跳转首页和尾页按钮的开关
image

@PengYYYYY
Copy link
Collaborator

PengYYYYY commented May 30, 2022

文档描述要改一下

@yixiaco
Copy link
Contributor Author

yixiaco commented May 30, 2022

那就新增一个不展示第一页和最后一页的选项,感觉这个选项名称不是这个意思吗🤔

@yixiaco
Copy link
Contributor Author

yixiaco commented May 30, 2022

image
像这样就没办法实现
showFirstAndLastPageBtn:显示第一和最后一个页面按钮,不是这样翻译吗🤣

@PengYYYYY PengYYYYY mentioned this issue May 30, 2022
15 tasks
@PengYYYYY
Copy link
Collaborator

描述改了一下,名字没取好

@PengYYYYY
Copy link
Collaborator

image 像这样就没办法实现 showFirstAndLastPageBtn:显示第一和最后一个页面按钮,不是这样翻译吗🤣

这样的确实没办法实现

@yixiaco
Copy link
Contributor Author

yixiaco commented May 30, 2022

描述改了一下,名字没取好

不是,我是说,能加个隐藏这两按钮的功能吗

@PengYYYYY PengYYYYY added the 💪🏻 enhancement New feature or request label May 30, 2022
@PengYYYYY PengYYYYY changed the title [Pagination] showFirstAndLastPageBtn设置为false后,折叠后还是会显示第一页和最后一页按钮 [Pagination] 增加不显示第一页和最后一页的API May 30, 2022
@PengYYYYY
Copy link
Collaborator

pageDisplayFilter 会提供一个这样的API, 然后你这么用就好了。

<t-pagination
      v-model="current"
      v-model:pageSize="pageSize"
      :total="100"
      :page-display-filter="(i) => i !== 1"
      @change="onChange"
      @page-size-change="onPageSizeChange"
      @current-change="onCurrentChange"
    />

@yixiaco
Copy link
Contributor Author

yixiaco commented May 30, 2022

image

如果第五页第20页呢,第一页也存在。其实是最后一页存在,这个不可控

@chaishi
Copy link
Collaborator

chaishi commented May 30, 2022

pageDisplayFilter,待定,我刚刚才明白是什么意思,容我们内部讨论下

maxPageBtn 最多显示页码按钮数
当分页数量超出 maxPageBtn 时,不是出现省略号,隐藏中间部分页码。而是隐藏头部页码 和 尾部页码。这是一种新的翻页模式,需要同交互设计师一起看下

@chaishi chaishi changed the title [Pagination] 增加不显示第一页和最后一页的API [Pagination] 增加不显示超出分页数量的页码显示/隐藏控制 May 30, 2022
@chaishi chaishi changed the title [Pagination] 增加不显示超出分页数量的页码显示/隐藏控制 [Pagination] 增加 超出分页数量的页码 显示/隐藏控制 May 30, 2022
@chaishi chaishi changed the title [Pagination] 增加 超出分页数量的页码 显示/隐藏控制 [Pagination] 当分页数量超出 maxPageBtn 时,不是出现省略号,隐藏中间部分页码。而是隐藏 最前面 和 最后面的页码 May 30, 2022
@PengYYYYY PengYYYYY mentioned this issue Jun 11, 2022
15 tasks
@PengYYYYY PengYYYYY added the to be published to be published label Jun 11, 2022
@github-actions github-actions bot mentioned this issue Jun 13, 2022
4 tasks
@PengYYYYY
Copy link
Collaborator

0.16.0 修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪🏻 enhancement New feature or request to be published to be published
Projects
None yet
Development

No branches or pull requests

4 participants