首页接口

This commit is contained in:
2023-07-13 10:07:16 +08:00
parent 5dcf49533d
commit 6ad28c4f0a
8 changed files with 306 additions and 245 deletions

View File

@@ -7,16 +7,16 @@
<div style="padding:0 0 0 18px;">
<div class="info-box-bg">
<div class="box"
:class="[{ 'jus-sp': seachType === '1' || seachType === '3' }, { 'pad-15': seachType === '3' }]">
<div @click="setSelectType(i + 1,item.data)" v-for="(item, i) in btn" :key="i" :class="[
:class="[{ 'pad-15': seachType === '3' }]">
<div @click="setSelectType(i + 1,item.data)" v-for="(item, i) in btn.data" :key="i" :class="[
{ 'btn': seachType === '1' },
{ 'mg-l-15': seachType === '1' && i % 4 !== 0 },
{ 'mg-l-17': seachType === '1' && i % 4 !== 0 },
{ 'seach-long-btn btn': seachType === '2' },
{ 'mg-l-15': seachType === '2' && i % 3 !== 0 },
{ 'mg-l-17': seachType === '2' && i % 3 !== 0 },
{ 'select-btn': seachType === '3' },
{ 'mg-l-15': seachType === '3' && i + 1 !== 1 }, { 'select-btn-click': seachType === '3' && i + 1 === selectType }
{ 'mg-l-17': seachType === '3' && i + 1 !== 1 }, { 'select-btn-click': seachType === '3' && i + 1 === selectType }
]">
{{ item.text }}
{{ item.name }}
<img v-if="seachType === '3'"
:src="selectType === i + 1 ? require('../../assets/homeImage/seachSelectBtn.svg') : require('../../assets/homeImage/selectImg.svg')"
class="img" alt="">
@@ -32,7 +32,7 @@
</template>
<script setup>
import { reactive, ref } from 'vue';
import { reactive, ref, watchEffect } from 'vue';
import checkBoxGroup from "../checkGroup/checkBoxGroup.vue";
const props = defineProps({
@@ -54,9 +54,13 @@ const props = defineProps({
let seachType = props.seachType
let title = props.title
let btn = JSON.parse(JSON.stringify(props.btn))
//
let btn = reactive({data:[]})
//数据更新监听
watchEffect(()=>{
btn.data= JSON.parse(JSON.stringify(props.btn))
})
//
let selectType = ref('')
let selectData = reactive({data:[]})
//点击选项
@@ -215,8 +219,8 @@ let selectSeach = (data) => {
cursor: pointer;
}
.mg-l-15 {
margin-left: 15px;
.mg-l-17 {
margin-left: 17px;
}
}