begin question 8

question-12
Bastien JACQUELIN 2 years ago
parent 7b42b3dca7
commit c6d76d18c4

@ -18,7 +18,7 @@ export default{
}, },
checkFields: function() { checkFields: function() {
this.errMessage=""; this.errMessage="";
document.querySelectorAll("#id").removeAttribute("style"); document.querySelector("#id").removeAttribute("style");
document.querySelector("#name").removeAttribute("style"); document.querySelector("#name").removeAttribute("style");
document.querySelector("#desc").removeAttribute("style"); document.querySelector("#desc").removeAttribute("style");
if(this.id===""||this.name===""||this.description===""){ if(this.id===""||this.name===""||this.description===""){
@ -46,7 +46,6 @@ export default{
} }
} }
if(this.errMessage.length===0){ if(this.errMessage.length===0){
console.log("jappelle la fonction");
this.addTeam(); this.addTeam();
} }
}, },
@ -56,9 +55,9 @@ export default{
this.$emit("addTeam",team); this.$emit("addTeam",team);
this.id=''; this.id='';
this.name=''; this.name='';
this.description='';
}, },
myfun: function() { myfun: function() {
console.log("gngn");
this.clicked=!this.clicked; this.clicked=!this.clicked;
} }
}, },

@ -5,10 +5,15 @@ export default{
description: String description: String
}, },
methods: { methods: {
myfun: function() {
console.log('to do')
}
}, },
template: ` template: `
<br>
<div id="teamCard"> <div id="teamCard">
<span>{{id}} {{nom}} description: {{description}}</span> <span>{{id}} {{nom}} description: {{description}}</span>
<span @click="myfun" style="cursor: pointer"> - éditer</span>
</div> </div>
` `
} }

Loading…
Cancel
Save