Skip to content

Commit

Permalink
build: package
Browse files Browse the repository at this point in the history
  • Loading branch information
dolymood committed Aug 21, 2018
1 parent 61c1372 commit f63b961
Show file tree
Hide file tree
Showing 67 changed files with 3,092 additions and 2,580 deletions.
2 changes: 1 addition & 1 deletion lib/action-sheet/action-sheet.min.js

Large diffs are not rendered by default.

42 changes: 27 additions & 15 deletions lib/action-sheet/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2263,25 +2263,30 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
create: function create(config, renderFn, single) {
var ownerInstance = this;
var isInVueInstance = !!ownerInstance.$on;
var renderData = (0, _parseRenderData2.default)(config, events);

cancelWatchProps();
processProps();
processEvents();
process$();

if (typeof renderFn !== 'function' && single === undefined) {
single = renderFn;
renderFn = null;
}

cancelWatchProps();

var options = {
single: single
};
if (isInVueInstance) {
options.parent = ownerInstance;
if (!ownerInstance.__createAPI_watchers) {
ownerInstance.__createAPI_watchers = [];
}
}

var renderData = (0, _parseRenderData2.default)(config, events);

processProps();
processEvents();
process$();

var eventBeforeDestroy = 'hook:beforeDestroy';

var component = api.open(renderData, renderFn, options);
Expand Down Expand Up @@ -2325,15 +2330,15 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}
});
if (isInVueInstance) {
ownerInstance.__createAPI_watcher = ownerInstance.$watch(function () {
ownerInstance.__createAPI_watchers.push(ownerInstance.$watch(function () {
var props = {};
watchKeys.forEach(function (key, i) {
props[key] = ownerInstance[watchPropKeys[i]];
});
return props;
}, function (newProps) {
component && component.$updateProps(newProps);
});
}));
}
}
}
Expand Down Expand Up @@ -2364,9 +2369,11 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}

function cancelWatchProps() {
if (ownerInstance.__createAPI_watcher) {
ownerInstance.__createAPI_watcher();
ownerInstance.__createAPI_watcher = null;
if (ownerInstance.__createAPI_watchers) {
ownerInstance.__createAPI_watchers.forEach(function (watcher) {
watcher();
});
ownerInstance.__createAPI_watchers = null;
}
}
}
Expand Down Expand Up @@ -2675,11 +2682,19 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
}, [_c('div', {
staticClass: "cube-popup-mask",
on: {
"touchmove": function($event) {
$event.preventDefault();
},
"click": _vm.maskClick
}
}, [_vm._t("mask")], 2), _vm._v(" "), _c('div', {
staticClass: "cube-popup-container",
class: _vm.containerClass
class: _vm.containerClass,
on: {
"touchmove": function($event) {
$event.preventDefault();
}
}
}, [(_vm.$slots.default) ? _c('div', {
staticClass: "cube-popup-content"
}, [_vm._t("default")], 2) : _c('div', {
Expand Down Expand Up @@ -3026,9 +3041,6 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
"z-index": _vm.zIndex
},
on: {
"touchmove": function($event) {
$event.preventDefault();
},
"mask-click": _vm.maskClick
}
}, [_c('transition', {
Expand Down
4 changes: 2 additions & 2 deletions lib/better-scroll/better-scroll.min.js

Large diffs are not rendered by default.

25 changes: 20 additions & 5 deletions lib/better-scroll/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/*!
* better-normal-scroll v1.12.4
* better-normal-scroll v1.12.6
* (c) 2016-2018 ustbhuangyi
* Released under the MIT License.
*/
Expand Down Expand Up @@ -1404,7 +1404,7 @@ function coreMixin(BScroll) {
// we scrolled less than 15 pixels
if (!this.moved) {
if (this.options.wheel) {
if (this.target && this.target.className === this.options.wheel.wheelWrapperClass) {
if (this.target && this.target.classList.contains(this.options.wheel.wheelWrapperClass)) {
var index = Math.abs(Math.round(this.y / this.itemHeight));
var _offset = Math.round((this.pointY + offsetToBody(this.wrapper).top - this.wrapperHeight / 2) / this.itemHeight);
this.target = this.items[index + _offset];
Expand Down Expand Up @@ -1674,7 +1674,7 @@ function coreMixin(BScroll) {
}
el = el.nodeType ? el : this.scroller.querySelector(el);

if (this.options.wheel && el.className !== this.options.wheel.wheelItemClass) {
if (this.options.wheel && !el.classList.contains(this.options.wheel.wheelItemClass)) {
return;
}

Expand Down Expand Up @@ -2729,6 +2729,7 @@ function mouseWheelMixin(BScroll) {

this.on('destroy', function () {
clearTimeout(_this.mouseWheelTimer);
clearTimeout(_this.mouseWheelEndTimer);
_this._handleMouseWheelEvent(removeEvent);
});

Expand Down Expand Up @@ -2854,11 +2855,21 @@ function mouseWheelMixin(BScroll) {
newY = this.maxScrollY;
}

var needTriggerEnd = this.y === newY;
this.scrollTo(newX, newY, easeTime, ease.swipe);
this.trigger('scroll', {
x: this.x,
y: this.y
});
clearTimeout(this.mouseWheelEndTimer);
if (needTriggerEnd) {
this.mouseWheelEndTimer = setTimeout(function () {
_this2.trigger('scrollEnd', {
x: _this2.x,
y: _this2.y
});
}, easeTime);
}
};
}

Expand Down Expand Up @@ -3146,6 +3157,7 @@ InfiniteScroller.prototype.maybeRequestContent = function () {
}
this.requestInProgress = true;
this.options.fetch(itemsNeeded).then(function (items) {
_this2.requestInProgress = false;
if (items) {
_this2.addContent(items);
} else {
Expand All @@ -3169,7 +3181,6 @@ InfiniteScroller.prototype.maybeRequestContent = function () {
};

InfiniteScroller.prototype.addContent = function (items) {
this.requestInProgress = false;
for (var i = 0; i < items.length; i++) {
if (this.items.length <= this.loadedItems) {
this._addItem();
Expand All @@ -3189,6 +3200,10 @@ InfiniteScroller.prototype.attachContent = function () {
this._setupAnimations(tombstoneAnimations, curPos);
};

InfiniteScroller.prototype.resetMore = function () {
this.hasMore = true;
};

InfiniteScroller.prototype._removeTombstones = function () {
var markIndex = void 0;
var tombstoneLen = 0;
Expand Down Expand Up @@ -3418,7 +3433,7 @@ mouseWheelMixin(BScroll);
zoomMixin(BScroll);
infiniteMixin(BScroll);

BScroll.Version = '1.12.4';
BScroll.Version = '1.12.6';

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

Expand Down
6 changes: 3 additions & 3 deletions lib/cascade-picker/cascade-picker.min.js

Large diffs are not rendered by default.

64 changes: 47 additions & 17 deletions lib/cascade-picker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2212,7 +2212,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/*!
* better-normal-scroll v1.12.4
* better-normal-scroll v1.12.6
* (c) 2016-2018 ustbhuangyi
* Released under the MIT License.
*/
Expand Down Expand Up @@ -3505,7 +3505,7 @@ function coreMixin(BScroll) {
// we scrolled less than 15 pixels
if (!this.moved) {
if (this.options.wheel) {
if (this.target && this.target.className === this.options.wheel.wheelWrapperClass) {
if (this.target && this.target.classList.contains(this.options.wheel.wheelWrapperClass)) {
var index = Math.abs(Math.round(this.y / this.itemHeight));
var _offset = Math.round((this.pointY + offsetToBody(this.wrapper).top - this.wrapperHeight / 2) / this.itemHeight);
this.target = this.items[index + _offset];
Expand Down Expand Up @@ -3775,7 +3775,7 @@ function coreMixin(BScroll) {
}
el = el.nodeType ? el : this.scroller.querySelector(el);

if (this.options.wheel && el.className !== this.options.wheel.wheelItemClass) {
if (this.options.wheel && !el.classList.contains(this.options.wheel.wheelItemClass)) {
return;
}

Expand Down Expand Up @@ -4830,6 +4830,7 @@ function mouseWheelMixin(BScroll) {

this.on('destroy', function () {
clearTimeout(_this.mouseWheelTimer);
clearTimeout(_this.mouseWheelEndTimer);
_this._handleMouseWheelEvent(removeEvent);
});

Expand Down Expand Up @@ -4955,11 +4956,21 @@ function mouseWheelMixin(BScroll) {
newY = this.maxScrollY;
}

var needTriggerEnd = this.y === newY;
this.scrollTo(newX, newY, easeTime, ease.swipe);
this.trigger('scroll', {
x: this.x,
y: this.y
});
clearTimeout(this.mouseWheelEndTimer);
if (needTriggerEnd) {
this.mouseWheelEndTimer = setTimeout(function () {
_this2.trigger('scrollEnd', {
x: _this2.x,
y: _this2.y
});
}, easeTime);
}
};
}

Expand Down Expand Up @@ -5247,6 +5258,7 @@ InfiniteScroller.prototype.maybeRequestContent = function () {
}
this.requestInProgress = true;
this.options.fetch(itemsNeeded).then(function (items) {
_this2.requestInProgress = false;
if (items) {
_this2.addContent(items);
} else {
Expand All @@ -5270,7 +5282,6 @@ InfiniteScroller.prototype.maybeRequestContent = function () {
};

InfiniteScroller.prototype.addContent = function (items) {
this.requestInProgress = false;
for (var i = 0; i < items.length; i++) {
if (this.items.length <= this.loadedItems) {
this._addItem();
Expand All @@ -5290,6 +5301,10 @@ InfiniteScroller.prototype.attachContent = function () {
this._setupAnimations(tombstoneAnimations, curPos);
};

InfiniteScroller.prototype.resetMore = function () {
this.hasMore = true;
};

InfiniteScroller.prototype._removeTombstones = function () {
var markIndex = void 0;
var tombstoneLen = 0;
Expand Down Expand Up @@ -5519,7 +5534,7 @@ mouseWheelMixin(BScroll);
zoomMixin(BScroll);
infiniteMixin(BScroll);

BScroll.Version = '1.12.4';
BScroll.Version = '1.12.6';

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

Expand Down Expand Up @@ -5851,25 +5866,30 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
create: function create(config, renderFn, single) {
var ownerInstance = this;
var isInVueInstance = !!ownerInstance.$on;
var renderData = (0, _parseRenderData2.default)(config, events);

cancelWatchProps();
processProps();
processEvents();
process$();

if (typeof renderFn !== 'function' && single === undefined) {
single = renderFn;
renderFn = null;
}

cancelWatchProps();

var options = {
single: single
};
if (isInVueInstance) {
options.parent = ownerInstance;
if (!ownerInstance.__createAPI_watchers) {
ownerInstance.__createAPI_watchers = [];
}
}

var renderData = (0, _parseRenderData2.default)(config, events);

processProps();
processEvents();
process$();

var eventBeforeDestroy = 'hook:beforeDestroy';

var component = api.open(renderData, renderFn, options);
Expand Down Expand Up @@ -5913,15 +5933,15 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}
});
if (isInVueInstance) {
ownerInstance.__createAPI_watcher = ownerInstance.$watch(function () {
ownerInstance.__createAPI_watchers.push(ownerInstance.$watch(function () {
var props = {};
watchKeys.forEach(function (key, i) {
props[key] = ownerInstance[watchPropKeys[i]];
});
return props;
}, function (newProps) {
component && component.$updateProps(newProps);
});
}));
}
}
}
Expand Down Expand Up @@ -5952,9 +5972,11 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}

function cancelWatchProps() {
if (ownerInstance.__createAPI_watcher) {
ownerInstance.__createAPI_watcher();
ownerInstance.__createAPI_watcher = null;
if (ownerInstance.__createAPI_watchers) {
ownerInstance.__createAPI_watchers.forEach(function (watcher) {
watcher();
});
ownerInstance.__createAPI_watchers = null;
}
}
}
Expand Down Expand Up @@ -6263,11 +6285,19 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
}, [_c('div', {
staticClass: "cube-popup-mask",
on: {
"touchmove": function($event) {
$event.preventDefault();
},
"click": _vm.maskClick
}
}, [_vm._t("mask")], 2), _vm._v(" "), _c('div', {
staticClass: "cube-popup-container",
class: _vm.containerClass
class: _vm.containerClass,
on: {
"touchmove": function($event) {
$event.preventDefault();
}
}
}, [(_vm.$slots.default) ? _c('div', {
staticClass: "cube-popup-content"
}, [_vm._t("default")], 2) : _c('div', {
Expand Down
2 changes: 1 addition & 1 deletion lib/create-api/create-api.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit f63b961

Please sign in to comment.