codevdesign 0.0.28 → 0.0.30
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/csqcEntete.vue +107 -0
- package/index.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-toolbar
|
|
3
|
+
flat
|
|
4
|
+
color="white"
|
|
5
|
+
height="82px"
|
|
6
|
+
>
|
|
7
|
+
<v-row
|
|
8
|
+
class="pt-4"
|
|
9
|
+
@resize="controlAffichage"
|
|
10
|
+
>
|
|
11
|
+
<v-col
|
|
12
|
+
:cols="titreCol"
|
|
13
|
+
class="pr-0 mr-0 pl-5"
|
|
14
|
+
>
|
|
15
|
+
<v-toolbar-title class="titre">
|
|
16
|
+
<!-- Barre de retour -->
|
|
17
|
+
<slot name="retour">
|
|
18
|
+
<v-icon
|
|
19
|
+
v-if="retour"
|
|
20
|
+
size="large"
|
|
21
|
+
start
|
|
22
|
+
color="grisMoyen"
|
|
23
|
+
icon="mdi-arrow-left-thin"
|
|
24
|
+
@click="retournerMenu"
|
|
25
|
+
/></slot>
|
|
26
|
+
|
|
27
|
+
<!-- Titre -->
|
|
28
|
+
<slot name="titre"
|
|
29
|
+
><span class="pl-3"> {{ props.titre }}</span></slot
|
|
30
|
+
>
|
|
31
|
+
|
|
32
|
+
<!-- État -->
|
|
33
|
+
<slot name="etat">
|
|
34
|
+
<span
|
|
35
|
+
v-if="monEtat?.afficher"
|
|
36
|
+
class="pl-10"
|
|
37
|
+
>
|
|
38
|
+
<v-btn
|
|
39
|
+
size="small"
|
|
40
|
+
:color="monEtat.couleur"
|
|
41
|
+
variant="tonal"
|
|
42
|
+
>
|
|
43
|
+
{{ monEtat.texte }}
|
|
44
|
+
</v-btn>
|
|
45
|
+
</span></slot
|
|
46
|
+
>
|
|
47
|
+
</v-toolbar-title>
|
|
48
|
+
</v-col>
|
|
49
|
+
</v-row>
|
|
50
|
+
<!-- Barre en bas -->
|
|
51
|
+
<div style="position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background-color: #808a9d" />
|
|
52
|
+
</v-toolbar>
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<script setup lang="ts">
|
|
56
|
+
import { useRouter } from 'vue-router'
|
|
57
|
+
import { ref, computed } from 'vue'
|
|
58
|
+
|
|
59
|
+
// Déclaration de l'interface
|
|
60
|
+
interface EnteteEtat {
|
|
61
|
+
afficher: boolean
|
|
62
|
+
couleur: string
|
|
63
|
+
texte: string
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const router = useRouter()
|
|
67
|
+
|
|
68
|
+
const props = defineProps<{
|
|
69
|
+
titre: string
|
|
70
|
+
retour?: string
|
|
71
|
+
etat?: EnteteEtat
|
|
72
|
+
}>()
|
|
73
|
+
|
|
74
|
+
const titreCol = ref(12)
|
|
75
|
+
|
|
76
|
+
// État calculé basé sur la prop, avec fallback
|
|
77
|
+
const monEtat = computed<EnteteEtat>(() => {
|
|
78
|
+
return (
|
|
79
|
+
props.etat ?? {
|
|
80
|
+
afficher: false,
|
|
81
|
+
couleur: 'primary',
|
|
82
|
+
texte: 'test',
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
function retournerMenu() {
|
|
88
|
+
if (props.retour) {
|
|
89
|
+
router.push({ name: props.retour })
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function controlAffichage() {
|
|
94
|
+
// logique à l’événement de redimensionnement
|
|
95
|
+
}
|
|
96
|
+
</script>
|
|
97
|
+
<style lang="css" scoped>
|
|
98
|
+
.titre {
|
|
99
|
+
font-size: 1.85rem;
|
|
100
|
+
color: #223654;
|
|
101
|
+
font-weight: bold;
|
|
102
|
+
margin-bottom: 15px;
|
|
103
|
+
}
|
|
104
|
+
.v-icon:hover {
|
|
105
|
+
color: #095797 !important;
|
|
106
|
+
}
|
|
107
|
+
</style>
|
package/index.ts
CHANGED
|
@@ -11,6 +11,7 @@ import csqcConfirmation from './composants/csqcConfirmation.vue'
|
|
|
11
11
|
import csqcTable from './composants/csqcTable/csqcTable.vue'
|
|
12
12
|
import csqcChaise from './composants/csqcChaise/chaiseConteneur.vue'
|
|
13
13
|
import csqcAide from './composants/csqcAide.vue'
|
|
14
|
+
import csqcEntete from './composants/csqcEntete.vue'
|
|
14
15
|
|
|
15
16
|
import Utilisateur from './modeles/utilisateur'
|
|
16
17
|
import Unite from './modeles/unite'
|
|
@@ -45,6 +46,7 @@ export {
|
|
|
45
46
|
pivFooter,
|
|
46
47
|
pivEntete,
|
|
47
48
|
csqcAide,
|
|
49
|
+
csqcEntete,
|
|
48
50
|
Utilisateur,
|
|
49
51
|
Unite,
|
|
50
52
|
Intervention,
|