@dolphinweex/weex-vue-render 0.2.26 → 0.2.27

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.
@@ -7443,7 +7443,7 @@ var slideMixin = {
7443
7443
  this._clones = [];
7444
7444
  this.innerOffset = 0;
7445
7445
  this._indicator = null;
7446
- this.cloneIndex = this.frameCount > 1 ? Boolean(this.infinite) : 0 //需要减或者加去克隆下标
7446
+ this.cloneIndex = 0 //需要减或者加去克隆下标
7447
7447
  },
7448
7448
 
7449
7449
  beforeUpdate: function beforeUpdate () {
@@ -7568,6 +7568,7 @@ var slideMixin = {
7568
7568
  _renderSlides: function _renderSlides (createElement) {
7569
7569
  this._cells = this._formatChildren(createElement);
7570
7570
  this.frameCount = this._cells.length;
7571
+ this.cloneIndex = this.frameCount > 1 ? Boolean(this.infinite) : 0 //需要减或者加去克隆下标
7571
7572
  return createElement(
7572
7573
  'nav',
7573
7574
  {
@@ -7652,7 +7653,7 @@ var slideMixin = {
7652
7653
  this.innerOffset += step * this._wrapperWidth;
7653
7654
 
7654
7655
  // 克隆处理:先执行正常动画到克隆的最后一张,再瞬间跳回真实的第一张
7655
- if (this.frameCount > 1 && this.infinite && index >= this.frameCount - 1) {
7656
+ if (this.cloneIndex && this.infinite && index >= this.frameCount - 1) {
7656
7657
  // 先滑到克隆的 `第一张`
7657
7658
  newIndex = this.frameCount - 1;
7658
7659
  this.innerOffset = -newIndex * this._wrapperWidth;
@@ -7666,7 +7667,7 @@ var slideMixin = {
7666
7667
  this.innerOffset = -this._wrapperWidth; // 瞬间跳到 `第一张`
7667
7668
  inner.style.left = `${this.innerOffset}px`;
7668
7669
  }, TRANSITION_TIME);
7669
- } else if (this.frameCount > 1 && this.infinite && index <= 0) {
7670
+ } else if (this.cloneIndex && this.infinite && index <= 0) {
7670
7671
  // 先滑到克隆的 `最后一张`
7671
7672
  newIndex = 0;
7672
7673
  this.innerOffset = -newIndex * this._wrapperWidth;
@@ -8070,6 +8071,9 @@ var slideMixin = {
8070
8071
  },
8071
8072
 
8072
8073
  _handleTouchStart: function _handleTouchStart (event) {
8074
+ if (!this.scrollable) {
8075
+ return // 🚫 禁止滚动行为
8076
+ }
8073
8077
  var touch = event.changedTouches[0];
8074
8078
  this._stopAutoPlay();
8075
8079
  var inner = this.$refs.inner;
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.26"
52
+ "version": "0.2.27"
53
53
  }