1
李凌
2026-01-21 e01cee0f0c5c5c2eb2d8595eadb3c7a9df2a37fc
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
75
76
77
78
79
<template>
    <div class="head flex justify-between items-center pl-5 pr-5">
        <div class="more mr-5">
            <img src="@/assets/imgs/home/more.png" alt="" @click="onRoute('/my')">
        </div>
 
        <div class="more_input pl-5 pr-5 flex items-center justify-start mr-5 pt-2">
            <img src="@/assets/imgs/quotes/search.png" alt="">
            <!-- <span class="pl-5">{{ $t('请输入关键词搜寻') }}</span> -->
            <van-field v-model="iValue" :placeholder="$t('请输入关键词搜寻')" style="padding: 0 1rem;background: none;"
                @input="emit('search', iValue)" />
        </div>
        <div class="scan"><img src="@/assets/image/assets-center/language.png" alt="" @click="onRoute('/language')">
        </div>
 
        <!-- <div class="" @click="store.commit('vant/SET_THEME', 'dark')">切换1</div>
        <div class="" @click="store.commit('vant/SET_THEME', 'light')">切换2</div> -->
 
        <!-- <div class="gift"><img src="@/assets/imgs/home/gift.png" alt=""></div>
        <div class="scan"><img src="@/assets/imgs/home/scan.png" alt=""></div>
        <div class="instruction"><img src="@/assets/imgs/home/instruction.png" alt=""></div> -->
    </div>
</template>
 
<script setup>
import { useRouter } from 'vue-router';
import { useI18n } from "vue-i18n";
import { ref } from 'vue';
import store from '@/store/store'
 
const { t } = useI18n()
const router = useRouter()
 
const onRoute = (path) => {
    router.push(path)
}
 
const iValue = ref('')
const emit = defineEmits(['search'])
 
</script>
 
<style lang="scss" scoped>
@import '@/assets/theme/index.scss';
.head {
    width: 100%;
    margin-bottom: 1rem;
 
    .more,
    .gift,
    .scan,
    .instruction {
        width: 3.2rem;
    }
 
    .more_input {
        width: 100%;
        height: 4.5rem;
        border-radius: 2.25rem;
        font-size: 1.5rem;
 
        @include themify() {
            background-color: themed("input_background");
            color: themed("text_color1");
        }
 
        span {
            text-overflow: ellipsis;
            overflow: hidden;
            word-break: break-all;
            white-space: nowrap;
        }
 
        img {
            width: 2.5rem;
        }
    }
}
</style>