可通过配置取消自动锁屏
This commit is contained in:
@@ -70,7 +70,12 @@ onMounted(() => {
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
resetTimeout();
|
||||
if (timeoutDuration !== 0) {
|
||||
resetTimeout();
|
||||
// 监听用户的操作,重置超时时间
|
||||
window.addEventListener('mousemove', resetTimeout);
|
||||
window.addEventListener('keydown', resetTimeout);
|
||||
}
|
||||
if (localGet(CACHE_LOCAL_LOCK) && getToken()) {
|
||||
isLocked.value = localGet(CACHE_LOCAL_LOCK) === 'false' ? false : true;
|
||||
}
|
||||
@@ -84,10 +89,6 @@ onUnmounted(() => {
|
||||
}
|
||||
localRemove(CACHE_LOCAL_LOCK);
|
||||
});
|
||||
|
||||
// 监听用户的操作,重置超时时间
|
||||
window.addEventListener('mousemove', resetTimeout);
|
||||
window.addEventListener('keydown', resetTimeout);
|
||||
</script>
|
||||
<template>
|
||||
<a-button type="text" @click="fnLock">
|
||||
|
||||
Reference in New Issue
Block a user