Resolution d'un premier bug sur le boutton edir

master
Raphael LACOTE 2 years ago
parent abacdcbbad
commit babf248744

@ -67,8 +67,7 @@ export default {
<div v-bind:style="{ color: errorColor}">{{ errorMessage }}</div> <div v-bind:style="{ color: errorColor}">{{ errorMessage }}</div>
<div> <div>
<label>ID</label><br/> <label>ID</label><br/>
<input type="text" v-model="id"/> <input type="text" v-model="this.id" />
{{this.id}}
</div> </div>
<div> <div>
<label>Name</label><br/> <label>Name</label><br/>

@ -11,22 +11,19 @@ export default {
}, },
methods: { methods: {
recupTeam: function (team) { recupTeam: function (team) {
console.log('team.addTeam', team);
this.allTeam.push(team); this.allTeam.push(team);
}, },
editParam: function (team) { editParam: function (team) {
this.teamAEdit=team this.teamAEdit=team
console.log('lanceEdit')
}, },
updateTeam: function (team) { updateTeam: function (team) {
console.log('update')
for (var i = 0; i < this.allTeam.length; i++) { for (var i = 0; i < this.allTeam.length; i++) {
if (this.allTeam[i].id == this.teamAEdit.id) { if (this.allTeam[i].id == this.teamAEdit.id) {
console.log('update + +')
this.allTeam[i].name = team.name this.allTeam[i].name = team.name
this.allTeam[i].description=team.description this.allTeam[i].description=team.description
} }
} }
this.teamAEdit = null
} }

Loading…
Cancel
Save