Files
xiaozhi-esp32-server/ZhiKongTaiWeb/src/components/NavBar.vue
T
玄凤科技 bef55e852c 增加设备私有配置,每台设备可以配置不同的模型和提示词
增加后台管理功能,可以通过后台调整设备私有配置信息
2025-02-15 19:48:46 +08:00

62 lines
1.1 KiB
Vue

<template>
<header class="header">
<div class="nav-item" :class="{ active: currentTab === 'home' }" @click="switchTab('home')">小智 AI</div>
<nav class="nav">
<div class="nav-item" :class="{ active: currentTab === 'device' }" @click="switchTab('device')">
<i class="icon-device"></i> 设备管理
</div>
</nav>
</header>
</template>
<script setup>
const props = defineProps({
currentTab: String
});
const emit = defineEmits(['tab-change']);
const switchTab = (tab) => {
emit('tab-change', tab);
};
</script>
<style scoped>
.header {
display: flex;
align-items: center;
height: 60px;
padding: 0;
background-color: #001529;
color: white;
width: 100%;
position: relative;
left: 0;
right: 0;
}
.nav {
display: flex;
}
.nav-item {
display: flex;
align-items: center;
padding: 0 20px;
height: 60px;
color: white;
text-decoration: none;
cursor: pointer;
font-weight: bold;
transition: background-color 0.3s;
}
.active {
background-color: #4178EE;
}
.icon-device {
margin-right: 8px;
}
</style>