首页 > 解决方案 > 如何使用 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>

标签: javascripttypescriptlazy-loadingpolymer-3.xiron-list

解决方案


推荐阅读