src/layout/Header.vue
@@ -19,12 +19,14 @@ </template> <script setup lang="ts"> import { ref } from "vue"; import { ref, defineEmits } from "vue"; const activeIndex = ref("/"); const emit = defineEmits(["selectMenu"]); const handleSelect = (key: string) => { console.log(key); activeIndex.value = key; emit("selectMenu", key); }; </script> @@ -83,6 +85,7 @@ :deep(.el-menu-item) { color: #303133; margin: 0 20px !important; &:hover { color: #303133;