如何使用
<lx-list :api="apiDemo" >
<template v-slot="{ item, index }">
<view>列表每一项的展示方式...</view>
</template>
</lx-list>
Props
参数 | 说明 | 类型 | 默认值 | 可选值 |
---|---|---|---|---|
api | 数据请求的接口API | Function | - | - |
afterLoadData | 数据请求完成前置处理数据方法 | Function | - | - |
options | 数据请求的额外参数 | object | {} | - |
listType | 分页列表使用scrollView还是默认view | string | default | scrollView |
Methods
此方法如要通过ref手动调用名称 | 说明 | 参数 |
---|---|---|
setListParams | 用于刷新列表请求。使用ref.value.setListParams(obj, isClear) obj:请求额外的参数 isClear是否清空请求参数 | Function(obj, isClear) |