Browse Source

Pull request #1960: BI-88224 fix:pager不再始终显示,受影响因素增加

Merge in VISUAL/fineui from ~CLAIRE.TANG/fineui:master to master

* commit '0a0d6f458bd2eb69f3bfbfac71032f0abfe39bf6':
  BI-88224 fix:pager显示优化
  BI-88224 fix:pager不再始终显示,受影响因素增加
es6
Claire.Tang 4 years ago
parent
commit
8f910deafc
  1. 18
      src/case/pager/pager.all.count.js
  2. 4
      typescript/case/pager/pager.all.count.ts

18
src/case/pager/pager.all.count.js

@ -13,7 +13,8 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
curr: 1, // 初始化当前页, pages为数字时可用, curr: 1, // 初始化当前页, pages为数字时可用,
count: 1, // 总行数 count: 1, // 总行数
rowInfoObject: null, rowInfoObject: null,
showRowCount: true showRowCount: true,
showRowInfo: true,
}); });
}, },
_init: function () { _init: function () {
@ -108,8 +109,6 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
}); });
}, },
alwaysShowPager: true,
_getPagerIconCls: function () { _getPagerIconCls: function () {
var o = this.options; var o = this.options;
switch (o.pagerDirection) { switch (o.pagerDirection) {
@ -172,6 +171,11 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
this.setPagerVisible(v > 1); this.setPagerVisible(v > 1);
}, },
setShowRowInfo: function (b) {
this.options.showRowInfo = b;
this.rowCountObject.setVisible(b);
},
setValue: function (v) { setValue: function (v) {
this.pager.setValue(v); this.pager.setValue(v);
}, },
@ -205,16 +209,16 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
return this.pager.hasNext(); return this.pager.hasNext();
}, },
isShowPager: function () {
return this.options.showRowInfo || this.options.pages > 1;
},
setPagerVisible: function (b) { setPagerVisible: function (b) {
this.editor.setVisible(b); this.editor.setVisible(b);
this.allPages.setVisible(b); this.allPages.setVisible(b);
this.pager.setVisible(b); this.pager.setVisible(b);
}, },
setRowCountVisible: function (b) {
this.rowCountObject.setVisible(b);
},
populate: function () { populate: function () {
this.pager.populate(); this.pager.populate();
this.setPagerVisible(this.options.pages > 1); this.setPagerVisible(this.options.pages > 1);

4
typescript/case/pager/pager.all.count.ts

@ -22,7 +22,9 @@ export declare class AllCountPager extends Widget {
setPagerVisible(v: boolean): void; setPagerVisible(v: boolean): void;
setRowCountVisible(v: boolean): void; setShowRowInfo(v: boolean): void;
isShowPager(): boolean;
populate(): void; populate(): void;
} }

Loading…
Cancel
Save