fix: 去除锁屏

This commit is contained in:
TsMask
2024-04-09 15:33:28 +08:00
parent 3888fd2bca
commit 50cb92a95b
2 changed files with 21 additions and 21 deletions

View File

@@ -53,30 +53,30 @@ function backLogin() {
const isLocked = computed(() => lockedStore.type !== 'none'); const isLocked = computed(() => lockedStore.type !== 'none');
onMounted(() => { onMounted(() => {
getConfigKey('sys.lockTime') // getConfigKey('sys.lockTime')
.then(res => { // .then(res => {
if (res.code === RESULT_CODE_SUCCESS && res.data) { // if (res.code === RESULT_CODE_SUCCESS && res.data) {
lockedStore.lockTimeout = res.data; // lockedStore.lockTimeout = res.data;
timeoutDuration = res.data * 1000; // timeoutDuration = res.data * 1000;
} // }
// 本地锁定类型设置 // // 本地锁定类型设置
lockedStore.fnLock(lockedStore.type); // lockedStore.fnLock(lockedStore.type);
}) // })
.finally(() => { // .finally(() => {
if (timeoutDuration !== 0) { // if (timeoutDuration !== 0) {
resetTimeout(); // resetTimeout();
// 监听用户的操作,重置超时时间 // // 监听用户的操作,重置超时时间
window.addEventListener('mousemove', resetTimeout); // window.addEventListener('mousemove', resetTimeout);
window.addEventListener('keydown', resetTimeout); // window.addEventListener('keydown', resetTimeout);
} // }
}); // });
}); });
/**组件实例被卸载之后调用 */ /**组件实例被卸载之后调用 */
onUnmounted(() => { onUnmounted(() => {
if (timeoutId) { // if (timeoutId) {
clearTimeout(timeoutId); // clearTimeout(timeoutId);
} // }
}); });
</script> </script>
<template> <template>

View File

@@ -77,7 +77,7 @@ function fnChangeLocale(e: any) {
</template> </template>
</a-button> </a-button>
<a-tooltip placement="bottom"> <a-tooltip placement="bottom" v-if="false">
<template #title>{{ t('loayouts.rightContent.lock') }}</template> <template #title>{{ t('loayouts.rightContent.lock') }}</template>
<a-button type="text" @click="fnClickLock"> <a-button type="text" @click="fnClickLock">
<template #icon> <template #icon>