Header.vue
1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<template>
<v-container>
<div class="tw-m-auto tw-flex">
<div class="tw-float-left tw-h-[64px] tw-mt-[-4px] tw-w-[100px]">
<router-link to="/"><v-img src="/logo.jpg" /></router-link>
</div>
<div class="tw-w-full tw-ml-[12px] tw-mr-[24px]">
<v-text-field
label="Search keyword"
hide-details="auto"
variant="solo"
append-inner-icon="mdi-magnify"
@click:appendInner="handleClick"
v-model="input"
>
</v-text-field>
</div>
<a
class="tw-w-[220px] tw-float-right text-blue-darken-1 font-weight-bold tw-flex tw-items-center"
href="mailto:contact@canrd.com"
>contact@canrd.com
</a>
</div>
</v-container>
<div class="tabs">
<div class="tw-max-w-[1200px] tw-mx-auto">
<v-tabs
v-model="tab"
bg-color="blue-darken-1"
slider-color="grey-lighten-3"
tab-slider-size="6px"
selected-class="active"
>
<v-tab :value="1" to="/"><span class="text-grey-lighten-3 tw-font-bold">Home</span> </v-tab>
<v-tab :value="2" to="/products"
><span class="text-grey-lighten-3 tw-font-bold">Products</span></v-tab
>
<v-tab :value="3" to="/about"
><span class="text-grey-lighten-3 tw-font-bold">About</span></v-tab
>
<!-- <v-tab :value="4" to="/contact"
><span class="text-grey-lighten-3 tw-font-bold">Contact</span></v-tab
> -->
</v-tabs>
</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { useProductListStore } from '@/stores/product_list'
const productStore = useProductListStore()
const input = ref()
const handleClick = () => {
productStore.updateKeyword(input.value)
}
const tab = ref(1)
</script>
<style lang="scss" scoped>
.tabs {
background-color: #1f88e5;
}
.active :deep {
.v-tab__slider {
bottom: 3px;
}
}
</style>