refactor:国际化锁屏

This commit is contained in:
PZ688 2025-02-28 22:25:53 +08:00
parent ac9f4cf930
commit 6dfec2b75e

View File

@ -21,7 +21,7 @@
</div>
<div class="layout-lock-screen-date-top">
<SvgIcon name="ele-Top" />
<div class="layout-lock-screen-date-top-text">上滑解锁</div>
<div class="layout-lock-screen-date-top-text">{{ $t('message.layout.unlock') }}</div>
</div>
</div>
<transition name="el-zoom-in-center">
@ -33,11 +33,11 @@
<div class="layout-lock-screen-login-box-name">{{ userInfos.account }}</div>
<div v-if="state.showMessage" class="layout-lock-screen-login-box-message">
<span>{{ state.message }}</span>
<el-button style="max-width: 80px; margin-top: 20px" size="default" @click="hideMessage"> 确认 </el-button>
<el-button style="max-width: 80px; margin-top: 20px" size="default" @click="hideMessage"> {{$t('message.layout.confirm')}} </el-button>
</div>
<div v-else class="layout-lock-screen-login-box-value">
<el-input
placeholder="请输入密码"
:placeholder="needPassword"
:type="state.isShowPassword ? 'text' : 'password'"
ref="layoutLockScreenInputRef"
size="default"
@ -85,6 +85,12 @@ import { feature, getAPI } from '/@/utils/axios-utils';
import { SysAuthApi } from '/@/api-services';
import { useRoute } from 'vue-router';
import { loadSysInfo } from '/@/utils/sysInfo';
import { useI18n } from 'vue-i18n';
const { t,locale } = useI18n();
const needPassword = ref('');
needPassword.value = t('message.layout.needPassword');
//
const layoutLockScreenDateRef = ref<HtmlType>();
const layoutLockScreenInputRef = ref();
@ -171,7 +177,7 @@ const initGetElement = () => {
const initTime = () => {
state.time.hm = formatDate(new Date(), 'HH:MM');
state.time.s = formatDate(new Date(), 'SS');
state.time.mdq = formatDate(new Date(), 'mm月dd日WWW');
state.time.mdq = formatDate(new Date(), 'mm-ddWWW');
};
//
const initSetTime = () => {