fix: 优化按下ESC键搜索框的表现逻辑

This commit is contained in:
ZiuChen 2022-09-08 20:25:43 +08:00
parent eaa0e762c0
commit 9b172f684c

View File

@ -184,11 +184,15 @@ onMounted(() => {
if (filterText.value) { if (filterText.value) {
// //
filterText.value = '' filterText.value = ''
} else { window.focus()
// e.stopPropagation()
} else if (isSearchPanelExpand.value) {
//
window.focus(true) window.focus(true)
e.stopPropagation()
} else {
// : uTools
} }
e.stopPropagation()
} else if (ctrlKey || metaKey || isArrow || isEnter) { } else if (ctrlKey || metaKey || isArrow || isEnter) {
// Ctrl (utools) // Ctrl (utools)
e.preventDefault() e.preventDefault()