提交 c255113a authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw

fix: 移动端首页加载更多不自动消失

上级 71a78c05
<template>
<view class="page">
<swiper indicator-dots="true">
<view class="page de-main">
<!-- <swiper indicator-dots="true">
<swiper-item v-for="(img, key) in imgUrls" :key="key"><image :src="img" /></swiper-item>
</swiper>
</swiper> -->
<view class=" ">
<view class="uni-title">
......@@ -100,4 +100,7 @@ swiper,
.page-section-title {
margin-top: 50rpx;
}
.de-main {
padding-top: 60rpx;
}
</style>
......@@ -14,11 +14,28 @@
<view v-for="(newsitem,index2) in tab.data" :key="newsitem.id">
<media-item :options="newsitem" @close="close(index1,index2)" @click="goDetail(newsitem)"></media-item>
</view>
<view class="loading-more" v-if="tab.isLoading || tab.data.length > 12">
<view class="loading-more" v-if="tab.isLoading">
<text class="loading-more-text">{{tab.loadingText}}</text>
</view>
</scroll-view>
<!-- #endif -->
<!-- <uni-list>
<uni-list-item
v-for="(node, i) in tab.data"
:key="i"
clickable
@click="goDetail(node)"
:title="node.title"
thumb="../../../static/yibiaobans.png"
thumb-size="base"
:rightText="node.rightText"
/>
</uni-list> -->
</swiper-item>
</swiper>
</view>
......@@ -112,6 +129,7 @@
}
}
activeTab.isLoading = false
uni.stopPullDownRefresh()
})
......@@ -170,10 +188,12 @@
}
})
},
loadMore(e) {
loadMore(index) {
let activeTab = this.newsList[index]
activeTab.isLoading = true
setTimeout(() => {
this.getList(this.tabIndex);
}, 500)
}, 1000)
},
ontabtap(e) {
let index = e.target.dataset.current || e.currentTarget.dataset.current;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论