# yuPullRefreshList 下拉刷新上拉加载组件
TIP
yuPullRefreshList
,可用于列表查询页面,将列表内容以插槽的形式嵌入组件,实现下拉的时触发刷新,上拉时触发加载更多数据。
# 效果预览
<template>
<yu-pull-refresh-list ref="refHisList" :api="getHisList" :queryParams="doneQueryParams" @loaded="(list, total) => (listTotal = total)">
<template #default="slotProps">
<h5>{{ slotProps.item }}</h5>
</template>
</yu-pull-refresh-list>
<template>
<script>
import yuPullRefreshList from '@/components/yuPullRefreshList/index';
export default {
components: {
yuPullRefreshList
},
data() {
return: {
}
},
methods: {
},
}
</script>
# Attributes
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
api | 列表接口 | String | - | - |
queryParams | 列表固定查询参数 | Object | - | - |
page | 起始页 | Number | - | 1 |
size | 没有加载的数据 | Number | - | 10 |
defaultLoad | 是否默认加载数据 | Boolean | - | true |
# events
方法名 | 说明 | 参数 |
---|---|---|
loaded | 列表加载完成时间 | resData-列表请求数据, total-列表数据数据 |
# slot
名称 | 说明 | 参数 |
---|---|---|
default | 默认插槽 | - |