-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathVuexGetters.vue
57 lines (51 loc) · 1.04 KB
/
VuexGetters.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<template lang="html">
<div class="columns vvb-margin">
<div class="column is-8 is-offset-2">
<h1>{{ vText }}</h1>
<table class="table is-bordered is-striped is-narrow is-fullwidth">
<thead>
<tr>
<th>ID</th>
<th>Title</th>
<th>Edit</th>
</tr>
</thead>
<tbody>
<tr v-for="user in adultUser">
<th>
{{ user.name }}
</th>
<th>
{{ user.age }}
</th>
<th>
<button class="button is-success" >increase</button>
<button class="button is-danger">Delete</button>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</template>
<script>
import {mapGetters} from 'vuex'
export default {
name: 'VText',
data () {
return {
vText: 'Vuex Getters'
}
},
computed: {
...mapGetters([
'adultUser'
])
}
}
</script>
<style lang="css" scoped >
.vvb-margin{
margin-top: 30px;
}
</style>