首页跳转个人房源
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<div class="info-box-bg">
|
||||
<div class="box"
|
||||
:class="[{ 'pad-15': seachType === '3' }]">
|
||||
<div @click="setSelectType(i + 1,item.data)" v-for="(item, i) in btn.data" :key="i" :class="[
|
||||
<div @click="setSelectType(i+1,item.data,item)" v-for="(item, i) in btn.data" :key="i" :class="[
|
||||
{ 'btn': seachType === '1' },
|
||||
{ 'mg-l-17': seachType === '1' && i % 5 !== 0 },
|
||||
{ 'seach-long-btn btn': seachType === '2' },
|
||||
@@ -49,6 +49,9 @@ const props = defineProps({
|
||||
default: function () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
checkBtn:{
|
||||
type:Function
|
||||
}
|
||||
})
|
||||
|
||||
@@ -64,7 +67,7 @@ watchEffect(()=>{
|
||||
let selectType = ref('')
|
||||
let selectData = reactive({data:[]})
|
||||
//点击选项
|
||||
let setSelectType = (num,data) => {
|
||||
let setSelectType = (num,data,item) => {
|
||||
if (seachType == 3) {
|
||||
if (num === selectType.value) {
|
||||
selectType.value = ''
|
||||
@@ -72,6 +75,10 @@ let setSelectType = (num,data) => {
|
||||
selectType.value = num
|
||||
selectData.data=data
|
||||
}
|
||||
}else if(seachType == 2){
|
||||
props.checkBtn(item.id,'types')
|
||||
}else if(seachType == 1){
|
||||
props.checkBtn(item.id,'school')
|
||||
}
|
||||
}
|
||||
//取消按钮
|
||||
@@ -81,7 +88,8 @@ let closeSeach = () => {
|
||||
|
||||
//确认按钮
|
||||
let selectSeach = (data) => {
|
||||
console.log(data)
|
||||
props.checkBtn(data,'location')
|
||||
// console.log(data)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user