Browse Source

Pull request #2623: BI-103548 fix: groups为page-1的时候不应该展示省略号

Merge in VISUAL/fineui from ~WILSON.ZHANG/fineui:master to master

* commit '6ce73cf9483c2cd2527c2ecf0655f74550fed5e2':
  BI-103548 fix: 删除setGroups
  BI-103548 fix: groups为page-1的时候不应该展示省略号
  BI-103548 fix:添加setGroups方法设置pager连续显示分页数
  BI-103548 fix:重新修改,添加showEllipsis为true不展示省略号
  BI-103548 fix: groups为page-1的时候不应该展省略号
es6
Wilson.Zhang 2 years ago
parent
commit
e14ee70a8d
  1. 5
      src/base/pager/pager.js

5
src/base/pager/pager.js

@ -26,7 +26,6 @@ BI.Pager = BI.inherit(BI.Widget, {
}, // 初始化当前页
groups: 0, // 连续显示分页数
jump: BI.emptyFn, // 分页的回调函数
first: false, // 是否显示首页
last: false, // 是否显示尾页
prev: "上一页",
@ -98,7 +97,7 @@ BI.Pager = BI.inherit(BI.Widget, {
value: "first",
disabled: !(dict.index > 1 && groups !== 0)
});
if (dict.index > 1 && groups !== 0) {
if (dict.index > 1 && groups !== 0 && groups !== pages - 1) {
view.push({
type: "bi.label",
cls: "page-ellipsis",
@ -140,7 +139,7 @@ BI.Pager = BI.inherit(BI.Widget, {
// 总页数大于连续分页数,且当前组最大页小于总页,输出尾页
if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (pages > groups && dict.end < pages && groups !== 0)) && last) {
if (pages > groups && dict.end < pages && groups !== 0) {
if (pages > groups && dict.end < pages && groups !== 0 && groups !== pages - 1) {
view.push({
type: "bi.label",
cls: "page-ellipsis",

Loading…
Cancel
Save