<template>
  <a-drawer :visible="visible" title="依据详情" placement="right" width="50%" @close="handleClose" destroyOnClose>
    <AuditInnerDetail :basis="basis" ref="refAuditInnerDetail"></AuditInnerDetail>
  </a-drawer>
</template>

<script setup lang="ts">
  import { defineProps, defineEmits, ref,nextTick, } from 'vue';
  import AuditInnerDetail from './AuditInnerDetail.vue';

  const refAuditInnerDetail = ref();

  const props = defineProps({
    visible: {
      type: Boolean,
      default: false,
    },
    basis: {
      type: String,
      default: null,
    },
  });
  const emit = defineEmits(['close']);

  async function open(data) {

    nextTick(() => {
      refAuditInnerDetail.value?.iniData(data);
    });
    
  }

  function handleClose() {
    emit("close");
  }

  defineExpose({ open });

  
</script>
