35 lines
437 B
Vue
35 lines
437 B
Vue
<template>
|
|
<table>
|
|
<tr v-for="(value, key, i) in dataRows" :key="i">
|
|
<td>{{ key }}</td>
|
|
<td>{{ value }}</td>
|
|
</tr>
|
|
</table>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'HeaderlessKeyValueTable',
|
|
props: {
|
|
dataRows: {
|
|
type: Object,
|
|
default: () => ({}),
|
|
},
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
table {
|
|
width: 100%;
|
|
}
|
|
|
|
td {
|
|
border-bottom: solid #000 1px;
|
|
}
|
|
|
|
tr:nth-child(2n) {
|
|
background: #f0f0f0;
|
|
}
|
|
</style>
|