更新记录
1.0.0(2021-07-09)
init
平台兼容性
虚拟滚动列表组件
测试大数据计算虚拟列表渲染,要求每行高度要一致。
学习案例,不建议在项目中使用。
使用
<mo-virtual-scroller
:list="list">
<template #header>
<view>顶部插槽</view>
</template>
<template #bottom>
<view>底部插槽</view>
</template>
<!-- 渲染列表 -->
<template v-slot="{ data }">
<view> {{ data.value }} </view>
</template>
</mo-virtual-scroller>
属性
属性/事件 | 说明 | 类型 | 默认值 |
---|---|---|---|
list | 传入大数据 | Array | [] |
itemKey | 对应数组for循环的唯一标识字段key | String | 'id' |
flex | 标题是否悬浮在顶部 | Boolean | true |
@scroll | 滚动事件 | Function | ()=>{} |