officialWebsite/src/components/AppHeader.vue

46 lines
1.1 KiB
Vue
Raw Normal View History

2025-02-19 03:52:29 +00:00
<template>
2025-02-22 09:37:27 +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") }}
2025-02-21 03:27:50 +00:00
</div>
2025-02-22 09:37:27 +00:00
<div
class="tab-item"
:class="{ active: currentTab === 'companyprofil' }"
@click="handleTabClick('companyprofil')"
>
{{ t("home.nav.company") }}
2025-02-21 03:27:50 +00:00
</div>
2025-02-22 09:37:27 +00:00
<div
class="tab-item"
:class="{ active: currentTab === 'businessintroduction' }"
@click="handleTabClick('businessintroduction')"
>
{{ 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>
2025-02-22 09:37:27 +00:00
import { useI18n } from "vue-i18n";
2025-02-21 03:27:50 +00:00
2025-02-22 09:37:27 +00:00
import { useHome } from "@/store/home/index.js";
2025-02-21 03:27:50 +00:00
import { useRouter } from "vue-router";
const router = useRouter();
const { currentTab } = useHome();
const { t } = useI18n();
const handleTabClick = (tab) => {
currentTab.value = tab;
2025-02-22 09:37:27 +00:00
router.push("/" + tab);
};
2025-02-21 03:27:50 +00:00
</script>
2025-02-22 09:37:27 +00:00
<style scoped lang="scss"></style>