寺庙列表加载功能多
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user