Commit a3e4b97b authored by 小鱼(张飞翔)'s avatar 小鱼(张飞翔)

build: update viewerjs git

parent d77dd196
......@@ -90,6 +90,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_0__;
/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_viewerjs__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_viewerjs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_viewerjs__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_throttle_debounce__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_throttle_debounce___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_throttle_debounce__);
......@@ -186,7 +187,7 @@ var install = function install(Vue, _ref) {
Vue.directive('viewer', {
bind: function bind(el, binding, vnode) {
log('viewer bind');
var debouncedCreateViewer = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_throttle_debounce__["a" /* debounce */])(50, createViewer);
var debouncedCreateViewer = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_throttle_debounce__["debounce"])(50, createViewer);
debouncedCreateViewer(el, binding.value);
createWatcher(el, binding, vnode, debouncedCreateViewer);
......@@ -264,7 +265,7 @@ var Component = __webpack_require__(8)(
/* cssModules */
null
)
Component.options.__file = "C:\\Workspaces\\Web\\Git\\v-viewer\\src\\component.vue"
Component.options.__file = "F:\\zfx\\github\\v-viewer\\src\\component.vue"
if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key !== "__esModule"})) {console.error("named exports are not supported in *.vue files.")}
if (Component.options.functional) {console.error("[vue-loader] component.vue: functional components are not supported with templates, they should use render functions.")}
......@@ -322,78 +323,91 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/***/ }),
/* 5 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* unused harmony export throttle */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return debounce; });
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
function throttle(delay, noTrailing, callback, debounceMode) {
var timeoutID;
var cancelled = false;
(function (global, factory) {
( false ? 'undefined' : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? factory(exports) : true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : (global = global || self, factory(global.throttleDebounce = {}));
})(this, function (exports) {
'use strict';
var lastExec = 0;
function throttle(delay, noTrailing, callback, debounceMode) {
var timeoutID;
var cancelled = false;
function clearExistingTimeout() {
if (timeoutID) {
clearTimeout(timeoutID);
}
}
var lastExec = 0;
function cancel() {
clearExistingTimeout();
cancelled = true;
}
function clearExistingTimeout() {
if (timeoutID) {
clearTimeout(timeoutID);
}
}
if (typeof noTrailing !== 'boolean') {
debounceMode = callback;
callback = noTrailing;
noTrailing = undefined;
}
function cancel() {
clearExistingTimeout();
cancelled = true;
}
if (typeof noTrailing !== 'boolean') {
debounceMode = callback;
callback = noTrailing;
noTrailing = undefined;
}
function wrapper() {
var self = this;
var elapsed = Date.now() - lastExec;
var args = arguments;
if (cancelled) {
return;
}
function wrapper() {
for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {
arguments_[_key] = arguments[_key];
}
function exec() {
lastExec = Date.now();
callback.apply(self, args);
}
var self = this;
var elapsed = Date.now() - lastExec;
if (cancelled) {
return;
}
function clear() {
timeoutID = undefined;
}
function exec() {
lastExec = Date.now();
callback.apply(self, arguments_);
}
if (debounceMode && !timeoutID) {
exec();
}
clearExistingTimeout();
function clear() {
timeoutID = undefined;
}
if (debounceMode === undefined && elapsed > delay) {
exec();
} else if (noTrailing !== true) {
timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
}
}
if (debounceMode && !timeoutID) {
exec();
}
wrapper.cancel = cancel;
clearExistingTimeout();
return wrapper;
}
if (debounceMode === undefined && elapsed > delay) {
exec();
} else if (noTrailing !== true) {
timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
}
}
function debounce(delay, atBegin, callback) {
return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);
}
wrapper.cancel = cancel;
return wrapper;
}
function debounce(delay, atBegin, callback) {
return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);
}
exports.debounce = debounce;
exports.throttle = throttle;
Object.defineProperty(exports, '__esModule', { value: true });
});
/***/ }),
/* 6 */
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment