Browse Source

Add metadata box

pull/341/head
Hironsan 5 years ago
parent
commit
71b6857280
1 changed files with 55 additions and 0 deletions
  1. 55
      frontend/components/organisms/MetadataBox.vue

55
frontend/components/organisms/MetadataBox.vue

@ -0,0 +1,55 @@
<template>
<v-card>
<v-data-table
:headers="headers"
:items="metaArray"
item-key="key"
hide-default-footer
disable-pagination
class="elevation-1"
>
</v-data-table>
</v-card>
</template>
<script>
export default {
props: {
metadata: {
type: Object,
default: () => ({}),
required: true
}
},
data() {
return {
headers: [
{
text: 'Key',
align: 'left',
value: 'key'
},
{
text: 'Value',
align: 'left',
value: 'value'
}
]
}
},
computed: {
metaArray() {
const items = []
for (const [key, value] of Object.entries(this.metadata)) {
items.push({
key,
value
})
}
return items
}
}
}
</script>
Loading…
Cancel
Save