From 106eb8ce7bf8cc21118dbcbf6f60a667fa497dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B4=AE=E7=94=9F=EF=BC=88=E5=AD=90=E8=99=9A=EF=BC=89?= <2234839456@qq.com> Date: Thu, 30 Apr 2026 21:39:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20SDK=20=E6=94=B6=E9=9B=86=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=A1=86=E5=AD=97=E7=AC=A6=E6=97=B6=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E5=8C=85=E5=90=AB=20placeholder=20=E5=8D=A0=E4=BD=8D=E6=96=87?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- public/webfont-sdk.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/webfont-sdk.js b/public/webfont-sdk.js index 7836c7f..31cc3c4 100644 --- a/public/webfont-sdk.js +++ b/public/webfont-sdk.js @@ -149,7 +149,10 @@ var WebFont = (function () { function getText(el) { var tag = el.tagName; if (tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT") { - return el.value || ""; + /** 同时收集 value 和 placeholder,确保占位文本的字体也被加载 */ + var val = el.value || ""; + var ph = el.placeholder || ""; + return val + ph; } return el.textContent || ""; }