Browse Source

fix 大表格切换卡顿

es6
NieShichao 7 years ago
parent
commit
f084db597f
  1. 73472
      bi/base.js
  2. 25064
      bi/case.js
  3. 36488
      bi/widget.js
  4. 15
      demo/js/category/canvasTable/large.table.canvas.js
  5. 0
      demo/js/category/canvasTable/new.canvas.js
  6. 15
      demo/js/category/largeTable/largeTable.js
  7. 73472
      dist/base.js
  8. 193280
      dist/bundle.js
  9. 25064
      dist/case.js
  10. 30592
      dist/demo.js
  11. 36488
      dist/widget.js

73472
bi/base.js

File diff suppressed because it is too large Load Diff

25064
bi/case.js

File diff suppressed because it is too large Load Diff

36488
bi/widget.js

File diff suppressed because it is too large Load Diff

15
demo/js/category/canvasTable/largeTableCanvas.js → demo/js/category/canvasTable/large.table.canvas.js

@ -72,8 +72,13 @@ Demo.CanvasTable = BI.inherit(BI.Widget, {
mounted: function () {
var self = this;
var tableItems = this._expandData(TABLE_ITEMS, 3),
headItems = this._expandHeadData(TABLE_HEADER, 3);
if (BI.isNull(BI.isExpanded)) {
BI.isExpanded = false;
} else if (!BI.isExpanded) {
TABLE_ITEMS = this._expandData(TABLE_ITEMS, 3);
TABLE_HEADER = this._expandHeadData(TABLE_HEADER, 3);
BI.isExpanded = true;
}
this._resizeHandler = BI.debounce(function () {
var width = self.element.width(), height = self.element.height();
if (self.table.getWidth() !== width || self.table.getHeight() !== height) {
@ -87,14 +92,14 @@ Demo.CanvasTable = BI.inherit(BI.Widget, {
});
this.table.setWidth(this.element.width());
this.table.setHeight(this.element.height());
this.table.attr("columnSize", BI.makeArray(headItems[0].length, ""));
this.table.attr("minColumnSize", BI.makeArray(headItems[0].length, 60));
this.table.attr("columnSize", BI.makeArray(TABLE_HEADER[0].length, ""));
this.table.attr("minColumnSize", BI.makeArray(TABLE_HEADER[0].length, 60));
this.table.attr("isNeedFreeze", true);
this.table.attr("freezeCols", []);
this.table.attr("showSequence", true);
this.table.attr("headerRowSize", 15);
this.table.attr("rowSize", 15);
this.table.populate(tableItems, headItems);
this.table.populate(TABLE_ITEMS, TABLE_HEADER);
},
_expandData: function (items, times) {

0
demo/js/category/canvasTable/newCanvas.js → demo/js/category/canvasTable/new.canvas.js

15
demo/js/category/largeTable/largeTable.js

@ -72,8 +72,13 @@ Demo.Face = BI.inherit(BI.Widget, {
mounted: function () {
var self = this;
var tableItems = this._expandData(TABLE_ITEMS, 3),
headItems = this._expandHeadData(TABLE_HEADER, 3);
if (BI.isNull(BI.isExpanded)) {
BI.isExpanded = false;
} else if (!BI.isExpanded) {
TABLE_ITEMS = this._expandData(TABLE_ITEMS, 3);
TABLE_HEADER = this._expandHeadData(TABLE_HEADER, 3);
BI.isExpanded = true;
}
this._resizeHandler = BI.debounce(function () {
var width = self.element.width(), height = self.element.height();
if (self.table.getWidth() !== width || self.table.getHeight() !== height) {
@ -87,14 +92,14 @@ Demo.Face = BI.inherit(BI.Widget, {
});
this.table.setWidth(this.element.width());
this.table.setHeight(this.element.height());
this.table.attr("columnSize", BI.makeArray(headItems[0].length, ""));
this.table.attr("minColumnSize", BI.makeArray(headItems[0].length, 60));
this.table.attr("columnSize", BI.makeArray(TABLE_HEADER[0].length, ""));
this.table.attr("minColumnSize", BI.makeArray(TABLE_HEADER[0].length, 60));
this.table.attr("isNeedFreeze", true);
this.table.attr("freezeCols", []);
this.table.attr("showSequence", true);
this.table.attr("headerRowSize", 15);
this.table.attr("rowSize", 15);
this.table.populate(tableItems, headItems);
this.table.populate(TABLE_ITEMS, TABLE_HEADER);
},
_expandData: function (items, times) {

73472
dist/base.js vendored

File diff suppressed because it is too large Load Diff

193280
dist/bundle.js vendored

File diff suppressed because it is too large Load Diff

25064
dist/case.js vendored

File diff suppressed because it is too large Load Diff

30592
dist/demo.js vendored

File diff suppressed because one or more lines are too long

36488
dist/widget.js vendored

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save