|
|
@ -8,7 +8,7 @@ |
|
|
<swiper-item v-for="(tabItem, tabIndex) in tab_list" :key="tabIndex"> |
|
|
<swiper-item v-for="(tabItem, tabIndex) in tab_list" :key="tabIndex"> |
|
|
<scroll-view class="com" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="tabItem.isRefresher" @scrolltolower="onScrolltolower" @refresherrefresh="onRefresherrefresh"> |
|
|
<scroll-view class="com" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="tabItem.isRefresher" @scrolltolower="onScrolltolower" @refresherrefresh="onRefresherrefresh"> |
|
|
<view class="lf-m-t-20"></view> |
|
|
<view class="lf-m-t-20"></view> |
|
|
<lf-waterfall :list="tabItem.list" ref="uWaterfall"></lf-waterfall> |
|
|
|
|
|
|
|
|
<lf-waterfall :list="tabItem.list" :listlength="tab_list.length" :tabindex='tabIndex' ref="uWaterfallFather"></lf-waterfall> |
|
|
<view class="loading-more lf-m-b-10"> |
|
|
<view class="loading-more lf-m-b-10"> |
|
|
<text :class="{'loading-more-text': tabItem.loadingClass}" v-if="tabItem.list.length">{{tabItem.loadingText}}</text> |
|
|
<text :class="{'loading-more-text': tabItem.loadingClass}" v-if="tabItem.list.length">{{tabItem.loadingText}}</text> |
|
|
<lf-nocontent v-else></lf-nocontent> |
|
|
<lf-nocontent v-else></lf-nocontent> |
|
|
@ -91,6 +91,10 @@ |
|
|
}, |
|
|
}, |
|
|
tabChange(index){ |
|
|
tabChange(index){ |
|
|
this.current = index; |
|
|
this.current = index; |
|
|
|
|
|
this.clearTabItem() |
|
|
|
|
|
console.log(this.$refs) |
|
|
|
|
|
console.log('当前数据',this.tab_list[index]) |
|
|
|
|
|
console.log('组件中的数据',this.$refs.uWaterfallFather[this.current].dataList) |
|
|
if(this.tab_list[index].list.length <= 0){ |
|
|
if(this.tab_list[index].list.length <= 0){ |
|
|
this.getData(); // tab下没有数据,请求第一页 |
|
|
this.getData(); // tab下没有数据,请求第一页 |
|
|
} |
|
|
} |
|
|
@ -127,7 +131,8 @@ |
|
|
tab_item.loadingText = '正在加载中'; |
|
|
tab_item.loadingText = '正在加载中'; |
|
|
tab_item.list = []; |
|
|
tab_item.list = []; |
|
|
this.$set(this.tab_list, this.current, tab_item); |
|
|
this.$set(this.tab_list, this.current, tab_item); |
|
|
this.$refs.uWaterfall[this.current].clear(); |
|
|
|
|
|
|
|
|
this.$refs.uWaterfallFather[this.current].clear(); |
|
|
|
|
|
console.log('当前方法删除',this.$refs.uWaterfallFather[this.current]) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|