This commit is contained in:
Timo Hocker 2020-01-21 18:25:35 +01:00
parent 207c7c3ba9
commit a8223d110b
2 changed files with 6 additions and 22 deletions

View File

@ -8,7 +8,12 @@
:key="key"
>{{value}}</th>
</tr>
<Item v-for="(row,rowKey) in json.data" :key=rowKey :data=row :hidden=json.hidden></Item>
<tr v-for="(row,rowKey) in json.data" :key=rowKey>
<td
v-for="(value,key) in row.filter((val,ind)=>!json.hidden.includes(ind))"
:key="key"
>{{value}}</td>
</tr>
</table>
</div>
<br />

View File

@ -1,21 +0,0 @@
<template>
<tr id="item">
<td
v-for="(value,key) in data.filter((val,ind)=>!hidden.includes(ind))"
:key="key"
>{{value}}</td>
</tr>
</template>
<script>
export default {
name: "Item",
properties: {
data: Object,
hidden: Array
}
};
</script>
<style scoped>
</style>