You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
high-mini/pages/user/positioning/positioning.vue

65 lines
1.3 KiB

<template>
<view>
<view class="width100 backcorfff">
<uSearchBar @confirm="search" @input="input"></uSearchBar>
<view class="line1 mart10"></view>
<view class="width90 mart20 font15 fcor333">当前定位</view>
<view class="posacname actives width90 mart20">南充</view>
<view class="width90 mart20 font14 fcor333">其他地区</view>
<view class="posacname mart20 flleft font14" :class="{'actives':posId===item.name}" v-for="(item,index) in posList" @click="change(item)">
{{item.name}}</view>
</view>
</view>
</template>
<script>
import uSearchBar from '../../../components/uni-search-bar/components/uni-search-bar/uni-search-bar.vue';
export default {
components: {
uSearchBar
},
data() {
return {
posList: [{
name: '南充'
},
{
name: '高坪'
},
{
name: '嘉陵'
},
{
name: '南部'
}
],
posId: ''
}
},
methods: {
change(item) {
this.posId = item.name;
}
}
}
</script>
<style lang="less">
.posacname {
background-color: #f5f5f5;
color: #666666;
width: 20%;
height: 30px;
margin-left: 4%;
line-height: 30px;
text-align: center;
border-radius: 5px;
}
.actives{
color: #089bf5;
background-color: #f4faff;
border: 1px solid #089bf5;
}
</style>