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>