This commit is contained in:
zhoutianchi
2025-12-23 14:36:26 +08:00
parent 1f645dad3e
commit afa85da991
18 changed files with 29 additions and 254 deletions

View File

@@ -64,14 +64,14 @@
>
{{ $t('mobile.backToLogin') }}
</a>
<a
href="#"
v-if="autoRegisterEnable"
class="ml-2 text-blue-500 hover:text-blue-400 dark:text-blue-400 dark:hover:text-blue-300"
@click="emit('change', LoginTypeEnum.REGISTER)"
>
{{ $t('mobile.createAccount') }}
</a>
<!-- <a-->
<!-- href="#"-->
<!-- v-if="autoRegisterEnable"-->
<!-- class="ml-2 text-blue-500 hover:text-blue-400 dark:text-blue-400 dark:hover:text-blue-300"-->
<!-- @click="emit('change', LoginTypeEnum.REGISTER)"-->
<!-- >-->
<!-- {{ $t('mobile.createAccount') }}-->
<!-- </a>-->
</div>
</div>

View File

@@ -22,7 +22,9 @@
:placeholder="$t('password.accountPlaceholder2')"
v-model="state.ruleForm.password"
class="dark:bg-slate-700 dark:text-slate-200"
autocomplete="off"
autocomplete="new-password"
:readonly="state.passwordReadonly"
@focus="state.passwordReadonly = false"
>
<template #prefix>
<el-icon class="el-input__icon dark:text-slate-400">
@@ -65,9 +67,9 @@
<a href="#" class="text-blue-500" @click="emit('change', LoginTypeEnum.MOBILE)">
{{ $t('password.mobileLogin') }}
</a>
<a href="#" v-if="autoRegisterEnable" class="ml-2 text-blue-500" @click="emit('change', LoginTypeEnum.REGISTER)">
{{ $t('password.createAccount') }}
</a>
<!-- <a href="#" v-if="autoRegisterEnable" class="ml-2 text-blue-500" @click="emit('change', LoginTypeEnum.REGISTER)">-->
<!-- {{ $t('password.createAccount') }}-->
<!-- </a>-->
</div>
</div>
@@ -84,7 +86,7 @@
</template>
<script setup lang="ts" name="password">
import { defineAsyncComponent, reactive, ref } from 'vue';
import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
import { useUserInfo } from '/@/stores/userInfo';
import { useI18n } from 'vue-i18n';
import { generateUUID } from '/@/utils/other';
@@ -103,10 +105,11 @@ const loginFormRef = ref(); // 定义LoginForm表单引用
const loading = ref(false); // 定义是否正在登录中
const state = reactive({
isShowPassword: false, // 是否显示密码
passwordReadonly: true, // 密码输入框只读状态,用于防止浏览器自动填充
ruleForm: {
// 表单数据
username: 'admin', // 用户名
password: '123456', // 密码
username: '', // 用户名
password: '', // 密码
code: '', // 验证码
randomStr: 'blockPuzzle', // 验证码随机数
},

View File

@@ -37,14 +37,14 @@
<expire v-if="loginType === LoginTypeEnum.EXPIRE" :username="username" @change="changeLoginType" />
<!-- 分割线 -->
<div class="flex justify-center items-center my-6 space-x-3">
<span class="w-20 h-[1.5px] bg-gray-200 dark:bg-slate-600"></span>
<span class="text-gray-600 dark:text-slate-400">{{ $t('divider.or') }}</span>
<span class="w-20 h-[1.5px] bg-gray-200 dark:bg-slate-600"></span>
</div>
<!-- <div class="flex justify-center items-center my-6 space-x-3">-->
<!-- <span class="w-20 h-[1.5px] bg-gray-200 dark:bg-slate-600"></span>-->
<!-- <span class="text-gray-600 dark:text-slate-400">{{ $t('divider.or') }}</span>-->
<!-- <span class="w-20 h-[1.5px] bg-gray-200 dark:bg-slate-600"></span>-->
<!-- </div>-->
<!-- 社交登录 -->
<social @signInSuccess="signInSuccess" />
<!-- <social @signInSuccess="signInSuccess" />-->
</div>
</div>
</div>