Merge branch 'dev_vite' of ssh://18.167.251.121:10002/aidlab/aida_front into dev_vite
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)=>{
|
const selectCollectionItem = (item:any)=>{
|
||||||
emit('selectCollectionItem',item)
|
console.log(item)
|
||||||
|
if(item.userLikeGroupVO?.groupDetails?.length > 0){
|
||||||
|
emit('selectCollectionItem',item)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onMounted(()=>{
|
onMounted(()=>{
|
||||||
getCreateList()
|
getCreateList()
|
||||||
@@ -55,9 +58,12 @@ defineExpose({getCreateList})
|
|||||||
<div class="list">
|
<div class="list">
|
||||||
<div v-for="(item,index) in list" :key="index" class="item" @click="selectCollectionItem(item)">
|
<div v-for="(item,index) in list" :key="index" class="item" @click="selectCollectionItem(item)">
|
||||||
<div class="imgList">
|
<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="">
|
<img :src="img.url" alt="">
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else class="img null">
|
||||||
|
<img src="@/assets/images/seller/selectCollectionNullStatus.png" alt="">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="detail">
|
<div class="detail">
|
||||||
<div class="name">{{item.name}}</div>
|
<div class="name">{{item.name}}</div>
|
||||||
@@ -123,6 +129,12 @@ defineExpose({getCreateList})
|
|||||||
border-radius: 1rem;
|
border-radius: 1rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
&.null{
|
||||||
|
background-color: transparent;
|
||||||
|
> img{
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
}
|
||||||
> img{
|
> img{
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ const setDomSize = (width: number)=>{
|
|||||||
if(!listingsBoxRef.value)return
|
if(!listingsBoxRef.value)return
|
||||||
let listDom = listingsBoxRef.value.querySelector('.list')
|
let listDom = listingsBoxRef.value.querySelector('.list')
|
||||||
let listItemDom = listDom.querySelector('.item')
|
let listItemDom = listDom.querySelector('.item')
|
||||||
let offsetWidth = listItemDom.getBoundingClientRect().width
|
let offsetWidth = listItemDom?.getBoundingClientRect?.()?.width
|
||||||
let lineNum = Math.floor(width / offsetWidth)
|
let lineNum = Math.floor(width / offsetWidth)
|
||||||
let itemNum = Math.floor((width - (lineNum - 1) * parseInt(gap.value[domSize.value])) / 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'
|
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
|
if(!listingsBoxRef.value)return
|
||||||
let listDom = listingsBoxRef.value.querySelector('.list')
|
let listDom = listingsBoxRef.value.querySelector('.list')
|
||||||
let listItemDom = listDom.querySelector('.item')
|
let listItemDom = listDom.querySelector('.item')
|
||||||
let offsetWidth = listItemDom.getBoundingClientRect().width
|
let offsetWidth = listItemDom?.getBoundingClientRect?.()?.width
|
||||||
let lineNum = Math.floor(width / offsetWidth)
|
let lineNum = Math.floor(width / offsetWidth)
|
||||||
let itemNum = Math.floor((width - (lineNum - 1) * parseInt(gap.value[domSize.value])) / 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'
|
listDom.style.maxWidth = ((itemNum - 1) * parseInt(gap.value[domSize.value]) + itemNum * (offsetWidth)) + 'px'
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ const {} = toRefs(data);
|
|||||||
<div class="shopping1">
|
<div class="shopping1">
|
||||||
<i class="fi fi-rr-shopping-bag-add"></i>
|
<i class="fi fi-rr-shopping-bag-add"></i>
|
||||||
</div>
|
</div>
|
||||||
<span>{{ item.price }}</span>
|
<span>{{ item.salesVolume || 0 }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="detailItem" v-if="type == 'listings'">
|
<div class="detailItem" v-if="type == 'listings'">
|
||||||
<div class="eye1">
|
<div class="eye1">
|
||||||
|
|||||||
Reference in New Issue
Block a user