Browse Source

Merge pull request #296 in ~GUY/fineui from ~YOUNG/fineuig:master to master

* commit '6fd4cb0e317fa92c2246ff7015d5fb39a36bac9d':
  表格populate时empty除resize相关元素外的所有子元素
es6
Young 7 years ago
parent
commit
b4e1ac8e07
  1. 23
      demo/js/widget/table/demo.responsive_table.js
  2. 10
      dist/base.js
  3. 10
      dist/bundle.js
  4. 23
      dist/demo.js
  5. 10
      src/base/table/table.js

23
demo/js/widget/table/demo.responsive_table.js

@ -129,23 +129,24 @@ Demo.Func = BI.inherit(BI.Widget, {
isNeedMerge: true,
isNeedFreeze: true,
mergeCols: [0, 1],
columnSize: ["", "", ""],
items: items,
header: header
items: [],
header: []
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.grid",
columns: 2,
rows: 2,
items: [{
column: 0,
row: 0,
el: table1
}]
type: "bi.tab",
defaultShowIndex: 1,
cardCreator: function (v) {
switch (v) {
case 1:
table1.attr("columnSize", ["", "", ""]);
table1.populate(items, header);
return table1;
}
}
},
left: 10,
right: 10,

10
dist/base.js vendored

@ -33415,12 +33415,20 @@ BI.Table = BI.inherit(BI.Widget, {
},
_empty: function () {
this.scrollBottomRight && this.scrollBottomRight.destroy();
this.topLeft && this.topLeft.destroy();
this.topRight && this.topRight.destroy();
this.bottomLeft && this.bottomLeft.destroy();
this.bottomRight && this.bottomRight.destroy();
},
populate: function (items, header) {
this.options.items = items || [];
if (header) {
this.options.header = header;
}
this.empty();
this._empty();
if (this.options.isNeedFreeze) {
this._createFreezeTable();
} else {

10
dist/bundle.js vendored

@ -59288,12 +59288,20 @@ BI.Table = BI.inherit(BI.Widget, {
},
_empty: function () {
this.scrollBottomRight && this.scrollBottomRight.destroy();
this.topLeft && this.topLeft.destroy();
this.topRight && this.topRight.destroy();
this.bottomLeft && this.bottomLeft.destroy();
this.bottomRight && this.bottomRight.destroy();
},
populate: function (items, header) {
this.options.items = items || [];
if (header) {
this.options.header = header;
}
this.empty();
this._empty();
if (this.options.isNeedFreeze) {
this._createFreezeTable();
} else {

23
dist/demo.js vendored

@ -14112,23 +14112,24 @@ BI.shortcut("demo.preview_table", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
isNeedMerge: true,
isNeedFreeze: true,
mergeCols: [0, 1],
columnSize: ["", "", ""],
items: items,
header: header
items: [],
header: []
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.grid",
columns: 2,
rows: 2,
items: [{
column: 0,
row: 0,
el: table1
}]
type: "bi.tab",
defaultShowIndex: 1,
cardCreator: function (v) {
switch (v) {
case 1:
table1.attr("columnSize", ["", "", ""]);
table1.populate(items, header);
return table1;
}
}
},
left: 10,
right: 10,

10
src/base/table/table.js

@ -1580,12 +1580,20 @@ BI.Table = BI.inherit(BI.Widget, {
},
_empty: function () {
this.scrollBottomRight && this.scrollBottomRight.destroy();
this.topLeft && this.topLeft.destroy();
this.topRight && this.topRight.destroy();
this.bottomLeft && this.bottomLeft.destroy();
this.bottomRight && this.bottomRight.destroy();
},
populate: function (items, header) {
this.options.items = items || [];
if (header) {
this.options.header = header;
}
this.empty();
this._empty();
if (this.options.isNeedFreeze) {
this._createFreezeTable();
} else {

Loading…
Cancel
Save