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

const detailSchema = ref<DescriptionsSchema[]>([
  {
    field: 'dicKey',
    label: '关键字'
  },
  {
    field: 'dicId',
    label: 'ID'
  },
  {
    field: 'dicName',
    label: '名称'
  },
  {
    field: 'dicValue',
    label: '值'
  },
  {
    field: 'parentId',
    label: '父节点ID'
  },
  {
    field: 'description',
    label: '描述'
  },
  {
    field: 'dicStatus',
    label: '状态'
  },
  {
    field: 'dicSort',
    label: '排序'
  },
  {
    field: 'props',
    label: '属性'
  },
  {
    field: 'systemCode',
    label: '系统类型'
  }
])

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

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