officialWebsite/src/components/AppHeader.vue

36 lines
1.0 KiB
Vue
Raw Normal View History

2025-02-19 03:52:29 +00:00
<template>
2025-02-21 03:27:50 +00:00
<header className="header">
<div class="logo">
<img src="@/assets/image/logo.png" alt="logo" />
</div>
<div class="tabs">
<div class="tab-item" :class="{ active: currentTab === 'home' }" @click="handleTabClick('home')">
{{ t('home.nav.home') }}
</div>
<div class="tab-item" :class="{ active: currentTab === 'companyprofil' }" @click="handleTabClick('companyprofil')">
{{ t('home.nav.company') }}
</div>
<div class="tab-item" :class="{ active: currentTab === 'business' }" @click="handleTabClick('business')">
{{ t('home.nav.business') }}
</div>
</div>
</header>
2025-02-19 03:52:29 +00:00
</template>
2025-02-21 03:27:50 +00:00
<script setup>
import { useI18n } from 'vue-i18n';
import { useRouter } from "vue-router";
import { useHome } from '@/store/home/index.js';
const router = useRouter();
const { currentTab } = useHome();
const { t } = useI18n();
const handleTabClick = (tab) => {
currentTab.value = tab;
router.push('/'+tab);
}
</script>
2025-02-19 03:52:29 +00:00
<style scoped lang="scss">
2025-02-21 03:27:50 +00:00
2025-02-19 03:52:29 +00:00
</style>