This repository has been archived on 2021-09-06. You can view files and clone it, but cannot push or open issues or pull requests.
vuejs_course/2021-03-27_routing-01-start.../src/components/teams/TeamsList.vue

33 lines
484 B
Vue
Raw Normal View History

2021-03-27 20:34:03 +01:00
<template>
2021-04-26 10:09:17 +02:00
<router-view></router-view>
2021-03-27 20:34:03 +01:00
<ul>
<teams-item
v-for="team in teams"
:key="team.id"
2021-03-30 19:53:44 +02:00
:id="team.id"
2021-03-27 20:34:03 +01:00
:name="team.name"
:member-count="team.members.length"
></teams-item>
</ul>
</template>
<script>
import TeamsItem from './TeamsItem.vue';
export default {
components: {
2021-03-30 19:53:44 +02:00
TeamsItem
2021-03-27 20:34:03 +01:00
},
2021-03-30 19:53:44 +02:00
inject: ['teams']
2021-03-27 20:34:03 +01:00
};
</script>
<style scoped>
ul {
list-style: none;
margin: 2rem auto;
max-width: 40rem;
padding: 0;
}
2021-03-30 19:53:44 +02:00
</style>