<template>
  <div class="comp-content">
    <el-dialog
      :title="diaTitle"
      @open="openFun"
      draggable
      append-to-body
      v-bind="$attrs"
    >
      <template v-for="(name) in Object.keys($slots)" :key="name" #[name]="scope">
        <slot :name="name" v-bind="scope" />
      </template>
    </el-dialog>
    <!-- <vxe-modal
      :title="diaTitle"
      show-zoom
      resize
      v-bind="$attrs"
    >
      <template v-for="(name) in Object.keys($slots)" :key="name" #[name]="scope">
        <slot :name="name" v-bind="scope" />
      </template>
    </vxe-modal> -->
  </div>
</template>

<script setup lang="ts">
interface Props {
  diaTitle: string;
}

withDefaults(defineProps<Props>(), {
  diaTitle: '',
});

const emit = defineEmits(['show']);
const openFun = () => { // 兼容vxe-modal
  emit('show');
};
</script>
