DefaultCard.vue 950 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <q-card flat class="users-card q-pa-md">
  3. <div class="card-header q-mb-md">
  4. <h6 class="text-h6 q-ma-none">{{ title }}</h6>
  5. <q-separator />
  6. </div>
  7. <div class="card-content">
  8. <DonutChart :total-users="total" />
  9. </div>
  10. </q-card>
  11. </template>
  12. <script setup>
  13. import DonutChart from "./DonutChart.vue";
  14. defineProps({
  15. total: {
  16. type: Number,
  17. default: 1,
  18. },
  19. title: {
  20. type: String,
  21. default: "",
  22. },
  23. });
  24. </script>
  25. <style scoped>
  26. .users-card {
  27. border-radius: 8px;
  28. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  29. min-height: 250px;
  30. display: flex;
  31. flex-direction: column;
  32. }
  33. .card-header {
  34. text-align: left;
  35. }
  36. .card-content {
  37. flex: 1;
  38. display: flex;
  39. justify-content: center;
  40. align-items: center;
  41. }
  42. body.body--light .users-card {
  43. background: white;
  44. border: 1px solid #e0e0e0;
  45. }
  46. body.body--dark .users-card {
  47. background: #1e1e1e;
  48. border: 1px solid #404040;
  49. }
  50. </style>