displaying stub info
This commit is contained in:
29
src/components/TableView.vue
Normal file
29
src/components/TableView.vue
Normal file
@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<table>
|
||||
<tr
|
||||
v-for="(item,key) of items"
|
||||
:key="key"
|
||||
>
|
||||
<td
|
||||
v-for="i_key of Object.keys(item)"
|
||||
:key="i_key"
|
||||
v-text="item[i_key]"
|
||||
/>
|
||||
</tr>
|
||||
</table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
items: {
|
||||
type: Array,
|
||||
required: true
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
@ -1,8 +1,19 @@
|
||||
<template>
|
||||
<div class="home" />
|
||||
<div class="home">
|
||||
<TableView :items="log" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Vuex from 'vuex';
|
||||
import TableView from '../components/TableView.vue';
|
||||
|
||||
export default {};
|
||||
export default {
|
||||
components: { TableView },
|
||||
computed: { ...Vuex.mapState ({ log: (state) => state.log }) },
|
||||
mounted () {
|
||||
this.get_log ();
|
||||
},
|
||||
methods: { ...Vuex.mapActions ({ get_log: 'get_log' }) }
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user