瀑布流定位修改

This commit is contained in:
luJianJun 2023-08-09 15:00:02 +08:00
parent 497b50f7c8
commit a503d2e292
6 changed files with 7 additions and 12 deletions

View File

@ -35,7 +35,7 @@ moduleData.data = props.data
<style scoped lang="less">
.list-item:hover{
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.2) !important;
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.2) ;
}
.list-item {
width: 291px;

View File

@ -169,10 +169,8 @@ watchEffect(() => {
let listId = props.listId
let imgRef = null
let loadFinish = () => {
console.log(123)
return
let height = imgRef.ctx.$refs && imgRef.ctx.$refs.list && imgRef.ctx.$refs.list.offsetHeight
props.imgLoad(data.id, listId, height)
// let height = imgRef.ctx.$refs && imgRef.ctx.$refs.list && imgRef.ctx.$refs.list.offsetHeight
// props.imgLoad(data.id, listId, height)
}
//

View File

@ -125,8 +125,7 @@ let list = ref('')
onMounted(() => {
listMasonryInstance = new Masonry(list.value, {
itemSelector: '.item',
gutter: 20,
percentPosition: true
gutter: 20
});
getDataList()
banner()

View File

@ -115,8 +115,7 @@ let list = ref('')
onMounted(() => {
listMasonryInstance = new Masonry(list.value, {
itemSelector: '.item',
gutter: 20,
percentPosition: true
gutter: 20
});
getDataList()
window.addEventListener('scroll', downLoadMore, true);

View File

@ -3,8 +3,8 @@
<pageTopBar :bannerList="bannerList.data.personHousing"></pageTopBar>
<seachModule :getDataList="setSeachSelectData"></seachModule>
<div class="dis-f jus-x al-item">
<div class="body-maxWidth mg-t-35">
<div v-show="dataList.data && dataList.data.length > 0" ref="list">
<div class="body-maxWidth mg-t-35" ref="list">
<div v-show="dataList.data && dataList.data.length > 0" style="width:1200px;">
<biserialItem v-for="(item, i) in pageList" :key="i" :item="item"></biserialItem>
</div>
<div class="dis-f jus-x no-list-box al-item" v-show="dataList.data && dataList.data.length === 0">

View File

@ -161,7 +161,6 @@ onMounted(() => {
listMasonryInstance = new Masonry(list.value, {
itemSelector: '.item',
gutter: 20,
percentPosition:true
});
masonryInstance = new Masonry(gridContainer.value, {
itemSelector: '.item',