feat: header_top : ajout de la class prefixe par --header_top
sur les th
This commit is contained in:
parent
de6b76d92e
commit
9fe1c8a64f
1 changed files with 11 additions and 2 deletions
|
@ -73,7 +73,7 @@
|
|||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th v-for="(label, head, i) in header" :key="'head_' + i" :class="[head, classes[head]]">
|
||||
<th v-for="(label, head, i) in header" :key="'head_' + i" :class="[head, classes[head], header_class_header_top[i] + '--header_top']">
|
||||
<span class="gt_labels">
|
||||
<span v-html="label"></span>
|
||||
<span class="iconeTri">
|
||||
|
@ -259,6 +259,7 @@ const props = defineProps({
|
|||
});
|
||||
let table = ref([]);
|
||||
let header_top = ref({});
|
||||
let header_class_header_top = ref([]);
|
||||
let header = ref([]);
|
||||
let crayons = ref([]);
|
||||
let classes = ref([]);
|
||||
|
@ -490,6 +491,15 @@ function gererConfig(config) {
|
|||
header.value = config.header;
|
||||
if (config.header_top !== undefined) {
|
||||
header_top.value = config.header_top;
|
||||
let r = [];
|
||||
let i = 0;
|
||||
Object.values(config.header_top).forEach((d) => {
|
||||
for (let j = 1; j <= d.colspan; j++ ) {
|
||||
r[i] = d.class;
|
||||
i++;
|
||||
}
|
||||
})
|
||||
header_class_header_top.value = r;
|
||||
}
|
||||
if (config.crayons !== undefined) {
|
||||
crayons.value = config.crayons;
|
||||
|
@ -845,7 +855,6 @@ function genererPDF(quoi = "tableau") {
|
|||
langpdf: props.langpdf,
|
||||
namepdf: props.namepdf,
|
||||
header: header.value,
|
||||
header_top: header_top.value,
|
||||
arg: props.argpdf,
|
||||
Tdata: $tableau,
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue