@dolphinweex/weex-vue-render 0.2.21 → 0.2.22

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.
@@ -7406,7 +7406,7 @@ var slideMixin = {
7406
7406
  this._clones = [];
7407
7407
  this.innerOffset = 0;
7408
7408
  this._indicator = null;
7409
- this.cloneIndex = Boolean(this.infinite) //需要减或者加去克隆下标
7409
+ this.cloneIndex = this.frameCount > 1 ? Boolean(this.infinite) : 0 //需要减或者加去克隆下标
7410
7410
  },
7411
7411
 
7412
7412
  beforeUpdate: function beforeUpdate () {
@@ -7615,7 +7615,7 @@ var slideMixin = {
7615
7615
  this.innerOffset += step * this._wrapperWidth;
7616
7616
 
7617
7617
  // 克隆处理:先执行正常动画到克隆的最后一张,再瞬间跳回真实的第一张
7618
- if (this.infinite && index >= this.frameCount - 1) {
7618
+ if (this.frameCount > 1 && this.infinite && index >= this.frameCount - 1) {
7619
7619
  // 先滑到克隆的 `第一张`
7620
7620
  newIndex = this.frameCount - 1;
7621
7621
  this.innerOffset = -newIndex * this._wrapperWidth;
@@ -7629,7 +7629,7 @@ var slideMixin = {
7629
7629
  this.innerOffset = -this._wrapperWidth; // 瞬间跳到 `第一张`
7630
7630
  inner.style.left = `${this.innerOffset}px`;
7631
7631
  }, TRANSITION_TIME);
7632
- } else if (this.infinite && index <= 0) {
7632
+ } else if (this.frameCount > 1 && this.infinite && index <= 0) {
7633
7633
  // 先滑到克隆的 `最后一张`
7634
7634
  newIndex = 0;
7635
7635
  this.innerOffset = -newIndex * this._wrapperWidth;
package/package.json CHANGED
@@ -49,5 +49,5 @@
49
49
  "type": "git",
50
50
  "url": "git+ssh://git@github.com/weexteam/weex-vue-render.git"
51
51
  },
52
- "version": "0.2.21"
52
+ "version": "0.2.22"
53
53
  }