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);
},
selectHighlight(){
let index = [];
let hClass = [];
for(let k=0; k<this.isHighlight.length; k++){
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
}
}
this.isHighlight.forEach(([id, level]) => {
const item = this.items.find(item => item.id === id);
if (item) item.isHighlight = level;
});
console.log(this.items)
},
selectRandomGraffs(){