<script lang="ts" setup>
import { onMounted, ref } from 'vue';

import { useVbenModal } from '@vben/common-ui';

defineOptions({
  name: 'LogView',
});
const modelRef = ref<Record<string, any>>({});

const [Modal, { setState, getData }] = useVbenModal({
  footer: false,
  onOpenChange: async (isOpen: boolean) => {
    if (isOpen) {
      setState({ loading: true });
      const data = getData<Record<string, any>>();
      modelRef.value = { ...data.baseData };

      setState({ loading: false });
    }
  },
  title: '查询日志详情',
});

onMounted(async () => {});
</script>
<template>
  <Modal class="w-[1000px]">
    <pre>{{ modelRef?.content }}</pre>
  </Modal>
</template>
