From ab1b666aaee6c6375464100a8c94e367ef610dee Mon Sep 17 00:00:00 2001 From: tofulm Date: Thu, 12 Dec 2024 13:56:26 +0100 Subject: [PATCH] feat: ajout une nouvelle cle : header_top qui permet d'ajouter un th>tr pour des entetes de groupe de colonne via des colspan ``` "header_top":{ "Mais c'est qui ?": {"class":"descriptif text-center", "colspan" :5}, "Choix": {"class":"choix text-center", "colspan" :2} } ``` --- json_gamutable.json.html | 4 ++++ src/components/gamuTable.vue | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/json_gamutable.json.html b/json_gamutable.json.html index 4bda44a..b68fae7 100644 --- a/json_gamutable.json.html +++ b/json_gamutable.json.html @@ -1,6 +1,10 @@ #HTTP_HEADER{Content-Type: application/json; charset=#CHARSET} [(#ENV{id}|setenv{id_article})] [{ +"header_top":{ +"Mais c'est qui ?": {"class":"descriptif text-center", "colspan" :5}, +"Choix": {"class":"choix text-center", "colspan" :2} +}, "header":{ "id": "_", "titre": "titre", diff --git a/src/components/gamuTable.vue b/src/components/gamuTable.vue index b5c9ecf..002d9d6 100644 --- a/src/components/gamuTable.vue +++ b/src/components/gamuTable.vue @@ -64,8 +64,15 @@
+ + + + +
+ +
@@ -252,6 +259,7 @@ const props = defineProps({ }, }); let table = ref([]); +let header_top = ref({}); let header = ref([]); let crayons = ref([]); let classes = ref([]); @@ -481,6 +489,9 @@ watch( //~~~~~~~~~~~~~~~~~~~~~~~~~ function gererConfig(config) { header.value = config.header; + if (config.header_top !== undefined) { + header_top.value = config.header_top; + } if (config.crayons !== undefined) { crayons.value = config.crayons; } @@ -728,6 +739,7 @@ function chargerJson(id) { function saveHeader() { let $header = { header: header.value, + header_top: header_top.value, crayons: crayons.value, classes: classes.value, filtreCol: filtreColType.value, @@ -834,6 +846,7 @@ function genererPDF(quoi = "tableau") { langpdf: props.langpdf, namepdf: props.namepdf, header: header.value, + header_top: header_top.value, arg: props.argpdf, Tdata: $tableau, };