Dialog.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <!-- Fenêtre de dialogue -->
  2. <template>
  3. <v-dialog
  4. v-model="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 lang="ts">
  31. import { defineComponent } from '@nuxtjs/composition-api'
  32. export default defineComponent({
  33. props: {
  34. show: {
  35. type: Boolean,
  36. required: true
  37. },
  38. contentClass: {
  39. type: String,
  40. required: false
  41. }
  42. }
  43. })
  44. </script>
  45. <style lang="scss" scoped>
  46. .dialog-title{
  47. background: #e6e6e6;
  48. padding-left: 40px;
  49. font-weight: normal;
  50. }
  51. .dialog-type{
  52. background: var(--v-ot_green-base, #00AD8E);
  53. color: #fff;
  54. width: 160px;
  55. h3{
  56. font-size: 25px;
  57. font-weight: normal;
  58. writing-mode: tb-lr;
  59. writing-mode: vertical-lr;
  60. transform: rotate(
  61. -180deg);
  62. padding: 10px;
  63. }
  64. }
  65. .dialog-text-container{
  66. max-height: 70vh;
  67. overflow: auto;
  68. }
  69. .modal-level-alert{
  70. .dialog-type{
  71. background: var(--v-ot_danger-base, #f56954);
  72. }
  73. }
  74. .modal-level-warning{
  75. .dialog-type{
  76. background: var(--v-ot_warning-base, #f39c12);
  77. }
  78. }
  79. </style>