@@ -185,6 +187,18 @@ const slots = useSlots()
const searchQuery = ref('')
+// 同一页面上存在大量 type="password" 的凭证字段,Chrome 会把整页当成登录
+// 表单,并把保存的账号灌进第一个文本框(也就是这个搜索框)。改名成搜索语义,
+// 并显式关掉各类自动填充,才能让浏览器不再识别它。
+const searchInputProps = {
+ autocomplete: 'off',
+ autocorrect: 'off',
+ autocapitalize: 'off',
+ spellcheck: 'false',
+ 'data-lpignore': 'true',
+ 'data-1p-ignore': 'true',
+}
+
/** Evaluate dependsOn rule against current form data */
function matchDependsOn(dependsOn) {
if (!dependsOn) return true
diff --git a/assets/admin/src/pages/users/UsersWechatTemplate.vue b/assets/admin/src/pages/users/UsersWechatTemplate.vue
index e2b453b1..ffbd17cc 100644
--- a/assets/admin/src/pages/users/UsersWechatTemplate.vue
+++ b/assets/admin/src/pages/users/UsersWechatTemplate.vue
@@ -56,7 +56,7 @@
diff --git a/assets/admin/src/style.css b/assets/admin/src/style.css
index 13c413a9..c44d82be 100644
--- a/assets/admin/src/style.css
+++ b/assets/admin/src/style.css
@@ -548,3 +548,19 @@
declarations in the cascade — re-assert the brand family/regular weight. */
.fa.fab{font-family:"Font Awesome 5 Brands";font-weight:400}
.fa.far{font-weight:400}
+
+/* 凭证字段(AppSecret / 私钥)一律用 text + CSS 遮蔽渲染。
+ type="password" 会让浏览器把整页判定为登录表单,把保存的账号密码
+ 自动填进顶部的设置项搜索框。 */
+.jio-secret-input,
+.jio-secret-input input {
+ -webkit-text-security: disc;
+ text-security: disc;
+}
+
+.jio-secret-input:focus,
+.jio-secret-input:focus-within,
+.jio-secret-input input:focus {
+ -webkit-text-security: none;
+ text-security: none;
+}