From 498e8d052641b30136ad91cc4983c7781876f861 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Fri, 6 Sep 2024 15:07:47 +0800 Subject: [PATCH] =?UTF-8?q?OpenWrite=E8=A7=A3=E9=94=81=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E9=AB=98=E5=BA=A6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/OpenWrite.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/OpenWrite.js b/components/OpenWrite.js index cd54c65d20d..973931a80b9 100644 --- a/components/OpenWrite.js +++ b/components/OpenWrite.js @@ -55,9 +55,12 @@ const OpenWrite = () => { // btw初始化后,开始监听read-more-wrap何时消失 const intervalId = setInterval(() => { const readMoreWrapElement = document.getElementById('read-more-wrap') + const articleWrapElement = document.getElementById('article-wrapper') - if (!readMoreWrapElement) { + if (!readMoreWrapElement && articleWrapElement) { toggleTocItems(false) // 恢复目录项的点击 + // 自动调整文章区域的高度 + articleWrapElement.style.height = 'auto' // 停止定时器 clearInterval(intervalId) }