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); }