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