EmptyState.vue 676 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <div class="empty-state">
  3. <i :class="icon"></i>
  4. <p>{{ text }}</p>
  5. </div>
  6. </template>
  7. <script setup lang="ts">
  8. withDefaults(defineProps<{
  9. icon?: string
  10. text?: string
  11. }>(), {
  12. icon: 'i-mdi-receipt-text-outline',
  13. text: '暂无数据'
  14. })
  15. </script>
  16. <style scoped lang="scss">
  17. .empty-state {
  18. display: flex;
  19. flex-direction: column;
  20. align-items: center;
  21. justify-content: center;
  22. padding: 40px 0;
  23. color: var(--gray);
  24. i {
  25. font-size: 48px;
  26. margin-bottom: 16px;
  27. opacity: 0.5;
  28. color: var(--main-yellow);
  29. }
  30. p {
  31. font-size: var(--font-size-14);
  32. }
  33. }
  34. </style>