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;