Card.vue 999 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <!--
  2. Container de type Card
  3. -->
  4. <template>
  5. <v-card elevation="2" outlined shaped min-height="200">
  6. <!-- Titre -->
  7. <v-card-title>
  8. <slot name="card.title" />
  9. </v-card-title>
  10. <!-- Texte -->
  11. <v-card-text>
  12. <slot name="card.text" />
  13. </v-card-text>
  14. <!-- Actions -->
  15. <v-card-actions>
  16. <v-spacer />
  17. <v-btn :icon="true">
  18. <NuxtLink :to="link" class="no-decoration">
  19. <v-icon>mdi-pencil</v-icon>
  20. </NuxtLink>
  21. </v-btn>
  22. <UiButtonDelete v-if="withDeleteAction" :model="model" :entity="entity" />
  23. <slot name="card.action" />
  24. </v-card-actions>
  25. </v-card>
  26. </template>
  27. <script setup lang="ts">
  28. const props = defineProps({
  29. link: {
  30. type: String,
  31. required: true,
  32. },
  33. model: {
  34. type: Object,
  35. required: true,
  36. },
  37. entity: {
  38. type: Object,
  39. required: true,
  40. },
  41. withDeleteAction: {
  42. type: Boolean,
  43. required: false,
  44. default: true,
  45. },
  46. })
  47. </script>
  48. <style scoped></style>