<template>
  <div>
    <n-modal
      v-model:show="showModal"
      style="width: 80%"
      :show-icon="false"
      preset="dialog"
      :title="title"
    >
      <Info :userId="userId" />
    </n-modal>
  </div>
</template>

<script lang="ts" setup>
  import { ref } from 'vue';
  import Info from './info.vue';

  const showModal = ref(false);
  const title = ref('查询玩家信息');

  interface Props {
    userId?: number | string;
  }
  const props = withDefaults(defineProps<Props>(), { userId: 0 });

  function openDrawer() {
    showModal.value = true;
  }
  defineExpose({ openDrawer });
</script>

<style scoped></style>
