cosmos-explorer/src/components/dynamic/ObjectElement.vue
2023-04-06 09:48:59 +08:00

19 lines
591 B
Vue

<script lang="ts" setup>
import DynamicComponent from './DynamicComponent.vue';
import {select} from './index'
const props = defineProps(["value"]);
</script>
<template>
<VTable>
<tbody>
<tr v-for="(v, k) of value">
<td class="text-capitalize" style="max-width: 200px;">{{ k }}</td>
<td><div class="overflow-hidden w-auto" style="max-width: 1000px;">
<Component v-if="v" :is="select(v, 'horizontal')" :value="v"></Component></div>
</td>
</tr>
</tbody>
</VTable>
</template>