首页列表type不显示
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="item" v-if="itemData.type !== 'adv'" :class="{'waterfall-box-housing': itemData.type === 'housing'}" @click="watchInfo">
|
||||
<div class="item" v-if="itemData.type !== 'adv'" :class="{ 'waterfall-box-housing': itemData.type === 'housing' }" @click="watchInfo">
|
||||
<div class="flexflex pos-r">
|
||||
<img class="intermediary-type" v-if="itemData.isintermediary" src="@/assets/homeImage/intermediaryTabImg.png" />
|
||||
<div class="box-tab-type" v-else-if="itemData.intermediarytext">
|
||||
@@ -17,7 +17,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="long-title">
|
||||
<div class="type" v-if="itemData.type === 'housing' && itemData.gptype">{{ itemData.gptype }}</div>{{ itemData && itemData.title }}
|
||||
<div class="type" v-if="itemData.type === 'housing' && itemData.gptype">{{ itemData.gptype }}</div>
|
||||
{{ itemData && itemData.title }}
|
||||
</div>
|
||||
<div class="type-tab">
|
||||
<span v-if="itemData.type === 'housing'">
|
||||
@@ -27,7 +28,7 @@
|
||||
{{ `· ${itemData.gender}` }}
|
||||
{{ itemData.leaseterm ? `· ${itemData.leaseterm}` : "" }}
|
||||
</span>
|
||||
<span class="ellipsis" style="width: 272px;display: block;" v-if="itemData.type === 'apartment'">{{ itemData.propaganda }}</span>
|
||||
<span class="ellipsis" style="width: 272px; display: block;" v-if="itemData.type === 'apartment'">{{ itemData.propaganda }}</span>
|
||||
</div>
|
||||
<div style="padding: 0 10px; margin-top: 15px;" class="dis-f al-item" v-if="itemData.type === 'housing'">
|
||||
<img src="../../assets/homeImage/addMarker.png" class="add-marker" alt="" />
|
||||
@@ -87,13 +88,13 @@
|
||||
|
||||
<!-- 广告 -->
|
||||
</div>
|
||||
<img :src="itemData.imageLocal || itemData.image" :class="{'no-click': !itemData.path && !itemData.url}" class="live-img item" v-if="itemData.type === 'adv'" alt="" @click="watchAdv" />
|
||||
<img :src="itemData.imageLocal || itemData.image" :class="{ 'no-click': !itemData.path && !itemData.url }" class="live-img item" v-if="itemData.type === 'adv'" alt="" @click="watchAdv" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {defineProps, reactive, watchEffect} from "vue"
|
||||
import { defineProps, reactive, watchEffect } from "vue"
|
||||
import store from "../../store/index"
|
||||
import {useRouter} from "vue-router"
|
||||
import { useRouter } from "vue-router"
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
@@ -103,7 +104,7 @@ const props = defineProps({
|
||||
},
|
||||
})
|
||||
let itemData = props.data
|
||||
let location = reactive({data: {}})
|
||||
let location = reactive({ data: {} })
|
||||
location.data = store.state.indexData.config.location
|
||||
|
||||
let router = useRouter()
|
||||
@@ -292,10 +293,11 @@ watchEffect(() => {
|
||||
display: -webkit-box;
|
||||
line-height: 28px;
|
||||
|
||||
|
||||
.type {
|
||||
width: 34px;
|
||||
height: 20px;
|
||||
display: flex;
|
||||
// display: flex;
|
||||
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
@@ -305,7 +307,7 @@ watchEffect(() => {
|
||||
line-height: 20px;
|
||||
background-color: rgba(51, 51, 51, 1);
|
||||
display: inline-block;
|
||||
float: left;
|
||||
// float: left;
|
||||
border-radius: 5px;
|
||||
margin-right: 10px;
|
||||
margin-top: 4px;
|
||||
|
||||
@@ -366,7 +366,7 @@ let setSchoolData = () => {
|
||||
// }
|
||||
|
||||
let width = accumulationWidth + getStrWidth(arr[i].name) + 20
|
||||
if (width > 380) { // 下一个二维数组
|
||||
if (width > 380) {
|
||||
num++
|
||||
accumulationWidth = getStrWidth(arr[i].name) + 20
|
||||
} else accumulationWidth = width
|
||||
@@ -374,8 +374,6 @@ let setSchoolData = () => {
|
||||
if (!shcoolData[num]) shcoolData[num] = []
|
||||
shcoolData[num].push(arr[i])
|
||||
}
|
||||
// console.log(shcoolData);
|
||||
// console.log(schoolSelectObj)
|
||||
}
|
||||
|
||||
// 计算字符串在屏幕的显示宽度
|
||||
|
||||
Reference in New Issue
Block a user