Dialog.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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">
  12. <slot name="dialogType" />
  13. </h3>
  14. </div>
  15. <div class="dialog-container flex-column flex-grow-1">
  16. <div class="d-flex flex-column">
  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-divider />
  24. <v-card-actions class="justify-center">
  25. <slot name="dialogBtn" />
  26. </v-card-actions>
  27. </div>
  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: 160px;
  54. h3 {
  55. font-size: 25px;
  56. font-weight: normal;
  57. writing-mode: tb-lr;
  58. writing-mode: vertical-lr;
  59. transform: rotate(
  60. -180deg);
  61. padding: 10px;
  62. }
  63. }
  64. .dialog-text-container {
  65. max-height: 70vh;
  66. overflow: auto;
  67. }
  68. .modal-level-alert {
  69. .dialog-type{
  70. background: rgb(var(--v-theme-ot-danger, #f56954));
  71. }
  72. }
  73. .modal-level-warning {
  74. .dialog-type{
  75. background: rgb(var(--v-theme-ot-warning, #f39c12));
  76. }
  77. }
  78. </style>