更新 Web/src/layout/lockScreen/index.vue
锁屏页面密码框支持查看密码 Signed-off-by: Hans <hans_wen@163.com>
This commit is contained in:
parent
97fc096220
commit
c104298874
@ -36,7 +36,7 @@
|
||||
<el-button style="max-width: 80px; margin-top: 20px" size="default" @click="hideMessage"> 确认 </el-button>
|
||||
</div>
|
||||
<div v-else class="layout-lock-screen-login-box-value">
|
||||
<el-input placeholder="请输入密码" type="password" ref="layoutLockScreenInputRef" size="default" v-model="state.lockScreenPassword" @keyup.enter.native.stop="onLockScreenSubmit()">
|
||||
<el-input placeholder="请输入密码" :type="state.isShowPassword ? 'text' : 'password'" ref="layoutLockScreenInputRef" size="default" v-model="state.lockScreenPassword" @keyup.enter.native.stop="onLockScreenSubmit()">
|
||||
<template #append>
|
||||
<el-button @click="onLockScreenSubmit">
|
||||
<el-icon class="el-input__icon">
|
||||
@ -44,6 +44,10 @@
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</template>
|
||||
<template #suffix>
|
||||
<i class="iconfont el-input__icon login-content-password" :class="state.isShowPassword ? 'icon-yincangmima' : 'icon-xianshimima'" @click="state.isShowPassword = !state.isShowPassword">
|
||||
</i>
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
@ -94,6 +98,7 @@ const state = reactive({
|
||||
lockScreenPassword: '',
|
||||
message: '',
|
||||
showMessage: false,
|
||||
isShowPassword: false,
|
||||
});
|
||||
|
||||
// 鼠标按下 pc
|
||||
@ -202,6 +207,7 @@ const onLockScreenSubmit = async () => {
|
||||
}
|
||||
// SM2加密密码
|
||||
const publicKey = window.__env__.VITE_SM_PUBLIC_KEY;
|
||||
|
||||
const password = sm2.doEncrypt(state.lockScreenPassword, publicKey, 1);
|
||||
const [err, res] = await feature(getAPI(SysAuthApi).apiSysAuthUnLockScreenPost(password));
|
||||
if (err) {
|
||||
@ -257,6 +263,7 @@ onUnmounted(() => {
|
||||
window.clearInterval(state.setIntervalTime);
|
||||
window.clearInterval(state.isShowLockScreenIntervalTime);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user