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

const detailSchema = ref<DescriptionsSchema[]>([
  {
    field: 'modelCode',
    label: '模型编码'
  },
  {
    field: 'ruleId',
    label: '规则编码'
  },
  {
    field: 'field',
    label: '字段'
  },
  {
    field: 'name',
    label: '名称'
  },
  {
    field: 'parameters',
    label: '默认值'
  },
  {
    field: 'format',
    label: '参数格式化'
  },
  {
    field: 'paramType',
    label: '参数类型'
  }
])

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

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