feat(Mask): click mask to hide input box

This commit is contained in:
AkiChase 2024-05-07 10:28:55 +08:00
parent ed9a95ee71
commit 81825cb871

View File

@ -70,6 +70,12 @@ async function cleanAfterimage() {
await appWindow.setSize(oSize);
}
function handleInputBoxClick(event: MouseEvent) {
if (event.target === document.getElementById("input-box")) {
showInputBox(false);
}
}
function handleInputKeyUp(event: KeyboardEvent) {
if (event.key === "Enter") {
pasteText();
@ -167,7 +173,12 @@ async function checkUpdate() {
</div>
<template v-if="store.keyMappingConfigList.length">
<div @contextmenu.prevent class="mask" id="maskElement"></div>
<div v-show="showInputBoxRef" class="input-box">
<div
v-show="showInputBoxRef"
class="input-box"
id="input-box"
@click="handleInputBoxClick"
>
<NInput
ref="inputInstRef"
v-model:value="inputBoxVal"