下拉刷新
<template>
<view>
<view>这是列表页</view>
<view v-for="item in list">
{
{item}}
</view>
<button @click="pulldown">下拉刷新</button>
</view>
</template>
<script>
export default{
data(){
return{
list:[
'前端','JAVA','UI','测试','大数据'
]
}
},
onPullDownRefresh() {
console.log("触发")
setTimeout(()=>{
this.list = [
'前端1','1JAVA','U2I','测3试','大数3据'
]
uni.stopPullDownRefresh()
},2000)
},
methods:{
pulldown(){
uni.startPullDownRefresh()
}
}
}
</script>
<style>
</style>
上拉加载
<template>
<view>
<view>这是列表页</view>
<view class="box-item" v-for="item in list&