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
9
  import { defineComponent } from 'vue';
vben authored
10
11
  import { BasicModal } from '/@/components/Modal/index';
  import { Description, useDescription } from '/@/components/Description/index';
12
vben authored
13
  import { useI18n } from '/@/hooks/web/useI18n';
vben authored
14
15
16
  import { ErrorInfo } from '/@/store/modules/error';
vben authored
17
18
19
20
21
22
23
24
25
26
27
28
  import { getDescSchema } from './data';

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