edit: simplification highlight sans array intermédiaire

This commit is contained in:
2026-03-01 05:22:07 +01:00
parent ab0509d45f
commit c79ac75da9
+4 -16
View File
@@ -295,22 +295,10 @@ import { toRaw } from 'vue'
console.log(this.marjTop,this.marjBot,this.marjSide); console.log(this.marjTop,this.marjBot,this.marjSide);
}, },
selectHighlight(){ selectHighlight(){
let index = []; this.isHighlight.forEach(([id, level]) => {
let hClass = []; const item = this.items.find(item => item.id === id);
for(let k=0; k<this.isHighlight.length; k++){ if (item) item.isHighlight = level;
index.splice(k,0,this.isHighlight[k][0]); });
hClass.splice(k,0,this.isHighlight[k][1]);
};
console.log(index,hClass);
for (let i=0; i<this.items.length; i++){
let selectedItem = this.items[i].id;
if (index.includes(selectedItem)){
let selectIndex = index.indexOf(selectedItem);
this.items[i].isHighlight = hClass[selectIndex];
}else{
continue
}
}
console.log(this.items) console.log(this.items)
}, },
selectRandomGraffs(){ selectRandomGraffs(){