refactor(导航组件): 移除未使用的搜索和通知组件导入

为了简化代码并减少不必要的依赖,移除了`navbar.vue`、`horizontal.vue`和`mixNav.vue`中未使用的`Search`和`Notice`组件导入。同时,注释了`SearchModal.vue`中未使用的键盘事件处理逻辑,以优化代码结构。
This commit is contained in:
dzq 2025-05-24 16:47:21 +08:00
parent e1f18cfc48
commit 9d7b502698
4 changed files with 4 additions and 10 deletions

View File

@ -1,6 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import Search from "./search/index.vue";
import Notice from "./notice/index.vue";
import QrCodeHover from "@/components/QrCodeHover/index.vue"; import QrCodeHover from "@/components/QrCodeHover/index.vue";
import mixNav from "./sidebar/mixNav.vue"; import mixNav from "./sidebar/mixNav.vue";
import { useNav } from "@/layout/hooks/useNav"; import { useNav } from "@/layout/hooks/useNav";

View File

@ -129,15 +129,15 @@ function handleDown() {
/** key enter */ /** key enter */
function handleEnter() { function handleEnter() {
const { length } = resultOptions.value; /* const { length } = resultOptions.value;
if (length === 0 || activePath.value === "") return; if (length === 0 || activePath.value === "") return;
router.push(activePath.value); router.push(activePath.value);
handleClose(); handleClose(); */
} }
onKeyStroke("Enter", handleEnter); /* onKeyStroke("Enter", handleEnter);
onKeyStroke("ArrowUp", handleUp); onKeyStroke("ArrowUp", handleUp);
onKeyStroke("ArrowDown", handleDown); onKeyStroke("ArrowDown", handleDown); */
</script> </script>
<template> <template>

View File

@ -1,6 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import Search from "../search/index.vue";
import Notice from "../notice/index.vue";
import SidebarItem from "./sidebarItem.vue"; import SidebarItem from "./sidebarItem.vue";
import { isAllEmpty } from "@pureadmin/utils"; import { isAllEmpty } from "@pureadmin/utils";
import { ref, nextTick, computed } from "vue"; import { ref, nextTick, computed } from "vue";

View File

@ -1,7 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import extraIcon from "./extraIcon.vue"; import extraIcon from "./extraIcon.vue";
import Search from "../search/index.vue";
import Notice from "../notice/index.vue";
import { isAllEmpty } from "@pureadmin/utils"; import { isAllEmpty } from "@pureadmin/utils";
import { useNav } from "@/layout/hooks/useNav"; import { useNav } from "@/layout/hooks/useNav";
import { ref, toRaw, watch, onMounted, nextTick } from "vue"; import { ref, toRaw, watch, onMounted, nextTick } from "vue";