-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
index.vue
39 lines (35 loc) · 923 Bytes
/
index.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<template>
<section class="pa4">
<div class="bg-white-90 pa4">
<div class="f1">
Nuxt TypeScript Starter
</div>
<div class="f3">
Selected Person: {{ selectedPerson.first_name }} {{ selectedPerson.last_name }}
</div>
{{ selected }}
</div>
<div class="flex flex-wrap ph2 justify-between bg-white-80">
<div v-for="person in people" :key="person.id">
<Card :person="person" />
</div>
</div>
</section>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import { namespace } from 'vuex-class'
import Card from '~/components/Card.vue'
import * as people from '~/store/modules/people'
const People = namespace(people.name)
@Component({
components: {
Card
}
})
export default class IndexPage extends Vue {
@People.State selected
@People.State people
@People.Getter selectedPerson
}
</script>