Browse Source

Pull request #1949: BI-87649 feat:pager末尾增加总行数信息(行数超20000条时)

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

* commit '30363f687c9c0d6887e5137334fc3cb9f51ccf28':
  BI-87649 feat:pager末尾增加总行数信息(行数超20000条时)
es6
Claire.Tang 3 years ago
parent
commit
d940e856b2
  1. 15
      src/case/pager/pager.all.count.js
  2. 4
      typescript/case/editor/editor.sign.ts
  3. 4
      typescript/case/editor/editor.state.ts
  4. 2
      typescript/case/pager/pager.all.count.ts

15
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();
},

4
typescript/case/editor/editor.sign.ts

@ -46,7 +46,7 @@ export declare class SignEditor extends Widget {
getLastChangedValue(): string;
getState(): any;
getState(): number | string | Array<string>;
setState(...args: any[]): void;
setState(...args: (number | string | Array<string>)[]): void;
}

4
typescript/case/editor/editor.state.ts

@ -42,7 +42,7 @@ export declare class StateEditor extends Widget {
getLastChangedValue(): string;
getState(): any;
getState(): number | string | Array<string>;
setState(...args: any[]): void;
setState(...args: (number | string | Array<string>)[]): void;
}

2
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;

Loading…
Cancel
Save