|
@@ -7,12 +7,24 @@
|
|
|
:color="'#FA4A4A'"
|
|
|
:title-active-color="'rgba(51, 51, 51, 1)'"
|
|
|
:title-inactive-color="'#666666'"
|
|
|
- ref="myTabs">
|
|
|
+ ref="myTabs"
|
|
|
+ @change="handleTabChange">
|
|
|
<van-tab title="全部"></van-tab>
|
|
|
<van-tab title="收入"></van-tab>
|
|
|
<van-tab title="提现"></van-tab>
|
|
|
</van-tabs>
|
|
|
- <Main/>
|
|
|
+ <Main
|
|
|
+ :financeType="0"
|
|
|
+ v-show="numActiveTab === 0"
|
|
|
+ ref="all"/>
|
|
|
+ <Main
|
|
|
+ :financeType="1"
|
|
|
+ v-show="numActiveTab === 1"
|
|
|
+ ref="income"/>
|
|
|
+ <Main
|
|
|
+ :financeType="2"
|
|
|
+ v-show="numActiveTab === 2"
|
|
|
+ ref="withdrawCash"/>
|
|
|
<van-popup
|
|
|
class="fbt-van-popup"
|
|
|
v-model="showDetail"
|
|
@@ -69,6 +81,15 @@ export default {
|
|
|
setTimeout(() => {
|
|
|
this.$refs.myTabs.resize()
|
|
|
}, 500)
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ handleTabChange (val) {
|
|
|
+ const allScrolls = ['all', 'income', 'withdrawCash']
|
|
|
+ this.$nextTick(() => {
|
|
|
+ const scroll = this.$refs[allScrolls[val]].scroll
|
|
|
+ scroll && scroll.refresh()
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|