去除默认账号密码,去除自动填充

This commit is contained in:
zc
2026-05-13 14:27:06 +08:00
parent 37b70fe25e
commit 237eabc298

View File

@@ -9,10 +9,10 @@
@submit="handleLogin" @submit="handleLogin"
> >
<a-form-item field="username" hide-label> <a-form-item field="username" hide-label>
<a-input v-model="form.username" placeholder="请输入用户名" allow-clear /> <a-input v-model="form.username" placeholder="请输入用户名" allow-clear autocomplete="off" />
</a-form-item> </a-form-item>
<a-form-item field="password" hide-label> <a-form-item field="password" hide-label>
<a-input-password v-model="form.password" placeholder="请输入密码" /> <a-input-password v-model="form.password" placeholder="请输入密码" autocomplete="new-password" />
</a-form-item> </a-form-item>
<a-form-item v-if="isCaptchaEnabled" field="captcha" hide-label> <a-form-item v-if="isCaptchaEnabled" field="captcha" hide-label>
<a-input v-model="form.captcha" placeholder="请输入验证码" :max-length="4" allow-clear style="flex: 1 1" /> <a-input v-model="form.captcha" placeholder="请输入验证码" :max-length="4" allow-clear style="flex: 1 1" />
@@ -45,11 +45,12 @@ import { useAppStore, useTabsStore, useUserStore } from '@/stores'
import { encryptByRsa } from '@/utils/encrypt' import { encryptByRsa } from '@/utils/encrypt'
const loginConfig = useStorage('login-config', { const loginConfig = useStorage('login-config', {
rememberMe: true, // rememberMe: true,
username: 'admin', // 演示默认值 // username: 'admin', // 演示默认值
password: 'admin123', // 演示默认值 // password: 'admin123', // 演示默认值
// username: debug ? 'admin' : '', // 演示默认值 rememberMe: false,
// password: debug ? 'admin123' : '', // 演示默认值 username: '',
password: '',
}) })
// 是否启用验证码 // 是否启用验证码
const isCaptchaEnabled = ref(true) const isCaptchaEnabled = ref(true)