From b2858899c196deb676a5b29b070b56a336f7f5d8 Mon Sep 17 00:00:00 2001 From: BTMuli Date: Tue, 5 Sep 2023 11:29:05 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E5=90=AB?= =?UTF-8?q?=E6=9C=89=E6=8A=98=E5=8F=A0=E6=A1=86=E7=9A=84=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E5=88=86=E4=BA=AB=E5=9B=BE=E9=94=99=E8=AF=AF=E6=B8=B2=E6=9F=93?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/main/t-shareBtn.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/components/main/t-shareBtn.vue b/src/components/main/t-shareBtn.vue index f10b8961..f185e281 100644 --- a/src/components/main/t-shareBtn.vue +++ b/src/components/main/t-shareBtn.vue @@ -1,7 +1,7 @@ @@ -22,7 +22,21 @@ const emit = defineEmits(); async function shareContent(): Promise { emit("update:loading", true); + props.modelValue.querySelectorAll("details").forEach((item) => { + if (item.open) { + item.setAttribute("details-open", ""); + } else { + item.open = true; + } + }); await generateShareImg(props.title, props.modelValue); + props.modelValue.querySelectorAll("details").forEach((item) => { + if (item.hasAttribute("details-open")) { + item.removeAttribute("details-open"); + } else { + item.open = false; + } + }); emit("update:loading", false); }