Newer
Older
KaiFengPC / src / components / Empty / index.vue
@zhangdeliang zhangdeliang on 23 May 869 bytes 初始化项目
<template>
  <div class="empty flex flex-v flex-align-center flex-justcontent-center">
    <img :src="emptySrc" class="emptySrc" :style="{ width: width + 'px', height: height + 'px' }" />
    <div class="empty-text">{{ emptyText }}</div>
  </div>
</template>
<script setup>
import emptySrc from '@/assets/images/setting/empty.png';
const props = defineProps({
  //空数据文本
  emptyText: {
    type: String,
    default: '暂无数据...',
  },
  width: {
    type: Number,
    default: 220,
  },
  height: {
    type: Number,
    default: 220,
  },
});
</script>
<style scoped lang="scss">
.empty {
  width: 100%;
  .emptySrc {
  }
  .empty-text {
    font-size: 17px;
    font-family: Source Han Sans CN-Regular, Source Han Sans CN;
    font-weight: 400;
    color: #6a8dda;
    line-height: 29px;
    position: absolute;
    margin-bottom: 20px;
  }
}
</style>