!623 fix: prevent default browser action for ctrl + k key combination in RouterSearch component

Merge pull request !623 from AhJindeg/fix/router-search
dev
芋道源码 2024-12-18 12:45:14 +00:00 committed by Gitee
commit 25484a941b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 0 deletions

View File

@ -99,6 +99,8 @@ onUnmounted(() => {
// ctrl + k
function listenKey(event) {
if ((event.ctrlKey || event.metaKey) && event.key === 'k') {
//
event.preventDefault()
showSearch.value = !showSearch.value
//
}