fix(login): keep remember-password toggle interactive in draggable header
The login shell sets -webkit-app-region: drag on its frameless header, which captured clicks on the "记住密码" checkbox before v-model could update. Mark .options-row and its descendants as no-drag, and bind the checkbox via :checked + @change so the click reliably reaches the toggle handler. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,10 @@ function toggleMenu() {
|
||||
menuOpen.value = !menuOpen.value;
|
||||
}
|
||||
|
||||
function onRememberChange(event: Event) {
|
||||
rememberPassword.value = (event.target as HTMLInputElement).checked;
|
||||
}
|
||||
|
||||
function handleOutsideClick(event: MouseEvent) {
|
||||
if (!menuOpen.value) return;
|
||||
const root = menuRef.value;
|
||||
@@ -125,7 +129,11 @@ onBeforeUnmount(() => {
|
||||
|
||||
<div class="options-row">
|
||||
<label class="check-label">
|
||||
<input type="checkbox" v-model="rememberPassword" />
|
||||
<input
|
||||
type="checkbox"
|
||||
:checked="rememberPassword"
|
||||
@change="onRememberChange"
|
||||
/>
|
||||
<span>记住密码</span>
|
||||
</label>
|
||||
</div>
|
||||
@@ -198,7 +206,9 @@ onBeforeUnmount(() => {
|
||||
.login-shell input,
|
||||
.login-shell button,
|
||||
.login-shell a,
|
||||
.login-shell label {
|
||||
.login-shell label,
|
||||
.login-shell .options-row,
|
||||
.login-shell .options-row * {
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user