DashboardChartCard.vue 840 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <template>
  2. <q-card flat class="dashboard-chart-card card-ring">
  3. <div class="flex justify-between items-center no-wrap q-mb-sm">
  4. <span class="text-subtitle2 text-weight-regular">{{ title }}</span>
  5. <q-icon :name="icon" color="dark" size="sm" />
  6. </div>
  7. <div class="chart-slot-wrapper">
  8. <slot />
  9. </div>
  10. </q-card>
  11. </template>
  12. <script setup>
  13. const { title, icon } = defineProps({
  14. title: { type: String, required: true },
  15. icon: { type: String, default: "mdi-book-open-blank-variant-outline" },
  16. });
  17. defineEmits(["export"]);
  18. </script>
  19. <style scoped>
  20. .dashboard-chart-card {
  21. border-radius: 12px;
  22. padding: 20px 28px 24px 28px;
  23. display: flex;
  24. flex-direction: column;
  25. max-height: 370px;
  26. }
  27. .chart-slot-wrapper {
  28. flex: 1;
  29. min-height: 220px;
  30. max-height: 300px;
  31. position: relative;
  32. }
  33. </style>