From ab933d1896ad8f6776564da70f185d22a3e2fc80 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Wed, 28 Oct 2026 12:57:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E7=AA=97=E4=BD=93=E7=9A=84?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E6=A1=86=E4=B8=8D=E5=86=8D=E8=A2=AB=E6=B5=8F?= =?UTF-8?q?=E8=A7=88=E5=99=A8=E8=87=AA=E5=8A=A8=E5=A1=AB=E4=B8=8A=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E7=9A=84=E7=94=A8=E6=88=B7=E5=90=8D=E5=92=8C=E5=AF=86?= =?UTF-8?q?=E7=A0=81=EF=BC=9A=E8=AE=BE=E4=BA=86=20PasswordChar=20/=20UseSy?= =?UTF-8?q?stemPasswordChar=20=E7=9A=84=E6=96=87=E6=9C=AC=E6=A1=86?= =?UTF-8?q?=E6=94=B9=E6=88=90=E6=99=AE=E9=80=9A=E6=96=87=E6=9C=AC=E6=A1=86?= =?UTF-8?q?=E5=8A=A0=20-webkit-text-security=20=E9=81=AE=E6=88=90=E5=9C=86?= =?UTF-8?q?=E7=82=B9=EF=BC=8C=E6=B5=8F=E8=A7=88=E5=99=A8=E4=B8=8D=E6=8A=8A?= =?UTF-8?q?=E5=AE=83=E5=BD=93=E7=99=BB=E5=BD=95=E8=A1=A8=E5=8D=95=EF=BC=88?= =?UTF-8?q?=E4=B8=8D=E6=94=AF=E6=8C=81=E8=AF=A5=E5=B1=9E=E6=80=A7=E7=9A=84?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E6=89=8D=E9=80=80=E5=9B=9E=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E6=A1=86=E5=B9=B6=E6=A0=87=20new-password=EF=BC=89?= =?UTF-8?q?=EF=BC=9B=E6=96=87=E6=9C=AC=E6=A1=86=E3=80=81=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86=E3=80=81=E8=A1=A8=E6=A0=BC=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=A1=86=E9=83=BD=E5=8A=A0=20autocomplete=3D?= =?UTF-8?q?"off"=EF=BC=8C=E4=B8=8D=E5=BC=B9=E4=BB=A5=E5=89=8D=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E8=BF=87=E7=9A=84=E5=86=85=E5=AE=B9=E3=80=82=E6=89=80?= =?UTF-8?q?=E6=9C=89=E4=BB=BB=E5=8A=A1=E5=85=B1=E7=94=A8=E8=BF=99=E4=B8=AA?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=EF=BC=8C=E9=A1=B9=E7=9B=AE=201=20=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=201=20=E7=9A=84=E7=99=BB=E5=BD=95=E3=80=81=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=94=A8=E6=88=B7=E7=AA=97=E4=BD=93=E9=83=BD=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- web/src/winforms/ControlView.vue | 8 +++++++- web/src/winforms/DataGridViewControl.vue | 1 + web/src/winforms/winforms.css | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/web/src/winforms/ControlView.vue b/web/src/winforms/ControlView.vue index e338a0e..fbfa3e8 100644 --- a/web/src/winforms/ControlView.vue +++ b/web/src/winforms/ControlView.vue @@ -51,6 +51,9 @@ const passwordChar = computed(() => { const ch = p.value.PasswordChar as string | undefined return ch && ch !== '\0' ? ch : '' }) +// 不用 type="password":浏览器见到密码框会把平台登录时保存的用户名、密码自动填进学生窗体,autocomplete="off" 也拦不住。 +// 改用普通文本框加 -webkit-text-security 遮住字符,浏览器不认它是登录表单;不支持这个属性的浏览器才退回密码框,并标成 new-password 不让填 +const textSecurity = typeof CSS !== 'undefined' && CSS.supports('-webkit-text-security', 'disc') // ComboBox:下拉列表挂到页面最外层(和真实 WinForms 一样可以伸出窗体),按控件在屏幕上的位置和缩放摆放 const dropDownOpen = ref(false) @@ -159,7 +162,9 @@ const itemHeight = computed(() => `${(p.value.ItemHeight as number | undefined) /> `${(p.value.ItemHeight as number | undefined)