SearchFirst.vue
782 Bytes
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
<template>
<div class="search_container" @click="jumpPage">
<van-icon name="search" color="#fff" size="18" class="search_first" />
<span class="text">{{placeholder}}</span>
</div>
</template>
<script>
export default {
name: 'SearchFirst',
props: {
placeholder: {
type: String
}
},
methods: {
jumpPage() {
this.$emit('jumpPage')
}
}
}
</script>
<style lang="less" scoped>
.search_container {
width: 384px;
margin: 10px auto;
display: flex;
height: 33px;
align-items: center;
background-color: rgba(255, 255, 255, 0.2);
color: #fff;
border-radius: 16px;
.search_first {
opacity: 1;
margin-left: 10px;
margin-right: 5px;
}
.text {
color: #fff;
opacity: 0.8;
font-size: 12px;
}
}
</style>