tencent.jquery.pix.component 1.0.67 → 1.0.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@ const DEFAULTS = {
12
12
  marginTop: 0, // 距离顶部距离
13
13
  marginBottom: 12, // 最后一行距离底部距离
14
14
  bufferHeight: '2rem', // 缓冲高度,进行可能的预先添加高度
15
- startPoints: [], // 起始点坐标
15
+ startPoints: [], // 起始点距离
16
16
  data: [], // 数据源
17
17
  container: '', // 容器元素
18
18
  renderItem(data, index) { // 元素首次渲染时的回调函数, 如果把updateItem设置为空,那么更新时则会兜底触发renderItem
@@ -803,6 +803,26 @@ Waterfall.prototype.setScrollHeight = function () {
803
803
  $container.find('.waterfall-list-scroll').css('height', h + 'px');
804
804
  }
805
805
 
806
+ // 销毁自己
807
+ Waterfall.prototype.destroy = function () {
808
+ const options = this.options;
809
+ const $container = $(options.container);
810
+ $container.html('');
811
+ this.activeNodes.clear();
812
+ this.allReadyNodes.clear();
813
+ this.dataIdMap.clear();
814
+ this.renderedDataIds.clear();
815
+ this.nodePool = [];
816
+ this.columnItems = [];
817
+ this.columns = 0;
818
+ this.columnWidth = 0;
819
+ this.renderIndex = 0;
820
+ this.scrollTop = 0;
821
+ this.isShowLoading = false;
822
+ this.$loadingNode = null;
823
+ this.$scrollDom = null;
824
+ }
825
+
806
826
  function createDefaultRow({ top, left }) {
807
827
  return {
808
828
  top,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tencent.jquery.pix.component",
3
- "version": "1.0.67",
3
+ "version": "1.0.68",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "files": [