brand-search.vue
1.04 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
<template>
<div class="search">
<input v-if="showInput" type="text" name="">
<div v-else class="input" @click="changeToInput()">
<span class="icon icon-search"></span> Search
</div>
</div>
</template>
<style>
.search {
width: 100%;
height: 85px;
padding: 15px 0;
background-color: #f6f6f6;
text-align: center;
.input {
margin-left: auto;
margin-right: auto;
background-color: #fff;
text-align: center;
color: #b0b0b0;
height: 55px;
width: 92%;
font-size: 28px;
padding: 5px 0;
}
input {
width: 92%;
height: 55px;
padding: 10px;
}
}
</style>
<script>
module.exports = {
data() {
return {
showInput: false
};
},
methods: {
changeToInput() {
this.showInput = true;
}
}
};
</script>