codevdesign 0.0.73 → 0.0.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/composants/csqcEditeurTexteRiche.vue +318 -318
- package/composants/csqcEntete.vue +158 -158
- package/composants/csqcRecherche.vue +206 -206
- package/composants/csqcTable/csqcTable.vue +385 -385
- package/composants/csqcTiroir.vue +155 -155
- package/index.ts +71 -71
- package/package.json +1 -1
|
@@ -1,158 +1,158 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-app-bar
|
|
3
|
-
color="white"
|
|
4
|
-
class="px-0 mx-0"
|
|
5
|
-
:style="{ position: 'sticky' }"
|
|
6
|
-
height="82px"
|
|
7
|
-
>
|
|
8
|
-
<v-row
|
|
9
|
-
class="pt-2"
|
|
10
|
-
@resize="controlAffichage"
|
|
11
|
-
>
|
|
12
|
-
<v-col
|
|
13
|
-
:cols="titreCol"
|
|
14
|
-
class="pr-0 mr-0 pl-5"
|
|
15
|
-
>
|
|
16
|
-
<v-toolbar-title class="titre">
|
|
17
|
-
<!-- Barre de retour -->
|
|
18
|
-
<slot name="retour">
|
|
19
|
-
<v-icon
|
|
20
|
-
v-if="retour"
|
|
21
|
-
size="large"
|
|
22
|
-
start
|
|
23
|
-
color="grisMoyen"
|
|
24
|
-
icon="mdi-arrow-left-thin"
|
|
25
|
-
@click="retournerMenu"
|
|
26
|
-
/></slot>
|
|
27
|
-
|
|
28
|
-
<div class="titre-bloc">
|
|
29
|
-
<!-- Titre -->
|
|
30
|
-
<slot name="titre"
|
|
31
|
-
><span class="pl-3"> {{ props.titre }}</span></slot
|
|
32
|
-
>
|
|
33
|
-
|
|
34
|
-
<!-- État -->
|
|
35
|
-
<slot name="etat">
|
|
36
|
-
<span
|
|
37
|
-
v-if="monEtat?.afficher"
|
|
38
|
-
class="pl-10"
|
|
39
|
-
>
|
|
40
|
-
<v-btn
|
|
41
|
-
size="small"
|
|
42
|
-
:color="monEtat.couleur"
|
|
43
|
-
variant="tonal"
|
|
44
|
-
>
|
|
45
|
-
{{ monEtat.texte }}
|
|
46
|
-
</v-btn>
|
|
47
|
-
</span></slot
|
|
48
|
-
>
|
|
49
|
-
<!-- État secondaire-->
|
|
50
|
-
<slot name="etatSecondaire">
|
|
51
|
-
<span
|
|
52
|
-
v-if="monEtatSecondaire?.afficher"
|
|
53
|
-
class="pl-3"
|
|
54
|
-
>
|
|
55
|
-
<v-btn
|
|
56
|
-
size="small"
|
|
57
|
-
:color="monEtatSecondaire.couleur"
|
|
58
|
-
variant="tonal"
|
|
59
|
-
>
|
|
60
|
-
{{ monEtatSecondaire.texte }}
|
|
61
|
-
</v-btn>
|
|
62
|
-
</span></slot
|
|
63
|
-
>
|
|
64
|
-
<!-- Sous-titre -->
|
|
65
|
-
<slot name="soustitre"
|
|
66
|
-
><span class="pl-3 soustitre"> {{ props.soustitre }}</span></slot
|
|
67
|
-
>
|
|
68
|
-
</div>
|
|
69
|
-
</v-toolbar-title>
|
|
70
|
-
</v-col>
|
|
71
|
-
</v-row>
|
|
72
|
-
<!-- Barre en bas -->
|
|
73
|
-
<div style="position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background-color: #808a9d" />
|
|
74
|
-
</v-app-bar>
|
|
75
|
-
</template>
|
|
76
|
-
|
|
77
|
-
<script setup lang="ts">
|
|
78
|
-
import { useRouter } from 'vue-router'
|
|
79
|
-
import { ref, computed } from 'vue'
|
|
80
|
-
|
|
81
|
-
// Déclaration de l'interface
|
|
82
|
-
interface EnteteEtat {
|
|
83
|
-
afficher: boolean
|
|
84
|
-
couleur: string
|
|
85
|
-
texte: string
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
interface EnteteEtatSecondaire {
|
|
89
|
-
afficher: boolean
|
|
90
|
-
couleur: string
|
|
91
|
-
texte: string
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
const router = useRouter()
|
|
95
|
-
|
|
96
|
-
const props = defineProps<{
|
|
97
|
-
titre: string
|
|
98
|
-
soustitre?: string
|
|
99
|
-
retour?: string
|
|
100
|
-
etat?: EnteteEtat
|
|
101
|
-
etatSecondaire?: EnteteEtatSecondaire
|
|
102
|
-
}>()
|
|
103
|
-
|
|
104
|
-
const titreCol = ref(12)
|
|
105
|
-
|
|
106
|
-
// État calculé basé sur la prop, avec fallback
|
|
107
|
-
const monEtat = computed<EnteteEtat>(() => {
|
|
108
|
-
return (
|
|
109
|
-
props.etat ?? {
|
|
110
|
-
afficher: false,
|
|
111
|
-
couleur: 'primary',
|
|
112
|
-
texte: 'test',
|
|
113
|
-
}
|
|
114
|
-
)
|
|
115
|
-
})
|
|
116
|
-
|
|
117
|
-
const monEtatSecondaire = computed<EnteteEtatSecondaire>(() => {
|
|
118
|
-
return (
|
|
119
|
-
props.etatSecondaire ?? {
|
|
120
|
-
afficher: false,
|
|
121
|
-
couleur: 'primary',
|
|
122
|
-
texte: 'test',
|
|
123
|
-
}
|
|
124
|
-
)
|
|
125
|
-
})
|
|
126
|
-
|
|
127
|
-
function retournerMenu() {
|
|
128
|
-
if (props.retour) {
|
|
129
|
-
router.push({ name: props.retour })
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
function controlAffichage() {
|
|
134
|
-
// logique à l’événement de redimensionnement
|
|
135
|
-
}
|
|
136
|
-
</script>
|
|
137
|
-
<style lang="css" scoped>
|
|
138
|
-
.titre {
|
|
139
|
-
font-size: 1.85rem;
|
|
140
|
-
color: #223654;
|
|
141
|
-
font-weight: bold;
|
|
142
|
-
margin-bottom: 15px;
|
|
143
|
-
}
|
|
144
|
-
.soustitre {
|
|
145
|
-
display: block;
|
|
146
|
-
font-size: 1rem;
|
|
147
|
-
color: #223654;
|
|
148
|
-
font-weight: normal;
|
|
149
|
-
}
|
|
150
|
-
.titre-bloc {
|
|
151
|
-
display: inline-block;
|
|
152
|
-
vertical-align: middle;
|
|
153
|
-
padding-left: 12px;
|
|
154
|
-
}
|
|
155
|
-
.v-icon:hover {
|
|
156
|
-
color: #095797 !important;
|
|
157
|
-
}
|
|
158
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<v-app-bar
|
|
3
|
+
color="white"
|
|
4
|
+
class="px-0 mx-0"
|
|
5
|
+
:style="{ position: 'sticky' }"
|
|
6
|
+
height="82px"
|
|
7
|
+
>
|
|
8
|
+
<v-row
|
|
9
|
+
class="pt-2"
|
|
10
|
+
@resize="controlAffichage"
|
|
11
|
+
>
|
|
12
|
+
<v-col
|
|
13
|
+
:cols="titreCol"
|
|
14
|
+
class="pr-0 mr-0 pl-5"
|
|
15
|
+
>
|
|
16
|
+
<v-toolbar-title class="titre">
|
|
17
|
+
<!-- Barre de retour -->
|
|
18
|
+
<slot name="retour">
|
|
19
|
+
<v-icon
|
|
20
|
+
v-if="retour"
|
|
21
|
+
size="large"
|
|
22
|
+
start
|
|
23
|
+
color="grisMoyen"
|
|
24
|
+
icon="mdi-arrow-left-thin"
|
|
25
|
+
@click="retournerMenu"
|
|
26
|
+
/></slot>
|
|
27
|
+
|
|
28
|
+
<div class="titre-bloc">
|
|
29
|
+
<!-- Titre -->
|
|
30
|
+
<slot name="titre"
|
|
31
|
+
><span class="pl-3"> {{ props.titre }}</span></slot
|
|
32
|
+
>
|
|
33
|
+
|
|
34
|
+
<!-- État -->
|
|
35
|
+
<slot name="etat">
|
|
36
|
+
<span
|
|
37
|
+
v-if="monEtat?.afficher"
|
|
38
|
+
class="pl-10"
|
|
39
|
+
>
|
|
40
|
+
<v-btn
|
|
41
|
+
size="small"
|
|
42
|
+
:color="monEtat.couleur"
|
|
43
|
+
variant="tonal"
|
|
44
|
+
>
|
|
45
|
+
{{ monEtat.texte }}
|
|
46
|
+
</v-btn>
|
|
47
|
+
</span></slot
|
|
48
|
+
>
|
|
49
|
+
<!-- État secondaire-->
|
|
50
|
+
<slot name="etatSecondaire">
|
|
51
|
+
<span
|
|
52
|
+
v-if="monEtatSecondaire?.afficher"
|
|
53
|
+
class="pl-3"
|
|
54
|
+
>
|
|
55
|
+
<v-btn
|
|
56
|
+
size="small"
|
|
57
|
+
:color="monEtatSecondaire.couleur"
|
|
58
|
+
variant="tonal"
|
|
59
|
+
>
|
|
60
|
+
{{ monEtatSecondaire.texte }}
|
|
61
|
+
</v-btn>
|
|
62
|
+
</span></slot
|
|
63
|
+
>
|
|
64
|
+
<!-- Sous-titre -->
|
|
65
|
+
<slot name="soustitre"
|
|
66
|
+
><span class="pl-3 soustitre"> {{ props.soustitre }}</span></slot
|
|
67
|
+
>
|
|
68
|
+
</div>
|
|
69
|
+
</v-toolbar-title>
|
|
70
|
+
</v-col>
|
|
71
|
+
</v-row>
|
|
72
|
+
<!-- Barre en bas -->
|
|
73
|
+
<div style="position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background-color: #808a9d" />
|
|
74
|
+
</v-app-bar>
|
|
75
|
+
</template>
|
|
76
|
+
|
|
77
|
+
<script setup lang="ts">
|
|
78
|
+
import { useRouter } from 'vue-router'
|
|
79
|
+
import { ref, computed } from 'vue'
|
|
80
|
+
|
|
81
|
+
// Déclaration de l'interface
|
|
82
|
+
interface EnteteEtat {
|
|
83
|
+
afficher: boolean
|
|
84
|
+
couleur: string
|
|
85
|
+
texte: string
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
interface EnteteEtatSecondaire {
|
|
89
|
+
afficher: boolean
|
|
90
|
+
couleur: string
|
|
91
|
+
texte: string
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const router = useRouter()
|
|
95
|
+
|
|
96
|
+
const props = defineProps<{
|
|
97
|
+
titre: string
|
|
98
|
+
soustitre?: string
|
|
99
|
+
retour?: string
|
|
100
|
+
etat?: EnteteEtat
|
|
101
|
+
etatSecondaire?: EnteteEtatSecondaire
|
|
102
|
+
}>()
|
|
103
|
+
|
|
104
|
+
const titreCol = ref(12)
|
|
105
|
+
|
|
106
|
+
// État calculé basé sur la prop, avec fallback
|
|
107
|
+
const monEtat = computed<EnteteEtat>(() => {
|
|
108
|
+
return (
|
|
109
|
+
props.etat ?? {
|
|
110
|
+
afficher: false,
|
|
111
|
+
couleur: 'primary',
|
|
112
|
+
texte: 'test',
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
const monEtatSecondaire = computed<EnteteEtatSecondaire>(() => {
|
|
118
|
+
return (
|
|
119
|
+
props.etatSecondaire ?? {
|
|
120
|
+
afficher: false,
|
|
121
|
+
couleur: 'primary',
|
|
122
|
+
texte: 'test',
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
function retournerMenu() {
|
|
128
|
+
if (props.retour) {
|
|
129
|
+
router.push({ name: props.retour })
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function controlAffichage() {
|
|
134
|
+
// logique à l’événement de redimensionnement
|
|
135
|
+
}
|
|
136
|
+
</script>
|
|
137
|
+
<style lang="css" scoped>
|
|
138
|
+
.titre {
|
|
139
|
+
font-size: 1.85rem;
|
|
140
|
+
color: #223654;
|
|
141
|
+
font-weight: bold;
|
|
142
|
+
margin-bottom: 15px;
|
|
143
|
+
}
|
|
144
|
+
.soustitre {
|
|
145
|
+
display: block;
|
|
146
|
+
font-size: 1rem;
|
|
147
|
+
color: #223654;
|
|
148
|
+
font-weight: normal;
|
|
149
|
+
}
|
|
150
|
+
.titre-bloc {
|
|
151
|
+
display: inline-block;
|
|
152
|
+
vertical-align: middle;
|
|
153
|
+
padding-left: 12px;
|
|
154
|
+
}
|
|
155
|
+
.v-icon:hover {
|
|
156
|
+
color: #095797 !important;
|
|
157
|
+
}
|
|
158
|
+
</style>
|