index.vue 821 Bytes
<script lang="ts" setup>
  import { useDescription, Description } from '/@/components/Description';
  import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
  import { schemas } from './config';
  import { ModalParamsType } from '/#/utils';
  import { TaskRecordType } from '/@/api/task/model';
  defineEmits(['register']);

  const [registerDrawer] = useDrawerInner((data: ModalParamsType<TaskRecordType>) => {
    const { record } = data;
    setDescProps({ data: record });
  });

  const [registerDescription, { setDescProps }] = useDescription({
    schema: schemas,
    labelStyle: { width: '120px' },
    column: 1,
  });
</script>

<template>
  <BasicDrawer title="任务详情" @register="registerDrawer" width="30%">
    <Description @register="registerDescription" />
  </BasicDrawer>
</template>