From ef70576f4b624319acdc5eb713de260e71144b6c Mon Sep 17 00:00:00 2001 From: JianMiau Date: Fri, 15 May 2026 23:11:41 +0800 Subject: [PATCH] =?UTF-8?q?Word=20=E9=A0=90=E8=A6=BD=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E6=89=8B=E6=A9=9F=E5=8F=AA=E8=83=BD=E7=9C=8B=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E9=A0=81=E3=80=81=E8=BC=89=E5=85=A5=E4=B8=AD=E9=81=AE?= =?UTF-8?q?=E7=BD=A9=E7=84=A1=E6=B3=95=E9=97=9C=E9=96=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 預覽面板新增「開新分頁」按鈕,手機可完整瀏覽所有頁面 - 修正 [hidden] 被 CSS display:flex 覆蓋導致載入中遮罩卡住的問題 - 改用 generation counter 取代 AbortController signal 判斷載入狀態 Co-Authored-By: Claude Sonnet 4.6 --- public/app.js | 3 +++ public/index.html | 5 ++++- public/styles.css | 18 +++++++++++++++++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/public/app.js b/public/app.js index 59ae8fe..1151163 100644 --- a/public/app.js +++ b/public/app.js @@ -8,6 +8,7 @@ const resultTitle = document.querySelector('#resultTitle'); const connectionStatus = document.querySelector('#connectionStatus'); const previewFrame = document.querySelector('#previewFrame'); const previewLoading = document.querySelector('#previewLoading'); +const previewOpenBtn = document.querySelector('#previewOpenBtn'); let currentPdfBlob = null; let currentPdfFileName = '租屋契約.pdf'; @@ -168,6 +169,8 @@ async function loadPreview() { if (previewBlobUrl) URL.revokeObjectURL(previewBlobUrl); previewBlobUrl = URL.createObjectURL(blob); previewFrame.src = `${previewBlobUrl}#toolbar=0`; + previewOpenBtn.href = previewBlobUrl; + previewOpenBtn.hidden = false; } catch { // AbortError 或其他錯誤都忽略,交給 finally 處理 } finally { diff --git a/public/index.html b/public/index.html index 08d2cdc..7a4829b 100644 --- a/public/index.html +++ b/public/index.html @@ -81,7 +81,10 @@
-

Word 預覽

+
+

Word 預覽

+ +