Dialog.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <!-- Fenêtre de dialogue -->
  2. <template>
  3. <v-dialog
  4. :model-value="show"
  5. persistent
  6. max-width="800"
  7. :content-class="contentClass"
  8. @update:modelValue="console.log($event); $emit($event)"
  9. >
  10. <v-card class="d-flex flex-row">
  11. <div class="dialog-type flex-column justify-center d-none d-sm-flex">
  12. <h3 class="d-flex">
  13. <slot name="dialogType" />
  14. </h3>
  15. </div>
  16. <div class="dialog-container d-flex flex-column flex-grow-1">
  17. <v-card-title class="dialog-title">
  18. <slot name="dialogTitle" />
  19. </v-card-title>
  20. <div class="dialog-text-container">
  21. <slot name="dialogText" />
  22. </div>
  23. <v-spacer />
  24. <v-divider />
  25. <v-card-actions class="justify-center">
  26. <slot name="dialogBtn" />
  27. </v-card-actions>
  28. </div>
  29. </v-card>
  30. </v-dialog>
  31. </template>
  32. <script setup lang="ts">
  33. const props = defineProps({
  34. show: {
  35. type: Boolean,
  36. required: true
  37. },
  38. contentClass: {
  39. type: String,
  40. required: false
  41. }
  42. })
  43. </script>
  44. <style lang="scss" scoped>
  45. .dialog-title {
  46. background: #e6e6e6;
  47. padding-left: 40px;
  48. font-weight: normal;
  49. }
  50. .dialog-type {
  51. background: rgb(var(--v-theme-ot-green, #00AD8E));
  52. color: #fff;
  53. width: 50px;
  54. min-height: 400px;
  55. padding: 25px 10px;
  56. h3 {
  57. font-size: 25px;
  58. font-weight: normal;
  59. writing-mode: vertical-lr;
  60. transform: rotate(-180deg);
  61. }
  62. }
  63. .dialog-text-container {
  64. max-height: 70vh;
  65. overflow: auto;
  66. }
  67. .modal-level-alert {
  68. .dialog-type{
  69. background: rgb(var(--v-theme-ot-danger, #f56954));
  70. }
  71. }
  72. .modal-level-warning {
  73. .dialog-type{
  74. background: rgb(var(--v-theme-ot-warning, #f39c12));
  75. }
  76. }
  77. </style>