tencent.jquery.pix.component 1.0.66-beta1 → 1.0.66-beta2

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.
@@ -177,6 +177,7 @@ Waterfall.prototype.init = function () {
177
177
  // force 强制更新渲染
178
178
  Waterfall.prototype.updateVisibleItems = function (force = false) {
179
179
  const self = this;
180
+
180
181
  const options = this.options;
181
182
  let h = 0;
182
183
  if (options.scrollDom) {
@@ -187,6 +188,7 @@ Waterfall.prototype.updateVisibleItems = function (force = false) {
187
188
 
188
189
  const startTop = self.scrollTop; // 当前滚动位置
189
190
  const endTop = startTop + h;
191
+
190
192
  // console.log('startTop', startTop)
191
193
  console.log('endTop', endTop)
192
194
 
@@ -411,8 +413,10 @@ Waterfall.prototype.getMinHeightColumn = function () {
411
413
  }
412
414
 
413
415
  // 创建卡片
416
+
414
417
  Waterfall.prototype.createCards = function ({ end, dataId = -1 }, callback) {
415
418
  const self = this;
419
+
416
420
  const options = this.options;
417
421
 
418
422
  return new Promise((resolve) => {
@@ -736,7 +740,12 @@ Waterfall.prototype.showLoading = function (callback = null) {
736
740
  if (this.$loadingNode) {
737
741
  let loadingTop = this.getMaxHeight() + options.rowGap
738
742
  this.$loadingNode.css('transform', `translate(0px,${loadingTop}px)`);
739
- $node = this.$loadingNode
743
+ $node = this.$loadingNode;
744
+ window.requestAnimationFrame(() => {
745
+ setTimeout(() => {
746
+ this.$scrollDom.scrollTop(loadingTop + this.$loadingNode.height());
747
+ });
748
+ });
740
749
  }
741
750
 
742
751
  if (callback) callback($node)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tencent.jquery.pix.component",
3
- "version": "1.0.66-beta1",
3
+ "version": "1.0.66-beta2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "files": [