|
|
|
@ -5,7 +5,7 @@
|
|
|
|
|
<head>
|
|
|
|
|
<title>My awesome team</title>
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="/css/style.css" />
|
|
|
|
|
<link rel="stylesheet" href="./css/style.css" />
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body>
|
|
|
|
@ -16,22 +16,23 @@
|
|
|
|
|
<team-add @add-team="addTeam"></team-add>
|
|
|
|
|
</div>
|
|
|
|
|
<teamcard v-for="team in allTeam"
|
|
|
|
|
:id="team.id"
|
|
|
|
|
:name="team.name"
|
|
|
|
|
:description="team.description">
|
|
|
|
|
:id="team.id"
|
|
|
|
|
:name="team.name"
|
|
|
|
|
:description="team.description">
|
|
|
|
|
</teamcard>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script src="./src/misc/constant.js"></script>
|
|
|
|
|
<script src="./src/error/required_field_error.js"></script>
|
|
|
|
|
<script src="./src/error/string_size.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="module">
|
|
|
|
|
import { createApp } from 'https://unpkg.com/vue@3/dist/vue.esm-browser.js';
|
|
|
|
|
|
|
|
|
|
import Navbar from '/src/view/navbar.js';
|
|
|
|
|
import TeamAdd from '/src/view/team_add.js';
|
|
|
|
|
import Teamcard from '/src/view/teamcard.js';
|
|
|
|
|
import Navbar from './src/view/navbar.js';
|
|
|
|
|
import TeamAdd from './src/view/team_add.js';
|
|
|
|
|
import Teamcard from './src/view/teamcard.js';
|
|
|
|
|
|
|
|
|
|
const app = createApp({
|
|
|
|
|
data() {
|
|
|
|
@ -39,16 +40,16 @@
|
|
|
|
|
allTeam: []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods:{
|
|
|
|
|
addTeam: function(team){
|
|
|
|
|
console.log('index.addTeam',team);
|
|
|
|
|
methods: {
|
|
|
|
|
addTeam: function (team) {
|
|
|
|
|
console.log('index.addTeam', team);
|
|
|
|
|
this.allTeam.push(team);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
app.component('Navbar', Navbar)
|
|
|
|
|
.component('TeamAdd', TeamAdd)
|
|
|
|
|
.component('Teamcard',Teamcard);
|
|
|
|
|
.component('TeamAdd', TeamAdd)
|
|
|
|
|
.component('Teamcard', Teamcard);
|
|
|
|
|
app.mount('#app');
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|