筛选
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<pageTopBar></pageTopBar>
|
||||
<!-- <seachModule></seachModule> -->
|
||||
<!-- 筛选 -->
|
||||
<div class="screen-box wid1200">
|
||||
<seach-module></seach-module>
|
||||
</div>
|
||||
|
||||
<div class="list wid1200 flexflex" ref="gridContainer">
|
||||
<apartment-item v-for="item in list" :item="item"></apartment-item>
|
||||
</div>
|
||||
@@ -15,7 +19,7 @@
|
||||
<script setup>
|
||||
|
||||
import pageTopBar from '../../components/pageTopBar/pageTopBar.vue';
|
||||
import seachModule from "../../components/seachModule/seachModule.vue";
|
||||
import seachModule from "@/components/apartment/seachModule.vue";
|
||||
import biserialItem from '../../components/biserialListItem/biserialListItem.vue'
|
||||
import apartmentItem from '@/components/public/apartment-item.vue';
|
||||
import haveQuestions from '@/components/public/have-questions.vue'
|
||||
@@ -41,7 +45,7 @@ let masonryInstance = null
|
||||
onMounted(() => {
|
||||
masonryInstance = new Masonry(gridContainer.value, {
|
||||
itemSelector: '.item',
|
||||
gutter: 10
|
||||
gutter: 20
|
||||
});
|
||||
|
||||
getData()
|
||||
@@ -57,8 +61,8 @@ let page = 1
|
||||
const getData = () => {
|
||||
|
||||
if (page == 0) return
|
||||
|
||||
|
||||
|
||||
|
||||
loading = ElLoading.service({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
@@ -74,11 +78,11 @@ const getData = () => {
|
||||
page = data.page * data.limit >= data.count ? 0 : page + 1,
|
||||
|
||||
|
||||
nextTick(() => {
|
||||
masonryInstance.reloadItems();
|
||||
masonryInstance.layout();
|
||||
loading.close()
|
||||
})
|
||||
nextTick(() => {
|
||||
masonryInstance.reloadItems();
|
||||
masonryInstance.layout();
|
||||
loading.close()
|
||||
})
|
||||
}).catch(err => {
|
||||
loading.close()
|
||||
})
|
||||
@@ -101,6 +105,10 @@ const handleScroll = () => {
|
||||
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.screen-box {
|
||||
margin: 0 auto 20px;
|
||||
}
|
||||
|
||||
.list {
|
||||
margin: 0 auto;
|
||||
flex-wrap: wrap;
|
||||
|
||||
Reference in New Issue
Block a user