<template>
  <BasicModal v-bind="$attrs" @register="registerModal" title="文件内容查看" :centered="true" width="80%" :useWrapper="true" :footer="null">
    <div style="background-color: #ececec; padding: 5px">
      <div :style="{ overflow: 'hidden', height: '85vh' }">
        <ShowFileCotent ref="refShowFileCotent" :loading="loading" />
      </div>
    </div>
  </BasicModal>
</template>

<script lang="ts" setup>
  import { ref, nextTick } from 'vue';
  import { BasicModal, useModalInner } from '/@/components/Modal';
  import ShowFileCotent from './ShowFileContent.vue';

  const refShowFileCotent = ref();
  const loading = ref(false);

  const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
    setModalProps({ confirmLoading: false, showCancelBtn: !!data?.showFooter, showOkBtn: !!data?.showFooter });
    refShowFileCotent.value.setDocFile(data?.record);
  });
</script>

<style lang="less" scoped>
  :deep(.ant-input-number) {
    width: 100%;
  }

  :deep(.ant-calendar-picker) {
    width: 100%;
  }
</style>
