elmenu修改,正确跳转到站外链接

This commit is contained in:
2025-03-05 08:45:31 +08:00
parent 166a6d8171
commit d57b407df8

View File

@ -1,17 +1,15 @@
<template>
<el-menu
mode="horizontal"
router
>
<el-menu mode="horizontal" router>
<el-menu-item index="/">首页</el-menu-item>
<el-menu-item >
<a href="blog.kisechan.space" target="_blank">博客</a>
</el-menu-item>
<el-menu-item @click="goToBlog">博客</el-menu-item>
<el-menu-item index="/about">关于</el-menu-item>
</el-menu>
</template>
<script setup>
const goToBlog = () => {
window.open("https://blog.kisechan.space", "_blank");
};
</script>
<style scoped>
@ -19,4 +17,4 @@
display: flex;
justify-content: center;
}
</style>
</style>