fix(plugin-search): search result navigation failed (#323)
This commit is contained in:
parent
23404a8b56
commit
7685f24525
@ -233,7 +233,7 @@ onKeyStroke('Enter', (e) => {
|
||||
}
|
||||
|
||||
if (selectedPackage) {
|
||||
router.go(selectedPackage.id)
|
||||
router.push(selectedPackage.id)
|
||||
emit('close')
|
||||
}
|
||||
})
|
||||
@ -286,6 +286,12 @@ function formMarkRegex(terms: Set<string>) {
|
||||
'gi',
|
||||
)
|
||||
}
|
||||
|
||||
function selectedClick(e: MouseEvent, p: SearchResult & Result) {
|
||||
e.preventDefault()
|
||||
router.push(p.id)
|
||||
emit('close')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -367,7 +373,7 @@ function formMarkRegex(terms: Set<string>) {
|
||||
:aria-label="[...p.titles, p.title].join(' > ')"
|
||||
@mouseenter="!disableMouseOver && (selectedIndex = index)"
|
||||
@focusin="selectedIndex = index"
|
||||
@click="$emit('close')"
|
||||
@click="selectedClick($event, p)"
|
||||
>
|
||||
<div>
|
||||
<div class="titles">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user