From e2e805fda65c1296095a88cf660b6175361cf1f1 Mon Sep 17 00:00:00 2001 From: vgaNAR6ta Date: Sun, 1 Mar 2026 05:31:47 +0100 Subject: [PATCH] =?UTF-8?q?solve:=20bug#1=20=3D>=20probl=C3=A8me=20de=20r?= =?UTF-8?q?=C3=A9f=C3=A9rence=20multiples=20dans=20les=20array=20et=20leur?= =?UTF-8?q?s=20copies=20r=C3=A9gl=C3=A9s=20avec=20[...]=20et=20structuredC?= =?UTF-8?q?Lone=20=3D>=20probl=C3=A8me=20d'ID=20chiffr=C3=A9=20en=20double?= =?UTF-8?q?=20entre=20img=20et=20graff=20r=C3=A9gl=C3=A9=20avec=20ajout=20?= =?UTF-8?q?de=20'img-'=20et=20'graff-'=20task#1:=20finir=20formulaire=20co?= =?UTF-8?q?ntact=20(mail=20+=20captcha=20=3F)=20task#2:=20g=C3=A9n=C3=A9ra?= =?UTF-8?q?tion=20multicollection=20+=20fond=20assortis=20task#3:=20suppri?= =?UTF-8?q?mer=20ou=20modifier=20colorBtn=20task#4:=20responsive=20hauteur?= =?UTF-8?q?=20(autour=20de=201080px=20=3F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MainContent.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/MainContent.vue b/src/MainContent.vue index ebca3f1..bc6c386 100644 --- a/src/MainContent.vue +++ b/src/MainContent.vue @@ -314,13 +314,13 @@ import { toRaw } from 'vue' c = this.getRandomInt(0,graffCount); } while (a == c || c == b); console.log(a,b,c); - this.items.push(this.graffs[a],this.graffs[b],this.graffs[c]); + this.randomItems.push({...this.graffs[a]},{...this.graffs[b]},{...this.graffs[c]}); }, generateContent(){ - console.log(this.items); + console.log("before gen:",this.items); + this.randomItems = structuredClone(toRaw(this.items)).sort(() => Math.random()-0.5); this.selectRandomGraffs(); - this.randomItems = this.items.sort(() => Math.random()-0.5), - console.log(this.randomItems); + console.log("random + graff:",this.randomItems); this.maxItemCount = this.randomItems.length; this.divideItem(); this.createEmptyArray(); @@ -328,7 +328,7 @@ import { toRaw } from 'vue' this.genCoord(this.partOneItem); this.genCoord(this.partTwoItem); this.genCoord(this.partThreeItem); - console.log('Content has been generated!') + console.log('Content has been generated!'); } }, data(){ @@ -338,20 +338,20 @@ import { toRaw } from 'vue' const graffData = Object.values(impGraff); return{ items: imgData.map((src, index) => ({ - id: index, + id: "img-" + index, src: src, x: 0, y: 0, isHighlight: 0 })), graffs: graffData.map((src, index) => ({ - id: index, + id: "graff-" + index, src: src, x: 0, y: 0, isHighlight: 3 })), - isHighlight:[[2,1],[6,1],[11,2]], + isHighlight:[['img-2',1],['img-6',1],['img-11',2]], randomItems: null, maxItemCount: 0, marjTop:0,