Skip to content

Commit 07b0150

Browse files
committed
publish build
1 parent e75963e commit 07b0150

File tree

16 files changed

+176
-145
lines changed

16 files changed

+176
-145
lines changed

lib/better-scroll/better-scroll.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/better-scroll/index.js

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
111111
"use strict";
112112
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
113113
/*!
114-
* better-normal-scroll v1.7.0
114+
* better-normal-scroll v1.7.2
115115
* (c) 2016-2018 ustbhuangyi
116116
* Released under the MIT License.
117117
*/
@@ -1253,6 +1253,7 @@ function coreMixin(BScroll) {
12531253
var pos = me.getComputedPosition();
12541254
me.trigger('scroll', pos);
12551255
if (!me.isInTransition) {
1256+
me.trigger('scrollEnd', pos);
12561257
return;
12571258
}
12581259
me.probeTimer = requestAnimationFrame(probe);
@@ -1307,10 +1308,12 @@ function coreMixin(BScroll) {
13071308
this._transitionTime();
13081309
if (!this.pulling && !this.resetPosition(this.options.bounceTime, ease.bounce)) {
13091310
this.isInTransition = false;
1310-
this.trigger('scrollEnd', {
1311-
x: this.x,
1312-
y: this.y
1313-
});
1311+
if (this.options.probeType !== 3) {
1312+
this.trigger('scrollEnd', {
1313+
x: this.x,
1314+
y: this.y
1315+
});
1316+
}
13141317
}
13151318
};
13161319

@@ -2174,9 +2177,6 @@ function pullUpMixin(BScroll) {
21742177
};
21752178

21762179
BScroll.prototype._watchPullUp = function () {
2177-
if (this.pullupWatching) {
2178-
return;
2179-
}
21802180
this.pullupWatching = true;
21812181
var _options$pullUpLoad$t = this.options.pullUpLoad.threshold,
21822182
threshold = _options$pullUpLoad$t === undefined ? 0 : _options$pullUpLoad$t;
@@ -2185,20 +2185,25 @@ function pullUpMixin(BScroll) {
21852185
this.on('scroll', checkToEnd);
21862186

21872187
function checkToEnd(pos) {
2188+
var _this = this;
2189+
21882190
if (this.movingDirectionY === DIRECTION_UP && pos.y <= this.maxScrollY + threshold) {
2189-
this.pullupWatching = false;
2191+
// reset pullupWatching status after scroll end.
2192+
this.once('scrollEnd', function () {
2193+
_this.pullupWatching = false;
2194+
});
21902195
this.trigger('pullingUp');
21912196
this.off('scroll', checkToEnd);
21922197
}
21932198
}
21942199
};
21952200

21962201
BScroll.prototype.finishPullUp = function () {
2197-
var _this = this;
2202+
var _this2 = this;
21982203

2199-
if (this.isInTransition) {
2204+
if (this.pullupWatching) {
22002205
this.once('scrollEnd', function () {
2201-
_this._watchPullUp();
2206+
_this2._watchPullUp();
22022207
});
22032208
} else {
22042209
this._watchPullUp();
@@ -2230,7 +2235,7 @@ scrollbarMixin(BScroll);
22302235
pullDownMixin(BScroll);
22312236
pullUpMixin(BScroll);
22322237

2233-
BScroll.Version = '1.7.0';
2238+
BScroll.Version = '1.7.2';
22342239

22352240
/* harmony default export */ __webpack_exports__["default"] = (BScroll);
22362241

lib/cascade-picker/cascade-picker.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/cascade-picker/index.js

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,7 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
12961296
"use strict";
12971297
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
12981298
/*!
1299-
* better-normal-scroll v1.7.0
1299+
* better-normal-scroll v1.7.2
13001300
* (c) 2016-2018 ustbhuangyi
13011301
* Released under the MIT License.
13021302
*/
@@ -2438,6 +2438,7 @@ function coreMixin(BScroll) {
24382438
var pos = me.getComputedPosition();
24392439
me.trigger('scroll', pos);
24402440
if (!me.isInTransition) {
2441+
me.trigger('scrollEnd', pos);
24412442
return;
24422443
}
24432444
me.probeTimer = requestAnimationFrame(probe);
@@ -2492,10 +2493,12 @@ function coreMixin(BScroll) {
24922493
this._transitionTime();
24932494
if (!this.pulling && !this.resetPosition(this.options.bounceTime, ease.bounce)) {
24942495
this.isInTransition = false;
2495-
this.trigger('scrollEnd', {
2496-
x: this.x,
2497-
y: this.y
2498-
});
2496+
if (this.options.probeType !== 3) {
2497+
this.trigger('scrollEnd', {
2498+
x: this.x,
2499+
y: this.y
2500+
});
2501+
}
24992502
}
25002503
};
25012504

@@ -3359,9 +3362,6 @@ function pullUpMixin(BScroll) {
33593362
};
33603363

33613364
BScroll.prototype._watchPullUp = function () {
3362-
if (this.pullupWatching) {
3363-
return;
3364-
}
33653365
this.pullupWatching = true;
33663366
var _options$pullUpLoad$t = this.options.pullUpLoad.threshold,
33673367
threshold = _options$pullUpLoad$t === undefined ? 0 : _options$pullUpLoad$t;
@@ -3370,20 +3370,25 @@ function pullUpMixin(BScroll) {
33703370
this.on('scroll', checkToEnd);
33713371

33723372
function checkToEnd(pos) {
3373+
var _this = this;
3374+
33733375
if (this.movingDirectionY === DIRECTION_UP && pos.y <= this.maxScrollY + threshold) {
3374-
this.pullupWatching = false;
3376+
// reset pullupWatching status after scroll end.
3377+
this.once('scrollEnd', function () {
3378+
_this.pullupWatching = false;
3379+
});
33753380
this.trigger('pullingUp');
33763381
this.off('scroll', checkToEnd);
33773382
}
33783383
}
33793384
};
33803385

33813386
BScroll.prototype.finishPullUp = function () {
3382-
var _this = this;
3387+
var _this2 = this;
33833388

3384-
if (this.isInTransition) {
3389+
if (this.pullupWatching) {
33853390
this.once('scrollEnd', function () {
3386-
_this._watchPullUp();
3391+
_this2._watchPullUp();
33873392
});
33883393
} else {
33893394
this._watchPullUp();
@@ -3415,7 +3420,7 @@ scrollbarMixin(BScroll);
34153420
pullDownMixin(BScroll);
34163421
pullUpMixin(BScroll);
34173422

3418-
BScroll.Version = '1.7.0';
3423+
BScroll.Version = '1.7.2';
34193424

34203425
/* harmony default export */ __webpack_exports__["default"] = (BScroll);
34213426

lib/cube.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/index-list/index-list.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/index-list/index.js

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ module.exports = function (it, tag, stat) {
764764
"use strict";
765765
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
766766
/*!
767-
* better-normal-scroll v1.7.0
767+
* better-normal-scroll v1.7.2
768768
* (c) 2016-2018 ustbhuangyi
769769
* Released under the MIT License.
770770
*/
@@ -1906,6 +1906,7 @@ function coreMixin(BScroll) {
19061906
var pos = me.getComputedPosition();
19071907
me.trigger('scroll', pos);
19081908
if (!me.isInTransition) {
1909+
me.trigger('scrollEnd', pos);
19091910
return;
19101911
}
19111912
me.probeTimer = requestAnimationFrame(probe);
@@ -1960,10 +1961,12 @@ function coreMixin(BScroll) {
19601961
this._transitionTime();
19611962
if (!this.pulling && !this.resetPosition(this.options.bounceTime, ease.bounce)) {
19621963
this.isInTransition = false;
1963-
this.trigger('scrollEnd', {
1964-
x: this.x,
1965-
y: this.y
1966-
});
1964+
if (this.options.probeType !== 3) {
1965+
this.trigger('scrollEnd', {
1966+
x: this.x,
1967+
y: this.y
1968+
});
1969+
}
19671970
}
19681971
};
19691972

@@ -2827,9 +2830,6 @@ function pullUpMixin(BScroll) {
28272830
};
28282831

28292832
BScroll.prototype._watchPullUp = function () {
2830-
if (this.pullupWatching) {
2831-
return;
2832-
}
28332833
this.pullupWatching = true;
28342834
var _options$pullUpLoad$t = this.options.pullUpLoad.threshold,
28352835
threshold = _options$pullUpLoad$t === undefined ? 0 : _options$pullUpLoad$t;
@@ -2838,20 +2838,25 @@ function pullUpMixin(BScroll) {
28382838
this.on('scroll', checkToEnd);
28392839

28402840
function checkToEnd(pos) {
2841+
var _this = this;
2842+
28412843
if (this.movingDirectionY === DIRECTION_UP && pos.y <= this.maxScrollY + threshold) {
2842-
this.pullupWatching = false;
2844+
// reset pullupWatching status after scroll end.
2845+
this.once('scrollEnd', function () {
2846+
_this.pullupWatching = false;
2847+
});
28432848
this.trigger('pullingUp');
28442849
this.off('scroll', checkToEnd);
28452850
}
28462851
}
28472852
};
28482853

28492854
BScroll.prototype.finishPullUp = function () {
2850-
var _this = this;
2855+
var _this2 = this;
28512856

2852-
if (this.isInTransition) {
2857+
if (this.pullupWatching) {
28532858
this.once('scrollEnd', function () {
2854-
_this._watchPullUp();
2859+
_this2._watchPullUp();
28552860
});
28562861
} else {
28572862
this._watchPullUp();
@@ -2883,7 +2888,7 @@ scrollbarMixin(BScroll);
28832888
pullDownMixin(BScroll);
28842889
pullUpMixin(BScroll);
28852890

2886-
BScroll.Version = '1.7.0';
2891+
BScroll.Version = '1.7.2';
28872892

28882893
/* harmony default export */ __webpack_exports__["default"] = (BScroll);
28892894

@@ -3756,7 +3761,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
37563761
data: function data() {
37573762
return {
37583763
beforePullDown: true,
3759-
isRebounding: false,
37603764
isPullingDown: false,
37613765
isPullUpLoad: false,
37623766
pullUpDirty: true,
@@ -3860,15 +3864,15 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
38603864
if (this.pullDownRefresh && this.isPullingDown) {
38613865
this.isPullingDown = false;
38623866
this._reboundPullDown().then(function () {
3863-
_this3._afterPullDown();
3867+
_this3._afterPullDown(dirty);
38643868
});
38653869
} else if (this.pullUpLoad && this.isPullUpLoad) {
38663870
this.isPullUpLoad = false;
38673871
this.scroll.finishPullUp();
38683872
this.pullUpDirty = dirty;
3869-
this.refresh();
3873+
dirty && this.refresh();
38703874
} else {
3871-
this.refresh();
3875+
dirty && this.refresh();
38723876
}
38733877
},
38743878
_calculateMinHeight: function _calculateMinHeight() {
@@ -3911,21 +3915,19 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
39113915

39123916
return new _promise2.default(function (resolve) {
39133917
setTimeout(function () {
3914-
_this6.isRebounding = true;
39153918
_this6.scroll.finishPullDown();
39163919
_this6.isPullingDown = false;
39173920
resolve();
39183921
}, stopTime);
39193922
});
39203923
},
3921-
_afterPullDown: function _afterPullDown() {
3924+
_afterPullDown: function _afterPullDown(dirty) {
39223925
var _this7 = this;
39233926

39243927
setTimeout(function () {
39253928
_this7.pullDownStyle = 'top:' + _this7.pullDownInitTop + 'px';
39263929
_this7.beforePullDown = true;
3927-
_this7.isRebounding = false;
3928-
_this7.refresh();
3930+
dirty && _this7.refresh();
39293931
}, this.scroll.options.bounceTime);
39303932
}
39313933
},

0 commit comments

Comments
 (0)