瀑布流定位修改
This commit is contained in:
@@ -35,7 +35,7 @@ moduleData.data = props.data
|
|||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|
||||||
.list-item:hover{
|
.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 {
|
.list-item {
|
||||||
width: 291px;
|
width: 291px;
|
||||||
|
|||||||
@@ -169,10 +169,8 @@ watchEffect(() => {
|
|||||||
let listId = props.listId
|
let listId = props.listId
|
||||||
let imgRef = null
|
let imgRef = null
|
||||||
let loadFinish = () => {
|
let loadFinish = () => {
|
||||||
console.log(123)
|
// let height = imgRef.ctx.$refs && imgRef.ctx.$refs.list && imgRef.ctx.$refs.list.offsetHeight
|
||||||
return
|
// 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)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//监听路由
|
//监听路由
|
||||||
|
|||||||
@@ -125,8 +125,7 @@ let list = ref('')
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
listMasonryInstance = new Masonry(list.value, {
|
listMasonryInstance = new Masonry(list.value, {
|
||||||
itemSelector: '.item',
|
itemSelector: '.item',
|
||||||
gutter: 20,
|
gutter: 20
|
||||||
percentPosition: true
|
|
||||||
});
|
});
|
||||||
getDataList()
|
getDataList()
|
||||||
banner()
|
banner()
|
||||||
|
|||||||
@@ -115,8 +115,7 @@ let list = ref('')
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
listMasonryInstance = new Masonry(list.value, {
|
listMasonryInstance = new Masonry(list.value, {
|
||||||
itemSelector: '.item',
|
itemSelector: '.item',
|
||||||
gutter: 20,
|
gutter: 20
|
||||||
percentPosition: true
|
|
||||||
});
|
});
|
||||||
getDataList()
|
getDataList()
|
||||||
window.addEventListener('scroll', downLoadMore, true);
|
window.addEventListener('scroll', downLoadMore, true);
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
<pageTopBar :bannerList="bannerList.data.personHousing"></pageTopBar>
|
<pageTopBar :bannerList="bannerList.data.personHousing"></pageTopBar>
|
||||||
<seachModule :getDataList="setSeachSelectData"></seachModule>
|
<seachModule :getDataList="setSeachSelectData"></seachModule>
|
||||||
<div class="dis-f jus-x al-item">
|
<div class="dis-f jus-x al-item">
|
||||||
<div class="body-maxWidth mg-t-35">
|
<div class="body-maxWidth mg-t-35" ref="list">
|
||||||
<div v-show="dataList.data && dataList.data.length > 0" 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>
|
<biserialItem v-for="(item, i) in pageList" :key="i" :item="item"></biserialItem>
|
||||||
</div>
|
</div>
|
||||||
<div class="dis-f jus-x no-list-box al-item" v-show="dataList.data && dataList.data.length === 0">
|
<div class="dis-f jus-x no-list-box al-item" v-show="dataList.data && dataList.data.length === 0">
|
||||||
|
|||||||
@@ -161,7 +161,6 @@ onMounted(() => {
|
|||||||
listMasonryInstance = new Masonry(list.value, {
|
listMasonryInstance = new Masonry(list.value, {
|
||||||
itemSelector: '.item',
|
itemSelector: '.item',
|
||||||
gutter: 20,
|
gutter: 20,
|
||||||
percentPosition:true
|
|
||||||
});
|
});
|
||||||
masonryInstance = new Masonry(gridContainer.value, {
|
masonryInstance = new Masonry(gridContainer.value, {
|
||||||
itemSelector: '.item',
|
itemSelector: '.item',
|
||||||
|
|||||||
Reference in New Issue
Block a user