mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-30 23:26:41 +08:00
feat(projects): 当搜索菜单结果为空时不触发enter事件
This commit is contained in:
parent
7a0648dba5
commit
4283cd31f6
@ -6,6 +6,7 @@
|
|||||||
preset="card"
|
preset="card"
|
||||||
footer-style="padding: 0; margin: 0"
|
footer-style="padding: 0; margin: 0"
|
||||||
class="w-630px fixed top-50px left-1/2 transform -translate-x-1/2"
|
class="w-630px fixed top-50px left-1/2 transform -translate-x-1/2"
|
||||||
|
@after-leave="handleClose"
|
||||||
>
|
>
|
||||||
<n-input ref="inputRef" v-model:value="keyword" clearable placeholder="请输入关键词搜索" @input="handleSearch">
|
<n-input ref="inputRef" v-model:value="keyword" clearable placeholder="请输入关键词搜索" @input="handleSearch">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
@ -116,6 +117,8 @@ function handleDown() {
|
|||||||
|
|
||||||
/** key enter */
|
/** key enter */
|
||||||
function handleEnter() {
|
function handleEnter() {
|
||||||
|
const { length } = resultOptions.value;
|
||||||
|
if (length === 0 || activePath.value === '') return;
|
||||||
if (isUrl(activePath.value)) {
|
if (isUrl(activePath.value)) {
|
||||||
window.open(activePath.value, '__blank');
|
window.open(activePath.value, '__blank');
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user