Dialog.vue 1.7 KB

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