AppReports/src/components/ViewComponent.vue
Timo Hocker d5dc2f933a
All checks were successful
continuous-integration/drone/push Build is passing
fix infinite loop
2020-08-23 19:13:14 +02:00

37 lines
559 B
Vue

<template>
<ChartView
v-if="config.type === 'chart'"
:data="[...data].reverse()"
:xaxis="config.x"
:yaxis="config.y"
/>
<TableView
v-else
:items="data"
:columns="config.columns"
/>
</template>
<script>
import ChartView from './ChartView.vue';
import TableView from './TableView.vue';
export default {
components: { ChartView, TableView },
props: {
config: {
type: Object,
required: true
},
data: {
type: Array,
required: true
}
}
};
</script>
<style>
</style>