Commit b4833a23 authored by liwei's avatar liwei

增加了下拉刷新以及回到顶部功能

parent 7db0d8c6
......@@ -12,7 +12,7 @@
'top': '210rpx',
'width': '447rpx',
'height': '375rpx'
}" v-model="dataList" @query="queryList" :fixed="false">
}" v-model="dataList" @query="queryList" :fixed="false" @onRefresh="onRefresh" auto-show-back-to-top="true">
<view v-if="currentIndex == '2'">
<u-tabs ref="tabs" :list="topicList" font-size="30" :current="current" @click="tabClick"
:activeStyle="{
......@@ -106,6 +106,14 @@
},
},
methods: {
// 下拉刷新被触发
onRefresh() {
// 告知z-paging下拉刷新结束,这样才可以开始下一次的下拉刷新
setTimeout(() => {
// 1.5秒之后停止刷新动画
this.reload()
}, 1500)
},
//tab标签点击
tabClick({id}) {
this.topicId = id
......
......@@ -199,8 +199,8 @@
width: 90rpx;
height: 90rpx;
position: fixed;
bottom: 100rpx;
right: 56rpx;
bottom: 20rpx;
right: 30rpx;
z-index: 99;
box-shadow: 0rpx 0rpx 24rpx 2rpx rgba(181, 202, 252, 0.84);
background: #86A6F3;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment