@dolphinweex/weex-vue-render 0.2.47 → 0.2.48
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 +10 -2
- package/package.json +1 -1
package/dist/index.common.js
CHANGED
|
@@ -7136,6 +7136,15 @@ function getLoading () {
|
|
|
7136
7136
|
}
|
|
7137
7137
|
},
|
|
7138
7138
|
methods: {
|
|
7139
|
+
isElementFullyInViewport(el) {
|
|
7140
|
+
const rect = this.$el.getBoundingClientRect();
|
|
7141
|
+
return (
|
|
7142
|
+
rect.top >= 0 &&
|
|
7143
|
+
rect.left >= 0 &&
|
|
7144
|
+
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) + 5 &&
|
|
7145
|
+
rect.right <= (window.innerWidth || document.documentElement.clientWidth) + 5
|
|
7146
|
+
);
|
|
7147
|
+
},
|
|
7139
7148
|
pulling: function pulling (offsetY) {
|
|
7140
7149
|
if ( offsetY === void 0 ) offsetY = 0;
|
|
7141
7150
|
this.height = offsetY;
|
|
@@ -7146,7 +7155,7 @@ function getLoading () {
|
|
|
7146
7155
|
},
|
|
7147
7156
|
pullingEnd: function pullingEnd () {
|
|
7148
7157
|
this.$el && (this.$el.style.transition = "height .2s");
|
|
7149
|
-
if ( this.height >= Math.max(this.viewHeight,
|
|
7158
|
+
if ( this.height >= Math.max(this.viewHeight, 150) && this.isElementFullyInViewport()) {
|
|
7150
7159
|
this.pulling(this.viewHeight);
|
|
7151
7160
|
if (this.$el) {
|
|
7152
7161
|
dispatchNativeEvent(this.$el, 'loading');
|
|
@@ -8613,7 +8622,6 @@ var slider$1 = {
|
|
|
8613
8622
|
watch: {
|
|
8614
8623
|
index: function index () {
|
|
8615
8624
|
this.currentIndex = this._normalizeIndex(this.index);
|
|
8616
|
-
console.log('cdj----index',this.infinite,this.currentIndex)
|
|
8617
8625
|
}
|
|
8618
8626
|
},
|
|
8619
8627
|
|
package/package.json
CHANGED