From df0409fec3ecc83eb3cf32a98cfe335cf843192a Mon Sep 17 00:00:00 2001 From: Yvv Date: Sat, 28 Feb 2026 22:42:58 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20d=C3=A9roulant=20sommaire=20PDF=20:=20onM?= =?UTF-8?q?ounted=20au=20lieu=20de=20import.meta.client?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le $fetch dans import.meta.client ne se ré-exécutait pas après hydratation SSR. onMounted garantit l'exécution côté client après le montage du composant. Co-Authored-By: Claude Opus 4.6 --- app/pages/admin/book/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/pages/admin/book/index.vue b/app/pages/admin/book/index.vue index 56b7057..6e34e74 100644 --- a/app/pages/admin/book/index.vue +++ b/app/pages/admin/book/index.vue @@ -155,11 +155,11 @@ function setChapterPage(slug: string, val: string) { } // Charger le sommaire PDF côté client via l'API serveur -if (import.meta.client) { +onMounted(() => { $fetch>('/api/admin/pdf-outline') .then((data) => { pdfOutline.value = data }) - .catch(() => {}) -} + .catch((err) => { console.warn('PDF outline load failed:', err) }) +}) async function savePdfConfig() { if (!bookConfig.value) return