<template>
  <div class="empty">
    <n-empty v-if="show" :description="title" />
  </div>
</template>
<script setup>
defineOptions({
  name: "empty",
});

const props = defineProps({
  show: {
    type: Boolean,
    default: () => true,
  },
  title: {
    type: [String, undefined],
    default: () => "没有数据了~",
  },
  height: {
    type: [String, Number],
    default: () => 300,
  },
});
</script>

<style>
.empty {
  width: 100%;
  height: 100%;
  flex: 1;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: v-bind (height +'px');
}
</style>
