@dolphinweex/weex-vue-render 0.2.25 → 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.
- package/dist/index.common.js +26 -6
- package/package.json +1 -1
package/dist/index.common.js
CHANGED
|
@@ -5944,7 +5944,7 @@ var scrollable$1 = {
|
|
|
5944
5944
|
reachBottom: function reachBottom (offset) {
|
|
5945
5945
|
var wrapper = this.$refs.wrapper;
|
|
5946
5946
|
var inner = this.$refs.inner;
|
|
5947
|
-
offset = parseInt(offset ||
|
|
5947
|
+
offset = parseInt(offset || 10) * weex.config.env.scale;
|
|
5948
5948
|
|
|
5949
5949
|
if (wrapper && inner) {
|
|
5950
5950
|
var key = this.scrollDirection === 'horizontal'
|
|
@@ -7353,7 +7353,7 @@ var recycleList = {
|
|
|
7353
7353
|
}
|
|
7354
7354
|
};
|
|
7355
7355
|
|
|
7356
|
-
__$styleInject("/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nbody > .weex-list,\nbody > .weex-recycle,\nbody > .weex-scroller,\nbody > .weex-waterfall {\n max-height: 100%;\n}\n\n.weex-list-wrapper,\n.weex-recycle-wrapper,\n.weex-scroller-wrapper,\n.weex-waterfall-wrapper {\n -webkit-overflow-scrolling: touch;\n}\n\n.weex-list-wrapper,\n.weex-waterfall-wrapper, \n.weex-recycle-wrapper {\n overflow-y: scroll !important;\n overflow-x: hidden !important;\n align-items: flex-start !important;\n justify-content: flex-start !important;\n max-width: 100vw; \n}\n\n.weex-list-inner,\n.weex-recycle-inner,\n.weex-scroller-inner,\n.weex-waterfall-inner {\n -webkit-overflow-scrolling: touch;\n align-items: inherit; \n flex:1; \n}\n\n.weex-waterfall-inner-columns { \n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-orient: horizontal;\n max-width: 100vw; \n}\n\n.weex-scroller-wrapper.weex-scroller-vertical,\n.weex-recycle-wrapper.weex-recycle-vertical {\n overflow-x: hidden;\n overflow-y: scroll;\n}\n\n.weex-scroller-wrapper.weex-scroller-horizontal,\n.weex-recycle-wrapper.weex-recycle-horizontal {\n overflow-x: scroll;\n overflow-y: hidden;\n}\n\n.weex-scroller-wrapper.weex-scroller-disabled {\n overflow-x: hidden !important;\n overflow-y: hidden !important;\n}\n\n.weex-list-wrapper.weex-list-disabled {\n overflow-x: hidden !important;\n overflow-y: hidden !important;\n}\n\n.weex-recycle-wrapper.weex-recycle-disabled {\n overflow-x: hidden !important;\n overflow-y: hidden !important;\n}\n\n.weex-scroller-horizontal .weex-scroller-inner,\n.weex-recycle-horizontal .weex-recycle-inner {\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-orient: horizontal;\n height: 100%;\n}\n\n.weex-cell {\n width: 100%;\n}\n\n.weex-refresh,\n.weex-loading {\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n width: 100%;\n overflow: hidden;\n}\n",undefined);
|
|
7356
|
+
__$styleInject("/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nbody > .weex-list,\nbody > .weex-recycle,\nbody > .weex-scroller,\nbody > .weex-waterfall {\n max-height: 100%;\n}\n\n.weex-list-wrapper,\n.weex-recycle-wrapper,\n.weex-scroller-wrapper,\n.weex-waterfall-wrapper {\n -webkit-overflow-scrolling: touch;\n}\n\n.weex-list-wrapper,\n.weex-waterfall-wrapper, \n.weex-recycle-wrapper {\n overflow-y: scroll !important;\n overflow-x: hidden !important;\n align-items: flex-start !important;\n justify-content: flex-start !important;\n max-width: 100vw; \n}\n\n.weex-list-inner,\n.weex-recycle-inner,\n.weex-scroller-inner,\n.weex-waterfall-inner {\n -webkit-overflow-scrolling: touch;\n align-items: inherit; \n flex:1; \n}\n\n.weex-waterfall-inner-columns { \n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-orient: horizontal;\n max-width: 100vw; \n}\n\n.weex-scroller-wrapper.weex-scroller-vertical,\n.weex-recycle-wrapper.weex-recycle-vertical {\n overflow-x: hidden;\n overflow-y: scroll;\n}\n\n.weex-scroller-wrapper.weex-scroller-horizontal,\n.weex-recycle-wrapper.weex-recycle-horizontal {\n overflow-x: scroll;\n overflow-y: hidden;\n}\n\n.weex-scroller-wrapper.weex-scroller-disabled {\n overflow-x: hidden !important;\n overflow-y: hidden !important;\n}\n\n.weex-slider-wrapper.weex-slider-disabled {\n overflow-x: hidden !important;\n overflow-y: hidden !important;\n}\n\n.weex-list-wrapper.weex-list-disabled {\n overflow-x: hidden !important;\n overflow-y: hidden !important;\n}\n\n.weex-recycle-wrapper.weex-recycle-disabled {\n overflow-x: hidden !important;\n overflow-y: hidden !important;\n}\n\n.weex-scroller-horizontal .weex-scroller-inner,\n.weex-recycle-horizontal .weex-recycle-inner {\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-orient: horizontal;\n height: 100%;\n}\n\n.weex-cell {\n width: 100%;\n}\n\n.weex-refresh,\n.weex-loading {\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n width: 100%;\n overflow: hidden;\n}\n",undefined);
|
|
7357
7357
|
|
|
7358
7358
|
/*
|
|
7359
7359
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
@@ -7423,11 +7423,27 @@ var INTERVAL_MINIMUM = 200;
|
|
|
7423
7423
|
var touchSliderInstance = null;
|
|
7424
7424
|
|
|
7425
7425
|
var slideMixin = {
|
|
7426
|
+
props: {
|
|
7427
|
+
scrollable: {
|
|
7428
|
+
type: [Boolean],
|
|
7429
|
+
default: true
|
|
7430
|
+
}
|
|
7431
|
+
},
|
|
7432
|
+
computed: {
|
|
7433
|
+
wrapperClass: function wrapperClass () {
|
|
7434
|
+
var classArray = ['weex-slider weex-slider-wrapper weex-ct'];
|
|
7435
|
+
if (!this.scrollable) {
|
|
7436
|
+
classArray.push('weex-slider-disabled');
|
|
7437
|
+
}
|
|
7438
|
+
|
|
7439
|
+
return classArray.join(' ')
|
|
7440
|
+
}
|
|
7441
|
+
},
|
|
7426
7442
|
created: function created () {
|
|
7427
7443
|
this._clones = [];
|
|
7428
7444
|
this.innerOffset = 0;
|
|
7429
7445
|
this._indicator = null;
|
|
7430
|
-
this.cloneIndex =
|
|
7446
|
+
this.cloneIndex = 0 //需要减或者加去克隆下标
|
|
7431
7447
|
},
|
|
7432
7448
|
|
|
7433
7449
|
beforeUpdate: function beforeUpdate () {
|
|
@@ -7552,6 +7568,7 @@ var slideMixin = {
|
|
|
7552
7568
|
_renderSlides: function _renderSlides (createElement) {
|
|
7553
7569
|
this._cells = this._formatChildren(createElement);
|
|
7554
7570
|
this.frameCount = this._cells.length;
|
|
7571
|
+
this.cloneIndex = this.frameCount > 1 ? Boolean(this.infinite) : 0 //需要减或者加去克隆下标
|
|
7555
7572
|
return createElement(
|
|
7556
7573
|
'nav',
|
|
7557
7574
|
{
|
|
@@ -7563,7 +7580,7 @@ var slideMixin = {
|
|
|
7563
7580
|
touchend: this._handleTouchEnd,
|
|
7564
7581
|
touchcancel: this._handleTouchCancel
|
|
7565
7582
|
},
|
|
7566
|
-
staticClass:
|
|
7583
|
+
staticClass: this.wrapperClass,
|
|
7567
7584
|
staticStyle: weex.extractComponentStyle(this)
|
|
7568
7585
|
},
|
|
7569
7586
|
[
|
|
@@ -7636,7 +7653,7 @@ var slideMixin = {
|
|
|
7636
7653
|
this.innerOffset += step * this._wrapperWidth;
|
|
7637
7654
|
|
|
7638
7655
|
// 克隆处理:先执行正常动画到克隆的最后一张,再瞬间跳回真实的第一张
|
|
7639
|
-
if (this.
|
|
7656
|
+
if (this.cloneIndex && this.infinite && index >= this.frameCount - 1) {
|
|
7640
7657
|
// 先滑到克隆的 `第一张`
|
|
7641
7658
|
newIndex = this.frameCount - 1;
|
|
7642
7659
|
this.innerOffset = -newIndex * this._wrapperWidth;
|
|
@@ -7650,7 +7667,7 @@ var slideMixin = {
|
|
|
7650
7667
|
this.innerOffset = -this._wrapperWidth; // 瞬间跳到 `第一张`
|
|
7651
7668
|
inner.style.left = `${this.innerOffset}px`;
|
|
7652
7669
|
}, TRANSITION_TIME);
|
|
7653
|
-
} else if (this.
|
|
7670
|
+
} else if (this.cloneIndex && this.infinite && index <= 0) {
|
|
7654
7671
|
// 先滑到克隆的 `最后一张`
|
|
7655
7672
|
newIndex = 0;
|
|
7656
7673
|
this.innerOffset = -newIndex * this._wrapperWidth;
|
|
@@ -8054,6 +8071,9 @@ var slideMixin = {
|
|
|
8054
8071
|
},
|
|
8055
8072
|
|
|
8056
8073
|
_handleTouchStart: function _handleTouchStart (event) {
|
|
8074
|
+
if (!this.scrollable) {
|
|
8075
|
+
return // 🚫 禁止滚动行为
|
|
8076
|
+
}
|
|
8057
8077
|
var touch = event.changedTouches[0];
|
|
8058
8078
|
this._stopAutoPlay();
|
|
8059
8079
|
var inner = this.$refs.inner;
|
package/package.json
CHANGED