寺庙列表加载功能多

This commit is contained in:
2022-03-30 13:31:00 +08:00
parent 2f4bd26b22
commit 804efb793b
9 changed files with 147 additions and 13 deletions
+7 -4
View File
@@ -30,8 +30,7 @@
<div class="temple-list-container" :style="{height: containerHeight + 'px'}" v-if="mode === 'list'" >
<scroll-view
class="temple-container content"
class="temple-container content"
:height="containerHeight - 20"
ref="scroll"
pulldown
@@ -66,7 +65,8 @@ export default {
lng: '',
lat: '',
map: null,
positioning: false
positioning: false,
noMore: false,
}
},
inject: ['root', 'parentHeight'],
@@ -126,6 +126,7 @@ export default {
this.templeList = res.results;
} else {
this.templeList = this.templeList.concat(res.results);
this.noMore = res.results.length < 10;
}
if(this.mode === 'map'){
this.setMarker();
@@ -171,7 +172,9 @@ export default {
this.getTempleList();
},
loadMore(){
console.log('加载更多')
if(this.noMore) return;
this.page += 1;
this.getTempleList();
},
refresh(){
console.log('refresh')