diff --git a/src/layout/header/components/search/index.vue b/src/layout/header/components/search/index.vue index ae829c5a3..e9f178f96 100644 --- a/src/layout/header/components/search/index.vue +++ b/src/layout/header/components/search/index.vue @@ -132,6 +132,8 @@ /** key enter */ function handleEnter() { + const { length } = resultOptions.value; + if (length === 0 || activePath.value === '') return; if (/http(s)?:/.test(activePath.value)) { window.open(activePath.value); } else { diff --git a/src/router/staticModules/besidesLayout.ts b/src/router/staticModules/besidesLayout.ts index 82a4494b6..96dd53389 100644 --- a/src/router/staticModules/besidesLayout.ts +++ b/src/router/staticModules/besidesLayout.ts @@ -22,6 +22,7 @@ export const REDIRECT_ROUTE: RouteRecordRaw = { component: RouterView, meta: { title: REDIRECT_NAME, + hideInMenu: true, }, beforeEnter: (to) => { const { params, query } = to;