This commit is contained in:
X1627315083@163.com
2026-04-28 15:30:47 +08:00
parent 00d488cbc2
commit 7115feb20c
5 changed files with 17 additions and 5 deletions

View File

@@ -192,7 +192,7 @@ const setDomSize = (width: number)=>{
if(!listingsBoxRef.value)return
let listDom = listingsBoxRef.value.querySelector('.list')
let listItemDom = listDom.querySelector('.item')
let offsetWidth = listItemDom.getBoundingClientRect().width
let offsetWidth = listItemDom?.getBoundingClientRect?.()?.width
let lineNum = Math.floor(width / offsetWidth)
let itemNum = Math.floor((width - (lineNum - 1) * parseInt(gap.value[domSize.value])) / offsetWidth)
listDom.style.maxWidth = ((itemNum - 1) * parseInt(gap.value[domSize.value]) + itemNum * (offsetWidth)) + 'px'

View File

@@ -58,7 +58,7 @@ const {} = toRefs(data);
<div class="shopping1">
<i class="fi fi-rr-shopping-bag-add"></i>
</div>
<span>{{ item.price }}</span>
<span>{{ item.salesVolume || 0 }}</span>
</div>
<div class="detailItem" v-if="type == 'listings'">
<div class="eye1">