Browse Source

KERNEL-12408 chore: base中eslint修改

es6
chaos0156 2 years ago
parent
commit
58b827c1f7
  1. 11
      src/base/layer/layer.popup.js
  2. 10
      src/base/list/listview.js
  3. 1
      src/base/list/virtualgrouplist.js
  4. 6
      src/base/list/virtuallist.js

11
src/base/layer/layer.popup.js

@ -380,11 +380,12 @@ BI.PopupView = BI.inherit(BI.Widget, {
default:
break;
}
this.element.removeClass("left")
.removeClass("right")
.removeClass("top")
.removeClass("bottom")
.addClass(direction);
this.element
.removeClass("left")
.removeClass("right")
.removeClass("top")
.removeClass("bottom")
.addClass(direction);
this.arrow.element.css(style);
this.arrowWrapper.element.css(wrapperStyle);
this.placeholder.element.css(placeholderStyle);

10
src/base/list/listview.js

@ -21,13 +21,13 @@ BI.ListView = BI.inherit(BI.Widget, {
},
init: function () {
var self = this;
this.renderedIndex = -1;
this.cache = {};
},
render: function () {
var self = this, o = this.options;
return {
type: "bi.vertical",
items: [BI.extend({
@ -72,10 +72,11 @@ BI.ListView = BI.inherit(BI.Widget, {
var index = (this.cache[this.renderedIndex] && (this.cache[this.renderedIndex].index + o.blockSize)) || 0;
var cnt = this.renderedIndex + 1;
var lastHeight;
var getElementHeight = function () {
function getElementHeight () {
return self.container.element.height();
};
while ((lastHeight = getElementHeight()) < minContentHeight && index < o.items.length) {
}
lastHeight = getElementHeight();
while ((lastHeight) < minContentHeight && index < o.items.length) {
var items = o.items.slice(index, index + o.blockSize);
this.container.addItems(items.map(function (item, i) {
return o.itemFormatter(item, index + i);
@ -93,7 +94,6 @@ BI.ListView = BI.inherit(BI.Widget, {
},
_calculateBlocksToRender: function () {
var o = this.options;
this._renderMoreIf();
},

1
src/base/list/virtualgrouplist.js

@ -27,6 +27,7 @@ BI.VirtualGroupList = BI.inherit(BI.Widget, {
render: function () {
var self = this, o = this.options;
return {
type: "bi.vertical",
items: [{

6
src/base/list/virtuallist.js

@ -20,13 +20,13 @@ BI.VirtualList = BI.inherit(BI.Widget, {
},
init: function () {
var self = this;
this.renderedIndex = -1;
this.cache = {};
},
render: function () {
var self = this, o = this.options;
var self = this;
return {
type: "bi.vertical",
items: [{
@ -45,7 +45,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
ref: function () {
self.bottomBlank = this;
}
}],
}]
};
},

Loading…
Cancel
Save