mirror of
https://github.com/ialley-workshop-open/uni-halo.git
synced 2025-05-19 18:10:15 +09:00
fix: 修复图库瀑布流模式无数据下,切换其他分类有数据不显示数据bug
This commit is contained in:
parent
da60eb2daf
commit
706cee2240
@ -111,13 +111,13 @@ export default {
|
||||
this.dataList = []
|
||||
this.isLoadMore = false;
|
||||
this.queryParams.page = 1;
|
||||
this.fnGetData();
|
||||
this.fnGetData(true);
|
||||
},
|
||||
onReachBottom(e) {
|
||||
if (this.hasNext) {
|
||||
this.queryParams.page += 1;
|
||||
this.isLoadMore = true;
|
||||
this.fnGetData();
|
||||
this.fnGetData(false);
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
@ -131,16 +131,8 @@ export default {
|
||||
this.queryParams.group = this.category.list[index].name;
|
||||
this.queryParams.page = 1;
|
||||
this.fnToTopPage();
|
||||
if (this.galleryConfig.useWaterfall) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.wafll.clear();
|
||||
this.dataList = [];
|
||||
this.fnGetData();
|
||||
})
|
||||
} else {
|
||||
this.dataList = [];
|
||||
this.fnGetData();
|
||||
}
|
||||
this.fnGetData(true);
|
||||
},
|
||||
fnGetCategory() {
|
||||
this.$httpApi.v2.getPhotoGroupList({
|
||||
@ -155,11 +147,11 @@ export default {
|
||||
});
|
||||
if (this.category.list.length !== 0) {
|
||||
this.queryParams.group = this.category.list[0].name;
|
||||
this.fnGetData();
|
||||
this.fnGetData(true);
|
||||
}
|
||||
});
|
||||
},
|
||||
fnGetData() {
|
||||
fnGetData(isClearWallfull = false) {
|
||||
// 设置状态为加载中
|
||||
if (!this.isLoadMore) {
|
||||
this.loading = 'loading';
|
||||
@ -182,6 +174,9 @@ export default {
|
||||
}
|
||||
if (this.galleryConfig.useWaterfall) {
|
||||
this.$nextTick(() => {
|
||||
if(isClearWallfull){
|
||||
this.$refs.wafll.clear()
|
||||
}
|
||||
this.$refs.wafll.pushData(_list)
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user