Card.vue 1015 B

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