<template>
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
<div class="page-container border-box">
</div>
</van-pull-refresh>
</template>
<script>
import { Calendar as VanCalendar, PullRefresh as VanPullRefresh } from 'vant';```
//方法
methods: {
getData() {
getEarningsDetails({
custId: this.$store.state.user.info.basCustomer.id,
pageSize: this.pageSize,
sysAccount: this.$store.state.user.info.basCustomer.sysAccount,
}).then((res) => {
console.log(res);
}).catch((err) => {
console.log(err);
});
},
// 下拉刷新
onRefresh() {
setTimeout(() => {
this.$toast('刷新成功');
this.isLoading = false;
}, 1000);
this.pageSize = this.pageSize + 6;
// 下拉刷新,获取用户收益记录
this.getData();
},
移动端vue下拉刷新
最新推荐文章于 2023-11-09 15:42:38 发布