fix
This commit is contained in:
BIN
src/assets/images/seller/selectCollectionNullStatus.png
Normal file
BIN
src/assets/images/seller/selectCollectionNullStatus.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
@@ -41,7 +41,10 @@ const getCreateList = ()=>{
|
||||
})
|
||||
}
|
||||
const selectCollectionItem = (item:any)=>{
|
||||
emit('selectCollectionItem',item)
|
||||
console.log(item)
|
||||
if(item.userLikeGroupVO?.groupDetails?.length > 0){
|
||||
emit('selectCollectionItem',item)
|
||||
}
|
||||
}
|
||||
onMounted(()=>{
|
||||
getCreateList()
|
||||
@@ -55,9 +58,12 @@ defineExpose({getCreateList})
|
||||
<div class="list">
|
||||
<div v-for="(item,index) in list" :key="index" class="item" @click="selectCollectionItem(item)">
|
||||
<div class="imgList">
|
||||
<div v-for="(img,index) in item.userLikeGroupVO?.groupDetails" :key="index" class="img">
|
||||
<div v-if="item.userLikeGroupVO?.groupDetails?.length > 0" v-for="(img,index) in item.userLikeGroupVO?.groupDetails" :key="index" class="img">
|
||||
<img :src="img.url" alt="">
|
||||
</div>
|
||||
<div v-else class="img null">
|
||||
<img src="@/assets/images/seller/selectCollectionNullStatus.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div class="name">{{item.name}}</div>
|
||||
@@ -123,6 +129,12 @@ defineExpose({getCreateList})
|
||||
border-radius: 1rem;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
&.null{
|
||||
background-color: transparent;
|
||||
> img{
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
> img{
|
||||
object-fit: cover;
|
||||
height: 100%;
|
||||
|
||||
@@ -83,7 +83,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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user