|
1 | 1 | <template> |
2 | | - <v-snackbar :style="{ 'margin-bottom': calc_margin(index) }" v-for="(error, index) in errors" :key="index" |
3 | | - v-model="show" color="error" location="bottom right" transition="slide-x-reverse-transition" max-width="30%" |
4 | | - height="20px"> |
| 2 | + <v-snackbar |
| 3 | + :style="{ 'margin-bottom': calc_margin(index) }" |
| 4 | + v-for="(error, index) in errors" |
| 5 | + :key="index" |
| 6 | + v-model="show" |
| 7 | + color="error" |
| 8 | + location="bottom right" |
| 9 | + transition="slide-x-reverse-transition" |
| 10 | + max-width="30%" |
| 11 | + height="20px" |
| 12 | + > |
5 | 13 | <v-row dense class="flex-nowrap"> |
6 | 14 | <v-col cols="auto"> |
7 | 15 | <v-tooltip location="left"> |
8 | 16 | <span> |
9 | 17 | error: {{ error.code }} {{ error.name }}<br /> |
10 | 18 | ressource: {{ error.route }} |
11 | | - <br> |
| 19 | + <br /> |
12 | 20 | </span> |
13 | 21 | <template #activator="{ props }"> |
14 | 22 | <v-icon v-bind="props" color="white" class="justify-right"> |
|
21 | 29 | <v-tooltip location="top"> |
22 | 30 | <span> |
23 | 31 | {{ error.description }} |
24 | | - <br> |
| 32 | + <br /> |
25 | 33 | </span> |
26 | 34 | <template #activator="{ props }"> |
27 | 35 | <div v-bind="props"> |
|
32 | 40 | </v-col> |
33 | 41 | <v-spacer /> |
34 | 42 | <v-col cols="auto"> |
35 | | - <v-btn icon flat size="20" @click="errors_store.delete_error(index)" color="error"> |
| 43 | + <v-btn |
| 44 | + icon |
| 45 | + flat |
| 46 | + size="20" |
| 47 | + @click="errors_store.delete_error(index)" |
| 48 | + color="error" |
| 49 | + > |
36 | 50 | <v-icon icon="mdi-close" size="20" color="white" /> |
37 | 51 | </v-btn> |
38 | 52 | </v-col> |
|
41 | 55 | </template> |
42 | 56 |
|
43 | 57 | <script setup> |
44 | | -const errors_store = use_errors_store() |
45 | | -const { errors } = storeToRefs(errors_store) |
| 58 | + const errors_store = use_errors_store() |
| 59 | + const { errors } = storeToRefs(errors_store) |
46 | 60 |
|
47 | | -const show = true |
| 61 | + const show = true |
48 | 62 |
|
49 | | -function calc_margin (index) { |
50 | | - return (index * 60) + 8 + 'px' |
51 | | -} |
| 63 | + function calc_margin(index) { |
| 64 | + return index * 60 + 8 + "px" |
| 65 | + } |
52 | 66 | </script> |
53 | 67 |
|
54 | 68 | <style scoped> |
55 | | -.v-snackbar :deep(.v-snackbar__content) { |
56 | | - width: 100%; |
57 | | -} |
| 69 | + .v-snackbar :deep(.v-snackbar__content) { |
| 70 | + width: 100%; |
| 71 | + } |
58 | 72 | </style> |
0 commit comments