You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.2 KiB
1.2 KiB
bi.virtual_list
一个动态加载的列表项,事先可以不知道列表项高度,可以处理大列表,基类BI.Widget
{% method %} source
{% common %}
BI.createWidget({
type: "bi.virtual_list",
element:"body",
items: BI.map([{value: "xxxx"}], function (i, item) {
return BI.extend({}, item, {
type: "bi.label",
height: 30,
text: (i + 1) + "." + item.text,
});
})
})
{% endmethod %}
API
基础属性
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
items | 子组件数组 | array | — | [ ] |
blockSize | 滚动加载的个数 | number | — | 10 |
overscanHeight | 超出可视范围区域的高度 | number | — | 100 |
scrollTop | 滚动条相对于顶部的偏移 | number | — | 0 |
对外方法
名称 | 说明 | 回调参数 |
---|---|---|
render | 渲染列表 | — |
mounted | 组件挂载 | — |
restore | 还原列表设置 | — |
populate | 刷新列表 | items |
destroyed | 销毁组件 | — |