doum
2025-09-16 e755ab6c6edddf4accb51e241e6ec04c27cea091
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
<template>
    <view class="box">
        <view class="city-serach">
            <view class="city-serach-box">
                <image src="/static/icon/ic_search@2x.png" mode="widthFix"></image>
                <input placeholder="输入城市名称" @confirm="search" />
            </view>
            <view class="city-serach-info">
                <text>当前城市:</text>
                <text>合肥</text>
            </view>
        </view>
        <tIndexAddress @select="select" ref="city"></tIndexAddress>
    </view>
</template>
 
<script>
    import tIndexAddress from '@/components/t-index-address/components/t-index-address/t-index-address.vue'
    export default {
        components: { tIndexAddress },
        data() {
            return {
                
            };
        },
        methods: {
            select(data) {
                console.log(data)
            },
            search() {
                this.$refs.city.search('阿')
            }
        }
    }
</script>
 
<style lang="scss" scoped>
    .box {
        width: 100%;
        background-color: #ffffff;
        .city-serach {
            width: 100%;
            padding: 30rpx;
            box-sizing: border-box;
            background: #ffffff;
            .city-serach-box {
                width: 100%;
                height: 72rpx;
                background: #F9F9FB;
                border-radius: 36rpx;
                border: 1rpx solid #EEEEEE;
                display: flex;
                align-items: center;
                padding: 0 30rpx;
                box-sizing: border-box;
                justify-content: space-between;
                image {
                    flex-shrink: 0;
                    width: 32rpx;
                    height: 32rpx;
                    margin-right: 20rpx;
                }
                input {
                    flex: 1;
                    height: 100%;
                }
            }
            .city-serach-info {
                width: 100%;
                display: flex;
                align-items: center;
                margin-top: 30rpx;
                text {
                    &:nth-child(1) {
                        font-weight: 400;
                        font-size: 30rpx;
                        color: #222222;
                    }
                    &:nth-child(2) {
                        font-weight: 400;
                        font-size: 30rpx;
                        color: #00BC12;
                    }
                }
            }
        }
    }
</style>