Skip to content

InfiniteScrollView-DEMO ​


vue
<fv-InfiniteScrollView v-model="value">
</fv-InfiniteScrollView>

属性 ​


属性类型必填默认值说明
modelValuearray否[]要装载的数组。
batchSizenumber否30动态加载的每一批次大小。
offsetnumber否100滚动加载偏移量。
staticboolean否false是否取消动态加载。
themestring否'global'主题样式。支持 global、light、dark、system 和 custom。
disabledboolean否false参见组件的 disabled 选项。
langstring否"global"参见组件的 lang 选项。

事件 ​


事件名参数说明
lazyloadboolean动态加载时触发此事件,返回当前加载批次数据是否为空。
init-startN/A初始化加载开始。
init-endN/A初始化加载结束。

插槽 ​


  1. Default

默认模板, 可将InfiniteScrollView当作Div来使用

vue
<slot :thisValue="thisValue" :dynamicValue="dynamicValue">
    <p v-for="(item, index) in dynamicValue" :key="index">{{item}}</p>
</slot>
  • thisValue: 传入数组
  • dynamicValue: 已动态加载的数组
<template v-slot:default="x">
    <p v-for="(item, index) in x.dynamicValue" :key="index">{{item}}</p>
</template>

MIT Licensed