|
|
@ -111,7 +111,7 @@ |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// 预加载图片 |
|
|
|
// 预加载图片 |
|
|
|
loadImages(idx = 0) { |
|
|
|
loadImages(idx = 0) { |
|
|
|
debugger |
|
|
|
|
|
|
|
let count = 0; |
|
|
|
let count = 0; |
|
|
|
const newList = this.data.list.filter((item, index) => index >= idx); |
|
|
|
const newList = this.data.list.filter((item, index) => index >= idx); |
|
|
|
for (let i = 0; i < newList.length; i++) { |
|
|
|
for (let i = 0; i < newList.length; i++) { |
|
|
@ -137,7 +137,7 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 刷新 |
|
|
|
// 刷新 |
|
|
|
refresh() { |
|
|
|
refresh() { |
|
|
|
debugger |
|
|
|
|
|
|
|
if (!this.isLoaded) { |
|
|
|
if (!this.isLoaded) { |
|
|
|
this.refreshDatas = this.value; |
|
|
|
this.refreshDatas = this.value; |
|
|
|
return false; |
|
|
|
return false; |
|
|
@ -163,11 +163,11 @@ |
|
|
|
}, 1) |
|
|
|
}, 1) |
|
|
|
}, |
|
|
|
}, |
|
|
|
columnValue(index) { |
|
|
|
columnValue(index) { |
|
|
|
debugger |
|
|
|
|
|
|
|
return this.data[`column_${index+1}_values`]; |
|
|
|
return this.data[`column_${index+1}_values`]; |
|
|
|
}, |
|
|
|
}, |
|
|
|
change(newValue) { |
|
|
|
change(newValue) { |
|
|
|
debugger |
|
|
|
|
|
|
|
for (let i = 0; i < this.data.list.length; i++) { |
|
|
|
for (let i = 0; i < this.data.list.length; i++) { |
|
|
|
const cv = this.data[`column_${this.data.list[i].column}_values`]; |
|
|
|
const cv = this.data[`column_${this.data.list[i].column}_values`]; |
|
|
|
for (let j = 0; j < cv.length; j++) { |
|
|
|
for (let j = 0; j < cv.length; j++) { |
|
|
@ -180,7 +180,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
getMin(a, s) { |
|
|
|
getMin(a, s) { |
|
|
|
debugger |
|
|
|
|
|
|
|
let m = a[0][s]; |
|
|
|
let m = a[0][s]; |
|
|
|
let mo = a[0]; |
|
|
|
let mo = a[0]; |
|
|
|
for (var i = a.length - 1; i >= 0; i--) { |
|
|
|
for (var i = a.length - 1; i >= 0; i--) { |
|
|
@ -193,7 +193,7 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 计算每列的高度 |
|
|
|
// 计算每列的高度 |
|
|
|
getMinColumnHeight() { |
|
|
|
getMinColumnHeight() { |
|
|
|
debugger |
|
|
|
|
|
|
|
return new Promise(resolve => { |
|
|
|
return new Promise(resolve => { |
|
|
|
const heightArr = []; |
|
|
|
const heightArr = []; |
|
|
|
for (let i = 1; i <= this.data.column; i++) { |
|
|
|
for (let i = 1; i <= this.data.column; i++) { |
|
|
@ -209,7 +209,7 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
async initValue(i, from) { |
|
|
|
async initValue(i, from) { |
|
|
|
debugger |
|
|
|
|
|
|
|
this.isLoaded = false; |
|
|
|
this.isLoaded = false; |
|
|
|
if (i >= this.data.list.length || this.refreshDatas.length) { |
|
|
|
if (i >= this.data.list.length || this.refreshDatas.length) { |
|
|
|
this.msg++; |
|
|
|
this.msg++; |
|
|
@ -224,7 +224,7 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 图片加载完成 |
|
|
|
// 图片加载完成 |
|
|
|
imgLoad(item, c) { |
|
|
|
imgLoad(item, c) { |
|
|
|
debugger |
|
|
|
|
|
|
|
const i = item.index; |
|
|
|
const i = item.index; |
|
|
|
item.o = 1; |
|
|
|
item.o = 1; |
|
|
|
this.$set(this.data[`column_${c}_values`], item.cIndex, JSON.parse(JSON.stringify(item))); |
|
|
|
this.$set(this.data[`column_${c}_values`], item.cIndex, JSON.parse(JSON.stringify(item))); |
|
|
@ -232,7 +232,7 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 图片加载失败 |
|
|
|
// 图片加载失败 |
|
|
|
imgError(item, c) { |
|
|
|
imgError(item, c) { |
|
|
|
debugger |
|
|
|
|
|
|
|
const i = item.index; |
|
|
|
const i = item.index; |
|
|
|
item.o = 1; |
|
|
|
item.o = 1; |
|
|
|
item[this.data.imageKey] = null; |
|
|
|
item[this.data.imageKey] = null; |
|
|
@ -241,7 +241,7 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 渲染结束 |
|
|
|
// 渲染结束 |
|
|
|
loaded() { |
|
|
|
loaded() { |
|
|
|
debugger |
|
|
|
|
|
|
|
if (this.refreshDatas.length) { |
|
|
|
if (this.refreshDatas.length) { |
|
|
|
this.isLoaded = true; |
|
|
|
this.isLoaded = true; |
|
|
|
this.refresh(); |
|
|
|
this.refresh(); |
|
|
@ -260,12 +260,12 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 单项点击事件 |
|
|
|
// 单项点击事件 |
|
|
|
wapperClick(item) { |
|
|
|
wapperClick(item) { |
|
|
|
debugger |
|
|
|
|
|
|
|
this.$emit('wapperClick', item); |
|
|
|
this.$emit('wapperClick', item); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 图片点击事件 |
|
|
|
// 图片点击事件 |
|
|
|
imageClick(item) { |
|
|
|
imageClick(item) { |
|
|
|
debugger |
|
|
|
|
|
|
|
this.$emit('imageClick', item); |
|
|
|
this.$emit('imageClick', item); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -275,7 +275,7 @@ |
|
|
|
handler(newValue, oldValue) { |
|
|
|
handler(newValue, oldValue) { |
|
|
|
setTimeout(() => { |
|
|
|
setTimeout(() => { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$nextTick(() => { |
|
|
|
debugger |
|
|
|
|
|
|
|
if (this.isRefresh) return false; |
|
|
|
if (this.isRefresh) return false; |
|
|
|
if (this.isLoaded) { |
|
|
|
if (this.isLoaded) { |
|
|
|
// if (newValue.length <= this.curIndex) return this.refresh(); |
|
|
|
// if (newValue.length <= this.curIndex) return this.refresh(); |
|
|
|