moblie-website/src/components/Header.vue

39 lines
1.0 KiB
Vue
Raw Normal View History

2025-01-21 23:37:04 +08:00
<template>
2025-02-15 21:04:05 +08:00
<div class="navbar header-bg-color">
<div class="navbar-start"></div>
<div class="navbar-center">
2025-02-17 23:56:44 +08:00
<a href="https://www.sanyoubio.com.cn" class="btn btn-ghost btn-hover" :style="{ color: activeTag === 'about' ? '#00E5FF' : 'white' }"
>关于三优</a
>
2025-02-15 21:04:05 +08:00
<a class="btn btn-ghost btn-hover" :style="{ color: activeTag === 'home' ? '#00E5FF' : 'white' }">三优云试剂管家</a>
<a class="btn btn-ghost btn-hover" :style="{ color: activeTag === 'contact' ? '#00E5FF' : 'white' }">联系我们</a>
2025-01-21 23:37:04 +08:00
</div>
2025-02-15 21:04:05 +08:00
<div class="navbar-end"></div>
</div>
2025-01-21 23:37:04 +08:00
</template>
<script setup>
2025-02-15 21:04:05 +08:00
import { defineProps } from "vue";
// 接收父组件传递的 activeTag
const props = defineProps({
activeTag: {
type: String,
default: "home", // 可以定义默认值
},
});
2025-01-21 23:37:04 +08:00
</script>
<style scoped>
2025-02-15 21:04:05 +08:00
.header-bg-color {
color: #fff;
font-size: 16px;
height: 77px;
z-index: 111;
position: relative;
}
.btn-hover:hover {
2025-02-17 23:56:44 +08:00
color: #00e5ff !important;
2025-02-15 21:04:05 +08:00
}
2025-01-21 23:37:04 +08:00
/* 你可以在这里添加一些自定义的样式 */
</style>