<script setup lang="tsx">
import { PropType, ref } from 'vue'
import { TableData } from '@/api/system/SysRole/types'
import { Descriptions, DescriptionsSchema } from '@/components/Descriptions'
const detailSchema = ref<DescriptionsSchema[]>([
  {
    field: 'id',
    label: '主键'
  },
  {
    field: 'organId',
    label: '机构号'
  },
  {
    field: 'name',
    label: '角色名称'
  },
  {
    field: 'dataScope',
    label: '权限范围'
  },
  {
    field: 'createBy',
    label: '创建人'
  },
  {
    field: 'createDate',
    label: '创建时间'
  },
  {
    field: 'updateBy',
    label: '最近修改人'
  },
  {
    field: 'updateDate',
    label: '最近修改时间'
  },
  {
    field: 'delFlag',
    label: '逻辑删除标记'
  },
  {
    field: 'remarks',
    label: '描述'
  }
])

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

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