<script setup lang="ts">
import { computed } from 'vue';
import BasicDescriptions from '../BasicDescriptions';
import { goodColumns, goodHasChildColumns } from './columns';

 const props = defineProps<{ data?: any; num?: number }>()

 const columns = computed(() => {
     const baseColumns = props.data?.is_combind == '1' ? goodHasChildColumns : goodColumns
     return [...baseColumns, ...(props.num ? [{ label: '操作数量', render: () => props.num, span: 24 }] : [])]
 })
</script>


<template>
    <BasicDescriptions :columns="columns" :data="data" />
</template>