<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>
|