<template>
  <view>
    <image class="block mx-auto" :style="style" src="/static/empty.svg"></image>
    <view v-if="showText" class="mt-10 text-base text-center text-gray">{{ text }}</view>
  </view>
</template>
<script setup>
import { computed } from 'vue';
const props = defineProps({
  showText: {
    type: Boolean,
    default: true
  },
  size: {
    type: Number,
    default: 200
  },
  text: {
    type: String,
    default: '暂无数据'
  }
})

const style = computed(() => `width: ${props.size}rpx;height:${props.size}rpx`)
</script>
<style>
.block {
  display: block;
}
</style>