From b9ad87e034db5f651f164e81ede2b120119a6225 Mon Sep 17 00:00:00 2001 From: Tangjinxia <1119518763@qq.com> Date: Tue, 8 Jun 2021 15:58:27 +0800 Subject: [PATCH 1/2] =?UTF-8?q?BI-88224=20fix:pager=E4=B8=8D=E5=86=8D?= =?UTF-8?q?=E5=A7=8B=E7=BB=88=E6=98=BE=E7=A4=BA=EF=BC=8C=E5=8F=97=E5=BD=B1?= =?UTF-8?q?=E5=93=8D=E5=9B=A0=E7=B4=A0=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/pager/pager.all.count.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/case/pager/pager.all.count.js b/src/case/pager/pager.all.count.js index 78090dd08..80701b252 100644 --- a/src/case/pager/pager.all.count.js +++ b/src/case/pager/pager.all.count.js @@ -108,7 +108,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, { }); }, - alwaysShowPager: true, + showPager: true, _getPagerIconCls: function () { var o = this.options; @@ -213,6 +213,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, { setRowCountVisible: function (b) { this.rowCountObject.setVisible(b); + this.showPager = b || this.options.pages > 1; }, populate: function () { From 0a0d6f458bd2eb69f3bfbfac71032f0abfe39bf6 Mon Sep 17 00:00:00 2001 From: Tangjinxia <1119518763@qq.com> Date: Wed, 9 Jun 2021 10:52:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?BI-88224=20fix=EF=BC=9Apager=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/pager/pager.all.count.js | 19 +++++++++++-------- typescript/case/pager/pager.all.count.ts | 4 +++- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/case/pager/pager.all.count.js b/src/case/pager/pager.all.count.js index 80701b252..c15f2cb0c 100644 --- a/src/case/pager/pager.all.count.js +++ b/src/case/pager/pager.all.count.js @@ -13,7 +13,8 @@ BI.AllCountPager = BI.inherit(BI.Widget, { curr: 1, // 初始化当前页, pages为数字时可用, count: 1, // 总行数 rowInfoObject: null, - showRowCount: true + showRowCount: true, + showRowInfo: true, }); }, _init: function () { @@ -108,8 +109,6 @@ BI.AllCountPager = BI.inherit(BI.Widget, { }); }, - showPager: true, - _getPagerIconCls: function () { var o = this.options; switch (o.pagerDirection) { @@ -172,6 +171,11 @@ BI.AllCountPager = BI.inherit(BI.Widget, { this.setPagerVisible(v > 1); }, + setShowRowInfo: function (b) { + this.options.showRowInfo = b; + this.rowCountObject.setVisible(b); + }, + setValue: function (v) { this.pager.setValue(v); }, @@ -205,17 +209,16 @@ BI.AllCountPager = BI.inherit(BI.Widget, { return this.pager.hasNext(); }, + isShowPager: function () { + return this.options.showRowInfo || this.options.pages > 1; + }, + setPagerVisible: function (b) { this.editor.setVisible(b); this.allPages.setVisible(b); this.pager.setVisible(b); }, - setRowCountVisible: function (b) { - this.rowCountObject.setVisible(b); - this.showPager = b || this.options.pages > 1; - }, - populate: function () { this.pager.populate(); this.setPagerVisible(this.options.pages > 1); diff --git a/typescript/case/pager/pager.all.count.ts b/typescript/case/pager/pager.all.count.ts index 77b7e43f7..f5b0f9eab 100644 --- a/typescript/case/pager/pager.all.count.ts +++ b/typescript/case/pager/pager.all.count.ts @@ -22,7 +22,9 @@ export declare class AllCountPager extends Widget { setPagerVisible(v: boolean): void; - setRowCountVisible(v: boolean): void; + setShowRowInfo(v: boolean): void; + + isShowPager(): boolean; populate(): void; }