From d1d8677b5a3a96d49448d116a9664df576df20dc Mon Sep 17 00:00:00 2001 From: "gwenael.planchon" Date: Fri, 29 Mar 2024 11:07:01 +0100 Subject: [PATCH] toujours afficher les options --- .../src/components/jeux/creerPartie.vue | 83 +++++++------------ 1 file changed, 31 insertions(+), 52 deletions(-) diff --git a/science-quest/src/components/jeux/creerPartie.vue b/science-quest/src/components/jeux/creerPartie.vue index 93714bc..622910c 100644 --- a/science-quest/src/components/jeux/creerPartie.vue +++ b/science-quest/src/components/jeux/creerPartie.vue @@ -10,11 +10,9 @@ export default { return { jeuxDispo:[], - afficherChoixThematiques:false, thematiquesDispo:[], choixThematiques:[], - afficherChoixDifficultes:false, difficultesDispo:[], choixDifficulte:-1, } @@ -28,21 +26,11 @@ export default { return utilisateur.login().then(response=>console.log(response)) } - }, - watch:{ - afficherChoixThematiques(to){ - if(to && this.thematiquesDispo.length==0){ - Thematiques.getPage(0,999).then(thematiques=>this.thematiquesDispo=thematiques._embedded) - } - }, - afficherChoixDifficultes(to){ - if(to && this.difficultesDispo.length==0){ - Difficultes.getPage(0,999).then(difficultes=>this.difficultesDispo=difficultes._embedded) - } - } }, mounted(){ ListeJeux.get().then(jeux=>this.jeuxDispo=Object.values(jeux)) + Difficultes.getPage(0,999).then(difficultes=>this.difficultesDispo=difficultes._embedded) + Thematiques.getPage(0,999).then(thematiques=>this.thematiquesDispo=thematiques._embedded) } } @@ -51,45 +39,36 @@ export default {