登录页面改造

This commit is contained in:
robin
2026-02-15 01:56:39 +08:00
parent dd396d31b5
commit 468d0eeffc
5 changed files with 525 additions and 109 deletions

View File

@@ -11,9 +11,23 @@ Tea.context(function () {
this.isSubmitting = false
this.refreshPlaceholders = function () {
let usernameInput = document.querySelector("form input[name='username']")
if (usernameInput != null) {
usernameInput.setAttribute("placeholder", "\u8bf7\u8f93\u5165\u8d26\u53f7")
}
let passwordInput = document.querySelector("form input[type='password']")
if (passwordInput != null) {
passwordInput.setAttribute("placeholder", "\u8bf7\u8f93\u5165\u5bc6\u7801")
}
}
this.$delay(function () {
this.$find("form input[name='username']").focus()
this.changePassword()
this.refreshPlaceholders()
// Some UI scripts mutate placeholders after mount; enforce once more.
setTimeout(() => this.refreshPlaceholders(), 200)
});
this.changeUsername = function () {
@@ -56,4 +70,4 @@ Tea.context(function () {
}
})
};
});
});