mirror of
https://github.com/imdap/ruoyi-plus-vben5.git
synced 2026-05-08 11:21:27 +08:00
chore: fix lint and typecheck issues
This commit is contained in:
@@ -53,11 +53,13 @@ function handleClose() {
|
||||
|
||||
const keys = useMagicKeys();
|
||||
const cmd = isWindowsOs() ? keys['ctrl+k'] : keys['cmd+k'];
|
||||
whenever(cmd!, () => {
|
||||
if (props.enableShortcutKey) {
|
||||
modalApi.open();
|
||||
}
|
||||
});
|
||||
if (cmd) {
|
||||
whenever(cmd, () => {
|
||||
if (props.enableShortcutKey) {
|
||||
modalApi.open();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
whenever(open, () => {
|
||||
nextTick(() => {
|
||||
@@ -80,6 +82,7 @@ const toggleKeydownListener = () => {
|
||||
};
|
||||
|
||||
const toggleOpen = () => {
|
||||
// oxlint-disable-next-line no-unused-expressions
|
||||
open.value ? modalApi.close() : modalApi.open();
|
||||
};
|
||||
|
||||
|
||||
@@ -153,17 +153,24 @@ function handleSubmitLogout() {
|
||||
|
||||
if (enableShortcutKey.value) {
|
||||
const keys = useMagicKeys();
|
||||
whenever(keys['Alt+KeyQ']!, () => {
|
||||
if (enableLogoutShortcutKey.value) {
|
||||
handleLogout();
|
||||
}
|
||||
});
|
||||
const logoutKey = keys['Alt+KeyQ'];
|
||||
const lockKey = keys['Alt+KeyL'];
|
||||
|
||||
whenever(keys['Alt+KeyL']!, () => {
|
||||
if (enableLockScreenShortcutKey.value) {
|
||||
handleOpenLock();
|
||||
}
|
||||
});
|
||||
if (logoutKey) {
|
||||
whenever(logoutKey, () => {
|
||||
if (enableLogoutShortcutKey.value) {
|
||||
handleLogout();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (lockKey) {
|
||||
whenever(lockKey, () => {
|
||||
if (enableLockScreenShortcutKey.value) {
|
||||
handleOpenLock();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user