Blame view

src/views/sys/error-log/DetailModal.vue 1.01 KB
vben authored
1
<template>
2
  <BasicModal :width="800" :title="t('sys.errorLog.tableActionDesc')" v-bind="$attrs">
vben authored
3
4
5
6
    <Description :data="info" @register="register" />
  </BasicModal>
</template>
<script lang="ts">
7
  import type { PropType } from 'vue';
Vben authored
8
  import type { ErrorLogInfo } from '/#/store';
vben authored
9
10
  import { defineComponent } from 'vue';
vben authored
11
12
  import { BasicModal } from '/@/components/Modal/index';
  import { Description, useDescription } from '/@/components/Description/index';
13
vben authored
14
  import { useI18n } from '/@/hooks/web/useI18n';
vben authored
15
vben authored
16
17
18
19
20
21
22
  import { getDescSchema } from './data';

  export default defineComponent({
    name: 'ErrorLogDetailModal',
    components: { BasicModal, Description },
    props: {
      info: {
Vben authored
23
        type: Object as PropType<ErrorLogInfo>,
vben authored
24
25
26
27
        default: null,
      },
    },
    setup() {
28
      const { t } = useI18n();
29
vben authored
30
31
      const [register] = useDescription({
        column: 2,
Vben authored
32
        schema: getDescSchema()!,
vben authored
33
      });
34
vben authored
35
36
      return {
        register,
vben authored
37
38
        useI18n,
        t,
vben authored
39
40
41
42
      };
    },
  });
</script>