parent
d95677ab57
commit
5021d71f4d
@ -1,3 +1,3 @@
|
|||||||
const ERROR_COLOR = 'red';
|
const ERROR_COLOR = 'red';
|
||||||
const DESCRIPTION_MINIMAL_SIZE = 20;
|
const DESCRIPTION_MINIMAL_SIZE = 1;
|
||||||
const NAME_MINIMAL_SIZE = 5;
|
const NAME_MINIMAL_SIZE = 1;
|
@ -0,0 +1,34 @@
|
|||||||
|
import teamAdd from './team-add.js';
|
||||||
|
import teamCard from './teamcard.js';
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data: function() {
|
||||||
|
return {
|
||||||
|
allTeam: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
recupTeam: function (team) {
|
||||||
|
console.log('team.addTeam', team);
|
||||||
|
this.allTeam.push(team);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
teamCard,
|
||||||
|
teamAdd
|
||||||
|
},
|
||||||
|
template: `
|
||||||
|
<section>
|
||||||
|
<h2>News form</h2>
|
||||||
|
<div class="team">
|
||||||
|
<teamAdd v-on:teamAjoute="recupTeam"></teamAdd>
|
||||||
|
</div>
|
||||||
|
<teamCard v-for="team in allTeam"
|
||||||
|
:id="team.id"
|
||||||
|
:name="team.name"
|
||||||
|
:description="team.description">
|
||||||
|
</teamCard>
|
||||||
|
</section>
|
||||||
|
`
|
||||||
|
}
|
Loading…
Reference in new issue