|
@@ -0,0 +1,58 @@
|
|
|
+<template>
|
|
|
+ <view class="center">
|
|
|
+ <u-tabs-swiper ref="uTabs" :list="tabList" :current="current" @change="tabsChange" :is-scroll="false"></u-tabs-swiper>
|
|
|
+ <swiper :current="current" @animationfinish="transition">
|
|
|
+ <swiper-item class="swiper-item">
|
|
|
+ <scroll-view scroll-y @scrolltolower="onreachBottom"><u-loadmore :status="tabList[0].loding"></u-loadmore></scroll-view>
|
|
|
+ </swiper-item>
|
|
|
+ <swiper-item class="swiper-item">
|
|
|
+ <scroll-view scroll-y @scrolltolower="onreachBottom"><u-loadmore :status="tabList[1].loding"></u-loadmore></scroll-view>
|
|
|
+ </swiper-item>
|
|
|
+ </swiper>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ current: 0, //当前选中的标签
|
|
|
+ tabList: [
|
|
|
+ {
|
|
|
+ name: '十年',
|
|
|
+ list:[],
|
|
|
+ pages:1,
|
|
|
+ limit:10,
|
|
|
+ loding:'loadmore'//loading加载中 nomore没有数据
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '青春',
|
|
|
+ pages:1,
|
|
|
+ limit:10,
|
|
|
+ list:[],
|
|
|
+ loding:'loadmore'//loading加载中 nomore没有数据
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ },
|
|
|
+ //页面加载即刻发生
|
|
|
+ onload() {},
|
|
|
+ methods: {
|
|
|
+ // 内容框切换事件
|
|
|
+ transition(e) {
|
|
|
+ console.log(e);
|
|
|
+ },
|
|
|
+ // tab切换事件
|
|
|
+ tabsChange(e) {
|
|
|
+ console.log(e);
|
|
|
+ },
|
|
|
+ // 下拉到底部加载事件
|
|
|
+ onreachBottom(e) {
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss">
|
|
|
+.center {
|
|
|
+}
|
|
|
+</style>
|