RecordDetailDrawer.vue
943 Bytes
<template>
<BasicDrawer v-bind="$attrs" @register="registerDrawer" :title="t('common.viewText')" width="35%">
<Description :column="3" size="middle" @register="registerDesc" />
</BasicDrawer>
</template>
<script lang="ts" setup>
import { formSchema } from './config';
import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
import { Description } from '/@/components/Description/index';
import { useDescription } from '/@/components/Description';
import { useI18n } from 'vue-i18n';
defineEmits(['success', 'register']);
const { t } = useI18n();
const [registerDesc, { setDescProps }] = useDescription({
schema: formSchema,
column: 2,
layout: 'vertical',
});
const [registerDrawer, { setDrawerProps }] = useDrawerInner(async (data) => {
setDrawerProps({ confirmLoading: true });
setDescProps({ data: data.record });
setDrawerProps({ confirmLoading: false });
});
</script>