校园-江西科技师范大学-前端
shuishen
2023-12-14 e733164e1c779b3aef7245936b9daf7875bf791e
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
112
113
114
115
116
117
118
119
120
<template>
    <!-- 中间搜索
mobileCortrolSearch
    -->
    <div class="m-left-mobileCortrolSearch">
        <div class="m-left-SearchMain">
            <slot name="selectCampusBox"></slot>
 
            <div class="m-left-input-box">
                <el-input placeholder="请输入内容" v-model="input" clearable size="small" class="m-left-S-input">
                    <el-button slot="append" class="iconSearch" icon="el-icon-search icon" @click="search"></el-button>
                </el-input>
            </div>
        </div>
    </div>
</template>
 
<script>
export default {
    name: 'mobileCortrolSearch',
    computed: {},
    data () {
        return {
            viewer: null,
            input: ''
        }
    },
    created () { },
    mounted () { },
    methods: {
        initialize (viewer) {
            viewer.scene.globe.depthTestAgainstTerrain = false
            this.viewer = viewer
        },
        search () {
            const that = this
            this.$store.commit('MSET_BIGPOPUP', { search: true, value: that.input })
            that.input = ''
        }
    }
}
</script>
 
<style scoped lang="scss">
.m-left-mobileCortrolSearch {
    width: 100%;
    position: fixed;
    top: 10px;
    // left: 20px;
    z-index: 200;
 
    .m-left-SearchMain {
        margin: 0 2%;
        width: 96%;
        position: relative;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: center;
 
        .m-left-input-box {
            flex: 1;
 
            ::v-deep(input) {
                border-radius: 0 !important;
                border: none !important;
                background-color: #f1f1f1;
            }
        }
 
        &>div:first-child {
            border-radius: 4px 0 0 4px !important;
 
            .m-left-S-input {
                border-radius: 4px 0 0 4px !important;
 
                ::v-deep(input) {
                    border-radius: 4px 0 0 4px !important;
                }
            }
        }
 
        .m-left-S-input {
            border: none;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
 
            ::v-deep(input) {
                flex: 1 !important;
            }
 
            ::v-deep(.el-input-group__append) {
                width: 0 !important;
                border: none !important;
                border-radius: 0 !important;
 
                button {
                    border-radius: 0 4px 4px 0 !important;
                }
            }
        }
 
        .iconSearch {
            width: 32px;
            height: 32px;
            padding-top: 0;
            padding-bottom: 0;
            background-color: rgb(33, 150, 243);
            display: flex;
            align-items: center;
            justify-content: center;
            border: none !important;
            font-size: 24px;
            color: #fff;
        }
    }
}
</style>