moblie-website/src/components/Header.vue

50 lines
1.2 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>
2025-02-18 23:36:50 +08:00
<div class="navbar-center flex gap-[80px]">
<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;
2025-02-18 23:36:50 +08:00
position: fixed;
background-image: url('../assets/Rectangle 85.png');
background-size: 100% 100%;
background-repeat: no-repeat;
left: 0;
right: 0;
top: 0;
2025-02-15 21:04:05 +08:00
}
2025-02-18 23:36:50 +08:00
2025-02-15 21:04:05 +08:00
.btn-hover:hover {
2025-02-17 23:56:44 +08:00
color: #00e5ff !important;
2025-02-15 21:04:05 +08:00
}
2025-02-18 23:36:50 +08:00
.btn-hover {
font-size: 18px !important;
}
2025-01-21 23:37:04 +08:00
/* 你可以在这里添加一些自定义的样式 */
</style>