<script setup lang="tsx">
import { PropType, ref } from 'vue'
import { TableData } from '@/api/amld/ProductRiskItem/ProductRiskItem/types'
import { Descriptions, DescriptionsSchema } from '@/components/Descriptions'

const detailSchema = ref<DescriptionsSchema[]>([
  {
    field: 'code',
    label: '编号'
  },
  {
    field: 'wight',
    label: '权重'
  },
  {
    field: 'riskName',
    label: '名称'
  },
  {
    field: 'riskType',
    label: '类型'
  },
  {
    field: 'orderby',
    label: '排序'
  }
])

defineProps({
  currentRow: {
    type: Object as PropType<TableData>,
    default: () => {}
  }
})
</script>

<template>
  <Descriptions :schema="detailSchema" :data="currentRow || {}" />
</template>
