From e52597ede42627421843e0d57677c90eb1cd061f Mon Sep 17 00:00:00 2001 From: onresize Date: Mon, 8 Jul 2024 14:30:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E6=89=93=E5=AD=97=E6=9C=BA?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=A1=A8=E6=83=85=E3=80=81=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=3F=E5=9B=BE=E6=A0=87=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vuepress/utils/print.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/.vuepress/utils/print.js b/docs/.vuepress/utils/print.js index 611fa58..6a834ae 100644 --- a/docs/.vuepress/utils/print.js +++ b/docs/.vuepress/utils/print.js @@ -82,13 +82,14 @@ // }).print(); const autoWriting = (index = 0) => { - let str = 'Hi there 👋, Welcome to my blog!' + let str = 'Hi there ✋, Welcome to my blog!' const dom = document.getElementById('main-title') let ret = '' if (index < str.length) { - ret += str[index] - if (!dom?.innerHTML) return - dom.innerHTML += ret + // ret += str[index] + ret += str.charAt(index) + if (!dom?.textContent) return + dom.textContent += ret setTimeout(autoWriting, 80, ++index) } }