|
@ -1,6 +1,6 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="header_container"> |
|
|
<div class="header_container"> |
|
|
<img :src="Logo" alt="logo" class="logo_img" /> |
|
|
|
|
|
|
|
|
<img :src="Logo" alt="logo" class="logo_img" @click="toHome()" /> |
|
|
<ul class="tab_group"> |
|
|
<ul class="tab_group"> |
|
|
<li :class="activeTab == 0 ? 'active' : ''" @click="changeActiveTab(0)"> |
|
|
<li :class="activeTab == 0 ? 'active' : ''" @click="changeActiveTab(0)"> |
|
|
首页 |
|
|
首页 |
|
@ -20,10 +20,21 @@ |
|
|
|
|
|
|
|
|
<script setup> |
|
|
<script setup> |
|
|
import { ref } from 'vue' |
|
|
import { ref } from 'vue' |
|
|
|
|
|
import { useRouter } from 'vue-router' |
|
|
import Logo from '@/static/img/2.png' |
|
|
import Logo from '@/static/img/2.png' |
|
|
const activeTab = ref(0) |
|
|
const activeTab = ref(0) |
|
|
|
|
|
const router = useRouter() |
|
|
const changeActiveTab = index => { |
|
|
const changeActiveTab = index => { |
|
|
activeTab.value = index |
|
|
activeTab.value = index |
|
|
|
|
|
if (index == 2) { |
|
|
|
|
|
router.push('/product') |
|
|
|
|
|
} |
|
|
|
|
|
if (index == 0) { |
|
|
|
|
|
toHome() |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
const toHome = () => { |
|
|
|
|
|
router.push('/') |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|