[+] Meta table

This commit is contained in:
Hykilpikonna
2021-12-25 13:17:56 -05:00
parent 68383a7d53
commit b4df0f02ba
+31
View File
@@ -0,0 +1,31 @@
<template>
<table class="meta">
<tr v-for="(v, k) in filteredTable" :key="k">
<td>{{k}}</td>
<td>{{v}}</td>
</tr>
</table>
</template>
<script lang="ts">
import {Options, Vue} from 'vue-class-component';
import {Prop} from "vue-property-decorator";
@Options({components: {}})
export default class MetaTable extends Vue
{
@Prop({required: true}) table!: {[id: string]: unknown}
get filteredTable(): {[id: string]: unknown}
{
const t = {...this.table}
for (let k in Object.keys(t))
if (!t[k]) delete t[k]
return t
}
}
</script>
<style lang="sass" scoped>
</style>