rightTopFunc.vue
3.08 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<template>
<div class="container">
<div class="flex-center">
<div style="margin-right: 14px;">
<el-input v-model="search" style="width: 342px; height: 40px;" placeholder="地名、地址、道路"
suffix-icon="el-icon-search" @change='handleSearch()'></el-input>
</div>
<div class="func-ico" :class="[is2D?'selected':'']" @click="handleIs2D()">
<img src="../assets/一张图/icon_2d3d.png" alt="">
</div>
<div class="func-ico" :class="[isCamera?'selected':'']" @click="handleIsCamera()">
<img src="../assets/一张图/icon_影像.png" alt="">
</div>
<div class="func-ico" :class="[isLayer?'selected':'']" @click="handleIsLayer()">
<img src="../assets/一张图/icon_图层管理.png" alt="">
</div>
<div class="func-ico" :class="[isClear?'selected':'']" @click="handleIsClear()">
<img src="../assets/一张图/icon_清除.png" alt="">
</div>
</div>
</div>
</template>
<script>
export default {
name: 'rightTopFunc',
components: {},
data() {
return {
search: '',
is2D: false,
isCamera: false,
isLayer: false,
isClear: false
}
},
mounted() {},
methods: {
handleSearch(val) {
this.$emit('searchRoat', val);
},
handleIs2D() {
this.is2D = !this.is2D;
this.$emit('is2D', this.is2D);
},
handleIsCamera() {
this.isCamera = !this.isCamera;
this.$emit('isCamera', this.isCamera);
},
handleIsLayer() {
this.isLayer = !this.isLayer;
this.$emit('isLayer', this.isLayer);
},
handleIsClear() {
this.isClear = !this.isClear;
this.$emit('isClear', this.isClear);
},
}
}
</script>
<style scoped>
.container {}
.func-ico {
width: 40px;
height: 40px;
position: relative;
margin-left: 10px;
cursor: pointer;
}
.flex-center {
display: flex;
align-items: center;
justify-items: center;
}
.selected {
background-image: url('../assets/一张图/bg_2d3d 2.png');
background-size: 100% 100%;
background-repeat: no-repeat;
}
img {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.el-icon-search:before {
color: #fff;
}
>>>input::-webkit-input-placeholder {
font-size: 16px;
color: rgba(255, 255, 255, 0.78) !important;
}
>>>.el-input__inner {
background: rgba(23, 34, 38, 0.57) !important;
border: 1px solid rgba(23, 34, 38, 0.57);
color: #fff;
}
>>>.el-input__suffix {
color: #fff;
font-size: 17px;
}
</style>