Dialog.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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>
  10. <div class="d-flex">
  11. <div class="dialog-type flex-column justify-center d-none d-sm-flex">
  12. <h3 class="d-flex"> <slot name="dialogType">Type de la modal</slot></h3>
  13. </div>
  14. <div class="dialog-container">
  15. <v-card-title class="dialog-title">
  16. <slot name="dialogTitle">Titre de la modal</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: #00AD8E;
  53. color: #fff;
  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: 60vh;
  66. overflow: auto;
  67. }
  68. .modal-level-alert{
  69. .dialog-type{
  70. background: #f56954;
  71. }
  72. }
  73. .modal-level-warning{
  74. .dialog-type{
  75. background: #f39c12;
  76. }
  77. }
  78. </style>