2023-11-9-2
This commit is contained in:
@@ -114,27 +114,29 @@ export default defineComponent({
|
||||
sketch1.num = 0
|
||||
sketch2.num = 1
|
||||
sketch3.num = 2
|
||||
console.log(this.sketchList);
|
||||
for (let i = 0; i < this.sketchList.length; i++) {
|
||||
let arr = [sketch1,sketch2,sketch3]
|
||||
arr.sort((a,b)=>{
|
||||
var a_num = a["height"];
|
||||
var b_num = b["height"];
|
||||
return a_num - b_num;
|
||||
})
|
||||
this.sketch[arr[0].num]?.push(this.sketchList[i])
|
||||
await new Promise((resolve:any)=>{
|
||||
nextTick().then(()=>{
|
||||
sketch1 = document.getElementsByClassName('collection_review')[0]?.getElementsByClassName('lager_img_item0')[0]?.getBoundingClientRect()
|
||||
sketch2 = document.getElementsByClassName('collection_review')[0]?.getElementsByClassName('lager_img_item1')[0]?.getBoundingClientRect()
|
||||
sketch3 = document.getElementsByClassName('collection_review')[0]?.getElementsByClassName('lager_img_item2')[0]?.getBoundingClientRect()
|
||||
sketch1.num = 0
|
||||
sketch2.num = 1
|
||||
sketch3.num = 2
|
||||
resolve()
|
||||
if(this.sketchList){
|
||||
for (let i = 0; i < this.sketchList.length; i++) {
|
||||
let arr = [sketch1,sketch2,sketch3]
|
||||
arr.sort((a,b)=>{
|
||||
var a_num = a["height"];
|
||||
var b_num = b["height"];
|
||||
return a_num - b_num;
|
||||
})
|
||||
})
|
||||
this.sketch[arr[0].num]?.push(this.sketchList[i])
|
||||
await new Promise((resolve:any)=>{
|
||||
nextTick().then(()=>{
|
||||
sketch1 = document.getElementsByClassName('collection_review')[0]?.getElementsByClassName('lager_img_item0')[0]?.getBoundingClientRect()
|
||||
sketch2 = document.getElementsByClassName('collection_review')[0]?.getElementsByClassName('lager_img_item1')[0]?.getBoundingClientRect()
|
||||
sketch3 = document.getElementsByClassName('collection_review')[0]?.getElementsByClassName('lager_img_item2')[0]?.getBoundingClientRect()
|
||||
sketch1.num = 0
|
||||
sketch2.num = 1
|
||||
sketch3.num = 2
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user