Browse Source

修改搜索样式

test
jyt 2 years ago
parent
commit
bffca46240
1 changed files with 17 additions and 37 deletions
  1. +17
    -37
      pages/mine/selectBuilding.vue

+ 17
- 37
pages/mine/selectBuilding.vue View File

@@ -1,14 +1,12 @@
<template> <template>
<view class="selectBuilding"> <view class="selectBuilding">
<view class="searchStyle"> <view class="searchStyle">
<u-search placeholder="输入楼盘名称" v-model="search" :show-action="false"></u-search>
<u-search placeholder="输入楼盘名称" v-model="search" @search="s" @custom="s"></u-search>
</view> </view>
<view class="searchResultStyle">
<u-radio-group v-model="result" @change="radioGroupChange">
<u-radio v-for="(item, index) in list" :key="index" :name="item.id+'-'+item.propertyName" label-size="34">
{{item.propertyName}}
</u-radio>
</u-radio-group>
<view class="searchResultStyle">
<view class="searchList" v-for="(item,index) in list" :key="index" @click="okSelect(item.id,item.propertyName)">
{{item.propertyName}}
</view>
</view> </view>
</view> </view>
@@ -22,20 +20,16 @@
return { return {
search: "", search: "",
list: [], list: [],
result: ""
}; };
}, },
watch:{
search(newState){
this.init(newState)
}
},
methods:{ methods:{
radioGroupChange(e){
console.log()
s(e){
this.init(e)
},
okSelect(id,name){
let lopan = { let lopan = {
id: e.split('-')[0],
name: e.split('-')[1]
id,
name
} }
uni.setStorageSync("buildingID", lopan); uni.setStorageSync("buildingID", lopan);
uni.navigateBack({ uni.navigateBack({
@@ -66,30 +60,16 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.selectBuilding { .selectBuilding {
background: #dedede;
.searchStyle { .searchStyle {
padding: 20rpx; padding: 20rpx;
} }
.searchResultStyle {
/deep/ .u-radio-group {
display: flex;
flex-direction: column;
}
/deep/ .u-radio {
display: flex;
flex-direction: row-reverse;
width: 100% !important;
justify-content: space-between;
background: #fff;
box-shadow: 0px 4px 5px 3px #ccc;
margin: 15rpx 0;
padding: 20rpx;
}
/deep/ .u-radio__label {
width: 100%;
.searchResultStyle {
padding: 0 30rpx;
.searchList{
border-bottom: 1rpx solid #E0E0E0;
padding: 30rpx 0;
font-size: 30rpx;
} }
} }
} }


Loading…
Cancel
Save