Newer
Older
KaiFengPC / src / components / Empty / index.vue
@zhangdeliang zhangdeliang on 23 May 869 bytes 初始化项目
  1. <template>
  2. <div class="empty flex flex-v flex-align-center flex-justcontent-center">
  3. <img :src="emptySrc" class="emptySrc" :style="{ width: width + 'px', height: height + 'px' }" />
  4. <div class="empty-text">{{ emptyText }}</div>
  5. </div>
  6. </template>
  7. <script setup>
  8. import emptySrc from '@/assets/images/setting/empty.png';
  9. const props = defineProps({
  10. //空数据文本
  11. emptyText: {
  12. type: String,
  13. default: '暂无数据...',
  14. },
  15. width: {
  16. type: Number,
  17. default: 220,
  18. },
  19. height: {
  20. type: Number,
  21. default: 220,
  22. },
  23. });
  24. </script>
  25. <style scoped lang="scss">
  26. .empty {
  27. width: 100%;
  28. .emptySrc {
  29. }
  30. .empty-text {
  31. font-size: 17px;
  32. font-family: Source Han Sans CN-Regular, Source Han Sans CN;
  33. font-weight: 400;
  34. color: #6a8dda;
  35. line-height: 29px;
  36. position: absolute;
  37. margin-bottom: 20px;
  38. }
  39. }
  40. </style>