From 86a84a2bc09a3fea8694b5d59c2bc7d6e01374a5 Mon Sep 17 00:00:00 2001 From: Tangjinxia <1119518763@qq.com> Date: Thu, 3 Jun 2021 18:07:20 +0800 Subject: [PATCH] =?UTF-8?q?BI-87649=20feat:pager=E6=9C=AB=E5=B0=BE?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=80=BB=E8=A1=8C=E6=95=B0=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=88=E8=A1=8C=E6=95=B0=E8=B6=8520000=E6=9D=A1=E6=97=B6?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/pager/pager.all.count.js | 15 ++++++++++++--- typescript/case/editor/editor.sign.ts | 4 ++-- typescript/case/editor/editor.state.ts | 4 ++-- typescript/case/pager/pager.all.count.ts | 2 ++ 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/case/pager/pager.all.count.js b/src/case/pager/pager.all.count.js index dc0f31d13..859404904 100644 --- a/src/case/pager/pager.all.count.js +++ b/src/case/pager/pager.all.count.js @@ -12,6 +12,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, { pages: 1, // 必选项 curr: 1, // 初始化当前页, pages为数字时可用, count: 1, // 总行数 + rowInfoObject: null, showRowCount: true }); }, @@ -137,7 +138,9 @@ BI.AllCountPager = BI.inherit(BI.Widget, { type: "bi.label", height: o.height, text: BI.i18nText("BI-Basic_Total"), - width: 15 + ref: function (_ref) { + self.prevText = _ref; + } }, { type: "bi.label", ref: function (_ref) { @@ -152,9 +155,9 @@ BI.AllCountPager = BI.inherit(BI.Widget, { type: "bi.label", height: o.height, text: BI.i18nText("BI-Tiao_Data"), - width: 50, + width: 40, textAlign: "left" - }] + }, BI.isNotEmptyObject(o.rowInfoObject) ? o.rowInfoObject : null] }; }, @@ -182,6 +185,12 @@ BI.AllCountPager = BI.inherit(BI.Widget, { } }, + setCountPrevText: function (text) { + if (this.options.showRowCount) { + this.prevText.setText(text); + } + }, + getCurrentPage: function () { return this.pager.getCurrentPage(); }, diff --git a/typescript/case/editor/editor.sign.ts b/typescript/case/editor/editor.sign.ts index 9ff4b032b..37789492e 100644 --- a/typescript/case/editor/editor.sign.ts +++ b/typescript/case/editor/editor.sign.ts @@ -46,7 +46,7 @@ export declare class SignEditor extends Widget { getLastChangedValue(): string; - getState(): any; + getState(): number | string | Array; - setState(...args: any[]): void; + setState(...args: (number | string | Array)[]): void; } diff --git a/typescript/case/editor/editor.state.ts b/typescript/case/editor/editor.state.ts index b2528a25e..23255906d 100644 --- a/typescript/case/editor/editor.state.ts +++ b/typescript/case/editor/editor.state.ts @@ -42,7 +42,7 @@ export declare class StateEditor extends Widget { getLastChangedValue(): string; - getState(): any; + getState(): number | string | Array; - setState(...args: any[]): void; + setState(...args: (number | string | Array)[]): void; } diff --git a/typescript/case/pager/pager.all.count.ts b/typescript/case/pager/pager.all.count.ts index 12b2d87f4..1e772cd50 100644 --- a/typescript/case/pager/pager.all.count.ts +++ b/typescript/case/pager/pager.all.count.ts @@ -12,6 +12,8 @@ export declare class AllCountPager extends Widget { setCount(v: number | string): void; + setCountPrevText(v: string): void; + getCurrentPage(): number; hasPrev(): boolean;