<template>
<view class="content">
<view class="box">
<style></style>
<view class="">
<!-- 按钮 -->
<view class="an" v-show="b">
按钮
</view>
<!-- 输入框 -->
<view class="sr" v-show="!b">
输入框
</view>
</view>
<view class="boxa">
<view class="boxb" v-for="item in a" :key="item.id" @click="onClick(item)">
<view class="wz">{{item.name}}</view>
<view class="long">=</view>
</view>
</view>
<view class="k" v-show="isshow">
<view class="" v-for="(item,index) in list" :key="index">
{{item}}
</view>
<button class="u-button" @click="ok"></button>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello',
b: true,
isshow:false,
a: [{
id: 0,
name: "位置"
}, {
id: 1,
name: "租金"
}, {
id: 2,
name: "筛选"
},
{
id: 3,
name: "排序"
}
],
list:[]
}
},
onLoad() {
},
methods: {
onClick(item) {
console.log(item);
this.b=false
this.isshow=true
if(item.id==0){
this.list=[11,22,33,44,55]
}else if(item.id==1){
this.list=[22,33,44,55,66,77]
}else if(item.id==2){
this.list=[22,33,99,55,66,77]
}else if(item.id==3){
this.list=[22,33,99,55,66,77,88]
}else{}
},
ok(){
this.isshow=false
this.b=true
}
}
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
.box {
width: 100vw;
height: 100vh;
background: #8f8f94;
}
.boxa {
display: flex;
}
.boxb {
width: 100%;
height: 90rpx;
display: flex;
justify-content: center;
align-items: center;
background: #00ff7f;
}
.k {
width: 100%;
height: 750rpx;
background: #FFFFFF;
position: relative;
}
.u-button{
position: absolute;
bottom: 20rpx;
width: 90%;
height: 70rpx;
background: #8f8f94;
}
.an{
width: 100%;
height: 90rpx;
background: #00aaff;
}
.sr{
width: 100%;
height: 90rpx;
background: #550000;
}
</style>