...
|
...
|
@@ -191,36 +191,39 @@ export default { |
|
|
}, i <= lastIndex ? (startCol + i) % this.cols : -1);
|
|
|
}
|
|
|
|
|
|
for (let i = 0; i < this.cols; i++) {
|
|
|
let loop = true;
|
|
|
let col = this[this.colPrefix + i];
|
|
|
let k = col.length - 1;
|
|
|
|
|
|
while (loop) {
|
|
|
let cur = col[k];
|
|
|
this.$nextTick(() => {
|
|
|
for (let i = 0; i < this.cols; i++) {
|
|
|
let loop = true;
|
|
|
let col = this[this.colPrefix + i];
|
|
|
let k = col.length - 1;
|
|
|
|
|
|
while (loop) {
|
|
|
let cur = col[k];
|
|
|
|
|
|
if (!cur || cur.height) {
|
|
|
loop = false;
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
if (!cur || cur.height) {
|
|
|
loop = false;
|
|
|
continue;
|
|
|
}
|
|
|
let dom = this.$refs[`items${cur.index}`];
|
|
|
|
|
|
let dom = this.$refs[`items${cur.index}`];
|
|
|
try {
|
|
|
if (dom && dom[0]) {
|
|
|
cur.height = dom[0].offsetHeight;
|
|
|
cur.top = dom[0].offsetTop;
|
|
|
}
|
|
|
} catch (error) {
|
|
|
const message = `cur_${typeof cur}, dom_ ${typeof dom}, column_${i}, index_ ${index}, length_ ${this.items.length}, ${error ? error.message : ''}`;
|
|
|
|
|
|
try {
|
|
|
if (dom && dom[0]) {
|
|
|
cur.height = dom[0].offsetHeight;
|
|
|
cur.top = dom[0].offsetTop;
|
|
|
throw new Error(message);
|
|
|
}
|
|
|
} catch (error) {
|
|
|
const message = `cur_${typeof cur}, dom_ ${typeof dom}, column_${i}, index_ ${index}, length_ ${this.items.length}, ${error ? error.message : ''}`;
|
|
|
|
|
|
throw new Error(message);
|
|
|
this.$set(this[this.colPrefix + i], k, cur);
|
|
|
k--;
|
|
|
}
|
|
|
|
|
|
this.$set(this[this.colPrefix + i], k, cur);
|
|
|
k--;
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
return true;
|
|
|
},
|
|
|
loadItem(item, colIndex) {
|
...
|
...
|
@@ -281,7 +284,7 @@ export default { |
|
|
let hasTopItem = false;
|
|
|
|
|
|
for (let i = 0; i < col.length; i++) {
|
|
|
if (i < startIndex - this.size || i > startIndex + this.size) {
|
|
|
if ((i < startIndex - this.size || i > startIndex + this.size) && col[i].height) {
|
|
|
this.$set(col[i], 'placeholder', true);
|
|
|
} else {
|
|
|
this.$set(col[i], 'placeholder', false);
|
...
|
...
|
|