javascript - 如何使用 typescript 实现 Iron-list 延迟加载?
问题描述
我想用 Iron-list 实现延迟加载。我正在为我的应用程序使用打字稿。我找到了这个例子。但它不适用于打字稿。向下滚动时不会触发该事件。单击列表项时触发。向下滚动时如何实现?我的铁列表是页面的一部分,所以当向下滚动到列表末尾时,我想从服务器添加更多结果
<iron-list .items=${this.items} as="item" scroll-target="scrollTheshold">
<template>
<div>content here.....</div>
</template>
</iron-list>
<iron-scroll-threshold id="scrollTheshold" lower-threshold="200" on-lower-threshold="${this._loadData()}">
</iron-scroll-threshold>
解决方案
推荐阅读
- java - 在 configServer 中添加过滤器
- regex - 如何使用验证器验证 asp 页面以验证文本框以允许 2 种不同长度的输入?
- java - JFrame颜色变化
- ruby-on-rails - 从 Mounted Gems 运行 Rspecs
- angular - Angular - TypeError:无法读取未定义的属性“jobTitle”
- javascript - 使用 javascript 检测可变字体支持
- python - 为什么在 JsonResponse 中使用非字典对象不好?
- go - 与 goroutine 混淆
- git - 多个开发人员如何在同一个功能(分支)上工作?
- javascript - 在 Ext Js 网格过滤器中未选中过滤器菜单的复选框时触发事件?