You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33698 lines
979 KiB
33698 lines
979 KiB
(function webpackUniversalModuleDefinition(root, factory) {
|
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
module.exports = factory(require("vue"));
|
|
else if(typeof define === 'function' && define.amd)
|
|
define([], factory);
|
|
else if(typeof exports === 'object')
|
|
exports["kr-print-designer"] = factory(require("vue"));
|
|
else
|
|
root["kr-print-designer"] = factory(root["Vue"]);
|
|
})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__8bbf__) {
|
|
return /******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = "fb15");
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ "00ee":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var wellKnownSymbol = __webpack_require__("b622");
|
|
|
|
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
var test = {};
|
|
|
|
test[TO_STRING_TAG] = 'z';
|
|
|
|
module.exports = String(test) === '[object z]';
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "00fd":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var Symbol = __webpack_require__("9e69");
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* Used to resolve the
|
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
* of values.
|
|
*/
|
|
var nativeObjectToString = objectProto.toString;
|
|
|
|
/** Built-in value references. */
|
|
var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
|
|
|
/**
|
|
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to query.
|
|
* @returns {string} Returns the raw `toStringTag`.
|
|
*/
|
|
function getRawTag(value) {
|
|
var isOwn = hasOwnProperty.call(value, symToStringTag),
|
|
tag = value[symToStringTag];
|
|
|
|
try {
|
|
value[symToStringTag] = undefined;
|
|
var unmasked = true;
|
|
} catch (e) {}
|
|
|
|
var result = nativeObjectToString.call(value);
|
|
if (unmasked) {
|
|
if (isOwn) {
|
|
value[symToStringTag] = tag;
|
|
} else {
|
|
delete value[symToStringTag];
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = getRawTag;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "0366":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var aFunction = __webpack_require__("1c0b");
|
|
|
|
// optional / simple context binding
|
|
module.exports = function (fn, that, length) {
|
|
aFunction(fn);
|
|
if (that === undefined) return fn;
|
|
switch (length) {
|
|
case 0: return function () {
|
|
return fn.call(that);
|
|
};
|
|
case 1: return function (a) {
|
|
return fn.call(that, a);
|
|
};
|
|
case 2: return function (a, b) {
|
|
return fn.call(that, a, b);
|
|
};
|
|
case 3: return function (a, b, c) {
|
|
return fn.call(that, a, b, c);
|
|
};
|
|
}
|
|
return function (/* ...args */) {
|
|
return fn.apply(that, arguments);
|
|
};
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "03d6":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var has = __webpack_require__("9c0e");
|
|
var toIObject = __webpack_require__("6ca1");
|
|
var arrayIndexOf = __webpack_require__("39ad")(false);
|
|
var IE_PROTO = __webpack_require__("5a94")('IE_PROTO');
|
|
|
|
module.exports = function (object, names) {
|
|
var O = toIObject(object);
|
|
var i = 0;
|
|
var result = [];
|
|
var key;
|
|
for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
|
|
// Don't enum bug & hidden keys
|
|
while (names.length > i) if (has(O, key = names[i++])) {
|
|
~arrayIndexOf(result, key) || result.push(key);
|
|
}
|
|
return result;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "03dd":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isPrototype = __webpack_require__("eac5"),
|
|
nativeKeys = __webpack_require__("57a5");
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property names.
|
|
*/
|
|
function baseKeys(object) {
|
|
if (!isPrototype(object)) {
|
|
return nativeKeys(object);
|
|
}
|
|
var result = [];
|
|
for (var key in Object(object)) {
|
|
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
|
result.push(key);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = baseKeys;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "049a":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "051b":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var dP = __webpack_require__("1a14");
|
|
var createDesc = __webpack_require__("10db");
|
|
module.exports = __webpack_require__("0bad") ? function (object, key, value) {
|
|
return dP.f(object, key, createDesc(1, value));
|
|
} : function (object, key, value) {
|
|
object[key] = value;
|
|
return object;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "057f":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var toIndexedObject = __webpack_require__("fc6a");
|
|
var nativeGetOwnPropertyNames = __webpack_require__("241c").f;
|
|
|
|
var toString = {}.toString;
|
|
|
|
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
|
? Object.getOwnPropertyNames(window) : [];
|
|
|
|
var getWindowNames = function (it) {
|
|
try {
|
|
return nativeGetOwnPropertyNames(it);
|
|
} catch (error) {
|
|
return windowNames.slice();
|
|
}
|
|
};
|
|
|
|
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
|
|
module.exports.f = function getOwnPropertyNames(it) {
|
|
return windowNames && toString.call(it) == '[object Window]'
|
|
? getWindowNames(it)
|
|
: nativeGetOwnPropertyNames(toIndexedObject(it));
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "05f5":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isObject = __webpack_require__("7a41");
|
|
var document = __webpack_require__("ef08").document;
|
|
// typeof document.createElement is 'object' in old IE
|
|
var is = isObject(document) && isObject(document.createElement);
|
|
module.exports = function (it) {
|
|
return is ? document.createElement(it) : {};
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "0644":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseClone = __webpack_require__("3818");
|
|
|
|
/** Used to compose bitmasks for cloning. */
|
|
var CLONE_DEEP_FLAG = 1,
|
|
CLONE_SYMBOLS_FLAG = 4;
|
|
|
|
/**
|
|
* This method is like `_.clone` except that it recursively clones `value`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 1.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to recursively clone.
|
|
* @returns {*} Returns the deep cloned value.
|
|
* @see _.clone
|
|
* @example
|
|
*
|
|
* var objects = [{ 'a': 1 }, { 'b': 2 }];
|
|
*
|
|
* var deep = _.cloneDeep(objects);
|
|
* console.log(deep[0] === objects[0]);
|
|
* // => false
|
|
*/
|
|
function cloneDeep(value) {
|
|
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
|
}
|
|
|
|
module.exports = cloneDeep;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "06cf":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var DESCRIPTORS = __webpack_require__("83ab");
|
|
var propertyIsEnumerableModule = __webpack_require__("d1e7");
|
|
var createPropertyDescriptor = __webpack_require__("5c6c");
|
|
var toIndexedObject = __webpack_require__("fc6a");
|
|
var toPrimitive = __webpack_require__("c04e");
|
|
var has = __webpack_require__("5135");
|
|
var IE8_DOM_DEFINE = __webpack_require__("0cfb");
|
|
|
|
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
|
|
// `Object.getOwnPropertyDescriptor` method
|
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
|
|
exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
O = toIndexedObject(O);
|
|
P = toPrimitive(P, true);
|
|
if (IE8_DOM_DEFINE) try {
|
|
return nativeGetOwnPropertyDescriptor(O, P);
|
|
} catch (error) { /* empty */ }
|
|
if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "072d":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// 19.1.2.1 Object.assign(target, source, ...)
|
|
var DESCRIPTORS = __webpack_require__("0bad");
|
|
var getKeys = __webpack_require__("9876");
|
|
var gOPS = __webpack_require__("fed5");
|
|
var pIE = __webpack_require__("1917");
|
|
var toObject = __webpack_require__("0983");
|
|
var IObject = __webpack_require__("9fbb");
|
|
var $assign = Object.assign;
|
|
|
|
// should work with symbols and should have deterministic property order (V8 bug)
|
|
module.exports = !$assign || __webpack_require__("4b8b")(function () {
|
|
var A = {};
|
|
var B = {};
|
|
// eslint-disable-next-line no-undef
|
|
var S = Symbol();
|
|
var K = 'abcdefghijklmnopqrst';
|
|
A[S] = 7;
|
|
K.split('').forEach(function (k) { B[k] = k; });
|
|
return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
|
|
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
|
|
var T = toObject(target);
|
|
var aLen = arguments.length;
|
|
var index = 1;
|
|
var getSymbols = gOPS.f;
|
|
var isEnum = pIE.f;
|
|
while (aLen > index) {
|
|
var S = IObject(arguments[index++]);
|
|
var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
|
|
var length = keys.length;
|
|
var j = 0;
|
|
var key;
|
|
while (length > j) {
|
|
key = keys[j++];
|
|
if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
|
|
}
|
|
} return T;
|
|
} : $assign;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "07c7":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* This method returns `false`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.13.0
|
|
* @category Util
|
|
* @returns {boolean} Returns `false`.
|
|
* @example
|
|
*
|
|
* _.times(2, _.stubFalse);
|
|
* // => [false, false]
|
|
*/
|
|
function stubFalse() {
|
|
return false;
|
|
}
|
|
|
|
module.exports = stubFalse;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "087d":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Appends the elements of `values` to `array`.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to modify.
|
|
* @param {Array} values The values to append.
|
|
* @returns {Array} Returns `array`.
|
|
*/
|
|
function arrayPush(array, values) {
|
|
var index = -1,
|
|
length = values.length,
|
|
offset = array.length;
|
|
|
|
while (++index < length) {
|
|
array[offset + index] = values[index];
|
|
}
|
|
return array;
|
|
}
|
|
|
|
module.exports = arrayPush;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "0983":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 7.1.13 ToObject(argument)
|
|
var defined = __webpack_require__("c901");
|
|
module.exports = function (it) {
|
|
return Object(defined(it));
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "0ae2":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// all enumerable object keys, includes symbols
|
|
var getKeys = __webpack_require__("9876");
|
|
var gOPS = __webpack_require__("fed5");
|
|
var pIE = __webpack_require__("1917");
|
|
module.exports = function (it) {
|
|
var result = getKeys(it);
|
|
var getSymbols = gOPS.f;
|
|
if (getSymbols) {
|
|
var symbols = getSymbols(it);
|
|
var isEnum = pIE.f;
|
|
var i = 0;
|
|
var key;
|
|
while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
|
|
} return result;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "0b07":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseIsNative = __webpack_require__("34ac"),
|
|
getValue = __webpack_require__("3698");
|
|
|
|
/**
|
|
* Gets the native function at `key` of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {string} key The key of the method to get.
|
|
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
*/
|
|
function getNative(object, key) {
|
|
var value = getValue(object, key);
|
|
return baseIsNative(value) ? value : undefined;
|
|
}
|
|
|
|
module.exports = getNative;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "0b99":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $at = __webpack_require__("19fa")(true);
|
|
|
|
// 21.1.3.27 String.prototype[@@iterator]()
|
|
__webpack_require__("393a")(String, 'String', function (iterated) {
|
|
this._t = String(iterated); // target
|
|
this._i = 0; // next index
|
|
// 21.1.5.2.1 %StringIteratorPrototype%.next()
|
|
}, function () {
|
|
var O = this._t;
|
|
var index = this._i;
|
|
var point;
|
|
if (index >= O.length) return { value: undefined, done: true };
|
|
point = $at(O, index);
|
|
this._i += point.length;
|
|
return { value: point, done: false };
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "0bad":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// Thank's IE8 for his funny defineProperty
|
|
module.exports = !__webpack_require__("4b8b")(function () {
|
|
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "0bf0":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "0cc9":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "0cfb":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var DESCRIPTORS = __webpack_require__("83ab");
|
|
var fails = __webpack_require__("d039");
|
|
var createElement = __webpack_require__("cc12");
|
|
|
|
// Thank's IE8 for his funny defineProperty
|
|
module.exports = !DESCRIPTORS && !fails(function () {
|
|
return Object.defineProperty(createElement('div'), 'a', {
|
|
get: function () { return 7; }
|
|
}).a != 7;
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "0d24":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__("2b3e"),
|
|
stubFalse = __webpack_require__("07c7");
|
|
|
|
/** Detect free variable `exports`. */
|
|
var freeExports = true && exports && !exports.nodeType && exports;
|
|
|
|
/** Detect free variable `module`. */
|
|
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
|
|
|
/** Detect the popular CommonJS extension `module.exports`. */
|
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
|
|
/** Built-in value references. */
|
|
var Buffer = moduleExports ? root.Buffer : undefined;
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
|
|
/**
|
|
* Checks if `value` is a buffer.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.3.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
* @example
|
|
*
|
|
* _.isBuffer(new Buffer(2));
|
|
* // => true
|
|
*
|
|
* _.isBuffer(new Uint8Array(2));
|
|
* // => false
|
|
*/
|
|
var isBuffer = nativeIsBuffer || stubFalse;
|
|
|
|
module.exports = isBuffer;
|
|
|
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("62e4")(module)))
|
|
|
|
/***/ }),
|
|
|
|
/***/ "0e15":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
/* eslint-disable no-undefined */
|
|
|
|
var throttle = __webpack_require__("597f");
|
|
|
|
/**
|
|
* Debounce execution of a function. Debouncing, unlike throttling,
|
|
* guarantees that a function is only executed a single time, either at the
|
|
* very beginning of a series of calls, or at the very end.
|
|
*
|
|
* @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
|
|
* @param {Boolean} [atBegin] Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds
|
|
* after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.
|
|
* (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).
|
|
* @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
|
|
* to `callback` when the debounced-function is executed.
|
|
*
|
|
* @return {Function} A new, debounced function.
|
|
*/
|
|
module.exports = function ( delay, atBegin, callback ) {
|
|
return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "0f0f":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var copyObject = __webpack_require__("8eeb"),
|
|
keysIn = __webpack_require__("9934");
|
|
|
|
/**
|
|
* The base implementation of `_.assignIn` without support for multiple sources
|
|
* or `customizer` functions.
|
|
*
|
|
* @private
|
|
* @param {Object} object The destination object.
|
|
* @param {Object} source The source object.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function baseAssignIn(object, source) {
|
|
return object && copyObject(source, keysIn(source), object);
|
|
}
|
|
|
|
module.exports = baseAssignIn;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "0f6c":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 132);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 132:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// CONCATENATED MODULE: ./packages/row/src/row.js
|
|
/* harmony default export */ var row = ({
|
|
name: 'ElRow',
|
|
|
|
componentName: 'ElRow',
|
|
|
|
props: {
|
|
tag: {
|
|
type: String,
|
|
default: 'div'
|
|
},
|
|
gutter: Number,
|
|
type: String,
|
|
justify: {
|
|
type: String,
|
|
default: 'start'
|
|
},
|
|
align: {
|
|
type: String,
|
|
default: 'top'
|
|
}
|
|
},
|
|
|
|
computed: {
|
|
style: function style() {
|
|
var ret = {};
|
|
|
|
if (this.gutter) {
|
|
ret.marginLeft = '-' + this.gutter / 2 + 'px';
|
|
ret.marginRight = ret.marginLeft;
|
|
}
|
|
|
|
return ret;
|
|
}
|
|
},
|
|
|
|
render: function render(h) {
|
|
return h(this.tag, {
|
|
class: ['el-row', this.justify !== 'start' ? 'is-justify-' + this.justify : '', this.align !== 'top' ? 'is-align-' + this.align : '', { 'el-row--flex': this.type === 'flex' }],
|
|
style: this.style
|
|
}, this.$slots.default);
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/row/index.js
|
|
|
|
|
|
/* istanbul ignore next */
|
|
row.install = function (Vue) {
|
|
Vue.component(row.name, row);
|
|
};
|
|
|
|
/* harmony default export */ var packages_row = __webpack_exports__["default"] = (row);
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1041":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var copyObject = __webpack_require__("8eeb"),
|
|
getSymbolsIn = __webpack_require__("a029");
|
|
|
|
/**
|
|
* Copies own and inherited symbols of `source` to `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} source The object to copy symbols from.
|
|
* @param {Object} [object={}] The object to copy symbols to.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function copySymbolsIn(source, object) {
|
|
return copyObject(source, getSymbolsIn(source), object);
|
|
}
|
|
|
|
module.exports = copySymbolsIn;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1098":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
|
|
var _iterator = __webpack_require__("17ed");
|
|
|
|
var _iterator2 = _interopRequireDefault(_iterator);
|
|
|
|
var _symbol = __webpack_require__("f893");
|
|
|
|
var _symbol2 = _interopRequireDefault(_symbol);
|
|
|
|
var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
|
|
return typeof obj === "undefined" ? "undefined" : _typeof(obj);
|
|
} : function (obj) {
|
|
return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "10db":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function (bitmap, value) {
|
|
return {
|
|
enumerable: !(bitmap & 1),
|
|
configurable: !(bitmap & 2),
|
|
writable: !(bitmap & 4),
|
|
value: value
|
|
};
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1290":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Checks if `value` is suitable for use as unique object key.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
*/
|
|
function isKeyable(value) {
|
|
var type = typeof value;
|
|
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
? (value !== '__proto__')
|
|
: (value === null);
|
|
}
|
|
|
|
module.exports = isKeyable;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "12ca":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "12f2":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
|
|
exports.default = function (ref) {
|
|
return {
|
|
methods: {
|
|
focus: function focus() {
|
|
this.$refs[ref].focus();
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
;
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1310":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
* and has a `typeof` result of "object".
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
* @example
|
|
*
|
|
* _.isObjectLike({});
|
|
* // => true
|
|
*
|
|
* _.isObjectLike([1, 2, 3]);
|
|
* // => true
|
|
*
|
|
* _.isObjectLike(_.noop);
|
|
* // => false
|
|
*
|
|
* _.isObjectLike(null);
|
|
* // => false
|
|
*/
|
|
function isObjectLike(value) {
|
|
return value != null && typeof value == 'object';
|
|
}
|
|
|
|
module.exports = isObjectLike;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1368":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var coreJsData = __webpack_require__("da03");
|
|
|
|
/** Used to detect methods masquerading as native. */
|
|
var maskSrcKey = (function() {
|
|
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
|
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
}());
|
|
|
|
/**
|
|
* Checks if `func` has its source masked.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to check.
|
|
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
*/
|
|
function isMasked(func) {
|
|
return !!maskSrcKey && (maskSrcKey in func);
|
|
}
|
|
|
|
module.exports = isMasked;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "14c3":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var classof = __webpack_require__("c6b6");
|
|
var regexpExec = __webpack_require__("9263");
|
|
|
|
// `RegExpExec` abstract operation
|
|
// https://tc39.github.io/ecma262/#sec-regexpexec
|
|
module.exports = function (R, S) {
|
|
var exec = R.exec;
|
|
if (typeof exec === 'function') {
|
|
var result = exec.call(R, S);
|
|
if (typeof result !== 'object') {
|
|
throw TypeError('RegExp exec method returned something other than an Object or null');
|
|
}
|
|
return result;
|
|
}
|
|
|
|
if (classof(R) !== 'RegExp') {
|
|
throw TypeError('RegExp#exec called on incompatible receiver');
|
|
}
|
|
|
|
return regexpExec.call(R, S);
|
|
};
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "14e9":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 127);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 127:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/resize-event"
|
|
var resize_event_ = __webpack_require__(16);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/scrollbar-width"
|
|
var scrollbar_width_ = __webpack_require__(39);
|
|
var scrollbar_width_default = /*#__PURE__*/__webpack_require__.n(scrollbar_width_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/util"
|
|
var util_ = __webpack_require__(3);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/dom"
|
|
var dom_ = __webpack_require__(2);
|
|
|
|
// CONCATENATED MODULE: ./packages/scrollbar/src/util.js
|
|
var BAR_MAP = {
|
|
vertical: {
|
|
offset: 'offsetHeight',
|
|
scroll: 'scrollTop',
|
|
scrollSize: 'scrollHeight',
|
|
size: 'height',
|
|
key: 'vertical',
|
|
axis: 'Y',
|
|
client: 'clientY',
|
|
direction: 'top'
|
|
},
|
|
horizontal: {
|
|
offset: 'offsetWidth',
|
|
scroll: 'scrollLeft',
|
|
scrollSize: 'scrollWidth',
|
|
size: 'width',
|
|
key: 'horizontal',
|
|
axis: 'X',
|
|
client: 'clientX',
|
|
direction: 'left'
|
|
}
|
|
};
|
|
|
|
function renderThumbStyle(_ref) {
|
|
var move = _ref.move,
|
|
size = _ref.size,
|
|
bar = _ref.bar;
|
|
|
|
var style = {};
|
|
var translate = 'translate' + bar.axis + '(' + move + '%)';
|
|
|
|
style[bar.size] = size;
|
|
style.transform = translate;
|
|
style.msTransform = translate;
|
|
style.webkitTransform = translate;
|
|
|
|
return style;
|
|
};
|
|
// CONCATENATED MODULE: ./packages/scrollbar/src/bar.js
|
|
|
|
|
|
|
|
/* istanbul ignore next */
|
|
/* harmony default export */ var src_bar = ({
|
|
name: 'Bar',
|
|
|
|
props: {
|
|
vertical: Boolean,
|
|
size: String,
|
|
move: Number
|
|
},
|
|
|
|
computed: {
|
|
bar: function bar() {
|
|
return BAR_MAP[this.vertical ? 'vertical' : 'horizontal'];
|
|
},
|
|
wrap: function wrap() {
|
|
return this.$parent.wrap;
|
|
}
|
|
},
|
|
|
|
render: function render(h) {
|
|
var size = this.size,
|
|
move = this.move,
|
|
bar = this.bar;
|
|
|
|
|
|
return h(
|
|
'div',
|
|
{
|
|
'class': ['el-scrollbar__bar', 'is-' + bar.key],
|
|
on: {
|
|
'mousedown': this.clickTrackHandler
|
|
}
|
|
},
|
|
[h('div', {
|
|
ref: 'thumb',
|
|
'class': 'el-scrollbar__thumb',
|
|
on: {
|
|
'mousedown': this.clickThumbHandler
|
|
},
|
|
|
|
style: renderThumbStyle({ size: size, move: move, bar: bar }) })]
|
|
);
|
|
},
|
|
|
|
|
|
methods: {
|
|
clickThumbHandler: function clickThumbHandler(e) {
|
|
// prevent click event of right button
|
|
if (e.ctrlKey || e.button === 2) {
|
|
return;
|
|
}
|
|
this.startDrag(e);
|
|
this[this.bar.axis] = e.currentTarget[this.bar.offset] - (e[this.bar.client] - e.currentTarget.getBoundingClientRect()[this.bar.direction]);
|
|
},
|
|
clickTrackHandler: function clickTrackHandler(e) {
|
|
var offset = Math.abs(e.target.getBoundingClientRect()[this.bar.direction] - e[this.bar.client]);
|
|
var thumbHalf = this.$refs.thumb[this.bar.offset] / 2;
|
|
var thumbPositionPercentage = (offset - thumbHalf) * 100 / this.$el[this.bar.offset];
|
|
|
|
this.wrap[this.bar.scroll] = thumbPositionPercentage * this.wrap[this.bar.scrollSize] / 100;
|
|
},
|
|
startDrag: function startDrag(e) {
|
|
e.stopImmediatePropagation();
|
|
this.cursorDown = true;
|
|
|
|
Object(dom_["on"])(document, 'mousemove', this.mouseMoveDocumentHandler);
|
|
Object(dom_["on"])(document, 'mouseup', this.mouseUpDocumentHandler);
|
|
document.onselectstart = function () {
|
|
return false;
|
|
};
|
|
},
|
|
mouseMoveDocumentHandler: function mouseMoveDocumentHandler(e) {
|
|
if (this.cursorDown === false) return;
|
|
var prevPage = this[this.bar.axis];
|
|
|
|
if (!prevPage) return;
|
|
|
|
var offset = (this.$el.getBoundingClientRect()[this.bar.direction] - e[this.bar.client]) * -1;
|
|
var thumbClickPosition = this.$refs.thumb[this.bar.offset] - prevPage;
|
|
var thumbPositionPercentage = (offset - thumbClickPosition) * 100 / this.$el[this.bar.offset];
|
|
|
|
this.wrap[this.bar.scroll] = thumbPositionPercentage * this.wrap[this.bar.scrollSize] / 100;
|
|
},
|
|
mouseUpDocumentHandler: function mouseUpDocumentHandler(e) {
|
|
this.cursorDown = false;
|
|
this[this.bar.axis] = 0;
|
|
Object(dom_["off"])(document, 'mousemove', this.mouseMoveDocumentHandler);
|
|
document.onselectstart = null;
|
|
}
|
|
},
|
|
|
|
destroyed: function destroyed() {
|
|
Object(dom_["off"])(document, 'mouseup', this.mouseUpDocumentHandler);
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/scrollbar/src/main.js
|
|
// reference https://github.com/noeldelgado/gemini-scrollbar/blob/master/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* istanbul ignore next */
|
|
/* harmony default export */ var main = ({
|
|
name: 'ElScrollbar',
|
|
|
|
components: { Bar: src_bar },
|
|
|
|
props: {
|
|
native: Boolean,
|
|
wrapStyle: {},
|
|
wrapClass: {},
|
|
viewClass: {},
|
|
viewStyle: {},
|
|
noresize: Boolean, // 如果 container 尺寸不会发生变化,最好设置它可以优化性能
|
|
tag: {
|
|
type: String,
|
|
default: 'div'
|
|
}
|
|
},
|
|
|
|
data: function data() {
|
|
return {
|
|
sizeWidth: '0',
|
|
sizeHeight: '0',
|
|
moveX: 0,
|
|
moveY: 0
|
|
};
|
|
},
|
|
|
|
|
|
computed: {
|
|
wrap: function wrap() {
|
|
return this.$refs.wrap;
|
|
}
|
|
},
|
|
|
|
render: function render(h) {
|
|
var gutter = scrollbar_width_default()();
|
|
var style = this.wrapStyle;
|
|
|
|
if (gutter) {
|
|
var gutterWith = '-' + gutter + 'px';
|
|
var gutterStyle = 'margin-bottom: ' + gutterWith + '; margin-right: ' + gutterWith + ';';
|
|
|
|
if (Array.isArray(this.wrapStyle)) {
|
|
style = Object(util_["toObject"])(this.wrapStyle);
|
|
style.marginRight = style.marginBottom = gutterWith;
|
|
} else if (typeof this.wrapStyle === 'string') {
|
|
style += gutterStyle;
|
|
} else {
|
|
style = gutterStyle;
|
|
}
|
|
}
|
|
var view = h(this.tag, {
|
|
class: ['el-scrollbar__view', this.viewClass],
|
|
style: this.viewStyle,
|
|
ref: 'resize'
|
|
}, this.$slots.default);
|
|
var wrap = h(
|
|
'div',
|
|
{
|
|
ref: 'wrap',
|
|
style: style,
|
|
on: {
|
|
'scroll': this.handleScroll
|
|
},
|
|
|
|
'class': [this.wrapClass, 'el-scrollbar__wrap', gutter ? '' : 'el-scrollbar__wrap--hidden-default'] },
|
|
[[view]]
|
|
);
|
|
var nodes = void 0;
|
|
|
|
if (!this.native) {
|
|
nodes = [wrap, h(src_bar, {
|
|
attrs: {
|
|
move: this.moveX,
|
|
size: this.sizeWidth }
|
|
}), h(src_bar, {
|
|
attrs: {
|
|
vertical: true,
|
|
move: this.moveY,
|
|
size: this.sizeHeight }
|
|
})];
|
|
} else {
|
|
nodes = [h(
|
|
'div',
|
|
{
|
|
ref: 'wrap',
|
|
'class': [this.wrapClass, 'el-scrollbar__wrap'],
|
|
style: style },
|
|
[[view]]
|
|
)];
|
|
}
|
|
return h('div', { class: 'el-scrollbar' }, nodes);
|
|
},
|
|
|
|
|
|
methods: {
|
|
handleScroll: function handleScroll() {
|
|
var wrap = this.wrap;
|
|
|
|
this.moveY = wrap.scrollTop * 100 / wrap.clientHeight;
|
|
this.moveX = wrap.scrollLeft * 100 / wrap.clientWidth;
|
|
},
|
|
update: function update() {
|
|
var heightPercentage = void 0,
|
|
widthPercentage = void 0;
|
|
var wrap = this.wrap;
|
|
if (!wrap) return;
|
|
|
|
heightPercentage = wrap.clientHeight * 100 / wrap.scrollHeight;
|
|
widthPercentage = wrap.clientWidth * 100 / wrap.scrollWidth;
|
|
|
|
this.sizeHeight = heightPercentage < 100 ? heightPercentage + '%' : '';
|
|
this.sizeWidth = widthPercentage < 100 ? widthPercentage + '%' : '';
|
|
}
|
|
},
|
|
|
|
mounted: function mounted() {
|
|
if (this.native) return;
|
|
this.$nextTick(this.update);
|
|
!this.noresize && Object(resize_event_["addResizeListener"])(this.$refs.resize, this.update);
|
|
},
|
|
beforeDestroy: function beforeDestroy() {
|
|
if (this.native) return;
|
|
!this.noresize && Object(resize_event_["removeResizeListener"])(this.$refs.resize, this.update);
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/scrollbar/index.js
|
|
|
|
|
|
/* istanbul ignore next */
|
|
main.install = function (Vue) {
|
|
Vue.component(main.name, main);
|
|
};
|
|
|
|
/* harmony default export */ var scrollbar = __webpack_exports__["default"] = (main);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 16:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("4010");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 2:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("5924");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 3:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("8122");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 39:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("e62d");
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "159b":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__("da84");
|
|
var DOMIterables = __webpack_require__("fdbc");
|
|
var forEach = __webpack_require__("17c2");
|
|
var createNonEnumerableProperty = __webpack_require__("9112");
|
|
|
|
for (var COLLECTION_NAME in DOMIterables) {
|
|
var Collection = global[COLLECTION_NAME];
|
|
var CollectionPrototype = Collection && Collection.prototype;
|
|
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
|
|
createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
|
|
} catch (error) {
|
|
CollectionPrototype.forEach = forEach;
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1609":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function (it) {
|
|
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
|
|
return it;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "17c2":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $forEach = __webpack_require__("b727").forEach;
|
|
var arrayMethodIsStrict = __webpack_require__("a640");
|
|
var arrayMethodUsesToLength = __webpack_require__("ae40");
|
|
|
|
var STRICT_METHOD = arrayMethodIsStrict('forEach');
|
|
var USES_TO_LENGTH = arrayMethodUsesToLength('forEach');
|
|
|
|
// `Array.prototype.forEach` method implementation
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
|
module.exports = (!STRICT_METHOD || !USES_TO_LENGTH) ? function forEach(callbackfn /* , thisArg */) {
|
|
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
} : [].forEach;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "17ed":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports = { "default": __webpack_require__("511f"), __esModule: true };
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1836":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
|
|
var toIObject = __webpack_require__("6ca1");
|
|
var gOPN = __webpack_require__("6438").f;
|
|
var toString = {}.toString;
|
|
|
|
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
|
? Object.getOwnPropertyNames(window) : [];
|
|
|
|
var getWindowNames = function (it) {
|
|
try {
|
|
return gOPN(it);
|
|
} catch (e) {
|
|
return windowNames.slice();
|
|
}
|
|
};
|
|
|
|
module.exports.f = function getOwnPropertyNames(it) {
|
|
return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1917":
|
|
/***/ (function(module, exports) {
|
|
|
|
exports.f = {}.propertyIsEnumerable;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "19aa":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function (it, Constructor, name) {
|
|
if (!(it instanceof Constructor)) {
|
|
throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
|
|
} return it;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "19fa":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var toInteger = __webpack_require__("fc5e");
|
|
var defined = __webpack_require__("c901");
|
|
// true -> String#at
|
|
// false -> String#codePointAt
|
|
module.exports = function (TO_STRING) {
|
|
return function (that, pos) {
|
|
var s = String(defined(that));
|
|
var i = toInteger(pos);
|
|
var l = s.length;
|
|
var a, b;
|
|
if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
|
|
a = s.charCodeAt(i);
|
|
return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
|
|
? TO_STRING ? s.charAt(i) : a
|
|
: TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
|
|
};
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1a14":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var anObject = __webpack_require__("77e9");
|
|
var IE8_DOM_DEFINE = __webpack_require__("faf5");
|
|
var toPrimitive = __webpack_require__("3397");
|
|
var dP = Object.defineProperty;
|
|
|
|
exports.f = __webpack_require__("0bad") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
|
|
anObject(O);
|
|
P = toPrimitive(P, true);
|
|
anObject(Attributes);
|
|
if (IE8_DOM_DEFINE) try {
|
|
return dP(O, P, Attributes);
|
|
} catch (e) { /* empty */ }
|
|
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
|
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
return O;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1a2d":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getTag = __webpack_require__("42a2"),
|
|
isObjectLike = __webpack_require__("1310");
|
|
|
|
/** `Object#toString` result references. */
|
|
var mapTag = '[object Map]';
|
|
|
|
/**
|
|
* The base implementation of `_.isMap` without Node.js optimizations.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
|
|
*/
|
|
function baseIsMap(value) {
|
|
return isObjectLike(value) && getTag(value) == mapTag;
|
|
}
|
|
|
|
module.exports = baseIsMap;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1a8c":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Checks if `value` is the
|
|
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
* @example
|
|
*
|
|
* _.isObject({});
|
|
* // => true
|
|
*
|
|
* _.isObject([1, 2, 3]);
|
|
* // => true
|
|
*
|
|
* _.isObject(_.noop);
|
|
* // => true
|
|
*
|
|
* _.isObject(null);
|
|
* // => false
|
|
*/
|
|
function isObject(value) {
|
|
var type = typeof value;
|
|
return value != null && (type == 'object' || type == 'function');
|
|
}
|
|
|
|
module.exports = isObject;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1bac":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseGetAllKeys = __webpack_require__("7d1f"),
|
|
getSymbolsIn = __webpack_require__("a029"),
|
|
keysIn = __webpack_require__("9934");
|
|
|
|
/**
|
|
* Creates an array of own and inherited enumerable property names and
|
|
* symbols of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property names and symbols.
|
|
*/
|
|
function getAllKeysIn(object) {
|
|
return baseGetAllKeys(object, keysIn, getSymbolsIn);
|
|
}
|
|
|
|
module.exports = getAllKeysIn;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1be4":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getBuiltIn = __webpack_require__("d066");
|
|
|
|
module.exports = getBuiltIn('document', 'documentElement');
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1c0b":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function (it) {
|
|
if (typeof it != 'function') {
|
|
throw TypeError(String(it) + ' is not a function');
|
|
} return it;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1c7e":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var wellKnownSymbol = __webpack_require__("b622");
|
|
|
|
var ITERATOR = wellKnownSymbol('iterator');
|
|
var SAFE_CLOSING = false;
|
|
|
|
try {
|
|
var called = 0;
|
|
var iteratorWithReturn = {
|
|
next: function () {
|
|
return { done: !!called++ };
|
|
},
|
|
'return': function () {
|
|
SAFE_CLOSING = true;
|
|
}
|
|
};
|
|
iteratorWithReturn[ITERATOR] = function () {
|
|
return this;
|
|
};
|
|
// eslint-disable-next-line no-throw-literal
|
|
Array.from(iteratorWithReturn, function () { throw 2; });
|
|
} catch (error) { /* empty */ }
|
|
|
|
module.exports = function (exec, SKIP_CLOSING) {
|
|
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
|
|
var ITERATION_SUPPORT = false;
|
|
try {
|
|
var object = {};
|
|
object[ITERATOR] = function () {
|
|
return {
|
|
next: function () {
|
|
return { done: ITERATION_SUPPORT = true };
|
|
}
|
|
};
|
|
};
|
|
exec(object);
|
|
} catch (error) { /* empty */ }
|
|
return ITERATION_SUPPORT;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1cdc":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var userAgent = __webpack_require__("342f");
|
|
|
|
module.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1cec":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getNative = __webpack_require__("0b07"),
|
|
root = __webpack_require__("2b3e");
|
|
|
|
/* Built-in method references that are verified to be native. */
|
|
var Promise = getNative(root, 'Promise');
|
|
|
|
module.exports = Promise;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1d80":
|
|
/***/ (function(module, exports) {
|
|
|
|
// `RequireObjectCoercible` abstract operation
|
|
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
|
|
module.exports = function (it) {
|
|
if (it == undefined) throw TypeError("Can't call method on " + it);
|
|
return it;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1dde":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var fails = __webpack_require__("d039");
|
|
var wellKnownSymbol = __webpack_require__("b622");
|
|
var V8_VERSION = __webpack_require__("2d00");
|
|
|
|
var SPECIES = wellKnownSymbol('species');
|
|
|
|
module.exports = function (METHOD_NAME) {
|
|
// We can't use this feature detection in V8 since it causes
|
|
// deoptimization and serious performance degradation
|
|
// https://github.com/zloirock/core-js/issues/677
|
|
return V8_VERSION >= 51 || !fails(function () {
|
|
var array = [];
|
|
var constructor = array.constructor = {};
|
|
constructor[SPECIES] = function () {
|
|
return { foo: 1 };
|
|
};
|
|
return array[METHOD_NAME](Boolean).foo !== 1;
|
|
});
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1efc":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Removes `key` and its value from the hash.
|
|
*
|
|
* @private
|
|
* @name delete
|
|
* @memberOf Hash
|
|
* @param {Object} hash The hash to modify.
|
|
* @param {string} key The key of the value to remove.
|
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
*/
|
|
function hashDelete(key) {
|
|
var result = this.has(key) && delete this.__data__[key];
|
|
this.size -= result ? 1 : 0;
|
|
return result;
|
|
}
|
|
|
|
module.exports = hashDelete;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "1fc8":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getMapData = __webpack_require__("4245");
|
|
|
|
/**
|
|
* Sets the map `key` to `value`.
|
|
*
|
|
* @private
|
|
* @name set
|
|
* @memberOf MapCache
|
|
* @param {string} key The key of the value to set.
|
|
* @param {*} value The value to set.
|
|
* @returns {Object} Returns the map cache instance.
|
|
*/
|
|
function mapCacheSet(key, value) {
|
|
var data = getMapData(this, key),
|
|
size = data.size;
|
|
|
|
data.set(key, value);
|
|
this.size += data.size == size ? 0 : 1;
|
|
return this;
|
|
}
|
|
|
|
module.exports = mapCacheSet;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "2266":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var anObject = __webpack_require__("825a");
|
|
var isArrayIteratorMethod = __webpack_require__("e95a");
|
|
var toLength = __webpack_require__("50c4");
|
|
var bind = __webpack_require__("0366");
|
|
var getIteratorMethod = __webpack_require__("35a1");
|
|
var callWithSafeIterationClosing = __webpack_require__("9bdd");
|
|
|
|
var Result = function (stopped, result) {
|
|
this.stopped = stopped;
|
|
this.result = result;
|
|
};
|
|
|
|
var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {
|
|
var boundFunction = bind(fn, that, AS_ENTRIES ? 2 : 1);
|
|
var iterator, iterFn, index, length, result, next, step;
|
|
|
|
if (IS_ITERATOR) {
|
|
iterator = iterable;
|
|
} else {
|
|
iterFn = getIteratorMethod(iterable);
|
|
if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
|
|
// optimisation for array iterators
|
|
if (isArrayIteratorMethod(iterFn)) {
|
|
for (index = 0, length = toLength(iterable.length); length > index; index++) {
|
|
result = AS_ENTRIES
|
|
? boundFunction(anObject(step = iterable[index])[0], step[1])
|
|
: boundFunction(iterable[index]);
|
|
if (result && result instanceof Result) return result;
|
|
} return new Result(false);
|
|
}
|
|
iterator = iterFn.call(iterable);
|
|
}
|
|
|
|
next = iterator.next;
|
|
while (!(step = next.call(iterator)).done) {
|
|
result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);
|
|
if (typeof result == 'object' && result && result instanceof Result) return result;
|
|
} return new Result(false);
|
|
};
|
|
|
|
iterate.stop = function (result) {
|
|
return new Result(true, result);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "23cb":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var toInteger = __webpack_require__("a691");
|
|
|
|
var max = Math.max;
|
|
var min = Math.min;
|
|
|
|
// Helper for a popular repeating case of the spec:
|
|
// Let integer be ? ToInteger(index).
|
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
module.exports = function (index, length) {
|
|
var integer = toInteger(index);
|
|
return integer < 0 ? max(integer + length, 0) : min(integer, length);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "23e7":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__("da84");
|
|
var getOwnPropertyDescriptor = __webpack_require__("06cf").f;
|
|
var createNonEnumerableProperty = __webpack_require__("9112");
|
|
var redefine = __webpack_require__("6eeb");
|
|
var setGlobal = __webpack_require__("ce4e");
|
|
var copyConstructorProperties = __webpack_require__("e893");
|
|
var isForced = __webpack_require__("94ca");
|
|
|
|
/*
|
|
options.target - name of the target object
|
|
options.global - target is the global object
|
|
options.stat - export as static methods of target
|
|
options.proto - export as prototype methods of target
|
|
options.real - real prototype method for the `pure` version
|
|
options.forced - export even if the native feature is available
|
|
options.bind - bind methods to the target, required for the `pure` version
|
|
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
options.sham - add a flag to not completely full polyfills
|
|
options.enumerable - export as enumerable property
|
|
options.noTargetGet - prevent calling a getter on target
|
|
*/
|
|
module.exports = function (options, source) {
|
|
var TARGET = options.target;
|
|
var GLOBAL = options.global;
|
|
var STATIC = options.stat;
|
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
if (GLOBAL) {
|
|
target = global;
|
|
} else if (STATIC) {
|
|
target = global[TARGET] || setGlobal(TARGET, {});
|
|
} else {
|
|
target = (global[TARGET] || {}).prototype;
|
|
}
|
|
if (target) for (key in source) {
|
|
sourceProperty = source[key];
|
|
if (options.noTargetGet) {
|
|
descriptor = getOwnPropertyDescriptor(target, key);
|
|
targetProperty = descriptor && descriptor.value;
|
|
} else targetProperty = target[key];
|
|
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
// contained in target
|
|
if (!FORCED && targetProperty !== undefined) {
|
|
if (typeof sourceProperty === typeof targetProperty) continue;
|
|
copyConstructorProperties(sourceProperty, targetProperty);
|
|
}
|
|
// add a flag to not completely full polyfills
|
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
|
}
|
|
// extend global
|
|
redefine(target, key, sourceProperty, options);
|
|
}
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "241c":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var internalObjectKeys = __webpack_require__("ca84");
|
|
var enumBugKeys = __webpack_require__("7839");
|
|
|
|
var hiddenKeys = enumBugKeys.concat('length', 'prototype');
|
|
|
|
// `Object.getOwnPropertyNames` method
|
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
|
|
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
return internalObjectKeys(O, hiddenKeys);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "2474":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var root = __webpack_require__("2b3e");
|
|
|
|
/** Built-in value references. */
|
|
var Uint8Array = root.Uint8Array;
|
|
|
|
module.exports = Uint8Array;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "2478":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getMapData = __webpack_require__("4245");
|
|
|
|
/**
|
|
* Gets the map value for `key`.
|
|
*
|
|
* @private
|
|
* @name get
|
|
* @memberOf MapCache
|
|
* @param {string} key The key of the value to get.
|
|
* @returns {*} Returns the entry value.
|
|
*/
|
|
function mapCacheGet(key) {
|
|
return getMapData(this, key).get(key);
|
|
}
|
|
|
|
module.exports = mapCacheGet;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "2510":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAugAAACGAQMAAAC19e3QAAAABlBMVEX///8AAABVwtN+AAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAbJJREFUaIHtmlFqxDAMRAU+QI7kq/tIPoBBlWbktPRnA21T2IwJS2JbT/mRRlbWTON/xuE5Zm+zm3X3sY7R3JdZ3MRKbpjWfMRqzKw0ifl89DLxsG0JMbAGbdsUXXTR/5DuvIkdiQhQoEFPl/C3DvjGhjDETBC76KKLfh89fxH6VvaZCYhudEYfM1dj8kwPjuQhuuiif4vVCr8U2MG4ja1bXcPS26wZ0vkSGbqiiy76PfS161tkgu0vM8Gg8SIduSGFdGYlXCnhZSYQXfQn0XesUjnDWZgZJg2q+1Vp6aDjEAopPq5mAtFFF/2ndGhpdXxQ5SaFN1y18yrf6AEdecy8pKuiiy76r9Cx1rGAoA/hxr7du03HuIaXUveqma/1lkQX/Ul050GyQVeplnyk2CKSYU/b2fdh00UXXfT76Ax6nD8N3zfSH9u0sYclsdWXyjMTbNW90AcWXfTn0KtKZfcHSzGPKpXKmdG7C1IWsLtKFV100W+m48BY9qvuHeIJ4WWXJ797dN8tobabuKKLLvpN9LYNzvMqG7cNku2f/9EZ1ffhCzFJvOz+iC76e9M13m98ACkZcs36ACChAAAAAElFTkSuQmCC"
|
|
|
|
/***/ }),
|
|
|
|
/***/ "2524":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var nativeCreate = __webpack_require__("6044");
|
|
|
|
/** Used to stand-in for `undefined` hash values. */
|
|
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
|
|
/**
|
|
* Sets the hash `key` to `value`.
|
|
*
|
|
* @private
|
|
* @name set
|
|
* @memberOf Hash
|
|
* @param {string} key The key of the value to set.
|
|
* @param {*} value The value to set.
|
|
* @returns {Object} Returns the hash instance.
|
|
*/
|
|
function hashSet(key, value) {
|
|
var data = this.__data__;
|
|
this.size += this.has(key) ? 0 : 1;
|
|
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
return this;
|
|
}
|
|
|
|
module.exports = hashSet;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "253c":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseGetTag = __webpack_require__("3729"),
|
|
isObjectLike = __webpack_require__("1310");
|
|
|
|
/** `Object#toString` result references. */
|
|
var argsTag = '[object Arguments]';
|
|
|
|
/**
|
|
* The base implementation of `_.isArguments`.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
*/
|
|
function baseIsArguments(value) {
|
|
return isObjectLike(value) && baseGetTag(value) == argsTag;
|
|
}
|
|
|
|
module.exports = baseIsArguments;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "2626":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var getBuiltIn = __webpack_require__("d066");
|
|
var definePropertyModule = __webpack_require__("9bf2");
|
|
var wellKnownSymbol = __webpack_require__("b622");
|
|
var DESCRIPTORS = __webpack_require__("83ab");
|
|
|
|
var SPECIES = wellKnownSymbol('species');
|
|
|
|
module.exports = function (CONSTRUCTOR_NAME) {
|
|
var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
|
|
var defineProperty = definePropertyModule.f;
|
|
|
|
if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
|
|
defineProperty(Constructor, SPECIES, {
|
|
configurable: true,
|
|
get: function () { return this; }
|
|
});
|
|
}
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "269b":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "26dd":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var create = __webpack_require__("6f4f");
|
|
var descriptor = __webpack_require__("10db");
|
|
var setToStringTag = __webpack_require__("92f0");
|
|
var IteratorPrototype = {};
|
|
|
|
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
|
__webpack_require__("051b")(IteratorPrototype, __webpack_require__("cc15")('iterator'), function () { return this; });
|
|
|
|
module.exports = function (Constructor, NAME, next) {
|
|
Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
|
|
setToStringTag(Constructor, NAME + ' Iterator');
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "282a":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQQAAAEECAAAAADrYxXWAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAAFxEAABcRAcom8z8AAARGSURBVHja7d3RbtwoFIDhb1b75O2L9c2yF0ku3DAYPK7aVf9zE80YE/KJ6AgM+PGm+Od3N+BPiBCEgBAQAkJACAgBISAEhIAQEAL49/jxsXv/bBD6mJR8TL702rX9VtcThIAQEAJCQAh4hvB2Gt+ONzzeY1bLsMjjEB8lh3XOrl1t9RzhL4sQhIAQEAJCwJdR5DGGo7O3yZePyZez8ebbeWULtWy3+jPqCUJACAgBISAEnKTIq7GQ4xamXYcZdjbfejnqCUJACAgBISAE3JYiZ08DX8xjvzI3fkQ9QQgIASEgBISAkxS5nojuSVmzydRjplwouRH1BCEgBISAEPAsO3w/ve/H7274na1+3LM29PEnfNpu9Wf07yAEhIAQEAJCwJcU+Wpt7z9mmevFbR49i/xVEYIQEAJCQAh4NorcHscdbz/G+lDvngU6s5aNb68nCAEhIASEgBDwZbb56tPH7Y0ds/sWNotcXR40rrOeIASEgBAQAkLAldN1bj0zZ5YN17dVrjd3HPUEISAEhIAQEAKejSKHOxqHJddjfRS5nYRnda5M89YThIAQEAJCQAh4tqz36rPI9ceHV2dmj7cPbxg2cJop6wlCQAgIASEgBDxLkVdz4/DTrbG96WNlnraeIASEgBAQAkLAs00f28PA9f0d24tpXnwnyDBarvM1QhACQkAICAHPluts7wQx+nJhSeqLJ5bP5lQX/rDPqCcIASEgBISAELD2po/t3Lg+UtweDS4sJBpGE61nEYIQEAJCQAg4OYBue/WN5ZIv/tr2Rd4eIQgBISAEhICTowO2k9SLZ6Zu7/Z48ZCBz6gnCAEhIASEgBCwdnTAwpPJYSxk0Vkt618Or822gPwU9QQhIASEgBAQAk6OMV8fKa4fnTqsZWFd7D0raJtofRohCAEhIASEgLV9kccvHa49JtcW7hsWsXxtFhuTvvUEISAEhIAQEAK23vRxLHKM9cHdsJara3GulmwU+TVCEAJCQAgIAWtntA6LHGNhpHgsuTAIXT8zZ3sS9qeoJwgBISAEhIAQcOV9kS/G+mPH4TWTIgu/r+U6TyMEISAEhIAQcLJcZ6Oa9x/bLzxemNjd/n37LwqpJwgBISAEhIAQcOV9kccYHvp29Rnm1cNg1986Mo56ghAQAkJACAgBzxDeTuPb8L7He3yU+fh0rPNYcnbtWNmw5OzL2Z+yhPCXRQhCQAgIASFg7YzWY6wfK/c2uX3/dRzLDRw2qWeRZxGCEBACQkAIOEmR67F+AM89zz73z2GdXasnCAEhIASEgBBwW4qcpcHtw9C33zO50LLp4LWeIASEgBAQAkLASYpcT0vbJ4hvL2zdnpltonUvQhACQkAIeJYdvp/e9+N3N/zOeFzdb/gRV7cybr/wav1Qg/XT8z6jfwchIASEgBAQAm7bF/n/jnqCEBACQkAICAEhIASEgBAQAkJACAgB/AcNv7/8P9p8EAAAAABJRU5ErkJggg=="
|
|
|
|
/***/ }),
|
|
|
|
/***/ "28c9":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Removes all key-value entries from the list cache.
|
|
*
|
|
* @private
|
|
* @name clear
|
|
* @memberOf ListCache
|
|
*/
|
|
function listCacheClear() {
|
|
this.__data__ = [];
|
|
this.size = 0;
|
|
}
|
|
|
|
module.exports = listCacheClear;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "29f3":
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/**
|
|
* Used to resolve the
|
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
* of values.
|
|
*/
|
|
var nativeObjectToString = objectProto.toString;
|
|
|
|
/**
|
|
* Converts `value` to a string using `Object.prototype.toString`.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to convert.
|
|
* @returns {string} Returns the converted string.
|
|
*/
|
|
function objectToString(value) {
|
|
return nativeObjectToString.call(value);
|
|
}
|
|
|
|
module.exports = objectToString;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "2a5e":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.default = scrollIntoView;
|
|
|
|
var _vue = __webpack_require__("8bbf");
|
|
|
|
var _vue2 = _interopRequireDefault(_vue);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function scrollIntoView(container, selected) {
|
|
if (_vue2.default.prototype.$isServer) return;
|
|
|
|
if (!selected) {
|
|
container.scrollTop = 0;
|
|
return;
|
|
}
|
|
|
|
var offsetParents = [];
|
|
var pointer = selected.offsetParent;
|
|
while (pointer && container !== pointer && container.contains(pointer)) {
|
|
offsetParents.push(pointer);
|
|
pointer = pointer.offsetParent;
|
|
}
|
|
var top = selected.offsetTop + offsetParents.reduce(function (prev, curr) {
|
|
return prev + curr.offsetTop;
|
|
}, 0);
|
|
var bottom = top + selected.offsetHeight;
|
|
var viewRectTop = container.scrollTop;
|
|
var viewRectBottom = viewRectTop + container.clientHeight;
|
|
|
|
if (top < viewRectTop) {
|
|
container.scrollTop = top;
|
|
} else if (bottom > viewRectBottom) {
|
|
container.scrollTop = bottom - container.clientHeight;
|
|
}
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "2a63":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "2b1c":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "2b3e":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var freeGlobal = __webpack_require__("585a");
|
|
|
|
/** Detect free variable `self`. */
|
|
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
|
|
/** Used as a reference to the global object. */
|
|
var root = freeGlobal || freeSelf || Function('return this')();
|
|
|
|
module.exports = root;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "2bb5":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
|
|
var _util = __webpack_require__("8122");
|
|
|
|
/**
|
|
* Show migrating guide in browser console.
|
|
*
|
|
* Usage:
|
|
* import Migrating from 'element-ui/src/mixins/migrating';
|
|
*
|
|
* mixins: [Migrating]
|
|
*
|
|
* add getMigratingConfig method for your component.
|
|
* getMigratingConfig() {
|
|
* return {
|
|
* props: {
|
|
* 'allow-no-selection': 'allow-no-selection is removed.',
|
|
* 'selection-mode': 'selection-mode is removed.'
|
|
* },
|
|
* events: {
|
|
* selectionchange: 'selectionchange is renamed to selection-change.'
|
|
* }
|
|
* };
|
|
* },
|
|
*/
|
|
exports.default = {
|
|
mounted: function mounted() {
|
|
if (true) return;
|
|
if (!this.$vnode) return;
|
|
|
|
var _getMigratingConfig = this.getMigratingConfig(),
|
|
_getMigratingConfig$p = _getMigratingConfig.props,
|
|
props = _getMigratingConfig$p === undefined ? {} : _getMigratingConfig$p,
|
|
_getMigratingConfig$e = _getMigratingConfig.events,
|
|
events = _getMigratingConfig$e === undefined ? {} : _getMigratingConfig$e;
|
|
|
|
var _$vnode = this.$vnode,
|
|
data = _$vnode.data,
|
|
componentOptions = _$vnode.componentOptions;
|
|
|
|
var definedProps = data.attrs || {};
|
|
var definedEvents = componentOptions.listeners || {};
|
|
|
|
for (var propName in definedProps) {
|
|
propName = (0, _util.kebabCase)(propName); // compatible with camel case
|
|
if (props[propName]) {
|
|
console.warn('[Element Migrating][' + this.$options.name + '][Attribute]: ' + props[propName]);
|
|
}
|
|
}
|
|
|
|
for (var eventName in definedEvents) {
|
|
eventName = (0, _util.kebabCase)(eventName); // compatible with camel case
|
|
if (events[eventName]) {
|
|
console.warn('[Element Migrating][' + this.$options.name + '][Event]: ' + events[eventName]);
|
|
}
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
getMigratingConfig: function getMigratingConfig() {
|
|
return {
|
|
props: {},
|
|
events: {}
|
|
};
|
|
}
|
|
}
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "2cf4":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__("da84");
|
|
var fails = __webpack_require__("d039");
|
|
var classof = __webpack_require__("c6b6");
|
|
var bind = __webpack_require__("0366");
|
|
var html = __webpack_require__("1be4");
|
|
var createElement = __webpack_require__("cc12");
|
|
var IS_IOS = __webpack_require__("1cdc");
|
|
|
|
var location = global.location;
|
|
var set = global.setImmediate;
|
|
var clear = global.clearImmediate;
|
|
var process = global.process;
|
|
var MessageChannel = global.MessageChannel;
|
|
var Dispatch = global.Dispatch;
|
|
var counter = 0;
|
|
var queue = {};
|
|
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
var defer, channel, port;
|
|
|
|
var run = function (id) {
|
|
// eslint-disable-next-line no-prototype-builtins
|
|
if (queue.hasOwnProperty(id)) {
|
|
var fn = queue[id];
|
|
delete queue[id];
|
|
fn();
|
|
}
|
|
};
|
|
|
|
var runner = function (id) {
|
|
return function () {
|
|
run(id);
|
|
};
|
|
};
|
|
|
|
var listener = function (event) {
|
|
run(event.data);
|
|
};
|
|
|
|
var post = function (id) {
|
|
// old engines have not location.origin
|
|
global.postMessage(id + '', location.protocol + '//' + location.host);
|
|
};
|
|
|
|
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
if (!set || !clear) {
|
|
set = function setImmediate(fn) {
|
|
var args = [];
|
|
var i = 1;
|
|
while (arguments.length > i) args.push(arguments[i++]);
|
|
queue[++counter] = function () {
|
|
// eslint-disable-next-line no-new-func
|
|
(typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);
|
|
};
|
|
defer(counter);
|
|
return counter;
|
|
};
|
|
clear = function clearImmediate(id) {
|
|
delete queue[id];
|
|
};
|
|
// Node.js 0.8-
|
|
if (classof(process) == 'process') {
|
|
defer = function (id) {
|
|
process.nextTick(runner(id));
|
|
};
|
|
// Sphere (JS game engine) Dispatch API
|
|
} else if (Dispatch && Dispatch.now) {
|
|
defer = function (id) {
|
|
Dispatch.now(runner(id));
|
|
};
|
|
// Browsers with MessageChannel, includes WebWorkers
|
|
// except iOS - https://github.com/zloirock/core-js/issues/624
|
|
} else if (MessageChannel && !IS_IOS) {
|
|
channel = new MessageChannel();
|
|
port = channel.port2;
|
|
channel.port1.onmessage = listener;
|
|
defer = bind(port.postMessage, port, 1);
|
|
// Browsers with postMessage, skip WebWorkers
|
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
} else if (
|
|
global.addEventListener &&
|
|
typeof postMessage == 'function' &&
|
|
!global.importScripts &&
|
|
!fails(post) &&
|
|
location.protocol !== 'file:'
|
|
) {
|
|
defer = post;
|
|
global.addEventListener('message', listener, false);
|
|
// IE8-
|
|
} else if (ONREADYSTATECHANGE in createElement('script')) {
|
|
defer = function (id) {
|
|
html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
|
|
html.removeChild(this);
|
|
run(id);
|
|
};
|
|
};
|
|
// Rest old browsers
|
|
} else {
|
|
defer = function (id) {
|
|
setTimeout(runner(id), 0);
|
|
};
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
set: set,
|
|
clear: clear
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "2d00":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__("da84");
|
|
var userAgent = __webpack_require__("342f");
|
|
|
|
var process = global.process;
|
|
var versions = process && process.versions;
|
|
var v8 = versions && versions.v8;
|
|
var match, version;
|
|
|
|
if (v8) {
|
|
match = v8.split('.');
|
|
version = match[0] + match[1];
|
|
} else if (userAgent) {
|
|
match = userAgent.match(/Edge\/(\d+)/);
|
|
if (!match || match[1] >= 74) {
|
|
match = userAgent.match(/Chrome\/(\d+)/);
|
|
if (match) version = match[1];
|
|
}
|
|
}
|
|
|
|
module.exports = version && +version;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "2d7c":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* A specialized version of `_.filter` for arrays without support for
|
|
* iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} predicate The function invoked per iteration.
|
|
* @returns {Array} Returns the new filtered array.
|
|
*/
|
|
function arrayFilter(array, predicate) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length,
|
|
resIndex = 0,
|
|
result = [];
|
|
|
|
while (++index < length) {
|
|
var value = array[index];
|
|
if (predicate(value, index, array)) {
|
|
result[resIndex++] = value;
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = arrayFilter;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "2dcb":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var overArg = __webpack_require__("91e9");
|
|
|
|
/** Built-in value references. */
|
|
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
|
|
module.exports = getPrototype;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "2f9a":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function () { /* empty */ };
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "2fcc":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Removes `key` and its value from the stack.
|
|
*
|
|
* @private
|
|
* @name delete
|
|
* @memberOf Stack
|
|
* @param {string} key The key of the value to remove.
|
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
*/
|
|
function stackDelete(key) {
|
|
var data = this.__data__,
|
|
result = data['delete'](key);
|
|
|
|
this.size = data.size;
|
|
return result;
|
|
}
|
|
|
|
module.exports = stackDelete;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "301c":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__("e198")('asyncIterator');
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "30c9":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isFunction = __webpack_require__("9520"),
|
|
isLength = __webpack_require__("b218");
|
|
|
|
/**
|
|
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
* not a function and has a `value.length` that's an integer greater than or
|
|
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
* @example
|
|
*
|
|
* _.isArrayLike([1, 2, 3]);
|
|
* // => true
|
|
*
|
|
* _.isArrayLike(document.body.children);
|
|
* // => true
|
|
*
|
|
* _.isArrayLike('abc');
|
|
* // => true
|
|
*
|
|
* _.isArrayLike(_.noop);
|
|
* // => false
|
|
*/
|
|
function isArrayLike(value) {
|
|
return value != null && isLength(value.length) && !isFunction(value);
|
|
}
|
|
|
|
module.exports = isArrayLike;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "32b3":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseAssignValue = __webpack_require__("872a"),
|
|
eq = __webpack_require__("9638");
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
|
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* for equality comparisons.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to modify.
|
|
* @param {string} key The key of the property to assign.
|
|
* @param {*} value The value to assign.
|
|
*/
|
|
function assignValue(object, key, value) {
|
|
var objValue = object[key];
|
|
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
|
|
(value === undefined && !(key in object))) {
|
|
baseAssignValue(object, key, value);
|
|
}
|
|
}
|
|
|
|
module.exports = assignValue;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "32f4":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arrayFilter = __webpack_require__("2d7c"),
|
|
stubArray = __webpack_require__("d327");
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Built-in value references. */
|
|
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
|
|
/**
|
|
* Creates an array of the own enumerable symbols of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of symbols.
|
|
*/
|
|
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
|
if (object == null) {
|
|
return [];
|
|
}
|
|
object = Object(object);
|
|
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
return propertyIsEnumerable.call(object, symbol);
|
|
});
|
|
};
|
|
|
|
module.exports = getSymbols;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "3397":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 7.1.1 ToPrimitive(input [, PreferredType])
|
|
var isObject = __webpack_require__("7a41");
|
|
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
|
// and the second argument - flag - preferred type is a string
|
|
module.exports = function (it, S) {
|
|
if (!isObject(it)) return it;
|
|
var fn, val;
|
|
if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
|
if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
|
|
if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
|
throw TypeError("Can't convert object to primitive value");
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "342f":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getBuiltIn = __webpack_require__("d066");
|
|
|
|
module.exports = getBuiltIn('navigator', 'userAgent') || '';
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "34ac":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isFunction = __webpack_require__("9520"),
|
|
isMasked = __webpack_require__("1368"),
|
|
isObject = __webpack_require__("1a8c"),
|
|
toSource = __webpack_require__("dc57");
|
|
|
|
/**
|
|
* Used to match `RegExp`
|
|
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
*/
|
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
|
|
/** Used to detect host constructors (Safari). */
|
|
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
|
|
/** Used for built-in method references. */
|
|
var funcProto = Function.prototype,
|
|
objectProto = Object.prototype;
|
|
|
|
/** Used to resolve the decompiled source of functions. */
|
|
var funcToString = funcProto.toString;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/** Used to detect if a method is native. */
|
|
var reIsNative = RegExp('^' +
|
|
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
|
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
);
|
|
|
|
/**
|
|
* The base implementation of `_.isNative` without bad shim checks.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
* else `false`.
|
|
*/
|
|
function baseIsNative(value) {
|
|
if (!isObject(value) || isMasked(value)) {
|
|
return false;
|
|
}
|
|
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
return pattern.test(toSource(value));
|
|
}
|
|
|
|
module.exports = baseIsNative;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "35a1":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var classof = __webpack_require__("f5df");
|
|
var Iterators = __webpack_require__("3f8c");
|
|
var wellKnownSymbol = __webpack_require__("b622");
|
|
|
|
var ITERATOR = wellKnownSymbol('iterator');
|
|
|
|
module.exports = function (it) {
|
|
if (it != undefined) return it[ITERATOR]
|
|
|| it['@@iterator']
|
|
|| Iterators[classof(it)];
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "3698":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Gets the value at `key` of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} [object] The object to query.
|
|
* @param {string} key The key of the property to get.
|
|
* @returns {*} Returns the property value.
|
|
*/
|
|
function getValue(object, key) {
|
|
return object == null ? undefined : object[key];
|
|
}
|
|
|
|
module.exports = getValue;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "3729":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var Symbol = __webpack_require__("9e69"),
|
|
getRawTag = __webpack_require__("00fd"),
|
|
objectToString = __webpack_require__("29f3");
|
|
|
|
/** `Object#toString` result references. */
|
|
var nullTag = '[object Null]',
|
|
undefinedTag = '[object Undefined]';
|
|
|
|
/** Built-in value references. */
|
|
var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
|
|
|
/**
|
|
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to query.
|
|
* @returns {string} Returns the `toStringTag`.
|
|
*/
|
|
function baseGetTag(value) {
|
|
if (value == null) {
|
|
return value === undefined ? undefinedTag : nullTag;
|
|
}
|
|
return (symToStringTag && symToStringTag in Object(value))
|
|
? getRawTag(value)
|
|
: objectToString(value);
|
|
}
|
|
|
|
module.exports = baseGetTag;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "3787":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 67);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 0:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
|
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
function normalizeComponent (
|
|
scriptExports,
|
|
render,
|
|
staticRenderFns,
|
|
functionalTemplate,
|
|
injectStyles,
|
|
scopeId,
|
|
moduleIdentifier, /* server only */
|
|
shadowMode /* vue-cli only */
|
|
) {
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (render) {
|
|
options.render = render
|
|
options.staticRenderFns = staticRenderFns
|
|
options._compiled = true
|
|
}
|
|
|
|
// functional template
|
|
if (functionalTemplate) {
|
|
options.functional = true
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = 'data-v-' + scopeId
|
|
}
|
|
|
|
var hook
|
|
if (moduleIdentifier) { // server build
|
|
hook = function (context) {
|
|
// 2.3 injection
|
|
context =
|
|
context || // cached call
|
|
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
// 2.2 with runInNewContext: true
|
|
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
context = __VUE_SSR_CONTEXT__
|
|
}
|
|
// inject component styles
|
|
if (injectStyles) {
|
|
injectStyles.call(this, context)
|
|
}
|
|
// register component module identifier for async chunk inferrence
|
|
if (context && context._registeredComponents) {
|
|
context._registeredComponents.add(moduleIdentifier)
|
|
}
|
|
}
|
|
// used by ssr in case component is cached and beforeCreate
|
|
// never gets called
|
|
options._ssrRegister = hook
|
|
} else if (injectStyles) {
|
|
hook = shadowMode
|
|
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
|
: injectStyles
|
|
}
|
|
|
|
if (hook) {
|
|
if (options.functional) {
|
|
// for template-only hot-reload because in that case the render fn doesn't
|
|
// go through the normalizer
|
|
options._injectStyles = hook
|
|
// register for functioal component in vue file
|
|
var originalRender = options.render
|
|
options.render = function renderWithStyleInjection (h, context) {
|
|
hook.call(context)
|
|
return originalRender(h, context)
|
|
}
|
|
} else {
|
|
// inject component registration as beforeCreate hook
|
|
var existing = options.beforeCreate
|
|
options.beforeCreate = existing
|
|
? [].concat(existing, hook)
|
|
: [hook]
|
|
}
|
|
}
|
|
|
|
return {
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 3:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("8122");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 4:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("d010");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 48:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("a15e");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 67:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form-item.vue?vue&type=template&id=b6f3db6c&
|
|
var render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"div",
|
|
{
|
|
staticClass: "el-form-item",
|
|
class: [
|
|
{
|
|
"el-form-item--feedback": _vm.elForm && _vm.elForm.statusIcon,
|
|
"is-error": _vm.validateState === "error",
|
|
"is-validating": _vm.validateState === "validating",
|
|
"is-success": _vm.validateState === "success",
|
|
"is-required": _vm.isRequired || _vm.required,
|
|
"is-no-asterisk": _vm.elForm && _vm.elForm.hideRequiredAsterisk
|
|
},
|
|
_vm.sizeClass ? "el-form-item--" + _vm.sizeClass : ""
|
|
]
|
|
},
|
|
[
|
|
_c(
|
|
"label-wrap",
|
|
{
|
|
attrs: {
|
|
"is-auto-width": _vm.labelStyle && _vm.labelStyle.width === "auto",
|
|
"update-all": _vm.form.labelWidth === "auto"
|
|
}
|
|
},
|
|
[
|
|
_vm.label || _vm.$slots.label
|
|
? _c(
|
|
"label",
|
|
{
|
|
staticClass: "el-form-item__label",
|
|
style: _vm.labelStyle,
|
|
attrs: { for: _vm.labelFor }
|
|
},
|
|
[
|
|
_vm._t("label", [
|
|
_vm._v(_vm._s(_vm.label + _vm.form.labelSuffix))
|
|
])
|
|
],
|
|
2
|
|
)
|
|
: _vm._e()
|
|
]
|
|
),
|
|
_c(
|
|
"div",
|
|
{ staticClass: "el-form-item__content", style: _vm.contentStyle },
|
|
[
|
|
_vm._t("default"),
|
|
_c(
|
|
"transition",
|
|
{ attrs: { name: "el-zoom-in-top" } },
|
|
[
|
|
_vm.validateState === "error" &&
|
|
_vm.showMessage &&
|
|
_vm.form.showMessage
|
|
? _vm._t(
|
|
"error",
|
|
[
|
|
_c(
|
|
"div",
|
|
{
|
|
staticClass: "el-form-item__error",
|
|
class: {
|
|
"el-form-item__error--inline":
|
|
typeof _vm.inlineMessage === "boolean"
|
|
? _vm.inlineMessage
|
|
: (_vm.elForm && _vm.elForm.inlineMessage) ||
|
|
false
|
|
}
|
|
},
|
|
[
|
|
_vm._v(
|
|
"\n " +
|
|
_vm._s(_vm.validateMessage) +
|
|
"\n "
|
|
)
|
|
]
|
|
)
|
|
],
|
|
{ error: _vm.validateMessage }
|
|
)
|
|
: _vm._e()
|
|
],
|
|
2
|
|
)
|
|
],
|
|
2
|
|
)
|
|
],
|
|
1
|
|
)
|
|
}
|
|
var staticRenderFns = []
|
|
render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/form/src/form-item.vue?vue&type=template&id=b6f3db6c&
|
|
|
|
// EXTERNAL MODULE: external "async-validator"
|
|
var external_async_validator_ = __webpack_require__(48);
|
|
var external_async_validator_default = /*#__PURE__*/__webpack_require__.n(external_async_validator_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
|
|
var emitter_ = __webpack_require__(4);
|
|
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/merge"
|
|
var merge_ = __webpack_require__(9);
|
|
var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/util"
|
|
var util_ = __webpack_require__(3);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/label-wrap.vue?vue&type=script&lang=js&
|
|
|
|
|
|
/* harmony default export */ var label_wrapvue_type_script_lang_js_ = ({
|
|
props: {
|
|
isAutoWidth: Boolean,
|
|
updateAll: Boolean
|
|
},
|
|
|
|
inject: ['elForm', 'elFormItem'],
|
|
|
|
render: function render() {
|
|
var h = arguments[0];
|
|
|
|
var slots = this.$slots.default;
|
|
if (!slots) return null;
|
|
if (this.isAutoWidth) {
|
|
var autoLabelWidth = this.elForm.autoLabelWidth;
|
|
var style = {};
|
|
if (autoLabelWidth && autoLabelWidth !== 'auto') {
|
|
var marginLeft = parseInt(autoLabelWidth, 10) - this.computedWidth;
|
|
if (marginLeft) {
|
|
style.marginLeft = marginLeft + 'px';
|
|
}
|
|
}
|
|
return h(
|
|
'div',
|
|
{ 'class': 'el-form-item__label-wrap', style: style },
|
|
[slots]
|
|
);
|
|
} else {
|
|
return slots[0];
|
|
}
|
|
},
|
|
|
|
|
|
methods: {
|
|
getLabelWidth: function getLabelWidth() {
|
|
if (this.$el && this.$el.firstElementChild) {
|
|
var computedWidth = window.getComputedStyle(this.$el.firstElementChild).width;
|
|
return Math.ceil(parseFloat(computedWidth));
|
|
} else {
|
|
return 0;
|
|
}
|
|
},
|
|
updateLabelWidth: function updateLabelWidth() {
|
|
var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'update';
|
|
|
|
if (this.$slots.default && this.isAutoWidth && this.$el.firstElementChild) {
|
|
if (action === 'update') {
|
|
this.computedWidth = this.getLabelWidth();
|
|
} else if (action === 'remove') {
|
|
this.elForm.deregisterLabelWidth(this.computedWidth);
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
watch: {
|
|
computedWidth: function computedWidth(val, oldVal) {
|
|
if (this.updateAll) {
|
|
this.elForm.registerLabelWidth(val, oldVal);
|
|
this.elFormItem.updateComputedLabelWidth(val);
|
|
}
|
|
}
|
|
},
|
|
|
|
data: function data() {
|
|
return {
|
|
computedWidth: 0
|
|
};
|
|
},
|
|
mounted: function mounted() {
|
|
this.updateLabelWidth('update');
|
|
},
|
|
updated: function updated() {
|
|
this.updateLabelWidth('update');
|
|
},
|
|
beforeDestroy: function beforeDestroy() {
|
|
this.updateLabelWidth('remove');
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/form/src/label-wrap.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_label_wrapvue_type_script_lang_js_ = (label_wrapvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
var componentNormalizer = __webpack_require__(0);
|
|
|
|
// CONCATENATED MODULE: ./packages/form/src/label-wrap.vue
|
|
var label_wrap_render, label_wrap_staticRenderFns
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
src_label_wrapvue_type_script_lang_js_,
|
|
label_wrap_render,
|
|
label_wrap_staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var api; }
|
|
component.options.__file = "packages/form/src/label-wrap.vue"
|
|
/* harmony default export */ var label_wrap = (component.exports);
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form-item.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var form_itemvue_type_script_lang_js_ = ({
|
|
name: 'ElFormItem',
|
|
|
|
componentName: 'ElFormItem',
|
|
|
|
mixins: [emitter_default.a],
|
|
|
|
provide: function provide() {
|
|
return {
|
|
elFormItem: this
|
|
};
|
|
},
|
|
|
|
|
|
inject: ['elForm'],
|
|
|
|
props: {
|
|
label: String,
|
|
labelWidth: String,
|
|
prop: String,
|
|
required: {
|
|
type: Boolean,
|
|
default: undefined
|
|
},
|
|
rules: [Object, Array],
|
|
error: String,
|
|
validateStatus: String,
|
|
for: String,
|
|
inlineMessage: {
|
|
type: [String, Boolean],
|
|
default: ''
|
|
},
|
|
showMessage: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
size: String
|
|
},
|
|
components: {
|
|
// use this component to calculate auto width
|
|
LabelWrap: label_wrap
|
|
},
|
|
watch: {
|
|
error: {
|
|
immediate: true,
|
|
handler: function handler(value) {
|
|
this.validateMessage = value;
|
|
this.validateState = value ? 'error' : '';
|
|
}
|
|
},
|
|
validateStatus: function validateStatus(value) {
|
|
this.validateState = value;
|
|
}
|
|
},
|
|
computed: {
|
|
labelFor: function labelFor() {
|
|
return this.for || this.prop;
|
|
},
|
|
labelStyle: function labelStyle() {
|
|
var ret = {};
|
|
if (this.form.labelPosition === 'top') return ret;
|
|
var labelWidth = this.labelWidth || this.form.labelWidth;
|
|
if (labelWidth) {
|
|
ret.width = labelWidth;
|
|
}
|
|
return ret;
|
|
},
|
|
contentStyle: function contentStyle() {
|
|
var ret = {};
|
|
var label = this.label;
|
|
if (this.form.labelPosition === 'top' || this.form.inline) return ret;
|
|
if (!label && !this.labelWidth && this.isNested) return ret;
|
|
var labelWidth = this.labelWidth || this.form.labelWidth;
|
|
if (labelWidth === 'auto') {
|
|
if (this.labelWidth === 'auto') {
|
|
ret.marginLeft = this.computedLabelWidth;
|
|
} else if (this.form.labelWidth === 'auto') {
|
|
ret.marginLeft = this.elForm.autoLabelWidth;
|
|
}
|
|
} else {
|
|
ret.marginLeft = labelWidth;
|
|
}
|
|
return ret;
|
|
},
|
|
form: function form() {
|
|
var parent = this.$parent;
|
|
var parentName = parent.$options.componentName;
|
|
while (parentName !== 'ElForm') {
|
|
if (parentName === 'ElFormItem') {
|
|
this.isNested = true;
|
|
}
|
|
parent = parent.$parent;
|
|
parentName = parent.$options.componentName;
|
|
}
|
|
return parent;
|
|
},
|
|
fieldValue: function fieldValue() {
|
|
var model = this.form.model;
|
|
if (!model || !this.prop) {
|
|
return;
|
|
}
|
|
|
|
var path = this.prop;
|
|
if (path.indexOf(':') !== -1) {
|
|
path = path.replace(/:/, '.');
|
|
}
|
|
|
|
return Object(util_["getPropByPath"])(model, path, true).v;
|
|
},
|
|
isRequired: function isRequired() {
|
|
var rules = this.getRules();
|
|
var isRequired = false;
|
|
|
|
if (rules && rules.length) {
|
|
rules.every(function (rule) {
|
|
if (rule.required) {
|
|
isRequired = true;
|
|
return false;
|
|
}
|
|
return true;
|
|
});
|
|
}
|
|
return isRequired;
|
|
},
|
|
_formSize: function _formSize() {
|
|
return this.elForm.size;
|
|
},
|
|
elFormItemSize: function elFormItemSize() {
|
|
return this.size || this._formSize;
|
|
},
|
|
sizeClass: function sizeClass() {
|
|
return this.elFormItemSize || (this.$ELEMENT || {}).size;
|
|
}
|
|
},
|
|
data: function data() {
|
|
return {
|
|
validateState: '',
|
|
validateMessage: '',
|
|
validateDisabled: false,
|
|
validator: {},
|
|
isNested: false,
|
|
computedLabelWidth: ''
|
|
};
|
|
},
|
|
|
|
methods: {
|
|
validate: function validate(trigger) {
|
|
var _this = this;
|
|
|
|
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : util_["noop"];
|
|
|
|
this.validateDisabled = false;
|
|
var rules = this.getFilteredRule(trigger);
|
|
if ((!rules || rules.length === 0) && this.required === undefined) {
|
|
callback();
|
|
return true;
|
|
}
|
|
|
|
this.validateState = 'validating';
|
|
|
|
var descriptor = {};
|
|
if (rules && rules.length > 0) {
|
|
rules.forEach(function (rule) {
|
|
delete rule.trigger;
|
|
});
|
|
}
|
|
descriptor[this.prop] = rules;
|
|
|
|
var validator = new external_async_validator_default.a(descriptor);
|
|
var model = {};
|
|
|
|
model[this.prop] = this.fieldValue;
|
|
|
|
validator.validate(model, { firstFields: true }, function (errors, invalidFields) {
|
|
_this.validateState = !errors ? 'success' : 'error';
|
|
_this.validateMessage = errors ? errors[0].message : '';
|
|
|
|
callback(_this.validateMessage, invalidFields);
|
|
_this.elForm && _this.elForm.$emit('validate', _this.prop, !errors, _this.validateMessage || null);
|
|
});
|
|
},
|
|
clearValidate: function clearValidate() {
|
|
this.validateState = '';
|
|
this.validateMessage = '';
|
|
this.validateDisabled = false;
|
|
},
|
|
resetField: function resetField() {
|
|
var _this2 = this;
|
|
|
|
this.validateState = '';
|
|
this.validateMessage = '';
|
|
|
|
var model = this.form.model;
|
|
var value = this.fieldValue;
|
|
var path = this.prop;
|
|
if (path.indexOf(':') !== -1) {
|
|
path = path.replace(/:/, '.');
|
|
}
|
|
|
|
var prop = Object(util_["getPropByPath"])(model, path, true);
|
|
|
|
this.validateDisabled = true;
|
|
if (Array.isArray(value)) {
|
|
prop.o[prop.k] = [].concat(this.initialValue);
|
|
} else {
|
|
prop.o[prop.k] = this.initialValue;
|
|
}
|
|
|
|
// reset validateDisabled after onFieldChange triggered
|
|
this.$nextTick(function () {
|
|
_this2.validateDisabled = false;
|
|
});
|
|
|
|
this.broadcast('ElTimeSelect', 'fieldReset', this.initialValue);
|
|
},
|
|
getRules: function getRules() {
|
|
var formRules = this.form.rules;
|
|
var selfRules = this.rules;
|
|
var requiredRule = this.required !== undefined ? { required: !!this.required } : [];
|
|
|
|
var prop = Object(util_["getPropByPath"])(formRules, this.prop || '');
|
|
formRules = formRules ? prop.o[this.prop || ''] || prop.v : [];
|
|
|
|
return [].concat(selfRules || formRules || []).concat(requiredRule);
|
|
},
|
|
getFilteredRule: function getFilteredRule(trigger) {
|
|
var rules = this.getRules();
|
|
|
|
return rules.filter(function (rule) {
|
|
if (!rule.trigger || trigger === '') return true;
|
|
if (Array.isArray(rule.trigger)) {
|
|
return rule.trigger.indexOf(trigger) > -1;
|
|
} else {
|
|
return rule.trigger === trigger;
|
|
}
|
|
}).map(function (rule) {
|
|
return merge_default()({}, rule);
|
|
});
|
|
},
|
|
onFieldBlur: function onFieldBlur() {
|
|
this.validate('blur');
|
|
},
|
|
onFieldChange: function onFieldChange() {
|
|
if (this.validateDisabled) {
|
|
this.validateDisabled = false;
|
|
return;
|
|
}
|
|
|
|
this.validate('change');
|
|
},
|
|
updateComputedLabelWidth: function updateComputedLabelWidth(width) {
|
|
this.computedLabelWidth = width ? width + 'px' : '';
|
|
},
|
|
addValidateEvents: function addValidateEvents() {
|
|
var rules = this.getRules();
|
|
|
|
if (rules.length || this.required !== undefined) {
|
|
this.$on('el.form.blur', this.onFieldBlur);
|
|
this.$on('el.form.change', this.onFieldChange);
|
|
}
|
|
},
|
|
removeValidateEvents: function removeValidateEvents() {
|
|
this.$off();
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
if (this.prop) {
|
|
this.dispatch('ElForm', 'el.form.addField', [this]);
|
|
|
|
var initialValue = this.fieldValue;
|
|
if (Array.isArray(initialValue)) {
|
|
initialValue = [].concat(initialValue);
|
|
}
|
|
Object.defineProperty(this, 'initialValue', {
|
|
value: initialValue
|
|
});
|
|
|
|
this.addValidateEvents();
|
|
}
|
|
},
|
|
beforeDestroy: function beforeDestroy() {
|
|
this.dispatch('ElForm', 'el.form.removeField', [this]);
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/form/src/form-item.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_form_itemvue_type_script_lang_js_ = (form_itemvue_type_script_lang_js_);
|
|
// CONCATENATED MODULE: ./packages/form/src/form-item.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var form_item_component = Object(componentNormalizer["a" /* default */])(
|
|
src_form_itemvue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var form_item_api; }
|
|
form_item_component.options.__file = "packages/form/src/form-item.vue"
|
|
/* harmony default export */ var form_item = (form_item_component.exports);
|
|
// CONCATENATED MODULE: ./packages/form-item/index.js
|
|
|
|
|
|
/* istanbul ignore next */
|
|
form_item.install = function (Vue) {
|
|
Vue.component(form_item.name, form_item);
|
|
};
|
|
|
|
/* harmony default export */ var packages_form_item = __webpack_exports__["default"] = (form_item);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 9:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("7f4d");
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "37e8":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var DESCRIPTORS = __webpack_require__("83ab");
|
|
var definePropertyModule = __webpack_require__("9bf2");
|
|
var anObject = __webpack_require__("825a");
|
|
var objectKeys = __webpack_require__("df75");
|
|
|
|
// `Object.defineProperties` method
|
|
// https://tc39.github.io/ecma262/#sec-object.defineproperties
|
|
module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
anObject(O);
|
|
var keys = objectKeys(Properties);
|
|
var length = keys.length;
|
|
var index = 0;
|
|
var key;
|
|
while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
|
|
return O;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "3818":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var Stack = __webpack_require__("7e64"),
|
|
arrayEach = __webpack_require__("8057"),
|
|
assignValue = __webpack_require__("32b3"),
|
|
baseAssign = __webpack_require__("5b01"),
|
|
baseAssignIn = __webpack_require__("0f0f"),
|
|
cloneBuffer = __webpack_require__("e5383"),
|
|
copyArray = __webpack_require__("4359"),
|
|
copySymbols = __webpack_require__("54eb"),
|
|
copySymbolsIn = __webpack_require__("1041"),
|
|
getAllKeys = __webpack_require__("a994"),
|
|
getAllKeysIn = __webpack_require__("1bac"),
|
|
getTag = __webpack_require__("42a2"),
|
|
initCloneArray = __webpack_require__("c87c"),
|
|
initCloneByTag = __webpack_require__("c2b6"),
|
|
initCloneObject = __webpack_require__("fa21"),
|
|
isArray = __webpack_require__("6747"),
|
|
isBuffer = __webpack_require__("0d24"),
|
|
isMap = __webpack_require__("cc45"),
|
|
isObject = __webpack_require__("1a8c"),
|
|
isSet = __webpack_require__("d7ee"),
|
|
keys = __webpack_require__("ec69"),
|
|
keysIn = __webpack_require__("9934");
|
|
|
|
/** Used to compose bitmasks for cloning. */
|
|
var CLONE_DEEP_FLAG = 1,
|
|
CLONE_FLAT_FLAG = 2,
|
|
CLONE_SYMBOLS_FLAG = 4;
|
|
|
|
/** `Object#toString` result references. */
|
|
var argsTag = '[object Arguments]',
|
|
arrayTag = '[object Array]',
|
|
boolTag = '[object Boolean]',
|
|
dateTag = '[object Date]',
|
|
errorTag = '[object Error]',
|
|
funcTag = '[object Function]',
|
|
genTag = '[object GeneratorFunction]',
|
|
mapTag = '[object Map]',
|
|
numberTag = '[object Number]',
|
|
objectTag = '[object Object]',
|
|
regexpTag = '[object RegExp]',
|
|
setTag = '[object Set]',
|
|
stringTag = '[object String]',
|
|
symbolTag = '[object Symbol]',
|
|
weakMapTag = '[object WeakMap]';
|
|
|
|
var arrayBufferTag = '[object ArrayBuffer]',
|
|
dataViewTag = '[object DataView]',
|
|
float32Tag = '[object Float32Array]',
|
|
float64Tag = '[object Float64Array]',
|
|
int8Tag = '[object Int8Array]',
|
|
int16Tag = '[object Int16Array]',
|
|
int32Tag = '[object Int32Array]',
|
|
uint8Tag = '[object Uint8Array]',
|
|
uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
uint16Tag = '[object Uint16Array]',
|
|
uint32Tag = '[object Uint32Array]';
|
|
|
|
/** Used to identify `toStringTag` values supported by `_.clone`. */
|
|
var cloneableTags = {};
|
|
cloneableTags[argsTag] = cloneableTags[arrayTag] =
|
|
cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
|
|
cloneableTags[boolTag] = cloneableTags[dateTag] =
|
|
cloneableTags[float32Tag] = cloneableTags[float64Tag] =
|
|
cloneableTags[int8Tag] = cloneableTags[int16Tag] =
|
|
cloneableTags[int32Tag] = cloneableTags[mapTag] =
|
|
cloneableTags[numberTag] = cloneableTags[objectTag] =
|
|
cloneableTags[regexpTag] = cloneableTags[setTag] =
|
|
cloneableTags[stringTag] = cloneableTags[symbolTag] =
|
|
cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
|
|
cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
|
cloneableTags[errorTag] = cloneableTags[funcTag] =
|
|
cloneableTags[weakMapTag] = false;
|
|
|
|
/**
|
|
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
|
|
* traversed objects.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to clone.
|
|
* @param {boolean} bitmask The bitmask flags.
|
|
* 1 - Deep clone
|
|
* 2 - Flatten inherited properties
|
|
* 4 - Clone symbols
|
|
* @param {Function} [customizer] The function to customize cloning.
|
|
* @param {string} [key] The key of `value`.
|
|
* @param {Object} [object] The parent object of `value`.
|
|
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
|
|
* @returns {*} Returns the cloned value.
|
|
*/
|
|
function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
var result,
|
|
isDeep = bitmask & CLONE_DEEP_FLAG,
|
|
isFlat = bitmask & CLONE_FLAT_FLAG,
|
|
isFull = bitmask & CLONE_SYMBOLS_FLAG;
|
|
|
|
if (customizer) {
|
|
result = object ? customizer(value, key, object, stack) : customizer(value);
|
|
}
|
|
if (result !== undefined) {
|
|
return result;
|
|
}
|
|
if (!isObject(value)) {
|
|
return value;
|
|
}
|
|
var isArr = isArray(value);
|
|
if (isArr) {
|
|
result = initCloneArray(value);
|
|
if (!isDeep) {
|
|
return copyArray(value, result);
|
|
}
|
|
} else {
|
|
var tag = getTag(value),
|
|
isFunc = tag == funcTag || tag == genTag;
|
|
|
|
if (isBuffer(value)) {
|
|
return cloneBuffer(value, isDeep);
|
|
}
|
|
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
|
result = (isFlat || isFunc) ? {} : initCloneObject(value);
|
|
if (!isDeep) {
|
|
return isFlat
|
|
? copySymbolsIn(value, baseAssignIn(result, value))
|
|
: copySymbols(value, baseAssign(result, value));
|
|
}
|
|
} else {
|
|
if (!cloneableTags[tag]) {
|
|
return object ? value : {};
|
|
}
|
|
result = initCloneByTag(value, tag, isDeep);
|
|
}
|
|
}
|
|
// Check for circular references and return its corresponding clone.
|
|
stack || (stack = new Stack);
|
|
var stacked = stack.get(value);
|
|
if (stacked) {
|
|
return stacked;
|
|
}
|
|
stack.set(value, result);
|
|
|
|
if (isSet(value)) {
|
|
value.forEach(function(subValue) {
|
|
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
|
});
|
|
} else if (isMap(value)) {
|
|
value.forEach(function(subValue, key) {
|
|
result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
|
});
|
|
}
|
|
|
|
var keysFunc = isFull
|
|
? (isFlat ? getAllKeysIn : getAllKeys)
|
|
: (isFlat ? keysIn : keys);
|
|
|
|
var props = isArr ? undefined : keysFunc(value);
|
|
arrayEach(props || value, function(subValue, key) {
|
|
if (props) {
|
|
key = subValue;
|
|
subValue = value[key];
|
|
}
|
|
// Recursively populate clone (susceptible to call stack limits).
|
|
assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
|
});
|
|
return result;
|
|
}
|
|
|
|
module.exports = baseClone;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "393a":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var LIBRARY = __webpack_require__("e444");
|
|
var $export = __webpack_require__("512c");
|
|
var redefine = __webpack_require__("ba01");
|
|
var hide = __webpack_require__("051b");
|
|
var Iterators = __webpack_require__("8a0d");
|
|
var $iterCreate = __webpack_require__("26dd");
|
|
var setToStringTag = __webpack_require__("92f0");
|
|
var getPrototypeOf = __webpack_require__("ce7a");
|
|
var ITERATOR = __webpack_require__("cc15")('iterator');
|
|
var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
|
|
var FF_ITERATOR = '@@iterator';
|
|
var KEYS = 'keys';
|
|
var VALUES = 'values';
|
|
|
|
var returnThis = function () { return this; };
|
|
|
|
module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
|
|
$iterCreate(Constructor, NAME, next);
|
|
var getMethod = function (kind) {
|
|
if (!BUGGY && kind in proto) return proto[kind];
|
|
switch (kind) {
|
|
case KEYS: return function keys() { return new Constructor(this, kind); };
|
|
case VALUES: return function values() { return new Constructor(this, kind); };
|
|
} return function entries() { return new Constructor(this, kind); };
|
|
};
|
|
var TAG = NAME + ' Iterator';
|
|
var DEF_VALUES = DEFAULT == VALUES;
|
|
var VALUES_BUG = false;
|
|
var proto = Base.prototype;
|
|
var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
|
|
var $default = $native || getMethod(DEFAULT);
|
|
var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
|
|
var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
|
|
var methods, key, IteratorPrototype;
|
|
// Fix native
|
|
if ($anyNative) {
|
|
IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
|
|
if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
|
|
// Set @@toStringTag to native iterators
|
|
setToStringTag(IteratorPrototype, TAG, true);
|
|
// fix for some old engines
|
|
if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
|
|
}
|
|
}
|
|
// fix Array#{values, @@iterator}.name in V8 / FF
|
|
if (DEF_VALUES && $native && $native.name !== VALUES) {
|
|
VALUES_BUG = true;
|
|
$default = function values() { return $native.call(this); };
|
|
}
|
|
// Define iterator
|
|
if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
|
|
hide(proto, ITERATOR, $default);
|
|
}
|
|
// Plug for library
|
|
Iterators[NAME] = $default;
|
|
Iterators[TAG] = returnThis;
|
|
if (DEFAULT) {
|
|
methods = {
|
|
values: DEF_VALUES ? $default : getMethod(VALUES),
|
|
keys: IS_SET ? $default : getMethod(KEYS),
|
|
entries: $entries
|
|
};
|
|
if (FORCED) for (key in methods) {
|
|
if (!(key in proto)) redefine(proto, key, methods[key]);
|
|
} else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
|
|
}
|
|
return methods;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "39ad":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// false -> Array#indexOf
|
|
// true -> Array#includes
|
|
var toIObject = __webpack_require__("6ca1");
|
|
var toLength = __webpack_require__("d16a");
|
|
var toAbsoluteIndex = __webpack_require__("9d11");
|
|
module.exports = function (IS_INCLUDES) {
|
|
return function ($this, el, fromIndex) {
|
|
var O = toIObject($this);
|
|
var length = toLength(O.length);
|
|
var index = toAbsoluteIndex(fromIndex, length);
|
|
var value;
|
|
// Array#includes uses SameValueZero equality algorithm
|
|
// eslint-disable-next-line no-self-compare
|
|
if (IS_INCLUDES && el != el) while (length > index) {
|
|
value = O[index++];
|
|
// eslint-disable-next-line no-self-compare
|
|
if (value != value) return true;
|
|
// Array#indexOf ignores holes, Array#includes - not
|
|
} else for (;length > index; index++) if (IS_INCLUDES || index in O) {
|
|
if (O[index] === el) return IS_INCLUDES || index || 0;
|
|
} return !IS_INCLUDES && -1;
|
|
};
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "39ff":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getNative = __webpack_require__("0b07"),
|
|
root = __webpack_require__("2b3e");
|
|
|
|
/* Built-in method references that are verified to be native. */
|
|
var WeakMap = getNative(root, 'WeakMap');
|
|
|
|
module.exports = WeakMap;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "3b4a":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getNative = __webpack_require__("0b07");
|
|
|
|
var defineProperty = (function() {
|
|
try {
|
|
var func = getNative(Object, 'defineProperty');
|
|
func({}, '', {});
|
|
return func;
|
|
} catch (e) {}
|
|
}());
|
|
|
|
module.exports = defineProperty;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "3c4e":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var isMergeableObject = function isMergeableObject(value) {
|
|
return isNonNullObject(value)
|
|
&& !isSpecial(value)
|
|
};
|
|
|
|
function isNonNullObject(value) {
|
|
return !!value && typeof value === 'object'
|
|
}
|
|
|
|
function isSpecial(value) {
|
|
var stringValue = Object.prototype.toString.call(value);
|
|
|
|
return stringValue === '[object RegExp]'
|
|
|| stringValue === '[object Date]'
|
|
|| isReactElement(value)
|
|
}
|
|
|
|
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
|
var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
|
|
function isReactElement(value) {
|
|
return value.$$typeof === REACT_ELEMENT_TYPE
|
|
}
|
|
|
|
function emptyTarget(val) {
|
|
return Array.isArray(val) ? [] : {}
|
|
}
|
|
|
|
function cloneIfNecessary(value, optionsArgument) {
|
|
var clone = optionsArgument && optionsArgument.clone === true;
|
|
return (clone && isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, optionsArgument) : value
|
|
}
|
|
|
|
function defaultArrayMerge(target, source, optionsArgument) {
|
|
var destination = target.slice();
|
|
source.forEach(function(e, i) {
|
|
if (typeof destination[i] === 'undefined') {
|
|
destination[i] = cloneIfNecessary(e, optionsArgument);
|
|
} else if (isMergeableObject(e)) {
|
|
destination[i] = deepmerge(target[i], e, optionsArgument);
|
|
} else if (target.indexOf(e) === -1) {
|
|
destination.push(cloneIfNecessary(e, optionsArgument));
|
|
}
|
|
});
|
|
return destination
|
|
}
|
|
|
|
function mergeObject(target, source, optionsArgument) {
|
|
var destination = {};
|
|
if (isMergeableObject(target)) {
|
|
Object.keys(target).forEach(function(key) {
|
|
destination[key] = cloneIfNecessary(target[key], optionsArgument);
|
|
});
|
|
}
|
|
Object.keys(source).forEach(function(key) {
|
|
if (!isMergeableObject(source[key]) || !target[key]) {
|
|
destination[key] = cloneIfNecessary(source[key], optionsArgument);
|
|
} else {
|
|
destination[key] = deepmerge(target[key], source[key], optionsArgument);
|
|
}
|
|
});
|
|
return destination
|
|
}
|
|
|
|
function deepmerge(target, source, optionsArgument) {
|
|
var sourceIsArray = Array.isArray(source);
|
|
var targetIsArray = Array.isArray(target);
|
|
var options = optionsArgument || { arrayMerge: defaultArrayMerge };
|
|
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
|
|
if (!sourceAndTargetTypesMatch) {
|
|
return cloneIfNecessary(source, optionsArgument)
|
|
} else if (sourceIsArray) {
|
|
var arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
return arrayMerge(target, source, optionsArgument)
|
|
} else {
|
|
return mergeObject(target, source, optionsArgument)
|
|
}
|
|
}
|
|
|
|
deepmerge.all = function deepmergeAll(array, optionsArgument) {
|
|
if (!Array.isArray(array) || array.length < 2) {
|
|
throw new Error('first argument should be an array with at least two elements')
|
|
}
|
|
|
|
// we are sure there are at least 2 values, so it is safe to have no initial value
|
|
return array.reduce(function(prev, next) {
|
|
return deepmerge(prev, next, optionsArgument)
|
|
})
|
|
};
|
|
|
|
var deepmerge_1 = deepmerge;
|
|
|
|
module.exports = deepmerge_1;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "3c53":
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_13113f32_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b35b");
|
|
/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_13113f32_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_13113f32_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
/* unused harmony reexport * */
|
|
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_13113f32_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "3f6b":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports = { "default": __webpack_require__("b9c7"), __esModule: true };
|
|
|
|
/***/ }),
|
|
|
|
/***/ "3f8c":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = {};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "4010":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.removeResizeListener = exports.addResizeListener = undefined;
|
|
|
|
var _resizeObserverPolyfill = __webpack_require__("6dd8");
|
|
|
|
var _resizeObserverPolyfill2 = _interopRequireDefault(_resizeObserverPolyfill);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
var isServer = typeof window === 'undefined';
|
|
|
|
/* istanbul ignore next */
|
|
var resizeHandler = function resizeHandler(entries) {
|
|
for (var _iterator = entries, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
|
var _ref;
|
|
|
|
if (_isArray) {
|
|
if (_i >= _iterator.length) break;
|
|
_ref = _iterator[_i++];
|
|
} else {
|
|
_i = _iterator.next();
|
|
if (_i.done) break;
|
|
_ref = _i.value;
|
|
}
|
|
|
|
var entry = _ref;
|
|
|
|
var listeners = entry.target.__resizeListeners__ || [];
|
|
if (listeners.length) {
|
|
listeners.forEach(function (fn) {
|
|
fn();
|
|
});
|
|
}
|
|
}
|
|
};
|
|
|
|
/* istanbul ignore next */
|
|
var addResizeListener = exports.addResizeListener = function addResizeListener(element, fn) {
|
|
if (isServer) return;
|
|
if (!element.__resizeListeners__) {
|
|
element.__resizeListeners__ = [];
|
|
element.__ro__ = new _resizeObserverPolyfill2.default(resizeHandler);
|
|
element.__ro__.observe(element);
|
|
}
|
|
element.__resizeListeners__.push(fn);
|
|
};
|
|
|
|
/* istanbul ignore next */
|
|
var removeResizeListener = exports.removeResizeListener = function removeResizeListener(element, fn) {
|
|
if (!element || !element.__resizeListeners__) return;
|
|
element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
|
|
if (!element.__resizeListeners__.length) {
|
|
element.__ro__.disconnect();
|
|
}
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "4105":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 121);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 0:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
|
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
function normalizeComponent (
|
|
scriptExports,
|
|
render,
|
|
staticRenderFns,
|
|
functionalTemplate,
|
|
injectStyles,
|
|
scopeId,
|
|
moduleIdentifier, /* server only */
|
|
shadowMode /* vue-cli only */
|
|
) {
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (render) {
|
|
options.render = render
|
|
options.staticRenderFns = staticRenderFns
|
|
options._compiled = true
|
|
}
|
|
|
|
// functional template
|
|
if (functionalTemplate) {
|
|
options.functional = true
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = 'data-v-' + scopeId
|
|
}
|
|
|
|
var hook
|
|
if (moduleIdentifier) { // server build
|
|
hook = function (context) {
|
|
// 2.3 injection
|
|
context =
|
|
context || // cached call
|
|
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
// 2.2 with runInNewContext: true
|
|
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
context = __VUE_SSR_CONTEXT__
|
|
}
|
|
// inject component styles
|
|
if (injectStyles) {
|
|
injectStyles.call(this, context)
|
|
}
|
|
// register component module identifier for async chunk inferrence
|
|
if (context && context._registeredComponents) {
|
|
context._registeredComponents.add(moduleIdentifier)
|
|
}
|
|
}
|
|
// used by ssr in case component is cached and beforeCreate
|
|
// never gets called
|
|
options._ssrRegister = hook
|
|
} else if (injectStyles) {
|
|
hook = shadowMode
|
|
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
|
: injectStyles
|
|
}
|
|
|
|
if (hook) {
|
|
if (options.functional) {
|
|
// for template-only hot-reload because in that case the render fn doesn't
|
|
// go through the normalizer
|
|
options._injectStyles = hook
|
|
// register for functioal component in vue file
|
|
var originalRender = options.render
|
|
options.render = function renderWithStyleInjection (h, context) {
|
|
hook.call(context)
|
|
return originalRender(h, context)
|
|
}
|
|
} else {
|
|
// inject component registration as beforeCreate hook
|
|
var existing = options.beforeCreate
|
|
options.beforeCreate = existing
|
|
? [].concat(existing, hook)
|
|
: [hook]
|
|
}
|
|
}
|
|
|
|
return {
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 121:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form.vue?vue&type=template&id=a1b5ff34&
|
|
var render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"form",
|
|
{
|
|
staticClass: "el-form",
|
|
class: [
|
|
_vm.labelPosition ? "el-form--label-" + _vm.labelPosition : "",
|
|
{ "el-form--inline": _vm.inline }
|
|
]
|
|
},
|
|
[_vm._t("default")],
|
|
2
|
|
)
|
|
}
|
|
var staticRenderFns = []
|
|
render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/form/src/form.vue?vue&type=template&id=a1b5ff34&
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/merge"
|
|
var merge_ = __webpack_require__(9);
|
|
var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
/* harmony default export */ var formvue_type_script_lang_js_ = ({
|
|
name: 'ElForm',
|
|
|
|
componentName: 'ElForm',
|
|
|
|
provide: function provide() {
|
|
return {
|
|
elForm: this
|
|
};
|
|
},
|
|
|
|
|
|
props: {
|
|
model: Object,
|
|
rules: Object,
|
|
labelPosition: String,
|
|
labelWidth: String,
|
|
labelSuffix: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
inline: Boolean,
|
|
inlineMessage: Boolean,
|
|
statusIcon: Boolean,
|
|
showMessage: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
size: String,
|
|
disabled: Boolean,
|
|
validateOnRuleChange: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
hideRequiredAsterisk: {
|
|
type: Boolean,
|
|
default: false
|
|
}
|
|
},
|
|
watch: {
|
|
rules: function rules() {
|
|
// remove then add event listeners on form-item after form rules change
|
|
this.fields.forEach(function (field) {
|
|
field.removeValidateEvents();
|
|
field.addValidateEvents();
|
|
});
|
|
|
|
if (this.validateOnRuleChange) {
|
|
this.validate(function () {});
|
|
}
|
|
}
|
|
},
|
|
computed: {
|
|
autoLabelWidth: function autoLabelWidth() {
|
|
if (!this.potentialLabelWidthArr.length) return 0;
|
|
var max = Math.max.apply(Math, this.potentialLabelWidthArr);
|
|
return max ? max + 'px' : '';
|
|
}
|
|
},
|
|
data: function data() {
|
|
return {
|
|
fields: [],
|
|
potentialLabelWidthArr: [] // use this array to calculate auto width
|
|
};
|
|
},
|
|
created: function created() {
|
|
var _this = this;
|
|
|
|
this.$on('el.form.addField', function (field) {
|
|
if (field) {
|
|
_this.fields.push(field);
|
|
}
|
|
});
|
|
/* istanbul ignore next */
|
|
this.$on('el.form.removeField', function (field) {
|
|
if (field.prop) {
|
|
_this.fields.splice(_this.fields.indexOf(field), 1);
|
|
}
|
|
});
|
|
},
|
|
|
|
methods: {
|
|
resetFields: function resetFields() {
|
|
if (!this.model) {
|
|
console.warn('[Element Warn][Form]model is required for resetFields to work.');
|
|
return;
|
|
}
|
|
this.fields.forEach(function (field) {
|
|
field.resetField();
|
|
});
|
|
},
|
|
clearValidate: function clearValidate() {
|
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
|
|
var fields = props.length ? typeof props === 'string' ? this.fields.filter(function (field) {
|
|
return props === field.prop;
|
|
}) : this.fields.filter(function (field) {
|
|
return props.indexOf(field.prop) > -1;
|
|
}) : this.fields;
|
|
fields.forEach(function (field) {
|
|
field.clearValidate();
|
|
});
|
|
},
|
|
validate: function validate(callback) {
|
|
var _this2 = this;
|
|
|
|
if (!this.model) {
|
|
console.warn('[Element Warn][Form]model is required for validate to work!');
|
|
return;
|
|
}
|
|
|
|
var promise = void 0;
|
|
// if no callback, return promise
|
|
if (typeof callback !== 'function' && window.Promise) {
|
|
promise = new window.Promise(function (resolve, reject) {
|
|
callback = function callback(valid) {
|
|
valid ? resolve(valid) : reject(valid);
|
|
};
|
|
});
|
|
}
|
|
|
|
var valid = true;
|
|
var count = 0;
|
|
// 如果需要验证的fields为空,调用验证时立刻返回callback
|
|
if (this.fields.length === 0 && callback) {
|
|
callback(true);
|
|
}
|
|
var invalidFields = {};
|
|
this.fields.forEach(function (field) {
|
|
field.validate('', function (message, field) {
|
|
if (message) {
|
|
valid = false;
|
|
}
|
|
invalidFields = merge_default()({}, invalidFields, field);
|
|
if (typeof callback === 'function' && ++count === _this2.fields.length) {
|
|
callback(valid, invalidFields);
|
|
}
|
|
});
|
|
});
|
|
|
|
if (promise) {
|
|
return promise;
|
|
}
|
|
},
|
|
validateField: function validateField(props, cb) {
|
|
props = [].concat(props);
|
|
var fields = this.fields.filter(function (field) {
|
|
return props.indexOf(field.prop) !== -1;
|
|
});
|
|
if (!fields.length) {
|
|
console.warn('[Element Warn]please pass correct props!');
|
|
return;
|
|
}
|
|
|
|
fields.forEach(function (field) {
|
|
field.validate('', cb);
|
|
});
|
|
},
|
|
getLabelWidthIndex: function getLabelWidthIndex(width) {
|
|
var index = this.potentialLabelWidthArr.indexOf(width);
|
|
// it's impossible
|
|
if (index === -1) {
|
|
throw new Error('[ElementForm]unpected width ', width);
|
|
}
|
|
return index;
|
|
},
|
|
registerLabelWidth: function registerLabelWidth(val, oldVal) {
|
|
if (val && oldVal) {
|
|
var index = this.getLabelWidthIndex(oldVal);
|
|
this.potentialLabelWidthArr.splice(index, 1, val);
|
|
} else if (val) {
|
|
this.potentialLabelWidthArr.push(val);
|
|
}
|
|
},
|
|
deregisterLabelWidth: function deregisterLabelWidth(val) {
|
|
var index = this.getLabelWidthIndex(val);
|
|
this.potentialLabelWidthArr.splice(index, 1);
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/form/src/form.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_formvue_type_script_lang_js_ = (formvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
var componentNormalizer = __webpack_require__(0);
|
|
|
|
// CONCATENATED MODULE: ./packages/form/src/form.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
src_formvue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var api; }
|
|
component.options.__file = "packages/form/src/form.vue"
|
|
/* harmony default export */ var src_form = (component.exports);
|
|
// CONCATENATED MODULE: ./packages/form/index.js
|
|
|
|
|
|
/* istanbul ignore next */
|
|
src_form.install = function (Vue) {
|
|
Vue.component(src_form.name, src_form);
|
|
};
|
|
|
|
/* harmony default export */ var packages_form = __webpack_exports__["default"] = (src_form);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 9:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("7f4d");
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "4160":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $ = __webpack_require__("23e7");
|
|
var forEach = __webpack_require__("17c2");
|
|
|
|
// `Array.prototype.forEach` method
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
|
$({ target: 'Array', proto: true, forced: [].forEach != forEach }, {
|
|
forEach: forEach
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "417f":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
|
|
var _vue = __webpack_require__("8bbf");
|
|
|
|
var _vue2 = _interopRequireDefault(_vue);
|
|
|
|
var _dom = __webpack_require__("5924");
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
var nodeList = [];
|
|
var ctx = '@@clickoutsideContext';
|
|
|
|
var startClick = void 0;
|
|
var seed = 0;
|
|
|
|
!_vue2.default.prototype.$isServer && (0, _dom.on)(document, 'mousedown', function (e) {
|
|
return startClick = e;
|
|
});
|
|
|
|
!_vue2.default.prototype.$isServer && (0, _dom.on)(document, 'mouseup', function (e) {
|
|
nodeList.forEach(function (node) {
|
|
return node[ctx].documentHandler(e, startClick);
|
|
});
|
|
});
|
|
|
|
function createDocumentHandler(el, binding, vnode) {
|
|
return function () {
|
|
var mouseup = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
var mousedown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
|
|
if (!vnode || !vnode.context || !mouseup.target || !mousedown.target || el.contains(mouseup.target) || el.contains(mousedown.target) || el === mouseup.target || vnode.context.popperElm && (vnode.context.popperElm.contains(mouseup.target) || vnode.context.popperElm.contains(mousedown.target))) return;
|
|
|
|
if (binding.expression && el[ctx].methodName && vnode.context[el[ctx].methodName]) {
|
|
vnode.context[el[ctx].methodName]();
|
|
} else {
|
|
el[ctx].bindingFn && el[ctx].bindingFn();
|
|
}
|
|
};
|
|
}
|
|
|
|
/**
|
|
* v-clickoutside
|
|
* @desc 点击元素外面才会触发的事件
|
|
* @example
|
|
* ```vue
|
|
* <div v-element-clickoutside="handleClose">
|
|
* ```
|
|
*/
|
|
exports.default = {
|
|
bind: function bind(el, binding, vnode) {
|
|
nodeList.push(el);
|
|
var id = seed++;
|
|
el[ctx] = {
|
|
id: id,
|
|
documentHandler: createDocumentHandler(el, binding, vnode),
|
|
methodName: binding.expression,
|
|
bindingFn: binding.value
|
|
};
|
|
},
|
|
update: function update(el, binding, vnode) {
|
|
el[ctx].documentHandler = createDocumentHandler(el, binding, vnode);
|
|
el[ctx].methodName = binding.expression;
|
|
el[ctx].bindingFn = binding.value;
|
|
},
|
|
unbind: function unbind(el) {
|
|
var len = nodeList.length;
|
|
|
|
for (var i = 0; i < len; i++) {
|
|
if (nodeList[i][ctx].id === el[ctx].id) {
|
|
nodeList.splice(i, 1);
|
|
break;
|
|
}
|
|
}
|
|
delete el[ctx];
|
|
}
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "41b2":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
|
|
var _assign = __webpack_require__("3f6b");
|
|
|
|
var _assign2 = _interopRequireDefault(_assign);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = _assign2.default || function (target) {
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
var source = arguments[i];
|
|
|
|
for (var key in source) {
|
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
target[key] = source[key];
|
|
}
|
|
}
|
|
}
|
|
|
|
return target;
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "41c3":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isObject = __webpack_require__("1a8c"),
|
|
isPrototype = __webpack_require__("eac5"),
|
|
nativeKeysIn = __webpack_require__("ec8c");
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property names.
|
|
*/
|
|
function baseKeysIn(object) {
|
|
if (!isObject(object)) {
|
|
return nativeKeysIn(object);
|
|
}
|
|
var isProto = isPrototype(object),
|
|
result = [];
|
|
|
|
for (var key in object) {
|
|
if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
|
|
result.push(key);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = baseKeysIn;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "41f8":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
|
|
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; };
|
|
|
|
exports.isVNode = isVNode;
|
|
|
|
var _util = __webpack_require__("8122");
|
|
|
|
function isVNode(node) {
|
|
return node !== null && (typeof node === 'undefined' ? 'undefined' : _typeof(node)) === 'object' && (0, _util.hasOwn)(node, 'componentOptions');
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "4245":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isKeyable = __webpack_require__("1290");
|
|
|
|
/**
|
|
* Gets the data for `map`.
|
|
*
|
|
* @private
|
|
* @param {Object} map The map to query.
|
|
* @param {string} key The reference key.
|
|
* @returns {*} Returns the map data.
|
|
*/
|
|
function getMapData(map, key) {
|
|
var data = map.__data__;
|
|
return isKeyable(key)
|
|
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
: data.map;
|
|
}
|
|
|
|
module.exports = getMapData;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "428f":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__("da84");
|
|
|
|
module.exports = global;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "42a2":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var DataView = __webpack_require__("b5a7"),
|
|
Map = __webpack_require__("79bc"),
|
|
Promise = __webpack_require__("1cec"),
|
|
Set = __webpack_require__("c869"),
|
|
WeakMap = __webpack_require__("39ff"),
|
|
baseGetTag = __webpack_require__("3729"),
|
|
toSource = __webpack_require__("dc57");
|
|
|
|
/** `Object#toString` result references. */
|
|
var mapTag = '[object Map]',
|
|
objectTag = '[object Object]',
|
|
promiseTag = '[object Promise]',
|
|
setTag = '[object Set]',
|
|
weakMapTag = '[object WeakMap]';
|
|
|
|
var dataViewTag = '[object DataView]';
|
|
|
|
/** Used to detect maps, sets, and weakmaps. */
|
|
var dataViewCtorString = toSource(DataView),
|
|
mapCtorString = toSource(Map),
|
|
promiseCtorString = toSource(Promise),
|
|
setCtorString = toSource(Set),
|
|
weakMapCtorString = toSource(WeakMap);
|
|
|
|
/**
|
|
* Gets the `toStringTag` of `value`.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to query.
|
|
* @returns {string} Returns the `toStringTag`.
|
|
*/
|
|
var getTag = baseGetTag;
|
|
|
|
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
|
|
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
|
(Map && getTag(new Map) != mapTag) ||
|
|
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
|
(Set && getTag(new Set) != setTag) ||
|
|
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
|
getTag = function(value) {
|
|
var result = baseGetTag(value),
|
|
Ctor = result == objectTag ? value.constructor : undefined,
|
|
ctorString = Ctor ? toSource(Ctor) : '';
|
|
|
|
if (ctorString) {
|
|
switch (ctorString) {
|
|
case dataViewCtorString: return dataViewTag;
|
|
case mapCtorString: return mapTag;
|
|
case promiseCtorString: return promiseTag;
|
|
case setCtorString: return setTag;
|
|
case weakMapCtorString: return weakMapTag;
|
|
}
|
|
}
|
|
return result;
|
|
};
|
|
}
|
|
|
|
module.exports = getTag;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "4359":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Copies the values of `source` to `array`.
|
|
*
|
|
* @private
|
|
* @param {Array} source The array to copy values from.
|
|
* @param {Array} [array=[]] The array to copy values to.
|
|
* @returns {Array} Returns `array`.
|
|
*/
|
|
function copyArray(source, array) {
|
|
var index = -1,
|
|
length = source.length;
|
|
|
|
array || (array = Array(length));
|
|
while (++index < length) {
|
|
array[index] = source[index];
|
|
}
|
|
return array;
|
|
}
|
|
|
|
module.exports = copyArray;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "44ad":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var fails = __webpack_require__("d039");
|
|
var classof = __webpack_require__("c6b6");
|
|
|
|
var split = ''.split;
|
|
|
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
module.exports = fails(function () {
|
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
// eslint-disable-next-line no-prototype-builtins
|
|
return !Object('z').propertyIsEnumerable(0);
|
|
}) ? function (it) {
|
|
return classof(it) == 'String' ? split.call(it, '') : Object(it);
|
|
} : Object;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "44d2":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var wellKnownSymbol = __webpack_require__("b622");
|
|
var create = __webpack_require__("7c73");
|
|
var definePropertyModule = __webpack_require__("9bf2");
|
|
|
|
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
|
var ArrayPrototype = Array.prototype;
|
|
|
|
// Array.prototype[@@unscopables]
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
|
|
configurable: true,
|
|
value: create(null)
|
|
});
|
|
}
|
|
|
|
// add a key to Array.prototype[@@unscopables]
|
|
module.exports = function (key) {
|
|
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "44de":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__("da84");
|
|
|
|
module.exports = function (a, b) {
|
|
var console = global.console;
|
|
if (console && console.error) {
|
|
arguments.length === 1 ? console.error(a) : console.error(a, b);
|
|
}
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "44fd":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "466d":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784");
|
|
var anObject = __webpack_require__("825a");
|
|
var toLength = __webpack_require__("50c4");
|
|
var requireObjectCoercible = __webpack_require__("1d80");
|
|
var advanceStringIndex = __webpack_require__("8aa5");
|
|
var regExpExec = __webpack_require__("14c3");
|
|
|
|
// @@match logic
|
|
fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
|
|
return [
|
|
// `String.prototype.match` method
|
|
// https://tc39.github.io/ecma262/#sec-string.prototype.match
|
|
function match(regexp) {
|
|
var O = requireObjectCoercible(this);
|
|
var matcher = regexp == undefined ? undefined : regexp[MATCH];
|
|
return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
|
|
},
|
|
// `RegExp.prototype[@@match]` method
|
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
|
|
function (regexp) {
|
|
var res = maybeCallNative(nativeMatch, regexp, this);
|
|
if (res.done) return res.value;
|
|
|
|
var rx = anObject(regexp);
|
|
var S = String(this);
|
|
|
|
if (!rx.global) return regExpExec(rx, S);
|
|
|
|
var fullUnicode = rx.unicode;
|
|
rx.lastIndex = 0;
|
|
var A = [];
|
|
var n = 0;
|
|
var result;
|
|
while ((result = regExpExec(rx, S)) !== null) {
|
|
var matchStr = String(result[0]);
|
|
A[n] = matchStr;
|
|
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
|
n++;
|
|
}
|
|
return n === 0 ? null : A;
|
|
}
|
|
];
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "4840":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var anObject = __webpack_require__("825a");
|
|
var aFunction = __webpack_require__("1c0b");
|
|
var wellKnownSymbol = __webpack_require__("b622");
|
|
|
|
var SPECIES = wellKnownSymbol('species');
|
|
|
|
// `SpeciesConstructor` abstract operation
|
|
// https://tc39.github.io/ecma262/#sec-speciesconstructor
|
|
module.exports = function (O, defaultConstructor) {
|
|
var C = anObject(O).constructor;
|
|
var S;
|
|
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "4897":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.i18n = exports.use = exports.t = undefined;
|
|
|
|
var _zhCN = __webpack_require__("f0d9");
|
|
|
|
var _zhCN2 = _interopRequireDefault(_zhCN);
|
|
|
|
var _vue = __webpack_require__("8bbf");
|
|
|
|
var _vue2 = _interopRequireDefault(_vue);
|
|
|
|
var _deepmerge = __webpack_require__("3c4e");
|
|
|
|
var _deepmerge2 = _interopRequireDefault(_deepmerge);
|
|
|
|
var _format = __webpack_require__("9d7e");
|
|
|
|
var _format2 = _interopRequireDefault(_format);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
var format = (0, _format2.default)(_vue2.default);
|
|
var lang = _zhCN2.default;
|
|
var merged = false;
|
|
var i18nHandler = function i18nHandler() {
|
|
var vuei18n = Object.getPrototypeOf(this || _vue2.default).$t;
|
|
if (typeof vuei18n === 'function' && !!_vue2.default.locale) {
|
|
if (!merged) {
|
|
merged = true;
|
|
_vue2.default.locale(_vue2.default.config.lang, (0, _deepmerge2.default)(lang, _vue2.default.locale(_vue2.default.config.lang) || {}, { clone: true }));
|
|
}
|
|
return vuei18n.apply(this, arguments);
|
|
}
|
|
};
|
|
|
|
var t = exports.t = function t(path, options) {
|
|
var value = i18nHandler.apply(this, arguments);
|
|
if (value !== null && value !== undefined) return value;
|
|
|
|
var array = path.split('.');
|
|
var current = lang;
|
|
|
|
for (var i = 0, j = array.length; i < j; i++) {
|
|
var property = array[i];
|
|
value = current[property];
|
|
if (i === j - 1) return format(value, options);
|
|
if (!value) return '';
|
|
current = value;
|
|
}
|
|
return '';
|
|
};
|
|
|
|
var use = exports.use = function use(l) {
|
|
lang = l || lang;
|
|
};
|
|
|
|
var i18n = exports.i18n = function i18n(fn) {
|
|
i18nHandler = fn || i18nHandler;
|
|
};
|
|
|
|
exports.default = { use: use, t: t, i18n: i18n };
|
|
|
|
/***/ }),
|
|
|
|
/***/ "4930":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var fails = __webpack_require__("d039");
|
|
|
|
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
// eslint-disable-next-line no-undef
|
|
return !String(Symbol());
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "49f4":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var nativeCreate = __webpack_require__("6044");
|
|
|
|
/**
|
|
* Removes all key-value entries from the hash.
|
|
*
|
|
* @private
|
|
* @name clear
|
|
* @memberOf Hash
|
|
*/
|
|
function hashClear() {
|
|
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
this.size = 0;
|
|
}
|
|
|
|
module.exports = hashClear;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "4b26":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
|
|
var _vue = __webpack_require__("8bbf");
|
|
|
|
var _vue2 = _interopRequireDefault(_vue);
|
|
|
|
var _dom = __webpack_require__("5924");
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
var hasModal = false;
|
|
var hasInitZIndex = false;
|
|
var zIndex = void 0;
|
|
|
|
var getModal = function getModal() {
|
|
if (_vue2.default.prototype.$isServer) return;
|
|
var modalDom = PopupManager.modalDom;
|
|
if (modalDom) {
|
|
hasModal = true;
|
|
} else {
|
|
hasModal = false;
|
|
modalDom = document.createElement('div');
|
|
PopupManager.modalDom = modalDom;
|
|
|
|
modalDom.addEventListener('touchmove', function (event) {
|
|
event.preventDefault();
|
|
event.stopPropagation();
|
|
});
|
|
|
|
modalDom.addEventListener('click', function () {
|
|
PopupManager.doOnModalClick && PopupManager.doOnModalClick();
|
|
});
|
|
}
|
|
|
|
return modalDom;
|
|
};
|
|
|
|
var instances = {};
|
|
|
|
var PopupManager = {
|
|
modalFade: true,
|
|
|
|
getInstance: function getInstance(id) {
|
|
return instances[id];
|
|
},
|
|
|
|
register: function register(id, instance) {
|
|
if (id && instance) {
|
|
instances[id] = instance;
|
|
}
|
|
},
|
|
|
|
deregister: function deregister(id) {
|
|
if (id) {
|
|
instances[id] = null;
|
|
delete instances[id];
|
|
}
|
|
},
|
|
|
|
nextZIndex: function nextZIndex() {
|
|
return PopupManager.zIndex++;
|
|
},
|
|
|
|
modalStack: [],
|
|
|
|
doOnModalClick: function doOnModalClick() {
|
|
var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
|
|
if (!topItem) return;
|
|
|
|
var instance = PopupManager.getInstance(topItem.id);
|
|
if (instance && instance.closeOnClickModal) {
|
|
instance.close();
|
|
}
|
|
},
|
|
|
|
openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
|
|
if (_vue2.default.prototype.$isServer) return;
|
|
if (!id || zIndex === undefined) return;
|
|
this.modalFade = modalFade;
|
|
|
|
var modalStack = this.modalStack;
|
|
|
|
for (var i = 0, j = modalStack.length; i < j; i++) {
|
|
var item = modalStack[i];
|
|
if (item.id === id) {
|
|
return;
|
|
}
|
|
}
|
|
|
|
var modalDom = getModal();
|
|
|
|
(0, _dom.addClass)(modalDom, 'v-modal');
|
|
if (this.modalFade && !hasModal) {
|
|
(0, _dom.addClass)(modalDom, 'v-modal-enter');
|
|
}
|
|
if (modalClass) {
|
|
var classArr = modalClass.trim().split(/\s+/);
|
|
classArr.forEach(function (item) {
|
|
return (0, _dom.addClass)(modalDom, item);
|
|
});
|
|
}
|
|
setTimeout(function () {
|
|
(0, _dom.removeClass)(modalDom, 'v-modal-enter');
|
|
}, 200);
|
|
|
|
if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
|
|
dom.parentNode.appendChild(modalDom);
|
|
} else {
|
|
document.body.appendChild(modalDom);
|
|
}
|
|
|
|
if (zIndex) {
|
|
modalDom.style.zIndex = zIndex;
|
|
}
|
|
modalDom.tabIndex = 0;
|
|
modalDom.style.display = '';
|
|
|
|
this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
|
|
},
|
|
|
|
closeModal: function closeModal(id) {
|
|
var modalStack = this.modalStack;
|
|
var modalDom = getModal();
|
|
|
|
if (modalStack.length > 0) {
|
|
var topItem = modalStack[modalStack.length - 1];
|
|
if (topItem.id === id) {
|
|
if (topItem.modalClass) {
|
|
var classArr = topItem.modalClass.trim().split(/\s+/);
|
|
classArr.forEach(function (item) {
|
|
return (0, _dom.removeClass)(modalDom, item);
|
|
});
|
|
}
|
|
|
|
modalStack.pop();
|
|
if (modalStack.length > 0) {
|
|
modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
|
|
}
|
|
} else {
|
|
for (var i = modalStack.length - 1; i >= 0; i--) {
|
|
if (modalStack[i].id === id) {
|
|
modalStack.splice(i, 1);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (modalStack.length === 0) {
|
|
if (this.modalFade) {
|
|
(0, _dom.addClass)(modalDom, 'v-modal-leave');
|
|
}
|
|
setTimeout(function () {
|
|
if (modalStack.length === 0) {
|
|
if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
|
|
modalDom.style.display = 'none';
|
|
PopupManager.modalDom = undefined;
|
|
}
|
|
(0, _dom.removeClass)(modalDom, 'v-modal-leave');
|
|
}, 200);
|
|
}
|
|
}
|
|
};
|
|
|
|
Object.defineProperty(PopupManager, 'zIndex', {
|
|
configurable: true,
|
|
get: function get() {
|
|
if (!hasInitZIndex) {
|
|
zIndex = zIndex || (_vue2.default.prototype.$ELEMENT || {}).zIndex || 2000;
|
|
hasInitZIndex = true;
|
|
}
|
|
return zIndex;
|
|
},
|
|
set: function set(value) {
|
|
zIndex = value;
|
|
}
|
|
});
|
|
|
|
var getTopPopup = function getTopPopup() {
|
|
if (_vue2.default.prototype.$isServer) return;
|
|
if (PopupManager.modalStack.length > 0) {
|
|
var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
|
|
if (!topPopup) return;
|
|
var instance = PopupManager.getInstance(topPopup.id);
|
|
|
|
return instance;
|
|
}
|
|
};
|
|
|
|
if (!_vue2.default.prototype.$isServer) {
|
|
// handle `esc` key when the popup is shown
|
|
window.addEventListener('keydown', function (event) {
|
|
if (event.keyCode === 27) {
|
|
var topPopup = getTopPopup();
|
|
|
|
if (topPopup && topPopup.closeOnPressEscape) {
|
|
topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
exports.default = PopupManager;
|
|
|
|
/***/ }),
|
|
|
|
/***/ "4b8b":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function (exec) {
|
|
try {
|
|
return !!exec();
|
|
} catch (e) {
|
|
return true;
|
|
}
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "4c78":
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_5047f3cc_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("12ca");
|
|
/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_5047f3cc_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_5047f3cc_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
|
|
/* unused harmony reexport * */
|
|
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_5047f3cc_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "4d20":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var pIE = __webpack_require__("1917");
|
|
var createDesc = __webpack_require__("10db");
|
|
var toIObject = __webpack_require__("6ca1");
|
|
var toPrimitive = __webpack_require__("3397");
|
|
var has = __webpack_require__("9c0e");
|
|
var IE8_DOM_DEFINE = __webpack_require__("faf5");
|
|
var gOPD = Object.getOwnPropertyDescriptor;
|
|
|
|
exports.f = __webpack_require__("0bad") ? gOPD : function getOwnPropertyDescriptor(O, P) {
|
|
O = toIObject(O);
|
|
P = toPrimitive(P, true);
|
|
if (IE8_DOM_DEFINE) try {
|
|
return gOPD(O, P);
|
|
} catch (e) { /* empty */ }
|
|
if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "4d64":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var toIndexedObject = __webpack_require__("fc6a");
|
|
var toLength = __webpack_require__("50c4");
|
|
var toAbsoluteIndex = __webpack_require__("23cb");
|
|
|
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
var createMethod = function (IS_INCLUDES) {
|
|
return function ($this, el, fromIndex) {
|
|
var O = toIndexedObject($this);
|
|
var length = toLength(O.length);
|
|
var index = toAbsoluteIndex(fromIndex, length);
|
|
var value;
|
|
// Array#includes uses SameValueZero equality algorithm
|
|
// eslint-disable-next-line no-self-compare
|
|
if (IS_INCLUDES && el != el) while (length > index) {
|
|
value = O[index++];
|
|
// eslint-disable-next-line no-self-compare
|
|
if (value != value) return true;
|
|
// Array#indexOf ignores holes, Array#includes - not
|
|
} else for (;length > index; index++) {
|
|
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
} return !IS_INCLUDES && -1;
|
|
};
|
|
};
|
|
|
|
module.exports = {
|
|
// `Array.prototype.includes` method
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
|
|
includes: createMethod(true),
|
|
// `Array.prototype.indexOf` method
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
|
|
indexOf: createMethod(false)
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "4d88":
|
|
/***/ (function(module, exports) {
|
|
|
|
var toString = {}.toString;
|
|
|
|
module.exports = function (it) {
|
|
return toString.call(it).slice(8, -1);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "4de4":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $ = __webpack_require__("23e7");
|
|
var $filter = __webpack_require__("b727").filter;
|
|
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");
|
|
var arrayMethodUsesToLength = __webpack_require__("ae40");
|
|
|
|
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
|
|
// Edge 14- issue
|
|
var USES_TO_LENGTH = arrayMethodUsesToLength('filter');
|
|
|
|
// `Array.prototype.filter` method
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
|
|
// with adding support of @@species
|
|
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
|
|
filter: function filter(callbackfn /* , thisArg */) {
|
|
return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "4e4b":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 61);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ([
|
|
/* 0 */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
|
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
function normalizeComponent (
|
|
scriptExports,
|
|
render,
|
|
staticRenderFns,
|
|
functionalTemplate,
|
|
injectStyles,
|
|
scopeId,
|
|
moduleIdentifier, /* server only */
|
|
shadowMode /* vue-cli only */
|
|
) {
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (render) {
|
|
options.render = render
|
|
options.staticRenderFns = staticRenderFns
|
|
options._compiled = true
|
|
}
|
|
|
|
// functional template
|
|
if (functionalTemplate) {
|
|
options.functional = true
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = 'data-v-' + scopeId
|
|
}
|
|
|
|
var hook
|
|
if (moduleIdentifier) { // server build
|
|
hook = function (context) {
|
|
// 2.3 injection
|
|
context =
|
|
context || // cached call
|
|
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
// 2.2 with runInNewContext: true
|
|
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
context = __VUE_SSR_CONTEXT__
|
|
}
|
|
// inject component styles
|
|
if (injectStyles) {
|
|
injectStyles.call(this, context)
|
|
}
|
|
// register component module identifier for async chunk inferrence
|
|
if (context && context._registeredComponents) {
|
|
context._registeredComponents.add(moduleIdentifier)
|
|
}
|
|
}
|
|
// used by ssr in case component is cached and beforeCreate
|
|
// never gets called
|
|
options._ssrRegister = hook
|
|
} else if (injectStyles) {
|
|
hook = shadowMode
|
|
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
|
: injectStyles
|
|
}
|
|
|
|
if (hook) {
|
|
if (options.functional) {
|
|
// for template-only hot-reload because in that case the render fn doesn't
|
|
// go through the normalizer
|
|
options._injectStyles = hook
|
|
// register for functioal component in vue file
|
|
var originalRender = options.render
|
|
options.render = function renderWithStyleInjection (h, context) {
|
|
hook.call(context)
|
|
return originalRender(h, context)
|
|
}
|
|
} else {
|
|
// inject component registration as beforeCreate hook
|
|
var existing = options.beforeCreate
|
|
options.beforeCreate = existing
|
|
? [].concat(existing, hook)
|
|
: [hook]
|
|
}
|
|
}
|
|
|
|
return {
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
/* 1 */,
|
|
/* 2 */,
|
|
/* 3 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("8122");
|
|
|
|
/***/ }),
|
|
/* 4 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("d010");
|
|
|
|
/***/ }),
|
|
/* 5 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("e974");
|
|
|
|
/***/ }),
|
|
/* 6 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("6b7c");
|
|
|
|
/***/ }),
|
|
/* 7 */,
|
|
/* 8 */,
|
|
/* 9 */,
|
|
/* 10 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("f3ad");
|
|
|
|
/***/ }),
|
|
/* 11 */,
|
|
/* 12 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("417f");
|
|
|
|
/***/ }),
|
|
/* 13 */,
|
|
/* 14 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("14e9");
|
|
|
|
/***/ }),
|
|
/* 15 */,
|
|
/* 16 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("4010");
|
|
|
|
/***/ }),
|
|
/* 17 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("0e15");
|
|
|
|
/***/ }),
|
|
/* 18 */,
|
|
/* 19 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("4897");
|
|
|
|
/***/ }),
|
|
/* 20 */,
|
|
/* 21 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("d397");
|
|
|
|
/***/ }),
|
|
/* 22 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("12f2");
|
|
|
|
/***/ }),
|
|
/* 23 */,
|
|
/* 24 */,
|
|
/* 25 */,
|
|
/* 26 */,
|
|
/* 27 */,
|
|
/* 28 */,
|
|
/* 29 */,
|
|
/* 30 */,
|
|
/* 31 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("2a5e");
|
|
|
|
/***/ }),
|
|
/* 32 */,
|
|
/* 33 */,
|
|
/* 34 */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option.vue?vue&type=template&id=7a44c642&
|
|
var render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"li",
|
|
{
|
|
directives: [
|
|
{
|
|
name: "show",
|
|
rawName: "v-show",
|
|
value: _vm.visible,
|
|
expression: "visible"
|
|
}
|
|
],
|
|
staticClass: "el-select-dropdown__item",
|
|
class: {
|
|
selected: _vm.itemSelected,
|
|
"is-disabled": _vm.disabled || _vm.groupDisabled || _vm.limitReached,
|
|
hover: _vm.hover
|
|
},
|
|
on: {
|
|
mouseenter: _vm.hoverItem,
|
|
click: function($event) {
|
|
$event.stopPropagation()
|
|
return _vm.selectOptionClick($event)
|
|
}
|
|
}
|
|
},
|
|
[_vm._t("default", [_c("span", [_vm._v(_vm._s(_vm.currentLabel))])])],
|
|
2
|
|
)
|
|
}
|
|
var staticRenderFns = []
|
|
render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=template&id=7a44c642&
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
|
|
var emitter_ = __webpack_require__(4);
|
|
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/util"
|
|
var util_ = __webpack_require__(3);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option.vue?vue&type=script&lang=js&
|
|
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; };
|
|
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var optionvue_type_script_lang_js_ = ({
|
|
mixins: [emitter_default.a],
|
|
|
|
name: 'ElOption',
|
|
|
|
componentName: 'ElOption',
|
|
|
|
inject: ['select'],
|
|
|
|
props: {
|
|
value: {
|
|
required: true
|
|
},
|
|
label: [String, Number],
|
|
created: Boolean,
|
|
disabled: {
|
|
type: Boolean,
|
|
default: false
|
|
}
|
|
},
|
|
|
|
data: function data() {
|
|
return {
|
|
index: -1,
|
|
groupDisabled: false,
|
|
visible: true,
|
|
hitState: false,
|
|
hover: false
|
|
};
|
|
},
|
|
|
|
|
|
computed: {
|
|
isObject: function isObject() {
|
|
return Object.prototype.toString.call(this.value).toLowerCase() === '[object object]';
|
|
},
|
|
currentLabel: function currentLabel() {
|
|
return this.label || (this.isObject ? '' : this.value);
|
|
},
|
|
currentValue: function currentValue() {
|
|
return this.value || this.label || '';
|
|
},
|
|
itemSelected: function itemSelected() {
|
|
if (!this.select.multiple) {
|
|
return this.isEqual(this.value, this.select.value);
|
|
} else {
|
|
return this.contains(this.select.value, this.value);
|
|
}
|
|
},
|
|
limitReached: function limitReached() {
|
|
if (this.select.multiple) {
|
|
return !this.itemSelected && (this.select.value || []).length >= this.select.multipleLimit && this.select.multipleLimit > 0;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
},
|
|
|
|
watch: {
|
|
currentLabel: function currentLabel() {
|
|
if (!this.created && !this.select.remote) this.dispatch('ElSelect', 'setSelected');
|
|
},
|
|
value: function value(val, oldVal) {
|
|
var _select = this.select,
|
|
remote = _select.remote,
|
|
valueKey = _select.valueKey;
|
|
|
|
if (!this.created && !remote) {
|
|
if (valueKey && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' && (typeof oldVal === 'undefined' ? 'undefined' : _typeof(oldVal)) === 'object' && val[valueKey] === oldVal[valueKey]) {
|
|
return;
|
|
}
|
|
this.dispatch('ElSelect', 'setSelected');
|
|
}
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
isEqual: function isEqual(a, b) {
|
|
if (!this.isObject) {
|
|
return a === b;
|
|
} else {
|
|
var valueKey = this.select.valueKey;
|
|
return Object(util_["getValueByPath"])(a, valueKey) === Object(util_["getValueByPath"])(b, valueKey);
|
|
}
|
|
},
|
|
contains: function contains() {
|
|
var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
var target = arguments[1];
|
|
|
|
if (!this.isObject) {
|
|
return arr && arr.indexOf(target) > -1;
|
|
} else {
|
|
var valueKey = this.select.valueKey;
|
|
return arr && arr.some(function (item) {
|
|
return Object(util_["getValueByPath"])(item, valueKey) === Object(util_["getValueByPath"])(target, valueKey);
|
|
});
|
|
}
|
|
},
|
|
handleGroupDisabled: function handleGroupDisabled(val) {
|
|
this.groupDisabled = val;
|
|
},
|
|
hoverItem: function hoverItem() {
|
|
if (!this.disabled && !this.groupDisabled) {
|
|
this.select.hoverIndex = this.select.options.indexOf(this);
|
|
}
|
|
},
|
|
selectOptionClick: function selectOptionClick() {
|
|
if (this.disabled !== true && this.groupDisabled !== true) {
|
|
this.dispatch('ElSelect', 'handleOptionClick', [this, true]);
|
|
}
|
|
},
|
|
queryChange: function queryChange(query) {
|
|
this.visible = new RegExp(Object(util_["escapeRegexpString"])(query), 'i').test(this.currentLabel) || this.created;
|
|
if (!this.visible) {
|
|
this.select.filteredOptionsCount--;
|
|
}
|
|
}
|
|
},
|
|
|
|
created: function created() {
|
|
this.select.options.push(this);
|
|
this.select.cachedOptions.push(this);
|
|
this.select.optionsCount++;
|
|
this.select.filteredOptionsCount++;
|
|
|
|
this.$on('queryChange', this.queryChange);
|
|
this.$on('handleGroupDisabled', this.handleGroupDisabled);
|
|
},
|
|
beforeDestroy: function beforeDestroy() {
|
|
var _select2 = this.select,
|
|
selected = _select2.selected,
|
|
multiple = _select2.multiple;
|
|
|
|
var selectedOptions = multiple ? selected : [selected];
|
|
var index = this.select.cachedOptions.indexOf(this);
|
|
var selectedIndex = selectedOptions.indexOf(this);
|
|
|
|
// if option is not selected, remove it from cache
|
|
if (index > -1 && selectedIndex < 0) {
|
|
this.select.cachedOptions.splice(index, 1);
|
|
}
|
|
this.select.onOptionDestroy(this.select.options.indexOf(this));
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_optionvue_type_script_lang_js_ = (optionvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
var componentNormalizer = __webpack_require__(0);
|
|
|
|
// CONCATENATED MODULE: ./packages/select/src/option.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
src_optionvue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var api; }
|
|
component.options.__file = "packages/select/src/option.vue"
|
|
/* harmony default export */ var src_option = __webpack_exports__["a"] = (component.exports);
|
|
|
|
/***/ }),
|
|
/* 35 */,
|
|
/* 36 */,
|
|
/* 37 */,
|
|
/* 38 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("8bbc");
|
|
|
|
/***/ }),
|
|
/* 39 */,
|
|
/* 40 */,
|
|
/* 41 */,
|
|
/* 42 */,
|
|
/* 43 */,
|
|
/* 44 */,
|
|
/* 45 */,
|
|
/* 46 */,
|
|
/* 47 */,
|
|
/* 48 */,
|
|
/* 49 */,
|
|
/* 50 */,
|
|
/* 51 */,
|
|
/* 52 */,
|
|
/* 53 */,
|
|
/* 54 */,
|
|
/* 55 */,
|
|
/* 56 */,
|
|
/* 57 */,
|
|
/* 58 */,
|
|
/* 59 */,
|
|
/* 60 */,
|
|
/* 61 */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=template&id=0e4aade6&
|
|
var render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"div",
|
|
{
|
|
directives: [
|
|
{
|
|
name: "clickoutside",
|
|
rawName: "v-clickoutside",
|
|
value: _vm.handleClose,
|
|
expression: "handleClose"
|
|
}
|
|
],
|
|
staticClass: "el-select",
|
|
class: [_vm.selectSize ? "el-select--" + _vm.selectSize : ""],
|
|
on: {
|
|
click: function($event) {
|
|
$event.stopPropagation()
|
|
return _vm.toggleMenu($event)
|
|
}
|
|
}
|
|
},
|
|
[
|
|
_vm.multiple
|
|
? _c(
|
|
"div",
|
|
{
|
|
ref: "tags",
|
|
staticClass: "el-select__tags",
|
|
style: { "max-width": _vm.inputWidth - 32 + "px", width: "100%" }
|
|
},
|
|
[
|
|
_vm.collapseTags && _vm.selected.length
|
|
? _c(
|
|
"span",
|
|
[
|
|
_c(
|
|
"el-tag",
|
|
{
|
|
attrs: {
|
|
closable: !_vm.selectDisabled,
|
|
size: _vm.collapseTagSize,
|
|
hit: _vm.selected[0].hitState,
|
|
type: "info",
|
|
"disable-transitions": ""
|
|
},
|
|
on: {
|
|
close: function($event) {
|
|
_vm.deleteTag($event, _vm.selected[0])
|
|
}
|
|
}
|
|
},
|
|
[
|
|
_c("span", { staticClass: "el-select__tags-text" }, [
|
|
_vm._v(_vm._s(_vm.selected[0].currentLabel))
|
|
])
|
|
]
|
|
),
|
|
_vm.selected.length > 1
|
|
? _c(
|
|
"el-tag",
|
|
{
|
|
attrs: {
|
|
closable: false,
|
|
size: _vm.collapseTagSize,
|
|
type: "info",
|
|
"disable-transitions": ""
|
|
}
|
|
},
|
|
[
|
|
_c(
|
|
"span",
|
|
{ staticClass: "el-select__tags-text" },
|
|
[_vm._v("+ " + _vm._s(_vm.selected.length - 1))]
|
|
)
|
|
]
|
|
)
|
|
: _vm._e()
|
|
],
|
|
1
|
|
)
|
|
: _vm._e(),
|
|
!_vm.collapseTags
|
|
? _c(
|
|
"transition-group",
|
|
{ on: { "after-leave": _vm.resetInputHeight } },
|
|
_vm._l(_vm.selected, function(item) {
|
|
return _c(
|
|
"el-tag",
|
|
{
|
|
key: _vm.getValueKey(item),
|
|
attrs: {
|
|
closable: !_vm.selectDisabled,
|
|
size: _vm.collapseTagSize,
|
|
hit: item.hitState,
|
|
type: "info",
|
|
"disable-transitions": ""
|
|
},
|
|
on: {
|
|
close: function($event) {
|
|
_vm.deleteTag($event, item)
|
|
}
|
|
}
|
|
},
|
|
[
|
|
_c("span", { staticClass: "el-select__tags-text" }, [
|
|
_vm._v(_vm._s(item.currentLabel))
|
|
])
|
|
]
|
|
)
|
|
}),
|
|
1
|
|
)
|
|
: _vm._e(),
|
|
_vm.filterable
|
|
? _c("input", {
|
|
directives: [
|
|
{
|
|
name: "model",
|
|
rawName: "v-model",
|
|
value: _vm.query,
|
|
expression: "query"
|
|
}
|
|
],
|
|
ref: "input",
|
|
staticClass: "el-select__input",
|
|
class: [_vm.selectSize ? "is-" + _vm.selectSize : ""],
|
|
style: {
|
|
"flex-grow": "1",
|
|
width: _vm.inputLength / (_vm.inputWidth - 32) + "%",
|
|
"max-width": _vm.inputWidth - 42 + "px"
|
|
},
|
|
attrs: {
|
|
type: "text",
|
|
disabled: _vm.selectDisabled,
|
|
autocomplete: _vm.autoComplete || _vm.autocomplete
|
|
},
|
|
domProps: { value: _vm.query },
|
|
on: {
|
|
focus: _vm.handleFocus,
|
|
blur: function($event) {
|
|
_vm.softFocus = false
|
|
},
|
|
keyup: _vm.managePlaceholder,
|
|
keydown: [
|
|
_vm.resetInputState,
|
|
function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k($event.keyCode, "down", 40, $event.key, [
|
|
"Down",
|
|
"ArrowDown"
|
|
])
|
|
) {
|
|
return null
|
|
}
|
|
$event.preventDefault()
|
|
_vm.navigateOptions("next")
|
|
},
|
|
function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k($event.keyCode, "up", 38, $event.key, [
|
|
"Up",
|
|
"ArrowUp"
|
|
])
|
|
) {
|
|
return null
|
|
}
|
|
$event.preventDefault()
|
|
_vm.navigateOptions("prev")
|
|
},
|
|
function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k(
|
|
$event.keyCode,
|
|
"enter",
|
|
13,
|
|
$event.key,
|
|
"Enter"
|
|
)
|
|
) {
|
|
return null
|
|
}
|
|
$event.preventDefault()
|
|
return _vm.selectOption($event)
|
|
},
|
|
function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k($event.keyCode, "esc", 27, $event.key, [
|
|
"Esc",
|
|
"Escape"
|
|
])
|
|
) {
|
|
return null
|
|
}
|
|
$event.stopPropagation()
|
|
$event.preventDefault()
|
|
_vm.visible = false
|
|
},
|
|
function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k(
|
|
$event.keyCode,
|
|
"delete",
|
|
[8, 46],
|
|
$event.key,
|
|
["Backspace", "Delete", "Del"]
|
|
)
|
|
) {
|
|
return null
|
|
}
|
|
return _vm.deletePrevTag($event)
|
|
},
|
|
function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k($event.keyCode, "tab", 9, $event.key, "Tab")
|
|
) {
|
|
return null
|
|
}
|
|
_vm.visible = false
|
|
}
|
|
],
|
|
compositionstart: _vm.handleComposition,
|
|
compositionupdate: _vm.handleComposition,
|
|
compositionend: _vm.handleComposition,
|
|
input: [
|
|
function($event) {
|
|
if ($event.target.composing) {
|
|
return
|
|
}
|
|
_vm.query = $event.target.value
|
|
},
|
|
_vm.debouncedQueryChange
|
|
]
|
|
}
|
|
})
|
|
: _vm._e()
|
|
],
|
|
1
|
|
)
|
|
: _vm._e(),
|
|
_c(
|
|
"el-input",
|
|
{
|
|
ref: "reference",
|
|
class: { "is-focus": _vm.visible },
|
|
attrs: {
|
|
type: "text",
|
|
placeholder: _vm.currentPlaceholder,
|
|
name: _vm.name,
|
|
id: _vm.id,
|
|
autocomplete: _vm.autoComplete || _vm.autocomplete,
|
|
size: _vm.selectSize,
|
|
disabled: _vm.selectDisabled,
|
|
readonly: _vm.readonly,
|
|
"validate-event": false,
|
|
tabindex: _vm.multiple && _vm.filterable ? "-1" : null
|
|
},
|
|
on: { focus: _vm.handleFocus, blur: _vm.handleBlur },
|
|
nativeOn: {
|
|
keyup: function($event) {
|
|
return _vm.debouncedOnInputChange($event)
|
|
},
|
|
keydown: [
|
|
function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k($event.keyCode, "down", 40, $event.key, [
|
|
"Down",
|
|
"ArrowDown"
|
|
])
|
|
) {
|
|
return null
|
|
}
|
|
$event.stopPropagation()
|
|
$event.preventDefault()
|
|
_vm.navigateOptions("next")
|
|
},
|
|
function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k($event.keyCode, "up", 38, $event.key, [
|
|
"Up",
|
|
"ArrowUp"
|
|
])
|
|
) {
|
|
return null
|
|
}
|
|
$event.stopPropagation()
|
|
$event.preventDefault()
|
|
_vm.navigateOptions("prev")
|
|
},
|
|
function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
|
|
) {
|
|
return null
|
|
}
|
|
$event.preventDefault()
|
|
return _vm.selectOption($event)
|
|
},
|
|
function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k($event.keyCode, "esc", 27, $event.key, [
|
|
"Esc",
|
|
"Escape"
|
|
])
|
|
) {
|
|
return null
|
|
}
|
|
$event.stopPropagation()
|
|
$event.preventDefault()
|
|
_vm.visible = false
|
|
},
|
|
function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k($event.keyCode, "tab", 9, $event.key, "Tab")
|
|
) {
|
|
return null
|
|
}
|
|
_vm.visible = false
|
|
}
|
|
],
|
|
paste: function($event) {
|
|
return _vm.debouncedOnInputChange($event)
|
|
},
|
|
mouseenter: function($event) {
|
|
_vm.inputHovering = true
|
|
},
|
|
mouseleave: function($event) {
|
|
_vm.inputHovering = false
|
|
}
|
|
},
|
|
model: {
|
|
value: _vm.selectedLabel,
|
|
callback: function($$v) {
|
|
_vm.selectedLabel = $$v
|
|
},
|
|
expression: "selectedLabel"
|
|
}
|
|
},
|
|
[
|
|
_vm.$slots.prefix
|
|
? _c("template", { slot: "prefix" }, [_vm._t("prefix")], 2)
|
|
: _vm._e(),
|
|
_c("template", { slot: "suffix" }, [
|
|
_c("i", {
|
|
directives: [
|
|
{
|
|
name: "show",
|
|
rawName: "v-show",
|
|
value: !_vm.showClose,
|
|
expression: "!showClose"
|
|
}
|
|
],
|
|
class: [
|
|
"el-select__caret",
|
|
"el-input__icon",
|
|
"el-icon-" + _vm.iconClass
|
|
]
|
|
}),
|
|
_vm.showClose
|
|
? _c("i", {
|
|
staticClass:
|
|
"el-select__caret el-input__icon el-icon-circle-close",
|
|
on: { click: _vm.handleClearClick }
|
|
})
|
|
: _vm._e()
|
|
])
|
|
],
|
|
2
|
|
),
|
|
_c(
|
|
"transition",
|
|
{
|
|
attrs: { name: "el-zoom-in-top" },
|
|
on: {
|
|
"before-enter": _vm.handleMenuEnter,
|
|
"after-leave": _vm.doDestroy
|
|
}
|
|
},
|
|
[
|
|
_c(
|
|
"el-select-menu",
|
|
{
|
|
directives: [
|
|
{
|
|
name: "show",
|
|
rawName: "v-show",
|
|
value: _vm.visible && _vm.emptyText !== false,
|
|
expression: "visible && emptyText !== false"
|
|
}
|
|
],
|
|
ref: "popper",
|
|
attrs: { "append-to-body": _vm.popperAppendToBody }
|
|
},
|
|
[
|
|
_c(
|
|
"el-scrollbar",
|
|
{
|
|
directives: [
|
|
{
|
|
name: "show",
|
|
rawName: "v-show",
|
|
value: _vm.options.length > 0 && !_vm.loading,
|
|
expression: "options.length > 0 && !loading"
|
|
}
|
|
],
|
|
ref: "scrollbar",
|
|
class: {
|
|
"is-empty":
|
|
!_vm.allowCreate &&
|
|
_vm.query &&
|
|
_vm.filteredOptionsCount === 0
|
|
},
|
|
attrs: {
|
|
tag: "ul",
|
|
"wrap-class": "el-select-dropdown__wrap",
|
|
"view-class": "el-select-dropdown__list"
|
|
}
|
|
},
|
|
[
|
|
_vm.showNewOption
|
|
? _c("el-option", {
|
|
attrs: { value: _vm.query, created: "" }
|
|
})
|
|
: _vm._e(),
|
|
_vm._t("default")
|
|
],
|
|
2
|
|
),
|
|
_vm.emptyText &&
|
|
(!_vm.allowCreate ||
|
|
_vm.loading ||
|
|
(_vm.allowCreate && _vm.options.length === 0))
|
|
? [
|
|
_vm.$slots.empty
|
|
? _vm._t("empty")
|
|
: _c("p", { staticClass: "el-select-dropdown__empty" }, [
|
|
_vm._v(
|
|
"\n " +
|
|
_vm._s(_vm.emptyText) +
|
|
"\n "
|
|
)
|
|
])
|
|
]
|
|
: _vm._e()
|
|
],
|
|
2
|
|
)
|
|
],
|
|
1
|
|
)
|
|
],
|
|
1
|
|
)
|
|
}
|
|
var staticRenderFns = []
|
|
render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=template&id=0e4aade6&
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
|
|
var emitter_ = __webpack_require__(4);
|
|
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/focus"
|
|
var focus_ = __webpack_require__(22);
|
|
var focus_default = /*#__PURE__*/__webpack_require__.n(focus_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/locale"
|
|
var locale_ = __webpack_require__(6);
|
|
var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/input"
|
|
var input_ = __webpack_require__(10);
|
|
var input_default = /*#__PURE__*/__webpack_require__.n(input_);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select-dropdown.vue?vue&type=template&id=06828748&
|
|
var select_dropdownvue_type_template_id_06828748_render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"div",
|
|
{
|
|
staticClass: "el-select-dropdown el-popper",
|
|
class: [{ "is-multiple": _vm.$parent.multiple }, _vm.popperClass],
|
|
style: { minWidth: _vm.minWidth }
|
|
},
|
|
[_vm._t("default")],
|
|
2
|
|
)
|
|
}
|
|
var select_dropdownvue_type_template_id_06828748_staticRenderFns = []
|
|
select_dropdownvue_type_template_id_06828748_render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue?vue&type=template&id=06828748&
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/vue-popper"
|
|
var vue_popper_ = __webpack_require__(5);
|
|
var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select-dropdown.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
/* harmony default export */ var select_dropdownvue_type_script_lang_js_ = ({
|
|
name: 'ElSelectDropdown',
|
|
|
|
componentName: 'ElSelectDropdown',
|
|
|
|
mixins: [vue_popper_default.a],
|
|
|
|
props: {
|
|
placement: {
|
|
default: 'bottom-start'
|
|
},
|
|
|
|
boundariesPadding: {
|
|
default: 0
|
|
},
|
|
|
|
popperOptions: {
|
|
default: function _default() {
|
|
return {
|
|
gpuAcceleration: false
|
|
};
|
|
}
|
|
},
|
|
|
|
visibleArrow: {
|
|
default: true
|
|
},
|
|
|
|
appendToBody: {
|
|
type: Boolean,
|
|
default: true
|
|
}
|
|
},
|
|
|
|
data: function data() {
|
|
return {
|
|
minWidth: ''
|
|
};
|
|
},
|
|
|
|
|
|
computed: {
|
|
popperClass: function popperClass() {
|
|
return this.$parent.popperClass;
|
|
}
|
|
},
|
|
|
|
watch: {
|
|
'$parent.inputWidth': function $parentInputWidth() {
|
|
this.minWidth = this.$parent.$el.getBoundingClientRect().width + 'px';
|
|
}
|
|
},
|
|
|
|
mounted: function mounted() {
|
|
var _this = this;
|
|
|
|
this.referenceElm = this.$parent.$refs.reference.$el;
|
|
this.$parent.popperElm = this.popperElm = this.$el;
|
|
this.$on('updatePopper', function () {
|
|
if (_this.$parent.visible) _this.updatePopper();
|
|
});
|
|
this.$on('destroyPopper', this.destroyPopper);
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_select_dropdownvue_type_script_lang_js_ = (select_dropdownvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
var componentNormalizer = __webpack_require__(0);
|
|
|
|
// CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
src_select_dropdownvue_type_script_lang_js_,
|
|
select_dropdownvue_type_template_id_06828748_render,
|
|
select_dropdownvue_type_template_id_06828748_staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var api; }
|
|
component.options.__file = "packages/select/src/select-dropdown.vue"
|
|
/* harmony default export */ var select_dropdown = (component.exports);
|
|
// EXTERNAL MODULE: ./packages/select/src/option.vue + 4 modules
|
|
var src_option = __webpack_require__(34);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/tag"
|
|
var tag_ = __webpack_require__(38);
|
|
var tag_default = /*#__PURE__*/__webpack_require__.n(tag_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/scrollbar"
|
|
var scrollbar_ = __webpack_require__(14);
|
|
var scrollbar_default = /*#__PURE__*/__webpack_require__.n(scrollbar_);
|
|
|
|
// EXTERNAL MODULE: external "throttle-debounce/debounce"
|
|
var debounce_ = __webpack_require__(17);
|
|
var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/clickoutside"
|
|
var clickoutside_ = __webpack_require__(12);
|
|
var clickoutside_default = /*#__PURE__*/__webpack_require__.n(clickoutside_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/resize-event"
|
|
var resize_event_ = __webpack_require__(16);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/locale"
|
|
var lib_locale_ = __webpack_require__(19);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/scroll-into-view"
|
|
var scroll_into_view_ = __webpack_require__(31);
|
|
var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_view_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/util"
|
|
var util_ = __webpack_require__(3);
|
|
|
|
// CONCATENATED MODULE: ./packages/select/src/navigation-mixin.js
|
|
/* harmony default export */ var navigation_mixin = ({
|
|
data: function data() {
|
|
return {
|
|
hoverOption: -1
|
|
};
|
|
},
|
|
|
|
|
|
computed: {
|
|
optionsAllDisabled: function optionsAllDisabled() {
|
|
return this.options.filter(function (option) {
|
|
return option.visible;
|
|
}).every(function (option) {
|
|
return option.disabled;
|
|
});
|
|
}
|
|
},
|
|
|
|
watch: {
|
|
hoverIndex: function hoverIndex(val) {
|
|
var _this = this;
|
|
|
|
if (typeof val === 'number' && val > -1) {
|
|
this.hoverOption = this.options[val] || {};
|
|
}
|
|
this.options.forEach(function (option) {
|
|
option.hover = _this.hoverOption === option;
|
|
});
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
navigateOptions: function navigateOptions(direction) {
|
|
var _this2 = this;
|
|
|
|
if (!this.visible) {
|
|
this.visible = true;
|
|
return;
|
|
}
|
|
if (this.options.length === 0 || this.filteredOptionsCount === 0) return;
|
|
if (!this.optionsAllDisabled) {
|
|
if (direction === 'next') {
|
|
this.hoverIndex++;
|
|
if (this.hoverIndex === this.options.length) {
|
|
this.hoverIndex = 0;
|
|
}
|
|
} else if (direction === 'prev') {
|
|
this.hoverIndex--;
|
|
if (this.hoverIndex < 0) {
|
|
this.hoverIndex = this.options.length - 1;
|
|
}
|
|
}
|
|
var option = this.options[this.hoverIndex];
|
|
if (option.disabled === true || option.groupDisabled === true || !option.visible) {
|
|
this.navigateOptions(direction);
|
|
}
|
|
this.$nextTick(function () {
|
|
return _this2.scrollToOption(_this2.hoverOption);
|
|
});
|
|
}
|
|
}
|
|
}
|
|
});
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/shared"
|
|
var shared_ = __webpack_require__(21);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var selectvue_type_script_lang_js_ = ({
|
|
mixins: [emitter_default.a, locale_default.a, focus_default()('reference'), navigation_mixin],
|
|
|
|
name: 'ElSelect',
|
|
|
|
componentName: 'ElSelect',
|
|
|
|
inject: {
|
|
elForm: {
|
|
default: ''
|
|
},
|
|
|
|
elFormItem: {
|
|
default: ''
|
|
}
|
|
},
|
|
|
|
provide: function provide() {
|
|
return {
|
|
'select': this
|
|
};
|
|
},
|
|
|
|
|
|
computed: {
|
|
_elFormItemSize: function _elFormItemSize() {
|
|
return (this.elFormItem || {}).elFormItemSize;
|
|
},
|
|
readonly: function readonly() {
|
|
return !this.filterable || this.multiple || !Object(util_["isIE"])() && !Object(util_["isEdge"])() && !this.visible;
|
|
},
|
|
showClose: function showClose() {
|
|
var hasValue = this.multiple ? Array.isArray(this.value) && this.value.length > 0 : this.value !== undefined && this.value !== null && this.value !== '';
|
|
var criteria = this.clearable && !this.selectDisabled && this.inputHovering && hasValue;
|
|
return criteria;
|
|
},
|
|
iconClass: function iconClass() {
|
|
return this.remote && this.filterable ? '' : this.visible ? 'arrow-up is-reverse' : 'arrow-up';
|
|
},
|
|
debounce: function debounce() {
|
|
return this.remote ? 300 : 0;
|
|
},
|
|
emptyText: function emptyText() {
|
|
if (this.loading) {
|
|
return this.loadingText || this.t('el.select.loading');
|
|
} else {
|
|
if (this.remote && this.query === '' && this.options.length === 0) return false;
|
|
if (this.filterable && this.query && this.options.length > 0 && this.filteredOptionsCount === 0) {
|
|
return this.noMatchText || this.t('el.select.noMatch');
|
|
}
|
|
if (this.options.length === 0) {
|
|
return this.noDataText || this.t('el.select.noData');
|
|
}
|
|
}
|
|
return null;
|
|
},
|
|
showNewOption: function showNewOption() {
|
|
var _this = this;
|
|
|
|
var hasExistingOption = this.options.filter(function (option) {
|
|
return !option.created;
|
|
}).some(function (option) {
|
|
return option.currentLabel === _this.query;
|
|
});
|
|
return this.filterable && this.allowCreate && this.query !== '' && !hasExistingOption;
|
|
},
|
|
selectSize: function selectSize() {
|
|
return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
|
|
},
|
|
selectDisabled: function selectDisabled() {
|
|
return this.disabled || (this.elForm || {}).disabled;
|
|
},
|
|
collapseTagSize: function collapseTagSize() {
|
|
return ['small', 'mini'].indexOf(this.selectSize) > -1 ? 'mini' : 'small';
|
|
}
|
|
},
|
|
|
|
components: {
|
|
ElInput: input_default.a,
|
|
ElSelectMenu: select_dropdown,
|
|
ElOption: src_option["a" /* default */],
|
|
ElTag: tag_default.a,
|
|
ElScrollbar: scrollbar_default.a
|
|
},
|
|
|
|
directives: { Clickoutside: clickoutside_default.a },
|
|
|
|
props: {
|
|
name: String,
|
|
id: String,
|
|
value: {
|
|
required: true
|
|
},
|
|
autocomplete: {
|
|
type: String,
|
|
default: 'off'
|
|
},
|
|
/** @Deprecated in next major version */
|
|
autoComplete: {
|
|
type: String,
|
|
validator: function validator(val) {
|
|
false && false;
|
|
return true;
|
|
}
|
|
},
|
|
automaticDropdown: Boolean,
|
|
size: String,
|
|
disabled: Boolean,
|
|
clearable: Boolean,
|
|
filterable: Boolean,
|
|
allowCreate: Boolean,
|
|
loading: Boolean,
|
|
popperClass: String,
|
|
remote: Boolean,
|
|
loadingText: String,
|
|
noMatchText: String,
|
|
noDataText: String,
|
|
remoteMethod: Function,
|
|
filterMethod: Function,
|
|
multiple: Boolean,
|
|
multipleLimit: {
|
|
type: Number,
|
|
default: 0
|
|
},
|
|
placeholder: {
|
|
type: String,
|
|
default: function _default() {
|
|
return Object(lib_locale_["t"])('el.select.placeholder');
|
|
}
|
|
},
|
|
defaultFirstOption: Boolean,
|
|
reserveKeyword: Boolean,
|
|
valueKey: {
|
|
type: String,
|
|
default: 'value'
|
|
},
|
|
collapseTags: Boolean,
|
|
popperAppendToBody: {
|
|
type: Boolean,
|
|
default: true
|
|
}
|
|
},
|
|
|
|
data: function data() {
|
|
return {
|
|
options: [],
|
|
cachedOptions: [],
|
|
createdLabel: null,
|
|
createdSelected: false,
|
|
selected: this.multiple ? [] : {},
|
|
inputLength: 20,
|
|
inputWidth: 0,
|
|
initialInputHeight: 0,
|
|
cachedPlaceHolder: '',
|
|
optionsCount: 0,
|
|
filteredOptionsCount: 0,
|
|
visible: false,
|
|
softFocus: false,
|
|
selectedLabel: '',
|
|
hoverIndex: -1,
|
|
query: '',
|
|
previousQuery: null,
|
|
inputHovering: false,
|
|
currentPlaceholder: '',
|
|
menuVisibleOnFocus: false,
|
|
isOnComposition: false,
|
|
isSilentBlur: false
|
|
};
|
|
},
|
|
|
|
|
|
watch: {
|
|
selectDisabled: function selectDisabled() {
|
|
var _this2 = this;
|
|
|
|
this.$nextTick(function () {
|
|
_this2.resetInputHeight();
|
|
});
|
|
},
|
|
placeholder: function placeholder(val) {
|
|
this.cachedPlaceHolder = this.currentPlaceholder = val;
|
|
},
|
|
value: function value(val, oldVal) {
|
|
if (this.multiple) {
|
|
this.resetInputHeight();
|
|
if (val && val.length > 0 || this.$refs.input && this.query !== '') {
|
|
this.currentPlaceholder = '';
|
|
} else {
|
|
this.currentPlaceholder = this.cachedPlaceHolder;
|
|
}
|
|
if (this.filterable && !this.reserveKeyword) {
|
|
this.query = '';
|
|
this.handleQueryChange(this.query);
|
|
}
|
|
}
|
|
this.setSelected();
|
|
if (this.filterable && !this.multiple) {
|
|
this.inputLength = 20;
|
|
}
|
|
if (!Object(util_["valueEquals"])(val, oldVal)) {
|
|
this.dispatch('ElFormItem', 'el.form.change', val);
|
|
}
|
|
},
|
|
visible: function visible(val) {
|
|
var _this3 = this;
|
|
|
|
if (!val) {
|
|
this.broadcast('ElSelectDropdown', 'destroyPopper');
|
|
if (this.$refs.input) {
|
|
this.$refs.input.blur();
|
|
}
|
|
this.query = '';
|
|
this.previousQuery = null;
|
|
this.selectedLabel = '';
|
|
this.inputLength = 20;
|
|
this.menuVisibleOnFocus = false;
|
|
this.resetHoverIndex();
|
|
this.$nextTick(function () {
|
|
if (_this3.$refs.input && _this3.$refs.input.value === '' && _this3.selected.length === 0) {
|
|
_this3.currentPlaceholder = _this3.cachedPlaceHolder;
|
|
}
|
|
});
|
|
if (!this.multiple) {
|
|
if (this.selected) {
|
|
if (this.filterable && this.allowCreate && this.createdSelected && this.createdLabel) {
|
|
this.selectedLabel = this.createdLabel;
|
|
} else {
|
|
this.selectedLabel = this.selected.currentLabel;
|
|
}
|
|
if (this.filterable) this.query = this.selectedLabel;
|
|
}
|
|
|
|
if (this.filterable) {
|
|
this.currentPlaceholder = this.cachedPlaceHolder;
|
|
}
|
|
}
|
|
} else {
|
|
this.broadcast('ElSelectDropdown', 'updatePopper');
|
|
if (this.filterable) {
|
|
this.query = this.remote ? '' : this.selectedLabel;
|
|
this.handleQueryChange(this.query);
|
|
if (this.multiple) {
|
|
this.$refs.input.focus();
|
|
} else {
|
|
if (!this.remote) {
|
|
this.broadcast('ElOption', 'queryChange', '');
|
|
this.broadcast('ElOptionGroup', 'queryChange');
|
|
}
|
|
|
|
if (this.selectedLabel) {
|
|
this.currentPlaceholder = this.selectedLabel;
|
|
this.selectedLabel = '';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.$emit('visible-change', val);
|
|
},
|
|
options: function options() {
|
|
var _this4 = this;
|
|
|
|
if (this.$isServer) return;
|
|
this.$nextTick(function () {
|
|
_this4.broadcast('ElSelectDropdown', 'updatePopper');
|
|
});
|
|
if (this.multiple) {
|
|
this.resetInputHeight();
|
|
}
|
|
var inputs = this.$el.querySelectorAll('input');
|
|
if ([].indexOf.call(inputs, document.activeElement) === -1) {
|
|
this.setSelected();
|
|
}
|
|
if (this.defaultFirstOption && (this.filterable || this.remote) && this.filteredOptionsCount) {
|
|
this.checkDefaultFirstOption();
|
|
}
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
handleComposition: function handleComposition(event) {
|
|
var _this5 = this;
|
|
|
|
var text = event.target.value;
|
|
if (event.type === 'compositionend') {
|
|
this.isOnComposition = false;
|
|
this.$nextTick(function (_) {
|
|
return _this5.handleQueryChange(text);
|
|
});
|
|
} else {
|
|
var lastCharacter = text[text.length - 1] || '';
|
|
this.isOnComposition = !Object(shared_["isKorean"])(lastCharacter);
|
|
}
|
|
},
|
|
handleQueryChange: function handleQueryChange(val) {
|
|
var _this6 = this;
|
|
|
|
if (this.previousQuery === val || this.isOnComposition) return;
|
|
if (this.previousQuery === null && (typeof this.filterMethod === 'function' || typeof this.remoteMethod === 'function')) {
|
|
this.previousQuery = val;
|
|
return;
|
|
}
|
|
this.previousQuery = val;
|
|
this.$nextTick(function () {
|
|
if (_this6.visible) _this6.broadcast('ElSelectDropdown', 'updatePopper');
|
|
});
|
|
this.hoverIndex = -1;
|
|
if (this.multiple && this.filterable) {
|
|
this.$nextTick(function () {
|
|
var length = _this6.$refs.input.value.length * 15 + 20;
|
|
_this6.inputLength = _this6.collapseTags ? Math.min(50, length) : length;
|
|
_this6.managePlaceholder();
|
|
_this6.resetInputHeight();
|
|
});
|
|
}
|
|
if (this.remote && typeof this.remoteMethod === 'function') {
|
|
this.hoverIndex = -1;
|
|
this.remoteMethod(val);
|
|
} else if (typeof this.filterMethod === 'function') {
|
|
this.filterMethod(val);
|
|
this.broadcast('ElOptionGroup', 'queryChange');
|
|
} else {
|
|
this.filteredOptionsCount = this.optionsCount;
|
|
this.broadcast('ElOption', 'queryChange', val);
|
|
this.broadcast('ElOptionGroup', 'queryChange');
|
|
}
|
|
if (this.defaultFirstOption && (this.filterable || this.remote) && this.filteredOptionsCount) {
|
|
this.checkDefaultFirstOption();
|
|
}
|
|
},
|
|
scrollToOption: function scrollToOption(option) {
|
|
var target = Array.isArray(option) && option[0] ? option[0].$el : option.$el;
|
|
if (this.$refs.popper && target) {
|
|
var menu = this.$refs.popper.$el.querySelector('.el-select-dropdown__wrap');
|
|
scroll_into_view_default()(menu, target);
|
|
}
|
|
this.$refs.scrollbar && this.$refs.scrollbar.handleScroll();
|
|
},
|
|
handleMenuEnter: function handleMenuEnter() {
|
|
var _this7 = this;
|
|
|
|
this.$nextTick(function () {
|
|
return _this7.scrollToOption(_this7.selected);
|
|
});
|
|
},
|
|
emitChange: function emitChange(val) {
|
|
if (!Object(util_["valueEquals"])(this.value, val)) {
|
|
this.$emit('change', val);
|
|
}
|
|
},
|
|
getOption: function getOption(value) {
|
|
var option = void 0;
|
|
var isObject = Object.prototype.toString.call(value).toLowerCase() === '[object object]';
|
|
var isNull = Object.prototype.toString.call(value).toLowerCase() === '[object null]';
|
|
var isUndefined = Object.prototype.toString.call(value).toLowerCase() === '[object undefined]';
|
|
|
|
for (var i = this.cachedOptions.length - 1; i >= 0; i--) {
|
|
var cachedOption = this.cachedOptions[i];
|
|
var isEqual = isObject ? Object(util_["getValueByPath"])(cachedOption.value, this.valueKey) === Object(util_["getValueByPath"])(value, this.valueKey) : cachedOption.value === value;
|
|
if (isEqual) {
|
|
option = cachedOption;
|
|
break;
|
|
}
|
|
}
|
|
if (option) return option;
|
|
var label = !isObject && !isNull && !isUndefined ? value : '';
|
|
var newOption = {
|
|
value: value,
|
|
currentLabel: label
|
|
};
|
|
if (this.multiple) {
|
|
newOption.hitState = false;
|
|
}
|
|
return newOption;
|
|
},
|
|
setSelected: function setSelected() {
|
|
var _this8 = this;
|
|
|
|
if (!this.multiple) {
|
|
var option = this.getOption(this.value);
|
|
if (option.created) {
|
|
this.createdLabel = option.currentLabel;
|
|
this.createdSelected = true;
|
|
} else {
|
|
this.createdSelected = false;
|
|
}
|
|
this.selectedLabel = option.currentLabel;
|
|
this.selected = option;
|
|
if (this.filterable) this.query = this.selectedLabel;
|
|
return;
|
|
}
|
|
var result = [];
|
|
if (Array.isArray(this.value)) {
|
|
this.value.forEach(function (value) {
|
|
result.push(_this8.getOption(value));
|
|
});
|
|
}
|
|
this.selected = result;
|
|
this.$nextTick(function () {
|
|
_this8.resetInputHeight();
|
|
});
|
|
},
|
|
handleFocus: function handleFocus(event) {
|
|
if (!this.softFocus) {
|
|
if (this.automaticDropdown || this.filterable) {
|
|
this.visible = true;
|
|
if (this.filterable) {
|
|
this.menuVisibleOnFocus = true;
|
|
}
|
|
}
|
|
this.$emit('focus', event);
|
|
} else {
|
|
this.softFocus = false;
|
|
}
|
|
},
|
|
blur: function blur() {
|
|
this.visible = false;
|
|
this.$refs.reference.blur();
|
|
},
|
|
handleBlur: function handleBlur(event) {
|
|
var _this9 = this;
|
|
|
|
setTimeout(function () {
|
|
if (_this9.isSilentBlur) {
|
|
_this9.isSilentBlur = false;
|
|
} else {
|
|
_this9.$emit('blur', event);
|
|
}
|
|
}, 50);
|
|
this.softFocus = false;
|
|
},
|
|
handleClearClick: function handleClearClick(event) {
|
|
this.deleteSelected(event);
|
|
},
|
|
doDestroy: function doDestroy() {
|
|
this.$refs.popper && this.$refs.popper.doDestroy();
|
|
},
|
|
handleClose: function handleClose() {
|
|
this.visible = false;
|
|
},
|
|
toggleLastOptionHitState: function toggleLastOptionHitState(hit) {
|
|
if (!Array.isArray(this.selected)) return;
|
|
var option = this.selected[this.selected.length - 1];
|
|
if (!option) return;
|
|
|
|
if (hit === true || hit === false) {
|
|
option.hitState = hit;
|
|
return hit;
|
|
}
|
|
|
|
option.hitState = !option.hitState;
|
|
return option.hitState;
|
|
},
|
|
deletePrevTag: function deletePrevTag(e) {
|
|
if (e.target.value.length <= 0 && !this.toggleLastOptionHitState()) {
|
|
var value = this.value.slice();
|
|
value.pop();
|
|
this.$emit('input', value);
|
|
this.emitChange(value);
|
|
}
|
|
},
|
|
managePlaceholder: function managePlaceholder() {
|
|
if (this.currentPlaceholder !== '') {
|
|
this.currentPlaceholder = this.$refs.input.value ? '' : this.cachedPlaceHolder;
|
|
}
|
|
},
|
|
resetInputState: function resetInputState(e) {
|
|
if (e.keyCode !== 8) this.toggleLastOptionHitState(false);
|
|
this.inputLength = this.$refs.input.value.length * 15 + 20;
|
|
this.resetInputHeight();
|
|
},
|
|
resetInputHeight: function resetInputHeight() {
|
|
var _this10 = this;
|
|
|
|
if (this.collapseTags && !this.filterable) return;
|
|
this.$nextTick(function () {
|
|
if (!_this10.$refs.reference) return;
|
|
var inputChildNodes = _this10.$refs.reference.$el.childNodes;
|
|
var input = [].filter.call(inputChildNodes, function (item) {
|
|
return item.tagName === 'INPUT';
|
|
})[0];
|
|
var tags = _this10.$refs.tags;
|
|
var sizeInMap = _this10.initialInputHeight || 40;
|
|
input.style.height = _this10.selected.length === 0 ? sizeInMap + 'px' : Math.max(tags ? tags.clientHeight + (tags.clientHeight > sizeInMap ? 6 : 0) : 0, sizeInMap) + 'px';
|
|
if (_this10.visible && _this10.emptyText !== false) {
|
|
_this10.broadcast('ElSelectDropdown', 'updatePopper');
|
|
}
|
|
});
|
|
},
|
|
resetHoverIndex: function resetHoverIndex() {
|
|
var _this11 = this;
|
|
|
|
setTimeout(function () {
|
|
if (!_this11.multiple) {
|
|
_this11.hoverIndex = _this11.options.indexOf(_this11.selected);
|
|
} else {
|
|
if (_this11.selected.length > 0) {
|
|
_this11.hoverIndex = Math.min.apply(null, _this11.selected.map(function (item) {
|
|
return _this11.options.indexOf(item);
|
|
}));
|
|
} else {
|
|
_this11.hoverIndex = -1;
|
|
}
|
|
}
|
|
}, 300);
|
|
},
|
|
handleOptionSelect: function handleOptionSelect(option, byClick) {
|
|
var _this12 = this;
|
|
|
|
if (this.multiple) {
|
|
var value = (this.value || []).slice();
|
|
var optionIndex = this.getValueIndex(value, option.value);
|
|
if (optionIndex > -1) {
|
|
value.splice(optionIndex, 1);
|
|
} else if (this.multipleLimit <= 0 || value.length < this.multipleLimit) {
|
|
value.push(option.value);
|
|
}
|
|
this.$emit('input', value);
|
|
this.emitChange(value);
|
|
if (option.created) {
|
|
this.query = '';
|
|
this.handleQueryChange('');
|
|
this.inputLength = 20;
|
|
}
|
|
if (this.filterable) this.$refs.input.focus();
|
|
} else {
|
|
this.$emit('input', option.value);
|
|
this.emitChange(option.value);
|
|
this.visible = false;
|
|
}
|
|
this.isSilentBlur = byClick;
|
|
this.setSoftFocus();
|
|
if (this.visible) return;
|
|
this.$nextTick(function () {
|
|
_this12.scrollToOption(option);
|
|
});
|
|
},
|
|
setSoftFocus: function setSoftFocus() {
|
|
this.softFocus = true;
|
|
var input = this.$refs.input || this.$refs.reference;
|
|
if (input) {
|
|
input.focus();
|
|
}
|
|
},
|
|
getValueIndex: function getValueIndex() {
|
|
var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
var value = arguments[1];
|
|
|
|
var isObject = Object.prototype.toString.call(value).toLowerCase() === '[object object]';
|
|
if (!isObject) {
|
|
return arr.indexOf(value);
|
|
} else {
|
|
var valueKey = this.valueKey;
|
|
var index = -1;
|
|
arr.some(function (item, i) {
|
|
if (Object(util_["getValueByPath"])(item, valueKey) === Object(util_["getValueByPath"])(value, valueKey)) {
|
|
index = i;
|
|
return true;
|
|
}
|
|
return false;
|
|
});
|
|
return index;
|
|
}
|
|
},
|
|
toggleMenu: function toggleMenu() {
|
|
if (!this.selectDisabled) {
|
|
if (this.menuVisibleOnFocus) {
|
|
this.menuVisibleOnFocus = false;
|
|
} else {
|
|
this.visible = !this.visible;
|
|
}
|
|
if (this.visible) {
|
|
(this.$refs.input || this.$refs.reference).focus();
|
|
}
|
|
}
|
|
},
|
|
selectOption: function selectOption() {
|
|
if (!this.visible) {
|
|
this.toggleMenu();
|
|
} else {
|
|
if (this.options[this.hoverIndex]) {
|
|
this.handleOptionSelect(this.options[this.hoverIndex]);
|
|
}
|
|
}
|
|
},
|
|
deleteSelected: function deleteSelected(event) {
|
|
event.stopPropagation();
|
|
var value = this.multiple ? [] : '';
|
|
this.$emit('input', value);
|
|
this.emitChange(value);
|
|
this.visible = false;
|
|
this.$emit('clear');
|
|
},
|
|
deleteTag: function deleteTag(event, tag) {
|
|
var index = this.selected.indexOf(tag);
|
|
if (index > -1 && !this.selectDisabled) {
|
|
var value = this.value.slice();
|
|
value.splice(index, 1);
|
|
this.$emit('input', value);
|
|
this.emitChange(value);
|
|
this.$emit('remove-tag', tag.value);
|
|
}
|
|
event.stopPropagation();
|
|
},
|
|
onInputChange: function onInputChange() {
|
|
if (this.filterable && this.query !== this.selectedLabel) {
|
|
this.query = this.selectedLabel;
|
|
this.handleQueryChange(this.query);
|
|
}
|
|
},
|
|
onOptionDestroy: function onOptionDestroy(index) {
|
|
if (index > -1) {
|
|
this.optionsCount--;
|
|
this.filteredOptionsCount--;
|
|
this.options.splice(index, 1);
|
|
}
|
|
},
|
|
resetInputWidth: function resetInputWidth() {
|
|
this.inputWidth = this.$refs.reference.$el.getBoundingClientRect().width;
|
|
},
|
|
handleResize: function handleResize() {
|
|
this.resetInputWidth();
|
|
if (this.multiple) this.resetInputHeight();
|
|
},
|
|
checkDefaultFirstOption: function checkDefaultFirstOption() {
|
|
this.hoverIndex = -1;
|
|
// highlight the created option
|
|
var hasCreated = false;
|
|
for (var i = this.options.length - 1; i >= 0; i--) {
|
|
if (this.options[i].created) {
|
|
hasCreated = true;
|
|
this.hoverIndex = i;
|
|
break;
|
|
}
|
|
}
|
|
if (hasCreated) return;
|
|
for (var _i = 0; _i !== this.options.length; ++_i) {
|
|
var option = this.options[_i];
|
|
if (this.query) {
|
|
// highlight first options that passes the filter
|
|
if (!option.disabled && !option.groupDisabled && option.visible) {
|
|
this.hoverIndex = _i;
|
|
break;
|
|
}
|
|
} else {
|
|
// highlight currently selected option
|
|
if (option.itemSelected) {
|
|
this.hoverIndex = _i;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
},
|
|
getValueKey: function getValueKey(item) {
|
|
if (Object.prototype.toString.call(item.value).toLowerCase() !== '[object object]') {
|
|
return item.value;
|
|
} else {
|
|
return Object(util_["getValueByPath"])(item.value, this.valueKey);
|
|
}
|
|
}
|
|
},
|
|
|
|
created: function created() {
|
|
var _this13 = this;
|
|
|
|
this.cachedPlaceHolder = this.currentPlaceholder = this.placeholder;
|
|
if (this.multiple && !Array.isArray(this.value)) {
|
|
this.$emit('input', []);
|
|
}
|
|
if (!this.multiple && Array.isArray(this.value)) {
|
|
this.$emit('input', '');
|
|
}
|
|
|
|
this.debouncedOnInputChange = debounce_default()(this.debounce, function () {
|
|
_this13.onInputChange();
|
|
});
|
|
|
|
this.debouncedQueryChange = debounce_default()(this.debounce, function (e) {
|
|
_this13.handleQueryChange(e.target.value);
|
|
});
|
|
|
|
this.$on('handleOptionClick', this.handleOptionSelect);
|
|
this.$on('setSelected', this.setSelected);
|
|
},
|
|
mounted: function mounted() {
|
|
var _this14 = this;
|
|
|
|
if (this.multiple && Array.isArray(this.value) && this.value.length > 0) {
|
|
this.currentPlaceholder = '';
|
|
}
|
|
Object(resize_event_["addResizeListener"])(this.$el, this.handleResize);
|
|
|
|
var reference = this.$refs.reference;
|
|
if (reference && reference.$el) {
|
|
var sizeMap = {
|
|
medium: 36,
|
|
small: 32,
|
|
mini: 28
|
|
};
|
|
var input = reference.$el.querySelector('input');
|
|
this.initialInputHeight = input.getBoundingClientRect().height || sizeMap[this.selectSize];
|
|
}
|
|
if (this.remote && this.multiple) {
|
|
this.resetInputHeight();
|
|
}
|
|
this.$nextTick(function () {
|
|
if (reference && reference.$el) {
|
|
_this14.inputWidth = reference.$el.getBoundingClientRect().width;
|
|
}
|
|
});
|
|
this.setSelected();
|
|
},
|
|
beforeDestroy: function beforeDestroy() {
|
|
if (this.$el && this.handleResize) Object(resize_event_["removeResizeListener"])(this.$el, this.handleResize);
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_selectvue_type_script_lang_js_ = (selectvue_type_script_lang_js_);
|
|
// CONCATENATED MODULE: ./packages/select/src/select.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var select_component = Object(componentNormalizer["a" /* default */])(
|
|
src_selectvue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var select_api; }
|
|
select_component.options.__file = "packages/select/src/select.vue"
|
|
/* harmony default export */ var src_select = (select_component.exports);
|
|
// CONCATENATED MODULE: ./packages/select/index.js
|
|
|
|
|
|
/* istanbul ignore next */
|
|
src_select.install = function (Vue) {
|
|
Vue.component(src_select.name, src_select);
|
|
};
|
|
|
|
/* harmony default export */ var packages_select = __webpack_exports__["default"] = (src_select);
|
|
|
|
/***/ })
|
|
/******/ ]);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "4e71":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__("e198")('observable');
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "4ebc":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 7.2.2 IsArray(argument)
|
|
var cof = __webpack_require__("4d88");
|
|
module.exports = Array.isArray || function isArray(arg) {
|
|
return cof(arg) == 'Array';
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "4f1d":
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_4a6bd5b4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("750d");
|
|
/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_4a6bd5b4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_4a6bd5b4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
/* unused harmony reexport * */
|
|
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_4a6bd5b4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "50c4":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var toInteger = __webpack_require__("a691");
|
|
|
|
var min = Math.min;
|
|
|
|
// `ToLength` abstract operation
|
|
// https://tc39.github.io/ecma262/#sec-tolength
|
|
module.exports = function (argument) {
|
|
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "50d8":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* The base implementation of `_.times` without support for iteratee shorthands
|
|
* or max array length checks.
|
|
*
|
|
* @private
|
|
* @param {number} n The number of times to invoke `iteratee`.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Array} Returns the array of results.
|
|
*/
|
|
function baseTimes(n, iteratee) {
|
|
var index = -1,
|
|
result = Array(n);
|
|
|
|
while (++index < n) {
|
|
result[index] = iteratee(index);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = baseTimes;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "50f3":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "511f":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__("0b99");
|
|
__webpack_require__("658f");
|
|
module.exports = __webpack_require__("fcd4").f('iterator');
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "5128":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.PopupManager = undefined;
|
|
|
|
var _vue = __webpack_require__("8bbf");
|
|
|
|
var _vue2 = _interopRequireDefault(_vue);
|
|
|
|
var _merge = __webpack_require__("7f4d");
|
|
|
|
var _merge2 = _interopRequireDefault(_merge);
|
|
|
|
var _popupManager = __webpack_require__("4b26");
|
|
|
|
var _popupManager2 = _interopRequireDefault(_popupManager);
|
|
|
|
var _scrollbarWidth = __webpack_require__("e62d");
|
|
|
|
var _scrollbarWidth2 = _interopRequireDefault(_scrollbarWidth);
|
|
|
|
var _dom = __webpack_require__("5924");
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
var idSeed = 1;
|
|
|
|
var scrollBarWidth = void 0;
|
|
|
|
exports.default = {
|
|
props: {
|
|
visible: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
openDelay: {},
|
|
closeDelay: {},
|
|
zIndex: {},
|
|
modal: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
modalFade: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
modalClass: {},
|
|
modalAppendToBody: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
lockScroll: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
closeOnPressEscape: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
closeOnClickModal: {
|
|
type: Boolean,
|
|
default: false
|
|
}
|
|
},
|
|
|
|
beforeMount: function beforeMount() {
|
|
this._popupId = 'popup-' + idSeed++;
|
|
_popupManager2.default.register(this._popupId, this);
|
|
},
|
|
beforeDestroy: function beforeDestroy() {
|
|
_popupManager2.default.deregister(this._popupId);
|
|
_popupManager2.default.closeModal(this._popupId);
|
|
|
|
this.restoreBodyStyle();
|
|
},
|
|
data: function data() {
|
|
return {
|
|
opened: false,
|
|
bodyPaddingRight: null,
|
|
computedBodyPaddingRight: 0,
|
|
withoutHiddenClass: true,
|
|
rendered: false
|
|
};
|
|
},
|
|
|
|
|
|
watch: {
|
|
visible: function visible(val) {
|
|
var _this = this;
|
|
|
|
if (val) {
|
|
if (this._opening) return;
|
|
if (!this.rendered) {
|
|
this.rendered = true;
|
|
_vue2.default.nextTick(function () {
|
|
_this.open();
|
|
});
|
|
} else {
|
|
this.open();
|
|
}
|
|
} else {
|
|
this.close();
|
|
}
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
open: function open(options) {
|
|
var _this2 = this;
|
|
|
|
if (!this.rendered) {
|
|
this.rendered = true;
|
|
}
|
|
|
|
var props = (0, _merge2.default)({}, this.$props || this, options);
|
|
|
|
if (this._closeTimer) {
|
|
clearTimeout(this._closeTimer);
|
|
this._closeTimer = null;
|
|
}
|
|
clearTimeout(this._openTimer);
|
|
|
|
var openDelay = Number(props.openDelay);
|
|
if (openDelay > 0) {
|
|
this._openTimer = setTimeout(function () {
|
|
_this2._openTimer = null;
|
|
_this2.doOpen(props);
|
|
}, openDelay);
|
|
} else {
|
|
this.doOpen(props);
|
|
}
|
|
},
|
|
doOpen: function doOpen(props) {
|
|
if (this.$isServer) return;
|
|
if (this.willOpen && !this.willOpen()) return;
|
|
if (this.opened) return;
|
|
|
|
this._opening = true;
|
|
|
|
var dom = this.$el;
|
|
|
|
var modal = props.modal;
|
|
|
|
var zIndex = props.zIndex;
|
|
if (zIndex) {
|
|
_popupManager2.default.zIndex = zIndex;
|
|
}
|
|
|
|
if (modal) {
|
|
if (this._closing) {
|
|
_popupManager2.default.closeModal(this._popupId);
|
|
this._closing = false;
|
|
}
|
|
_popupManager2.default.openModal(this._popupId, _popupManager2.default.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
|
|
if (props.lockScroll) {
|
|
this.withoutHiddenClass = !(0, _dom.hasClass)(document.body, 'el-popup-parent--hidden');
|
|
if (this.withoutHiddenClass) {
|
|
this.bodyPaddingRight = document.body.style.paddingRight;
|
|
this.computedBodyPaddingRight = parseInt((0, _dom.getStyle)(document.body, 'paddingRight'), 10);
|
|
}
|
|
scrollBarWidth = (0, _scrollbarWidth2.default)();
|
|
var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
|
|
var bodyOverflowY = (0, _dom.getStyle)(document.body, 'overflowY');
|
|
if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
|
|
document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
|
|
}
|
|
(0, _dom.addClass)(document.body, 'el-popup-parent--hidden');
|
|
}
|
|
}
|
|
|
|
if (getComputedStyle(dom).position === 'static') {
|
|
dom.style.position = 'absolute';
|
|
}
|
|
|
|
dom.style.zIndex = _popupManager2.default.nextZIndex();
|
|
this.opened = true;
|
|
|
|
this.onOpen && this.onOpen();
|
|
|
|
this.doAfterOpen();
|
|
},
|
|
doAfterOpen: function doAfterOpen() {
|
|
this._opening = false;
|
|
},
|
|
close: function close() {
|
|
var _this3 = this;
|
|
|
|
if (this.willClose && !this.willClose()) return;
|
|
|
|
if (this._openTimer !== null) {
|
|
clearTimeout(this._openTimer);
|
|
this._openTimer = null;
|
|
}
|
|
clearTimeout(this._closeTimer);
|
|
|
|
var closeDelay = Number(this.closeDelay);
|
|
|
|
if (closeDelay > 0) {
|
|
this._closeTimer = setTimeout(function () {
|
|
_this3._closeTimer = null;
|
|
_this3.doClose();
|
|
}, closeDelay);
|
|
} else {
|
|
this.doClose();
|
|
}
|
|
},
|
|
doClose: function doClose() {
|
|
this._closing = true;
|
|
|
|
this.onClose && this.onClose();
|
|
|
|
if (this.lockScroll) {
|
|
setTimeout(this.restoreBodyStyle, 200);
|
|
}
|
|
|
|
this.opened = false;
|
|
|
|
this.doAfterClose();
|
|
},
|
|
doAfterClose: function doAfterClose() {
|
|
_popupManager2.default.closeModal(this._popupId);
|
|
this._closing = false;
|
|
},
|
|
restoreBodyStyle: function restoreBodyStyle() {
|
|
if (this.modal && this.withoutHiddenClass) {
|
|
document.body.style.paddingRight = this.bodyPaddingRight;
|
|
(0, _dom.removeClass)(document.body, 'el-popup-parent--hidden');
|
|
}
|
|
this.withoutHiddenClass = true;
|
|
}
|
|
}
|
|
};
|
|
exports.PopupManager = _popupManager2.default;
|
|
|
|
/***/ }),
|
|
|
|
/***/ "512c":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__("ef08");
|
|
var core = __webpack_require__("5524");
|
|
var ctx = __webpack_require__("9c0c");
|
|
var hide = __webpack_require__("051b");
|
|
var has = __webpack_require__("9c0e");
|
|
var PROTOTYPE = 'prototype';
|
|
|
|
var $export = function (type, name, source) {
|
|
var IS_FORCED = type & $export.F;
|
|
var IS_GLOBAL = type & $export.G;
|
|
var IS_STATIC = type & $export.S;
|
|
var IS_PROTO = type & $export.P;
|
|
var IS_BIND = type & $export.B;
|
|
var IS_WRAP = type & $export.W;
|
|
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
|
|
var expProto = exports[PROTOTYPE];
|
|
var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
|
|
var key, own, out;
|
|
if (IS_GLOBAL) source = name;
|
|
for (key in source) {
|
|
// contains in native
|
|
own = !IS_FORCED && target && target[key] !== undefined;
|
|
if (own && has(exports, key)) continue;
|
|
// export native or passed
|
|
out = own ? target[key] : source[key];
|
|
// prevent global pollution for namespaces
|
|
exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
|
|
// bind timers to global for call from export context
|
|
: IS_BIND && own ? ctx(out, global)
|
|
// wrap global constructors for prevent change them in library
|
|
: IS_WRAP && target[key] == out ? (function (C) {
|
|
var F = function (a, b, c) {
|
|
if (this instanceof C) {
|
|
switch (arguments.length) {
|
|
case 0: return new C();
|
|
case 1: return new C(a);
|
|
case 2: return new C(a, b);
|
|
} return new C(a, b, c);
|
|
} return C.apply(this, arguments);
|
|
};
|
|
F[PROTOTYPE] = C[PROTOTYPE];
|
|
return F;
|
|
// make static versions for prototype methods
|
|
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
|
// export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
|
|
if (IS_PROTO) {
|
|
(exports.virtual || (exports.virtual = {}))[key] = out;
|
|
// export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
|
|
if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
|
|
}
|
|
}
|
|
};
|
|
// type bitmap
|
|
$export.F = 1; // forced
|
|
$export.G = 2; // global
|
|
$export.S = 4; // static
|
|
$export.P = 8; // proto
|
|
$export.B = 16; // bind
|
|
$export.W = 32; // wrap
|
|
$export.U = 64; // safe
|
|
$export.R = 128; // real proto method for `library`
|
|
module.exports = $export;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "5135":
|
|
/***/ (function(module, exports) {
|
|
|
|
var hasOwnProperty = {}.hasOwnProperty;
|
|
|
|
module.exports = function (it, key) {
|
|
return hasOwnProperty.call(it, key);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "5319":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784");
|
|
var anObject = __webpack_require__("825a");
|
|
var toObject = __webpack_require__("7b0b");
|
|
var toLength = __webpack_require__("50c4");
|
|
var toInteger = __webpack_require__("a691");
|
|
var requireObjectCoercible = __webpack_require__("1d80");
|
|
var advanceStringIndex = __webpack_require__("8aa5");
|
|
var regExpExec = __webpack_require__("14c3");
|
|
|
|
var max = Math.max;
|
|
var min = Math.min;
|
|
var floor = Math.floor;
|
|
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
|
|
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
|
|
|
|
var maybeToString = function (it) {
|
|
return it === undefined ? it : String(it);
|
|
};
|
|
|
|
// @@replace logic
|
|
fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
|
|
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
|
|
var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
|
|
var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
|
|
|
|
return [
|
|
// `String.prototype.replace` method
|
|
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
|
|
function replace(searchValue, replaceValue) {
|
|
var O = requireObjectCoercible(this);
|
|
var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
|
|
return replacer !== undefined
|
|
? replacer.call(searchValue, O, replaceValue)
|
|
: nativeReplace.call(String(O), searchValue, replaceValue);
|
|
},
|
|
// `RegExp.prototype[@@replace]` method
|
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
|
|
function (regexp, replaceValue) {
|
|
if (
|
|
(!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
|
|
(typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
|
|
) {
|
|
var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
|
|
if (res.done) return res.value;
|
|
}
|
|
|
|
var rx = anObject(regexp);
|
|
var S = String(this);
|
|
|
|
var functionalReplace = typeof replaceValue === 'function';
|
|
if (!functionalReplace) replaceValue = String(replaceValue);
|
|
|
|
var global = rx.global;
|
|
if (global) {
|
|
var fullUnicode = rx.unicode;
|
|
rx.lastIndex = 0;
|
|
}
|
|
var results = [];
|
|
while (true) {
|
|
var result = regExpExec(rx, S);
|
|
if (result === null) break;
|
|
|
|
results.push(result);
|
|
if (!global) break;
|
|
|
|
var matchStr = String(result[0]);
|
|
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
|
}
|
|
|
|
var accumulatedResult = '';
|
|
var nextSourcePosition = 0;
|
|
for (var i = 0; i < results.length; i++) {
|
|
result = results[i];
|
|
|
|
var matched = String(result[0]);
|
|
var position = max(min(toInteger(result.index), S.length), 0);
|
|
var captures = [];
|
|
// NOTE: This is equivalent to
|
|
// captures = result.slice(1).map(maybeToString)
|
|
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
|
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
|
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
|
for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
|
|
var namedCaptures = result.groups;
|
|
if (functionalReplace) {
|
|
var replacerArgs = [matched].concat(captures, position, S);
|
|
if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
|
|
var replacement = String(replaceValue.apply(undefined, replacerArgs));
|
|
} else {
|
|
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
|
}
|
|
if (position >= nextSourcePosition) {
|
|
accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
|
|
nextSourcePosition = position + matched.length;
|
|
}
|
|
}
|
|
return accumulatedResult + S.slice(nextSourcePosition);
|
|
}
|
|
];
|
|
|
|
// https://tc39.github.io/ecma262/#sec-getsubstitution
|
|
function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
|
|
var tailPos = position + matched.length;
|
|
var m = captures.length;
|
|
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
|
if (namedCaptures !== undefined) {
|
|
namedCaptures = toObject(namedCaptures);
|
|
symbols = SUBSTITUTION_SYMBOLS;
|
|
}
|
|
return nativeReplace.call(replacement, symbols, function (match, ch) {
|
|
var capture;
|
|
switch (ch.charAt(0)) {
|
|
case '$': return '$';
|
|
case '&': return matched;
|
|
case '`': return str.slice(0, position);
|
|
case "'": return str.slice(tailPos);
|
|
case '<':
|
|
capture = namedCaptures[ch.slice(1, -1)];
|
|
break;
|
|
default: // \d\d?
|
|
var n = +ch;
|
|
if (n === 0) return match;
|
|
if (n > m) {
|
|
var f = floor(n / 10);
|
|
if (f === 0) return match;
|
|
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
|
|
return match;
|
|
}
|
|
capture = captures[n - 1];
|
|
}
|
|
return capture === undefined ? '' : capture;
|
|
});
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "5488":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
|
|
var _dom = __webpack_require__("5924");
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
var Transition = function () {
|
|
function Transition() {
|
|
_classCallCheck(this, Transition);
|
|
}
|
|
|
|
Transition.prototype.beforeEnter = function beforeEnter(el) {
|
|
(0, _dom.addClass)(el, 'collapse-transition');
|
|
if (!el.dataset) el.dataset = {};
|
|
|
|
el.dataset.oldPaddingTop = el.style.paddingTop;
|
|
el.dataset.oldPaddingBottom = el.style.paddingBottom;
|
|
|
|
el.style.height = '0';
|
|
el.style.paddingTop = 0;
|
|
el.style.paddingBottom = 0;
|
|
};
|
|
|
|
Transition.prototype.enter = function enter(el) {
|
|
el.dataset.oldOverflow = el.style.overflow;
|
|
if (el.scrollHeight !== 0) {
|
|
el.style.height = el.scrollHeight + 'px';
|
|
el.style.paddingTop = el.dataset.oldPaddingTop;
|
|
el.style.paddingBottom = el.dataset.oldPaddingBottom;
|
|
} else {
|
|
el.style.height = '';
|
|
el.style.paddingTop = el.dataset.oldPaddingTop;
|
|
el.style.paddingBottom = el.dataset.oldPaddingBottom;
|
|
}
|
|
|
|
el.style.overflow = 'hidden';
|
|
};
|
|
|
|
Transition.prototype.afterEnter = function afterEnter(el) {
|
|
// for safari: remove class then reset height is necessary
|
|
(0, _dom.removeClass)(el, 'collapse-transition');
|
|
el.style.height = '';
|
|
el.style.overflow = el.dataset.oldOverflow;
|
|
};
|
|
|
|
Transition.prototype.beforeLeave = function beforeLeave(el) {
|
|
if (!el.dataset) el.dataset = {};
|
|
el.dataset.oldPaddingTop = el.style.paddingTop;
|
|
el.dataset.oldPaddingBottom = el.style.paddingBottom;
|
|
el.dataset.oldOverflow = el.style.overflow;
|
|
|
|
el.style.height = el.scrollHeight + 'px';
|
|
el.style.overflow = 'hidden';
|
|
};
|
|
|
|
Transition.prototype.leave = function leave(el) {
|
|
if (el.scrollHeight !== 0) {
|
|
// for safari: add class after set height, or it will jump to zero height suddenly, weired
|
|
(0, _dom.addClass)(el, 'collapse-transition');
|
|
el.style.height = 0;
|
|
el.style.paddingTop = 0;
|
|
el.style.paddingBottom = 0;
|
|
}
|
|
};
|
|
|
|
Transition.prototype.afterLeave = function afterLeave(el) {
|
|
(0, _dom.removeClass)(el, 'collapse-transition');
|
|
el.style.height = '';
|
|
el.style.overflow = el.dataset.oldOverflow;
|
|
el.style.paddingTop = el.dataset.oldPaddingTop;
|
|
el.style.paddingBottom = el.dataset.oldPaddingBottom;
|
|
};
|
|
|
|
return Transition;
|
|
}();
|
|
|
|
exports.default = {
|
|
name: 'ElCollapseTransition',
|
|
functional: true,
|
|
render: function render(h, _ref) {
|
|
var children = _ref.children;
|
|
|
|
var data = {
|
|
on: new Transition()
|
|
};
|
|
|
|
return h('transition', data, children);
|
|
}
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "54eb":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var copyObject = __webpack_require__("8eeb"),
|
|
getSymbols = __webpack_require__("32f4");
|
|
|
|
/**
|
|
* Copies own symbols of `source` to `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} source The object to copy symbols from.
|
|
* @param {Object} [object={}] The object to copy symbols to.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function copySymbols(source, object) {
|
|
return copyObject(source, getSymbols(source), object);
|
|
}
|
|
|
|
module.exports = copySymbols;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "5524":
|
|
/***/ (function(module, exports) {
|
|
|
|
var core = module.exports = { version: '2.6.11' };
|
|
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "55a3":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Checks if a stack value for `key` exists.
|
|
*
|
|
* @private
|
|
* @name has
|
|
* @memberOf Stack
|
|
* @param {string} key The key of the entry to check.
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
*/
|
|
function stackHas(key) {
|
|
return this.__data__.has(key);
|
|
}
|
|
|
|
module.exports = stackHas;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "564a":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "5692":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var IS_PURE = __webpack_require__("c430");
|
|
var store = __webpack_require__("c6cd");
|
|
|
|
(module.exports = function (key, value) {
|
|
return store[key] || (store[key] = value !== undefined ? value : {});
|
|
})('versions', []).push({
|
|
version: '3.6.5',
|
|
mode: IS_PURE ? 'pure' : 'global',
|
|
copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "56ef":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getBuiltIn = __webpack_require__("d066");
|
|
var getOwnPropertyNamesModule = __webpack_require__("241c");
|
|
var getOwnPropertySymbolsModule = __webpack_require__("7418");
|
|
var anObject = __webpack_require__("825a");
|
|
|
|
// all object keys, includes non-enumerable and symbols
|
|
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
var keys = getOwnPropertyNamesModule.f(anObject(it));
|
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "57a5":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var overArg = __webpack_require__("91e9");
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeKeys = overArg(Object.keys, Object);
|
|
|
|
module.exports = nativeKeys;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "585a":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
|
|
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
|
|
|
module.exports = freeGlobal;
|
|
|
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
|
|
|
|
/***/ }),
|
|
|
|
/***/ "5924":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.isInContainer = exports.getScrollContainer = exports.isScroll = exports.getStyle = exports.once = exports.off = exports.on = undefined;
|
|
|
|
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; }; /* istanbul ignore next */
|
|
|
|
exports.hasClass = hasClass;
|
|
exports.addClass = addClass;
|
|
exports.removeClass = removeClass;
|
|
exports.setStyle = setStyle;
|
|
|
|
var _vue = __webpack_require__("8bbf");
|
|
|
|
var _vue2 = _interopRequireDefault(_vue);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
var isServer = _vue2.default.prototype.$isServer;
|
|
var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
|
|
var MOZ_HACK_REGEXP = /^moz([A-Z])/;
|
|
var ieVersion = isServer ? 0 : Number(document.documentMode);
|
|
|
|
/* istanbul ignore next */
|
|
var trim = function trim(string) {
|
|
return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
|
|
};
|
|
/* istanbul ignore next */
|
|
var camelCase = function camelCase(name) {
|
|
return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
|
|
return offset ? letter.toUpperCase() : letter;
|
|
}).replace(MOZ_HACK_REGEXP, 'Moz$1');
|
|
};
|
|
|
|
/* istanbul ignore next */
|
|
var on = exports.on = function () {
|
|
if (!isServer && document.addEventListener) {
|
|
return function (element, event, handler) {
|
|
if (element && event && handler) {
|
|
element.addEventListener(event, handler, false);
|
|
}
|
|
};
|
|
} else {
|
|
return function (element, event, handler) {
|
|
if (element && event && handler) {
|
|
element.attachEvent('on' + event, handler);
|
|
}
|
|
};
|
|
}
|
|
}();
|
|
|
|
/* istanbul ignore next */
|
|
var off = exports.off = function () {
|
|
if (!isServer && document.removeEventListener) {
|
|
return function (element, event, handler) {
|
|
if (element && event) {
|
|
element.removeEventListener(event, handler, false);
|
|
}
|
|
};
|
|
} else {
|
|
return function (element, event, handler) {
|
|
if (element && event) {
|
|
element.detachEvent('on' + event, handler);
|
|
}
|
|
};
|
|
}
|
|
}();
|
|
|
|
/* istanbul ignore next */
|
|
var once = exports.once = function once(el, event, fn) {
|
|
var listener = function listener() {
|
|
if (fn) {
|
|
fn.apply(this, arguments);
|
|
}
|
|
off(el, event, listener);
|
|
};
|
|
on(el, event, listener);
|
|
};
|
|
|
|
/* istanbul ignore next */
|
|
function hasClass(el, cls) {
|
|
if (!el || !cls) return false;
|
|
if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
|
|
if (el.classList) {
|
|
return el.classList.contains(cls);
|
|
} else {
|
|
return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
|
|
}
|
|
};
|
|
|
|
/* istanbul ignore next */
|
|
function addClass(el, cls) {
|
|
if (!el) return;
|
|
var curClass = el.className;
|
|
var classes = (cls || '').split(' ');
|
|
|
|
for (var i = 0, j = classes.length; i < j; i++) {
|
|
var clsName = classes[i];
|
|
if (!clsName) continue;
|
|
|
|
if (el.classList) {
|
|
el.classList.add(clsName);
|
|
} else if (!hasClass(el, clsName)) {
|
|
curClass += ' ' + clsName;
|
|
}
|
|
}
|
|
if (!el.classList) {
|
|
el.className = curClass;
|
|
}
|
|
};
|
|
|
|
/* istanbul ignore next */
|
|
function removeClass(el, cls) {
|
|
if (!el || !cls) return;
|
|
var classes = cls.split(' ');
|
|
var curClass = ' ' + el.className + ' ';
|
|
|
|
for (var i = 0, j = classes.length; i < j; i++) {
|
|
var clsName = classes[i];
|
|
if (!clsName) continue;
|
|
|
|
if (el.classList) {
|
|
el.classList.remove(clsName);
|
|
} else if (hasClass(el, clsName)) {
|
|
curClass = curClass.replace(' ' + clsName + ' ', ' ');
|
|
}
|
|
}
|
|
if (!el.classList) {
|
|
el.className = trim(curClass);
|
|
}
|
|
};
|
|
|
|
/* istanbul ignore next */
|
|
var getStyle = exports.getStyle = ieVersion < 9 ? function (element, styleName) {
|
|
if (isServer) return;
|
|
if (!element || !styleName) return null;
|
|
styleName = camelCase(styleName);
|
|
if (styleName === 'float') {
|
|
styleName = 'styleFloat';
|
|
}
|
|
try {
|
|
switch (styleName) {
|
|
case 'opacity':
|
|
try {
|
|
return element.filters.item('alpha').opacity / 100;
|
|
} catch (e) {
|
|
return 1.0;
|
|
}
|
|
default:
|
|
return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
|
|
}
|
|
} catch (e) {
|
|
return element.style[styleName];
|
|
}
|
|
} : function (element, styleName) {
|
|
if (isServer) return;
|
|
if (!element || !styleName) return null;
|
|
styleName = camelCase(styleName);
|
|
if (styleName === 'float') {
|
|
styleName = 'cssFloat';
|
|
}
|
|
try {
|
|
var computed = document.defaultView.getComputedStyle(element, '');
|
|
return element.style[styleName] || computed ? computed[styleName] : null;
|
|
} catch (e) {
|
|
return element.style[styleName];
|
|
}
|
|
};
|
|
|
|
/* istanbul ignore next */
|
|
function setStyle(element, styleName, value) {
|
|
if (!element || !styleName) return;
|
|
|
|
if ((typeof styleName === 'undefined' ? 'undefined' : _typeof(styleName)) === 'object') {
|
|
for (var prop in styleName) {
|
|
if (styleName.hasOwnProperty(prop)) {
|
|
setStyle(element, prop, styleName[prop]);
|
|
}
|
|
}
|
|
} else {
|
|
styleName = camelCase(styleName);
|
|
if (styleName === 'opacity' && ieVersion < 9) {
|
|
element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
|
|
} else {
|
|
element.style[styleName] = value;
|
|
}
|
|
}
|
|
};
|
|
|
|
var isScroll = exports.isScroll = function isScroll(el, vertical) {
|
|
if (isServer) return;
|
|
|
|
var determinedDirection = vertical !== null || vertical !== undefined;
|
|
var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
|
|
|
|
return overflow.match(/(scroll|auto)/);
|
|
};
|
|
|
|
var getScrollContainer = exports.getScrollContainer = function getScrollContainer(el, vertical) {
|
|
if (isServer) return;
|
|
|
|
var parent = el;
|
|
while (parent) {
|
|
if ([window, document, document.documentElement].includes(parent)) {
|
|
return window;
|
|
}
|
|
if (isScroll(parent, vertical)) {
|
|
return parent;
|
|
}
|
|
parent = parent.parentNode;
|
|
}
|
|
|
|
return parent;
|
|
};
|
|
|
|
var isInContainer = exports.isInContainer = function isInContainer(el, container) {
|
|
if (isServer || !el || !container) return false;
|
|
|
|
var elRect = el.getBoundingClientRect();
|
|
var containerRect = void 0;
|
|
|
|
if ([window, document, document.documentElement, null, undefined].includes(container)) {
|
|
containerRect = {
|
|
top: 0,
|
|
right: window.innerWidth,
|
|
bottom: window.innerHeight,
|
|
left: 0
|
|
};
|
|
} else {
|
|
containerRect = container.getBoundingClientRect();
|
|
}
|
|
|
|
return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "5950":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "597f":
|
|
/***/ (function(module, exports) {
|
|
|
|
/* eslint-disable no-undefined,no-param-reassign,no-shadow */
|
|
|
|
/**
|
|
* Throttle execution of a function. Especially useful for rate limiting
|
|
* execution of handlers on events like resize and scroll.
|
|
*
|
|
* @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
|
|
* @param {Boolean} [noTrailing] Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the
|
|
* throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time
|
|
* after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,
|
|
* the internal counter is reset)
|
|
* @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
|
|
* to `callback` when the throttled-function is executed.
|
|
* @param {Boolean} [debounceMode] If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),
|
|
* schedule `callback` to execute after `delay` ms.
|
|
*
|
|
* @return {Function} A new, throttled, function.
|
|
*/
|
|
module.exports = function ( delay, noTrailing, callback, debounceMode ) {
|
|
|
|
// After wrapper has stopped being called, this timeout ensures that
|
|
// `callback` is executed at the proper times in `throttle` and `end`
|
|
// debounce modes.
|
|
var timeoutID;
|
|
|
|
// Keep track of the last time `callback` was executed.
|
|
var lastExec = 0;
|
|
|
|
// `noTrailing` defaults to falsy.
|
|
if ( typeof noTrailing !== 'boolean' ) {
|
|
debounceMode = callback;
|
|
callback = noTrailing;
|
|
noTrailing = undefined;
|
|
}
|
|
|
|
// The `wrapper` function encapsulates all of the throttling / debouncing
|
|
// functionality and when executed will limit the rate at which `callback`
|
|
// is executed.
|
|
function wrapper () {
|
|
|
|
var self = this;
|
|
var elapsed = Number(new Date()) - lastExec;
|
|
var args = arguments;
|
|
|
|
// Execute `callback` and update the `lastExec` timestamp.
|
|
function exec () {
|
|
lastExec = Number(new Date());
|
|
callback.apply(self, args);
|
|
}
|
|
|
|
// If `debounceMode` is true (at begin) this is used to clear the flag
|
|
// to allow future `callback` executions.
|
|
function clear () {
|
|
timeoutID = undefined;
|
|
}
|
|
|
|
if ( debounceMode && !timeoutID ) {
|
|
// Since `wrapper` is being called for the first time and
|
|
// `debounceMode` is true (at begin), execute `callback`.
|
|
exec();
|
|
}
|
|
|
|
// Clear any existing timeout.
|
|
if ( timeoutID ) {
|
|
clearTimeout(timeoutID);
|
|
}
|
|
|
|
if ( debounceMode === undefined && elapsed > delay ) {
|
|
// In throttle mode, if `delay` time has been exceeded, execute
|
|
// `callback`.
|
|
exec();
|
|
|
|
} else if ( noTrailing !== true ) {
|
|
// In trailing throttle mode, since `delay` time has not been
|
|
// exceeded, schedule `callback` to execute `delay` ms after most
|
|
// recent execution.
|
|
//
|
|
// If `debounceMode` is true (at begin), schedule `clear` to execute
|
|
// after `delay` ms.
|
|
//
|
|
// If `debounceMode` is false (at end), schedule `callback` to
|
|
// execute after `delay` ms.
|
|
timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
|
|
}
|
|
|
|
}
|
|
|
|
// Return the wrapper function.
|
|
return wrapper;
|
|
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "5986":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "5a94":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var shared = __webpack_require__("b367")('keys');
|
|
var uid = __webpack_require__("8b1a");
|
|
module.exports = function (key) {
|
|
return shared[key] || (shared[key] = uid(key));
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "5b01":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var copyObject = __webpack_require__("8eeb"),
|
|
keys = __webpack_require__("ec69");
|
|
|
|
/**
|
|
* The base implementation of `_.assign` without support for multiple sources
|
|
* or `customizer` functions.
|
|
*
|
|
* @private
|
|
* @param {Object} object The destination object.
|
|
* @param {Object} source The source object.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function baseAssign(object, source) {
|
|
return object && copyObject(source, keys(source), object);
|
|
}
|
|
|
|
module.exports = baseAssign;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "5c0b":
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("049a");
|
|
/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
|
|
/* unused harmony reexport * */
|
|
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default.a);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "5c6c":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function (bitmap, value) {
|
|
return {
|
|
enumerable: !(bitmap & 1),
|
|
configurable: !(bitmap & 2),
|
|
writable: !(bitmap & 4),
|
|
value: value
|
|
};
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "5d89":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var cloneArrayBuffer = __webpack_require__("f8af");
|
|
|
|
/**
|
|
* Creates a clone of `dataView`.
|
|
*
|
|
* @private
|
|
* @param {Object} dataView The data view to clone.
|
|
* @param {boolean} [isDeep] Specify a deep clone.
|
|
* @returns {Object} Returns the cloned data view.
|
|
*/
|
|
function cloneDataView(dataView, isDeep) {
|
|
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
|
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
}
|
|
|
|
module.exports = cloneDataView;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "5e2e":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var listCacheClear = __webpack_require__("28c9"),
|
|
listCacheDelete = __webpack_require__("69d5"),
|
|
listCacheGet = __webpack_require__("b4c0"),
|
|
listCacheHas = __webpack_require__("fba5"),
|
|
listCacheSet = __webpack_require__("67ca");
|
|
|
|
/**
|
|
* Creates an list cache object.
|
|
*
|
|
* @private
|
|
* @constructor
|
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
*/
|
|
function ListCache(entries) {
|
|
var index = -1,
|
|
length = entries == null ? 0 : entries.length;
|
|
|
|
this.clear();
|
|
while (++index < length) {
|
|
var entry = entries[index];
|
|
this.set(entry[0], entry[1]);
|
|
}
|
|
}
|
|
|
|
// Add methods to `ListCache`.
|
|
ListCache.prototype.clear = listCacheClear;
|
|
ListCache.prototype['delete'] = listCacheDelete;
|
|
ListCache.prototype.get = listCacheGet;
|
|
ListCache.prototype.has = listCacheHas;
|
|
ListCache.prototype.set = listCacheSet;
|
|
|
|
module.exports = ListCache;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "6044":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getNative = __webpack_require__("0b07");
|
|
|
|
/* Built-in method references that are verified to be native. */
|
|
var nativeCreate = getNative(Object, 'create');
|
|
|
|
module.exports = nativeCreate;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "60da":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var DESCRIPTORS = __webpack_require__("83ab");
|
|
var fails = __webpack_require__("d039");
|
|
var objectKeys = __webpack_require__("df75");
|
|
var getOwnPropertySymbolsModule = __webpack_require__("7418");
|
|
var propertyIsEnumerableModule = __webpack_require__("d1e7");
|
|
var toObject = __webpack_require__("7b0b");
|
|
var IndexedObject = __webpack_require__("44ad");
|
|
|
|
var nativeAssign = Object.assign;
|
|
var defineProperty = Object.defineProperty;
|
|
|
|
// `Object.assign` method
|
|
// https://tc39.github.io/ecma262/#sec-object.assign
|
|
module.exports = !nativeAssign || fails(function () {
|
|
// should have correct order of operations (Edge bug)
|
|
if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
|
|
enumerable: true,
|
|
get: function () {
|
|
defineProperty(this, 'b', {
|
|
value: 3,
|
|
enumerable: false
|
|
});
|
|
}
|
|
}), { b: 2 })).b !== 1) return true;
|
|
// should work with symbols and should have deterministic property order (V8 bug)
|
|
var A = {};
|
|
var B = {};
|
|
// eslint-disable-next-line no-undef
|
|
var symbol = Symbol();
|
|
var alphabet = 'abcdefghijklmnopqrst';
|
|
A[symbol] = 7;
|
|
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
|
|
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
|
|
var T = toObject(target);
|
|
var argumentsLength = arguments.length;
|
|
var index = 1;
|
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
while (argumentsLength > index) {
|
|
var S = IndexedObject(arguments[index++]);
|
|
var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
|
|
var length = keys.length;
|
|
var j = 0;
|
|
var key;
|
|
while (length > j) {
|
|
key = keys[j++];
|
|
if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];
|
|
}
|
|
} return T;
|
|
} : nativeAssign;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "6167":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __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; };
|
|
|
|
/**
|
|
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
* @version {{version}}
|
|
* @license
|
|
* Copyright (c) 2016 Federico Zivolo and contributors
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
* in the Software without restriction, including without limitation the rights
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
* furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in all
|
|
* copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
* SOFTWARE.
|
|
*/
|
|
|
|
//
|
|
// Cross module loader
|
|
// Supported: Node, AMD, Browser globals
|
|
//
|
|
;(function (root, factory) {
|
|
if (true) {
|
|
// AMD. Register as an anonymous module.
|
|
!(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
|
|
__WEBPACK_AMD_DEFINE_FACTORY__),
|
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
} else {}
|
|
})(undefined, function () {
|
|
|
|
'use strict';
|
|
|
|
var root = window;
|
|
|
|
// default options
|
|
var DEFAULTS = {
|
|
// placement of the popper
|
|
placement: 'bottom',
|
|
|
|
gpuAcceleration: true,
|
|
|
|
// shift popper from its origin by the given amount of pixels (can be negative)
|
|
offset: 0,
|
|
|
|
// the element which will act as boundary of the popper
|
|
boundariesElement: 'viewport',
|
|
|
|
// amount of pixel used to define a minimum distance between the boundaries and the popper
|
|
boundariesPadding: 5,
|
|
|
|
// popper will try to prevent overflow following this order,
|
|
// by default, then, it could overflow on the left and on top of the boundariesElement
|
|
preventOverflowOrder: ['left', 'right', 'top', 'bottom'],
|
|
|
|
// the behavior used by flip to change the placement of the popper
|
|
flipBehavior: 'flip',
|
|
|
|
arrowElement: '[x-arrow]',
|
|
|
|
arrowOffset: 0,
|
|
|
|
// list of functions used to modify the offsets before they are applied to the popper
|
|
modifiers: ['shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle'],
|
|
|
|
modifiersIgnored: [],
|
|
|
|
forceAbsolute: false
|
|
};
|
|
|
|
/**
|
|
* Create a new Popper.js instance
|
|
* @constructor Popper
|
|
* @param {HTMLElement} reference - The reference element used to position the popper
|
|
* @param {HTMLElement|Object} popper
|
|
* The HTML element used as popper, or a configuration used to generate the popper.
|
|
* @param {String} [popper.tagName='div'] The tag name of the generated popper.
|
|
* @param {Array} [popper.classNames=['popper']] Array of classes to apply to the generated popper.
|
|
* @param {Array} [popper.attributes] Array of attributes to apply, specify `attr:value` to assign a value to it.
|
|
* @param {HTMLElement|String} [popper.parent=window.document.body] The parent element, given as HTMLElement or as query string.
|
|
* @param {String} [popper.content=''] The content of the popper, it can be text, html, or node; if it is not text, set `contentType` to `html` or `node`.
|
|
* @param {String} [popper.contentType='text'] If `html`, the `content` will be parsed as HTML. If `node`, it will be appended as-is.
|
|
* @param {String} [popper.arrowTagName='div'] Same as `popper.tagName` but for the arrow element.
|
|
* @param {Array} [popper.arrowClassNames='popper__arrow'] Same as `popper.classNames` but for the arrow element.
|
|
* @param {String} [popper.arrowAttributes=['x-arrow']] Same as `popper.attributes` but for the arrow element.
|
|
* @param {Object} options
|
|
* @param {String} [options.placement=bottom]
|
|
* Placement of the popper accepted values: `top(-start, -end), right(-start, -end), bottom(-start, -right),
|
|
* left(-start, -end)`
|
|
*
|
|
* @param {HTMLElement|String} [options.arrowElement='[x-arrow]']
|
|
* The DOM Node used as arrow for the popper, or a CSS selector used to get the DOM node. It must be child of
|
|
* its parent Popper. Popper.js will apply to the given element the style required to align the arrow with its
|
|
* reference element.
|
|
* By default, it will look for a child node of the popper with the `x-arrow` attribute.
|
|
*
|
|
* @param {Boolean} [options.gpuAcceleration=true]
|
|
* When this property is set to true, the popper position will be applied using CSS3 translate3d, allowing the
|
|
* browser to use the GPU to accelerate the rendering.
|
|
* If set to false, the popper will be placed using `top` and `left` properties, not using the GPU.
|
|
*
|
|
* @param {Number} [options.offset=0]
|
|
* Amount of pixels the popper will be shifted (can be negative).
|
|
*
|
|
* @param {String|Element} [options.boundariesElement='viewport']
|
|
* The element which will define the boundaries of the popper position, the popper will never be placed outside
|
|
* of the defined boundaries (except if `keepTogether` is enabled)
|
|
*
|
|
* @param {Number} [options.boundariesPadding=5]
|
|
* Additional padding for the boundaries
|
|
*
|
|
* @param {Array} [options.preventOverflowOrder=['left', 'right', 'top', 'bottom']]
|
|
* Order used when Popper.js tries to avoid overflows from the boundaries, they will be checked in order,
|
|
* this means that the last ones will never overflow
|
|
*
|
|
* @param {String|Array} [options.flipBehavior='flip']
|
|
* The behavior used by the `flip` modifier to change the placement of the popper when the latter is trying to
|
|
* overlap its reference element. Defining `flip` as value, the placement will be flipped on
|
|
* its axis (`right - left`, `top - bottom`).
|
|
* You can even pass an array of placements (eg: `['right', 'left', 'top']` ) to manually specify
|
|
* how alter the placement when a flip is needed. (eg. in the above example, it would first flip from right to left,
|
|
* then, if even in its new placement, the popper is overlapping its reference element, it will be moved to top)
|
|
*
|
|
* @param {Array} [options.modifiers=[ 'shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle']]
|
|
* List of functions used to modify the data before they are applied to the popper, add your custom functions
|
|
* to this array to edit the offsets and placement.
|
|
* The function should reflect the @params and @returns of preventOverflow
|
|
*
|
|
* @param {Array} [options.modifiersIgnored=[]]
|
|
* Put here any built-in modifier name you want to exclude from the modifiers list
|
|
* The function should reflect the @params and @returns of preventOverflow
|
|
*
|
|
* @param {Boolean} [options.removeOnDestroy=false]
|
|
* Set to true if you want to automatically remove the popper when you call the `destroy` method.
|
|
*/
|
|
function Popper(reference, popper, options) {
|
|
this._reference = reference.jquery ? reference[0] : reference;
|
|
this.state = {};
|
|
|
|
// if the popper variable is a configuration object, parse it to generate an HTMLElement
|
|
// generate a default popper if is not defined
|
|
var isNotDefined = typeof popper === 'undefined' || popper === null;
|
|
var isConfig = popper && Object.prototype.toString.call(popper) === '[object Object]';
|
|
if (isNotDefined || isConfig) {
|
|
this._popper = this.parse(isConfig ? popper : {});
|
|
}
|
|
// otherwise, use the given HTMLElement as popper
|
|
else {
|
|
this._popper = popper.jquery ? popper[0] : popper;
|
|
}
|
|
|
|
// with {} we create a new object with the options inside it
|
|
this._options = Object.assign({}, DEFAULTS, options);
|
|
|
|
// refactoring modifiers' list
|
|
this._options.modifiers = this._options.modifiers.map(function (modifier) {
|
|
// remove ignored modifiers
|
|
if (this._options.modifiersIgnored.indexOf(modifier) !== -1) return;
|
|
|
|
// set the x-placement attribute before everything else because it could be used to add margins to the popper
|
|
// margins needs to be calculated to get the correct popper offsets
|
|
if (modifier === 'applyStyle') {
|
|
this._popper.setAttribute('x-placement', this._options.placement);
|
|
}
|
|
|
|
// return predefined modifier identified by string or keep the custom one
|
|
return this.modifiers[modifier] || modifier;
|
|
}.bind(this));
|
|
|
|
// make sure to apply the popper position before any computation
|
|
this.state.position = this._getPosition(this._popper, this._reference);
|
|
setStyle(this._popper, { position: this.state.position, top: 0 });
|
|
|
|
// fire the first update to position the popper in the right place
|
|
this.update();
|
|
|
|
// setup event listeners, they will take care of update the position in specific situations
|
|
this._setupEventListeners();
|
|
return this;
|
|
}
|
|
|
|
//
|
|
// Methods
|
|
//
|
|
/**
|
|
* Destroy the popper
|
|
* @method
|
|
* @memberof Popper
|
|
*/
|
|
Popper.prototype.destroy = function () {
|
|
this._popper.removeAttribute('x-placement');
|
|
this._popper.style.left = '';
|
|
this._popper.style.position = '';
|
|
this._popper.style.top = '';
|
|
this._popper.style[getSupportedPropertyName('transform')] = '';
|
|
this._removeEventListeners();
|
|
|
|
// remove the popper if user explicity asked for the deletion on destroy
|
|
if (this._options.removeOnDestroy) {
|
|
this._popper.remove();
|
|
}
|
|
return this;
|
|
};
|
|
|
|
/**
|
|
* Updates the position of the popper, computing the new offsets and applying the new style
|
|
* @method
|
|
* @memberof Popper
|
|
*/
|
|
Popper.prototype.update = function () {
|
|
var data = { instance: this, styles: {} };
|
|
|
|
// store placement inside the data object, modifiers will be able to edit `placement` if needed
|
|
// and refer to _originalPlacement to know the original value
|
|
data.placement = this._options.placement;
|
|
data._originalPlacement = this._options.placement;
|
|
|
|
// compute the popper and reference offsets and put them inside data.offsets
|
|
data.offsets = this._getOffsets(this._popper, this._reference, data.placement);
|
|
|
|
// get boundaries
|
|
data.boundaries = this._getBoundaries(data, this._options.boundariesPadding, this._options.boundariesElement);
|
|
|
|
data = this.runModifiers(data, this._options.modifiers);
|
|
|
|
if (typeof this.state.updateCallback === 'function') {
|
|
this.state.updateCallback(data);
|
|
}
|
|
};
|
|
|
|
/**
|
|
* If a function is passed, it will be executed after the initialization of popper with as first argument the Popper instance.
|
|
* @method
|
|
* @memberof Popper
|
|
* @param {Function} callback
|
|
*/
|
|
Popper.prototype.onCreate = function (callback) {
|
|
// the createCallbacks return as first argument the popper instance
|
|
callback(this);
|
|
return this;
|
|
};
|
|
|
|
/**
|
|
* If a function is passed, it will be executed after each update of popper with as first argument the set of coordinates and informations
|
|
* used to style popper and its arrow.
|
|
* NOTE: it doesn't get fired on the first call of the `Popper.update()` method inside the `Popper` constructor!
|
|
* @method
|
|
* @memberof Popper
|
|
* @param {Function} callback
|
|
*/
|
|
Popper.prototype.onUpdate = function (callback) {
|
|
this.state.updateCallback = callback;
|
|
return this;
|
|
};
|
|
|
|
/**
|
|
* Helper used to generate poppers from a configuration file
|
|
* @method
|
|
* @memberof Popper
|
|
* @param config {Object} configuration
|
|
* @returns {HTMLElement} popper
|
|
*/
|
|
Popper.prototype.parse = function (config) {
|
|
var defaultConfig = {
|
|
tagName: 'div',
|
|
classNames: ['popper'],
|
|
attributes: [],
|
|
parent: root.document.body,
|
|
content: '',
|
|
contentType: 'text',
|
|
arrowTagName: 'div',
|
|
arrowClassNames: ['popper__arrow'],
|
|
arrowAttributes: ['x-arrow']
|
|
};
|
|
config = Object.assign({}, defaultConfig, config);
|
|
|
|
var d = root.document;
|
|
|
|
var popper = d.createElement(config.tagName);
|
|
addClassNames(popper, config.classNames);
|
|
addAttributes(popper, config.attributes);
|
|
if (config.contentType === 'node') {
|
|
popper.appendChild(config.content.jquery ? config.content[0] : config.content);
|
|
} else if (config.contentType === 'html') {
|
|
popper.innerHTML = config.content;
|
|
} else {
|
|
popper.textContent = config.content;
|
|
}
|
|
|
|
if (config.arrowTagName) {
|
|
var arrow = d.createElement(config.arrowTagName);
|
|
addClassNames(arrow, config.arrowClassNames);
|
|
addAttributes(arrow, config.arrowAttributes);
|
|
popper.appendChild(arrow);
|
|
}
|
|
|
|
var parent = config.parent.jquery ? config.parent[0] : config.parent;
|
|
|
|
// if the given parent is a string, use it to match an element
|
|
// if more than one element is matched, the first one will be used as parent
|
|
// if no elements are matched, the script will throw an error
|
|
if (typeof parent === 'string') {
|
|
parent = d.querySelectorAll(config.parent);
|
|
if (parent.length > 1) {
|
|
console.warn('WARNING: the given `parent` query(' + config.parent + ') matched more than one element, the first one will be used');
|
|
}
|
|
if (parent.length === 0) {
|
|
throw 'ERROR: the given `parent` doesn\'t exists!';
|
|
}
|
|
parent = parent[0];
|
|
}
|
|
// if the given parent is a DOM nodes list or an array of nodes with more than one element,
|
|
// the first one will be used as parent
|
|
if (parent.length > 1 && parent instanceof Element === false) {
|
|
console.warn('WARNING: you have passed as parent a list of elements, the first one will be used');
|
|
parent = parent[0];
|
|
}
|
|
|
|
// append the generated popper to its parent
|
|
parent.appendChild(popper);
|
|
|
|
return popper;
|
|
|
|
/**
|
|
* Adds class names to the given element
|
|
* @function
|
|
* @ignore
|
|
* @param {HTMLElement} target
|
|
* @param {Array} classes
|
|
*/
|
|
function addClassNames(element, classNames) {
|
|
classNames.forEach(function (className) {
|
|
element.classList.add(className);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Adds attributes to the given element
|
|
* @function
|
|
* @ignore
|
|
* @param {HTMLElement} target
|
|
* @param {Array} attributes
|
|
* @example
|
|
* addAttributes(element, [ 'data-info:foobar' ]);
|
|
*/
|
|
function addAttributes(element, attributes) {
|
|
attributes.forEach(function (attribute) {
|
|
element.setAttribute(attribute.split(':')[0], attribute.split(':')[1] || '');
|
|
});
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Helper used to get the position which will be applied to the popper
|
|
* @method
|
|
* @memberof Popper
|
|
* @param config {HTMLElement} popper element
|
|
* @param reference {HTMLElement} reference element
|
|
* @returns {String} position
|
|
*/
|
|
Popper.prototype._getPosition = function (popper, reference) {
|
|
var container = getOffsetParent(reference);
|
|
|
|
if (this._options.forceAbsolute) {
|
|
return 'absolute';
|
|
}
|
|
|
|
// Decide if the popper will be fixed
|
|
// If the reference element is inside a fixed context, the popper will be fixed as well to allow them to scroll together
|
|
var isParentFixed = isFixed(reference, container);
|
|
return isParentFixed ? 'fixed' : 'absolute';
|
|
};
|
|
|
|
/**
|
|
* Get offsets to the popper
|
|
* @method
|
|
* @memberof Popper
|
|
* @access private
|
|
* @param {Element} popper - the popper element
|
|
* @param {Element} reference - the reference element (the popper will be relative to this)
|
|
* @returns {Object} An object containing the offsets which will be applied to the popper
|
|
*/
|
|
Popper.prototype._getOffsets = function (popper, reference, placement) {
|
|
placement = placement.split('-')[0];
|
|
var popperOffsets = {};
|
|
|
|
popperOffsets.position = this.state.position;
|
|
var isParentFixed = popperOffsets.position === 'fixed';
|
|
|
|
//
|
|
// Get reference element position
|
|
//
|
|
var referenceOffsets = getOffsetRectRelativeToCustomParent(reference, getOffsetParent(popper), isParentFixed);
|
|
|
|
//
|
|
// Get popper sizes
|
|
//
|
|
var popperRect = getOuterSizes(popper);
|
|
|
|
//
|
|
// Compute offsets of popper
|
|
//
|
|
|
|
// depending by the popper placement we have to compute its offsets slightly differently
|
|
if (['right', 'left'].indexOf(placement) !== -1) {
|
|
popperOffsets.top = referenceOffsets.top + referenceOffsets.height / 2 - popperRect.height / 2;
|
|
if (placement === 'left') {
|
|
popperOffsets.left = referenceOffsets.left - popperRect.width;
|
|
} else {
|
|
popperOffsets.left = referenceOffsets.right;
|
|
}
|
|
} else {
|
|
popperOffsets.left = referenceOffsets.left + referenceOffsets.width / 2 - popperRect.width / 2;
|
|
if (placement === 'top') {
|
|
popperOffsets.top = referenceOffsets.top - popperRect.height;
|
|
} else {
|
|
popperOffsets.top = referenceOffsets.bottom;
|
|
}
|
|
}
|
|
|
|
// Add width and height to our offsets object
|
|
popperOffsets.width = popperRect.width;
|
|
popperOffsets.height = popperRect.height;
|
|
|
|
return {
|
|
popper: popperOffsets,
|
|
reference: referenceOffsets
|
|
};
|
|
};
|
|
|
|
/**
|
|
* Setup needed event listeners used to update the popper position
|
|
* @method
|
|
* @memberof Popper
|
|
* @access private
|
|
*/
|
|
Popper.prototype._setupEventListeners = function () {
|
|
// NOTE: 1 DOM access here
|
|
this.state.updateBound = this.update.bind(this);
|
|
root.addEventListener('resize', this.state.updateBound);
|
|
// if the boundariesElement is window we don't need to listen for the scroll event
|
|
if (this._options.boundariesElement !== 'window') {
|
|
var target = getScrollParent(this._reference);
|
|
// here it could be both `body` or `documentElement` thanks to Firefox, we then check both
|
|
if (target === root.document.body || target === root.document.documentElement) {
|
|
target = root;
|
|
}
|
|
target.addEventListener('scroll', this.state.updateBound);
|
|
this.state.scrollTarget = target;
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Remove event listeners used to update the popper position
|
|
* @method
|
|
* @memberof Popper
|
|
* @access private
|
|
*/
|
|
Popper.prototype._removeEventListeners = function () {
|
|
// NOTE: 1 DOM access here
|
|
root.removeEventListener('resize', this.state.updateBound);
|
|
if (this._options.boundariesElement !== 'window' && this.state.scrollTarget) {
|
|
this.state.scrollTarget.removeEventListener('scroll', this.state.updateBound);
|
|
this.state.scrollTarget = null;
|
|
}
|
|
this.state.updateBound = null;
|
|
};
|
|
|
|
/**
|
|
* Computed the boundaries limits and return them
|
|
* @method
|
|
* @memberof Popper
|
|
* @access private
|
|
* @param {Object} data - Object containing the property "offsets" generated by `_getOffsets`
|
|
* @param {Number} padding - Boundaries padding
|
|
* @param {Element} boundariesElement - Element used to define the boundaries
|
|
* @returns {Object} Coordinates of the boundaries
|
|
*/
|
|
Popper.prototype._getBoundaries = function (data, padding, boundariesElement) {
|
|
// NOTE: 1 DOM access here
|
|
var boundaries = {};
|
|
var width, height;
|
|
if (boundariesElement === 'window') {
|
|
var body = root.document.body,
|
|
html = root.document.documentElement;
|
|
|
|
height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
|
|
width = Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth);
|
|
|
|
boundaries = {
|
|
top: 0,
|
|
right: width,
|
|
bottom: height,
|
|
left: 0
|
|
};
|
|
} else if (boundariesElement === 'viewport') {
|
|
var offsetParent = getOffsetParent(this._popper);
|
|
var scrollParent = getScrollParent(this._popper);
|
|
var offsetParentRect = getOffsetRect(offsetParent);
|
|
|
|
// Thanks the fucking native API, `document.body.scrollTop` & `document.documentElement.scrollTop`
|
|
var getScrollTopValue = function getScrollTopValue(element) {
|
|
return element == document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : element.scrollTop;
|
|
};
|
|
var getScrollLeftValue = function getScrollLeftValue(element) {
|
|
return element == document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : element.scrollLeft;
|
|
};
|
|
|
|
// if the popper is fixed we don't have to substract scrolling from the boundaries
|
|
var scrollTop = data.offsets.popper.position === 'fixed' ? 0 : getScrollTopValue(scrollParent);
|
|
var scrollLeft = data.offsets.popper.position === 'fixed' ? 0 : getScrollLeftValue(scrollParent);
|
|
|
|
boundaries = {
|
|
top: 0 - (offsetParentRect.top - scrollTop),
|
|
right: root.document.documentElement.clientWidth - (offsetParentRect.left - scrollLeft),
|
|
bottom: root.document.documentElement.clientHeight - (offsetParentRect.top - scrollTop),
|
|
left: 0 - (offsetParentRect.left - scrollLeft)
|
|
};
|
|
} else {
|
|
if (getOffsetParent(this._popper) === boundariesElement) {
|
|
boundaries = {
|
|
top: 0,
|
|
left: 0,
|
|
right: boundariesElement.clientWidth,
|
|
bottom: boundariesElement.clientHeight
|
|
};
|
|
} else {
|
|
boundaries = getOffsetRect(boundariesElement);
|
|
}
|
|
}
|
|
boundaries.left += padding;
|
|
boundaries.right -= padding;
|
|
boundaries.top = boundaries.top + padding;
|
|
boundaries.bottom = boundaries.bottom - padding;
|
|
return boundaries;
|
|
};
|
|
|
|
/**
|
|
* Loop trough the list of modifiers and run them in order, each of them will then edit the data object
|
|
* @method
|
|
* @memberof Popper
|
|
* @access public
|
|
* @param {Object} data
|
|
* @param {Array} modifiers
|
|
* @param {Function} ends
|
|
*/
|
|
Popper.prototype.runModifiers = function (data, modifiers, ends) {
|
|
var modifiersToRun = modifiers.slice();
|
|
if (ends !== undefined) {
|
|
modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
|
|
}
|
|
|
|
modifiersToRun.forEach(function (modifier) {
|
|
if (isFunction(modifier)) {
|
|
data = modifier.call(this, data);
|
|
}
|
|
}.bind(this));
|
|
|
|
return data;
|
|
};
|
|
|
|
/**
|
|
* Helper used to know if the given modifier depends from another one.
|
|
* @method
|
|
* @memberof Popper
|
|
* @param {String} requesting - name of requesting modifier
|
|
* @param {String} requested - name of requested modifier
|
|
* @returns {Boolean}
|
|
*/
|
|
Popper.prototype.isModifierRequired = function (requesting, requested) {
|
|
var index = getArrayKeyIndex(this._options.modifiers, requesting);
|
|
return !!this._options.modifiers.slice(0, index).filter(function (modifier) {
|
|
return modifier === requested;
|
|
}).length;
|
|
};
|
|
|
|
//
|
|
// Modifiers
|
|
//
|
|
|
|
/**
|
|
* Modifiers list
|
|
* @namespace Popper.modifiers
|
|
* @memberof Popper
|
|
* @type {Object}
|
|
*/
|
|
Popper.prototype.modifiers = {};
|
|
|
|
/**
|
|
* Apply the computed styles to the popper element
|
|
* @method
|
|
* @memberof Popper.modifiers
|
|
* @argument {Object} data - The data object generated by `update` method
|
|
* @returns {Object} The same data object
|
|
*/
|
|
Popper.prototype.modifiers.applyStyle = function (data) {
|
|
// apply the final offsets to the popper
|
|
// NOTE: 1 DOM access here
|
|
var styles = {
|
|
position: data.offsets.popper.position
|
|
};
|
|
|
|
// round top and left to avoid blurry text
|
|
var left = Math.round(data.offsets.popper.left);
|
|
var top = Math.round(data.offsets.popper.top);
|
|
|
|
// if gpuAcceleration is set to true and transform is supported, we use `translate3d` to apply the position to the popper
|
|
// we automatically use the supported prefixed version if needed
|
|
var prefixedProperty;
|
|
if (this._options.gpuAcceleration && (prefixedProperty = getSupportedPropertyName('transform'))) {
|
|
styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
|
|
styles.top = 0;
|
|
styles.left = 0;
|
|
}
|
|
// othwerise, we use the standard `left` and `top` properties
|
|
else {
|
|
styles.left = left;
|
|
styles.top = top;
|
|
}
|
|
|
|
// any property present in `data.styles` will be applied to the popper,
|
|
// in this way we can make the 3rd party modifiers add custom styles to it
|
|
// Be aware, modifiers could override the properties defined in the previous
|
|
// lines of this modifier!
|
|
Object.assign(styles, data.styles);
|
|
|
|
setStyle(this._popper, styles);
|
|
|
|
// set an attribute which will be useful to style the tooltip (use it to properly position its arrow)
|
|
// NOTE: 1 DOM access here
|
|
this._popper.setAttribute('x-placement', data.placement);
|
|
|
|
// if the arrow modifier is required and the arrow style has been computed, apply the arrow style
|
|
if (this.isModifierRequired(this.modifiers.applyStyle, this.modifiers.arrow) && data.offsets.arrow) {
|
|
setStyle(data.arrowElement, data.offsets.arrow);
|
|
}
|
|
|
|
return data;
|
|
};
|
|
|
|
/**
|
|
* Modifier used to shift the popper on the start or end of its reference element side
|
|
* @method
|
|
* @memberof Popper.modifiers
|
|
* @argument {Object} data - The data object generated by `update` method
|
|
* @returns {Object} The data object, properly modified
|
|
*/
|
|
Popper.prototype.modifiers.shift = function (data) {
|
|
var placement = data.placement;
|
|
var basePlacement = placement.split('-')[0];
|
|
var shiftVariation = placement.split('-')[1];
|
|
|
|
// if shift shiftVariation is specified, run the modifier
|
|
if (shiftVariation) {
|
|
var reference = data.offsets.reference;
|
|
var popper = getPopperClientRect(data.offsets.popper);
|
|
|
|
var shiftOffsets = {
|
|
y: {
|
|
start: { top: reference.top },
|
|
end: { top: reference.top + reference.height - popper.height }
|
|
},
|
|
x: {
|
|
start: { left: reference.left },
|
|
end: { left: reference.left + reference.width - popper.width }
|
|
}
|
|
};
|
|
|
|
var axis = ['bottom', 'top'].indexOf(basePlacement) !== -1 ? 'x' : 'y';
|
|
|
|
data.offsets.popper = Object.assign(popper, shiftOffsets[axis][shiftVariation]);
|
|
}
|
|
|
|
return data;
|
|
};
|
|
|
|
/**
|
|
* Modifier used to make sure the popper does not overflows from it's boundaries
|
|
* @method
|
|
* @memberof Popper.modifiers
|
|
* @argument {Object} data - The data object generated by `update` method
|
|
* @returns {Object} The data object, properly modified
|
|
*/
|
|
Popper.prototype.modifiers.preventOverflow = function (data) {
|
|
var order = this._options.preventOverflowOrder;
|
|
var popper = getPopperClientRect(data.offsets.popper);
|
|
|
|
var check = {
|
|
left: function left() {
|
|
var left = popper.left;
|
|
if (popper.left < data.boundaries.left) {
|
|
left = Math.max(popper.left, data.boundaries.left);
|
|
}
|
|
return { left: left };
|
|
},
|
|
right: function right() {
|
|
var left = popper.left;
|
|
if (popper.right > data.boundaries.right) {
|
|
left = Math.min(popper.left, data.boundaries.right - popper.width);
|
|
}
|
|
return { left: left };
|
|
},
|
|
top: function top() {
|
|
var top = popper.top;
|
|
if (popper.top < data.boundaries.top) {
|
|
top = Math.max(popper.top, data.boundaries.top);
|
|
}
|
|
return { top: top };
|
|
},
|
|
bottom: function bottom() {
|
|
var top = popper.top;
|
|
if (popper.bottom > data.boundaries.bottom) {
|
|
top = Math.min(popper.top, data.boundaries.bottom - popper.height);
|
|
}
|
|
return { top: top };
|
|
}
|
|
};
|
|
|
|
order.forEach(function (direction) {
|
|
data.offsets.popper = Object.assign(popper, check[direction]());
|
|
});
|
|
|
|
return data;
|
|
};
|
|
|
|
/**
|
|
* Modifier used to make sure the popper is always near its reference
|
|
* @method
|
|
* @memberof Popper.modifiers
|
|
* @argument {Object} data - The data object generated by _update method
|
|
* @returns {Object} The data object, properly modified
|
|
*/
|
|
Popper.prototype.modifiers.keepTogether = function (data) {
|
|
var popper = getPopperClientRect(data.offsets.popper);
|
|
var reference = data.offsets.reference;
|
|
var f = Math.floor;
|
|
|
|
if (popper.right < f(reference.left)) {
|
|
data.offsets.popper.left = f(reference.left) - popper.width;
|
|
}
|
|
if (popper.left > f(reference.right)) {
|
|
data.offsets.popper.left = f(reference.right);
|
|
}
|
|
if (popper.bottom < f(reference.top)) {
|
|
data.offsets.popper.top = f(reference.top) - popper.height;
|
|
}
|
|
if (popper.top > f(reference.bottom)) {
|
|
data.offsets.popper.top = f(reference.bottom);
|
|
}
|
|
|
|
return data;
|
|
};
|
|
|
|
/**
|
|
* Modifier used to flip the placement of the popper when the latter is starting overlapping its reference element.
|
|
* Requires the `preventOverflow` modifier before it in order to work.
|
|
* **NOTE:** This modifier will run all its previous modifiers everytime it tries to flip the popper!
|
|
* @method
|
|
* @memberof Popper.modifiers
|
|
* @argument {Object} data - The data object generated by _update method
|
|
* @returns {Object} The data object, properly modified
|
|
*/
|
|
Popper.prototype.modifiers.flip = function (data) {
|
|
// check if preventOverflow is in the list of modifiers before the flip modifier.
|
|
// otherwise flip would not work as expected.
|
|
if (!this.isModifierRequired(this.modifiers.flip, this.modifiers.preventOverflow)) {
|
|
console.warn('WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!');
|
|
return data;
|
|
}
|
|
|
|
if (data.flipped && data.placement === data._originalPlacement) {
|
|
// seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
|
|
return data;
|
|
}
|
|
|
|
var placement = data.placement.split('-')[0];
|
|
var placementOpposite = getOppositePlacement(placement);
|
|
var variation = data.placement.split('-')[1] || '';
|
|
|
|
var flipOrder = [];
|
|
if (this._options.flipBehavior === 'flip') {
|
|
flipOrder = [placement, placementOpposite];
|
|
} else {
|
|
flipOrder = this._options.flipBehavior;
|
|
}
|
|
|
|
flipOrder.forEach(function (step, index) {
|
|
if (placement !== step || flipOrder.length === index + 1) {
|
|
return;
|
|
}
|
|
|
|
placement = data.placement.split('-')[0];
|
|
placementOpposite = getOppositePlacement(placement);
|
|
|
|
var popperOffsets = getPopperClientRect(data.offsets.popper);
|
|
|
|
// this boolean is used to distinguish right and bottom from top and left
|
|
// they need different computations to get flipped
|
|
var a = ['right', 'bottom'].indexOf(placement) !== -1;
|
|
|
|
// using Math.floor because the reference offsets may contain decimals we are not going to consider here
|
|
if (a && Math.floor(data.offsets.reference[placement]) > Math.floor(popperOffsets[placementOpposite]) || !a && Math.floor(data.offsets.reference[placement]) < Math.floor(popperOffsets[placementOpposite])) {
|
|
// we'll use this boolean to detect any flip loop
|
|
data.flipped = true;
|
|
data.placement = flipOrder[index + 1];
|
|
if (variation) {
|
|
data.placement += '-' + variation;
|
|
}
|
|
data.offsets.popper = this._getOffsets(this._popper, this._reference, data.placement).popper;
|
|
|
|
data = this.runModifiers(data, this._options.modifiers, this._flip);
|
|
}
|
|
}.bind(this));
|
|
return data;
|
|
};
|
|
|
|
/**
|
|
* Modifier used to add an offset to the popper, useful if you more granularity positioning your popper.
|
|
* The offsets will shift the popper on the side of its reference element.
|
|
* @method
|
|
* @memberof Popper.modifiers
|
|
* @argument {Object} data - The data object generated by _update method
|
|
* @returns {Object} The data object, properly modified
|
|
*/
|
|
Popper.prototype.modifiers.offset = function (data) {
|
|
var offset = this._options.offset;
|
|
var popper = data.offsets.popper;
|
|
|
|
if (data.placement.indexOf('left') !== -1) {
|
|
popper.top -= offset;
|
|
} else if (data.placement.indexOf('right') !== -1) {
|
|
popper.top += offset;
|
|
} else if (data.placement.indexOf('top') !== -1) {
|
|
popper.left -= offset;
|
|
} else if (data.placement.indexOf('bottom') !== -1) {
|
|
popper.left += offset;
|
|
}
|
|
return data;
|
|
};
|
|
|
|
/**
|
|
* Modifier used to move the arrows on the edge of the popper to make sure them are always between the popper and the reference element
|
|
* It will use the CSS outer size of the arrow element to know how many pixels of conjuction are needed
|
|
* @method
|
|
* @memberof Popper.modifiers
|
|
* @argument {Object} data - The data object generated by _update method
|
|
* @returns {Object} The data object, properly modified
|
|
*/
|
|
Popper.prototype.modifiers.arrow = function (data) {
|
|
var arrow = this._options.arrowElement;
|
|
var arrowOffset = this._options.arrowOffset;
|
|
|
|
// if the arrowElement is a string, suppose it's a CSS selector
|
|
if (typeof arrow === 'string') {
|
|
arrow = this._popper.querySelector(arrow);
|
|
}
|
|
|
|
// if arrow element is not found, don't run the modifier
|
|
if (!arrow) {
|
|
return data;
|
|
}
|
|
|
|
// the arrow element must be child of its popper
|
|
if (!this._popper.contains(arrow)) {
|
|
console.warn('WARNING: `arrowElement` must be child of its popper element!');
|
|
return data;
|
|
}
|
|
|
|
// arrow depends on keepTogether in order to work
|
|
if (!this.isModifierRequired(this.modifiers.arrow, this.modifiers.keepTogether)) {
|
|
console.warn('WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!');
|
|
return data;
|
|
}
|
|
|
|
var arrowStyle = {};
|
|
var placement = data.placement.split('-')[0];
|
|
var popper = getPopperClientRect(data.offsets.popper);
|
|
var reference = data.offsets.reference;
|
|
var isVertical = ['left', 'right'].indexOf(placement) !== -1;
|
|
|
|
var len = isVertical ? 'height' : 'width';
|
|
var side = isVertical ? 'top' : 'left';
|
|
var translate = isVertical ? 'translateY' : 'translateX';
|
|
var altSide = isVertical ? 'left' : 'top';
|
|
var opSide = isVertical ? 'bottom' : 'right';
|
|
var arrowSize = getOuterSizes(arrow)[len];
|
|
|
|
//
|
|
// extends keepTogether behavior making sure the popper and its reference have enough pixels in conjuction
|
|
//
|
|
|
|
// top/left side
|
|
if (reference[opSide] - arrowSize < popper[side]) {
|
|
data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowSize);
|
|
}
|
|
// bottom/right side
|
|
if (reference[side] + arrowSize > popper[opSide]) {
|
|
data.offsets.popper[side] += reference[side] + arrowSize - popper[opSide];
|
|
}
|
|
|
|
// compute center of the popper
|
|
var center = reference[side] + (arrowOffset || reference[len] / 2 - arrowSize / 2);
|
|
|
|
var sideValue = center - popper[side];
|
|
|
|
// prevent arrow from being placed not contiguously to its popper
|
|
sideValue = Math.max(Math.min(popper[len] - arrowSize - 8, sideValue), 8);
|
|
arrowStyle[side] = sideValue;
|
|
arrowStyle[altSide] = ''; // make sure to remove any old style from the arrow
|
|
|
|
data.offsets.arrow = arrowStyle;
|
|
data.arrowElement = arrow;
|
|
|
|
return data;
|
|
};
|
|
|
|
//
|
|
// Helpers
|
|
//
|
|
|
|
/**
|
|
* Get the outer sizes of the given element (offset size + margins)
|
|
* @function
|
|
* @ignore
|
|
* @argument {Element} element
|
|
* @returns {Object} object containing width and height properties
|
|
*/
|
|
function getOuterSizes(element) {
|
|
// NOTE: 1 DOM access here
|
|
var _display = element.style.display,
|
|
_visibility = element.style.visibility;
|
|
element.style.display = 'block';element.style.visibility = 'hidden';
|
|
var calcWidthToForceRepaint = element.offsetWidth;
|
|
|
|
// original method
|
|
var styles = root.getComputedStyle(element);
|
|
var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
|
|
var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
|
|
var result = { width: element.offsetWidth + y, height: element.offsetHeight + x };
|
|
|
|
// reset element styles
|
|
element.style.display = _display;element.style.visibility = _visibility;
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Get the opposite placement of the given one/
|
|
* @function
|
|
* @ignore
|
|
* @argument {String} placement
|
|
* @returns {String} flipped placement
|
|
*/
|
|
function getOppositePlacement(placement) {
|
|
var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
|
|
return placement.replace(/left|right|bottom|top/g, function (matched) {
|
|
return hash[matched];
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Given the popper offsets, generate an output similar to getBoundingClientRect
|
|
* @function
|
|
* @ignore
|
|
* @argument {Object} popperOffsets
|
|
* @returns {Object} ClientRect like output
|
|
*/
|
|
function getPopperClientRect(popperOffsets) {
|
|
var offsets = Object.assign({}, popperOffsets);
|
|
offsets.right = offsets.left + offsets.width;
|
|
offsets.bottom = offsets.top + offsets.height;
|
|
return offsets;
|
|
}
|
|
|
|
/**
|
|
* Given an array and the key to find, returns its index
|
|
* @function
|
|
* @ignore
|
|
* @argument {Array} arr
|
|
* @argument keyToFind
|
|
* @returns index or null
|
|
*/
|
|
function getArrayKeyIndex(arr, keyToFind) {
|
|
var i = 0,
|
|
key;
|
|
for (key in arr) {
|
|
if (arr[key] === keyToFind) {
|
|
return i;
|
|
}
|
|
i++;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* Get CSS computed property of the given element
|
|
* @function
|
|
* @ignore
|
|
* @argument {Eement} element
|
|
* @argument {String} property
|
|
*/
|
|
function getStyleComputedProperty(element, property) {
|
|
// NOTE: 1 DOM access here
|
|
var css = root.getComputedStyle(element, null);
|
|
return css[property];
|
|
}
|
|
|
|
/**
|
|
* Returns the offset parent of the given element
|
|
* @function
|
|
* @ignore
|
|
* @argument {Element} element
|
|
* @returns {Element} offset parent
|
|
*/
|
|
function getOffsetParent(element) {
|
|
// NOTE: 1 DOM access here
|
|
var offsetParent = element.offsetParent;
|
|
return offsetParent === root.document.body || !offsetParent ? root.document.documentElement : offsetParent;
|
|
}
|
|
|
|
/**
|
|
* Returns the scrolling parent of the given element
|
|
* @function
|
|
* @ignore
|
|
* @argument {Element} element
|
|
* @returns {Element} offset parent
|
|
*/
|
|
function getScrollParent(element) {
|
|
var parent = element.parentNode;
|
|
|
|
if (!parent) {
|
|
return element;
|
|
}
|
|
|
|
if (parent === root.document) {
|
|
// Firefox puts the scrollTOp value on `documentElement` instead of `body`, we then check which of them is
|
|
// greater than 0 and return the proper element
|
|
if (root.document.body.scrollTop || root.document.body.scrollLeft) {
|
|
return root.document.body;
|
|
} else {
|
|
return root.document.documentElement;
|
|
}
|
|
}
|
|
|
|
// Firefox want us to check `-x` and `-y` variations as well
|
|
if (['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-x')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-y')) !== -1) {
|
|
// If the detected scrollParent is body, we perform an additional check on its parentNode
|
|
// in this way we'll get body if the browser is Chrome-ish, or documentElement otherwise
|
|
// fixes issue #65
|
|
return parent;
|
|
}
|
|
return getScrollParent(element.parentNode);
|
|
}
|
|
|
|
/**
|
|
* Check if the given element is fixed or is inside a fixed parent
|
|
* @function
|
|
* @ignore
|
|
* @argument {Element} element
|
|
* @argument {Element} customContainer
|
|
* @returns {Boolean} answer to "isFixed?"
|
|
*/
|
|
function isFixed(element) {
|
|
if (element === root.document.body) {
|
|
return false;
|
|
}
|
|
if (getStyleComputedProperty(element, 'position') === 'fixed') {
|
|
return true;
|
|
}
|
|
return element.parentNode ? isFixed(element.parentNode) : element;
|
|
}
|
|
|
|
/**
|
|
* Set the style to the given popper
|
|
* @function
|
|
* @ignore
|
|
* @argument {Element} element - Element to apply the style to
|
|
* @argument {Object} styles - Object with a list of properties and values which will be applied to the element
|
|
*/
|
|
function setStyle(element, styles) {
|
|
function is_numeric(n) {
|
|
return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
|
|
}
|
|
Object.keys(styles).forEach(function (prop) {
|
|
var unit = '';
|
|
// add unit if the value is numeric and is one of the following
|
|
if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && is_numeric(styles[prop])) {
|
|
unit = 'px';
|
|
}
|
|
element.style[prop] = styles[prop] + unit;
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Check if the given variable is a function
|
|
* @function
|
|
* @ignore
|
|
* @argument {*} functionToCheck - variable to check
|
|
* @returns {Boolean} answer to: is a function?
|
|
*/
|
|
function isFunction(functionToCheck) {
|
|
var getType = {};
|
|
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
|
|
}
|
|
|
|
/**
|
|
* Get the position of the given element, relative to its offset parent
|
|
* @function
|
|
* @ignore
|
|
* @param {Element} element
|
|
* @return {Object} position - Coordinates of the element and its `scrollTop`
|
|
*/
|
|
function getOffsetRect(element) {
|
|
var elementRect = {
|
|
width: element.offsetWidth,
|
|
height: element.offsetHeight,
|
|
left: element.offsetLeft,
|
|
top: element.offsetTop
|
|
};
|
|
|
|
elementRect.right = elementRect.left + elementRect.width;
|
|
elementRect.bottom = elementRect.top + elementRect.height;
|
|
|
|
// position
|
|
return elementRect;
|
|
}
|
|
|
|
/**
|
|
* Get bounding client rect of given element
|
|
* @function
|
|
* @ignore
|
|
* @param {HTMLElement} element
|
|
* @return {Object} client rect
|
|
*/
|
|
function getBoundingClientRect(element) {
|
|
var rect = element.getBoundingClientRect();
|
|
|
|
// whether the IE version is lower than 11
|
|
var isIE = navigator.userAgent.indexOf("MSIE") != -1;
|
|
|
|
// fix ie document bounding top always 0 bug
|
|
var rectTop = isIE && element.tagName === 'HTML' ? -element.scrollTop : rect.top;
|
|
|
|
return {
|
|
left: rect.left,
|
|
top: rectTop,
|
|
right: rect.right,
|
|
bottom: rect.bottom,
|
|
width: rect.right - rect.left,
|
|
height: rect.bottom - rectTop
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Given an element and one of its parents, return the offset
|
|
* @function
|
|
* @ignore
|
|
* @param {HTMLElement} element
|
|
* @param {HTMLElement} parent
|
|
* @return {Object} rect
|
|
*/
|
|
function getOffsetRectRelativeToCustomParent(element, parent, fixed) {
|
|
var elementRect = getBoundingClientRect(element);
|
|
var parentRect = getBoundingClientRect(parent);
|
|
|
|
if (fixed) {
|
|
var scrollParent = getScrollParent(parent);
|
|
parentRect.top += scrollParent.scrollTop;
|
|
parentRect.bottom += scrollParent.scrollTop;
|
|
parentRect.left += scrollParent.scrollLeft;
|
|
parentRect.right += scrollParent.scrollLeft;
|
|
}
|
|
|
|
var rect = {
|
|
top: elementRect.top - parentRect.top,
|
|
left: elementRect.left - parentRect.left,
|
|
bottom: elementRect.top - parentRect.top + elementRect.height,
|
|
right: elementRect.left - parentRect.left + elementRect.width,
|
|
width: elementRect.width,
|
|
height: elementRect.height
|
|
};
|
|
return rect;
|
|
}
|
|
|
|
/**
|
|
* Get the prefixed supported property name
|
|
* @function
|
|
* @ignore
|
|
* @argument {String} property (camelCase)
|
|
* @returns {String} prefixed property (camelCase)
|
|
*/
|
|
function getSupportedPropertyName(property) {
|
|
var prefixes = ['', 'ms', 'webkit', 'moz', 'o'];
|
|
|
|
for (var i = 0; i < prefixes.length; i++) {
|
|
var toCheck = prefixes[i] ? prefixes[i] + property.charAt(0).toUpperCase() + property.slice(1) : property;
|
|
if (typeof root.document.body.style[toCheck] !== 'undefined') {
|
|
return toCheck;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* The Object.assign() method is used to copy the values of all enumerable own properties from one or more source
|
|
* objects to a target object. It will return the target object.
|
|
* This polyfill doesn't support symbol properties, since ES5 doesn't have symbols anyway
|
|
* Source: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
|
|
* @function
|
|
* @ignore
|
|
*/
|
|
if (!Object.assign) {
|
|
Object.defineProperty(Object, 'assign', {
|
|
enumerable: false,
|
|
configurable: true,
|
|
writable: true,
|
|
value: function value(target) {
|
|
if (target === undefined || target === null) {
|
|
throw new TypeError('Cannot convert first argument to object');
|
|
}
|
|
|
|
var to = Object(target);
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
var nextSource = arguments[i];
|
|
if (nextSource === undefined || nextSource === null) {
|
|
continue;
|
|
}
|
|
nextSource = Object(nextSource);
|
|
|
|
var keysArray = Object.keys(nextSource);
|
|
for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
|
|
var nextKey = keysArray[nextIndex];
|
|
var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
|
|
if (desc !== undefined && desc.enumerable) {
|
|
to[nextKey] = nextSource[nextKey];
|
|
}
|
|
}
|
|
}
|
|
return to;
|
|
}
|
|
});
|
|
}
|
|
|
|
return Popper;
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "62e4":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function(module) {
|
|
if (!module.webpackPolyfill) {
|
|
module.deprecate = function() {};
|
|
module.paths = [];
|
|
// module.parent = undefined by default
|
|
if (!module.children) module.children = [];
|
|
Object.defineProperty(module, "loaded", {
|
|
enumerable: true,
|
|
get: function() {
|
|
return module.l;
|
|
}
|
|
});
|
|
Object.defineProperty(module, "id", {
|
|
enumerable: true,
|
|
get: function() {
|
|
return module.i;
|
|
}
|
|
});
|
|
module.webpackPolyfill = 1;
|
|
}
|
|
return module;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "6438":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
|
|
var $keys = __webpack_require__("03d6");
|
|
var hiddenKeys = __webpack_require__("9742").concat('length', 'prototype');
|
|
|
|
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
return $keys(O, hiddenKeys);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "6547":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var toInteger = __webpack_require__("a691");
|
|
var requireObjectCoercible = __webpack_require__("1d80");
|
|
|
|
// `String.prototype.{ codePointAt, at }` methods implementation
|
|
var createMethod = function (CONVERT_TO_STRING) {
|
|
return function ($this, pos) {
|
|
var S = String(requireObjectCoercible($this));
|
|
var position = toInteger(pos);
|
|
var size = S.length;
|
|
var first, second;
|
|
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
|
first = S.charCodeAt(position);
|
|
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
|
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
|
|
? CONVERT_TO_STRING ? S.charAt(position) : first
|
|
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
};
|
|
};
|
|
|
|
module.exports = {
|
|
// `String.prototype.codePointAt` method
|
|
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
|
|
codeAt: createMethod(false),
|
|
// `String.prototype.at` method
|
|
// https://github.com/mathiasbynens/String.prototype.at
|
|
charAt: createMethod(true)
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "658f":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__("6858");
|
|
var global = __webpack_require__("ef08");
|
|
var hide = __webpack_require__("051b");
|
|
var Iterators = __webpack_require__("8a0d");
|
|
var TO_STRING_TAG = __webpack_require__("cc15")('toStringTag');
|
|
|
|
var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
|
|
'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
|
|
'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
|
|
'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
|
|
'TextTrackList,TouchList').split(',');
|
|
|
|
for (var i = 0; i < DOMIterables.length; i++) {
|
|
var NAME = DOMIterables[i];
|
|
var Collection = global[NAME];
|
|
var proto = Collection && Collection.prototype;
|
|
if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
|
|
Iterators[NAME] = Iterators.Array;
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "65f0":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isObject = __webpack_require__("861d");
|
|
var isArray = __webpack_require__("e8b5");
|
|
var wellKnownSymbol = __webpack_require__("b622");
|
|
|
|
var SPECIES = wellKnownSymbol('species');
|
|
|
|
// `ArraySpeciesCreate` abstract operation
|
|
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
module.exports = function (originalArray, length) {
|
|
var C;
|
|
if (isArray(originalArray)) {
|
|
C = originalArray.constructor;
|
|
// cross-realm fallback
|
|
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
|
|
else if (isObject(C)) {
|
|
C = C[SPECIES];
|
|
if (C === null) C = undefined;
|
|
}
|
|
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "6747":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Checks if `value` is classified as an `Array` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
* @example
|
|
*
|
|
* _.isArray([1, 2, 3]);
|
|
* // => true
|
|
*
|
|
* _.isArray(document.body.children);
|
|
* // => false
|
|
*
|
|
* _.isArray('abc');
|
|
* // => false
|
|
*
|
|
* _.isArray(_.noop);
|
|
* // => false
|
|
*/
|
|
var isArray = Array.isArray;
|
|
|
|
module.exports = isArray;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "67ca":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var assocIndexOf = __webpack_require__("cb5a");
|
|
|
|
/**
|
|
* Sets the list cache `key` to `value`.
|
|
*
|
|
* @private
|
|
* @name set
|
|
* @memberOf ListCache
|
|
* @param {string} key The key of the value to set.
|
|
* @param {*} value The value to set.
|
|
* @returns {Object} Returns the list cache instance.
|
|
*/
|
|
function listCacheSet(key, value) {
|
|
var data = this.__data__,
|
|
index = assocIndexOf(data, key);
|
|
|
|
if (index < 0) {
|
|
++this.size;
|
|
data.push([key, value]);
|
|
} else {
|
|
data[index][1] = value;
|
|
}
|
|
return this;
|
|
}
|
|
|
|
module.exports = listCacheSet;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "6858":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var addToUnscopables = __webpack_require__("2f9a");
|
|
var step = __webpack_require__("ea34");
|
|
var Iterators = __webpack_require__("8a0d");
|
|
var toIObject = __webpack_require__("6ca1");
|
|
|
|
// 22.1.3.4 Array.prototype.entries()
|
|
// 22.1.3.13 Array.prototype.keys()
|
|
// 22.1.3.29 Array.prototype.values()
|
|
// 22.1.3.30 Array.prototype[@@iterator]()
|
|
module.exports = __webpack_require__("393a")(Array, 'Array', function (iterated, kind) {
|
|
this._t = toIObject(iterated); // target
|
|
this._i = 0; // next index
|
|
this._k = kind; // kind
|
|
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
|
|
}, function () {
|
|
var O = this._t;
|
|
var kind = this._k;
|
|
var index = this._i++;
|
|
if (!O || index >= O.length) {
|
|
this._t = undefined;
|
|
return step(1);
|
|
}
|
|
if (kind == 'keys') return step(0, index);
|
|
if (kind == 'values') return step(0, O[index]);
|
|
return step(0, [index, O[index]]);
|
|
}, 'values');
|
|
|
|
// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
|
|
Iterators.Arguments = Iterators.Array;
|
|
|
|
addToUnscopables('keys');
|
|
addToUnscopables('values');
|
|
addToUnscopables('entries');
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "693d":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// ECMAScript 6 symbols shim
|
|
var global = __webpack_require__("ef08");
|
|
var has = __webpack_require__("9c0e");
|
|
var DESCRIPTORS = __webpack_require__("0bad");
|
|
var $export = __webpack_require__("512c");
|
|
var redefine = __webpack_require__("ba01");
|
|
var META = __webpack_require__("e34a").KEY;
|
|
var $fails = __webpack_require__("4b8b");
|
|
var shared = __webpack_require__("b367");
|
|
var setToStringTag = __webpack_require__("92f0");
|
|
var uid = __webpack_require__("8b1a");
|
|
var wks = __webpack_require__("cc15");
|
|
var wksExt = __webpack_require__("fcd4");
|
|
var wksDefine = __webpack_require__("e198");
|
|
var enumKeys = __webpack_require__("0ae2");
|
|
var isArray = __webpack_require__("4ebc");
|
|
var anObject = __webpack_require__("77e9");
|
|
var isObject = __webpack_require__("7a41");
|
|
var toObject = __webpack_require__("0983");
|
|
var toIObject = __webpack_require__("6ca1");
|
|
var toPrimitive = __webpack_require__("3397");
|
|
var createDesc = __webpack_require__("10db");
|
|
var _create = __webpack_require__("6f4f");
|
|
var gOPNExt = __webpack_require__("1836");
|
|
var $GOPD = __webpack_require__("4d20");
|
|
var $GOPS = __webpack_require__("fed5");
|
|
var $DP = __webpack_require__("1a14");
|
|
var $keys = __webpack_require__("9876");
|
|
var gOPD = $GOPD.f;
|
|
var dP = $DP.f;
|
|
var gOPN = gOPNExt.f;
|
|
var $Symbol = global.Symbol;
|
|
var $JSON = global.JSON;
|
|
var _stringify = $JSON && $JSON.stringify;
|
|
var PROTOTYPE = 'prototype';
|
|
var HIDDEN = wks('_hidden');
|
|
var TO_PRIMITIVE = wks('toPrimitive');
|
|
var isEnum = {}.propertyIsEnumerable;
|
|
var SymbolRegistry = shared('symbol-registry');
|
|
var AllSymbols = shared('symbols');
|
|
var OPSymbols = shared('op-symbols');
|
|
var ObjectProto = Object[PROTOTYPE];
|
|
var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;
|
|
var QObject = global.QObject;
|
|
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
|
|
var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
|
|
|
|
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
|
|
var setSymbolDesc = DESCRIPTORS && $fails(function () {
|
|
return _create(dP({}, 'a', {
|
|
get: function () { return dP(this, 'a', { value: 7 }).a; }
|
|
})).a != 7;
|
|
}) ? function (it, key, D) {
|
|
var protoDesc = gOPD(ObjectProto, key);
|
|
if (protoDesc) delete ObjectProto[key];
|
|
dP(it, key, D);
|
|
if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
|
|
} : dP;
|
|
|
|
var wrap = function (tag) {
|
|
var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
|
|
sym._k = tag;
|
|
return sym;
|
|
};
|
|
|
|
var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
|
|
return typeof it == 'symbol';
|
|
} : function (it) {
|
|
return it instanceof $Symbol;
|
|
};
|
|
|
|
var $defineProperty = function defineProperty(it, key, D) {
|
|
if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
|
|
anObject(it);
|
|
key = toPrimitive(key, true);
|
|
anObject(D);
|
|
if (has(AllSymbols, key)) {
|
|
if (!D.enumerable) {
|
|
if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
|
|
it[HIDDEN][key] = true;
|
|
} else {
|
|
if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
|
|
D = _create(D, { enumerable: createDesc(0, false) });
|
|
} return setSymbolDesc(it, key, D);
|
|
} return dP(it, key, D);
|
|
};
|
|
var $defineProperties = function defineProperties(it, P) {
|
|
anObject(it);
|
|
var keys = enumKeys(P = toIObject(P));
|
|
var i = 0;
|
|
var l = keys.length;
|
|
var key;
|
|
while (l > i) $defineProperty(it, key = keys[i++], P[key]);
|
|
return it;
|
|
};
|
|
var $create = function create(it, P) {
|
|
return P === undefined ? _create(it) : $defineProperties(_create(it), P);
|
|
};
|
|
var $propertyIsEnumerable = function propertyIsEnumerable(key) {
|
|
var E = isEnum.call(this, key = toPrimitive(key, true));
|
|
if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
|
|
return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
|
|
};
|
|
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
|
|
it = toIObject(it);
|
|
key = toPrimitive(key, true);
|
|
if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
|
|
var D = gOPD(it, key);
|
|
if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
|
|
return D;
|
|
};
|
|
var $getOwnPropertyNames = function getOwnPropertyNames(it) {
|
|
var names = gOPN(toIObject(it));
|
|
var result = [];
|
|
var i = 0;
|
|
var key;
|
|
while (names.length > i) {
|
|
if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
|
|
} return result;
|
|
};
|
|
var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
|
|
var IS_OP = it === ObjectProto;
|
|
var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
|
|
var result = [];
|
|
var i = 0;
|
|
var key;
|
|
while (names.length > i) {
|
|
if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
|
|
} return result;
|
|
};
|
|
|
|
// 19.4.1.1 Symbol([description])
|
|
if (!USE_NATIVE) {
|
|
$Symbol = function Symbol() {
|
|
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
|
|
var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
|
|
var $set = function (value) {
|
|
if (this === ObjectProto) $set.call(OPSymbols, value);
|
|
if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
|
|
setSymbolDesc(this, tag, createDesc(1, value));
|
|
};
|
|
if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
|
|
return wrap(tag);
|
|
};
|
|
redefine($Symbol[PROTOTYPE], 'toString', function toString() {
|
|
return this._k;
|
|
});
|
|
|
|
$GOPD.f = $getOwnPropertyDescriptor;
|
|
$DP.f = $defineProperty;
|
|
__webpack_require__("6438").f = gOPNExt.f = $getOwnPropertyNames;
|
|
__webpack_require__("1917").f = $propertyIsEnumerable;
|
|
$GOPS.f = $getOwnPropertySymbols;
|
|
|
|
if (DESCRIPTORS && !__webpack_require__("e444")) {
|
|
redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
|
|
}
|
|
|
|
wksExt.f = function (name) {
|
|
return wrap(wks(name));
|
|
};
|
|
}
|
|
|
|
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
|
|
|
|
for (var es6Symbols = (
|
|
// 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
|
|
'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
|
|
).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
|
|
|
|
for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
|
|
|
|
$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
|
|
// 19.4.2.1 Symbol.for(key)
|
|
'for': function (key) {
|
|
return has(SymbolRegistry, key += '')
|
|
? SymbolRegistry[key]
|
|
: SymbolRegistry[key] = $Symbol(key);
|
|
},
|
|
// 19.4.2.5 Symbol.keyFor(sym)
|
|
keyFor: function keyFor(sym) {
|
|
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
|
|
for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
|
|
},
|
|
useSetter: function () { setter = true; },
|
|
useSimple: function () { setter = false; }
|
|
});
|
|
|
|
$export($export.S + $export.F * !USE_NATIVE, 'Object', {
|
|
// 19.1.2.2 Object.create(O [, Properties])
|
|
create: $create,
|
|
// 19.1.2.4 Object.defineProperty(O, P, Attributes)
|
|
defineProperty: $defineProperty,
|
|
// 19.1.2.3 Object.defineProperties(O, Properties)
|
|
defineProperties: $defineProperties,
|
|
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
|
|
getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
|
|
// 19.1.2.7 Object.getOwnPropertyNames(O)
|
|
getOwnPropertyNames: $getOwnPropertyNames,
|
|
// 19.1.2.8 Object.getOwnPropertySymbols(O)
|
|
getOwnPropertySymbols: $getOwnPropertySymbols
|
|
});
|
|
|
|
// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
|
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3443
|
|
var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });
|
|
|
|
$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {
|
|
getOwnPropertySymbols: function getOwnPropertySymbols(it) {
|
|
return $GOPS.f(toObject(it));
|
|
}
|
|
});
|
|
|
|
// 24.3.2 JSON.stringify(value [, replacer [, space]])
|
|
$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
|
|
var S = $Symbol();
|
|
// MS Edge converts symbol values to JSON as {}
|
|
// WebKit converts symbol values to JSON as null
|
|
// V8 throws on boxed symbols
|
|
return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
|
|
})), 'JSON', {
|
|
stringify: function stringify(it) {
|
|
var args = [it];
|
|
var i = 1;
|
|
var replacer, $replacer;
|
|
while (arguments.length > i) args.push(arguments[i++]);
|
|
$replacer = replacer = args[1];
|
|
if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
|
|
if (!isArray(replacer)) replacer = function (key, value) {
|
|
if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
|
|
if (!isSymbol(value)) return value;
|
|
};
|
|
args[1] = replacer;
|
|
return _stringify.apply($JSON, args);
|
|
}
|
|
});
|
|
|
|
// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
|
|
$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__("051b")($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
|
|
// 19.4.3.5 Symbol.prototype[@@toStringTag]
|
|
setToStringTag($Symbol, 'Symbol');
|
|
// 20.2.1.9 Math[@@toStringTag]
|
|
setToStringTag(Math, 'Math', true);
|
|
// 24.3.3 JSON[@@toStringTag]
|
|
setToStringTag(global.JSON, 'JSON', true);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "69d5":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var assocIndexOf = __webpack_require__("cb5a");
|
|
|
|
/** Used for built-in method references. */
|
|
var arrayProto = Array.prototype;
|
|
|
|
/** Built-in value references. */
|
|
var splice = arrayProto.splice;
|
|
|
|
/**
|
|
* Removes `key` and its value from the list cache.
|
|
*
|
|
* @private
|
|
* @name delete
|
|
* @memberOf ListCache
|
|
* @param {string} key The key of the value to remove.
|
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
*/
|
|
function listCacheDelete(key) {
|
|
var data = this.__data__,
|
|
index = assocIndexOf(data, key);
|
|
|
|
if (index < 0) {
|
|
return false;
|
|
}
|
|
var lastIndex = data.length - 1;
|
|
if (index == lastIndex) {
|
|
data.pop();
|
|
} else {
|
|
splice.call(data, index, 1);
|
|
}
|
|
--this.size;
|
|
return true;
|
|
}
|
|
|
|
module.exports = listCacheDelete;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "69f3":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var NATIVE_WEAK_MAP = __webpack_require__("7f9a");
|
|
var global = __webpack_require__("da84");
|
|
var isObject = __webpack_require__("861d");
|
|
var createNonEnumerableProperty = __webpack_require__("9112");
|
|
var objectHas = __webpack_require__("5135");
|
|
var sharedKey = __webpack_require__("f772");
|
|
var hiddenKeys = __webpack_require__("d012");
|
|
|
|
var WeakMap = global.WeakMap;
|
|
var set, get, has;
|
|
|
|
var enforce = function (it) {
|
|
return has(it) ? get(it) : set(it, {});
|
|
};
|
|
|
|
var getterFor = function (TYPE) {
|
|
return function (it) {
|
|
var state;
|
|
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
} return state;
|
|
};
|
|
};
|
|
|
|
if (NATIVE_WEAK_MAP) {
|
|
var store = new WeakMap();
|
|
var wmget = store.get;
|
|
var wmhas = store.has;
|
|
var wmset = store.set;
|
|
set = function (it, metadata) {
|
|
wmset.call(store, it, metadata);
|
|
return metadata;
|
|
};
|
|
get = function (it) {
|
|
return wmget.call(store, it) || {};
|
|
};
|
|
has = function (it) {
|
|
return wmhas.call(store, it);
|
|
};
|
|
} else {
|
|
var STATE = sharedKey('state');
|
|
hiddenKeys[STATE] = true;
|
|
set = function (it, metadata) {
|
|
createNonEnumerableProperty(it, STATE, metadata);
|
|
return metadata;
|
|
};
|
|
get = function (it) {
|
|
return objectHas(it, STATE) ? it[STATE] : {};
|
|
};
|
|
has = function (it) {
|
|
return objectHas(it, STATE);
|
|
};
|
|
}
|
|
|
|
module.exports = {
|
|
set: set,
|
|
get: get,
|
|
has: has,
|
|
enforce: enforce,
|
|
getterFor: getterFor
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "6ac5":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 79);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 0:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
|
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
function normalizeComponent (
|
|
scriptExports,
|
|
render,
|
|
staticRenderFns,
|
|
functionalTemplate,
|
|
injectStyles,
|
|
scopeId,
|
|
moduleIdentifier, /* server only */
|
|
shadowMode /* vue-cli only */
|
|
) {
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (render) {
|
|
options.render = render
|
|
options.staticRenderFns = staticRenderFns
|
|
options._compiled = true
|
|
}
|
|
|
|
// functional template
|
|
if (functionalTemplate) {
|
|
options.functional = true
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = 'data-v-' + scopeId
|
|
}
|
|
|
|
var hook
|
|
if (moduleIdentifier) { // server build
|
|
hook = function (context) {
|
|
// 2.3 injection
|
|
context =
|
|
context || // cached call
|
|
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
// 2.2 with runInNewContext: true
|
|
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
context = __VUE_SSR_CONTEXT__
|
|
}
|
|
// inject component styles
|
|
if (injectStyles) {
|
|
injectStyles.call(this, context)
|
|
}
|
|
// register component module identifier for async chunk inferrence
|
|
if (context && context._registeredComponents) {
|
|
context._registeredComponents.add(moduleIdentifier)
|
|
}
|
|
}
|
|
// used by ssr in case component is cached and beforeCreate
|
|
// never gets called
|
|
options._ssrRegister = hook
|
|
} else if (injectStyles) {
|
|
hook = shadowMode
|
|
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
|
: injectStyles
|
|
}
|
|
|
|
if (hook) {
|
|
if (options.functional) {
|
|
// for template-only hot-reload because in that case the render fn doesn't
|
|
// go through the normalizer
|
|
options._injectStyles = hook
|
|
// register for functioal component in vue file
|
|
var originalRender = options.render
|
|
options.render = function renderWithStyleInjection (h, context) {
|
|
hook.call(context)
|
|
return originalRender(h, context)
|
|
}
|
|
} else {
|
|
// inject component registration as beforeCreate hook
|
|
var existing = options.beforeCreate
|
|
options.beforeCreate = existing
|
|
? [].concat(existing, hook)
|
|
: [hook]
|
|
}
|
|
}
|
|
|
|
return {
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 4:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("d010");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 79:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio-group.vue?vue&type=template&id=818a704c&
|
|
var render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
_vm._elTag,
|
|
{
|
|
tag: "component",
|
|
staticClass: "el-radio-group",
|
|
attrs: { role: "radiogroup" },
|
|
on: { keydown: _vm.handleKeydown }
|
|
},
|
|
[_vm._t("default")],
|
|
2
|
|
)
|
|
}
|
|
var staticRenderFns = []
|
|
render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/radio/src/radio-group.vue?vue&type=template&id=818a704c&
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
|
|
var emitter_ = __webpack_require__(4);
|
|
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio-group.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
var keyCode = Object.freeze({
|
|
LEFT: 37,
|
|
UP: 38,
|
|
RIGHT: 39,
|
|
DOWN: 40
|
|
});
|
|
/* harmony default export */ var radio_groupvue_type_script_lang_js_ = ({
|
|
name: 'ElRadioGroup',
|
|
|
|
componentName: 'ElRadioGroup',
|
|
|
|
inject: {
|
|
elFormItem: {
|
|
default: ''
|
|
}
|
|
},
|
|
|
|
mixins: [emitter_default.a],
|
|
|
|
props: {
|
|
value: {},
|
|
size: String,
|
|
fill: String,
|
|
textColor: String,
|
|
disabled: Boolean
|
|
},
|
|
|
|
computed: {
|
|
_elFormItemSize: function _elFormItemSize() {
|
|
return (this.elFormItem || {}).elFormItemSize;
|
|
},
|
|
_elTag: function _elTag() {
|
|
return (this.$vnode.data || {}).tag || 'div';
|
|
},
|
|
radioGroupSize: function radioGroupSize() {
|
|
return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
|
|
}
|
|
},
|
|
|
|
created: function created() {
|
|
var _this = this;
|
|
|
|
this.$on('handleChange', function (value) {
|
|
_this.$emit('change', value);
|
|
});
|
|
},
|
|
mounted: function mounted() {
|
|
// 当radioGroup没有默认选项时,第一个可以选中Tab导航
|
|
var radios = this.$el.querySelectorAll('[type=radio]');
|
|
var firstLabel = this.$el.querySelectorAll('[role=radio]')[0];
|
|
if (![].some.call(radios, function (radio) {
|
|
return radio.checked;
|
|
}) && firstLabel) {
|
|
firstLabel.tabIndex = 0;
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
handleKeydown: function handleKeydown(e) {
|
|
// 左右上下按键 可以在radio组内切换不同选项
|
|
var target = e.target;
|
|
var className = target.nodeName === 'INPUT' ? '[type=radio]' : '[role=radio]';
|
|
var radios = this.$el.querySelectorAll(className);
|
|
var length = radios.length;
|
|
var index = [].indexOf.call(radios, target);
|
|
var roleRadios = this.$el.querySelectorAll('[role=radio]');
|
|
switch (e.keyCode) {
|
|
case keyCode.LEFT:
|
|
case keyCode.UP:
|
|
e.stopPropagation();
|
|
e.preventDefault();
|
|
if (index === 0) {
|
|
roleRadios[length - 1].click();
|
|
roleRadios[length - 1].focus();
|
|
} else {
|
|
roleRadios[index - 1].click();
|
|
roleRadios[index - 1].focus();
|
|
}
|
|
break;
|
|
case keyCode.RIGHT:
|
|
case keyCode.DOWN:
|
|
if (index === length - 1) {
|
|
e.stopPropagation();
|
|
e.preventDefault();
|
|
roleRadios[0].click();
|
|
roleRadios[0].focus();
|
|
} else {
|
|
roleRadios[index + 1].click();
|
|
roleRadios[index + 1].focus();
|
|
}
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
},
|
|
watch: {
|
|
value: function value(_value) {
|
|
this.dispatch('ElFormItem', 'el.form.change', [this.value]);
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/radio/src/radio-group.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_radio_groupvue_type_script_lang_js_ = (radio_groupvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
var componentNormalizer = __webpack_require__(0);
|
|
|
|
// CONCATENATED MODULE: ./packages/radio/src/radio-group.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
src_radio_groupvue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var api; }
|
|
component.options.__file = "packages/radio/src/radio-group.vue"
|
|
/* harmony default export */ var radio_group = (component.exports);
|
|
// CONCATENATED MODULE: ./packages/radio-group/index.js
|
|
|
|
|
|
/* istanbul ignore next */
|
|
radio_group.install = function (Vue) {
|
|
Vue.component(radio_group.name, radio_group);
|
|
};
|
|
|
|
/* harmony default export */ var packages_radio_group = __webpack_exports__["default"] = (radio_group);
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "6ac9":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 74);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 0:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
|
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
function normalizeComponent (
|
|
scriptExports,
|
|
render,
|
|
staticRenderFns,
|
|
functionalTemplate,
|
|
injectStyles,
|
|
scopeId,
|
|
moduleIdentifier, /* server only */
|
|
shadowMode /* vue-cli only */
|
|
) {
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (render) {
|
|
options.render = render
|
|
options.staticRenderFns = staticRenderFns
|
|
options._compiled = true
|
|
}
|
|
|
|
// functional template
|
|
if (functionalTemplate) {
|
|
options.functional = true
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = 'data-v-' + scopeId
|
|
}
|
|
|
|
var hook
|
|
if (moduleIdentifier) { // server build
|
|
hook = function (context) {
|
|
// 2.3 injection
|
|
context =
|
|
context || // cached call
|
|
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
// 2.2 with runInNewContext: true
|
|
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
context = __VUE_SSR_CONTEXT__
|
|
}
|
|
// inject component styles
|
|
if (injectStyles) {
|
|
injectStyles.call(this, context)
|
|
}
|
|
// register component module identifier for async chunk inferrence
|
|
if (context && context._registeredComponents) {
|
|
context._registeredComponents.add(moduleIdentifier)
|
|
}
|
|
}
|
|
// used by ssr in case component is cached and beforeCreate
|
|
// never gets called
|
|
options._ssrRegister = hook
|
|
} else if (injectStyles) {
|
|
hook = shadowMode
|
|
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
|
: injectStyles
|
|
}
|
|
|
|
if (hook) {
|
|
if (options.functional) {
|
|
// for template-only hot-reload because in that case the render fn doesn't
|
|
// go through the normalizer
|
|
options._injectStyles = hook
|
|
// register for functioal component in vue file
|
|
var originalRender = options.render
|
|
options.render = function renderWithStyleInjection (h, context) {
|
|
hook.call(context)
|
|
return originalRender(h, context)
|
|
}
|
|
} else {
|
|
// inject component registration as beforeCreate hook
|
|
var existing = options.beforeCreate
|
|
options.beforeCreate = existing
|
|
? [].concat(existing, hook)
|
|
: [hook]
|
|
}
|
|
}
|
|
|
|
return {
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 2:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("5924");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 3:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("8122");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 5:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("e974");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 7:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("8bbf");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 74:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/popover/src/main.vue?vue&type=template&id=52060272&
|
|
var render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"span",
|
|
[
|
|
_c(
|
|
"transition",
|
|
{
|
|
attrs: { name: _vm.transition },
|
|
on: {
|
|
"after-enter": _vm.handleAfterEnter,
|
|
"after-leave": _vm.handleAfterLeave
|
|
}
|
|
},
|
|
[
|
|
_c(
|
|
"div",
|
|
{
|
|
directives: [
|
|
{
|
|
name: "show",
|
|
rawName: "v-show",
|
|
value: !_vm.disabled && _vm.showPopper,
|
|
expression: "!disabled && showPopper"
|
|
}
|
|
],
|
|
ref: "popper",
|
|
staticClass: "el-popover el-popper",
|
|
class: [_vm.popperClass, _vm.content && "el-popover--plain"],
|
|
style: { width: _vm.width + "px" },
|
|
attrs: {
|
|
role: "tooltip",
|
|
id: _vm.tooltipId,
|
|
"aria-hidden":
|
|
_vm.disabled || !_vm.showPopper ? "true" : "false"
|
|
}
|
|
},
|
|
[
|
|
_vm.title
|
|
? _c("div", {
|
|
staticClass: "el-popover__title",
|
|
domProps: { textContent: _vm._s(_vm.title) }
|
|
})
|
|
: _vm._e(),
|
|
_vm._t("default", [_vm._v(_vm._s(_vm.content))])
|
|
],
|
|
2
|
|
)
|
|
]
|
|
),
|
|
_vm._t("reference")
|
|
],
|
|
2
|
|
)
|
|
}
|
|
var staticRenderFns = []
|
|
render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/popover/src/main.vue?vue&type=template&id=52060272&
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/vue-popper"
|
|
var vue_popper_ = __webpack_require__(5);
|
|
var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/dom"
|
|
var dom_ = __webpack_require__(2);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/util"
|
|
var util_ = __webpack_require__(3);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/popover/src/main.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var mainvue_type_script_lang_js_ = ({
|
|
name: 'ElPopover',
|
|
|
|
mixins: [vue_popper_default.a],
|
|
|
|
props: {
|
|
trigger: {
|
|
type: String,
|
|
default: 'click',
|
|
validator: function validator(value) {
|
|
return ['click', 'focus', 'hover', 'manual'].indexOf(value) > -1;
|
|
}
|
|
},
|
|
openDelay: {
|
|
type: Number,
|
|
default: 0
|
|
},
|
|
closeDelay: {
|
|
type: Number,
|
|
default: 200
|
|
},
|
|
title: String,
|
|
disabled: Boolean,
|
|
content: String,
|
|
reference: {},
|
|
popperClass: String,
|
|
width: {},
|
|
visibleArrow: {
|
|
default: true
|
|
},
|
|
arrowOffset: {
|
|
type: Number,
|
|
default: 0
|
|
},
|
|
transition: {
|
|
type: String,
|
|
default: 'fade-in-linear'
|
|
},
|
|
tabindex: {
|
|
type: Number,
|
|
default: 0
|
|
}
|
|
},
|
|
|
|
computed: {
|
|
tooltipId: function tooltipId() {
|
|
return 'el-popover-' + Object(util_["generateId"])();
|
|
}
|
|
},
|
|
watch: {
|
|
showPopper: function showPopper(val) {
|
|
if (this.disabled) {
|
|
return;
|
|
}
|
|
val ? this.$emit('show') : this.$emit('hide');
|
|
}
|
|
},
|
|
|
|
mounted: function mounted() {
|
|
var _this = this;
|
|
|
|
var reference = this.referenceElm = this.reference || this.$refs.reference;
|
|
var popper = this.popper || this.$refs.popper;
|
|
|
|
if (!reference && this.$slots.reference && this.$slots.reference[0]) {
|
|
reference = this.referenceElm = this.$slots.reference[0].elm;
|
|
}
|
|
// 可访问性
|
|
if (reference) {
|
|
Object(dom_["addClass"])(reference, 'el-popover__reference');
|
|
reference.setAttribute('aria-describedby', this.tooltipId);
|
|
reference.setAttribute('tabindex', this.tabindex); // tab序列
|
|
popper.setAttribute('tabindex', 0);
|
|
|
|
if (this.trigger !== 'click') {
|
|
Object(dom_["on"])(reference, 'focusin', function () {
|
|
_this.handleFocus();
|
|
var instance = reference.__vue__;
|
|
if (instance && typeof instance.focus === 'function') {
|
|
instance.focus();
|
|
}
|
|
});
|
|
Object(dom_["on"])(popper, 'focusin', this.handleFocus);
|
|
Object(dom_["on"])(reference, 'focusout', this.handleBlur);
|
|
Object(dom_["on"])(popper, 'focusout', this.handleBlur);
|
|
}
|
|
Object(dom_["on"])(reference, 'keydown', this.handleKeydown);
|
|
Object(dom_["on"])(reference, 'click', this.handleClick);
|
|
}
|
|
if (this.trigger === 'click') {
|
|
Object(dom_["on"])(reference, 'click', this.doToggle);
|
|
Object(dom_["on"])(document, 'click', this.handleDocumentClick);
|
|
} else if (this.trigger === 'hover') {
|
|
Object(dom_["on"])(reference, 'mouseenter', this.handleMouseEnter);
|
|
Object(dom_["on"])(popper, 'mouseenter', this.handleMouseEnter);
|
|
Object(dom_["on"])(reference, 'mouseleave', this.handleMouseLeave);
|
|
Object(dom_["on"])(popper, 'mouseleave', this.handleMouseLeave);
|
|
} else if (this.trigger === 'focus') {
|
|
if (this.tabindex < 0) {
|
|
console.warn('[Element Warn][Popover]a negative taindex means that the element cannot be focused by tab key');
|
|
}
|
|
if (reference.querySelector('input, textarea')) {
|
|
Object(dom_["on"])(reference, 'focusin', this.doShow);
|
|
Object(dom_["on"])(reference, 'focusout', this.doClose);
|
|
} else {
|
|
Object(dom_["on"])(reference, 'mousedown', this.doShow);
|
|
Object(dom_["on"])(reference, 'mouseup', this.doClose);
|
|
}
|
|
}
|
|
},
|
|
beforeDestroy: function beforeDestroy() {
|
|
this.cleanup();
|
|
},
|
|
deactivated: function deactivated() {
|
|
this.cleanup();
|
|
},
|
|
|
|
|
|
methods: {
|
|
doToggle: function doToggle() {
|
|
this.showPopper = !this.showPopper;
|
|
},
|
|
doShow: function doShow() {
|
|
this.showPopper = true;
|
|
},
|
|
doClose: function doClose() {
|
|
this.showPopper = false;
|
|
},
|
|
handleFocus: function handleFocus() {
|
|
Object(dom_["addClass"])(this.referenceElm, 'focusing');
|
|
if (this.trigger === 'click' || this.trigger === 'focus') this.showPopper = true;
|
|
},
|
|
handleClick: function handleClick() {
|
|
Object(dom_["removeClass"])(this.referenceElm, 'focusing');
|
|
},
|
|
handleBlur: function handleBlur() {
|
|
Object(dom_["removeClass"])(this.referenceElm, 'focusing');
|
|
if (this.trigger === 'click' || this.trigger === 'focus') this.showPopper = false;
|
|
},
|
|
handleMouseEnter: function handleMouseEnter() {
|
|
var _this2 = this;
|
|
|
|
clearTimeout(this._timer);
|
|
if (this.openDelay) {
|
|
this._timer = setTimeout(function () {
|
|
_this2.showPopper = true;
|
|
}, this.openDelay);
|
|
} else {
|
|
this.showPopper = true;
|
|
}
|
|
},
|
|
handleKeydown: function handleKeydown(ev) {
|
|
if (ev.keyCode === 27 && this.trigger !== 'manual') {
|
|
// esc
|
|
this.doClose();
|
|
}
|
|
},
|
|
handleMouseLeave: function handleMouseLeave() {
|
|
var _this3 = this;
|
|
|
|
clearTimeout(this._timer);
|
|
if (this.closeDelay) {
|
|
this._timer = setTimeout(function () {
|
|
_this3.showPopper = false;
|
|
}, this.closeDelay);
|
|
} else {
|
|
this.showPopper = false;
|
|
}
|
|
},
|
|
handleDocumentClick: function handleDocumentClick(e) {
|
|
var reference = this.reference || this.$refs.reference;
|
|
var popper = this.popper || this.$refs.popper;
|
|
|
|
if (!reference && this.$slots.reference && this.$slots.reference[0]) {
|
|
reference = this.referenceElm = this.$slots.reference[0].elm;
|
|
}
|
|
if (!this.$el || !reference || this.$el.contains(e.target) || reference.contains(e.target) || !popper || popper.contains(e.target)) return;
|
|
this.showPopper = false;
|
|
},
|
|
handleAfterEnter: function handleAfterEnter() {
|
|
this.$emit('after-enter');
|
|
},
|
|
handleAfterLeave: function handleAfterLeave() {
|
|
this.$emit('after-leave');
|
|
this.doDestroy();
|
|
},
|
|
cleanup: function cleanup() {
|
|
if (this.openDelay || this.closeDelay) {
|
|
clearTimeout(this._timer);
|
|
}
|
|
}
|
|
},
|
|
|
|
destroyed: function destroyed() {
|
|
var reference = this.reference;
|
|
|
|
Object(dom_["off"])(reference, 'click', this.doToggle);
|
|
Object(dom_["off"])(reference, 'mouseup', this.doClose);
|
|
Object(dom_["off"])(reference, 'mousedown', this.doShow);
|
|
Object(dom_["off"])(reference, 'focusin', this.doShow);
|
|
Object(dom_["off"])(reference, 'focusout', this.doClose);
|
|
Object(dom_["off"])(reference, 'mousedown', this.doShow);
|
|
Object(dom_["off"])(reference, 'mouseup', this.doClose);
|
|
Object(dom_["off"])(reference, 'mouseleave', this.handleMouseLeave);
|
|
Object(dom_["off"])(reference, 'mouseenter', this.handleMouseEnter);
|
|
Object(dom_["off"])(document, 'click', this.handleDocumentClick);
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/popover/src/main.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
var componentNormalizer = __webpack_require__(0);
|
|
|
|
// CONCATENATED MODULE: ./packages/popover/src/main.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
src_mainvue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var api; }
|
|
component.options.__file = "packages/popover/src/main.vue"
|
|
/* harmony default export */ var main = (component.exports);
|
|
// CONCATENATED MODULE: ./packages/popover/src/directive.js
|
|
var getReference = function getReference(el, binding, vnode) {
|
|
var _ref = binding.expression ? binding.value : binding.arg;
|
|
var popper = vnode.context.$refs[_ref];
|
|
if (popper) {
|
|
if (Array.isArray(popper)) {
|
|
popper[0].$refs.reference = el;
|
|
} else {
|
|
popper.$refs.reference = el;
|
|
}
|
|
}
|
|
};
|
|
|
|
/* harmony default export */ var directive = ({
|
|
bind: function bind(el, binding, vnode) {
|
|
getReference(el, binding, vnode);
|
|
},
|
|
inserted: function inserted(el, binding, vnode) {
|
|
getReference(el, binding, vnode);
|
|
}
|
|
});
|
|
// EXTERNAL MODULE: external "vue"
|
|
var external_vue_ = __webpack_require__(7);
|
|
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
|
|
|
|
// CONCATENATED MODULE: ./packages/popover/index.js
|
|
|
|
|
|
|
|
|
|
external_vue_default.a.directive('popover', directive);
|
|
|
|
/* istanbul ignore next */
|
|
main.install = function (Vue) {
|
|
Vue.directive('popover', directive);
|
|
Vue.component(main.name, main);
|
|
};
|
|
main.directive = directive;
|
|
|
|
/* harmony default export */ var popover = __webpack_exports__["default"] = (main);
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "6b7c":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
|
|
var _locale = __webpack_require__("4897");
|
|
|
|
exports.default = {
|
|
methods: {
|
|
t: function t() {
|
|
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
return _locale.t.apply(this, args);
|
|
}
|
|
}
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "6ca1":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
|
var IObject = __webpack_require__("9fbb");
|
|
var defined = __webpack_require__("c901");
|
|
module.exports = function (it) {
|
|
return IObject(defined(it));
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "6db8":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "6dd8":
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* WEBPACK VAR INJECTION */(function(global) {/**
|
|
* A collection of shims that provide minimal functionality of the ES6 collections.
|
|
*
|
|
* These implementations are not meant to be used outside of the ResizeObserver
|
|
* modules as they cover only a limited range of use cases.
|
|
*/
|
|
/* eslint-disable require-jsdoc, valid-jsdoc */
|
|
var MapShim = (function () {
|
|
if (typeof Map !== 'undefined') {
|
|
return Map;
|
|
}
|
|
/**
|
|
* Returns index in provided array that matches the specified key.
|
|
*
|
|
* @param {Array<Array>} arr
|
|
* @param {*} key
|
|
* @returns {number}
|
|
*/
|
|
function getIndex(arr, key) {
|
|
var result = -1;
|
|
arr.some(function (entry, index) {
|
|
if (entry[0] === key) {
|
|
result = index;
|
|
return true;
|
|
}
|
|
return false;
|
|
});
|
|
return result;
|
|
}
|
|
return /** @class */ (function () {
|
|
function class_1() {
|
|
this.__entries__ = [];
|
|
}
|
|
Object.defineProperty(class_1.prototype, "size", {
|
|
/**
|
|
* @returns {boolean}
|
|
*/
|
|
get: function () {
|
|
return this.__entries__.length;
|
|
},
|
|
enumerable: true,
|
|
configurable: true
|
|
});
|
|
/**
|
|
* @param {*} key
|
|
* @returns {*}
|
|
*/
|
|
class_1.prototype.get = function (key) {
|
|
var index = getIndex(this.__entries__, key);
|
|
var entry = this.__entries__[index];
|
|
return entry && entry[1];
|
|
};
|
|
/**
|
|
* @param {*} key
|
|
* @param {*} value
|
|
* @returns {void}
|
|
*/
|
|
class_1.prototype.set = function (key, value) {
|
|
var index = getIndex(this.__entries__, key);
|
|
if (~index) {
|
|
this.__entries__[index][1] = value;
|
|
}
|
|
else {
|
|
this.__entries__.push([key, value]);
|
|
}
|
|
};
|
|
/**
|
|
* @param {*} key
|
|
* @returns {void}
|
|
*/
|
|
class_1.prototype.delete = function (key) {
|
|
var entries = this.__entries__;
|
|
var index = getIndex(entries, key);
|
|
if (~index) {
|
|
entries.splice(index, 1);
|
|
}
|
|
};
|
|
/**
|
|
* @param {*} key
|
|
* @returns {void}
|
|
*/
|
|
class_1.prototype.has = function (key) {
|
|
return !!~getIndex(this.__entries__, key);
|
|
};
|
|
/**
|
|
* @returns {void}
|
|
*/
|
|
class_1.prototype.clear = function () {
|
|
this.__entries__.splice(0);
|
|
};
|
|
/**
|
|
* @param {Function} callback
|
|
* @param {*} [ctx=null]
|
|
* @returns {void}
|
|
*/
|
|
class_1.prototype.forEach = function (callback, ctx) {
|
|
if (ctx === void 0) { ctx = null; }
|
|
for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
|
|
var entry = _a[_i];
|
|
callback.call(ctx, entry[1], entry[0]);
|
|
}
|
|
};
|
|
return class_1;
|
|
}());
|
|
})();
|
|
|
|
/**
|
|
* Detects whether window and document objects are available in current environment.
|
|
*/
|
|
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
|
|
|
|
// Returns global object of a current environment.
|
|
var global$1 = (function () {
|
|
if (typeof global !== 'undefined' && global.Math === Math) {
|
|
return global;
|
|
}
|
|
if (typeof self !== 'undefined' && self.Math === Math) {
|
|
return self;
|
|
}
|
|
if (typeof window !== 'undefined' && window.Math === Math) {
|
|
return window;
|
|
}
|
|
// eslint-disable-next-line no-new-func
|
|
return Function('return this')();
|
|
})();
|
|
|
|
/**
|
|
* A shim for the requestAnimationFrame which falls back to the setTimeout if
|
|
* first one is not supported.
|
|
*
|
|
* @returns {number} Requests' identifier.
|
|
*/
|
|
var requestAnimationFrame$1 = (function () {
|
|
if (typeof requestAnimationFrame === 'function') {
|
|
// It's required to use a bounded function because IE sometimes throws
|
|
// an "Invalid calling object" error if rAF is invoked without the global
|
|
// object on the left hand side.
|
|
return requestAnimationFrame.bind(global$1);
|
|
}
|
|
return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
|
|
})();
|
|
|
|
// Defines minimum timeout before adding a trailing call.
|
|
var trailingTimeout = 2;
|
|
/**
|
|
* Creates a wrapper function which ensures that provided callback will be
|
|
* invoked only once during the specified delay period.
|
|
*
|
|
* @param {Function} callback - Function to be invoked after the delay period.
|
|
* @param {number} delay - Delay after which to invoke callback.
|
|
* @returns {Function}
|
|
*/
|
|
function throttle (callback, delay) {
|
|
var leadingCall = false, trailingCall = false, lastCallTime = 0;
|
|
/**
|
|
* Invokes the original callback function and schedules new invocation if
|
|
* the "proxy" was called during current request.
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
function resolvePending() {
|
|
if (leadingCall) {
|
|
leadingCall = false;
|
|
callback();
|
|
}
|
|
if (trailingCall) {
|
|
proxy();
|
|
}
|
|
}
|
|
/**
|
|
* Callback invoked after the specified delay. It will further postpone
|
|
* invocation of the original function delegating it to the
|
|
* requestAnimationFrame.
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
function timeoutCallback() {
|
|
requestAnimationFrame$1(resolvePending);
|
|
}
|
|
/**
|
|
* Schedules invocation of the original function.
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
function proxy() {
|
|
var timeStamp = Date.now();
|
|
if (leadingCall) {
|
|
// Reject immediately following calls.
|
|
if (timeStamp - lastCallTime < trailingTimeout) {
|
|
return;
|
|
}
|
|
// Schedule new call to be in invoked when the pending one is resolved.
|
|
// This is important for "transitions" which never actually start
|
|
// immediately so there is a chance that we might miss one if change
|
|
// happens amids the pending invocation.
|
|
trailingCall = true;
|
|
}
|
|
else {
|
|
leadingCall = true;
|
|
trailingCall = false;
|
|
setTimeout(timeoutCallback, delay);
|
|
}
|
|
lastCallTime = timeStamp;
|
|
}
|
|
return proxy;
|
|
}
|
|
|
|
// Minimum delay before invoking the update of observers.
|
|
var REFRESH_DELAY = 20;
|
|
// A list of substrings of CSS properties used to find transition events that
|
|
// might affect dimensions of observed elements.
|
|
var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
|
|
// Check if MutationObserver is available.
|
|
var mutationObserverSupported = typeof MutationObserver !== 'undefined';
|
|
/**
|
|
* Singleton controller class which handles updates of ResizeObserver instances.
|
|
*/
|
|
var ResizeObserverController = /** @class */ (function () {
|
|
/**
|
|
* Creates a new instance of ResizeObserverController.
|
|
*
|
|
* @private
|
|
*/
|
|
function ResizeObserverController() {
|
|
/**
|
|
* Indicates whether DOM listeners have been added.
|
|
*
|
|
* @private {boolean}
|
|
*/
|
|
this.connected_ = false;
|
|
/**
|
|
* Tells that controller has subscribed for Mutation Events.
|
|
*
|
|
* @private {boolean}
|
|
*/
|
|
this.mutationEventsAdded_ = false;
|
|
/**
|
|
* Keeps reference to the instance of MutationObserver.
|
|
*
|
|
* @private {MutationObserver}
|
|
*/
|
|
this.mutationsObserver_ = null;
|
|
/**
|
|
* A list of connected observers.
|
|
*
|
|
* @private {Array<ResizeObserverSPI>}
|
|
*/
|
|
this.observers_ = [];
|
|
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
|
|
this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
|
|
}
|
|
/**
|
|
* Adds observer to observers list.
|
|
*
|
|
* @param {ResizeObserverSPI} observer - Observer to be added.
|
|
* @returns {void}
|
|
*/
|
|
ResizeObserverController.prototype.addObserver = function (observer) {
|
|
if (!~this.observers_.indexOf(observer)) {
|
|
this.observers_.push(observer);
|
|
}
|
|
// Add listeners if they haven't been added yet.
|
|
if (!this.connected_) {
|
|
this.connect_();
|
|
}
|
|
};
|
|
/**
|
|
* Removes observer from observers list.
|
|
*
|
|
* @param {ResizeObserverSPI} observer - Observer to be removed.
|
|
* @returns {void}
|
|
*/
|
|
ResizeObserverController.prototype.removeObserver = function (observer) {
|
|
var observers = this.observers_;
|
|
var index = observers.indexOf(observer);
|
|
// Remove observer if it's present in registry.
|
|
if (~index) {
|
|
observers.splice(index, 1);
|
|
}
|
|
// Remove listeners if controller has no connected observers.
|
|
if (!observers.length && this.connected_) {
|
|
this.disconnect_();
|
|
}
|
|
};
|
|
/**
|
|
* Invokes the update of observers. It will continue running updates insofar
|
|
* it detects changes.
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
ResizeObserverController.prototype.refresh = function () {
|
|
var changesDetected = this.updateObservers_();
|
|
// Continue running updates if changes have been detected as there might
|
|
// be future ones caused by CSS transitions.
|
|
if (changesDetected) {
|
|
this.refresh();
|
|
}
|
|
};
|
|
/**
|
|
* Updates every observer from observers list and notifies them of queued
|
|
* entries.
|
|
*
|
|
* @private
|
|
* @returns {boolean} Returns "true" if any observer has detected changes in
|
|
* dimensions of it's elements.
|
|
*/
|
|
ResizeObserverController.prototype.updateObservers_ = function () {
|
|
// Collect observers that have active observations.
|
|
var activeObservers = this.observers_.filter(function (observer) {
|
|
return observer.gatherActive(), observer.hasActive();
|
|
});
|
|
// Deliver notifications in a separate cycle in order to avoid any
|
|
// collisions between observers, e.g. when multiple instances of
|
|
// ResizeObserver are tracking the same element and the callback of one
|
|
// of them changes content dimensions of the observed target. Sometimes
|
|
// this may result in notifications being blocked for the rest of observers.
|
|
activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
|
|
return activeObservers.length > 0;
|
|
};
|
|
/**
|
|
* Initializes DOM listeners.
|
|
*
|
|
* @private
|
|
* @returns {void}
|
|
*/
|
|
ResizeObserverController.prototype.connect_ = function () {
|
|
// Do nothing if running in a non-browser environment or if listeners
|
|
// have been already added.
|
|
if (!isBrowser || this.connected_) {
|
|
return;
|
|
}
|
|
// Subscription to the "Transitionend" event is used as a workaround for
|
|
// delayed transitions. This way it's possible to capture at least the
|
|
// final state of an element.
|
|
document.addEventListener('transitionend', this.onTransitionEnd_);
|
|
window.addEventListener('resize', this.refresh);
|
|
if (mutationObserverSupported) {
|
|
this.mutationsObserver_ = new MutationObserver(this.refresh);
|
|
this.mutationsObserver_.observe(document, {
|
|
attributes: true,
|
|
childList: true,
|
|
characterData: true,
|
|
subtree: true
|
|
});
|
|
}
|
|
else {
|
|
document.addEventListener('DOMSubtreeModified', this.refresh);
|
|
this.mutationEventsAdded_ = true;
|
|
}
|
|
this.connected_ = true;
|
|
};
|
|
/**
|
|
* Removes DOM listeners.
|
|
*
|
|
* @private
|
|
* @returns {void}
|
|
*/
|
|
ResizeObserverController.prototype.disconnect_ = function () {
|
|
// Do nothing if running in a non-browser environment or if listeners
|
|
// have been already removed.
|
|
if (!isBrowser || !this.connected_) {
|
|
return;
|
|
}
|
|
document.removeEventListener('transitionend', this.onTransitionEnd_);
|
|
window.removeEventListener('resize', this.refresh);
|
|
if (this.mutationsObserver_) {
|
|
this.mutationsObserver_.disconnect();
|
|
}
|
|
if (this.mutationEventsAdded_) {
|
|
document.removeEventListener('DOMSubtreeModified', this.refresh);
|
|
}
|
|
this.mutationsObserver_ = null;
|
|
this.mutationEventsAdded_ = false;
|
|
this.connected_ = false;
|
|
};
|
|
/**
|
|
* "Transitionend" event handler.
|
|
*
|
|
* @private
|
|
* @param {TransitionEvent} event
|
|
* @returns {void}
|
|
*/
|
|
ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
|
|
var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
|
|
// Detect whether transition may affect dimensions of an element.
|
|
var isReflowProperty = transitionKeys.some(function (key) {
|
|
return !!~propertyName.indexOf(key);
|
|
});
|
|
if (isReflowProperty) {
|
|
this.refresh();
|
|
}
|
|
};
|
|
/**
|
|
* Returns instance of the ResizeObserverController.
|
|
*
|
|
* @returns {ResizeObserverController}
|
|
*/
|
|
ResizeObserverController.getInstance = function () {
|
|
if (!this.instance_) {
|
|
this.instance_ = new ResizeObserverController();
|
|
}
|
|
return this.instance_;
|
|
};
|
|
/**
|
|
* Holds reference to the controller's instance.
|
|
*
|
|
* @private {ResizeObserverController}
|
|
*/
|
|
ResizeObserverController.instance_ = null;
|
|
return ResizeObserverController;
|
|
}());
|
|
|
|
/**
|
|
* Defines non-writable/enumerable properties of the provided target object.
|
|
*
|
|
* @param {Object} target - Object for which to define properties.
|
|
* @param {Object} props - Properties to be defined.
|
|
* @returns {Object} Target object.
|
|
*/
|
|
var defineConfigurable = (function (target, props) {
|
|
for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
|
|
var key = _a[_i];
|
|
Object.defineProperty(target, key, {
|
|
value: props[key],
|
|
enumerable: false,
|
|
writable: false,
|
|
configurable: true
|
|
});
|
|
}
|
|
return target;
|
|
});
|
|
|
|
/**
|
|
* Returns the global object associated with provided element.
|
|
*
|
|
* @param {Object} target
|
|
* @returns {Object}
|
|
*/
|
|
var getWindowOf = (function (target) {
|
|
// Assume that the element is an instance of Node, which means that it
|
|
// has the "ownerDocument" property from which we can retrieve a
|
|
// corresponding global object.
|
|
var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
|
|
// Return the local global object if it's not possible extract one from
|
|
// provided element.
|
|
return ownerGlobal || global$1;
|
|
});
|
|
|
|
// Placeholder of an empty content rectangle.
|
|
var emptyRect = createRectInit(0, 0, 0, 0);
|
|
/**
|
|
* Converts provided string to a number.
|
|
*
|
|
* @param {number|string} value
|
|
* @returns {number}
|
|
*/
|
|
function toFloat(value) {
|
|
return parseFloat(value) || 0;
|
|
}
|
|
/**
|
|
* Extracts borders size from provided styles.
|
|
*
|
|
* @param {CSSStyleDeclaration} styles
|
|
* @param {...string} positions - Borders positions (top, right, ...)
|
|
* @returns {number}
|
|
*/
|
|
function getBordersSize(styles) {
|
|
var positions = [];
|
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
positions[_i - 1] = arguments[_i];
|
|
}
|
|
return positions.reduce(function (size, position) {
|
|
var value = styles['border-' + position + '-width'];
|
|
return size + toFloat(value);
|
|
}, 0);
|
|
}
|
|
/**
|
|
* Extracts paddings sizes from provided styles.
|
|
*
|
|
* @param {CSSStyleDeclaration} styles
|
|
* @returns {Object} Paddings box.
|
|
*/
|
|
function getPaddings(styles) {
|
|
var positions = ['top', 'right', 'bottom', 'left'];
|
|
var paddings = {};
|
|
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
|
|
var position = positions_1[_i];
|
|
var value = styles['padding-' + position];
|
|
paddings[position] = toFloat(value);
|
|
}
|
|
return paddings;
|
|
}
|
|
/**
|
|
* Calculates content rectangle of provided SVG element.
|
|
*
|
|
* @param {SVGGraphicsElement} target - Element content rectangle of which needs
|
|
* to be calculated.
|
|
* @returns {DOMRectInit}
|
|
*/
|
|
function getSVGContentRect(target) {
|
|
var bbox = target.getBBox();
|
|
return createRectInit(0, 0, bbox.width, bbox.height);
|
|
}
|
|
/**
|
|
* Calculates content rectangle of provided HTMLElement.
|
|
*
|
|
* @param {HTMLElement} target - Element for which to calculate the content rectangle.
|
|
* @returns {DOMRectInit}
|
|
*/
|
|
function getHTMLElementContentRect(target) {
|
|
// Client width & height properties can't be
|
|
// used exclusively as they provide rounded values.
|
|
var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
|
|
// By this condition we can catch all non-replaced inline, hidden and
|
|
// detached elements. Though elements with width & height properties less
|
|
// than 0.5 will be discarded as well.
|
|
//
|
|
// Without it we would need to implement separate methods for each of
|
|
// those cases and it's not possible to perform a precise and performance
|
|
// effective test for hidden elements. E.g. even jQuery's ':visible' filter
|
|
// gives wrong results for elements with width & height less than 0.5.
|
|
if (!clientWidth && !clientHeight) {
|
|
return emptyRect;
|
|
}
|
|
var styles = getWindowOf(target).getComputedStyle(target);
|
|
var paddings = getPaddings(styles);
|
|
var horizPad = paddings.left + paddings.right;
|
|
var vertPad = paddings.top + paddings.bottom;
|
|
// Computed styles of width & height are being used because they are the
|
|
// only dimensions available to JS that contain non-rounded values. It could
|
|
// be possible to utilize the getBoundingClientRect if only it's data wasn't
|
|
// affected by CSS transformations let alone paddings, borders and scroll bars.
|
|
var width = toFloat(styles.width), height = toFloat(styles.height);
|
|
// Width & height include paddings and borders when the 'border-box' box
|
|
// model is applied (except for IE).
|
|
if (styles.boxSizing === 'border-box') {
|
|
// Following conditions are required to handle Internet Explorer which
|
|
// doesn't include paddings and borders to computed CSS dimensions.
|
|
//
|
|
// We can say that if CSS dimensions + paddings are equal to the "client"
|
|
// properties then it's either IE, and thus we don't need to subtract
|
|
// anything, or an element merely doesn't have paddings/borders styles.
|
|
if (Math.round(width + horizPad) !== clientWidth) {
|
|
width -= getBordersSize(styles, 'left', 'right') + horizPad;
|
|
}
|
|
if (Math.round(height + vertPad) !== clientHeight) {
|
|
height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
|
|
}
|
|
}
|
|
// Following steps can't be applied to the document's root element as its
|
|
// client[Width/Height] properties represent viewport area of the window.
|
|
// Besides, it's as well not necessary as the <html> itself neither has
|
|
// rendered scroll bars nor it can be clipped.
|
|
if (!isDocumentElement(target)) {
|
|
// In some browsers (only in Firefox, actually) CSS width & height
|
|
// include scroll bars size which can be removed at this step as scroll
|
|
// bars are the only difference between rounded dimensions + paddings
|
|
// and "client" properties, though that is not always true in Chrome.
|
|
var vertScrollbar = Math.round(width + horizPad) - clientWidth;
|
|
var horizScrollbar = Math.round(height + vertPad) - clientHeight;
|
|
// Chrome has a rather weird rounding of "client" properties.
|
|
// E.g. for an element with content width of 314.2px it sometimes gives
|
|
// the client width of 315px and for the width of 314.7px it may give
|
|
// 314px. And it doesn't happen all the time. So just ignore this delta
|
|
// as a non-relevant.
|
|
if (Math.abs(vertScrollbar) !== 1) {
|
|
width -= vertScrollbar;
|
|
}
|
|
if (Math.abs(horizScrollbar) !== 1) {
|
|
height -= horizScrollbar;
|
|
}
|
|
}
|
|
return createRectInit(paddings.left, paddings.top, width, height);
|
|
}
|
|
/**
|
|
* Checks whether provided element is an instance of the SVGGraphicsElement.
|
|
*
|
|
* @param {Element} target - Element to be checked.
|
|
* @returns {boolean}
|
|
*/
|
|
var isSVGGraphicsElement = (function () {
|
|
// Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
|
|
// interface.
|
|
if (typeof SVGGraphicsElement !== 'undefined') {
|
|
return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
|
|
}
|
|
// If it's so, then check that element is at least an instance of the
|
|
// SVGElement and that it has the "getBBox" method.
|
|
// eslint-disable-next-line no-extra-parens
|
|
return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
|
|
typeof target.getBBox === 'function'); };
|
|
})();
|
|
/**
|
|
* Checks whether provided element is a document element (<html>).
|
|
*
|
|
* @param {Element} target - Element to be checked.
|
|
* @returns {boolean}
|
|
*/
|
|
function isDocumentElement(target) {
|
|
return target === getWindowOf(target).document.documentElement;
|
|
}
|
|
/**
|
|
* Calculates an appropriate content rectangle for provided html or svg element.
|
|
*
|
|
* @param {Element} target - Element content rectangle of which needs to be calculated.
|
|
* @returns {DOMRectInit}
|
|
*/
|
|
function getContentRect(target) {
|
|
if (!isBrowser) {
|
|
return emptyRect;
|
|
}
|
|
if (isSVGGraphicsElement(target)) {
|
|
return getSVGContentRect(target);
|
|
}
|
|
return getHTMLElementContentRect(target);
|
|
}
|
|
/**
|
|
* Creates rectangle with an interface of the DOMRectReadOnly.
|
|
* Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
|
|
*
|
|
* @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
|
|
* @returns {DOMRectReadOnly}
|
|
*/
|
|
function createReadOnlyRect(_a) {
|
|
var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
|
|
// If DOMRectReadOnly is available use it as a prototype for the rectangle.
|
|
var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
|
|
var rect = Object.create(Constr.prototype);
|
|
// Rectangle's properties are not writable and non-enumerable.
|
|
defineConfigurable(rect, {
|
|
x: x, y: y, width: width, height: height,
|
|
top: y,
|
|
right: x + width,
|
|
bottom: height + y,
|
|
left: x
|
|
});
|
|
return rect;
|
|
}
|
|
/**
|
|
* Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
|
|
* Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
|
|
*
|
|
* @param {number} x - X coordinate.
|
|
* @param {number} y - Y coordinate.
|
|
* @param {number} width - Rectangle's width.
|
|
* @param {number} height - Rectangle's height.
|
|
* @returns {DOMRectInit}
|
|
*/
|
|
function createRectInit(x, y, width, height) {
|
|
return { x: x, y: y, width: width, height: height };
|
|
}
|
|
|
|
/**
|
|
* Class that is responsible for computations of the content rectangle of
|
|
* provided DOM element and for keeping track of it's changes.
|
|
*/
|
|
var ResizeObservation = /** @class */ (function () {
|
|
/**
|
|
* Creates an instance of ResizeObservation.
|
|
*
|
|
* @param {Element} target - Element to be observed.
|
|
*/
|
|
function ResizeObservation(target) {
|
|
/**
|
|
* Broadcasted width of content rectangle.
|
|
*
|
|
* @type {number}
|
|
*/
|
|
this.broadcastWidth = 0;
|
|
/**
|
|
* Broadcasted height of content rectangle.
|
|
*
|
|
* @type {number}
|
|
*/
|
|
this.broadcastHeight = 0;
|
|
/**
|
|
* Reference to the last observed content rectangle.
|
|
*
|
|
* @private {DOMRectInit}
|
|
*/
|
|
this.contentRect_ = createRectInit(0, 0, 0, 0);
|
|
this.target = target;
|
|
}
|
|
/**
|
|
* Updates content rectangle and tells whether it's width or height properties
|
|
* have changed since the last broadcast.
|
|
*
|
|
* @returns {boolean}
|
|
*/
|
|
ResizeObservation.prototype.isActive = function () {
|
|
var rect = getContentRect(this.target);
|
|
this.contentRect_ = rect;
|
|
return (rect.width !== this.broadcastWidth ||
|
|
rect.height !== this.broadcastHeight);
|
|
};
|
|
/**
|
|
* Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
|
|
* from the corresponding properties of the last observed content rectangle.
|
|
*
|
|
* @returns {DOMRectInit} Last observed content rectangle.
|
|
*/
|
|
ResizeObservation.prototype.broadcastRect = function () {
|
|
var rect = this.contentRect_;
|
|
this.broadcastWidth = rect.width;
|
|
this.broadcastHeight = rect.height;
|
|
return rect;
|
|
};
|
|
return ResizeObservation;
|
|
}());
|
|
|
|
var ResizeObserverEntry = /** @class */ (function () {
|
|
/**
|
|
* Creates an instance of ResizeObserverEntry.
|
|
*
|
|
* @param {Element} target - Element that is being observed.
|
|
* @param {DOMRectInit} rectInit - Data of the element's content rectangle.
|
|
*/
|
|
function ResizeObserverEntry(target, rectInit) {
|
|
var contentRect = createReadOnlyRect(rectInit);
|
|
// According to the specification following properties are not writable
|
|
// and are also not enumerable in the native implementation.
|
|
//
|
|
// Property accessors are not being used as they'd require to define a
|
|
// private WeakMap storage which may cause memory leaks in browsers that
|
|
// don't support this type of collections.
|
|
defineConfigurable(this, { target: target, contentRect: contentRect });
|
|
}
|
|
return ResizeObserverEntry;
|
|
}());
|
|
|
|
var ResizeObserverSPI = /** @class */ (function () {
|
|
/**
|
|
* Creates a new instance of ResizeObserver.
|
|
*
|
|
* @param {ResizeObserverCallback} callback - Callback function that is invoked
|
|
* when one of the observed elements changes it's content dimensions.
|
|
* @param {ResizeObserverController} controller - Controller instance which
|
|
* is responsible for the updates of observer.
|
|
* @param {ResizeObserver} callbackCtx - Reference to the public
|
|
* ResizeObserver instance which will be passed to callback function.
|
|
*/
|
|
function ResizeObserverSPI(callback, controller, callbackCtx) {
|
|
/**
|
|
* Collection of resize observations that have detected changes in dimensions
|
|
* of elements.
|
|
*
|
|
* @private {Array<ResizeObservation>}
|
|
*/
|
|
this.activeObservations_ = [];
|
|
/**
|
|
* Registry of the ResizeObservation instances.
|
|
*
|
|
* @private {Map<Element, ResizeObservation>}
|
|
*/
|
|
this.observations_ = new MapShim();
|
|
if (typeof callback !== 'function') {
|
|
throw new TypeError('The callback provided as parameter 1 is not a function.');
|
|
}
|
|
this.callback_ = callback;
|
|
this.controller_ = controller;
|
|
this.callbackCtx_ = callbackCtx;
|
|
}
|
|
/**
|
|
* Starts observing provided element.
|
|
*
|
|
* @param {Element} target - Element to be observed.
|
|
* @returns {void}
|
|
*/
|
|
ResizeObserverSPI.prototype.observe = function (target) {
|
|
if (!arguments.length) {
|
|
throw new TypeError('1 argument required, but only 0 present.');
|
|
}
|
|
// Do nothing if current environment doesn't have the Element interface.
|
|
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
|
return;
|
|
}
|
|
if (!(target instanceof getWindowOf(target).Element)) {
|
|
throw new TypeError('parameter 1 is not of type "Element".');
|
|
}
|
|
var observations = this.observations_;
|
|
// Do nothing if element is already being observed.
|
|
if (observations.has(target)) {
|
|
return;
|
|
}
|
|
observations.set(target, new ResizeObservation(target));
|
|
this.controller_.addObserver(this);
|
|
// Force the update of observations.
|
|
this.controller_.refresh();
|
|
};
|
|
/**
|
|
* Stops observing provided element.
|
|
*
|
|
* @param {Element} target - Element to stop observing.
|
|
* @returns {void}
|
|
*/
|
|
ResizeObserverSPI.prototype.unobserve = function (target) {
|
|
if (!arguments.length) {
|
|
throw new TypeError('1 argument required, but only 0 present.');
|
|
}
|
|
// Do nothing if current environment doesn't have the Element interface.
|
|
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
|
return;
|
|
}
|
|
if (!(target instanceof getWindowOf(target).Element)) {
|
|
throw new TypeError('parameter 1 is not of type "Element".');
|
|
}
|
|
var observations = this.observations_;
|
|
// Do nothing if element is not being observed.
|
|
if (!observations.has(target)) {
|
|
return;
|
|
}
|
|
observations.delete(target);
|
|
if (!observations.size) {
|
|
this.controller_.removeObserver(this);
|
|
}
|
|
};
|
|
/**
|
|
* Stops observing all elements.
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
ResizeObserverSPI.prototype.disconnect = function () {
|
|
this.clearActive();
|
|
this.observations_.clear();
|
|
this.controller_.removeObserver(this);
|
|
};
|
|
/**
|
|
* Collects observation instances the associated element of which has changed
|
|
* it's content rectangle.
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
ResizeObserverSPI.prototype.gatherActive = function () {
|
|
var _this = this;
|
|
this.clearActive();
|
|
this.observations_.forEach(function (observation) {
|
|
if (observation.isActive()) {
|
|
_this.activeObservations_.push(observation);
|
|
}
|
|
});
|
|
};
|
|
/**
|
|
* Invokes initial callback function with a list of ResizeObserverEntry
|
|
* instances collected from active resize observations.
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
ResizeObserverSPI.prototype.broadcastActive = function () {
|
|
// Do nothing if observer doesn't have active observations.
|
|
if (!this.hasActive()) {
|
|
return;
|
|
}
|
|
var ctx = this.callbackCtx_;
|
|
// Create ResizeObserverEntry instance for every active observation.
|
|
var entries = this.activeObservations_.map(function (observation) {
|
|
return new ResizeObserverEntry(observation.target, observation.broadcastRect());
|
|
});
|
|
this.callback_.call(ctx, entries, ctx);
|
|
this.clearActive();
|
|
};
|
|
/**
|
|
* Clears the collection of active observations.
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
ResizeObserverSPI.prototype.clearActive = function () {
|
|
this.activeObservations_.splice(0);
|
|
};
|
|
/**
|
|
* Tells whether observer has active observations.
|
|
*
|
|
* @returns {boolean}
|
|
*/
|
|
ResizeObserverSPI.prototype.hasActive = function () {
|
|
return this.activeObservations_.length > 0;
|
|
};
|
|
return ResizeObserverSPI;
|
|
}());
|
|
|
|
// Registry of internal observers. If WeakMap is not available use current shim
|
|
// for the Map collection as it has all required methods and because WeakMap
|
|
// can't be fully polyfilled anyway.
|
|
var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
|
|
/**
|
|
* ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
|
|
* exposing only those methods and properties that are defined in the spec.
|
|
*/
|
|
var ResizeObserver = /** @class */ (function () {
|
|
/**
|
|
* Creates a new instance of ResizeObserver.
|
|
*
|
|
* @param {ResizeObserverCallback} callback - Callback that is invoked when
|
|
* dimensions of the observed elements change.
|
|
*/
|
|
function ResizeObserver(callback) {
|
|
if (!(this instanceof ResizeObserver)) {
|
|
throw new TypeError('Cannot call a class as a function.');
|
|
}
|
|
if (!arguments.length) {
|
|
throw new TypeError('1 argument required, but only 0 present.');
|
|
}
|
|
var controller = ResizeObserverController.getInstance();
|
|
var observer = new ResizeObserverSPI(callback, controller, this);
|
|
observers.set(this, observer);
|
|
}
|
|
return ResizeObserver;
|
|
}());
|
|
// Expose public methods of ResizeObserver.
|
|
[
|
|
'observe',
|
|
'unobserve',
|
|
'disconnect'
|
|
].forEach(function (method) {
|
|
ResizeObserver.prototype[method] = function () {
|
|
var _a;
|
|
return (_a = observers.get(this))[method].apply(_a, arguments);
|
|
};
|
|
});
|
|
|
|
var index = (function () {
|
|
// Export existing implementation if available.
|
|
if (typeof global$1.ResizeObserver !== 'undefined') {
|
|
return global$1.ResizeObserver;
|
|
}
|
|
return ResizeObserver;
|
|
})();
|
|
|
|
/* harmony default export */ __webpack_exports__["default"] = (index);
|
|
|
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
|
|
|
|
/***/ }),
|
|
|
|
/***/ "6ed5":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 77);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 0:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
|
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
function normalizeComponent (
|
|
scriptExports,
|
|
render,
|
|
staticRenderFns,
|
|
functionalTemplate,
|
|
injectStyles,
|
|
scopeId,
|
|
moduleIdentifier, /* server only */
|
|
shadowMode /* vue-cli only */
|
|
) {
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (render) {
|
|
options.render = render
|
|
options.staticRenderFns = staticRenderFns
|
|
options._compiled = true
|
|
}
|
|
|
|
// functional template
|
|
if (functionalTemplate) {
|
|
options.functional = true
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = 'data-v-' + scopeId
|
|
}
|
|
|
|
var hook
|
|
if (moduleIdentifier) { // server build
|
|
hook = function (context) {
|
|
// 2.3 injection
|
|
context =
|
|
context || // cached call
|
|
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
// 2.2 with runInNewContext: true
|
|
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
context = __VUE_SSR_CONTEXT__
|
|
}
|
|
// inject component styles
|
|
if (injectStyles) {
|
|
injectStyles.call(this, context)
|
|
}
|
|
// register component module identifier for async chunk inferrence
|
|
if (context && context._registeredComponents) {
|
|
context._registeredComponents.add(moduleIdentifier)
|
|
}
|
|
}
|
|
// used by ssr in case component is cached and beforeCreate
|
|
// never gets called
|
|
options._ssrRegister = hook
|
|
} else if (injectStyles) {
|
|
hook = shadowMode
|
|
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
|
: injectStyles
|
|
}
|
|
|
|
if (hook) {
|
|
if (options.functional) {
|
|
// for template-only hot-reload because in that case the render fn doesn't
|
|
// go through the normalizer
|
|
options._injectStyles = hook
|
|
// register for functioal component in vue file
|
|
var originalRender = options.render
|
|
options.render = function renderWithStyleInjection (h, context) {
|
|
hook.call(context)
|
|
return originalRender(h, context)
|
|
}
|
|
} else {
|
|
// inject component registration as beforeCreate hook
|
|
var existing = options.beforeCreate
|
|
options.beforeCreate = existing
|
|
? [].concat(existing, hook)
|
|
: [hook]
|
|
}
|
|
}
|
|
|
|
return {
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 10:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("f3ad");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 13:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("eedf");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 15:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("5128");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 19:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("4897");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 2:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("5924");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 23:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("41f8");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 47:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("722f");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 6:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("6b7c");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 7:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("8bbf");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 77:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXTERNAL MODULE: external "vue"
|
|
var external_vue_ = __webpack_require__(7);
|
|
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/message-box/src/main.vue?vue&type=template&id=6b29b012&
|
|
var render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c("transition", { attrs: { name: "msgbox-fade" } }, [
|
|
_c(
|
|
"div",
|
|
{
|
|
directives: [
|
|
{
|
|
name: "show",
|
|
rawName: "v-show",
|
|
value: _vm.visible,
|
|
expression: "visible"
|
|
}
|
|
],
|
|
staticClass: "el-message-box__wrapper",
|
|
attrs: {
|
|
tabindex: "-1",
|
|
role: "dialog",
|
|
"aria-modal": "true",
|
|
"aria-label": _vm.title || "dialog"
|
|
},
|
|
on: {
|
|
click: function($event) {
|
|
if ($event.target !== $event.currentTarget) {
|
|
return null
|
|
}
|
|
return _vm.handleWrapperClick($event)
|
|
}
|
|
}
|
|
},
|
|
[
|
|
_c(
|
|
"div",
|
|
{
|
|
staticClass: "el-message-box",
|
|
class: [_vm.customClass, _vm.center && "el-message-box--center"]
|
|
},
|
|
[
|
|
_vm.title !== null
|
|
? _c("div", { staticClass: "el-message-box__header" }, [
|
|
_c("div", { staticClass: "el-message-box__title" }, [
|
|
_vm.icon && _vm.center
|
|
? _c("div", {
|
|
class: ["el-message-box__status", _vm.icon]
|
|
})
|
|
: _vm._e(),
|
|
_c("span", [_vm._v(_vm._s(_vm.title))])
|
|
]),
|
|
_vm.showClose
|
|
? _c(
|
|
"button",
|
|
{
|
|
staticClass: "el-message-box__headerbtn",
|
|
attrs: { type: "button", "aria-label": "Close" },
|
|
on: {
|
|
click: function($event) {
|
|
_vm.handleAction(
|
|
_vm.distinguishCancelAndClose
|
|
? "close"
|
|
: "cancel"
|
|
)
|
|
},
|
|
keydown: function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k(
|
|
$event.keyCode,
|
|
"enter",
|
|
13,
|
|
$event.key,
|
|
"Enter"
|
|
)
|
|
) {
|
|
return null
|
|
}
|
|
_vm.handleAction(
|
|
_vm.distinguishCancelAndClose
|
|
? "close"
|
|
: "cancel"
|
|
)
|
|
}
|
|
}
|
|
},
|
|
[
|
|
_c("i", {
|
|
staticClass: "el-message-box__close el-icon-close"
|
|
})
|
|
]
|
|
)
|
|
: _vm._e()
|
|
])
|
|
: _vm._e(),
|
|
_c("div", { staticClass: "el-message-box__content" }, [
|
|
_c("div", { staticClass: "el-message-box__container" }, [
|
|
_vm.icon && !_vm.center && _vm.message !== ""
|
|
? _c("div", { class: ["el-message-box__status", _vm.icon] })
|
|
: _vm._e(),
|
|
_vm.message !== ""
|
|
? _c(
|
|
"div",
|
|
{ staticClass: "el-message-box__message" },
|
|
[
|
|
_vm._t("default", [
|
|
!_vm.dangerouslyUseHTMLString
|
|
? _c("p", [_vm._v(_vm._s(_vm.message))])
|
|
: _c("p", {
|
|
domProps: { innerHTML: _vm._s(_vm.message) }
|
|
})
|
|
])
|
|
],
|
|
2
|
|
)
|
|
: _vm._e()
|
|
]),
|
|
_c(
|
|
"div",
|
|
{
|
|
directives: [
|
|
{
|
|
name: "show",
|
|
rawName: "v-show",
|
|
value: _vm.showInput,
|
|
expression: "showInput"
|
|
}
|
|
],
|
|
staticClass: "el-message-box__input"
|
|
},
|
|
[
|
|
_c("el-input", {
|
|
ref: "input",
|
|
attrs: {
|
|
type: _vm.inputType,
|
|
placeholder: _vm.inputPlaceholder
|
|
},
|
|
nativeOn: {
|
|
keydown: function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k(
|
|
$event.keyCode,
|
|
"enter",
|
|
13,
|
|
$event.key,
|
|
"Enter"
|
|
)
|
|
) {
|
|
return null
|
|
}
|
|
return _vm.handleInputEnter($event)
|
|
}
|
|
},
|
|
model: {
|
|
value: _vm.inputValue,
|
|
callback: function($$v) {
|
|
_vm.inputValue = $$v
|
|
},
|
|
expression: "inputValue"
|
|
}
|
|
}),
|
|
_c(
|
|
"div",
|
|
{
|
|
staticClass: "el-message-box__errormsg",
|
|
style: {
|
|
visibility: !!_vm.editorErrorMessage
|
|
? "visible"
|
|
: "hidden"
|
|
}
|
|
},
|
|
[_vm._v(_vm._s(_vm.editorErrorMessage))]
|
|
)
|
|
],
|
|
1
|
|
)
|
|
]),
|
|
_c(
|
|
"div",
|
|
{ staticClass: "el-message-box__btns" },
|
|
[
|
|
_vm.showCancelButton
|
|
? _c(
|
|
"el-button",
|
|
{
|
|
class: [_vm.cancelButtonClasses],
|
|
attrs: {
|
|
loading: _vm.cancelButtonLoading,
|
|
round: _vm.roundButton,
|
|
size: "small"
|
|
},
|
|
on: {
|
|
keydown: function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k(
|
|
$event.keyCode,
|
|
"enter",
|
|
13,
|
|
$event.key,
|
|
"Enter"
|
|
)
|
|
) {
|
|
return null
|
|
}
|
|
_vm.handleAction("cancel")
|
|
}
|
|
},
|
|
nativeOn: {
|
|
click: function($event) {
|
|
_vm.handleAction("cancel")
|
|
}
|
|
}
|
|
},
|
|
[
|
|
_vm._v(
|
|
"\n " +
|
|
_vm._s(
|
|
_vm.cancelButtonText ||
|
|
_vm.t("el.messagebox.cancel")
|
|
) +
|
|
"\n "
|
|
)
|
|
]
|
|
)
|
|
: _vm._e(),
|
|
_c(
|
|
"el-button",
|
|
{
|
|
directives: [
|
|
{
|
|
name: "show",
|
|
rawName: "v-show",
|
|
value: _vm.showConfirmButton,
|
|
expression: "showConfirmButton"
|
|
}
|
|
],
|
|
ref: "confirm",
|
|
class: [_vm.confirmButtonClasses],
|
|
attrs: {
|
|
loading: _vm.confirmButtonLoading,
|
|
round: _vm.roundButton,
|
|
size: "small"
|
|
},
|
|
on: {
|
|
keydown: function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k(
|
|
$event.keyCode,
|
|
"enter",
|
|
13,
|
|
$event.key,
|
|
"Enter"
|
|
)
|
|
) {
|
|
return null
|
|
}
|
|
_vm.handleAction("confirm")
|
|
}
|
|
},
|
|
nativeOn: {
|
|
click: function($event) {
|
|
_vm.handleAction("confirm")
|
|
}
|
|
}
|
|
},
|
|
[
|
|
_vm._v(
|
|
"\n " +
|
|
_vm._s(
|
|
_vm.confirmButtonText ||
|
|
_vm.t("el.messagebox.confirm")
|
|
) +
|
|
"\n "
|
|
)
|
|
]
|
|
)
|
|
],
|
|
1
|
|
)
|
|
]
|
|
)
|
|
]
|
|
)
|
|
])
|
|
}
|
|
var staticRenderFns = []
|
|
render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/message-box/src/main.vue?vue&type=template&id=6b29b012&
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/popup"
|
|
var popup_ = __webpack_require__(15);
|
|
var popup_default = /*#__PURE__*/__webpack_require__.n(popup_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/locale"
|
|
var locale_ = __webpack_require__(6);
|
|
var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/input"
|
|
var input_ = __webpack_require__(10);
|
|
var input_default = /*#__PURE__*/__webpack_require__.n(input_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/button"
|
|
var button_ = __webpack_require__(13);
|
|
var button_default = /*#__PURE__*/__webpack_require__.n(button_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/dom"
|
|
var dom_ = __webpack_require__(2);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/locale"
|
|
var lib_locale_ = __webpack_require__(19);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/aria-dialog"
|
|
var aria_dialog_ = __webpack_require__(47);
|
|
var aria_dialog_default = /*#__PURE__*/__webpack_require__.n(aria_dialog_);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/message-box/src/main.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var messageBox = void 0;
|
|
var typeMap = {
|
|
success: 'success',
|
|
info: 'info',
|
|
warning: 'warning',
|
|
error: 'error'
|
|
};
|
|
|
|
/* harmony default export */ var mainvue_type_script_lang_js_ = ({
|
|
mixins: [popup_default.a, locale_default.a],
|
|
|
|
props: {
|
|
modal: {
|
|
default: true
|
|
},
|
|
lockScroll: {
|
|
default: true
|
|
},
|
|
showClose: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
closeOnClickModal: {
|
|
default: true
|
|
},
|
|
closeOnPressEscape: {
|
|
default: true
|
|
},
|
|
closeOnHashChange: {
|
|
default: true
|
|
},
|
|
center: {
|
|
default: false,
|
|
type: Boolean
|
|
},
|
|
roundButton: {
|
|
default: false,
|
|
type: Boolean
|
|
}
|
|
},
|
|
|
|
components: {
|
|
ElInput: input_default.a,
|
|
ElButton: button_default.a
|
|
},
|
|
|
|
computed: {
|
|
icon: function icon() {
|
|
var type = this.type,
|
|
iconClass = this.iconClass;
|
|
|
|
return iconClass || (type && typeMap[type] ? 'el-icon-' + typeMap[type] : '');
|
|
},
|
|
confirmButtonClasses: function confirmButtonClasses() {
|
|
return 'el-button--primary ' + this.confirmButtonClass;
|
|
},
|
|
cancelButtonClasses: function cancelButtonClasses() {
|
|
return '' + this.cancelButtonClass;
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
getSafeClose: function getSafeClose() {
|
|
var _this = this;
|
|
|
|
var currentId = this.uid;
|
|
return function () {
|
|
_this.$nextTick(function () {
|
|
if (currentId === _this.uid) _this.doClose();
|
|
});
|
|
};
|
|
},
|
|
doClose: function doClose() {
|
|
var _this2 = this;
|
|
|
|
if (!this.visible) return;
|
|
this.visible = false;
|
|
this._closing = true;
|
|
|
|
this.onClose && this.onClose();
|
|
messageBox.closeDialog(); // 解绑
|
|
if (this.lockScroll) {
|
|
setTimeout(this.restoreBodyStyle, 200);
|
|
}
|
|
this.opened = false;
|
|
this.doAfterClose();
|
|
setTimeout(function () {
|
|
if (_this2.action) _this2.callback(_this2.action, _this2);
|
|
});
|
|
},
|
|
handleWrapperClick: function handleWrapperClick() {
|
|
if (this.closeOnClickModal) {
|
|
this.handleAction(this.distinguishCancelAndClose ? 'close' : 'cancel');
|
|
}
|
|
},
|
|
handleInputEnter: function handleInputEnter() {
|
|
if (this.inputType !== 'textarea') {
|
|
return this.handleAction('confirm');
|
|
}
|
|
},
|
|
handleAction: function handleAction(action) {
|
|
if (this.$type === 'prompt' && action === 'confirm' && !this.validate()) {
|
|
return;
|
|
}
|
|
this.action = action;
|
|
if (typeof this.beforeClose === 'function') {
|
|
this.close = this.getSafeClose();
|
|
this.beforeClose(action, this, this.close);
|
|
} else {
|
|
this.doClose();
|
|
}
|
|
},
|
|
validate: function validate() {
|
|
if (this.$type === 'prompt') {
|
|
var inputPattern = this.inputPattern;
|
|
if (inputPattern && !inputPattern.test(this.inputValue || '')) {
|
|
this.editorErrorMessage = this.inputErrorMessage || Object(lib_locale_["t"])('el.messagebox.error');
|
|
Object(dom_["addClass"])(this.getInputElement(), 'invalid');
|
|
return false;
|
|
}
|
|
var inputValidator = this.inputValidator;
|
|
if (typeof inputValidator === 'function') {
|
|
var validateResult = inputValidator(this.inputValue);
|
|
if (validateResult === false) {
|
|
this.editorErrorMessage = this.inputErrorMessage || Object(lib_locale_["t"])('el.messagebox.error');
|
|
Object(dom_["addClass"])(this.getInputElement(), 'invalid');
|
|
return false;
|
|
}
|
|
if (typeof validateResult === 'string') {
|
|
this.editorErrorMessage = validateResult;
|
|
Object(dom_["addClass"])(this.getInputElement(), 'invalid');
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
this.editorErrorMessage = '';
|
|
Object(dom_["removeClass"])(this.getInputElement(), 'invalid');
|
|
return true;
|
|
},
|
|
getFirstFocus: function getFirstFocus() {
|
|
var btn = this.$el.querySelector('.el-message-box__btns .el-button');
|
|
var title = this.$el.querySelector('.el-message-box__btns .el-message-box__title');
|
|
return btn || title;
|
|
},
|
|
getInputElement: function getInputElement() {
|
|
var inputRefs = this.$refs.input.$refs;
|
|
return inputRefs.input || inputRefs.textarea;
|
|
},
|
|
handleClose: function handleClose() {
|
|
this.handleAction('close');
|
|
}
|
|
},
|
|
|
|
watch: {
|
|
inputValue: {
|
|
immediate: true,
|
|
handler: function handler(val) {
|
|
var _this3 = this;
|
|
|
|
this.$nextTick(function (_) {
|
|
if (_this3.$type === 'prompt' && val !== null) {
|
|
_this3.validate();
|
|
}
|
|
});
|
|
}
|
|
},
|
|
|
|
visible: function visible(val) {
|
|
var _this4 = this;
|
|
|
|
if (val) {
|
|
this.uid++;
|
|
if (this.$type === 'alert' || this.$type === 'confirm') {
|
|
this.$nextTick(function () {
|
|
_this4.$refs.confirm.$el.focus();
|
|
});
|
|
}
|
|
this.focusAfterClosed = document.activeElement;
|
|
messageBox = new aria_dialog_default.a(this.$el, this.focusAfterClosed, this.getFirstFocus());
|
|
}
|
|
|
|
// prompt
|
|
if (this.$type !== 'prompt') return;
|
|
if (val) {
|
|
setTimeout(function () {
|
|
if (_this4.$refs.input && _this4.$refs.input.$el) {
|
|
_this4.getInputElement().focus();
|
|
}
|
|
}, 500);
|
|
} else {
|
|
this.editorErrorMessage = '';
|
|
Object(dom_["removeClass"])(this.getInputElement(), 'invalid');
|
|
}
|
|
}
|
|
},
|
|
|
|
mounted: function mounted() {
|
|
var _this5 = this;
|
|
|
|
this.$nextTick(function () {
|
|
if (_this5.closeOnHashChange) {
|
|
window.addEventListener('hashchange', _this5.close);
|
|
}
|
|
});
|
|
},
|
|
beforeDestroy: function beforeDestroy() {
|
|
if (this.closeOnHashChange) {
|
|
window.removeEventListener('hashchange', this.close);
|
|
}
|
|
setTimeout(function () {
|
|
messageBox.closeDialog();
|
|
});
|
|
},
|
|
data: function data() {
|
|
return {
|
|
uid: 1,
|
|
title: undefined,
|
|
message: '',
|
|
type: '',
|
|
iconClass: '',
|
|
customClass: '',
|
|
showInput: false,
|
|
inputValue: null,
|
|
inputPlaceholder: '',
|
|
inputType: 'text',
|
|
inputPattern: null,
|
|
inputValidator: null,
|
|
inputErrorMessage: '',
|
|
showConfirmButton: true,
|
|
showCancelButton: false,
|
|
action: '',
|
|
confirmButtonText: '',
|
|
cancelButtonText: '',
|
|
confirmButtonLoading: false,
|
|
cancelButtonLoading: false,
|
|
confirmButtonClass: '',
|
|
confirmButtonDisabled: false,
|
|
cancelButtonClass: '',
|
|
editorErrorMessage: null,
|
|
callback: null,
|
|
dangerouslyUseHTMLString: false,
|
|
focusAfterClosed: null,
|
|
isOnComposition: false,
|
|
distinguishCancelAndClose: false
|
|
};
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/message-box/src/main.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
var componentNormalizer = __webpack_require__(0);
|
|
|
|
// CONCATENATED MODULE: ./packages/message-box/src/main.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
src_mainvue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var api; }
|
|
component.options.__file = "packages/message-box/src/main.vue"
|
|
/* harmony default export */ var main = (component.exports);
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/merge"
|
|
var merge_ = __webpack_require__(9);
|
|
var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/vdom"
|
|
var vdom_ = __webpack_require__(23);
|
|
|
|
// CONCATENATED MODULE: ./packages/message-box/src/main.js
|
|
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; };
|
|
|
|
var defaults = {
|
|
title: null,
|
|
message: '',
|
|
type: '',
|
|
iconClass: '',
|
|
showInput: false,
|
|
showClose: true,
|
|
modalFade: true,
|
|
lockScroll: true,
|
|
closeOnClickModal: true,
|
|
closeOnPressEscape: true,
|
|
closeOnHashChange: true,
|
|
inputValue: null,
|
|
inputPlaceholder: '',
|
|
inputType: 'text',
|
|
inputPattern: null,
|
|
inputValidator: null,
|
|
inputErrorMessage: '',
|
|
showConfirmButton: true,
|
|
showCancelButton: false,
|
|
confirmButtonPosition: 'right',
|
|
confirmButtonHighlight: false,
|
|
cancelButtonHighlight: false,
|
|
confirmButtonText: '',
|
|
cancelButtonText: '',
|
|
confirmButtonClass: '',
|
|
cancelButtonClass: '',
|
|
customClass: '',
|
|
beforeClose: null,
|
|
dangerouslyUseHTMLString: false,
|
|
center: false,
|
|
roundButton: false,
|
|
distinguishCancelAndClose: false
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var MessageBoxConstructor = external_vue_default.a.extend(main);
|
|
|
|
var currentMsg = void 0,
|
|
instance = void 0;
|
|
var msgQueue = [];
|
|
|
|
var defaultCallback = function defaultCallback(action) {
|
|
if (currentMsg) {
|
|
var callback = currentMsg.callback;
|
|
if (typeof callback === 'function') {
|
|
if (instance.showInput) {
|
|
callback(instance.inputValue, action);
|
|
} else {
|
|
callback(action);
|
|
}
|
|
}
|
|
if (currentMsg.resolve) {
|
|
if (action === 'confirm') {
|
|
if (instance.showInput) {
|
|
currentMsg.resolve({ value: instance.inputValue, action: action });
|
|
} else {
|
|
currentMsg.resolve(action);
|
|
}
|
|
} else if (currentMsg.reject && (action === 'cancel' || action === 'close')) {
|
|
currentMsg.reject(action);
|
|
}
|
|
}
|
|
}
|
|
};
|
|
|
|
var initInstance = function initInstance() {
|
|
instance = new MessageBoxConstructor({
|
|
el: document.createElement('div')
|
|
});
|
|
|
|
instance.callback = defaultCallback;
|
|
};
|
|
|
|
var main_showNextMsg = function showNextMsg() {
|
|
if (!instance) {
|
|
initInstance();
|
|
}
|
|
instance.action = '';
|
|
|
|
if (!instance.visible || instance.closeTimer) {
|
|
if (msgQueue.length > 0) {
|
|
currentMsg = msgQueue.shift();
|
|
|
|
var options = currentMsg.options;
|
|
for (var prop in options) {
|
|
if (options.hasOwnProperty(prop)) {
|
|
instance[prop] = options[prop];
|
|
}
|
|
}
|
|
if (options.callback === undefined) {
|
|
instance.callback = defaultCallback;
|
|
}
|
|
|
|
var oldCb = instance.callback;
|
|
instance.callback = function (action, instance) {
|
|
oldCb(action, instance);
|
|
showNextMsg();
|
|
};
|
|
if (Object(vdom_["isVNode"])(instance.message)) {
|
|
instance.$slots.default = [instance.message];
|
|
instance.message = null;
|
|
} else {
|
|
delete instance.$slots.default;
|
|
}
|
|
['modal', 'showClose', 'closeOnClickModal', 'closeOnPressEscape', 'closeOnHashChange'].forEach(function (prop) {
|
|
if (instance[prop] === undefined) {
|
|
instance[prop] = true;
|
|
}
|
|
});
|
|
document.body.appendChild(instance.$el);
|
|
|
|
external_vue_default.a.nextTick(function () {
|
|
instance.visible = true;
|
|
});
|
|
}
|
|
}
|
|
};
|
|
|
|
var main_MessageBox = function MessageBox(options, callback) {
|
|
if (external_vue_default.a.prototype.$isServer) return;
|
|
if (typeof options === 'string' || Object(vdom_["isVNode"])(options)) {
|
|
options = {
|
|
message: options
|
|
};
|
|
if (typeof arguments[1] === 'string') {
|
|
options.title = arguments[1];
|
|
}
|
|
} else if (options.callback && !callback) {
|
|
callback = options.callback;
|
|
}
|
|
|
|
if (typeof Promise !== 'undefined') {
|
|
return new Promise(function (resolve, reject) {
|
|
// eslint-disable-line
|
|
msgQueue.push({
|
|
options: merge_default()({}, defaults, MessageBox.defaults, options),
|
|
callback: callback,
|
|
resolve: resolve,
|
|
reject: reject
|
|
});
|
|
|
|
main_showNextMsg();
|
|
});
|
|
} else {
|
|
msgQueue.push({
|
|
options: merge_default()({}, defaults, MessageBox.defaults, options),
|
|
callback: callback
|
|
});
|
|
|
|
main_showNextMsg();
|
|
}
|
|
};
|
|
|
|
main_MessageBox.setDefaults = function (defaults) {
|
|
main_MessageBox.defaults = defaults;
|
|
};
|
|
|
|
main_MessageBox.alert = function (message, title, options) {
|
|
if ((typeof title === 'undefined' ? 'undefined' : _typeof(title)) === 'object') {
|
|
options = title;
|
|
title = '';
|
|
} else if (title === undefined) {
|
|
title = '';
|
|
}
|
|
return main_MessageBox(merge_default()({
|
|
title: title,
|
|
message: message,
|
|
$type: 'alert',
|
|
closeOnPressEscape: false,
|
|
closeOnClickModal: false
|
|
}, options));
|
|
};
|
|
|
|
main_MessageBox.confirm = function (message, title, options) {
|
|
if ((typeof title === 'undefined' ? 'undefined' : _typeof(title)) === 'object') {
|
|
options = title;
|
|
title = '';
|
|
} else if (title === undefined) {
|
|
title = '';
|
|
}
|
|
return main_MessageBox(merge_default()({
|
|
title: title,
|
|
message: message,
|
|
$type: 'confirm',
|
|
showCancelButton: true
|
|
}, options));
|
|
};
|
|
|
|
main_MessageBox.prompt = function (message, title, options) {
|
|
if ((typeof title === 'undefined' ? 'undefined' : _typeof(title)) === 'object') {
|
|
options = title;
|
|
title = '';
|
|
} else if (title === undefined) {
|
|
title = '';
|
|
}
|
|
return main_MessageBox(merge_default()({
|
|
title: title,
|
|
message: message,
|
|
showCancelButton: true,
|
|
showInput: true,
|
|
$type: 'prompt'
|
|
}, options));
|
|
};
|
|
|
|
main_MessageBox.close = function () {
|
|
instance.doClose();
|
|
instance.visible = false;
|
|
msgQueue = [];
|
|
currentMsg = null;
|
|
};
|
|
|
|
/* harmony default export */ var src_main = (main_MessageBox);
|
|
|
|
// CONCATENATED MODULE: ./packages/message-box/index.js
|
|
|
|
/* harmony default export */ var message_box = __webpack_exports__["default"] = (src_main);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 9:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("7f4d");
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "6eeb":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__("da84");
|
|
var createNonEnumerableProperty = __webpack_require__("9112");
|
|
var has = __webpack_require__("5135");
|
|
var setGlobal = __webpack_require__("ce4e");
|
|
var inspectSource = __webpack_require__("8925");
|
|
var InternalStateModule = __webpack_require__("69f3");
|
|
|
|
var getInternalState = InternalStateModule.get;
|
|
var enforceInternalState = InternalStateModule.enforce;
|
|
var TEMPLATE = String(String).split('String');
|
|
|
|
(module.exports = function (O, key, value, options) {
|
|
var unsafe = options ? !!options.unsafe : false;
|
|
var simple = options ? !!options.enumerable : false;
|
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
if (typeof value == 'function') {
|
|
if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
|
|
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
|
}
|
|
if (O === global) {
|
|
if (simple) O[key] = value;
|
|
else setGlobal(key, value);
|
|
return;
|
|
} else if (!unsafe) {
|
|
delete O[key];
|
|
} else if (!noTargetGet && O[key]) {
|
|
simple = true;
|
|
}
|
|
if (simple) O[key] = value;
|
|
else createNonEnumerableProperty(O, key, value);
|
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
})(Function.prototype, 'toString', function toString() {
|
|
return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "6f4f":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
var anObject = __webpack_require__("77e9");
|
|
var dPs = __webpack_require__("85e7");
|
|
var enumBugKeys = __webpack_require__("9742");
|
|
var IE_PROTO = __webpack_require__("5a94")('IE_PROTO');
|
|
var Empty = function () { /* empty */ };
|
|
var PROTOTYPE = 'prototype';
|
|
|
|
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
var createDict = function () {
|
|
// Thrash, waste and sodomy: IE GC bug
|
|
var iframe = __webpack_require__("05f5")('iframe');
|
|
var i = enumBugKeys.length;
|
|
var lt = '<';
|
|
var gt = '>';
|
|
var iframeDocument;
|
|
iframe.style.display = 'none';
|
|
__webpack_require__("9141").appendChild(iframe);
|
|
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
|
|
// createDict = iframe.contentWindow.Object;
|
|
// html.removeChild(iframe);
|
|
iframeDocument = iframe.contentWindow.document;
|
|
iframeDocument.open();
|
|
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
|
|
iframeDocument.close();
|
|
createDict = iframeDocument.F;
|
|
while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
|
|
return createDict();
|
|
};
|
|
|
|
module.exports = Object.create || function create(O, Properties) {
|
|
var result;
|
|
if (O !== null) {
|
|
Empty[PROTOTYPE] = anObject(O);
|
|
result = new Empty();
|
|
Empty[PROTOTYPE] = null;
|
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
result[IE_PROTO] = O;
|
|
} else result = createDict();
|
|
return Properties === undefined ? result : dPs(result, Properties);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "6f6c":
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used to match `RegExp` flags from their coerced string values. */
|
|
var reFlags = /\w*$/;
|
|
|
|
/**
|
|
* Creates a clone of `regexp`.
|
|
*
|
|
* @private
|
|
* @param {Object} regexp The regexp to clone.
|
|
* @returns {Object} Returns the cloned regexp.
|
|
*/
|
|
function cloneRegExp(regexp) {
|
|
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
|
result.lastIndex = regexp.lastIndex;
|
|
return result;
|
|
}
|
|
|
|
module.exports = cloneRegExp;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "6fcd":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseTimes = __webpack_require__("50d8"),
|
|
isArguments = __webpack_require__("d370"),
|
|
isArray = __webpack_require__("6747"),
|
|
isBuffer = __webpack_require__("0d24"),
|
|
isIndex = __webpack_require__("c098"),
|
|
isTypedArray = __webpack_require__("73ac");
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* Creates an array of the enumerable property names of the array-like `value`.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to query.
|
|
* @param {boolean} inherited Specify returning inherited property names.
|
|
* @returns {Array} Returns the array of property names.
|
|
*/
|
|
function arrayLikeKeys(value, inherited) {
|
|
var isArr = isArray(value),
|
|
isArg = !isArr && isArguments(value),
|
|
isBuff = !isArr && !isArg && isBuffer(value),
|
|
isType = !isArr && !isArg && !isBuff && isTypedArray(value),
|
|
skipIndexes = isArr || isArg || isBuff || isType,
|
|
result = skipIndexes ? baseTimes(value.length, String) : [],
|
|
length = result.length;
|
|
|
|
for (var key in value) {
|
|
if ((inherited || hasOwnProperty.call(value, key)) &&
|
|
!(skipIndexes && (
|
|
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
key == 'length' ||
|
|
// Node.js 0.10 has enumerable non-index properties on buffers.
|
|
(isBuff && (key == 'offset' || key == 'parent')) ||
|
|
// PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
|
|
// Skip index properties.
|
|
isIndex(key, length)
|
|
))) {
|
|
result.push(key);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = arrayLikeKeys;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "71bc":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "722f":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
|
|
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; };
|
|
|
|
var _ariaUtils = __webpack_require__("e452");
|
|
|
|
var _ariaUtils2 = _interopRequireDefault(_ariaUtils);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
/**
|
|
* @constructor
|
|
* @desc Dialog object providing modal focus management.
|
|
*
|
|
* Assumptions: The element serving as the dialog container is present in the
|
|
* DOM and hidden. The dialog container has role='dialog'.
|
|
*
|
|
* @param dialogId
|
|
* The ID of the element serving as the dialog container.
|
|
* @param focusAfterClosed
|
|
* Either the DOM node or the ID of the DOM node to focus when the
|
|
* dialog closes.
|
|
* @param focusFirst
|
|
* Optional parameter containing either the DOM node or the ID of the
|
|
* DOM node to focus when the dialog opens. If not specified, the
|
|
* first focusable element in the dialog will receive focus.
|
|
*/
|
|
var aria = aria || {};
|
|
var tabEvent;
|
|
|
|
aria.Dialog = function (dialog, focusAfterClosed, focusFirst) {
|
|
var _this = this;
|
|
|
|
this.dialogNode = dialog;
|
|
if (this.dialogNode === null || this.dialogNode.getAttribute('role') !== 'dialog') {
|
|
throw new Error('Dialog() requires a DOM element with ARIA role of dialog.');
|
|
}
|
|
|
|
if (typeof focusAfterClosed === 'string') {
|
|
this.focusAfterClosed = document.getElementById(focusAfterClosed);
|
|
} else if ((typeof focusAfterClosed === 'undefined' ? 'undefined' : _typeof(focusAfterClosed)) === 'object') {
|
|
this.focusAfterClosed = focusAfterClosed;
|
|
} else {
|
|
this.focusAfterClosed = null;
|
|
}
|
|
|
|
if (typeof focusFirst === 'string') {
|
|
this.focusFirst = document.getElementById(focusFirst);
|
|
} else if ((typeof focusFirst === 'undefined' ? 'undefined' : _typeof(focusFirst)) === 'object') {
|
|
this.focusFirst = focusFirst;
|
|
} else {
|
|
this.focusFirst = null;
|
|
}
|
|
|
|
if (this.focusFirst) {
|
|
this.focusFirst.focus();
|
|
} else {
|
|
_ariaUtils2.default.focusFirstDescendant(this.dialogNode);
|
|
}
|
|
|
|
this.lastFocus = document.activeElement;
|
|
tabEvent = function tabEvent(e) {
|
|
_this.trapFocus(e);
|
|
};
|
|
this.addListeners();
|
|
};
|
|
|
|
aria.Dialog.prototype.addListeners = function () {
|
|
document.addEventListener('focus', tabEvent, true);
|
|
};
|
|
|
|
aria.Dialog.prototype.removeListeners = function () {
|
|
document.removeEventListener('focus', tabEvent, true);
|
|
};
|
|
|
|
aria.Dialog.prototype.closeDialog = function () {
|
|
var _this2 = this;
|
|
|
|
this.removeListeners();
|
|
if (this.focusAfterClosed) {
|
|
setTimeout(function () {
|
|
_this2.focusAfterClosed.focus();
|
|
});
|
|
}
|
|
};
|
|
|
|
aria.Dialog.prototype.trapFocus = function (event) {
|
|
if (_ariaUtils2.default.IgnoreUtilFocusChanges) {
|
|
return;
|
|
}
|
|
if (this.dialogNode.contains(event.target)) {
|
|
this.lastFocus = event.target;
|
|
} else {
|
|
_ariaUtils2.default.focusFirstDescendant(this.dialogNode);
|
|
if (this.lastFocus === document.activeElement) {
|
|
_ariaUtils2.default.focusLastDescendant(this.dialogNode);
|
|
}
|
|
this.lastFocus = document.activeElement;
|
|
}
|
|
};
|
|
|
|
exports.default = aria.Dialog;
|
|
|
|
/***/ }),
|
|
|
|
/***/ "73ac":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseIsTypedArray = __webpack_require__("743f"),
|
|
baseUnary = __webpack_require__("b047"),
|
|
nodeUtil = __webpack_require__("99d3");
|
|
|
|
/* Node.js helper references. */
|
|
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
|
|
/**
|
|
* Checks if `value` is classified as a typed array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
* @example
|
|
*
|
|
* _.isTypedArray(new Uint8Array);
|
|
* // => true
|
|
*
|
|
* _.isTypedArray([]);
|
|
* // => false
|
|
*/
|
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
|
|
module.exports = isTypedArray;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "7418":
|
|
/***/ (function(module, exports) {
|
|
|
|
exports.f = Object.getOwnPropertySymbols;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "743f":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseGetTag = __webpack_require__("3729"),
|
|
isLength = __webpack_require__("b218"),
|
|
isObjectLike = __webpack_require__("1310");
|
|
|
|
/** `Object#toString` result references. */
|
|
var argsTag = '[object Arguments]',
|
|
arrayTag = '[object Array]',
|
|
boolTag = '[object Boolean]',
|
|
dateTag = '[object Date]',
|
|
errorTag = '[object Error]',
|
|
funcTag = '[object Function]',
|
|
mapTag = '[object Map]',
|
|
numberTag = '[object Number]',
|
|
objectTag = '[object Object]',
|
|
regexpTag = '[object RegExp]',
|
|
setTag = '[object Set]',
|
|
stringTag = '[object String]',
|
|
weakMapTag = '[object WeakMap]';
|
|
|
|
var arrayBufferTag = '[object ArrayBuffer]',
|
|
dataViewTag = '[object DataView]',
|
|
float32Tag = '[object Float32Array]',
|
|
float64Tag = '[object Float64Array]',
|
|
int8Tag = '[object Int8Array]',
|
|
int16Tag = '[object Int16Array]',
|
|
int32Tag = '[object Int32Array]',
|
|
uint8Tag = '[object Uint8Array]',
|
|
uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
uint16Tag = '[object Uint16Array]',
|
|
uint32Tag = '[object Uint32Array]';
|
|
|
|
/** Used to identify `toStringTag` values of typed arrays. */
|
|
var typedArrayTags = {};
|
|
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
|
|
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
|
|
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
|
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
|
typedArrayTags[uint32Tag] = true;
|
|
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
|
|
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
|
|
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
|
|
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
|
|
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
|
|
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
|
|
typedArrayTags[setTag] = typedArrayTags[stringTag] =
|
|
typedArrayTags[weakMapTag] = false;
|
|
|
|
/**
|
|
* The base implementation of `_.isTypedArray` without Node.js optimizations.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
*/
|
|
function baseIsTypedArray(value) {
|
|
return isObjectLike(value) &&
|
|
isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
}
|
|
|
|
module.exports = baseIsTypedArray;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "7464":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 54);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 0:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
|
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
function normalizeComponent (
|
|
scriptExports,
|
|
render,
|
|
staticRenderFns,
|
|
functionalTemplate,
|
|
injectStyles,
|
|
scopeId,
|
|
moduleIdentifier, /* server only */
|
|
shadowMode /* vue-cli only */
|
|
) {
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (render) {
|
|
options.render = render
|
|
options.staticRenderFns = staticRenderFns
|
|
options._compiled = true
|
|
}
|
|
|
|
// functional template
|
|
if (functionalTemplate) {
|
|
options.functional = true
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = 'data-v-' + scopeId
|
|
}
|
|
|
|
var hook
|
|
if (moduleIdentifier) { // server build
|
|
hook = function (context) {
|
|
// 2.3 injection
|
|
context =
|
|
context || // cached call
|
|
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
// 2.2 with runInNewContext: true
|
|
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
context = __VUE_SSR_CONTEXT__
|
|
}
|
|
// inject component styles
|
|
if (injectStyles) {
|
|
injectStyles.call(this, context)
|
|
}
|
|
// register component module identifier for async chunk inferrence
|
|
if (context && context._registeredComponents) {
|
|
context._registeredComponents.add(moduleIdentifier)
|
|
}
|
|
}
|
|
// used by ssr in case component is cached and beforeCreate
|
|
// never gets called
|
|
options._ssrRegister = hook
|
|
} else if (injectStyles) {
|
|
hook = shadowMode
|
|
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
|
: injectStyles
|
|
}
|
|
|
|
if (hook) {
|
|
if (options.functional) {
|
|
// for template-only hot-reload because in that case the render fn doesn't
|
|
// go through the normalizer
|
|
options._injectStyles = hook
|
|
// register for functioal component in vue file
|
|
var originalRender = options.render
|
|
options.render = function renderWithStyleInjection (h, context) {
|
|
hook.call(context)
|
|
return originalRender(h, context)
|
|
}
|
|
} else {
|
|
// inject component registration as beforeCreate hook
|
|
var existing = options.beforeCreate
|
|
options.beforeCreate = existing
|
|
? [].concat(existing, hook)
|
|
: [hook]
|
|
}
|
|
}
|
|
|
|
return {
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 10:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("f3ad");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 12:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("417f");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 13:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("eedf");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 4:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("d010");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 5:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("e974");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 54:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/main.vue?vue&type=template&id=55c8ade7&
|
|
var render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"div",
|
|
{
|
|
directives: [
|
|
{
|
|
name: "clickoutside",
|
|
rawName: "v-clickoutside",
|
|
value: _vm.hide,
|
|
expression: "hide"
|
|
}
|
|
],
|
|
class: [
|
|
"el-color-picker",
|
|
_vm.colorDisabled ? "is-disabled" : "",
|
|
_vm.colorSize ? "el-color-picker--" + _vm.colorSize : ""
|
|
]
|
|
},
|
|
[
|
|
_vm.colorDisabled
|
|
? _c("div", { staticClass: "el-color-picker__mask" })
|
|
: _vm._e(),
|
|
_c(
|
|
"div",
|
|
{
|
|
staticClass: "el-color-picker__trigger",
|
|
on: { click: _vm.handleTrigger }
|
|
},
|
|
[
|
|
_c(
|
|
"span",
|
|
{
|
|
staticClass: "el-color-picker__color",
|
|
class: { "is-alpha": _vm.showAlpha }
|
|
},
|
|
[
|
|
_c("span", {
|
|
staticClass: "el-color-picker__color-inner",
|
|
style: {
|
|
backgroundColor: _vm.displayedColor
|
|
}
|
|
}),
|
|
!_vm.value && !_vm.showPanelColor
|
|
? _c("span", {
|
|
staticClass: "el-color-picker__empty el-icon-close"
|
|
})
|
|
: _vm._e()
|
|
]
|
|
),
|
|
_c("span", {
|
|
directives: [
|
|
{
|
|
name: "show",
|
|
rawName: "v-show",
|
|
value: _vm.value || _vm.showPanelColor,
|
|
expression: "value || showPanelColor"
|
|
}
|
|
],
|
|
staticClass: "el-color-picker__icon el-icon-arrow-down"
|
|
})
|
|
]
|
|
),
|
|
_c("picker-dropdown", {
|
|
ref: "dropdown",
|
|
class: ["el-color-picker__panel", _vm.popperClass || ""],
|
|
attrs: {
|
|
color: _vm.color,
|
|
"show-alpha": _vm.showAlpha,
|
|
predefine: _vm.predefine
|
|
},
|
|
on: { pick: _vm.confirmValue, clear: _vm.clearValue },
|
|
model: {
|
|
value: _vm.showPicker,
|
|
callback: function($$v) {
|
|
_vm.showPicker = $$v
|
|
},
|
|
expression: "showPicker"
|
|
}
|
|
})
|
|
],
|
|
1
|
|
)
|
|
}
|
|
var staticRenderFns = []
|
|
render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/main.vue?vue&type=template&id=55c8ade7&
|
|
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/color.js
|
|
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
var hsv2hsl = function hsv2hsl(hue, sat, val) {
|
|
return [hue, sat * val / ((hue = (2 - sat) * val) < 1 ? hue : 2 - hue) || 0, hue / 2];
|
|
};
|
|
|
|
// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
|
|
// <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
|
|
var isOnePointZero = function isOnePointZero(n) {
|
|
return typeof n === 'string' && n.indexOf('.') !== -1 && parseFloat(n) === 1;
|
|
};
|
|
|
|
var isPercentage = function isPercentage(n) {
|
|
return typeof n === 'string' && n.indexOf('%') !== -1;
|
|
};
|
|
|
|
// Take input from [0, n] and return it as [0, 1]
|
|
var bound01 = function bound01(value, max) {
|
|
if (isOnePointZero(value)) value = '100%';
|
|
|
|
var processPercent = isPercentage(value);
|
|
value = Math.min(max, Math.max(0, parseFloat(value)));
|
|
|
|
// Automatically convert percentage into number
|
|
if (processPercent) {
|
|
value = parseInt(value * max, 10) / 100;
|
|
}
|
|
|
|
// Handle floating point rounding errors
|
|
if (Math.abs(value - max) < 0.000001) {
|
|
return 1;
|
|
}
|
|
|
|
// Convert into [0, 1] range if it isn't already
|
|
return value % max / parseFloat(max);
|
|
};
|
|
|
|
var INT_HEX_MAP = { 10: 'A', 11: 'B', 12: 'C', 13: 'D', 14: 'E', 15: 'F' };
|
|
|
|
var toHex = function toHex(_ref) {
|
|
var r = _ref.r,
|
|
g = _ref.g,
|
|
b = _ref.b;
|
|
|
|
var hexOne = function hexOne(value) {
|
|
value = Math.min(Math.round(value), 255);
|
|
var high = Math.floor(value / 16);
|
|
var low = value % 16;
|
|
return '' + (INT_HEX_MAP[high] || high) + (INT_HEX_MAP[low] || low);
|
|
};
|
|
|
|
if (isNaN(r) || isNaN(g) || isNaN(b)) return '';
|
|
|
|
return '#' + hexOne(r) + hexOne(g) + hexOne(b);
|
|
};
|
|
|
|
var HEX_INT_MAP = { A: 10, B: 11, C: 12, D: 13, E: 14, F: 15 };
|
|
|
|
var parseHexChannel = function parseHexChannel(hex) {
|
|
if (hex.length === 2) {
|
|
return (HEX_INT_MAP[hex[0].toUpperCase()] || +hex[0]) * 16 + (HEX_INT_MAP[hex[1].toUpperCase()] || +hex[1]);
|
|
}
|
|
|
|
return HEX_INT_MAP[hex[1].toUpperCase()] || +hex[1];
|
|
};
|
|
|
|
var hsl2hsv = function hsl2hsv(hue, sat, light) {
|
|
sat = sat / 100;
|
|
light = light / 100;
|
|
var smin = sat;
|
|
var lmin = Math.max(light, 0.01);
|
|
var sv = void 0;
|
|
var v = void 0;
|
|
|
|
light *= 2;
|
|
sat *= light <= 1 ? light : 2 - light;
|
|
smin *= lmin <= 1 ? lmin : 2 - lmin;
|
|
v = (light + sat) / 2;
|
|
sv = light === 0 ? 2 * smin / (lmin + smin) : 2 * sat / (light + sat);
|
|
|
|
return {
|
|
h: hue,
|
|
s: sv * 100,
|
|
v: v * 100
|
|
};
|
|
};
|
|
|
|
// `rgbToHsv`
|
|
// Converts an RGB color value to HSV
|
|
// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
|
|
// *Returns:* { h, s, v } in [0,1]
|
|
var rgb2hsv = function rgb2hsv(r, g, b) {
|
|
r = bound01(r, 255);
|
|
g = bound01(g, 255);
|
|
b = bound01(b, 255);
|
|
|
|
var max = Math.max(r, g, b);
|
|
var min = Math.min(r, g, b);
|
|
var h = void 0,
|
|
s = void 0;
|
|
var v = max;
|
|
|
|
var d = max - min;
|
|
s = max === 0 ? 0 : d / max;
|
|
|
|
if (max === min) {
|
|
h = 0; // achromatic
|
|
} else {
|
|
switch (max) {
|
|
case r:
|
|
h = (g - b) / d + (g < b ? 6 : 0);
|
|
break;
|
|
case g:
|
|
h = (b - r) / d + 2;
|
|
break;
|
|
case b:
|
|
h = (r - g) / d + 4;
|
|
break;
|
|
}
|
|
h /= 6;
|
|
}
|
|
|
|
return { h: h * 360, s: s * 100, v: v * 100 };
|
|
};
|
|
|
|
// `hsvToRgb`
|
|
// Converts an HSV color value to RGB.
|
|
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
|
|
// *Returns:* { r, g, b } in the set [0, 255]
|
|
var hsv2rgb = function hsv2rgb(h, s, v) {
|
|
h = bound01(h, 360) * 6;
|
|
s = bound01(s, 100);
|
|
v = bound01(v, 100);
|
|
|
|
var i = Math.floor(h);
|
|
var f = h - i;
|
|
var p = v * (1 - s);
|
|
var q = v * (1 - f * s);
|
|
var t = v * (1 - (1 - f) * s);
|
|
var mod = i % 6;
|
|
var r = [v, q, p, p, t, v][mod];
|
|
var g = [t, v, v, q, p, p][mod];
|
|
var b = [p, p, t, v, v, q][mod];
|
|
|
|
return {
|
|
r: Math.round(r * 255),
|
|
g: Math.round(g * 255),
|
|
b: Math.round(b * 255)
|
|
};
|
|
};
|
|
|
|
var Color = function () {
|
|
function Color(options) {
|
|
_classCallCheck(this, Color);
|
|
|
|
this._hue = 0;
|
|
this._saturation = 100;
|
|
this._value = 100;
|
|
this._alpha = 100;
|
|
|
|
this.enableAlpha = false;
|
|
this.format = 'hex';
|
|
this.value = '';
|
|
|
|
options = options || {};
|
|
|
|
for (var option in options) {
|
|
if (options.hasOwnProperty(option)) {
|
|
this[option] = options[option];
|
|
}
|
|
}
|
|
|
|
this.doOnChange();
|
|
}
|
|
|
|
Color.prototype.set = function set(prop, value) {
|
|
if (arguments.length === 1 && (typeof prop === 'undefined' ? 'undefined' : _typeof(prop)) === 'object') {
|
|
for (var p in prop) {
|
|
if (prop.hasOwnProperty(p)) {
|
|
this.set(p, prop[p]);
|
|
}
|
|
}
|
|
|
|
return;
|
|
}
|
|
|
|
this['_' + prop] = value;
|
|
this.doOnChange();
|
|
};
|
|
|
|
Color.prototype.get = function get(prop) {
|
|
return this['_' + prop];
|
|
};
|
|
|
|
Color.prototype.toRgb = function toRgb() {
|
|
return hsv2rgb(this._hue, this._saturation, this._value);
|
|
};
|
|
|
|
Color.prototype.fromString = function fromString(value) {
|
|
var _this = this;
|
|
|
|
if (!value) {
|
|
this._hue = 0;
|
|
this._saturation = 100;
|
|
this._value = 100;
|
|
|
|
this.doOnChange();
|
|
return;
|
|
}
|
|
|
|
var fromHSV = function fromHSV(h, s, v) {
|
|
_this._hue = Math.max(0, Math.min(360, h));
|
|
_this._saturation = Math.max(0, Math.min(100, s));
|
|
_this._value = Math.max(0, Math.min(100, v));
|
|
|
|
_this.doOnChange();
|
|
};
|
|
|
|
if (value.indexOf('hsl') !== -1) {
|
|
var parts = value.replace(/hsla|hsl|\(|\)/gm, '').split(/\s|,/g).filter(function (val) {
|
|
return val !== '';
|
|
}).map(function (val, index) {
|
|
return index > 2 ? parseFloat(val) : parseInt(val, 10);
|
|
});
|
|
|
|
if (parts.length === 4) {
|
|
this._alpha = Math.floor(parseFloat(parts[3]) * 100);
|
|
} else if (parts.length === 3) {
|
|
this._alpha = 100;
|
|
}
|
|
if (parts.length >= 3) {
|
|
var _hsl2hsv = hsl2hsv(parts[0], parts[1], parts[2]),
|
|
h = _hsl2hsv.h,
|
|
s = _hsl2hsv.s,
|
|
v = _hsl2hsv.v;
|
|
|
|
fromHSV(h, s, v);
|
|
}
|
|
} else if (value.indexOf('hsv') !== -1) {
|
|
var _parts = value.replace(/hsva|hsv|\(|\)/gm, '').split(/\s|,/g).filter(function (val) {
|
|
return val !== '';
|
|
}).map(function (val, index) {
|
|
return index > 2 ? parseFloat(val) : parseInt(val, 10);
|
|
});
|
|
|
|
if (_parts.length === 4) {
|
|
this._alpha = Math.floor(parseFloat(_parts[3]) * 100);
|
|
} else if (_parts.length === 3) {
|
|
this._alpha = 100;
|
|
}
|
|
if (_parts.length >= 3) {
|
|
fromHSV(_parts[0], _parts[1], _parts[2]);
|
|
}
|
|
} else if (value.indexOf('rgb') !== -1) {
|
|
var _parts2 = value.replace(/rgba|rgb|\(|\)/gm, '').split(/\s|,/g).filter(function (val) {
|
|
return val !== '';
|
|
}).map(function (val, index) {
|
|
return index > 2 ? parseFloat(val) : parseInt(val, 10);
|
|
});
|
|
|
|
if (_parts2.length === 4) {
|
|
this._alpha = Math.floor(parseFloat(_parts2[3]) * 100);
|
|
} else if (_parts2.length === 3) {
|
|
this._alpha = 100;
|
|
}
|
|
if (_parts2.length >= 3) {
|
|
var _rgb2hsv = rgb2hsv(_parts2[0], _parts2[1], _parts2[2]),
|
|
_h = _rgb2hsv.h,
|
|
_s = _rgb2hsv.s,
|
|
_v = _rgb2hsv.v;
|
|
|
|
fromHSV(_h, _s, _v);
|
|
}
|
|
} else if (value.indexOf('#') !== -1) {
|
|
var hex = value.replace('#', '').trim();
|
|
if (!/^(?:[0-9a-fA-F]{3}){1,2}$/.test(hex)) return;
|
|
var r = void 0,
|
|
g = void 0,
|
|
b = void 0;
|
|
|
|
if (hex.length === 3) {
|
|
r = parseHexChannel(hex[0] + hex[0]);
|
|
g = parseHexChannel(hex[1] + hex[1]);
|
|
b = parseHexChannel(hex[2] + hex[2]);
|
|
} else if (hex.length === 6 || hex.length === 8) {
|
|
r = parseHexChannel(hex.substring(0, 2));
|
|
g = parseHexChannel(hex.substring(2, 4));
|
|
b = parseHexChannel(hex.substring(4, 6));
|
|
}
|
|
|
|
if (hex.length === 8) {
|
|
this._alpha = Math.floor(parseHexChannel(hex.substring(6)) / 255 * 100);
|
|
} else if (hex.length === 3 || hex.length === 6) {
|
|
this._alpha = 100;
|
|
}
|
|
|
|
var _rgb2hsv2 = rgb2hsv(r, g, b),
|
|
_h2 = _rgb2hsv2.h,
|
|
_s2 = _rgb2hsv2.s,
|
|
_v2 = _rgb2hsv2.v;
|
|
|
|
fromHSV(_h2, _s2, _v2);
|
|
}
|
|
};
|
|
|
|
Color.prototype.compare = function compare(color) {
|
|
return Math.abs(color._hue - this._hue) < 2 && Math.abs(color._saturation - this._saturation) < 1 && Math.abs(color._value - this._value) < 1 && Math.abs(color._alpha - this._alpha) < 1;
|
|
};
|
|
|
|
Color.prototype.doOnChange = function doOnChange() {
|
|
var _hue = this._hue,
|
|
_saturation = this._saturation,
|
|
_value = this._value,
|
|
_alpha = this._alpha,
|
|
format = this.format;
|
|
|
|
|
|
if (this.enableAlpha) {
|
|
switch (format) {
|
|
case 'hsl':
|
|
var hsl = hsv2hsl(_hue, _saturation / 100, _value / 100);
|
|
this.value = 'hsla(' + _hue + ', ' + Math.round(hsl[1] * 100) + '%, ' + Math.round(hsl[2] * 100) + '%, ' + _alpha / 100 + ')';
|
|
break;
|
|
case 'hsv':
|
|
this.value = 'hsva(' + _hue + ', ' + Math.round(_saturation) + '%, ' + Math.round(_value) + '%, ' + _alpha / 100 + ')';
|
|
break;
|
|
default:
|
|
var _hsv2rgb = hsv2rgb(_hue, _saturation, _value),
|
|
r = _hsv2rgb.r,
|
|
g = _hsv2rgb.g,
|
|
b = _hsv2rgb.b;
|
|
|
|
this.value = 'rgba(' + r + ', ' + g + ', ' + b + ', ' + _alpha / 100 + ')';
|
|
}
|
|
} else {
|
|
switch (format) {
|
|
case 'hsl':
|
|
var _hsl = hsv2hsl(_hue, _saturation / 100, _value / 100);
|
|
this.value = 'hsl(' + _hue + ', ' + Math.round(_hsl[1] * 100) + '%, ' + Math.round(_hsl[2] * 100) + '%)';
|
|
break;
|
|
case 'hsv':
|
|
this.value = 'hsv(' + _hue + ', ' + Math.round(_saturation) + '%, ' + Math.round(_value) + '%)';
|
|
break;
|
|
case 'rgb':
|
|
var _hsv2rgb2 = hsv2rgb(_hue, _saturation, _value),
|
|
_r = _hsv2rgb2.r,
|
|
_g = _hsv2rgb2.g,
|
|
_b = _hsv2rgb2.b;
|
|
|
|
this.value = 'rgb(' + _r + ', ' + _g + ', ' + _b + ')';
|
|
break;
|
|
default:
|
|
this.value = toHex(hsv2rgb(_hue, _saturation, _value));
|
|
}
|
|
}
|
|
};
|
|
|
|
return Color;
|
|
}();
|
|
|
|
/* harmony default export */ var src_color = (Color);
|
|
;
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/picker-dropdown.vue?vue&type=template&id=06601625&
|
|
var picker_dropdownvue_type_template_id_06601625_render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"transition",
|
|
{ attrs: { name: "el-zoom-in-top" }, on: { "after-leave": _vm.doDestroy } },
|
|
[
|
|
_c(
|
|
"div",
|
|
{
|
|
directives: [
|
|
{
|
|
name: "show",
|
|
rawName: "v-show",
|
|
value: _vm.showPopper,
|
|
expression: "showPopper"
|
|
}
|
|
],
|
|
staticClass: "el-color-dropdown"
|
|
},
|
|
[
|
|
_c(
|
|
"div",
|
|
{ staticClass: "el-color-dropdown__main-wrapper" },
|
|
[
|
|
_c("hue-slider", {
|
|
ref: "hue",
|
|
staticStyle: { float: "right" },
|
|
attrs: { color: _vm.color, vertical: "" }
|
|
}),
|
|
_c("sv-panel", { ref: "sl", attrs: { color: _vm.color } })
|
|
],
|
|
1
|
|
),
|
|
_vm.showAlpha
|
|
? _c("alpha-slider", { ref: "alpha", attrs: { color: _vm.color } })
|
|
: _vm._e(),
|
|
_vm.predefine
|
|
? _c("predefine", {
|
|
attrs: { color: _vm.color, colors: _vm.predefine }
|
|
})
|
|
: _vm._e(),
|
|
_c(
|
|
"div",
|
|
{ staticClass: "el-color-dropdown__btns" },
|
|
[
|
|
_c(
|
|
"span",
|
|
{ staticClass: "el-color-dropdown__value" },
|
|
[
|
|
_c("el-input", {
|
|
attrs: { "validate-event": false, size: "mini" },
|
|
on: { blur: _vm.handleConfirm },
|
|
nativeOn: {
|
|
keyup: function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k(
|
|
$event.keyCode,
|
|
"enter",
|
|
13,
|
|
$event.key,
|
|
"Enter"
|
|
)
|
|
) {
|
|
return null
|
|
}
|
|
return _vm.handleConfirm($event)
|
|
}
|
|
},
|
|
model: {
|
|
value: _vm.customInput,
|
|
callback: function($$v) {
|
|
_vm.customInput = $$v
|
|
},
|
|
expression: "customInput"
|
|
}
|
|
})
|
|
],
|
|
1
|
|
),
|
|
_c(
|
|
"el-button",
|
|
{
|
|
staticClass: "el-color-dropdown__link-btn",
|
|
attrs: { size: "mini", type: "text" },
|
|
on: {
|
|
click: function($event) {
|
|
_vm.$emit("clear")
|
|
}
|
|
}
|
|
},
|
|
[
|
|
_vm._v(
|
|
"\n " +
|
|
_vm._s(_vm.t("el.colorpicker.clear")) +
|
|
"\n "
|
|
)
|
|
]
|
|
),
|
|
_c(
|
|
"el-button",
|
|
{
|
|
staticClass: "el-color-dropdown__btn",
|
|
attrs: { plain: "", size: "mini" },
|
|
on: { click: _vm.confirmValue }
|
|
},
|
|
[
|
|
_vm._v(
|
|
"\n " +
|
|
_vm._s(_vm.t("el.colorpicker.confirm")) +
|
|
"\n "
|
|
)
|
|
]
|
|
)
|
|
],
|
|
1
|
|
)
|
|
],
|
|
1
|
|
)
|
|
]
|
|
)
|
|
}
|
|
var picker_dropdownvue_type_template_id_06601625_staticRenderFns = []
|
|
picker_dropdownvue_type_template_id_06601625_render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/components/picker-dropdown.vue?vue&type=template&id=06601625&
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/sv-panel.vue?vue&type=template&id=d8583596&
|
|
var sv_panelvue_type_template_id_d8583596_render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"div",
|
|
{
|
|
staticClass: "el-color-svpanel",
|
|
style: {
|
|
backgroundColor: _vm.background
|
|
}
|
|
},
|
|
[
|
|
_c("div", { staticClass: "el-color-svpanel__white" }),
|
|
_c("div", { staticClass: "el-color-svpanel__black" }),
|
|
_c(
|
|
"div",
|
|
{
|
|
staticClass: "el-color-svpanel__cursor",
|
|
style: {
|
|
top: _vm.cursorTop + "px",
|
|
left: _vm.cursorLeft + "px"
|
|
}
|
|
},
|
|
[_c("div")]
|
|
)
|
|
]
|
|
)
|
|
}
|
|
var sv_panelvue_type_template_id_d8583596_staticRenderFns = []
|
|
sv_panelvue_type_template_id_d8583596_render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/components/sv-panel.vue?vue&type=template&id=d8583596&
|
|
|
|
// EXTERNAL MODULE: external "vue"
|
|
var external_vue_ = __webpack_require__(7);
|
|
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
|
|
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/draggable.js
|
|
|
|
var isDragging = false;
|
|
|
|
/* harmony default export */ var draggable = (function (element, options) {
|
|
if (external_vue_default.a.prototype.$isServer) return;
|
|
var moveFn = function moveFn(event) {
|
|
if (options.drag) {
|
|
options.drag(event);
|
|
}
|
|
};
|
|
var upFn = function upFn(event) {
|
|
document.removeEventListener('mousemove', moveFn);
|
|
document.removeEventListener('mouseup', upFn);
|
|
document.onselectstart = null;
|
|
document.ondragstart = null;
|
|
|
|
isDragging = false;
|
|
|
|
if (options.end) {
|
|
options.end(event);
|
|
}
|
|
};
|
|
element.addEventListener('mousedown', function (event) {
|
|
if (isDragging) return;
|
|
document.onselectstart = function () {
|
|
return false;
|
|
};
|
|
document.ondragstart = function () {
|
|
return false;
|
|
};
|
|
|
|
document.addEventListener('mousemove', moveFn);
|
|
document.addEventListener('mouseup', upFn);
|
|
isDragging = true;
|
|
|
|
if (options.start) {
|
|
options.start(event);
|
|
}
|
|
});
|
|
});
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/sv-panel.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
/* harmony default export */ var sv_panelvue_type_script_lang_js_ = ({
|
|
name: 'el-sl-panel',
|
|
|
|
props: {
|
|
color: {
|
|
required: true
|
|
}
|
|
},
|
|
|
|
computed: {
|
|
colorValue: function colorValue() {
|
|
var hue = this.color.get('hue');
|
|
var value = this.color.get('value');
|
|
return { hue: hue, value: value };
|
|
}
|
|
},
|
|
|
|
watch: {
|
|
colorValue: function colorValue() {
|
|
this.update();
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
update: function update() {
|
|
var saturation = this.color.get('saturation');
|
|
var value = this.color.get('value');
|
|
|
|
var el = this.$el;
|
|
var width = el.clientWidth,
|
|
height = el.clientHeight;
|
|
|
|
|
|
this.cursorLeft = saturation * width / 100;
|
|
this.cursorTop = (100 - value) * height / 100;
|
|
|
|
this.background = 'hsl(' + this.color.get('hue') + ', 100%, 50%)';
|
|
},
|
|
handleDrag: function handleDrag(event) {
|
|
var el = this.$el;
|
|
var rect = el.getBoundingClientRect();
|
|
|
|
var left = event.clientX - rect.left;
|
|
var top = event.clientY - rect.top;
|
|
left = Math.max(0, left);
|
|
left = Math.min(left, rect.width);
|
|
|
|
top = Math.max(0, top);
|
|
top = Math.min(top, rect.height);
|
|
|
|
this.cursorLeft = left;
|
|
this.cursorTop = top;
|
|
this.color.set({
|
|
saturation: left / rect.width * 100,
|
|
value: 100 - top / rect.height * 100
|
|
});
|
|
}
|
|
},
|
|
|
|
mounted: function mounted() {
|
|
var _this = this;
|
|
|
|
draggable(this.$el, {
|
|
drag: function drag(event) {
|
|
_this.handleDrag(event);
|
|
},
|
|
end: function end(event) {
|
|
_this.handleDrag(event);
|
|
}
|
|
});
|
|
|
|
this.update();
|
|
},
|
|
data: function data() {
|
|
return {
|
|
cursorTop: 0,
|
|
cursorLeft: 0,
|
|
background: 'hsl(0, 100%, 50%)'
|
|
};
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/components/sv-panel.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var components_sv_panelvue_type_script_lang_js_ = (sv_panelvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
var componentNormalizer = __webpack_require__(0);
|
|
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/components/sv-panel.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
components_sv_panelvue_type_script_lang_js_,
|
|
sv_panelvue_type_template_id_d8583596_render,
|
|
sv_panelvue_type_template_id_d8583596_staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var api; }
|
|
component.options.__file = "packages/color-picker/src/components/sv-panel.vue"
|
|
/* harmony default export */ var sv_panel = (component.exports);
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/hue-slider.vue?vue&type=template&id=5cdc43b1&
|
|
var hue_slidervue_type_template_id_5cdc43b1_render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"div",
|
|
{
|
|
staticClass: "el-color-hue-slider",
|
|
class: { "is-vertical": _vm.vertical }
|
|
},
|
|
[
|
|
_c("div", {
|
|
ref: "bar",
|
|
staticClass: "el-color-hue-slider__bar",
|
|
on: { click: _vm.handleClick }
|
|
}),
|
|
_c("div", {
|
|
ref: "thumb",
|
|
staticClass: "el-color-hue-slider__thumb",
|
|
style: {
|
|
left: _vm.thumbLeft + "px",
|
|
top: _vm.thumbTop + "px"
|
|
}
|
|
})
|
|
]
|
|
)
|
|
}
|
|
var hue_slidervue_type_template_id_5cdc43b1_staticRenderFns = []
|
|
hue_slidervue_type_template_id_5cdc43b1_render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/components/hue-slider.vue?vue&type=template&id=5cdc43b1&
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/hue-slider.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
/* harmony default export */ var hue_slidervue_type_script_lang_js_ = ({
|
|
name: 'el-color-hue-slider',
|
|
|
|
props: {
|
|
color: {
|
|
required: true
|
|
},
|
|
|
|
vertical: Boolean
|
|
},
|
|
|
|
data: function data() {
|
|
return {
|
|
thumbLeft: 0,
|
|
thumbTop: 0
|
|
};
|
|
},
|
|
|
|
|
|
computed: {
|
|
hueValue: function hueValue() {
|
|
var hue = this.color.get('hue');
|
|
return hue;
|
|
}
|
|
},
|
|
|
|
watch: {
|
|
hueValue: function hueValue() {
|
|
this.update();
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
handleClick: function handleClick(event) {
|
|
var thumb = this.$refs.thumb;
|
|
var target = event.target;
|
|
|
|
if (target !== thumb) {
|
|
this.handleDrag(event);
|
|
}
|
|
},
|
|
handleDrag: function handleDrag(event) {
|
|
var rect = this.$el.getBoundingClientRect();
|
|
var thumb = this.$refs.thumb;
|
|
|
|
var hue = void 0;
|
|
|
|
if (!this.vertical) {
|
|
var left = event.clientX - rect.left;
|
|
left = Math.min(left, rect.width - thumb.offsetWidth / 2);
|
|
left = Math.max(thumb.offsetWidth / 2, left);
|
|
|
|
hue = Math.round((left - thumb.offsetWidth / 2) / (rect.width - thumb.offsetWidth) * 360);
|
|
} else {
|
|
var top = event.clientY - rect.top;
|
|
top = Math.min(top, rect.height - thumb.offsetHeight / 2);
|
|
top = Math.max(thumb.offsetHeight / 2, top);
|
|
|
|
hue = Math.round((top - thumb.offsetHeight / 2) / (rect.height - thumb.offsetHeight) * 360);
|
|
}
|
|
|
|
this.color.set('hue', hue);
|
|
},
|
|
getThumbLeft: function getThumbLeft() {
|
|
if (this.vertical) return 0;
|
|
var el = this.$el;
|
|
var hue = this.color.get('hue');
|
|
|
|
if (!el) return 0;
|
|
var thumb = this.$refs.thumb;
|
|
return Math.round(hue * (el.offsetWidth - thumb.offsetWidth / 2) / 360);
|
|
},
|
|
getThumbTop: function getThumbTop() {
|
|
if (!this.vertical) return 0;
|
|
var el = this.$el;
|
|
var hue = this.color.get('hue');
|
|
|
|
if (!el) return 0;
|
|
var thumb = this.$refs.thumb;
|
|
return Math.round(hue * (el.offsetHeight - thumb.offsetHeight / 2) / 360);
|
|
},
|
|
update: function update() {
|
|
this.thumbLeft = this.getThumbLeft();
|
|
this.thumbTop = this.getThumbTop();
|
|
}
|
|
},
|
|
|
|
mounted: function mounted() {
|
|
var _this = this;
|
|
|
|
var _$refs = this.$refs,
|
|
bar = _$refs.bar,
|
|
thumb = _$refs.thumb;
|
|
|
|
|
|
var dragConfig = {
|
|
drag: function drag(event) {
|
|
_this.handleDrag(event);
|
|
},
|
|
end: function end(event) {
|
|
_this.handleDrag(event);
|
|
}
|
|
};
|
|
|
|
draggable(bar, dragConfig);
|
|
draggable(thumb, dragConfig);
|
|
this.update();
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/components/hue-slider.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var components_hue_slidervue_type_script_lang_js_ = (hue_slidervue_type_script_lang_js_);
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/components/hue-slider.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var hue_slider_component = Object(componentNormalizer["a" /* default */])(
|
|
components_hue_slidervue_type_script_lang_js_,
|
|
hue_slidervue_type_template_id_5cdc43b1_render,
|
|
hue_slidervue_type_template_id_5cdc43b1_staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var hue_slider_api; }
|
|
hue_slider_component.options.__file = "packages/color-picker/src/components/hue-slider.vue"
|
|
/* harmony default export */ var hue_slider = (hue_slider_component.exports);
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/alpha-slider.vue?vue&type=template&id=068c66cb&
|
|
var alpha_slidervue_type_template_id_068c66cb_render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"div",
|
|
{
|
|
staticClass: "el-color-alpha-slider",
|
|
class: { "is-vertical": _vm.vertical }
|
|
},
|
|
[
|
|
_c("div", {
|
|
ref: "bar",
|
|
staticClass: "el-color-alpha-slider__bar",
|
|
style: {
|
|
background: _vm.background
|
|
},
|
|
on: { click: _vm.handleClick }
|
|
}),
|
|
_c("div", {
|
|
ref: "thumb",
|
|
staticClass: "el-color-alpha-slider__thumb",
|
|
style: {
|
|
left: _vm.thumbLeft + "px",
|
|
top: _vm.thumbTop + "px"
|
|
}
|
|
})
|
|
]
|
|
)
|
|
}
|
|
var alpha_slidervue_type_template_id_068c66cb_staticRenderFns = []
|
|
alpha_slidervue_type_template_id_068c66cb_render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/components/alpha-slider.vue?vue&type=template&id=068c66cb&
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/alpha-slider.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
/* harmony default export */ var alpha_slidervue_type_script_lang_js_ = ({
|
|
name: 'el-color-alpha-slider',
|
|
|
|
props: {
|
|
color: {
|
|
required: true
|
|
},
|
|
vertical: Boolean
|
|
},
|
|
|
|
watch: {
|
|
'color._alpha': function color_alpha() {
|
|
this.update();
|
|
},
|
|
'color.value': function colorValue() {
|
|
this.update();
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
handleClick: function handleClick(event) {
|
|
var thumb = this.$refs.thumb;
|
|
var target = event.target;
|
|
|
|
if (target !== thumb) {
|
|
this.handleDrag(event);
|
|
}
|
|
},
|
|
handleDrag: function handleDrag(event) {
|
|
var rect = this.$el.getBoundingClientRect();
|
|
var thumb = this.$refs.thumb;
|
|
|
|
|
|
if (!this.vertical) {
|
|
var left = event.clientX - rect.left;
|
|
left = Math.max(thumb.offsetWidth / 2, left);
|
|
left = Math.min(left, rect.width - thumb.offsetWidth / 2);
|
|
|
|
this.color.set('alpha', Math.round((left - thumb.offsetWidth / 2) / (rect.width - thumb.offsetWidth) * 100));
|
|
} else {
|
|
var top = event.clientY - rect.top;
|
|
top = Math.max(thumb.offsetHeight / 2, top);
|
|
top = Math.min(top, rect.height - thumb.offsetHeight / 2);
|
|
|
|
this.color.set('alpha', Math.round((top - thumb.offsetHeight / 2) / (rect.height - thumb.offsetHeight) * 100));
|
|
}
|
|
},
|
|
getThumbLeft: function getThumbLeft() {
|
|
if (this.vertical) return 0;
|
|
var el = this.$el;
|
|
var alpha = this.color._alpha;
|
|
|
|
if (!el) return 0;
|
|
var thumb = this.$refs.thumb;
|
|
return Math.round(alpha * (el.offsetWidth - thumb.offsetWidth / 2) / 100);
|
|
},
|
|
getThumbTop: function getThumbTop() {
|
|
if (!this.vertical) return 0;
|
|
var el = this.$el;
|
|
var alpha = this.color._alpha;
|
|
|
|
if (!el) return 0;
|
|
var thumb = this.$refs.thumb;
|
|
return Math.round(alpha * (el.offsetHeight - thumb.offsetHeight / 2) / 100);
|
|
},
|
|
getBackground: function getBackground() {
|
|
if (this.color && this.color.value) {
|
|
var _color$toRgb = this.color.toRgb(),
|
|
r = _color$toRgb.r,
|
|
g = _color$toRgb.g,
|
|
b = _color$toRgb.b;
|
|
|
|
return 'linear-gradient(to right, rgba(' + r + ', ' + g + ', ' + b + ', 0) 0%, rgba(' + r + ', ' + g + ', ' + b + ', 1) 100%)';
|
|
}
|
|
return null;
|
|
},
|
|
update: function update() {
|
|
this.thumbLeft = this.getThumbLeft();
|
|
this.thumbTop = this.getThumbTop();
|
|
this.background = this.getBackground();
|
|
}
|
|
},
|
|
|
|
data: function data() {
|
|
return {
|
|
thumbLeft: 0,
|
|
thumbTop: 0,
|
|
background: null
|
|
};
|
|
},
|
|
mounted: function mounted() {
|
|
var _this = this;
|
|
|
|
var _$refs = this.$refs,
|
|
bar = _$refs.bar,
|
|
thumb = _$refs.thumb;
|
|
|
|
|
|
var dragConfig = {
|
|
drag: function drag(event) {
|
|
_this.handleDrag(event);
|
|
},
|
|
end: function end(event) {
|
|
_this.handleDrag(event);
|
|
}
|
|
};
|
|
|
|
draggable(bar, dragConfig);
|
|
draggable(thumb, dragConfig);
|
|
this.update();
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/components/alpha-slider.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var components_alpha_slidervue_type_script_lang_js_ = (alpha_slidervue_type_script_lang_js_);
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/components/alpha-slider.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var alpha_slider_component = Object(componentNormalizer["a" /* default */])(
|
|
components_alpha_slidervue_type_script_lang_js_,
|
|
alpha_slidervue_type_template_id_068c66cb_render,
|
|
alpha_slidervue_type_template_id_068c66cb_staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var alpha_slider_api; }
|
|
alpha_slider_component.options.__file = "packages/color-picker/src/components/alpha-slider.vue"
|
|
/* harmony default export */ var alpha_slider = (alpha_slider_component.exports);
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/predefine.vue?vue&type=template&id=06e03093&
|
|
var predefinevue_type_template_id_06e03093_render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c("div", { staticClass: "el-color-predefine" }, [
|
|
_c(
|
|
"div",
|
|
{ staticClass: "el-color-predefine__colors" },
|
|
_vm._l(_vm.rgbaColors, function(item, index) {
|
|
return _c(
|
|
"div",
|
|
{
|
|
key: _vm.colors[index],
|
|
staticClass: "el-color-predefine__color-selector",
|
|
class: { selected: item.selected, "is-alpha": item._alpha < 100 },
|
|
on: {
|
|
click: function($event) {
|
|
_vm.handleSelect(index)
|
|
}
|
|
}
|
|
},
|
|
[_c("div", { style: { "background-color": item.value } })]
|
|
)
|
|
}),
|
|
0
|
|
)
|
|
])
|
|
}
|
|
var predefinevue_type_template_id_06e03093_staticRenderFns = []
|
|
predefinevue_type_template_id_06e03093_render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/components/predefine.vue?vue&type=template&id=06e03093&
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/predefine.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
/* harmony default export */ var predefinevue_type_script_lang_js_ = ({
|
|
props: {
|
|
colors: { type: Array, required: true },
|
|
color: { required: true }
|
|
},
|
|
data: function data() {
|
|
return {
|
|
rgbaColors: this.parseColors(this.colors, this.color)
|
|
};
|
|
},
|
|
|
|
methods: {
|
|
handleSelect: function handleSelect(index) {
|
|
this.color.fromString(this.colors[index]);
|
|
},
|
|
parseColors: function parseColors(colors, color) {
|
|
return colors.map(function (value) {
|
|
var c = new src_color();
|
|
c.enableAlpha = true;
|
|
c.format = 'rgba';
|
|
c.fromString(value);
|
|
c.selected = c.value === color.value;
|
|
return c;
|
|
});
|
|
}
|
|
},
|
|
watch: {
|
|
'$parent.currentColor': function $parentCurrentColor(val) {
|
|
var color = new src_color();
|
|
color.fromString(val);
|
|
|
|
this.rgbaColors.forEach(function (item) {
|
|
item.selected = color.compare(item);
|
|
});
|
|
},
|
|
colors: function colors(newVal) {
|
|
this.rgbaColors = this.parseColors(newVal, this.color);
|
|
},
|
|
color: function color(newVal) {
|
|
this.rgbaColors = this.parseColors(this.colors, newVal);
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/components/predefine.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var components_predefinevue_type_script_lang_js_ = (predefinevue_type_script_lang_js_);
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/components/predefine.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var predefine_component = Object(componentNormalizer["a" /* default */])(
|
|
components_predefinevue_type_script_lang_js_,
|
|
predefinevue_type_template_id_06e03093_render,
|
|
predefinevue_type_template_id_06e03093_staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var predefine_api; }
|
|
predefine_component.options.__file = "packages/color-picker/src/components/predefine.vue"
|
|
/* harmony default export */ var predefine = (predefine_component.exports);
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/vue-popper"
|
|
var vue_popper_ = __webpack_require__(5);
|
|
var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/locale"
|
|
var locale_ = __webpack_require__(6);
|
|
var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/input"
|
|
var input_ = __webpack_require__(10);
|
|
var input_default = /*#__PURE__*/__webpack_require__.n(input_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/button"
|
|
var button_ = __webpack_require__(13);
|
|
var button_default = /*#__PURE__*/__webpack_require__.n(button_);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/picker-dropdown.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var picker_dropdownvue_type_script_lang_js_ = ({
|
|
name: 'el-color-picker-dropdown',
|
|
|
|
mixins: [vue_popper_default.a, locale_default.a],
|
|
|
|
components: {
|
|
SvPanel: sv_panel,
|
|
HueSlider: hue_slider,
|
|
AlphaSlider: alpha_slider,
|
|
ElInput: input_default.a,
|
|
ElButton: button_default.a,
|
|
Predefine: predefine
|
|
},
|
|
|
|
props: {
|
|
color: {
|
|
required: true
|
|
},
|
|
showAlpha: Boolean,
|
|
predefine: Array
|
|
},
|
|
|
|
data: function data() {
|
|
return {
|
|
customInput: ''
|
|
};
|
|
},
|
|
|
|
|
|
computed: {
|
|
currentColor: function currentColor() {
|
|
var parent = this.$parent;
|
|
return !parent.value && !parent.showPanelColor ? '' : parent.color.value;
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
confirmValue: function confirmValue() {
|
|
this.$emit('pick');
|
|
},
|
|
handleConfirm: function handleConfirm() {
|
|
this.color.fromString(this.customInput);
|
|
}
|
|
},
|
|
|
|
mounted: function mounted() {
|
|
this.$parent.popperElm = this.popperElm = this.$el;
|
|
this.referenceElm = this.$parent.$el;
|
|
},
|
|
|
|
|
|
watch: {
|
|
showPopper: function showPopper(val) {
|
|
var _this = this;
|
|
|
|
if (val === true) {
|
|
this.$nextTick(function () {
|
|
var _$refs = _this.$refs,
|
|
sl = _$refs.sl,
|
|
hue = _$refs.hue,
|
|
alpha = _$refs.alpha;
|
|
|
|
sl && sl.update();
|
|
hue && hue.update();
|
|
alpha && alpha.update();
|
|
});
|
|
}
|
|
},
|
|
|
|
|
|
currentColor: {
|
|
immediate: true,
|
|
handler: function handler(val) {
|
|
this.customInput = val;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/components/picker-dropdown.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var components_picker_dropdownvue_type_script_lang_js_ = (picker_dropdownvue_type_script_lang_js_);
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/components/picker-dropdown.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var picker_dropdown_component = Object(componentNormalizer["a" /* default */])(
|
|
components_picker_dropdownvue_type_script_lang_js_,
|
|
picker_dropdownvue_type_template_id_06601625_render,
|
|
picker_dropdownvue_type_template_id_06601625_staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var picker_dropdown_api; }
|
|
picker_dropdown_component.options.__file = "packages/color-picker/src/components/picker-dropdown.vue"
|
|
/* harmony default export */ var picker_dropdown = (picker_dropdown_component.exports);
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/clickoutside"
|
|
var clickoutside_ = __webpack_require__(12);
|
|
var clickoutside_default = /*#__PURE__*/__webpack_require__.n(clickoutside_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
|
|
var emitter_ = __webpack_require__(4);
|
|
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/main.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var mainvue_type_script_lang_js_ = ({
|
|
name: 'ElColorPicker',
|
|
|
|
mixins: [emitter_default.a],
|
|
|
|
props: {
|
|
value: String,
|
|
showAlpha: Boolean,
|
|
colorFormat: String,
|
|
disabled: Boolean,
|
|
size: String,
|
|
popperClass: String,
|
|
predefine: Array
|
|
},
|
|
|
|
inject: {
|
|
elForm: {
|
|
default: ''
|
|
},
|
|
elFormItem: {
|
|
default: ''
|
|
}
|
|
},
|
|
|
|
directives: { Clickoutside: clickoutside_default.a },
|
|
|
|
computed: {
|
|
displayedColor: function displayedColor() {
|
|
if (!this.value && !this.showPanelColor) {
|
|
return 'transparent';
|
|
}
|
|
|
|
return this.displayedRgb(this.color, this.showAlpha);
|
|
},
|
|
_elFormItemSize: function _elFormItemSize() {
|
|
return (this.elFormItem || {}).elFormItemSize;
|
|
},
|
|
colorSize: function colorSize() {
|
|
return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
|
|
},
|
|
colorDisabled: function colorDisabled() {
|
|
return this.disabled || (this.elForm || {}).disabled;
|
|
}
|
|
},
|
|
|
|
watch: {
|
|
value: function value(val) {
|
|
if (!val) {
|
|
this.showPanelColor = false;
|
|
} else if (val && val !== this.color.value) {
|
|
this.color.fromString(val);
|
|
}
|
|
},
|
|
|
|
color: {
|
|
deep: true,
|
|
handler: function handler() {
|
|
this.showPanelColor = true;
|
|
}
|
|
},
|
|
displayedColor: function displayedColor(val) {
|
|
if (!this.showPicker) return;
|
|
var currentValueColor = new src_color({
|
|
enableAlpha: this.showAlpha,
|
|
format: this.colorFormat
|
|
});
|
|
currentValueColor.fromString(this.value);
|
|
|
|
var currentValueColorRgb = this.displayedRgb(currentValueColor, this.showAlpha);
|
|
if (val !== currentValueColorRgb) {
|
|
this.$emit('active-change', val);
|
|
}
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
handleTrigger: function handleTrigger() {
|
|
if (this.colorDisabled) return;
|
|
this.showPicker = !this.showPicker;
|
|
},
|
|
confirmValue: function confirmValue() {
|
|
var value = this.color.value;
|
|
this.$emit('input', value);
|
|
this.$emit('change', value);
|
|
this.dispatch('ElFormItem', 'el.form.change', value);
|
|
this.showPicker = false;
|
|
},
|
|
clearValue: function clearValue() {
|
|
this.$emit('input', null);
|
|
this.$emit('change', null);
|
|
if (this.value !== null) {
|
|
this.dispatch('ElFormItem', 'el.form.change', null);
|
|
}
|
|
this.showPanelColor = false;
|
|
this.showPicker = false;
|
|
this.resetColor();
|
|
},
|
|
hide: function hide() {
|
|
this.showPicker = false;
|
|
this.resetColor();
|
|
},
|
|
resetColor: function resetColor() {
|
|
var _this = this;
|
|
|
|
this.$nextTick(function (_) {
|
|
if (_this.value) {
|
|
_this.color.fromString(_this.value);
|
|
} else {
|
|
_this.showPanelColor = false;
|
|
}
|
|
});
|
|
},
|
|
displayedRgb: function displayedRgb(color, showAlpha) {
|
|
if (!(color instanceof src_color)) {
|
|
throw Error('color should be instance of Color Class');
|
|
}
|
|
|
|
var _color$toRgb = color.toRgb(),
|
|
r = _color$toRgb.r,
|
|
g = _color$toRgb.g,
|
|
b = _color$toRgb.b;
|
|
|
|
return showAlpha ? 'rgba(' + r + ', ' + g + ', ' + b + ', ' + color.get('alpha') / 100 + ')' : 'rgb(' + r + ', ' + g + ', ' + b + ')';
|
|
}
|
|
},
|
|
|
|
mounted: function mounted() {
|
|
var value = this.value;
|
|
if (value) {
|
|
this.color.fromString(value);
|
|
}
|
|
this.popperElm = this.$refs.dropdown.$el;
|
|
},
|
|
data: function data() {
|
|
var color = new src_color({
|
|
enableAlpha: this.showAlpha,
|
|
format: this.colorFormat
|
|
});
|
|
|
|
return {
|
|
color: color,
|
|
showPicker: false,
|
|
showPanelColor: false
|
|
};
|
|
},
|
|
|
|
|
|
components: {
|
|
PickerDropdown: picker_dropdown
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/main.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
|
|
// CONCATENATED MODULE: ./packages/color-picker/src/main.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var main_component = Object(componentNormalizer["a" /* default */])(
|
|
src_mainvue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var main_api; }
|
|
main_component.options.__file = "packages/color-picker/src/main.vue"
|
|
/* harmony default export */ var main = (main_component.exports);
|
|
// CONCATENATED MODULE: ./packages/color-picker/index.js
|
|
|
|
|
|
/* istanbul ignore next */
|
|
main.install = function (Vue) {
|
|
Vue.component(main.name, main);
|
|
};
|
|
|
|
/* harmony default export */ var color_picker = __webpack_exports__["default"] = (main);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 6:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("6b7c");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 7:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("8bbf");
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "746f":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var path = __webpack_require__("428f");
|
|
var has = __webpack_require__("5135");
|
|
var wrappedWellKnownSymbolModule = __webpack_require__("e538");
|
|
var defineProperty = __webpack_require__("9bf2").f;
|
|
|
|
module.exports = function (NAME) {
|
|
var Symbol = path.Symbol || (path.Symbol = {});
|
|
if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {
|
|
value: wrappedWellKnownSymbolModule.f(NAME)
|
|
});
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "750d":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "7530":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isObject = __webpack_require__("1a8c");
|
|
|
|
/** Built-in value references. */
|
|
var objectCreate = Object.create;
|
|
|
|
/**
|
|
* The base implementation of `_.create` without support for assigning
|
|
* properties to the created object.
|
|
*
|
|
* @private
|
|
* @param {Object} proto The object to inherit from.
|
|
* @returns {Object} Returns the new object.
|
|
*/
|
|
var baseCreate = (function() {
|
|
function object() {}
|
|
return function(proto) {
|
|
if (!isObject(proto)) {
|
|
return {};
|
|
}
|
|
if (objectCreate) {
|
|
return objectCreate(proto);
|
|
}
|
|
object.prototype = proto;
|
|
var result = new object;
|
|
object.prototype = undefined;
|
|
return result;
|
|
};
|
|
}());
|
|
|
|
module.exports = baseCreate;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "760d":
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_style_vue_vue_type_style_index_0_id_2b1dd4fb_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f00f");
|
|
/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_style_vue_vue_type_style_index_0_id_2b1dd4fb_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_style_vue_vue_type_style_index_0_id_2b1dd4fb_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
|
|
/* unused harmony reexport * */
|
|
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_style_vue_vue_type_style_index_0_id_2b1dd4fb_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "77a5":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "77e9":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isObject = __webpack_require__("7a41");
|
|
module.exports = function (it) {
|
|
if (!isObject(it)) throw TypeError(it + ' is not an object!');
|
|
return it;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "7839":
|
|
/***/ (function(module, exports) {
|
|
|
|
// IE8- don't enum bug keys
|
|
module.exports = [
|
|
'constructor',
|
|
'hasOwnProperty',
|
|
'isPrototypeOf',
|
|
'propertyIsEnumerable',
|
|
'toLocaleString',
|
|
'toString',
|
|
'valueOf'
|
|
];
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "79bc":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getNative = __webpack_require__("0b07"),
|
|
root = __webpack_require__("2b3e");
|
|
|
|
/* Built-in method references that are verified to be native. */
|
|
var Map = getNative(root, 'Map');
|
|
|
|
module.exports = Map;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "7a41":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function (it) {
|
|
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "7a48":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var nativeCreate = __webpack_require__("6044");
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* Checks if a hash value for `key` exists.
|
|
*
|
|
* @private
|
|
* @name has
|
|
* @memberOf Hash
|
|
* @param {string} key The key of the entry to check.
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
*/
|
|
function hashHas(key) {
|
|
var data = this.__data__;
|
|
return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
|
}
|
|
|
|
module.exports = hashHas;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "7b0b":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var requireObjectCoercible = __webpack_require__("1d80");
|
|
|
|
// `ToObject` abstract operation
|
|
// https://tc39.github.io/ecma262/#sec-toobject
|
|
module.exports = function (argument) {
|
|
return Object(requireObjectCoercible(argument));
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "7b54":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMcAAAA5CAIAAAAN/6j4AAABzklEQVR4Ae3SQWrEMBQD0Kb0/ofLhdKA4cu4XQ1avq40HltTHrqe5/nyR6Aq8PO2Xde1d66dzeExuznfn7x5vzZ35nBO1qs5fz8eX03tfme/dpyv+1Oyvp2P69sPnsy/sTcctXNn+o8L//4zf1+9J/Nwqta1OZ9XKxzNx8f9zvHwKDx+bl0+7kzD8Svz9rj/nn/PG4FAS8CqWpJ6ImBVsZBaAlbVktQTAauKhdQSsKqWpJ4IWFUspJaAVbUk9UTAqmIhtQSsqiWpJwJWFQupJWBVLUk9EbCqWEgtAatqSeqJgFXFQmoJWFVLUk8ErCoWUkvAqlqSeiJgVbGQWgJW1ZLUEwGrioXUErCqlqSeCFhVLKSWgFW1JPVEwKpiIbUErKolqScCVhULqSVgVS1JPRGwqlhILQGraknqiYBVxUJqCVhVS1JPBKwqFlJLwKpaknoiYFWxkFoCVtWS1BMBq4qF1BKwqpaknghYVSykloBVtST1RMCqYiG1BKyqJaknAlYVC6klYFUtST0RsKpYSC0Bq2pJ6omAVcVCaglYVUtSTwSsKhZSS8CqWpJ6ImBVsZBaAlbVktQTAauKhdQSsKqWpJ4IXPd955NEoCHwC4UgR+Z0RU3nAAAAAElFTkSuQmCC"
|
|
|
|
/***/ }),
|
|
|
|
/***/ "7b83":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var mapCacheClear = __webpack_require__("7c64"),
|
|
mapCacheDelete = __webpack_require__("93ed"),
|
|
mapCacheGet = __webpack_require__("2478"),
|
|
mapCacheHas = __webpack_require__("a524"),
|
|
mapCacheSet = __webpack_require__("1fc8");
|
|
|
|
/**
|
|
* Creates a map cache object to store key-value pairs.
|
|
*
|
|
* @private
|
|
* @constructor
|
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
*/
|
|
function MapCache(entries) {
|
|
var index = -1,
|
|
length = entries == null ? 0 : entries.length;
|
|
|
|
this.clear();
|
|
while (++index < length) {
|
|
var entry = entries[index];
|
|
this.set(entry[0], entry[1]);
|
|
}
|
|
}
|
|
|
|
// Add methods to `MapCache`.
|
|
MapCache.prototype.clear = mapCacheClear;
|
|
MapCache.prototype['delete'] = mapCacheDelete;
|
|
MapCache.prototype.get = mapCacheGet;
|
|
MapCache.prototype.has = mapCacheHas;
|
|
MapCache.prototype.set = mapCacheSet;
|
|
|
|
module.exports = MapCache;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "7c64":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var Hash = __webpack_require__("e24b"),
|
|
ListCache = __webpack_require__("5e2e"),
|
|
Map = __webpack_require__("79bc");
|
|
|
|
/**
|
|
* Removes all key-value entries from the map.
|
|
*
|
|
* @private
|
|
* @name clear
|
|
* @memberOf MapCache
|
|
*/
|
|
function mapCacheClear() {
|
|
this.size = 0;
|
|
this.__data__ = {
|
|
'hash': new Hash,
|
|
'map': new (Map || ListCache),
|
|
'string': new Hash
|
|
};
|
|
}
|
|
|
|
module.exports = mapCacheClear;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "7c73":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var anObject = __webpack_require__("825a");
|
|
var defineProperties = __webpack_require__("37e8");
|
|
var enumBugKeys = __webpack_require__("7839");
|
|
var hiddenKeys = __webpack_require__("d012");
|
|
var html = __webpack_require__("1be4");
|
|
var documentCreateElement = __webpack_require__("cc12");
|
|
var sharedKey = __webpack_require__("f772");
|
|
|
|
var GT = '>';
|
|
var LT = '<';
|
|
var PROTOTYPE = 'prototype';
|
|
var SCRIPT = 'script';
|
|
var IE_PROTO = sharedKey('IE_PROTO');
|
|
|
|
var EmptyConstructor = function () { /* empty */ };
|
|
|
|
var scriptTag = function (content) {
|
|
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
};
|
|
|
|
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
activeXDocument.write(scriptTag(''));
|
|
activeXDocument.close();
|
|
var temp = activeXDocument.parentWindow.Object;
|
|
activeXDocument = null; // avoid memory leak
|
|
return temp;
|
|
};
|
|
|
|
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
var NullProtoObjectViaIFrame = function () {
|
|
// Thrash, waste and sodomy: IE GC bug
|
|
var iframe = documentCreateElement('iframe');
|
|
var JS = 'java' + SCRIPT + ':';
|
|
var iframeDocument;
|
|
iframe.style.display = 'none';
|
|
html.appendChild(iframe);
|
|
// https://github.com/zloirock/core-js/issues/475
|
|
iframe.src = String(JS);
|
|
iframeDocument = iframe.contentWindow.document;
|
|
iframeDocument.open();
|
|
iframeDocument.write(scriptTag('document.F=Object'));
|
|
iframeDocument.close();
|
|
return iframeDocument.F;
|
|
};
|
|
|
|
// Check for document.domain and active x support
|
|
// No need to use active x approach when document.domain is not set
|
|
// see https://github.com/es-shims/es5-shim/issues/150
|
|
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
// avoid IE GC bug
|
|
var activeXDocument;
|
|
var NullProtoObject = function () {
|
|
try {
|
|
/* global ActiveXObject */
|
|
activeXDocument = document.domain && new ActiveXObject('htmlfile');
|
|
} catch (error) { /* ignore */ }
|
|
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
|
|
var length = enumBugKeys.length;
|
|
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
return NullProtoObject();
|
|
};
|
|
|
|
hiddenKeys[IE_PROTO] = true;
|
|
|
|
// `Object.create` method
|
|
// https://tc39.github.io/ecma262/#sec-object.create
|
|
module.exports = Object.create || function create(O, Properties) {
|
|
var result;
|
|
if (O !== null) {
|
|
EmptyConstructor[PROTOTYPE] = anObject(O);
|
|
result = new EmptyConstructor();
|
|
EmptyConstructor[PROTOTYPE] = null;
|
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
result[IE_PROTO] = O;
|
|
} else result = NullProtoObject();
|
|
return Properties === undefined ? result : defineProperties(result, Properties);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "7d1f":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arrayPush = __webpack_require__("087d"),
|
|
isArray = __webpack_require__("6747");
|
|
|
|
/**
|
|
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
|
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
|
|
* symbols of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
* @param {Function} symbolsFunc The function to get the symbols of `object`.
|
|
* @returns {Array} Returns the array of property names and symbols.
|
|
*/
|
|
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
var result = keysFunc(object);
|
|
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
}
|
|
|
|
module.exports = baseGetAllKeys;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "7db0":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $ = __webpack_require__("23e7");
|
|
var $find = __webpack_require__("b727").find;
|
|
var addToUnscopables = __webpack_require__("44d2");
|
|
var arrayMethodUsesToLength = __webpack_require__("ae40");
|
|
|
|
var FIND = 'find';
|
|
var SKIPS_HOLES = true;
|
|
|
|
var USES_TO_LENGTH = arrayMethodUsesToLength(FIND);
|
|
|
|
// Shouldn't skip holes
|
|
if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
|
|
|
|
// `Array.prototype.find` method
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype.find
|
|
$({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH }, {
|
|
find: function find(callbackfn /* , that = undefined */) {
|
|
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
}
|
|
});
|
|
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
addToUnscopables(FIND);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "7e64":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var ListCache = __webpack_require__("5e2e"),
|
|
stackClear = __webpack_require__("efb6"),
|
|
stackDelete = __webpack_require__("2fcc"),
|
|
stackGet = __webpack_require__("802a"),
|
|
stackHas = __webpack_require__("55a3"),
|
|
stackSet = __webpack_require__("d02c");
|
|
|
|
/**
|
|
* Creates a stack cache object to store key-value pairs.
|
|
*
|
|
* @private
|
|
* @constructor
|
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
*/
|
|
function Stack(entries) {
|
|
var data = this.__data__ = new ListCache(entries);
|
|
this.size = data.size;
|
|
}
|
|
|
|
// Add methods to `Stack`.
|
|
Stack.prototype.clear = stackClear;
|
|
Stack.prototype['delete'] = stackDelete;
|
|
Stack.prototype.get = stackGet;
|
|
Stack.prototype.has = stackHas;
|
|
Stack.prototype.set = stackSet;
|
|
|
|
module.exports = Stack;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "7e95":
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_layers_vue_vue_type_style_index_0_id_a1ea05ca_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fc83");
|
|
/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_layers_vue_vue_type_style_index_0_id_a1ea05ca_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_layers_vue_vue_type_style_index_0_id_a1ea05ca_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
|
|
/* unused harmony reexport * */
|
|
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_layers_vue_vue_type_style_index_0_id_a1ea05ca_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "7f11":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "7f4d":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
|
|
exports.default = function (target) {
|
|
for (var i = 1, j = arguments.length; i < j; i++) {
|
|
var source = arguments[i] || {};
|
|
for (var prop in source) {
|
|
if (source.hasOwnProperty(prop)) {
|
|
var value = source[prop];
|
|
if (value !== undefined) {
|
|
target[prop] = value;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return target;
|
|
};
|
|
|
|
;
|
|
|
|
/***/ }),
|
|
|
|
/***/ "7f9a":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__("da84");
|
|
var inspectSource = __webpack_require__("8925");
|
|
|
|
var WeakMap = global.WeakMap;
|
|
|
|
module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "7fc1":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 86);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 0:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
|
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
function normalizeComponent (
|
|
scriptExports,
|
|
render,
|
|
staticRenderFns,
|
|
functionalTemplate,
|
|
injectStyles,
|
|
scopeId,
|
|
moduleIdentifier, /* server only */
|
|
shadowMode /* vue-cli only */
|
|
) {
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (render) {
|
|
options.render = render
|
|
options.staticRenderFns = staticRenderFns
|
|
options._compiled = true
|
|
}
|
|
|
|
// functional template
|
|
if (functionalTemplate) {
|
|
options.functional = true
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = 'data-v-' + scopeId
|
|
}
|
|
|
|
var hook
|
|
if (moduleIdentifier) { // server build
|
|
hook = function (context) {
|
|
// 2.3 injection
|
|
context =
|
|
context || // cached call
|
|
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
// 2.2 with runInNewContext: true
|
|
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
context = __VUE_SSR_CONTEXT__
|
|
}
|
|
// inject component styles
|
|
if (injectStyles) {
|
|
injectStyles.call(this, context)
|
|
}
|
|
// register component module identifier for async chunk inferrence
|
|
if (context && context._registeredComponents) {
|
|
context._registeredComponents.add(moduleIdentifier)
|
|
}
|
|
}
|
|
// used by ssr in case component is cached and beforeCreate
|
|
// never gets called
|
|
options._ssrRegister = hook
|
|
} else if (injectStyles) {
|
|
hook = shadowMode
|
|
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
|
: injectStyles
|
|
}
|
|
|
|
if (hook) {
|
|
if (options.functional) {
|
|
// for template-only hot-reload because in that case the render fn doesn't
|
|
// go through the normalizer
|
|
options._injectStyles = hook
|
|
// register for functioal component in vue file
|
|
var originalRender = options.render
|
|
options.render = function renderWithStyleInjection (h, context) {
|
|
hook.call(context)
|
|
return originalRender(h, context)
|
|
}
|
|
} else {
|
|
// inject component registration as beforeCreate hook
|
|
var existing = options.beforeCreate
|
|
options.beforeCreate = existing
|
|
? [].concat(existing, hook)
|
|
: [hook]
|
|
}
|
|
}
|
|
|
|
return {
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 4:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("d010");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 86:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox-group.vue?vue&type=template&id=7289a290&
|
|
var render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"div",
|
|
{
|
|
staticClass: "el-checkbox-group",
|
|
attrs: { role: "group", "aria-label": "checkbox-group" }
|
|
},
|
|
[_vm._t("default")],
|
|
2
|
|
)
|
|
}
|
|
var staticRenderFns = []
|
|
render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/checkbox/src/checkbox-group.vue?vue&type=template&id=7289a290&
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
|
|
var emitter_ = __webpack_require__(4);
|
|
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox-group.vue?vue&type=script&lang=js&
|
|
|
|
|
|
|
|
/* harmony default export */ var checkbox_groupvue_type_script_lang_js_ = ({
|
|
name: 'ElCheckboxGroup',
|
|
|
|
componentName: 'ElCheckboxGroup',
|
|
|
|
mixins: [emitter_default.a],
|
|
|
|
inject: {
|
|
elFormItem: {
|
|
default: ''
|
|
}
|
|
},
|
|
|
|
props: {
|
|
value: {},
|
|
disabled: Boolean,
|
|
min: Number,
|
|
max: Number,
|
|
size: String,
|
|
fill: String,
|
|
textColor: String
|
|
},
|
|
|
|
computed: {
|
|
_elFormItemSize: function _elFormItemSize() {
|
|
return (this.elFormItem || {}).elFormItemSize;
|
|
},
|
|
checkboxGroupSize: function checkboxGroupSize() {
|
|
return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
|
|
}
|
|
},
|
|
|
|
watch: {
|
|
value: function value(_value) {
|
|
this.dispatch('ElFormItem', 'el.form.change', [_value]);
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/checkbox/src/checkbox-group.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_checkbox_groupvue_type_script_lang_js_ = (checkbox_groupvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
var componentNormalizer = __webpack_require__(0);
|
|
|
|
// CONCATENATED MODULE: ./packages/checkbox/src/checkbox-group.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
src_checkbox_groupvue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var api; }
|
|
component.options.__file = "packages/checkbox/src/checkbox-group.vue"
|
|
/* harmony default export */ var checkbox_group = (component.exports);
|
|
// CONCATENATED MODULE: ./packages/checkbox-group/index.js
|
|
|
|
|
|
/* istanbul ignore next */
|
|
checkbox_group.install = function (Vue) {
|
|
Vue.component(checkbox_group.name, checkbox_group);
|
|
};
|
|
|
|
/* harmony default export */ var packages_checkbox_group = __webpack_exports__["default"] = (checkbox_group);
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "802a":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Gets the stack value for `key`.
|
|
*
|
|
* @private
|
|
* @name get
|
|
* @memberOf Stack
|
|
* @param {string} key The key of the value to get.
|
|
* @returns {*} Returns the entry value.
|
|
*/
|
|
function stackGet(key) {
|
|
return this.__data__.get(key);
|
|
}
|
|
|
|
module.exports = stackGet;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "8057":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* A specialized version of `_.forEach` for arrays without support for
|
|
* iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Array} Returns `array`.
|
|
*/
|
|
function arrayEach(array, iteratee) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length;
|
|
|
|
while (++index < length) {
|
|
if (iteratee(array[index], index, array) === false) {
|
|
break;
|
|
}
|
|
}
|
|
return array;
|
|
}
|
|
|
|
module.exports = arrayEach;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "8119":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__("693d");
|
|
__webpack_require__("dfe5");
|
|
__webpack_require__("301c");
|
|
__webpack_require__("4e71");
|
|
module.exports = __webpack_require__("5524").Symbol;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "8122":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.isEmpty = exports.isEqual = exports.arrayEquals = exports.looseEqual = exports.capitalize = exports.kebabCase = exports.autoprefixer = exports.isFirefox = exports.isEdge = exports.isIE = exports.coerceTruthyValueToArray = exports.arrayFind = exports.arrayFindIndex = exports.escapeRegexpString = exports.valueEquals = exports.generateId = exports.getValueByPath = undefined;
|
|
|
|
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; };
|
|
|
|
exports.noop = noop;
|
|
exports.hasOwn = hasOwn;
|
|
exports.toObject = toObject;
|
|
exports.getPropByPath = getPropByPath;
|
|
exports.rafThrottle = rafThrottle;
|
|
exports.objToArray = objToArray;
|
|
|
|
var _vue = __webpack_require__("8bbf");
|
|
|
|
var _vue2 = _interopRequireDefault(_vue);
|
|
|
|
var _types = __webpack_require__("a742");
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
|
|
function noop() {};
|
|
|
|
function hasOwn(obj, key) {
|
|
return hasOwnProperty.call(obj, key);
|
|
};
|
|
|
|
function extend(to, _from) {
|
|
for (var key in _from) {
|
|
to[key] = _from[key];
|
|
}
|
|
return to;
|
|
};
|
|
|
|
function toObject(arr) {
|
|
var res = {};
|
|
for (var i = 0; i < arr.length; i++) {
|
|
if (arr[i]) {
|
|
extend(res, arr[i]);
|
|
}
|
|
}
|
|
return res;
|
|
};
|
|
|
|
var getValueByPath = exports.getValueByPath = function getValueByPath(object, prop) {
|
|
prop = prop || '';
|
|
var paths = prop.split('.');
|
|
var current = object;
|
|
var result = null;
|
|
for (var i = 0, j = paths.length; i < j; i++) {
|
|
var path = paths[i];
|
|
if (!current) break;
|
|
|
|
if (i === j - 1) {
|
|
result = current[path];
|
|
break;
|
|
}
|
|
current = current[path];
|
|
}
|
|
return result;
|
|
};
|
|
|
|
function getPropByPath(obj, path, strict) {
|
|
var tempObj = obj;
|
|
path = path.replace(/\[(\w+)\]/g, '.$1');
|
|
path = path.replace(/^\./, '');
|
|
|
|
var keyArr = path.split('.');
|
|
var i = 0;
|
|
for (var len = keyArr.length; i < len - 1; ++i) {
|
|
if (!tempObj && !strict) break;
|
|
var key = keyArr[i];
|
|
if (key in tempObj) {
|
|
tempObj = tempObj[key];
|
|
} else {
|
|
if (strict) {
|
|
throw new Error('please transfer a valid prop path to form item!');
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
return {
|
|
o: tempObj,
|
|
k: keyArr[i],
|
|
v: tempObj ? tempObj[keyArr[i]] : null
|
|
};
|
|
};
|
|
|
|
var generateId = exports.generateId = function generateId() {
|
|
return Math.floor(Math.random() * 10000);
|
|
};
|
|
|
|
var valueEquals = exports.valueEquals = function valueEquals(a, b) {
|
|
// see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
|
|
if (a === b) return true;
|
|
if (!(a instanceof Array)) return false;
|
|
if (!(b instanceof Array)) return false;
|
|
if (a.length !== b.length) return false;
|
|
for (var i = 0; i !== a.length; ++i) {
|
|
if (a[i] !== b[i]) return false;
|
|
}
|
|
return true;
|
|
};
|
|
|
|
var escapeRegexpString = exports.escapeRegexpString = function escapeRegexpString() {
|
|
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
|
|
};
|
|
|
|
// TODO: use native Array.find, Array.findIndex when IE support is dropped
|
|
var arrayFindIndex = exports.arrayFindIndex = function arrayFindIndex(arr, pred) {
|
|
for (var i = 0; i !== arr.length; ++i) {
|
|
if (pred(arr[i])) {
|
|
return i;
|
|
}
|
|
}
|
|
return -1;
|
|
};
|
|
|
|
var arrayFind = exports.arrayFind = function arrayFind(arr, pred) {
|
|
var idx = arrayFindIndex(arr, pred);
|
|
return idx !== -1 ? arr[idx] : undefined;
|
|
};
|
|
|
|
// coerce truthy value to array
|
|
var coerceTruthyValueToArray = exports.coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
|
|
if (Array.isArray(val)) {
|
|
return val;
|
|
} else if (val) {
|
|
return [val];
|
|
} else {
|
|
return [];
|
|
}
|
|
};
|
|
|
|
var isIE = exports.isIE = function isIE() {
|
|
return !_vue2.default.prototype.$isServer && !isNaN(Number(document.documentMode));
|
|
};
|
|
|
|
var isEdge = exports.isEdge = function isEdge() {
|
|
return !_vue2.default.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
|
|
};
|
|
|
|
var isFirefox = exports.isFirefox = function isFirefox() {
|
|
return !_vue2.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
|
|
};
|
|
|
|
var autoprefixer = exports.autoprefixer = function autoprefixer(style) {
|
|
if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
|
|
var rules = ['transform', 'transition', 'animation'];
|
|
var prefixes = ['ms-', 'webkit-'];
|
|
rules.forEach(function (rule) {
|
|
var value = style[rule];
|
|
if (rule && value) {
|
|
prefixes.forEach(function (prefix) {
|
|
style[prefix + rule] = value;
|
|
});
|
|
}
|
|
});
|
|
return style;
|
|
};
|
|
|
|
var kebabCase = exports.kebabCase = function kebabCase(str) {
|
|
var hyphenateRE = /([^-])([A-Z])/g;
|
|
return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
|
|
};
|
|
|
|
var capitalize = exports.capitalize = function capitalize(str) {
|
|
if (!(0, _types.isString)(str)) return str;
|
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
};
|
|
|
|
var looseEqual = exports.looseEqual = function looseEqual(a, b) {
|
|
var isObjectA = (0, _types.isObject)(a);
|
|
var isObjectB = (0, _types.isObject)(b);
|
|
if (isObjectA && isObjectB) {
|
|
return JSON.stringify(a) === JSON.stringify(b);
|
|
} else if (!isObjectA && !isObjectB) {
|
|
return String(a) === String(b);
|
|
} else {
|
|
return false;
|
|
}
|
|
};
|
|
|
|
var arrayEquals = exports.arrayEquals = function arrayEquals(arrayA, arrayB) {
|
|
arrayA = arrayA || [];
|
|
arrayB = arrayB || [];
|
|
|
|
if (arrayA.length !== arrayB.length) {
|
|
return false;
|
|
}
|
|
|
|
for (var i = 0; i < arrayA.length; i++) {
|
|
if (!looseEqual(arrayA[i], arrayB[i])) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
return true;
|
|
};
|
|
|
|
var isEqual = exports.isEqual = function isEqual(value1, value2) {
|
|
if (Array.isArray(value1) && Array.isArray(value2)) {
|
|
return arrayEquals(value1, value2);
|
|
}
|
|
return looseEqual(value1, value2);
|
|
};
|
|
|
|
var isEmpty = exports.isEmpty = function isEmpty(val) {
|
|
// null or undefined
|
|
if (val == null) return true;
|
|
|
|
if (typeof val === 'boolean') return false;
|
|
|
|
if (typeof val === 'number') return !val;
|
|
|
|
if (val instanceof Error) return val.message === '';
|
|
|
|
switch (Object.prototype.toString.call(val)) {
|
|
// String or Array
|
|
case '[object String]':
|
|
case '[object Array]':
|
|
return !val.length;
|
|
|
|
// Map or Set or File
|
|
case '[object File]':
|
|
case '[object Map]':
|
|
case '[object Set]':
|
|
{
|
|
return !val.size;
|
|
}
|
|
// Plain Object
|
|
case '[object Object]':
|
|
{
|
|
return !Object.keys(val).length;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
};
|
|
|
|
function rafThrottle(fn) {
|
|
var locked = false;
|
|
return function () {
|
|
var _this = this;
|
|
|
|
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
if (locked) return;
|
|
locked = true;
|
|
window.requestAnimationFrame(function (_) {
|
|
fn.apply(_this, args);
|
|
locked = false;
|
|
});
|
|
};
|
|
}
|
|
|
|
function objToArray(obj) {
|
|
if (Array.isArray(obj)) {
|
|
return obj;
|
|
}
|
|
return isEmpty(obj) ? [] : [obj];
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "825a":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isObject = __webpack_require__("861d");
|
|
|
|
module.exports = function (it) {
|
|
if (!isObject(it)) {
|
|
throw TypeError(String(it) + ' is not an object');
|
|
} return it;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "83ab":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var fails = __webpack_require__("d039");
|
|
|
|
// Thank's IE8 for his funny defineProperty
|
|
module.exports = !fails(function () {
|
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "8418":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var toPrimitive = __webpack_require__("c04e");
|
|
var definePropertyModule = __webpack_require__("9bf2");
|
|
var createPropertyDescriptor = __webpack_require__("5c6c");
|
|
|
|
module.exports = function (object, key, value) {
|
|
var propertyKey = toPrimitive(key);
|
|
if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
|
|
else object[propertyKey] = value;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "85e7":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var dP = __webpack_require__("1a14");
|
|
var anObject = __webpack_require__("77e9");
|
|
var getKeys = __webpack_require__("9876");
|
|
|
|
module.exports = __webpack_require__("0bad") ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
anObject(O);
|
|
var keys = getKeys(Properties);
|
|
var length = keys.length;
|
|
var i = 0;
|
|
var P;
|
|
while (length > i) dP.f(O, P = keys[i++], Properties[P]);
|
|
return O;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "861d":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function (it) {
|
|
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "872a":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var defineProperty = __webpack_require__("3b4a");
|
|
|
|
/**
|
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
* value checks.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to modify.
|
|
* @param {string} key The key of the property to assign.
|
|
* @param {*} value The value to assign.
|
|
*/
|
|
function baseAssignValue(object, key, value) {
|
|
if (key == '__proto__' && defineProperty) {
|
|
defineProperty(object, key, {
|
|
'configurable': true,
|
|
'enumerable': true,
|
|
'value': value,
|
|
'writable': true
|
|
});
|
|
} else {
|
|
object[key] = value;
|
|
}
|
|
}
|
|
|
|
module.exports = baseAssignValue;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "8875":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
|
|
// MIT license
|
|
// source: https://github.com/amiller-gh/currentScript-polyfill
|
|
|
|
// added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
|
|
|
|
(function (root, factory) {
|
|
if (true) {
|
|
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __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__));
|
|
} else {}
|
|
}(typeof self !== 'undefined' ? self : this, function () {
|
|
function getCurrentScript () {
|
|
var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
|
|
// for chrome
|
|
if (!descriptor && 'currentScript' in document && document.currentScript) {
|
|
return document.currentScript
|
|
}
|
|
|
|
// for other browsers with native support for currentScript
|
|
if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
|
|
return document.currentScript
|
|
}
|
|
|
|
// IE 8-10 support script readyState
|
|
// IE 11+ & Firefox support stack trace
|
|
try {
|
|
throw new Error();
|
|
}
|
|
catch (err) {
|
|
// Find the second match for the "at" string to get file src url from stack.
|
|
var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
|
|
ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
|
|
stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
|
|
scriptLocation = (stackDetails && stackDetails[1]) || false,
|
|
line = (stackDetails && stackDetails[2]) || false,
|
|
currentLocation = document.location.href.replace(document.location.hash, ''),
|
|
pageSource,
|
|
inlineScriptSourceRegExp,
|
|
inlineScriptSource,
|
|
scripts = document.getElementsByTagName('script'); // Live NodeList collection
|
|
|
|
if (scriptLocation === currentLocation) {
|
|
pageSource = document.documentElement.outerHTML;
|
|
inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
|
|
inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
|
|
}
|
|
|
|
for (var i = 0; i < scripts.length; i++) {
|
|
// If ready state is interactive, return the script tag
|
|
if (scripts[i].readyState === 'interactive') {
|
|
return scripts[i];
|
|
}
|
|
|
|
// If src matches, return the script tag
|
|
if (scripts[i].src === scriptLocation) {
|
|
return scripts[i];
|
|
}
|
|
|
|
// If inline source matches, return the script tag
|
|
if (
|
|
scriptLocation === currentLocation &&
|
|
scripts[i].innerHTML &&
|
|
scripts[i].innerHTML.trim() === inlineScriptSource
|
|
) {
|
|
return scripts[i];
|
|
}
|
|
}
|
|
|
|
// If no match, return null
|
|
return null;
|
|
}
|
|
};
|
|
|
|
return getCurrentScript
|
|
}));
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "8925":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var store = __webpack_require__("c6cd");
|
|
|
|
var functionToString = Function.toString;
|
|
|
|
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
|
|
if (typeof store.inspectSource != 'function') {
|
|
store.inspectSource = function (it) {
|
|
return functionToString.call(it);
|
|
};
|
|
}
|
|
|
|
module.exports = store.inspectSource;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "8a0d":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = {};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "8aa5":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var charAt = __webpack_require__("6547").charAt;
|
|
|
|
// `AdvanceStringIndex` abstract operation
|
|
// https://tc39.github.io/ecma262/#sec-advancestringindex
|
|
module.exports = function (S, index, unicode) {
|
|
return index + (unicode ? charAt(S, index).length : 1);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "8b1a":
|
|
/***/ (function(module, exports) {
|
|
|
|
var id = 0;
|
|
var px = Math.random();
|
|
module.exports = function (key) {
|
|
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "8bbc":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 124);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 0:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
|
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
function normalizeComponent (
|
|
scriptExports,
|
|
render,
|
|
staticRenderFns,
|
|
functionalTemplate,
|
|
injectStyles,
|
|
scopeId,
|
|
moduleIdentifier, /* server only */
|
|
shadowMode /* vue-cli only */
|
|
) {
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (render) {
|
|
options.render = render
|
|
options.staticRenderFns = staticRenderFns
|
|
options._compiled = true
|
|
}
|
|
|
|
// functional template
|
|
if (functionalTemplate) {
|
|
options.functional = true
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = 'data-v-' + scopeId
|
|
}
|
|
|
|
var hook
|
|
if (moduleIdentifier) { // server build
|
|
hook = function (context) {
|
|
// 2.3 injection
|
|
context =
|
|
context || // cached call
|
|
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
// 2.2 with runInNewContext: true
|
|
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
context = __VUE_SSR_CONTEXT__
|
|
}
|
|
// inject component styles
|
|
if (injectStyles) {
|
|
injectStyles.call(this, context)
|
|
}
|
|
// register component module identifier for async chunk inferrence
|
|
if (context && context._registeredComponents) {
|
|
context._registeredComponents.add(moduleIdentifier)
|
|
}
|
|
}
|
|
// used by ssr in case component is cached and beforeCreate
|
|
// never gets called
|
|
options._ssrRegister = hook
|
|
} else if (injectStyles) {
|
|
hook = shadowMode
|
|
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
|
: injectStyles
|
|
}
|
|
|
|
if (hook) {
|
|
if (options.functional) {
|
|
// for template-only hot-reload because in that case the render fn doesn't
|
|
// go through the normalizer
|
|
options._injectStyles = hook
|
|
// register for functioal component in vue file
|
|
var originalRender = options.render
|
|
options.render = function renderWithStyleInjection (h, context) {
|
|
hook.call(context)
|
|
return originalRender(h, context)
|
|
}
|
|
} else {
|
|
// inject component registration as beforeCreate hook
|
|
var existing = options.beforeCreate
|
|
options.beforeCreate = existing
|
|
? [].concat(existing, hook)
|
|
: [hook]
|
|
}
|
|
}
|
|
|
|
return {
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 124:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tag/src/tag.vue?vue&type=script&lang=js&
|
|
|
|
/* harmony default export */ var tagvue_type_script_lang_js_ = ({
|
|
name: 'ElTag',
|
|
props: {
|
|
text: String,
|
|
closable: Boolean,
|
|
type: String,
|
|
hit: Boolean,
|
|
disableTransitions: Boolean,
|
|
color: String,
|
|
size: String,
|
|
effect: {
|
|
type: String,
|
|
default: 'light',
|
|
validator: function validator(val) {
|
|
return ['dark', 'light', 'plain'].indexOf(val) !== -1;
|
|
}
|
|
}
|
|
},
|
|
methods: {
|
|
handleClose: function handleClose(event) {
|
|
event.stopPropagation();
|
|
this.$emit('close', event);
|
|
},
|
|
handleClick: function handleClick(event) {
|
|
this.$emit('click', event);
|
|
}
|
|
},
|
|
computed: {
|
|
tagSize: function tagSize() {
|
|
return this.size || (this.$ELEMENT || {}).size;
|
|
}
|
|
},
|
|
render: function render(h) {
|
|
var type = this.type,
|
|
tagSize = this.tagSize,
|
|
hit = this.hit,
|
|
effect = this.effect;
|
|
|
|
var classes = ['el-tag', type ? 'el-tag--' + type : '', tagSize ? 'el-tag--' + tagSize : '', effect ? 'el-tag--' + effect : '', hit && 'is-hit'];
|
|
var tagEl = h(
|
|
'span',
|
|
{
|
|
'class': classes,
|
|
style: { backgroundColor: this.color },
|
|
on: {
|
|
'click': this.handleClick
|
|
}
|
|
},
|
|
[this.$slots.default, this.closable && h('i', { 'class': 'el-tag__close el-icon-close', on: {
|
|
'click': this.handleClose
|
|
}
|
|
})]
|
|
);
|
|
|
|
return this.disableTransitions ? tagEl : h(
|
|
'transition',
|
|
{
|
|
attrs: { name: 'el-zoom-in-center' }
|
|
},
|
|
[tagEl]
|
|
);
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/tag/src/tag.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_tagvue_type_script_lang_js_ = (tagvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
var componentNormalizer = __webpack_require__(0);
|
|
|
|
// CONCATENATED MODULE: ./packages/tag/src/tag.vue
|
|
var render, staticRenderFns
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
src_tagvue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var api; }
|
|
component.options.__file = "packages/tag/src/tag.vue"
|
|
/* harmony default export */ var tag = (component.exports);
|
|
// CONCATENATED MODULE: ./packages/tag/index.js
|
|
|
|
|
|
/* istanbul ignore next */
|
|
tag.install = function (Vue) {
|
|
Vue.component(tag.name, tag);
|
|
};
|
|
|
|
/* harmony default export */ var packages_tag = __webpack_exports__["default"] = (tag);
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "8bbf":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;
|
|
|
|
/***/ }),
|
|
|
|
/***/ "8eeb":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var assignValue = __webpack_require__("32b3"),
|
|
baseAssignValue = __webpack_require__("872a");
|
|
|
|
/**
|
|
* Copies properties of `source` to `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} source The object to copy properties from.
|
|
* @param {Array} props The property identifiers to copy.
|
|
* @param {Object} [object={}] The object to copy properties to.
|
|
* @param {Function} [customizer] The function to customize copied values.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function copyObject(source, props, object, customizer) {
|
|
var isNew = !object;
|
|
object || (object = {});
|
|
|
|
var index = -1,
|
|
length = props.length;
|
|
|
|
while (++index < length) {
|
|
var key = props[index];
|
|
|
|
var newValue = customizer
|
|
? customizer(object[key], source[key], key, object, source)
|
|
: undefined;
|
|
|
|
if (newValue === undefined) {
|
|
newValue = source[key];
|
|
}
|
|
if (isNew) {
|
|
baseAssignValue(object, key, newValue);
|
|
} else {
|
|
assignValue(object, key, newValue);
|
|
}
|
|
}
|
|
return object;
|
|
}
|
|
|
|
module.exports = copyObject;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "90e3":
|
|
/***/ (function(module, exports) {
|
|
|
|
var id = 0;
|
|
var postfix = Math.random();
|
|
|
|
module.exports = function (key) {
|
|
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "9112":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var DESCRIPTORS = __webpack_require__("83ab");
|
|
var definePropertyModule = __webpack_require__("9bf2");
|
|
var createPropertyDescriptor = __webpack_require__("5c6c");
|
|
|
|
module.exports = DESCRIPTORS ? function (object, key, value) {
|
|
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
|
|
} : function (object, key, value) {
|
|
object[key] = value;
|
|
return object;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "9141":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var document = __webpack_require__("ef08").document;
|
|
module.exports = document && document.documentElement;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "91e9":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Creates a unary function that invokes `func` with its argument transformed.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to wrap.
|
|
* @param {Function} transform The argument transform.
|
|
* @returns {Function} Returns the new function.
|
|
*/
|
|
function overArg(func, transform) {
|
|
return function(arg) {
|
|
return func(transform(arg));
|
|
};
|
|
}
|
|
|
|
module.exports = overArg;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "9263":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var regexpFlags = __webpack_require__("ad6d");
|
|
var stickyHelpers = __webpack_require__("9f7f");
|
|
|
|
var nativeExec = RegExp.prototype.exec;
|
|
// This always refers to the native implementation, because the
|
|
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
|
|
// which loads this file before patching the method.
|
|
var nativeReplace = String.prototype.replace;
|
|
|
|
var patchedExec = nativeExec;
|
|
|
|
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
var re1 = /a/;
|
|
var re2 = /b*/g;
|
|
nativeExec.call(re1, 'a');
|
|
nativeExec.call(re2, 'a');
|
|
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
|
})();
|
|
|
|
var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;
|
|
|
|
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
|
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
|
|
|
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;
|
|
|
|
if (PATCH) {
|
|
patchedExec = function exec(str) {
|
|
var re = this;
|
|
var lastIndex, reCopy, match, i;
|
|
var sticky = UNSUPPORTED_Y && re.sticky;
|
|
var flags = regexpFlags.call(re);
|
|
var source = re.source;
|
|
var charsAdded = 0;
|
|
var strCopy = str;
|
|
|
|
if (sticky) {
|
|
flags = flags.replace('y', '');
|
|
if (flags.indexOf('g') === -1) {
|
|
flags += 'g';
|
|
}
|
|
|
|
strCopy = String(str).slice(re.lastIndex);
|
|
// Support anchored sticky behavior.
|
|
if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
|
|
source = '(?: ' + source + ')';
|
|
strCopy = ' ' + strCopy;
|
|
charsAdded++;
|
|
}
|
|
// ^(? + rx + ) is needed, in combination with some str slicing, to
|
|
// simulate the 'y' flag.
|
|
reCopy = new RegExp('^(?:' + source + ')', flags);
|
|
}
|
|
|
|
if (NPCG_INCLUDED) {
|
|
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
|
|
}
|
|
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
|
|
|
match = nativeExec.call(sticky ? reCopy : re, strCopy);
|
|
|
|
if (sticky) {
|
|
if (match) {
|
|
match.input = match.input.slice(charsAdded);
|
|
match[0] = match[0].slice(charsAdded);
|
|
match.index = re.lastIndex;
|
|
re.lastIndex += match[0].length;
|
|
} else re.lastIndex = 0;
|
|
} else if (UPDATES_LAST_INDEX_WRONG && match) {
|
|
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
|
}
|
|
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
|
nativeReplace.call(match[0], reCopy, function () {
|
|
for (i = 1; i < arguments.length - 2; i++) {
|
|
if (arguments[i] === undefined) match[i] = undefined;
|
|
}
|
|
});
|
|
}
|
|
|
|
return match;
|
|
};
|
|
}
|
|
|
|
module.exports = patchedExec;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "92f0":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var def = __webpack_require__("1a14").f;
|
|
var has = __webpack_require__("9c0e");
|
|
var TAG = __webpack_require__("cc15")('toStringTag');
|
|
|
|
module.exports = function (it, tag, stat) {
|
|
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "93ed":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getMapData = __webpack_require__("4245");
|
|
|
|
/**
|
|
* Removes `key` and its value from the map.
|
|
*
|
|
* @private
|
|
* @name delete
|
|
* @memberOf MapCache
|
|
* @param {string} key The key of the value to remove.
|
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
*/
|
|
function mapCacheDelete(key) {
|
|
var result = getMapData(this, key)['delete'](key);
|
|
this.size -= result ? 1 : 0;
|
|
return result;
|
|
}
|
|
|
|
module.exports = mapCacheDelete;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "94ca":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var fails = __webpack_require__("d039");
|
|
|
|
var replacement = /#|\.prototype\./;
|
|
|
|
var isForced = function (feature, detection) {
|
|
var value = data[normalize(feature)];
|
|
return value == POLYFILL ? true
|
|
: value == NATIVE ? false
|
|
: typeof detection == 'function' ? fails(detection)
|
|
: !!detection;
|
|
};
|
|
|
|
var normalize = isForced.normalize = function (string) {
|
|
return String(string).replace(replacement, '.').toLowerCase();
|
|
};
|
|
|
|
var data = isForced.data = {};
|
|
var NATIVE = isForced.NATIVE = 'N';
|
|
var POLYFILL = isForced.POLYFILL = 'P';
|
|
|
|
module.exports = isForced;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "9520":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseGetTag = __webpack_require__("3729"),
|
|
isObject = __webpack_require__("1a8c");
|
|
|
|
/** `Object#toString` result references. */
|
|
var asyncTag = '[object AsyncFunction]',
|
|
funcTag = '[object Function]',
|
|
genTag = '[object GeneratorFunction]',
|
|
proxyTag = '[object Proxy]';
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `Function` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
* @example
|
|
*
|
|
* _.isFunction(_);
|
|
* // => true
|
|
*
|
|
* _.isFunction(/abc/);
|
|
* // => false
|
|
*/
|
|
function isFunction(value) {
|
|
if (!isObject(value)) {
|
|
return false;
|
|
}
|
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
var tag = baseGetTag(value);
|
|
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
}
|
|
|
|
module.exports = isFunction;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "961e":
|
|
/***/ (function(module, exports) {
|
|
|
|
var crypto = self.crypto || self.msCrypto
|
|
|
|
module.exports = function (bytes) {
|
|
return crypto.getRandomValues(new Uint8Array(bytes))
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "9638":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Performs a
|
|
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* comparison between two values to determine if they are equivalent.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to compare.
|
|
* @param {*} other The other value to compare.
|
|
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1 };
|
|
* var other = { 'a': 1 };
|
|
*
|
|
* _.eq(object, object);
|
|
* // => true
|
|
*
|
|
* _.eq(object, other);
|
|
* // => false
|
|
*
|
|
* _.eq('a', 'a');
|
|
* // => true
|
|
*
|
|
* _.eq('a', Object('a'));
|
|
* // => false
|
|
*
|
|
* _.eq(NaN, NaN);
|
|
* // => true
|
|
*/
|
|
function eq(value, other) {
|
|
return value === other || (value !== value && other !== other);
|
|
}
|
|
|
|
module.exports = eq;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "96cf":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
/**
|
|
* Copyright (c) 2014-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
var runtime = (function (exports) {
|
|
"use strict";
|
|
|
|
var Op = Object.prototype;
|
|
var hasOwn = Op.hasOwnProperty;
|
|
var undefined; // More compressible than void 0.
|
|
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
|
|
function define(obj, key, value) {
|
|
Object.defineProperty(obj, key, {
|
|
value: value,
|
|
enumerable: true,
|
|
configurable: true,
|
|
writable: true
|
|
});
|
|
return obj[key];
|
|
}
|
|
try {
|
|
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
define({}, "");
|
|
} catch (err) {
|
|
define = function(obj, key, value) {
|
|
return obj[key] = value;
|
|
};
|
|
}
|
|
|
|
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
var generator = Object.create(protoGenerator.prototype);
|
|
var context = new Context(tryLocsList || []);
|
|
|
|
// The ._invoke method unifies the implementations of the .next,
|
|
// .throw, and .return methods.
|
|
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
|
|
return generator;
|
|
}
|
|
exports.wrap = wrap;
|
|
|
|
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
// record like context.tryEntries[i].completion. This interface could
|
|
// have been (and was previously) designed to take a closure to be
|
|
// invoked without arguments, but in all the cases we care about we
|
|
// already have an existing method we want to call, so there's no need
|
|
// to create a new function object. We can even get away with assuming
|
|
// the method takes exactly one argument, since that happens to be true
|
|
// in every case, so we don't have to touch the arguments object. The
|
|
// only additional allocation required is the completion record, which
|
|
// has a stable shape and so hopefully should be cheap to allocate.
|
|
function tryCatch(fn, obj, arg) {
|
|
try {
|
|
return { type: "normal", arg: fn.call(obj, arg) };
|
|
} catch (err) {
|
|
return { type: "throw", arg: err };
|
|
}
|
|
}
|
|
|
|
var GenStateSuspendedStart = "suspendedStart";
|
|
var GenStateSuspendedYield = "suspendedYield";
|
|
var GenStateExecuting = "executing";
|
|
var GenStateCompleted = "completed";
|
|
|
|
// Returning this object from the innerFn has the same effect as
|
|
// breaking out of the dispatch switch statement.
|
|
var ContinueSentinel = {};
|
|
|
|
// Dummy constructor functions that we use as the .constructor and
|
|
// .constructor.prototype properties for functions that return Generator
|
|
// objects. For full spec compliance, you may wish to configure your
|
|
// minifier not to mangle the names of these two functions.
|
|
function Generator() {}
|
|
function GeneratorFunction() {}
|
|
function GeneratorFunctionPrototype() {}
|
|
|
|
// This is a polyfill for %IteratorPrototype% for environments that
|
|
// don't natively support it.
|
|
var IteratorPrototype = {};
|
|
IteratorPrototype[iteratorSymbol] = function () {
|
|
return this;
|
|
};
|
|
|
|
var getProto = Object.getPrototypeOf;
|
|
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
if (NativeIteratorPrototype &&
|
|
NativeIteratorPrototype !== Op &&
|
|
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
// This environment has a native %IteratorPrototype%; use it instead
|
|
// of the polyfill.
|
|
IteratorPrototype = NativeIteratorPrototype;
|
|
}
|
|
|
|
var Gp = GeneratorFunctionPrototype.prototype =
|
|
Generator.prototype = Object.create(IteratorPrototype);
|
|
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
|
|
GeneratorFunctionPrototype.constructor = GeneratorFunction;
|
|
GeneratorFunction.displayName = define(
|
|
GeneratorFunctionPrototype,
|
|
toStringTagSymbol,
|
|
"GeneratorFunction"
|
|
);
|
|
|
|
// Helper for defining the .next, .throw, and .return methods of the
|
|
// Iterator interface in terms of a single ._invoke method.
|
|
function defineIteratorMethods(prototype) {
|
|
["next", "throw", "return"].forEach(function(method) {
|
|
define(prototype, method, function(arg) {
|
|
return this._invoke(method, arg);
|
|
});
|
|
});
|
|
}
|
|
|
|
exports.isGeneratorFunction = function(genFun) {
|
|
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
return ctor
|
|
? ctor === GeneratorFunction ||
|
|
// For the native GeneratorFunction constructor, the best we can
|
|
// do is to check its .name property.
|
|
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
: false;
|
|
};
|
|
|
|
exports.mark = function(genFun) {
|
|
if (Object.setPrototypeOf) {
|
|
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
} else {
|
|
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
}
|
|
genFun.prototype = Object.create(Gp);
|
|
return genFun;
|
|
};
|
|
|
|
// Within the body of any async function, `await x` is transformed to
|
|
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
// meant to be awaited.
|
|
exports.awrap = function(arg) {
|
|
return { __await: arg };
|
|
};
|
|
|
|
function AsyncIterator(generator, PromiseImpl) {
|
|
function invoke(method, arg, resolve, reject) {
|
|
var record = tryCatch(generator[method], generator, arg);
|
|
if (record.type === "throw") {
|
|
reject(record.arg);
|
|
} else {
|
|
var result = record.arg;
|
|
var value = result.value;
|
|
if (value &&
|
|
typeof value === "object" &&
|
|
hasOwn.call(value, "__await")) {
|
|
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
invoke("next", value, resolve, reject);
|
|
}, function(err) {
|
|
invoke("throw", err, resolve, reject);
|
|
});
|
|
}
|
|
|
|
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
// When a yielded Promise is resolved, its final value becomes
|
|
// the .value of the Promise<{value,done}> result for the
|
|
// current iteration.
|
|
result.value = unwrapped;
|
|
resolve(result);
|
|
}, function(error) {
|
|
// If a rejected Promise was yielded, throw the rejection back
|
|
// into the async generator function so it can be handled there.
|
|
return invoke("throw", error, resolve, reject);
|
|
});
|
|
}
|
|
}
|
|
|
|
var previousPromise;
|
|
|
|
function enqueue(method, arg) {
|
|
function callInvokeWithMethodAndArg() {
|
|
return new PromiseImpl(function(resolve, reject) {
|
|
invoke(method, arg, resolve, reject);
|
|
});
|
|
}
|
|
|
|
return previousPromise =
|
|
// If enqueue has been called before, then we want to wait until
|
|
// all previous Promises have been resolved before calling invoke,
|
|
// so that results are always delivered in the correct order. If
|
|
// enqueue has not been called before, then it is important to
|
|
// call invoke immediately, without waiting on a callback to fire,
|
|
// so that the async generator function has the opportunity to do
|
|
// any necessary setup in a predictable way. This predictability
|
|
// is why the Promise constructor synchronously invokes its
|
|
// executor callback, and why async functions synchronously
|
|
// execute code before the first await. Since we implement simple
|
|
// async functions in terms of async generators, it is especially
|
|
// important to get this right, even though it requires care.
|
|
previousPromise ? previousPromise.then(
|
|
callInvokeWithMethodAndArg,
|
|
// Avoid propagating failures to Promises returned by later
|
|
// invocations of the iterator.
|
|
callInvokeWithMethodAndArg
|
|
) : callInvokeWithMethodAndArg();
|
|
}
|
|
|
|
// Define the unified helper method that is used to implement .next,
|
|
// .throw, and .return (see defineIteratorMethods).
|
|
this._invoke = enqueue;
|
|
}
|
|
|
|
defineIteratorMethods(AsyncIterator.prototype);
|
|
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
|
|
return this;
|
|
};
|
|
exports.AsyncIterator = AsyncIterator;
|
|
|
|
// Note that simple async functions are implemented on top of
|
|
// AsyncIterator objects; they just return a Promise for the value of
|
|
// the final result produced by the iterator.
|
|
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
|
|
var iter = new AsyncIterator(
|
|
wrap(innerFn, outerFn, self, tryLocsList),
|
|
PromiseImpl
|
|
);
|
|
|
|
return exports.isGeneratorFunction(outerFn)
|
|
? iter // If outerFn is a generator, return the full iterator.
|
|
: iter.next().then(function(result) {
|
|
return result.done ? result.value : iter.next();
|
|
});
|
|
};
|
|
|
|
function makeInvokeMethod(innerFn, self, context) {
|
|
var state = GenStateSuspendedStart;
|
|
|
|
return function invoke(method, arg) {
|
|
if (state === GenStateExecuting) {
|
|
throw new Error("Generator is already running");
|
|
}
|
|
|
|
if (state === GenStateCompleted) {
|
|
if (method === "throw") {
|
|
throw arg;
|
|
}
|
|
|
|
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
return doneResult();
|
|
}
|
|
|
|
context.method = method;
|
|
context.arg = arg;
|
|
|
|
while (true) {
|
|
var delegate = context.delegate;
|
|
if (delegate) {
|
|
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
if (delegateResult) {
|
|
if (delegateResult === ContinueSentinel) continue;
|
|
return delegateResult;
|
|
}
|
|
}
|
|
|
|
if (context.method === "next") {
|
|
// Setting context._sent for legacy support of Babel's
|
|
// function.sent implementation.
|
|
context.sent = context._sent = context.arg;
|
|
|
|
} else if (context.method === "throw") {
|
|
if (state === GenStateSuspendedStart) {
|
|
state = GenStateCompleted;
|
|
throw context.arg;
|
|
}
|
|
|
|
context.dispatchException(context.arg);
|
|
|
|
} else if (context.method === "return") {
|
|
context.abrupt("return", context.arg);
|
|
}
|
|
|
|
state = GenStateExecuting;
|
|
|
|
var record = tryCatch(innerFn, self, context);
|
|
if (record.type === "normal") {
|
|
// If an exception is thrown from innerFn, we leave state ===
|
|
// GenStateExecuting and loop back for another invocation.
|
|
state = context.done
|
|
? GenStateCompleted
|
|
: GenStateSuspendedYield;
|
|
|
|
if (record.arg === ContinueSentinel) {
|
|
continue;
|
|
}
|
|
|
|
return {
|
|
value: record.arg,
|
|
done: context.done
|
|
};
|
|
|
|
} else if (record.type === "throw") {
|
|
state = GenStateCompleted;
|
|
// Dispatch the exception by looping back around to the
|
|
// context.dispatchException(context.arg) call above.
|
|
context.method = "throw";
|
|
context.arg = record.arg;
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
// result, either by returning a { value, done } result from the
|
|
// delegate iterator, or by modifying context.method and context.arg,
|
|
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
function maybeInvokeDelegate(delegate, context) {
|
|
var method = delegate.iterator[context.method];
|
|
if (method === undefined) {
|
|
// A .throw or .return when the delegate iterator has no .throw
|
|
// method always terminates the yield* loop.
|
|
context.delegate = null;
|
|
|
|
if (context.method === "throw") {
|
|
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
if (delegate.iterator["return"]) {
|
|
// If the delegate iterator has a return method, give it a
|
|
// chance to clean up.
|
|
context.method = "return";
|
|
context.arg = undefined;
|
|
maybeInvokeDelegate(delegate, context);
|
|
|
|
if (context.method === "throw") {
|
|
// If maybeInvokeDelegate(context) changed context.method from
|
|
// "return" to "throw", let that override the TypeError below.
|
|
return ContinueSentinel;
|
|
}
|
|
}
|
|
|
|
context.method = "throw";
|
|
context.arg = new TypeError(
|
|
"The iterator does not provide a 'throw' method");
|
|
}
|
|
|
|
return ContinueSentinel;
|
|
}
|
|
|
|
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
|
|
if (record.type === "throw") {
|
|
context.method = "throw";
|
|
context.arg = record.arg;
|
|
context.delegate = null;
|
|
return ContinueSentinel;
|
|
}
|
|
|
|
var info = record.arg;
|
|
|
|
if (! info) {
|
|
context.method = "throw";
|
|
context.arg = new TypeError("iterator result is not an object");
|
|
context.delegate = null;
|
|
return ContinueSentinel;
|
|
}
|
|
|
|
if (info.done) {
|
|
// Assign the result of the finished delegate to the temporary
|
|
// variable specified by delegate.resultName (see delegateYield).
|
|
context[delegate.resultName] = info.value;
|
|
|
|
// Resume execution at the desired location (see delegateYield).
|
|
context.next = delegate.nextLoc;
|
|
|
|
// If context.method was "throw" but the delegate handled the
|
|
// exception, let the outer generator proceed normally. If
|
|
// context.method was "next", forget context.arg since it has been
|
|
// "consumed" by the delegate iterator. If context.method was
|
|
// "return", allow the original .return call to continue in the
|
|
// outer generator.
|
|
if (context.method !== "return") {
|
|
context.method = "next";
|
|
context.arg = undefined;
|
|
}
|
|
|
|
} else {
|
|
// Re-yield the result returned by the delegate method.
|
|
return info;
|
|
}
|
|
|
|
// The delegate iterator is finished, so forget it and continue with
|
|
// the outer generator.
|
|
context.delegate = null;
|
|
return ContinueSentinel;
|
|
}
|
|
|
|
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
// unified ._invoke helper method.
|
|
defineIteratorMethods(Gp);
|
|
|
|
define(Gp, toStringTagSymbol, "Generator");
|
|
|
|
// A Generator should always return itself as the iterator object when the
|
|
// @@iterator function is called on it. Some browsers' implementations of the
|
|
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
// object to not be returned from this call. This ensures that doesn't happen.
|
|
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
Gp[iteratorSymbol] = function() {
|
|
return this;
|
|
};
|
|
|
|
Gp.toString = function() {
|
|
return "[object Generator]";
|
|
};
|
|
|
|
function pushTryEntry(locs) {
|
|
var entry = { tryLoc: locs[0] };
|
|
|
|
if (1 in locs) {
|
|
entry.catchLoc = locs[1];
|
|
}
|
|
|
|
if (2 in locs) {
|
|
entry.finallyLoc = locs[2];
|
|
entry.afterLoc = locs[3];
|
|
}
|
|
|
|
this.tryEntries.push(entry);
|
|
}
|
|
|
|
function resetTryEntry(entry) {
|
|
var record = entry.completion || {};
|
|
record.type = "normal";
|
|
delete record.arg;
|
|
entry.completion = record;
|
|
}
|
|
|
|
function Context(tryLocsList) {
|
|
// The root entry object (effectively a try statement without a catch
|
|
// or a finally block) gives us a place to store values thrown from
|
|
// locations where there is no enclosing try statement.
|
|
this.tryEntries = [{ tryLoc: "root" }];
|
|
tryLocsList.forEach(pushTryEntry, this);
|
|
this.reset(true);
|
|
}
|
|
|
|
exports.keys = function(object) {
|
|
var keys = [];
|
|
for (var key in object) {
|
|
keys.push(key);
|
|
}
|
|
keys.reverse();
|
|
|
|
// Rather than returning an object with a next method, we keep
|
|
// things simple and return the next function itself.
|
|
return function next() {
|
|
while (keys.length) {
|
|
var key = keys.pop();
|
|
if (key in object) {
|
|
next.value = key;
|
|
next.done = false;
|
|
return next;
|
|
}
|
|
}
|
|
|
|
// To avoid creating an additional object, we just hang the .value
|
|
// and .done properties off the next function object itself. This
|
|
// also ensures that the minifier will not anonymize the function.
|
|
next.done = true;
|
|
return next;
|
|
};
|
|
};
|
|
|
|
function values(iterable) {
|
|
if (iterable) {
|
|
var iteratorMethod = iterable[iteratorSymbol];
|
|
if (iteratorMethod) {
|
|
return iteratorMethod.call(iterable);
|
|
}
|
|
|
|
if (typeof iterable.next === "function") {
|
|
return iterable;
|
|
}
|
|
|
|
if (!isNaN(iterable.length)) {
|
|
var i = -1, next = function next() {
|
|
while (++i < iterable.length) {
|
|
if (hasOwn.call(iterable, i)) {
|
|
next.value = iterable[i];
|
|
next.done = false;
|
|
return next;
|
|
}
|
|
}
|
|
|
|
next.value = undefined;
|
|
next.done = true;
|
|
|
|
return next;
|
|
};
|
|
|
|
return next.next = next;
|
|
}
|
|
}
|
|
|
|
// Return an iterator with no values.
|
|
return { next: doneResult };
|
|
}
|
|
exports.values = values;
|
|
|
|
function doneResult() {
|
|
return { value: undefined, done: true };
|
|
}
|
|
|
|
Context.prototype = {
|
|
constructor: Context,
|
|
|
|
reset: function(skipTempReset) {
|
|
this.prev = 0;
|
|
this.next = 0;
|
|
// Resetting context._sent for legacy support of Babel's
|
|
// function.sent implementation.
|
|
this.sent = this._sent = undefined;
|
|
this.done = false;
|
|
this.delegate = null;
|
|
|
|
this.method = "next";
|
|
this.arg = undefined;
|
|
|
|
this.tryEntries.forEach(resetTryEntry);
|
|
|
|
if (!skipTempReset) {
|
|
for (var name in this) {
|
|
// Not sure about the optimal order of these conditions:
|
|
if (name.charAt(0) === "t" &&
|
|
hasOwn.call(this, name) &&
|
|
!isNaN(+name.slice(1))) {
|
|
this[name] = undefined;
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
stop: function() {
|
|
this.done = true;
|
|
|
|
var rootEntry = this.tryEntries[0];
|
|
var rootRecord = rootEntry.completion;
|
|
if (rootRecord.type === "throw") {
|
|
throw rootRecord.arg;
|
|
}
|
|
|
|
return this.rval;
|
|
},
|
|
|
|
dispatchException: function(exception) {
|
|
if (this.done) {
|
|
throw exception;
|
|
}
|
|
|
|
var context = this;
|
|
function handle(loc, caught) {
|
|
record.type = "throw";
|
|
record.arg = exception;
|
|
context.next = loc;
|
|
|
|
if (caught) {
|
|
// If the dispatched exception was caught by a catch block,
|
|
// then let that catch block handle the exception normally.
|
|
context.method = "next";
|
|
context.arg = undefined;
|
|
}
|
|
|
|
return !! caught;
|
|
}
|
|
|
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
var entry = this.tryEntries[i];
|
|
var record = entry.completion;
|
|
|
|
if (entry.tryLoc === "root") {
|
|
// Exception thrown outside of any try block that could handle
|
|
// it, so set the completion value of the entire function to
|
|
// throw the exception.
|
|
return handle("end");
|
|
}
|
|
|
|
if (entry.tryLoc <= this.prev) {
|
|
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
|
|
if (hasCatch && hasFinally) {
|
|
if (this.prev < entry.catchLoc) {
|
|
return handle(entry.catchLoc, true);
|
|
} else if (this.prev < entry.finallyLoc) {
|
|
return handle(entry.finallyLoc);
|
|
}
|
|
|
|
} else if (hasCatch) {
|
|
if (this.prev < entry.catchLoc) {
|
|
return handle(entry.catchLoc, true);
|
|
}
|
|
|
|
} else if (hasFinally) {
|
|
if (this.prev < entry.finallyLoc) {
|
|
return handle(entry.finallyLoc);
|
|
}
|
|
|
|
} else {
|
|
throw new Error("try statement without catch or finally");
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
abrupt: function(type, arg) {
|
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
var entry = this.tryEntries[i];
|
|
if (entry.tryLoc <= this.prev &&
|
|
hasOwn.call(entry, "finallyLoc") &&
|
|
this.prev < entry.finallyLoc) {
|
|
var finallyEntry = entry;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (finallyEntry &&
|
|
(type === "break" ||
|
|
type === "continue") &&
|
|
finallyEntry.tryLoc <= arg &&
|
|
arg <= finallyEntry.finallyLoc) {
|
|
// Ignore the finally entry if control is not jumping to a
|
|
// location outside the try/catch block.
|
|
finallyEntry = null;
|
|
}
|
|
|
|
var record = finallyEntry ? finallyEntry.completion : {};
|
|
record.type = type;
|
|
record.arg = arg;
|
|
|
|
if (finallyEntry) {
|
|
this.method = "next";
|
|
this.next = finallyEntry.finallyLoc;
|
|
return ContinueSentinel;
|
|
}
|
|
|
|
return this.complete(record);
|
|
},
|
|
|
|
complete: function(record, afterLoc) {
|
|
if (record.type === "throw") {
|
|
throw record.arg;
|
|
}
|
|
|
|
if (record.type === "break" ||
|
|
record.type === "continue") {
|
|
this.next = record.arg;
|
|
} else if (record.type === "return") {
|
|
this.rval = this.arg = record.arg;
|
|
this.method = "return";
|
|
this.next = "end";
|
|
} else if (record.type === "normal" && afterLoc) {
|
|
this.next = afterLoc;
|
|
}
|
|
|
|
return ContinueSentinel;
|
|
},
|
|
|
|
finish: function(finallyLoc) {
|
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
var entry = this.tryEntries[i];
|
|
if (entry.finallyLoc === finallyLoc) {
|
|
this.complete(entry.completion, entry.afterLoc);
|
|
resetTryEntry(entry);
|
|
return ContinueSentinel;
|
|
}
|
|
}
|
|
},
|
|
|
|
"catch": function(tryLoc) {
|
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
var entry = this.tryEntries[i];
|
|
if (entry.tryLoc === tryLoc) {
|
|
var record = entry.completion;
|
|
if (record.type === "throw") {
|
|
var thrown = record.arg;
|
|
resetTryEntry(entry);
|
|
}
|
|
return thrown;
|
|
}
|
|
}
|
|
|
|
// The context.catch method must only be called with a location
|
|
// argument that corresponds to a known catch block.
|
|
throw new Error("illegal catch attempt");
|
|
},
|
|
|
|
delegateYield: function(iterable, resultName, nextLoc) {
|
|
this.delegate = {
|
|
iterator: values(iterable),
|
|
resultName: resultName,
|
|
nextLoc: nextLoc
|
|
};
|
|
|
|
if (this.method === "next") {
|
|
// Deliberately forget the last sent value so that we don't
|
|
// accidentally pass it on to the delegate.
|
|
this.arg = undefined;
|
|
}
|
|
|
|
return ContinueSentinel;
|
|
}
|
|
};
|
|
|
|
// Regardless of whether this script is executing as a CommonJS module
|
|
// or not, return the runtime object so that we can declare the variable
|
|
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
return exports;
|
|
|
|
}(
|
|
// If this script is executing as a CommonJS module, use module.exports
|
|
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
// object. Either way, the resulting object will be used to initialize
|
|
// the regeneratorRuntime variable at the top of this file.
|
|
true ? module.exports : undefined
|
|
));
|
|
|
|
try {
|
|
regeneratorRuntime = runtime;
|
|
} catch (accidentalStrictMode) {
|
|
// This module should not be running in strict mode, so the above
|
|
// assignment should always work unless something is misconfigured. Just
|
|
// in case runtime.js accidentally runs in strict mode, we can escape
|
|
// strict mode using a global Function call. This could conceivably fail
|
|
// if a Content Security Policy forbids using Function, but in that case
|
|
// the proper solution is to fix the accidental strict mode problem. If
|
|
// you've misconfigured your bundler to force strict mode and applied a
|
|
// CSP to forbid Function, and you're not willing to fix either of those
|
|
// problems, please detail your unique predicament in a GitHub issue.
|
|
Function("r", "regeneratorRuntime = r")(runtime);
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "9742":
|
|
/***/ (function(module, exports) {
|
|
|
|
// IE 8- don't enum bug keys
|
|
module.exports = (
|
|
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
|
|
).split(',');
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "9876":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
|
var $keys = __webpack_require__("03d6");
|
|
var enumBugKeys = __webpack_require__("9742");
|
|
|
|
module.exports = Object.keys || function keys(O) {
|
|
return $keys(O, enumBugKeys);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "9934":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arrayLikeKeys = __webpack_require__("6fcd"),
|
|
baseKeysIn = __webpack_require__("41c3"),
|
|
isArrayLike = __webpack_require__("30c9");
|
|
|
|
/**
|
|
* Creates an array of the own and inherited enumerable property names of `object`.
|
|
*
|
|
* **Note:** Non-object values are coerced to objects.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property names.
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* this.b = 2;
|
|
* }
|
|
*
|
|
* Foo.prototype.c = 3;
|
|
*
|
|
* _.keysIn(new Foo);
|
|
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
|
|
*/
|
|
function keysIn(object) {
|
|
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
|
}
|
|
|
|
module.exports = keysIn;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "99af":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $ = __webpack_require__("23e7");
|
|
var fails = __webpack_require__("d039");
|
|
var isArray = __webpack_require__("e8b5");
|
|
var isObject = __webpack_require__("861d");
|
|
var toObject = __webpack_require__("7b0b");
|
|
var toLength = __webpack_require__("50c4");
|
|
var createProperty = __webpack_require__("8418");
|
|
var arraySpeciesCreate = __webpack_require__("65f0");
|
|
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");
|
|
var wellKnownSymbol = __webpack_require__("b622");
|
|
var V8_VERSION = __webpack_require__("2d00");
|
|
|
|
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
|
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
|
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
|
|
|
// We can't use this feature detection in V8 since it causes
|
|
// deoptimization and serious performance degradation
|
|
// https://github.com/zloirock/core-js/issues/679
|
|
var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
|
|
var array = [];
|
|
array[IS_CONCAT_SPREADABLE] = false;
|
|
return array.concat()[0] !== array;
|
|
});
|
|
|
|
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
|
|
|
|
var isConcatSpreadable = function (O) {
|
|
if (!isObject(O)) return false;
|
|
var spreadable = O[IS_CONCAT_SPREADABLE];
|
|
return spreadable !== undefined ? !!spreadable : isArray(O);
|
|
};
|
|
|
|
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
|
|
|
|
// `Array.prototype.concat` method
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype.concat
|
|
// with adding support of @@isConcatSpreadable and @@species
|
|
$({ target: 'Array', proto: true, forced: FORCED }, {
|
|
concat: function concat(arg) { // eslint-disable-line no-unused-vars
|
|
var O = toObject(this);
|
|
var A = arraySpeciesCreate(O, 0);
|
|
var n = 0;
|
|
var i, k, length, len, E;
|
|
for (i = -1, length = arguments.length; i < length; i++) {
|
|
E = i === -1 ? O : arguments[i];
|
|
if (isConcatSpreadable(E)) {
|
|
len = toLength(E.length);
|
|
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
|
} else {
|
|
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
createProperty(A, n++, E);
|
|
}
|
|
}
|
|
A.length = n;
|
|
return A;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "99d3":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__("585a");
|
|
|
|
/** Detect free variable `exports`. */
|
|
var freeExports = true && exports && !exports.nodeType && exports;
|
|
|
|
/** Detect free variable `module`. */
|
|
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
|
|
|
/** Detect the popular CommonJS extension `module.exports`. */
|
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
|
|
/** Detect free variable `process` from Node.js. */
|
|
var freeProcess = moduleExports && freeGlobal.process;
|
|
|
|
/** Used to access faster Node.js helpers. */
|
|
var nodeUtil = (function() {
|
|
try {
|
|
// Use `util.types` for Node.js 10+.
|
|
var types = freeModule && freeModule.require && freeModule.require('util').types;
|
|
|
|
if (types) {
|
|
return types;
|
|
}
|
|
|
|
// Legacy `process.binding('util')` for Node.js < 10.
|
|
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
} catch (e) {}
|
|
}());
|
|
|
|
module.exports = nodeUtil;
|
|
|
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("62e4")(module)))
|
|
|
|
/***/ }),
|
|
|
|
/***/ "9bdd":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var anObject = __webpack_require__("825a");
|
|
|
|
// call something on iterator step with safe closing on error
|
|
module.exports = function (iterator, fn, value, ENTRIES) {
|
|
try {
|
|
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
|
|
// 7.4.6 IteratorClose(iterator, completion)
|
|
} catch (error) {
|
|
var returnMethod = iterator['return'];
|
|
if (returnMethod !== undefined) anObject(returnMethod.call(iterator));
|
|
throw error;
|
|
}
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "9bf2":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var DESCRIPTORS = __webpack_require__("83ab");
|
|
var IE8_DOM_DEFINE = __webpack_require__("0cfb");
|
|
var anObject = __webpack_require__("825a");
|
|
var toPrimitive = __webpack_require__("c04e");
|
|
|
|
var nativeDefineProperty = Object.defineProperty;
|
|
|
|
// `Object.defineProperty` method
|
|
// https://tc39.github.io/ecma262/#sec-object.defineproperty
|
|
exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
|
|
anObject(O);
|
|
P = toPrimitive(P, true);
|
|
anObject(Attributes);
|
|
if (IE8_DOM_DEFINE) try {
|
|
return nativeDefineProperty(O, P, Attributes);
|
|
} catch (error) { /* empty */ }
|
|
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
return O;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "9c0c":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// optional / simple context binding
|
|
var aFunction = __webpack_require__("1609");
|
|
module.exports = function (fn, that, length) {
|
|
aFunction(fn);
|
|
if (that === undefined) return fn;
|
|
switch (length) {
|
|
case 1: return function (a) {
|
|
return fn.call(that, a);
|
|
};
|
|
case 2: return function (a, b) {
|
|
return fn.call(that, a, b);
|
|
};
|
|
case 3: return function (a, b, c) {
|
|
return fn.call(that, a, b, c);
|
|
};
|
|
}
|
|
return function (/* ...args */) {
|
|
return fn.apply(that, arguments);
|
|
};
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "9c0e":
|
|
/***/ (function(module, exports) {
|
|
|
|
var hasOwnProperty = {}.hasOwnProperty;
|
|
module.exports = function (it, key) {
|
|
return hasOwnProperty.call(it, key);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "9d11":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var toInteger = __webpack_require__("fc5e");
|
|
var max = Math.max;
|
|
var min = Math.min;
|
|
module.exports = function (index, length) {
|
|
index = toInteger(index);
|
|
return index < 0 ? max(index + length, 0) : min(index, length);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "9d7e":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
|
|
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; };
|
|
|
|
exports.default = function (Vue) {
|
|
|
|
/**
|
|
* template
|
|
*
|
|
* @param {String} string
|
|
* @param {Array} ...args
|
|
* @return {String}
|
|
*/
|
|
|
|
function template(string) {
|
|
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
args[_key - 1] = arguments[_key];
|
|
}
|
|
|
|
if (args.length === 1 && _typeof(args[0]) === 'object') {
|
|
args = args[0];
|
|
}
|
|
|
|
if (!args || !args.hasOwnProperty) {
|
|
args = {};
|
|
}
|
|
|
|
return string.replace(RE_NARGS, function (match, prefix, i, index) {
|
|
var result = void 0;
|
|
|
|
if (string[index - 1] === '{' && string[index + match.length] === '}') {
|
|
return i;
|
|
} else {
|
|
result = (0, _util.hasOwn)(args, i) ? args[i] : null;
|
|
if (result === null || result === undefined) {
|
|
return '';
|
|
}
|
|
|
|
return result;
|
|
}
|
|
});
|
|
}
|
|
|
|
return template;
|
|
};
|
|
|
|
var _util = __webpack_require__("8122");
|
|
|
|
var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
|
|
/**
|
|
* String format template
|
|
* - Inspired:
|
|
* https://github.com/Matt-Esch/string-template/index.js
|
|
*/
|
|
|
|
/***/ }),
|
|
|
|
/***/ "9e69":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var root = __webpack_require__("2b3e");
|
|
|
|
/** Built-in value references. */
|
|
var Symbol = root.Symbol;
|
|
|
|
module.exports = Symbol;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "9f7f":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var fails = __webpack_require__("d039");
|
|
|
|
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
|
|
// so we use an intermediate function.
|
|
function RE(s, f) {
|
|
return RegExp(s, f);
|
|
}
|
|
|
|
exports.UNSUPPORTED_Y = fails(function () {
|
|
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
var re = RE('a', 'y');
|
|
re.lastIndex = 2;
|
|
return re.exec('abcd') != null;
|
|
});
|
|
|
|
exports.BROKEN_CARET = fails(function () {
|
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
var re = RE('^r', 'gy');
|
|
re.lastIndex = 2;
|
|
return re.exec('str') != null;
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "9fbb":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
var cof = __webpack_require__("4d88");
|
|
// eslint-disable-next-line no-prototype-builtins
|
|
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
|
return cof(it) == 'String' ? it.split('') : Object(it);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "a029":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arrayPush = __webpack_require__("087d"),
|
|
getPrototype = __webpack_require__("2dcb"),
|
|
getSymbols = __webpack_require__("32f4"),
|
|
stubArray = __webpack_require__("d327");
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
|
|
/**
|
|
* Creates an array of the own and inherited enumerable symbols of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of symbols.
|
|
*/
|
|
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
|
var result = [];
|
|
while (object) {
|
|
arrayPush(result, getSymbols(object));
|
|
object = getPrototype(object);
|
|
}
|
|
return result;
|
|
};
|
|
|
|
module.exports = getSymbolsIn;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "a15e":
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
// ESM COMPAT FLAG
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/extends.js
|
|
var helpers_extends = __webpack_require__("41b2");
|
|
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/typeof.js
|
|
var helpers_typeof = __webpack_require__("1098");
|
|
var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/util.js
|
|
|
|
|
|
var formatRegExp = /%[sdj%]/g;
|
|
|
|
var warning = function warning() {};
|
|
|
|
// don't print warning message when in production env or node runtime
|
|
if (false) {}
|
|
|
|
function format() {
|
|
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
var i = 1;
|
|
var f = args[0];
|
|
var len = args.length;
|
|
if (typeof f === 'function') {
|
|
return f.apply(null, args.slice(1));
|
|
}
|
|
if (typeof f === 'string') {
|
|
var str = String(f).replace(formatRegExp, function (x) {
|
|
if (x === '%%') {
|
|
return '%';
|
|
}
|
|
if (i >= len) {
|
|
return x;
|
|
}
|
|
switch (x) {
|
|
case '%s':
|
|
return String(args[i++]);
|
|
case '%d':
|
|
return Number(args[i++]);
|
|
case '%j':
|
|
try {
|
|
return JSON.stringify(args[i++]);
|
|
} catch (_) {
|
|
return '[Circular]';
|
|
}
|
|
break;
|
|
default:
|
|
return x;
|
|
}
|
|
});
|
|
for (var arg = args[i]; i < len; arg = args[++i]) {
|
|
str += ' ' + arg;
|
|
}
|
|
return str;
|
|
}
|
|
return f;
|
|
}
|
|
|
|
function isNativeStringType(type) {
|
|
return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
|
|
}
|
|
|
|
function isEmptyValue(value, type) {
|
|
if (value === undefined || value === null) {
|
|
return true;
|
|
}
|
|
if (type === 'array' && Array.isArray(value) && !value.length) {
|
|
return true;
|
|
}
|
|
if (isNativeStringType(type) && typeof value === 'string' && !value) {
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function isEmptyObject(obj) {
|
|
return Object.keys(obj).length === 0;
|
|
}
|
|
|
|
function asyncParallelArray(arr, func, callback) {
|
|
var results = [];
|
|
var total = 0;
|
|
var arrLength = arr.length;
|
|
|
|
function count(errors) {
|
|
results.push.apply(results, errors);
|
|
total++;
|
|
if (total === arrLength) {
|
|
callback(results);
|
|
}
|
|
}
|
|
|
|
arr.forEach(function (a) {
|
|
func(a, count);
|
|
});
|
|
}
|
|
|
|
function asyncSerialArray(arr, func, callback) {
|
|
var index = 0;
|
|
var arrLength = arr.length;
|
|
|
|
function next(errors) {
|
|
if (errors && errors.length) {
|
|
callback(errors);
|
|
return;
|
|
}
|
|
var original = index;
|
|
index = index + 1;
|
|
if (original < arrLength) {
|
|
func(arr[original], next);
|
|
} else {
|
|
callback([]);
|
|
}
|
|
}
|
|
|
|
next([]);
|
|
}
|
|
|
|
function flattenObjArr(objArr) {
|
|
var ret = [];
|
|
Object.keys(objArr).forEach(function (k) {
|
|
ret.push.apply(ret, objArr[k]);
|
|
});
|
|
return ret;
|
|
}
|
|
|
|
function asyncMap(objArr, option, func, callback) {
|
|
if (option.first) {
|
|
var flattenArr = flattenObjArr(objArr);
|
|
return asyncSerialArray(flattenArr, func, callback);
|
|
}
|
|
var firstFields = option.firstFields || [];
|
|
if (firstFields === true) {
|
|
firstFields = Object.keys(objArr);
|
|
}
|
|
var objArrKeys = Object.keys(objArr);
|
|
var objArrLength = objArrKeys.length;
|
|
var total = 0;
|
|
var results = [];
|
|
var next = function next(errors) {
|
|
results.push.apply(results, errors);
|
|
total++;
|
|
if (total === objArrLength) {
|
|
callback(results);
|
|
}
|
|
};
|
|
objArrKeys.forEach(function (key) {
|
|
var arr = objArr[key];
|
|
if (firstFields.indexOf(key) !== -1) {
|
|
asyncSerialArray(arr, func, next);
|
|
} else {
|
|
asyncParallelArray(arr, func, next);
|
|
}
|
|
});
|
|
}
|
|
|
|
function complementError(rule) {
|
|
return function (oe) {
|
|
if (oe && oe.message) {
|
|
oe.field = oe.field || rule.fullField;
|
|
return oe;
|
|
}
|
|
return {
|
|
message: oe,
|
|
field: oe.field || rule.fullField
|
|
};
|
|
};
|
|
}
|
|
|
|
function deepMerge(target, source) {
|
|
if (source) {
|
|
for (var s in source) {
|
|
if (source.hasOwnProperty(s)) {
|
|
var value = source[s];
|
|
if ((typeof value === 'undefined' ? 'undefined' : typeof_default()(value)) === 'object' && typeof_default()(target[s]) === 'object') {
|
|
target[s] = extends_default()({}, target[s], value);
|
|
} else {
|
|
target[s] = value;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return target;
|
|
}
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/rule/required.js
|
|
|
|
|
|
/**
|
|
* Rule for validating required fields.
|
|
*
|
|
* @param rule The validation rule.
|
|
* @param value The value of the field on the source object.
|
|
* @param source The source object being validated.
|
|
* @param errors An array of errors that this rule may add
|
|
* validation errors to.
|
|
* @param options The validation options.
|
|
* @param options.messages The validation messages.
|
|
*/
|
|
function required(rule, value, source, errors, options, type) {
|
|
if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
|
|
errors.push(format(options.messages.required, rule.fullField));
|
|
}
|
|
}
|
|
|
|
/* harmony default export */ var rule_required = (required);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/rule/whitespace.js
|
|
|
|
|
|
/**
|
|
* Rule for validating whitespace.
|
|
*
|
|
* @param rule The validation rule.
|
|
* @param value The value of the field on the source object.
|
|
* @param source The source object being validated.
|
|
* @param errors An array of errors that this rule may add
|
|
* validation errors to.
|
|
* @param options The validation options.
|
|
* @param options.messages The validation messages.
|
|
*/
|
|
function whitespace(rule, value, source, errors, options) {
|
|
if (/^\s+$/.test(value) || value === '') {
|
|
errors.push(format(options.messages.whitespace, rule.fullField));
|
|
}
|
|
}
|
|
|
|
/* harmony default export */ var rule_whitespace = (whitespace);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/rule/type.js
|
|
|
|
|
|
|
|
|
|
/* eslint max-len:0 */
|
|
|
|
var pattern = {
|
|
// http://emailregex.com/
|
|
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
|
url: new RegExp('^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$', 'i'),
|
|
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
|
};
|
|
|
|
var types = {
|
|
integer: function integer(value) {
|
|
return types.number(value) && parseInt(value, 10) === value;
|
|
},
|
|
float: function float(value) {
|
|
return types.number(value) && !types.integer(value);
|
|
},
|
|
array: function array(value) {
|
|
return Array.isArray(value);
|
|
},
|
|
regexp: function regexp(value) {
|
|
if (value instanceof RegExp) {
|
|
return true;
|
|
}
|
|
try {
|
|
return !!new RegExp(value);
|
|
} catch (e) {
|
|
return false;
|
|
}
|
|
},
|
|
date: function date(value) {
|
|
return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function';
|
|
},
|
|
number: function number(value) {
|
|
if (isNaN(value)) {
|
|
return false;
|
|
}
|
|
return typeof value === 'number';
|
|
},
|
|
object: function object(value) {
|
|
return (typeof value === 'undefined' ? 'undefined' : typeof_default()(value)) === 'object' && !types.array(value);
|
|
},
|
|
method: function method(value) {
|
|
return typeof value === 'function';
|
|
},
|
|
email: function email(value) {
|
|
return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
|
|
},
|
|
url: function url(value) {
|
|
return typeof value === 'string' && !!value.match(pattern.url);
|
|
},
|
|
hex: function hex(value) {
|
|
return typeof value === 'string' && !!value.match(pattern.hex);
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Rule for validating the type of a value.
|
|
*
|
|
* @param rule The validation rule.
|
|
* @param value The value of the field on the source object.
|
|
* @param source The source object being validated.
|
|
* @param errors An array of errors that this rule may add
|
|
* validation errors to.
|
|
* @param options The validation options.
|
|
* @param options.messages The validation messages.
|
|
*/
|
|
function type_type(rule, value, source, errors, options) {
|
|
if (rule.required && value === undefined) {
|
|
rule_required(rule, value, source, errors, options);
|
|
return;
|
|
}
|
|
var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
|
|
var ruleType = rule.type;
|
|
if (custom.indexOf(ruleType) > -1) {
|
|
if (!types[ruleType](value)) {
|
|
errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
|
|
}
|
|
// straight typeof check
|
|
} else if (ruleType && (typeof value === 'undefined' ? 'undefined' : typeof_default()(value)) !== rule.type) {
|
|
errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
|
|
}
|
|
}
|
|
|
|
/* harmony default export */ var rule_type = (type_type);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/rule/range.js
|
|
|
|
|
|
/**
|
|
* Rule for validating minimum and maximum allowed values.
|
|
*
|
|
* @param rule The validation rule.
|
|
* @param value The value of the field on the source object.
|
|
* @param source The source object being validated.
|
|
* @param errors An array of errors that this rule may add
|
|
* validation errors to.
|
|
* @param options The validation options.
|
|
* @param options.messages The validation messages.
|
|
*/
|
|
function range(rule, value, source, errors, options) {
|
|
var len = typeof rule.len === 'number';
|
|
var min = typeof rule.min === 'number';
|
|
var max = typeof rule.max === 'number';
|
|
// 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
|
|
var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
|
var val = value;
|
|
var key = null;
|
|
var num = typeof value === 'number';
|
|
var str = typeof value === 'string';
|
|
var arr = Array.isArray(value);
|
|
if (num) {
|
|
key = 'number';
|
|
} else if (str) {
|
|
key = 'string';
|
|
} else if (arr) {
|
|
key = 'array';
|
|
}
|
|
// if the value is not of a supported type for range validation
|
|
// the validation rule rule should use the
|
|
// type property to also test for a particular type
|
|
if (!key) {
|
|
return false;
|
|
}
|
|
if (arr) {
|
|
val = value.length;
|
|
}
|
|
if (str) {
|
|
// 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3
|
|
val = value.replace(spRegexp, '_').length;
|
|
}
|
|
if (len) {
|
|
if (val !== rule.len) {
|
|
errors.push(format(options.messages[key].len, rule.fullField, rule.len));
|
|
}
|
|
} else if (min && !max && val < rule.min) {
|
|
errors.push(format(options.messages[key].min, rule.fullField, rule.min));
|
|
} else if (max && !min && val > rule.max) {
|
|
errors.push(format(options.messages[key].max, rule.fullField, rule.max));
|
|
} else if (min && max && (val < rule.min || val > rule.max)) {
|
|
errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
|
|
}
|
|
}
|
|
|
|
/* harmony default export */ var rule_range = (range);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/rule/enum.js
|
|
|
|
var ENUM = 'enum';
|
|
|
|
/**
|
|
* Rule for validating a value exists in an enumerable list.
|
|
*
|
|
* @param rule The validation rule.
|
|
* @param value The value of the field on the source object.
|
|
* @param source The source object being validated.
|
|
* @param errors An array of errors that this rule may add
|
|
* validation errors to.
|
|
* @param options The validation options.
|
|
* @param options.messages The validation messages.
|
|
*/
|
|
function enumerable(rule, value, source, errors, options) {
|
|
rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
|
|
if (rule[ENUM].indexOf(value) === -1) {
|
|
errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
|
|
}
|
|
}
|
|
|
|
/* harmony default export */ var rule_enum = (enumerable);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/rule/pattern.js
|
|
|
|
|
|
/**
|
|
* Rule for validating a regular expression pattern.
|
|
*
|
|
* @param rule The validation rule.
|
|
* @param value The value of the field on the source object.
|
|
* @param source The source object being validated.
|
|
* @param errors An array of errors that this rule may add
|
|
* validation errors to.
|
|
* @param options The validation options.
|
|
* @param options.messages The validation messages.
|
|
*/
|
|
function pattern_pattern(rule, value, source, errors, options) {
|
|
if (rule.pattern) {
|
|
if (rule.pattern instanceof RegExp) {
|
|
// if a RegExp instance is passed, reset `lastIndex` in case its `global`
|
|
// flag is accidentally set to `true`, which in a validation scenario
|
|
// is not necessary and the result might be misleading
|
|
rule.pattern.lastIndex = 0;
|
|
if (!rule.pattern.test(value)) {
|
|
errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
|
|
}
|
|
} else if (typeof rule.pattern === 'string') {
|
|
var _pattern = new RegExp(rule.pattern);
|
|
if (!_pattern.test(value)) {
|
|
errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* harmony default export */ var rule_pattern = (pattern_pattern);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/rule/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var es_rule = ({
|
|
required: rule_required,
|
|
whitespace: rule_whitespace,
|
|
type: rule_type,
|
|
range: rule_range,
|
|
'enum': rule_enum,
|
|
pattern: rule_pattern
|
|
});
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/validator/string.js
|
|
|
|
|
|
|
|
/**
|
|
* Performs validation for string types.
|
|
*
|
|
* @param rule The validation rule.
|
|
* @param value The value of the field on the source object.
|
|
* @param callback The callback function.
|
|
* @param source The source object being validated.
|
|
* @param options The validation options.
|
|
* @param options.messages The validation messages.
|
|
*/
|
|
function string(rule, value, callback, source, options) {
|
|
var errors = [];
|
|
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
if (validate) {
|
|
if (isEmptyValue(value, 'string') && !rule.required) {
|
|
return callback();
|
|
}
|
|
es_rule.required(rule, value, source, errors, options, 'string');
|
|
if (!isEmptyValue(value, 'string')) {
|
|
es_rule.type(rule, value, source, errors, options);
|
|
es_rule.range(rule, value, source, errors, options);
|
|
es_rule.pattern(rule, value, source, errors, options);
|
|
if (rule.whitespace === true) {
|
|
es_rule.whitespace(rule, value, source, errors, options);
|
|
}
|
|
}
|
|
}
|
|
callback(errors);
|
|
}
|
|
|
|
/* harmony default export */ var validator_string = (string);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/validator/method.js
|
|
|
|
|
|
|
|
/**
|
|
* Validates a function.
|
|
*
|
|
* @param rule The validation rule.
|
|
* @param value The value of the field on the source object.
|
|
* @param callback The callback function.
|
|
* @param source The source object being validated.
|
|
* @param options The validation options.
|
|
* @param options.messages The validation messages.
|
|
*/
|
|
function method(rule, value, callback, source, options) {
|
|
var errors = [];
|
|
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
if (validate) {
|
|
if (isEmptyValue(value) && !rule.required) {
|
|
return callback();
|
|
}
|
|
es_rule.required(rule, value, source, errors, options);
|
|
if (value !== undefined) {
|
|
es_rule.type(rule, value, source, errors, options);
|
|
}
|
|
}
|
|
callback(errors);
|
|
}
|
|
|
|
/* harmony default export */ var validator_method = (method);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/validator/number.js
|
|
|
|
|
|
|
|
/**
|
|
* Validates a number.
|
|
*
|
|
* @param rule The validation rule.
|
|
* @param value The value of the field on the source object.
|
|
* @param callback The callback function.
|
|
* @param source The source object being validated.
|
|
* @param options The validation options.
|
|
* @param options.messages The validation messages.
|
|
*/
|
|
function number(rule, value, callback, source, options) {
|
|
var errors = [];
|
|
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
if (validate) {
|
|
if (isEmptyValue(value) && !rule.required) {
|
|
return callback();
|
|
}
|
|
es_rule.required(rule, value, source, errors, options);
|
|
if (value !== undefined) {
|
|
es_rule.type(rule, value, source, errors, options);
|
|
es_rule.range(rule, value, source, errors, options);
|
|
}
|
|
}
|
|
callback(errors);
|
|
}
|
|
|
|
/* harmony default export */ var validator_number = (number);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/validator/boolean.js
|
|
|
|
|
|
|
|
/**
|
|
* Validates a boolean.
|
|
*
|
|
* @param rule The validation rule.
|
|
* @param value The value of the field on the source object.
|
|
* @param callback The callback function.
|
|
* @param source The source object being validated.
|
|
* @param options The validation options.
|
|
* @param options.messages The validation messages.
|
|
*/
|
|
function boolean_boolean(rule, value, callback, source, options) {
|
|
var errors = [];
|
|
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
if (validate) {
|
|
if (isEmptyValue(value) && !rule.required) {
|
|
return callback();
|
|
}
|
|
es_rule.required(rule, value, source, errors, options);
|
|
if (value !== undefined) {
|
|
es_rule.type(rule, value, source, errors, options);
|
|
}
|
|
}
|
|
callback(errors);
|
|
}
|
|
|
|
/* harmony default export */ var validator_boolean = (boolean_boolean);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/validator/regexp.js
|
|
|
|
|
|
|
|
/**
|
|
* Validates the regular expression type.
|
|
*
|
|
* @param rule The validation rule.
|
|
* @param value The value of the field on the source object.
|
|
* @param callback The callback function.
|
|
* @param source The source object being validated.
|
|
* @param options The validation options.
|
|
* @param options.messages The validation messages.
|
|
*/
|
|
function regexp(rule, value, callback, source, options) {
|
|
var errors = [];
|
|
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
if (validate) {
|
|
if (isEmptyValue(value) && !rule.required) {
|
|
return callback();
|
|
}
|
|
es_rule.required(rule, value, source, errors, options);
|
|
if (!isEmptyValue(value)) {
|
|
es_rule.type(rule, value, source, errors, options);
|
|
}
|
|
}
|
|
callback(errors);
|
|
}
|
|
|
|
/* harmony default export */ var validator_regexp = (regexp);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/validator/integer.js
|
|
|
|
|
|
|
|
/**
|
|
* Validates a number is an integer.
|
|
*
|
|
* @param rule The validation rule.
|
|
* @param value The value of the field on the source object.
|
|
* @param callback The callback function.
|
|
* @param source The source object being validated.
|
|
* @param options The validation options.
|
|
* @param options.messages The validation messages.
|
|
*/
|
|
function integer(rule, value, callback, source, options) {
|
|
var errors = [];
|
|
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
if (validate) {
|
|
if (isEmptyValue(value) && !rule.required) {
|
|
return callback();
|
|
}
|
|
es_rule.required(rule, value, source, errors, options);
|
|
if (value !== undefined) {
|
|
es_rule.type(rule, value, source, errors, options);
|
|
es_rule.range(rule, value, source, errors, options);
|
|
}
|
|
}
|
|
callback(errors);
|
|
}
|
|
|
|
/* harmony default export */ var validator_integer = (integer);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/validator/float.js
|
|
|
|
|
|
|
|
/**
|
|
* Validates a number is a floating point number.
|
|
*
|
|
* @param rule The validation rule.
|
|
* @param value The value of the field on the source object.
|
|
* @param callback The callback function.
|
|
* @param source The source object being validated.
|
|
* @param options The validation options.
|
|
* @param options.messages The validation messages.
|
|
*/
|
|
function floatFn(rule, value, callback, source, options) {
|
|
var errors = [];
|
|
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
if (validate) {
|
|
if (isEmptyValue(value) && !rule.required) {
|
|
return callback();
|
|
}
|
|
es_rule.required(rule, value, source, errors, options);
|
|
if (value !== undefined) {
|
|
es_rule.type(rule, value, source, errors, options);
|
|
es_rule.range(rule, value, source, errors, options);
|
|
}
|
|
}
|
|
callback(errors);
|
|
}
|
|
|
|
/* harmony default export */ var validator_float = (floatFn);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/validator/array.js
|
|
|
|
|
|
/**
|
|
* Validates an array.
|
|
*
|
|
* @param rule The validation rule.
|
|
* @param value The value of the field on the source object.
|
|
* @param callback The callback function.
|
|
* @param source The source object being validated.
|
|
* @param options The validation options.
|
|
* @param options.messages The validation messages.
|
|
*/
|
|
function array(rule, value, callback, source, options) {
|
|
var errors = [];
|
|
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
if (validate) {
|
|
if (isEmptyValue(value, 'array') && !rule.required) {
|
|
return callback();
|
|
}
|
|
es_rule.required(rule, value, source, errors, options, 'array');
|
|
if (!isEmptyValue(value, 'array')) {
|
|
es_rule.type(rule, value, source, errors, options);
|
|
es_rule.range(rule, value, source, errors, options);
|
|
}
|
|
}
|
|
callback(errors);
|
|
}
|
|
|
|
/* harmony default export */ var validator_array = (array);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/validator/object.js
|
|
|
|
|
|
|
|
/**
|
|
* Validates an object.
|
|
*
|
|
* @param rule The validation rule.
|
|
* @param value The value of the field on the source object.
|
|
* @param callback The callback function.
|
|
* @param source The source object being validated.
|
|
* @param options The validation options.
|
|
* @param options.messages The validation messages.
|
|
*/
|
|
function object_object(rule, value, callback, source, options) {
|
|
var errors = [];
|
|
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
if (validate) {
|
|
if (isEmptyValue(value) && !rule.required) {
|
|
return callback();
|
|
}
|
|
es_rule.required(rule, value, source, errors, options);
|
|
if (value !== undefined) {
|
|
es_rule.type(rule, value, source, errors, options);
|
|
}
|
|
}
|
|
callback(errors);
|
|
}
|
|
|
|
/* harmony default export */ var validator_object = (object_object);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/validator/enum.js
|
|
|
|
|
|
var enum_ENUM = 'enum';
|
|
|
|
/**
|
|
* Validates an enumerable list.
|
|
*
|
|
* @param rule The validation rule.
|
|
* @param value The value of the field on the source object.
|
|
* @param callback The callback function.
|
|
* @param source The source object being validated.
|
|
* @param options The validation options.
|
|
* @param options.messages The validation messages.
|
|
*/
|
|
function enum_enumerable(rule, value, callback, source, options) {
|
|
var errors = [];
|
|
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
if (validate) {
|
|
if (isEmptyValue(value) && !rule.required) {
|
|
return callback();
|
|
}
|
|
es_rule.required(rule, value, source, errors, options);
|
|
if (value) {
|
|
es_rule[enum_ENUM](rule, value, source, errors, options);
|
|
}
|
|
}
|
|
callback(errors);
|
|
}
|
|
|
|
/* harmony default export */ var validator_enum = (enum_enumerable);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/validator/pattern.js
|
|
|
|
|
|
|
|
/**
|
|
* Validates a regular expression pattern.
|
|
*
|
|
* Performs validation when a rule only contains
|
|
* a pattern property but is not declared as a string type.
|
|
*
|
|
* @param rule The validation rule.
|
|
* @param value The value of the field on the source object.
|
|
* @param callback The callback function.
|
|
* @param source The source object being validated.
|
|
* @param options The validation options.
|
|
* @param options.messages The validation messages.
|
|
*/
|
|
function validator_pattern_pattern(rule, value, callback, source, options) {
|
|
var errors = [];
|
|
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
if (validate) {
|
|
if (isEmptyValue(value, 'string') && !rule.required) {
|
|
return callback();
|
|
}
|
|
es_rule.required(rule, value, source, errors, options);
|
|
if (!isEmptyValue(value, 'string')) {
|
|
es_rule.pattern(rule, value, source, errors, options);
|
|
}
|
|
}
|
|
callback(errors);
|
|
}
|
|
|
|
/* harmony default export */ var validator_pattern = (validator_pattern_pattern);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/validator/date.js
|
|
|
|
|
|
|
|
function date(rule, value, callback, source, options) {
|
|
// console.log('integer rule called %j', rule);
|
|
var errors = [];
|
|
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
// console.log('validate on %s value', value);
|
|
if (validate) {
|
|
if (isEmptyValue(value) && !rule.required) {
|
|
return callback();
|
|
}
|
|
es_rule.required(rule, value, source, errors, options);
|
|
if (!isEmptyValue(value)) {
|
|
var dateObject = void 0;
|
|
|
|
if (typeof value === 'number') {
|
|
dateObject = new Date(value);
|
|
} else {
|
|
dateObject = value;
|
|
}
|
|
|
|
es_rule.type(rule, dateObject, source, errors, options);
|
|
if (dateObject) {
|
|
es_rule.range(rule, dateObject.getTime(), source, errors, options);
|
|
}
|
|
}
|
|
}
|
|
callback(errors);
|
|
}
|
|
|
|
/* harmony default export */ var validator_date = (date);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/validator/required.js
|
|
|
|
|
|
|
|
function required_required(rule, value, callback, source, options) {
|
|
var errors = [];
|
|
var type = Array.isArray(value) ? 'array' : typeof value === 'undefined' ? 'undefined' : typeof_default()(value);
|
|
es_rule.required(rule, value, source, errors, options, type);
|
|
callback(errors);
|
|
}
|
|
|
|
/* harmony default export */ var validator_required = (required_required);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/validator/type.js
|
|
|
|
|
|
|
|
function validator_type_type(rule, value, callback, source, options) {
|
|
var ruleType = rule.type;
|
|
var errors = [];
|
|
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
if (validate) {
|
|
if (isEmptyValue(value, ruleType) && !rule.required) {
|
|
return callback();
|
|
}
|
|
es_rule.required(rule, value, source, errors, options, ruleType);
|
|
if (!isEmptyValue(value, ruleType)) {
|
|
es_rule.type(rule, value, source, errors, options);
|
|
}
|
|
}
|
|
callback(errors);
|
|
}
|
|
|
|
/* harmony default export */ var validator_type = (validator_type_type);
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/validator/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var es_validator = ({
|
|
string: validator_string,
|
|
method: validator_method,
|
|
number: validator_number,
|
|
boolean: validator_boolean,
|
|
regexp: validator_regexp,
|
|
integer: validator_integer,
|
|
float: validator_float,
|
|
array: validator_array,
|
|
object: validator_object,
|
|
'enum': validator_enum,
|
|
pattern: validator_pattern,
|
|
date: validator_date,
|
|
url: validator_type,
|
|
hex: validator_type,
|
|
email: validator_type,
|
|
required: validator_required
|
|
});
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/messages.js
|
|
function newMessages() {
|
|
return {
|
|
'default': 'Validation error on field %s',
|
|
required: '%s is required',
|
|
'enum': '%s must be one of %s',
|
|
whitespace: '%s cannot be empty',
|
|
date: {
|
|
format: '%s date %s is invalid for format %s',
|
|
parse: '%s date could not be parsed, %s is invalid ',
|
|
invalid: '%s date %s is invalid'
|
|
},
|
|
types: {
|
|
string: '%s is not a %s',
|
|
method: '%s is not a %s (function)',
|
|
array: '%s is not an %s',
|
|
object: '%s is not an %s',
|
|
number: '%s is not a %s',
|
|
date: '%s is not a %s',
|
|
boolean: '%s is not a %s',
|
|
integer: '%s is not an %s',
|
|
float: '%s is not a %s',
|
|
regexp: '%s is not a valid %s',
|
|
email: '%s is not a valid %s',
|
|
url: '%s is not a valid %s',
|
|
hex: '%s is not a valid %s'
|
|
},
|
|
string: {
|
|
len: '%s must be exactly %s characters',
|
|
min: '%s must be at least %s characters',
|
|
max: '%s cannot be longer than %s characters',
|
|
range: '%s must be between %s and %s characters'
|
|
},
|
|
number: {
|
|
len: '%s must equal %s',
|
|
min: '%s cannot be less than %s',
|
|
max: '%s cannot be greater than %s',
|
|
range: '%s must be between %s and %s'
|
|
},
|
|
array: {
|
|
len: '%s must be exactly %s in length',
|
|
min: '%s cannot be less than %s in length',
|
|
max: '%s cannot be greater than %s in length',
|
|
range: '%s must be between %s and %s in length'
|
|
},
|
|
pattern: {
|
|
mismatch: '%s value %s does not match pattern %s'
|
|
},
|
|
clone: function clone() {
|
|
var cloned = JSON.parse(JSON.stringify(this));
|
|
cloned.clone = this.clone;
|
|
return cloned;
|
|
}
|
|
};
|
|
}
|
|
|
|
var messages_messages = newMessages();
|
|
// CONCATENATED MODULE: ./node_modules/async-validator/es/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Encapsulates a validation schema.
|
|
*
|
|
* @param descriptor An object declaring validation rules
|
|
* for this schema.
|
|
*/
|
|
function Schema(descriptor) {
|
|
this.rules = null;
|
|
this._messages = messages_messages;
|
|
this.define(descriptor);
|
|
}
|
|
|
|
Schema.prototype = {
|
|
messages: function messages(_messages) {
|
|
if (_messages) {
|
|
this._messages = deepMerge(newMessages(), _messages);
|
|
}
|
|
return this._messages;
|
|
},
|
|
define: function define(rules) {
|
|
if (!rules) {
|
|
throw new Error('Cannot configure a schema with no rules');
|
|
}
|
|
if ((typeof rules === 'undefined' ? 'undefined' : typeof_default()(rules)) !== 'object' || Array.isArray(rules)) {
|
|
throw new Error('Rules must be an object');
|
|
}
|
|
this.rules = {};
|
|
var z = void 0;
|
|
var item = void 0;
|
|
for (z in rules) {
|
|
if (rules.hasOwnProperty(z)) {
|
|
item = rules[z];
|
|
this.rules[z] = Array.isArray(item) ? item : [item];
|
|
}
|
|
}
|
|
},
|
|
validate: function validate(source_) {
|
|
var _this = this;
|
|
|
|
var o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
var oc = arguments[2];
|
|
|
|
var source = source_;
|
|
var options = o;
|
|
var callback = oc;
|
|
if (typeof options === 'function') {
|
|
callback = options;
|
|
options = {};
|
|
}
|
|
if (!this.rules || Object.keys(this.rules).length === 0) {
|
|
if (callback) {
|
|
callback();
|
|
}
|
|
return;
|
|
}
|
|
function complete(results) {
|
|
var i = void 0;
|
|
var field = void 0;
|
|
var errors = [];
|
|
var fields = {};
|
|
|
|
function add(e) {
|
|
if (Array.isArray(e)) {
|
|
errors = errors.concat.apply(errors, e);
|
|
} else {
|
|
errors.push(e);
|
|
}
|
|
}
|
|
|
|
for (i = 0; i < results.length; i++) {
|
|
add(results[i]);
|
|
}
|
|
if (!errors.length) {
|
|
errors = null;
|
|
fields = null;
|
|
} else {
|
|
for (i = 0; i < errors.length; i++) {
|
|
field = errors[i].field;
|
|
fields[field] = fields[field] || [];
|
|
fields[field].push(errors[i]);
|
|
}
|
|
}
|
|
callback(errors, fields);
|
|
}
|
|
|
|
if (options.messages) {
|
|
var messages = this.messages();
|
|
if (messages === messages_messages) {
|
|
messages = newMessages();
|
|
}
|
|
deepMerge(messages, options.messages);
|
|
options.messages = messages;
|
|
} else {
|
|
options.messages = this.messages();
|
|
}
|
|
var arr = void 0;
|
|
var value = void 0;
|
|
var series = {};
|
|
var keys = options.keys || Object.keys(this.rules);
|
|
keys.forEach(function (z) {
|
|
arr = _this.rules[z];
|
|
value = source[z];
|
|
arr.forEach(function (r) {
|
|
var rule = r;
|
|
if (typeof rule.transform === 'function') {
|
|
if (source === source_) {
|
|
source = extends_default()({}, source);
|
|
}
|
|
value = source[z] = rule.transform(value);
|
|
}
|
|
if (typeof rule === 'function') {
|
|
rule = {
|
|
validator: rule
|
|
};
|
|
} else {
|
|
rule = extends_default()({}, rule);
|
|
}
|
|
rule.validator = _this.getValidationMethod(rule);
|
|
rule.field = z;
|
|
rule.fullField = rule.fullField || z;
|
|
rule.type = _this.getType(rule);
|
|
if (!rule.validator) {
|
|
return;
|
|
}
|
|
series[z] = series[z] || [];
|
|
series[z].push({
|
|
rule: rule,
|
|
value: value,
|
|
source: source,
|
|
field: z
|
|
});
|
|
});
|
|
});
|
|
var errorFields = {};
|
|
asyncMap(series, options, function (data, doIt) {
|
|
var rule = data.rule;
|
|
var deep = (rule.type === 'object' || rule.type === 'array') && (typeof_default()(rule.fields) === 'object' || typeof_default()(rule.defaultField) === 'object');
|
|
deep = deep && (rule.required || !rule.required && data.value);
|
|
rule.field = data.field;
|
|
function addFullfield(key, schema) {
|
|
return extends_default()({}, schema, {
|
|
fullField: rule.fullField + '.' + key
|
|
});
|
|
}
|
|
|
|
function cb() {
|
|
var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
|
|
var errors = e;
|
|
if (!Array.isArray(errors)) {
|
|
errors = [errors];
|
|
}
|
|
if (errors.length) {
|
|
warning('async-validator:', errors);
|
|
}
|
|
if (errors.length && rule.message) {
|
|
errors = [].concat(rule.message);
|
|
}
|
|
|
|
errors = errors.map(complementError(rule));
|
|
|
|
if (options.first && errors.length) {
|
|
errorFields[rule.field] = 1;
|
|
return doIt(errors);
|
|
}
|
|
if (!deep) {
|
|
doIt(errors);
|
|
} else {
|
|
// if rule is required but the target object
|
|
// does not exist fail at the rule level and don't
|
|
// go deeper
|
|
if (rule.required && !data.value) {
|
|
if (rule.message) {
|
|
errors = [].concat(rule.message).map(complementError(rule));
|
|
} else if (options.error) {
|
|
errors = [options.error(rule, format(options.messages.required, rule.field))];
|
|
} else {
|
|
errors = [];
|
|
}
|
|
return doIt(errors);
|
|
}
|
|
|
|
var fieldsSchema = {};
|
|
if (rule.defaultField) {
|
|
for (var k in data.value) {
|
|
if (data.value.hasOwnProperty(k)) {
|
|
fieldsSchema[k] = rule.defaultField;
|
|
}
|
|
}
|
|
}
|
|
fieldsSchema = extends_default()({}, fieldsSchema, data.rule.fields);
|
|
for (var f in fieldsSchema) {
|
|
if (fieldsSchema.hasOwnProperty(f)) {
|
|
var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
|
|
fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
|
|
}
|
|
}
|
|
var schema = new Schema(fieldsSchema);
|
|
schema.messages(options.messages);
|
|
if (data.rule.options) {
|
|
data.rule.options.messages = options.messages;
|
|
data.rule.options.error = options.error;
|
|
}
|
|
schema.validate(data.value, data.rule.options || options, function (errs) {
|
|
doIt(errs && errs.length ? errors.concat(errs) : errs);
|
|
});
|
|
}
|
|
}
|
|
|
|
var res = rule.validator(rule, data.value, cb, data.source, options);
|
|
if (res && res.then) {
|
|
res.then(function () {
|
|
return cb();
|
|
}, function (e) {
|
|
return cb(e);
|
|
});
|
|
}
|
|
}, function (results) {
|
|
complete(results);
|
|
});
|
|
},
|
|
getType: function getType(rule) {
|
|
if (rule.type === undefined && rule.pattern instanceof RegExp) {
|
|
rule.type = 'pattern';
|
|
}
|
|
if (typeof rule.validator !== 'function' && rule.type && !es_validator.hasOwnProperty(rule.type)) {
|
|
throw new Error(format('Unknown rule type %s', rule.type));
|
|
}
|
|
return rule.type || 'string';
|
|
},
|
|
getValidationMethod: function getValidationMethod(rule) {
|
|
if (typeof rule.validator === 'function') {
|
|
return rule.validator;
|
|
}
|
|
var keys = Object.keys(rule);
|
|
var messageIndex = keys.indexOf('message');
|
|
if (messageIndex !== -1) {
|
|
keys.splice(messageIndex, 1);
|
|
}
|
|
if (keys.length === 1 && keys[0] === 'required') {
|
|
return es_validator.required;
|
|
}
|
|
return es_validator[this.getType(rule)] || false;
|
|
}
|
|
};
|
|
|
|
Schema.register = function register(type, validator) {
|
|
if (typeof validator !== 'function') {
|
|
throw new Error('Cannot register a validator by type, validator is not a function');
|
|
}
|
|
es_validator[type] = validator;
|
|
};
|
|
|
|
Schema.messages = messages_messages;
|
|
|
|
/* harmony default export */ var es = __webpack_exports__["default"] = (Schema);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "a223":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "a2db":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var Symbol = __webpack_require__("9e69");
|
|
|
|
/** Used to convert symbols to primitives and strings. */
|
|
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
|
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
|
|
|
/**
|
|
* Creates a clone of the `symbol` object.
|
|
*
|
|
* @private
|
|
* @param {Object} symbol The symbol object to clone.
|
|
* @returns {Object} Returns the cloned symbol object.
|
|
*/
|
|
function cloneSymbol(symbol) {
|
|
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
|
|
}
|
|
|
|
module.exports = cloneSymbol;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "a434":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $ = __webpack_require__("23e7");
|
|
var toAbsoluteIndex = __webpack_require__("23cb");
|
|
var toInteger = __webpack_require__("a691");
|
|
var toLength = __webpack_require__("50c4");
|
|
var toObject = __webpack_require__("7b0b");
|
|
var arraySpeciesCreate = __webpack_require__("65f0");
|
|
var createProperty = __webpack_require__("8418");
|
|
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");
|
|
var arrayMethodUsesToLength = __webpack_require__("ae40");
|
|
|
|
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
|
|
var USES_TO_LENGTH = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 });
|
|
|
|
var max = Math.max;
|
|
var min = Math.min;
|
|
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
|
var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
|
|
|
|
// `Array.prototype.splice` method
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype.splice
|
|
// with adding support of @@species
|
|
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
|
|
splice: function splice(start, deleteCount /* , ...items */) {
|
|
var O = toObject(this);
|
|
var len = toLength(O.length);
|
|
var actualStart = toAbsoluteIndex(start, len);
|
|
var argumentsLength = arguments.length;
|
|
var insertCount, actualDeleteCount, A, k, from, to;
|
|
if (argumentsLength === 0) {
|
|
insertCount = actualDeleteCount = 0;
|
|
} else if (argumentsLength === 1) {
|
|
insertCount = 0;
|
|
actualDeleteCount = len - actualStart;
|
|
} else {
|
|
insertCount = argumentsLength - 2;
|
|
actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);
|
|
}
|
|
if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
|
|
throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
|
|
}
|
|
A = arraySpeciesCreate(O, actualDeleteCount);
|
|
for (k = 0; k < actualDeleteCount; k++) {
|
|
from = actualStart + k;
|
|
if (from in O) createProperty(A, k, O[from]);
|
|
}
|
|
A.length = actualDeleteCount;
|
|
if (insertCount < actualDeleteCount) {
|
|
for (k = actualStart; k < len - actualDeleteCount; k++) {
|
|
from = k + actualDeleteCount;
|
|
to = k + insertCount;
|
|
if (from in O) O[to] = O[from];
|
|
else delete O[to];
|
|
}
|
|
for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
|
|
} else if (insertCount > actualDeleteCount) {
|
|
for (k = len - actualDeleteCount; k > actualStart; k--) {
|
|
from = k + actualDeleteCount - 1;
|
|
to = k + insertCount - 1;
|
|
if (from in O) O[to] = O[from];
|
|
else delete O[to];
|
|
}
|
|
}
|
|
for (k = 0; k < insertCount; k++) {
|
|
O[k + actualStart] = arguments[k + 2];
|
|
}
|
|
O.length = len - actualDeleteCount + insertCount;
|
|
return A;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "a4d3":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $ = __webpack_require__("23e7");
|
|
var global = __webpack_require__("da84");
|
|
var getBuiltIn = __webpack_require__("d066");
|
|
var IS_PURE = __webpack_require__("c430");
|
|
var DESCRIPTORS = __webpack_require__("83ab");
|
|
var NATIVE_SYMBOL = __webpack_require__("4930");
|
|
var USE_SYMBOL_AS_UID = __webpack_require__("fdbf");
|
|
var fails = __webpack_require__("d039");
|
|
var has = __webpack_require__("5135");
|
|
var isArray = __webpack_require__("e8b5");
|
|
var isObject = __webpack_require__("861d");
|
|
var anObject = __webpack_require__("825a");
|
|
var toObject = __webpack_require__("7b0b");
|
|
var toIndexedObject = __webpack_require__("fc6a");
|
|
var toPrimitive = __webpack_require__("c04e");
|
|
var createPropertyDescriptor = __webpack_require__("5c6c");
|
|
var nativeObjectCreate = __webpack_require__("7c73");
|
|
var objectKeys = __webpack_require__("df75");
|
|
var getOwnPropertyNamesModule = __webpack_require__("241c");
|
|
var getOwnPropertyNamesExternal = __webpack_require__("057f");
|
|
var getOwnPropertySymbolsModule = __webpack_require__("7418");
|
|
var getOwnPropertyDescriptorModule = __webpack_require__("06cf");
|
|
var definePropertyModule = __webpack_require__("9bf2");
|
|
var propertyIsEnumerableModule = __webpack_require__("d1e7");
|
|
var createNonEnumerableProperty = __webpack_require__("9112");
|
|
var redefine = __webpack_require__("6eeb");
|
|
var shared = __webpack_require__("5692");
|
|
var sharedKey = __webpack_require__("f772");
|
|
var hiddenKeys = __webpack_require__("d012");
|
|
var uid = __webpack_require__("90e3");
|
|
var wellKnownSymbol = __webpack_require__("b622");
|
|
var wrappedWellKnownSymbolModule = __webpack_require__("e538");
|
|
var defineWellKnownSymbol = __webpack_require__("746f");
|
|
var setToStringTag = __webpack_require__("d44e");
|
|
var InternalStateModule = __webpack_require__("69f3");
|
|
var $forEach = __webpack_require__("b727").forEach;
|
|
|
|
var HIDDEN = sharedKey('hidden');
|
|
var SYMBOL = 'Symbol';
|
|
var PROTOTYPE = 'prototype';
|
|
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
|
var setInternalState = InternalStateModule.set;
|
|
var getInternalState = InternalStateModule.getterFor(SYMBOL);
|
|
var ObjectPrototype = Object[PROTOTYPE];
|
|
var $Symbol = global.Symbol;
|
|
var $stringify = getBuiltIn('JSON', 'stringify');
|
|
var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
var nativeDefineProperty = definePropertyModule.f;
|
|
var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
|
|
var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
var AllSymbols = shared('symbols');
|
|
var ObjectPrototypeSymbols = shared('op-symbols');
|
|
var StringToSymbolRegistry = shared('string-to-symbol-registry');
|
|
var SymbolToStringRegistry = shared('symbol-to-string-registry');
|
|
var WellKnownSymbolsStore = shared('wks');
|
|
var QObject = global.QObject;
|
|
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
|
|
var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
|
|
|
|
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
|
|
var setSymbolDescriptor = DESCRIPTORS && fails(function () {
|
|
return nativeObjectCreate(nativeDefineProperty({}, 'a', {
|
|
get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
|
|
})).a != 7;
|
|
}) ? function (O, P, Attributes) {
|
|
var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
|
|
if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
|
|
nativeDefineProperty(O, P, Attributes);
|
|
if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
|
|
nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);
|
|
}
|
|
} : nativeDefineProperty;
|
|
|
|
var wrap = function (tag, description) {
|
|
var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);
|
|
setInternalState(symbol, {
|
|
type: SYMBOL,
|
|
tag: tag,
|
|
description: description
|
|
});
|
|
if (!DESCRIPTORS) symbol.description = description;
|
|
return symbol;
|
|
};
|
|
|
|
var isSymbol = USE_SYMBOL_AS_UID ? function (it) {
|
|
return typeof it == 'symbol';
|
|
} : function (it) {
|
|
return Object(it) instanceof $Symbol;
|
|
};
|
|
|
|
var $defineProperty = function defineProperty(O, P, Attributes) {
|
|
if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
|
|
anObject(O);
|
|
var key = toPrimitive(P, true);
|
|
anObject(Attributes);
|
|
if (has(AllSymbols, key)) {
|
|
if (!Attributes.enumerable) {
|
|
if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
|
|
O[HIDDEN][key] = true;
|
|
} else {
|
|
if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
|
|
Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
|
|
} return setSymbolDescriptor(O, key, Attributes);
|
|
} return nativeDefineProperty(O, key, Attributes);
|
|
};
|
|
|
|
var $defineProperties = function defineProperties(O, Properties) {
|
|
anObject(O);
|
|
var properties = toIndexedObject(Properties);
|
|
var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
|
|
$forEach(keys, function (key) {
|
|
if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
|
|
});
|
|
return O;
|
|
};
|
|
|
|
var $create = function create(O, Properties) {
|
|
return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
|
|
};
|
|
|
|
var $propertyIsEnumerable = function propertyIsEnumerable(V) {
|
|
var P = toPrimitive(V, true);
|
|
var enumerable = nativePropertyIsEnumerable.call(this, P);
|
|
if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
|
|
return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
|
|
};
|
|
|
|
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
|
|
var it = toIndexedObject(O);
|
|
var key = toPrimitive(P, true);
|
|
if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
|
|
var descriptor = nativeGetOwnPropertyDescriptor(it, key);
|
|
if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
|
|
descriptor.enumerable = true;
|
|
}
|
|
return descriptor;
|
|
};
|
|
|
|
var $getOwnPropertyNames = function getOwnPropertyNames(O) {
|
|
var names = nativeGetOwnPropertyNames(toIndexedObject(O));
|
|
var result = [];
|
|
$forEach(names, function (key) {
|
|
if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
|
|
});
|
|
return result;
|
|
};
|
|
|
|
var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
|
|
var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
|
|
var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
|
|
var result = [];
|
|
$forEach(names, function (key) {
|
|
if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {
|
|
result.push(AllSymbols[key]);
|
|
}
|
|
});
|
|
return result;
|
|
};
|
|
|
|
// `Symbol` constructor
|
|
// https://tc39.github.io/ecma262/#sec-symbol-constructor
|
|
if (!NATIVE_SYMBOL) {
|
|
$Symbol = function Symbol() {
|
|
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
|
|
var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
|
|
var tag = uid(description);
|
|
var setter = function (value) {
|
|
if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
|
|
if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
|
|
setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
|
|
};
|
|
if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
|
|
return wrap(tag, description);
|
|
};
|
|
|
|
redefine($Symbol[PROTOTYPE], 'toString', function toString() {
|
|
return getInternalState(this).tag;
|
|
});
|
|
|
|
redefine($Symbol, 'withoutSetter', function (description) {
|
|
return wrap(uid(description), description);
|
|
});
|
|
|
|
propertyIsEnumerableModule.f = $propertyIsEnumerable;
|
|
definePropertyModule.f = $defineProperty;
|
|
getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;
|
|
getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;
|
|
getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;
|
|
|
|
wrappedWellKnownSymbolModule.f = function (name) {
|
|
return wrap(wellKnownSymbol(name), name);
|
|
};
|
|
|
|
if (DESCRIPTORS) {
|
|
// https://github.com/tc39/proposal-Symbol-description
|
|
nativeDefineProperty($Symbol[PROTOTYPE], 'description', {
|
|
configurable: true,
|
|
get: function description() {
|
|
return getInternalState(this).description;
|
|
}
|
|
});
|
|
if (!IS_PURE) {
|
|
redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
|
|
}
|
|
}
|
|
}
|
|
|
|
$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {
|
|
Symbol: $Symbol
|
|
});
|
|
|
|
$forEach(objectKeys(WellKnownSymbolsStore), function (name) {
|
|
defineWellKnownSymbol(name);
|
|
});
|
|
|
|
$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
|
|
// `Symbol.for` method
|
|
// https://tc39.github.io/ecma262/#sec-symbol.for
|
|
'for': function (key) {
|
|
var string = String(key);
|
|
if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
|
|
var symbol = $Symbol(string);
|
|
StringToSymbolRegistry[string] = symbol;
|
|
SymbolToStringRegistry[symbol] = string;
|
|
return symbol;
|
|
},
|
|
// `Symbol.keyFor` method
|
|
// https://tc39.github.io/ecma262/#sec-symbol.keyfor
|
|
keyFor: function keyFor(sym) {
|
|
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
|
|
if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
|
|
},
|
|
useSetter: function () { USE_SETTER = true; },
|
|
useSimple: function () { USE_SETTER = false; }
|
|
});
|
|
|
|
$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
|
|
// `Object.create` method
|
|
// https://tc39.github.io/ecma262/#sec-object.create
|
|
create: $create,
|
|
// `Object.defineProperty` method
|
|
// https://tc39.github.io/ecma262/#sec-object.defineproperty
|
|
defineProperty: $defineProperty,
|
|
// `Object.defineProperties` method
|
|
// https://tc39.github.io/ecma262/#sec-object.defineproperties
|
|
defineProperties: $defineProperties,
|
|
// `Object.getOwnPropertyDescriptor` method
|
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
|
|
getOwnPropertyDescriptor: $getOwnPropertyDescriptor
|
|
});
|
|
|
|
$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {
|
|
// `Object.getOwnPropertyNames` method
|
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
|
|
getOwnPropertyNames: $getOwnPropertyNames,
|
|
// `Object.getOwnPropertySymbols` method
|
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols
|
|
getOwnPropertySymbols: $getOwnPropertySymbols
|
|
});
|
|
|
|
// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
|
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3443
|
|
$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {
|
|
getOwnPropertySymbols: function getOwnPropertySymbols(it) {
|
|
return getOwnPropertySymbolsModule.f(toObject(it));
|
|
}
|
|
});
|
|
|
|
// `JSON.stringify` method behavior with symbols
|
|
// https://tc39.github.io/ecma262/#sec-json.stringify
|
|
if ($stringify) {
|
|
var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {
|
|
var symbol = $Symbol();
|
|
// MS Edge converts symbol values to JSON as {}
|
|
return $stringify([symbol]) != '[null]'
|
|
// WebKit converts symbol values to JSON as null
|
|
|| $stringify({ a: symbol }) != '{}'
|
|
// V8 throws on boxed symbols
|
|
|| $stringify(Object(symbol)) != '{}';
|
|
});
|
|
|
|
$({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
|
|
// eslint-disable-next-line no-unused-vars
|
|
stringify: function stringify(it, replacer, space) {
|
|
var args = [it];
|
|
var index = 1;
|
|
var $replacer;
|
|
while (arguments.length > index) args.push(arguments[index++]);
|
|
$replacer = replacer;
|
|
if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
|
|
if (!isArray(replacer)) replacer = function (key, value) {
|
|
if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
|
|
if (!isSymbol(value)) return value;
|
|
};
|
|
args[1] = replacer;
|
|
return $stringify.apply(null, args);
|
|
}
|
|
});
|
|
}
|
|
|
|
// `Symbol.prototype[@@toPrimitive]` method
|
|
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
|
|
if (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {
|
|
createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
|
|
}
|
|
// `Symbol.prototype[@@toStringTag]` property
|
|
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
|
|
setToStringTag($Symbol, SYMBOL);
|
|
|
|
hiddenKeys[HIDDEN] = true;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "a524":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getMapData = __webpack_require__("4245");
|
|
|
|
/**
|
|
* Checks if a map value for `key` exists.
|
|
*
|
|
* @private
|
|
* @name has
|
|
* @memberOf MapCache
|
|
* @param {string} key The key of the entry to check.
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
*/
|
|
function mapCacheHas(key) {
|
|
return getMapData(this, key).has(key);
|
|
}
|
|
|
|
module.exports = mapCacheHas;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "a640":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var fails = __webpack_require__("d039");
|
|
|
|
module.exports = function (METHOD_NAME, argument) {
|
|
var method = [][METHOD_NAME];
|
|
return !!method && fails(function () {
|
|
// eslint-disable-next-line no-useless-call,no-throw-literal
|
|
method.call(null, argument || function () { throw 1; }, 1);
|
|
});
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "a691":
|
|
/***/ (function(module, exports) {
|
|
|
|
var ceil = Math.ceil;
|
|
var floor = Math.floor;
|
|
|
|
// `ToInteger` abstract operation
|
|
// https://tc39.github.io/ecma262/#sec-tointeger
|
|
module.exports = function (argument) {
|
|
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "a742":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.isString = isString;
|
|
exports.isObject = isObject;
|
|
exports.isHtmlElement = isHtmlElement;
|
|
function isString(obj) {
|
|
return Object.prototype.toString.call(obj) === '[object String]';
|
|
}
|
|
|
|
function isObject(obj) {
|
|
return Object.prototype.toString.call(obj) === '[object Object]';
|
|
}
|
|
|
|
function isHtmlElement(node) {
|
|
return node && node.nodeType === Node.ELEMENT_NODE;
|
|
}
|
|
|
|
var isFunction = exports.isFunction = function isFunction(functionToCheck) {
|
|
var getType = {};
|
|
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
|
|
};
|
|
|
|
var isUndefined = exports.isUndefined = function isUndefined(val) {
|
|
return val === void 0;
|
|
};
|
|
|
|
var isDefined = exports.isDefined = function isDefined(val) {
|
|
return val !== undefined && val !== null;
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "a994":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseGetAllKeys = __webpack_require__("7d1f"),
|
|
getSymbols = __webpack_require__("32f4"),
|
|
keys = __webpack_require__("ec69");
|
|
|
|
/**
|
|
* Creates an array of own enumerable property names and symbols of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property names and symbols.
|
|
*/
|
|
function getAllKeys(object) {
|
|
return baseGetAllKeys(object, keys, getSymbols);
|
|
}
|
|
|
|
module.exports = getAllKeys;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "ac1f":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $ = __webpack_require__("23e7");
|
|
var exec = __webpack_require__("9263");
|
|
|
|
$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
|
|
exec: exec
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "ad6d":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var anObject = __webpack_require__("825a");
|
|
|
|
// `RegExp.prototype.flags` getter implementation
|
|
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
|
|
module.exports = function () {
|
|
var that = anObject(this);
|
|
var result = '';
|
|
if (that.global) result += 'g';
|
|
if (that.ignoreCase) result += 'i';
|
|
if (that.multiline) result += 'm';
|
|
if (that.dotAll) result += 's';
|
|
if (that.unicode) result += 'u';
|
|
if (that.sticky) result += 'y';
|
|
return result;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "ae40":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var DESCRIPTORS = __webpack_require__("83ab");
|
|
var fails = __webpack_require__("d039");
|
|
var has = __webpack_require__("5135");
|
|
|
|
var defineProperty = Object.defineProperty;
|
|
var cache = {};
|
|
|
|
var thrower = function (it) { throw it; };
|
|
|
|
module.exports = function (METHOD_NAME, options) {
|
|
if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];
|
|
if (!options) options = {};
|
|
var method = [][METHOD_NAME];
|
|
var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;
|
|
var argument0 = has(options, 0) ? options[0] : thrower;
|
|
var argument1 = has(options, 1) ? options[1] : undefined;
|
|
|
|
return cache[METHOD_NAME] = !!method && !fails(function () {
|
|
if (ACCESSORS && !DESCRIPTORS) return true;
|
|
var O = { length: -1 };
|
|
|
|
if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower });
|
|
else O[1] = 1;
|
|
|
|
method.call(O, argument0, argument1);
|
|
});
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "b041":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var TO_STRING_TAG_SUPPORT = __webpack_require__("00ee");
|
|
var classof = __webpack_require__("f5df");
|
|
|
|
// `Object.prototype.toString` method implementation
|
|
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
|
|
module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
|
|
return '[object ' + classof(this) + ']';
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "b047":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* The base implementation of `_.unary` without support for storing metadata.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to cap arguments for.
|
|
* @returns {Function} Returns the new capped function.
|
|
*/
|
|
function baseUnary(func) {
|
|
return function(value) {
|
|
return func(value);
|
|
};
|
|
}
|
|
|
|
module.exports = baseUnary;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "b0c0":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var DESCRIPTORS = __webpack_require__("83ab");
|
|
var defineProperty = __webpack_require__("9bf2").f;
|
|
|
|
var FunctionPrototype = Function.prototype;
|
|
var FunctionPrototypeToString = FunctionPrototype.toString;
|
|
var nameRE = /^\s*function ([^ (]*)/;
|
|
var NAME = 'name';
|
|
|
|
// Function instances `.name` property
|
|
// https://tc39.github.io/ecma262/#sec-function-instances-name
|
|
if (DESCRIPTORS && !(NAME in FunctionPrototype)) {
|
|
defineProperty(FunctionPrototype, NAME, {
|
|
configurable: true,
|
|
get: function () {
|
|
try {
|
|
return FunctionPrototypeToString.call(this).match(nameRE)[1];
|
|
} catch (error) {
|
|
return '';
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "b218":
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used as references for various `Number` constants. */
|
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
|
|
/**
|
|
* Checks if `value` is a valid array-like length.
|
|
*
|
|
* **Note:** This method is loosely based on
|
|
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
* @example
|
|
*
|
|
* _.isLength(3);
|
|
* // => true
|
|
*
|
|
* _.isLength(Number.MIN_VALUE);
|
|
* // => false
|
|
*
|
|
* _.isLength(Infinity);
|
|
* // => false
|
|
*
|
|
* _.isLength('3');
|
|
* // => false
|
|
*/
|
|
function isLength(value) {
|
|
return typeof value == 'number' &&
|
|
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
}
|
|
|
|
module.exports = isLength;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "b258":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "b35b":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "b35bb":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 88);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 0:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
|
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
function normalizeComponent (
|
|
scriptExports,
|
|
render,
|
|
staticRenderFns,
|
|
functionalTemplate,
|
|
injectStyles,
|
|
scopeId,
|
|
moduleIdentifier, /* server only */
|
|
shadowMode /* vue-cli only */
|
|
) {
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (render) {
|
|
options.render = render
|
|
options.staticRenderFns = staticRenderFns
|
|
options._compiled = true
|
|
}
|
|
|
|
// functional template
|
|
if (functionalTemplate) {
|
|
options.functional = true
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = 'data-v-' + scopeId
|
|
}
|
|
|
|
var hook
|
|
if (moduleIdentifier) { // server build
|
|
hook = function (context) {
|
|
// 2.3 injection
|
|
context =
|
|
context || // cached call
|
|
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
// 2.2 with runInNewContext: true
|
|
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
context = __VUE_SSR_CONTEXT__
|
|
}
|
|
// inject component styles
|
|
if (injectStyles) {
|
|
injectStyles.call(this, context)
|
|
}
|
|
// register component module identifier for async chunk inferrence
|
|
if (context && context._registeredComponents) {
|
|
context._registeredComponents.add(moduleIdentifier)
|
|
}
|
|
}
|
|
// used by ssr in case component is cached and beforeCreate
|
|
// never gets called
|
|
options._ssrRegister = hook
|
|
} else if (injectStyles) {
|
|
hook = shadowMode
|
|
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
|
: injectStyles
|
|
}
|
|
|
|
if (hook) {
|
|
if (options.functional) {
|
|
// for template-only hot-reload because in that case the render fn doesn't
|
|
// go through the normalizer
|
|
options._injectStyles = hook
|
|
// register for functioal component in vue file
|
|
var originalRender = options.render
|
|
options.render = function renderWithStyleInjection (h, context) {
|
|
hook.call(context)
|
|
return originalRender(h, context)
|
|
}
|
|
} else {
|
|
// inject component registration as beforeCreate hook
|
|
var existing = options.beforeCreate
|
|
options.beforeCreate = existing
|
|
? [].concat(existing, hook)
|
|
: [hook]
|
|
}
|
|
}
|
|
|
|
return {
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 11:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("2bb5");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 22:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("12f2");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 4:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("d010");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 88:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/switch/src/component.vue?vue&type=template&id=2dcd8fbb&
|
|
var render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"div",
|
|
{
|
|
staticClass: "el-switch",
|
|
class: { "is-disabled": _vm.switchDisabled, "is-checked": _vm.checked },
|
|
attrs: {
|
|
role: "switch",
|
|
"aria-checked": _vm.checked,
|
|
"aria-disabled": _vm.switchDisabled
|
|
},
|
|
on: {
|
|
click: function($event) {
|
|
$event.preventDefault()
|
|
return _vm.switchValue($event)
|
|
}
|
|
}
|
|
},
|
|
[
|
|
_c("input", {
|
|
ref: "input",
|
|
staticClass: "el-switch__input",
|
|
attrs: {
|
|
type: "checkbox",
|
|
id: _vm.id,
|
|
name: _vm.name,
|
|
"true-value": _vm.activeValue,
|
|
"false-value": _vm.inactiveValue,
|
|
disabled: _vm.switchDisabled
|
|
},
|
|
on: {
|
|
change: _vm.handleChange,
|
|
keydown: function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
|
|
) {
|
|
return null
|
|
}
|
|
return _vm.switchValue($event)
|
|
}
|
|
}
|
|
}),
|
|
_vm.inactiveIconClass || _vm.inactiveText
|
|
? _c(
|
|
"span",
|
|
{
|
|
class: [
|
|
"el-switch__label",
|
|
"el-switch__label--left",
|
|
!_vm.checked ? "is-active" : ""
|
|
]
|
|
},
|
|
[
|
|
_vm.inactiveIconClass
|
|
? _c("i", { class: [_vm.inactiveIconClass] })
|
|
: _vm._e(),
|
|
!_vm.inactiveIconClass && _vm.inactiveText
|
|
? _c("span", { attrs: { "aria-hidden": _vm.checked } }, [
|
|
_vm._v(_vm._s(_vm.inactiveText))
|
|
])
|
|
: _vm._e()
|
|
]
|
|
)
|
|
: _vm._e(),
|
|
_c("span", {
|
|
ref: "core",
|
|
staticClass: "el-switch__core",
|
|
style: { width: _vm.coreWidth + "px" }
|
|
}),
|
|
_vm.activeIconClass || _vm.activeText
|
|
? _c(
|
|
"span",
|
|
{
|
|
class: [
|
|
"el-switch__label",
|
|
"el-switch__label--right",
|
|
_vm.checked ? "is-active" : ""
|
|
]
|
|
},
|
|
[
|
|
_vm.activeIconClass
|
|
? _c("i", { class: [_vm.activeIconClass] })
|
|
: _vm._e(),
|
|
!_vm.activeIconClass && _vm.activeText
|
|
? _c("span", { attrs: { "aria-hidden": !_vm.checked } }, [
|
|
_vm._v(_vm._s(_vm.activeText))
|
|
])
|
|
: _vm._e()
|
|
]
|
|
)
|
|
: _vm._e()
|
|
]
|
|
)
|
|
}
|
|
var staticRenderFns = []
|
|
render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/switch/src/component.vue?vue&type=template&id=2dcd8fbb&
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
|
|
var emitter_ = __webpack_require__(4);
|
|
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/focus"
|
|
var focus_ = __webpack_require__(22);
|
|
var focus_default = /*#__PURE__*/__webpack_require__.n(focus_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/migrating"
|
|
var migrating_ = __webpack_require__(11);
|
|
var migrating_default = /*#__PURE__*/__webpack_require__.n(migrating_);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/switch/src/component.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var componentvue_type_script_lang_js_ = ({
|
|
name: 'ElSwitch',
|
|
mixins: [focus_default()('input'), migrating_default.a, emitter_default.a],
|
|
inject: {
|
|
elForm: {
|
|
default: ''
|
|
}
|
|
},
|
|
props: {
|
|
value: {
|
|
type: [Boolean, String, Number],
|
|
default: false
|
|
},
|
|
disabled: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
width: {
|
|
type: Number,
|
|
default: 40
|
|
},
|
|
activeIconClass: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
inactiveIconClass: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
activeText: String,
|
|
inactiveText: String,
|
|
activeColor: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
inactiveColor: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
activeValue: {
|
|
type: [Boolean, String, Number],
|
|
default: true
|
|
},
|
|
inactiveValue: {
|
|
type: [Boolean, String, Number],
|
|
default: false
|
|
},
|
|
name: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
validateEvent: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
id: String
|
|
},
|
|
data: function data() {
|
|
return {
|
|
coreWidth: this.width
|
|
};
|
|
},
|
|
created: function created() {
|
|
if (!~[this.activeValue, this.inactiveValue].indexOf(this.value)) {
|
|
this.$emit('input', this.inactiveValue);
|
|
}
|
|
},
|
|
|
|
computed: {
|
|
checked: function checked() {
|
|
return this.value === this.activeValue;
|
|
},
|
|
switchDisabled: function switchDisabled() {
|
|
return this.disabled || (this.elForm || {}).disabled;
|
|
}
|
|
},
|
|
watch: {
|
|
checked: function checked() {
|
|
this.$refs.input.checked = this.checked;
|
|
if (this.activeColor || this.inactiveColor) {
|
|
this.setBackgroundColor();
|
|
}
|
|
if (this.validateEvent) {
|
|
this.dispatch('ElFormItem', 'el.form.change', [this.value]);
|
|
}
|
|
}
|
|
},
|
|
methods: {
|
|
handleChange: function handleChange(event) {
|
|
var _this = this;
|
|
|
|
var val = this.checked ? this.inactiveValue : this.activeValue;
|
|
this.$emit('input', val);
|
|
this.$emit('change', val);
|
|
this.$nextTick(function () {
|
|
// set input's checked property
|
|
// in case parent refuses to change component's value
|
|
_this.$refs.input.checked = _this.checked;
|
|
});
|
|
},
|
|
setBackgroundColor: function setBackgroundColor() {
|
|
var newColor = this.checked ? this.activeColor : this.inactiveColor;
|
|
this.$refs.core.style.borderColor = newColor;
|
|
this.$refs.core.style.backgroundColor = newColor;
|
|
},
|
|
switchValue: function switchValue() {
|
|
!this.switchDisabled && this.handleChange();
|
|
},
|
|
getMigratingConfig: function getMigratingConfig() {
|
|
return {
|
|
props: {
|
|
'on-color': 'on-color is renamed to active-color.',
|
|
'off-color': 'off-color is renamed to inactive-color.',
|
|
'on-text': 'on-text is renamed to active-text.',
|
|
'off-text': 'off-text is renamed to inactive-text.',
|
|
'on-value': 'on-value is renamed to active-value.',
|
|
'off-value': 'off-value is renamed to inactive-value.',
|
|
'on-icon-class': 'on-icon-class is renamed to active-icon-class.',
|
|
'off-icon-class': 'off-icon-class is renamed to inactive-icon-class.'
|
|
}
|
|
};
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
/* istanbul ignore if */
|
|
this.coreWidth = this.width || 40;
|
|
if (this.activeColor || this.inactiveColor) {
|
|
this.setBackgroundColor();
|
|
}
|
|
this.$refs.input.checked = this.checked;
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/switch/src/component.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_componentvue_type_script_lang_js_ = (componentvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
var componentNormalizer = __webpack_require__(0);
|
|
|
|
// CONCATENATED MODULE: ./packages/switch/src/component.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
src_componentvue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var api; }
|
|
component.options.__file = "packages/switch/src/component.vue"
|
|
/* harmony default export */ var src_component = (component.exports);
|
|
// CONCATENATED MODULE: ./packages/switch/index.js
|
|
|
|
|
|
/* istanbul ignore next */
|
|
src_component.install = function (Vue) {
|
|
Vue.component(src_component.name, src_component);
|
|
};
|
|
|
|
/* harmony default export */ var packages_switch = __webpack_exports__["default"] = (src_component);
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "b367":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var core = __webpack_require__("5524");
|
|
var global = __webpack_require__("ef08");
|
|
var SHARED = '__core-js_shared__';
|
|
var store = global[SHARED] || (global[SHARED] = {});
|
|
|
|
(module.exports = function (key, value) {
|
|
return store[key] || (store[key] = value !== undefined ? value : {});
|
|
})('versions', []).push({
|
|
version: core.version,
|
|
mode: __webpack_require__("e444") ? 'pure' : 'global',
|
|
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "b4b3":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "b4c0":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var assocIndexOf = __webpack_require__("cb5a");
|
|
|
|
/**
|
|
* Gets the list cache value for `key`.
|
|
*
|
|
* @private
|
|
* @name get
|
|
* @memberOf ListCache
|
|
* @param {string} key The key of the value to get.
|
|
* @returns {*} Returns the entry value.
|
|
*/
|
|
function listCacheGet(key) {
|
|
var data = this.__data__,
|
|
index = assocIndexOf(data, key);
|
|
|
|
return index < 0 ? undefined : data[index][1];
|
|
}
|
|
|
|
module.exports = listCacheGet;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "b575":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__("da84");
|
|
var getOwnPropertyDescriptor = __webpack_require__("06cf").f;
|
|
var classof = __webpack_require__("c6b6");
|
|
var macrotask = __webpack_require__("2cf4").set;
|
|
var IS_IOS = __webpack_require__("1cdc");
|
|
|
|
var MutationObserver = global.MutationObserver || global.WebKitMutationObserver;
|
|
var process = global.process;
|
|
var Promise = global.Promise;
|
|
var IS_NODE = classof(process) == 'process';
|
|
// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
|
|
var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');
|
|
var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
|
|
|
|
var flush, head, last, notify, toggle, node, promise, then;
|
|
|
|
// modern engines have queueMicrotask method
|
|
if (!queueMicrotask) {
|
|
flush = function () {
|
|
var parent, fn;
|
|
if (IS_NODE && (parent = process.domain)) parent.exit();
|
|
while (head) {
|
|
fn = head.fn;
|
|
head = head.next;
|
|
try {
|
|
fn();
|
|
} catch (error) {
|
|
if (head) notify();
|
|
else last = undefined;
|
|
throw error;
|
|
}
|
|
} last = undefined;
|
|
if (parent) parent.enter();
|
|
};
|
|
|
|
// Node.js
|
|
if (IS_NODE) {
|
|
notify = function () {
|
|
process.nextTick(flush);
|
|
};
|
|
// browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
|
|
} else if (MutationObserver && !IS_IOS) {
|
|
toggle = true;
|
|
node = document.createTextNode('');
|
|
new MutationObserver(flush).observe(node, { characterData: true });
|
|
notify = function () {
|
|
node.data = toggle = !toggle;
|
|
};
|
|
// environments with maybe non-completely correct, but existent Promise
|
|
} else if (Promise && Promise.resolve) {
|
|
// Promise.resolve without an argument throws an error in LG WebOS 2
|
|
promise = Promise.resolve(undefined);
|
|
then = promise.then;
|
|
notify = function () {
|
|
then.call(promise, flush);
|
|
};
|
|
// for other environments - macrotask based on:
|
|
// - setImmediate
|
|
// - MessageChannel
|
|
// - window.postMessag
|
|
// - onreadystatechange
|
|
// - setTimeout
|
|
} else {
|
|
notify = function () {
|
|
// strange IE + webpack dev server bug - use .call(global)
|
|
macrotask.call(global, flush);
|
|
};
|
|
}
|
|
}
|
|
|
|
module.exports = queueMicrotask || function (fn) {
|
|
var task = { fn: fn, next: undefined };
|
|
if (last) last.next = task;
|
|
if (!head) {
|
|
head = task;
|
|
notify();
|
|
} last = task;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "b5a7":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getNative = __webpack_require__("0b07"),
|
|
root = __webpack_require__("2b3e");
|
|
|
|
/* Built-in method references that are verified to be native. */
|
|
var DataView = getNative(root, 'DataView');
|
|
|
|
module.exports = DataView;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "b622":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__("da84");
|
|
var shared = __webpack_require__("5692");
|
|
var has = __webpack_require__("5135");
|
|
var uid = __webpack_require__("90e3");
|
|
var NATIVE_SYMBOL = __webpack_require__("4930");
|
|
var USE_SYMBOL_AS_UID = __webpack_require__("fdbf");
|
|
|
|
var WellKnownSymbolsStore = shared('wks');
|
|
var Symbol = global.Symbol;
|
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
|
|
|
|
module.exports = function (name) {
|
|
if (!has(WellKnownSymbolsStore, name)) {
|
|
if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];
|
|
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
|
|
} return WellKnownSymbolsStore[name];
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "b64b":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $ = __webpack_require__("23e7");
|
|
var toObject = __webpack_require__("7b0b");
|
|
var nativeKeys = __webpack_require__("df75");
|
|
var fails = __webpack_require__("d039");
|
|
|
|
var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });
|
|
|
|
// `Object.keys` method
|
|
// https://tc39.github.io/ecma262/#sec-object.keys
|
|
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
|
|
keys: function keys(it) {
|
|
return nativeKeys(toObject(it));
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "b727":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var bind = __webpack_require__("0366");
|
|
var IndexedObject = __webpack_require__("44ad");
|
|
var toObject = __webpack_require__("7b0b");
|
|
var toLength = __webpack_require__("50c4");
|
|
var arraySpeciesCreate = __webpack_require__("65f0");
|
|
|
|
var push = [].push;
|
|
|
|
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
|
|
var createMethod = function (TYPE) {
|
|
var IS_MAP = TYPE == 1;
|
|
var IS_FILTER = TYPE == 2;
|
|
var IS_SOME = TYPE == 3;
|
|
var IS_EVERY = TYPE == 4;
|
|
var IS_FIND_INDEX = TYPE == 6;
|
|
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
|
return function ($this, callbackfn, that, specificCreate) {
|
|
var O = toObject($this);
|
|
var self = IndexedObject(O);
|
|
var boundFunction = bind(callbackfn, that, 3);
|
|
var length = toLength(self.length);
|
|
var index = 0;
|
|
var create = specificCreate || arraySpeciesCreate;
|
|
var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
|
|
var value, result;
|
|
for (;length > index; index++) if (NO_HOLES || index in self) {
|
|
value = self[index];
|
|
result = boundFunction(value, index, O);
|
|
if (TYPE) {
|
|
if (IS_MAP) target[index] = result; // map
|
|
else if (result) switch (TYPE) {
|
|
case 3: return true; // some
|
|
case 5: return value; // find
|
|
case 6: return index; // findIndex
|
|
case 2: push.call(target, value); // filter
|
|
} else if (IS_EVERY) return false; // every
|
|
}
|
|
}
|
|
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
|
|
};
|
|
};
|
|
|
|
module.exports = {
|
|
// `Array.prototype.forEach` method
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
|
forEach: createMethod(0),
|
|
// `Array.prototype.map` method
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype.map
|
|
map: createMethod(1),
|
|
// `Array.prototype.filter` method
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
|
|
filter: createMethod(2),
|
|
// `Array.prototype.some` method
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype.some
|
|
some: createMethod(3),
|
|
// `Array.prototype.every` method
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype.every
|
|
every: createMethod(4),
|
|
// `Array.prototype.find` method
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype.find
|
|
find: createMethod(5),
|
|
// `Array.prototype.findIndex` method
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
|
|
findIndex: createMethod(6)
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "b9c7":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__("e507");
|
|
module.exports = __webpack_require__("5524").Object.assign;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "ba01":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports = __webpack_require__("051b");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "bbc0":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var nativeCreate = __webpack_require__("6044");
|
|
|
|
/** Used to stand-in for `undefined` hash values. */
|
|
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* Gets the hash value for `key`.
|
|
*
|
|
* @private
|
|
* @name get
|
|
* @memberOf Hash
|
|
* @param {string} key The key of the value to get.
|
|
* @returns {*} Returns the entry value.
|
|
*/
|
|
function hashGet(key) {
|
|
var data = this.__data__;
|
|
if (nativeCreate) {
|
|
var result = data[key];
|
|
return result === HASH_UNDEFINED ? undefined : result;
|
|
}
|
|
return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
|
}
|
|
|
|
module.exports = hashGet;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "bfb1":
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_size_control_vue_vue_type_style_index_0_id_49942b1a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("da43");
|
|
/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_size_control_vue_vue_type_style_index_0_id_49942b1a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_size_control_vue_vue_type_style_index_0_id_49942b1a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
/* unused harmony reexport * */
|
|
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_size_control_vue_vue_type_style_index_0_id_49942b1a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "c04e":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isObject = __webpack_require__("861d");
|
|
|
|
// `ToPrimitive` abstract operation
|
|
// https://tc39.github.io/ecma262/#sec-toprimitive
|
|
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
|
// and the second argument - flag - preferred type is a string
|
|
module.exports = function (input, PREFERRED_STRING) {
|
|
if (!isObject(input)) return input;
|
|
var fn, val;
|
|
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
|
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
|
|
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
|
throw TypeError("Can't convert object to primitive value");
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "c098":
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used as references for various `Number` constants. */
|
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
|
|
/** Used to detect unsigned integer values. */
|
|
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
|
|
/**
|
|
* Checks if `value` is a valid array-like index.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
*/
|
|
function isIndex(value, length) {
|
|
var type = typeof value;
|
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
|
|
return !!length &&
|
|
(type == 'number' ||
|
|
(type != 'symbol' && reIsUint.test(value))) &&
|
|
(value > -1 && value % 1 == 0 && value < length);
|
|
}
|
|
|
|
module.exports = isIndex;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "c0bb":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 92);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 0:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
|
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
function normalizeComponent (
|
|
scriptExports,
|
|
render,
|
|
staticRenderFns,
|
|
functionalTemplate,
|
|
injectStyles,
|
|
scopeId,
|
|
moduleIdentifier, /* server only */
|
|
shadowMode /* vue-cli only */
|
|
) {
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (render) {
|
|
options.render = render
|
|
options.staticRenderFns = staticRenderFns
|
|
options._compiled = true
|
|
}
|
|
|
|
// functional template
|
|
if (functionalTemplate) {
|
|
options.functional = true
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = 'data-v-' + scopeId
|
|
}
|
|
|
|
var hook
|
|
if (moduleIdentifier) { // server build
|
|
hook = function (context) {
|
|
// 2.3 injection
|
|
context =
|
|
context || // cached call
|
|
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
// 2.2 with runInNewContext: true
|
|
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
context = __VUE_SSR_CONTEXT__
|
|
}
|
|
// inject component styles
|
|
if (injectStyles) {
|
|
injectStyles.call(this, context)
|
|
}
|
|
// register component module identifier for async chunk inferrence
|
|
if (context && context._registeredComponents) {
|
|
context._registeredComponents.add(moduleIdentifier)
|
|
}
|
|
}
|
|
// used by ssr in case component is cached and beforeCreate
|
|
// never gets called
|
|
options._ssrRegister = hook
|
|
} else if (injectStyles) {
|
|
hook = shadowMode
|
|
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
|
: injectStyles
|
|
}
|
|
|
|
if (hook) {
|
|
if (options.functional) {
|
|
// for template-only hot-reload because in that case the render fn doesn't
|
|
// go through the normalizer
|
|
options._injectStyles = hook
|
|
// register for functioal component in vue file
|
|
var originalRender = options.render
|
|
options.render = function renderWithStyleInjection (h, context) {
|
|
hook.call(context)
|
|
return originalRender(h, context)
|
|
}
|
|
} else {
|
|
// inject component registration as beforeCreate hook
|
|
var existing = options.beforeCreate
|
|
options.beforeCreate = existing
|
|
? [].concat(existing, hook)
|
|
: [hook]
|
|
}
|
|
}
|
|
|
|
return {
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 92:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse.vue?vue&type=template&id=461d57f4&
|
|
var render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"div",
|
|
{
|
|
staticClass: "el-collapse",
|
|
attrs: { role: "tablist", "aria-multiselectable": "true" }
|
|
},
|
|
[_vm._t("default")],
|
|
2
|
|
)
|
|
}
|
|
var staticRenderFns = []
|
|
render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/collapse/src/collapse.vue?vue&type=template&id=461d57f4&
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
/* harmony default export */ var collapsevue_type_script_lang_js_ = ({
|
|
name: 'ElCollapse',
|
|
|
|
componentName: 'ElCollapse',
|
|
|
|
props: {
|
|
accordion: Boolean,
|
|
value: {
|
|
type: [Array, String, Number],
|
|
default: function _default() {
|
|
return [];
|
|
}
|
|
}
|
|
},
|
|
|
|
data: function data() {
|
|
return {
|
|
activeNames: [].concat(this.value)
|
|
};
|
|
},
|
|
provide: function provide() {
|
|
return {
|
|
collapse: this
|
|
};
|
|
},
|
|
|
|
|
|
watch: {
|
|
value: function value(_value) {
|
|
this.activeNames = [].concat(_value);
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
setActiveNames: function setActiveNames(activeNames) {
|
|
activeNames = [].concat(activeNames);
|
|
var value = this.accordion ? activeNames[0] : activeNames;
|
|
this.activeNames = activeNames;
|
|
this.$emit('input', value);
|
|
this.$emit('change', value);
|
|
},
|
|
handleItemClick: function handleItemClick(item) {
|
|
if (this.accordion) {
|
|
this.setActiveNames((this.activeNames[0] || this.activeNames[0] === 0) && this.activeNames[0] === item.name ? '' : item.name);
|
|
} else {
|
|
var activeNames = this.activeNames.slice(0);
|
|
var index = activeNames.indexOf(item.name);
|
|
|
|
if (index > -1) {
|
|
activeNames.splice(index, 1);
|
|
} else {
|
|
activeNames.push(item.name);
|
|
}
|
|
this.setActiveNames(activeNames);
|
|
}
|
|
}
|
|
},
|
|
|
|
created: function created() {
|
|
this.$on('item-click', this.handleItemClick);
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/collapse/src/collapse.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_collapsevue_type_script_lang_js_ = (collapsevue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
var componentNormalizer = __webpack_require__(0);
|
|
|
|
// CONCATENATED MODULE: ./packages/collapse/src/collapse.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
src_collapsevue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var api; }
|
|
component.options.__file = "packages/collapse/src/collapse.vue"
|
|
/* harmony default export */ var collapse = (component.exports);
|
|
// CONCATENATED MODULE: ./packages/collapse/index.js
|
|
|
|
|
|
/* istanbul ignore next */
|
|
collapse.install = function (Vue) {
|
|
Vue.component(collapse.name, collapse);
|
|
};
|
|
|
|
/* harmony default export */ var packages_collapse = __webpack_exports__["default"] = (collapse);
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "c2b6":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var cloneArrayBuffer = __webpack_require__("f8af"),
|
|
cloneDataView = __webpack_require__("5d89"),
|
|
cloneRegExp = __webpack_require__("6f6c"),
|
|
cloneSymbol = __webpack_require__("a2db"),
|
|
cloneTypedArray = __webpack_require__("c8fe");
|
|
|
|
/** `Object#toString` result references. */
|
|
var boolTag = '[object Boolean]',
|
|
dateTag = '[object Date]',
|
|
mapTag = '[object Map]',
|
|
numberTag = '[object Number]',
|
|
regexpTag = '[object RegExp]',
|
|
setTag = '[object Set]',
|
|
stringTag = '[object String]',
|
|
symbolTag = '[object Symbol]';
|
|
|
|
var arrayBufferTag = '[object ArrayBuffer]',
|
|
dataViewTag = '[object DataView]',
|
|
float32Tag = '[object Float32Array]',
|
|
float64Tag = '[object Float64Array]',
|
|
int8Tag = '[object Int8Array]',
|
|
int16Tag = '[object Int16Array]',
|
|
int32Tag = '[object Int32Array]',
|
|
uint8Tag = '[object Uint8Array]',
|
|
uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
uint16Tag = '[object Uint16Array]',
|
|
uint32Tag = '[object Uint32Array]';
|
|
|
|
/**
|
|
* Initializes an object clone based on its `toStringTag`.
|
|
*
|
|
* **Note:** This function only supports cloning values with tags of
|
|
* `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to clone.
|
|
* @param {string} tag The `toStringTag` of the object to clone.
|
|
* @param {boolean} [isDeep] Specify a deep clone.
|
|
* @returns {Object} Returns the initialized clone.
|
|
*/
|
|
function initCloneByTag(object, tag, isDeep) {
|
|
var Ctor = object.constructor;
|
|
switch (tag) {
|
|
case arrayBufferTag:
|
|
return cloneArrayBuffer(object);
|
|
|
|
case boolTag:
|
|
case dateTag:
|
|
return new Ctor(+object);
|
|
|
|
case dataViewTag:
|
|
return cloneDataView(object, isDeep);
|
|
|
|
case float32Tag: case float64Tag:
|
|
case int8Tag: case int16Tag: case int32Tag:
|
|
case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
|
|
return cloneTypedArray(object, isDeep);
|
|
|
|
case mapTag:
|
|
return new Ctor;
|
|
|
|
case numberTag:
|
|
case stringTag:
|
|
return new Ctor(object);
|
|
|
|
case regexpTag:
|
|
return cloneRegExp(object);
|
|
|
|
case setTag:
|
|
return new Ctor;
|
|
|
|
case symbolTag:
|
|
return cloneSymbol(object);
|
|
}
|
|
}
|
|
|
|
module.exports = initCloneByTag;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "c2cc":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 134);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 134:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// CONCATENATED MODULE: ./packages/col/src/col.js
|
|
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; };
|
|
|
|
/* harmony default export */ var col = ({
|
|
name: 'ElCol',
|
|
|
|
props: {
|
|
span: {
|
|
type: Number,
|
|
default: 24
|
|
},
|
|
tag: {
|
|
type: String,
|
|
default: 'div'
|
|
},
|
|
offset: Number,
|
|
pull: Number,
|
|
push: Number,
|
|
xs: [Number, Object],
|
|
sm: [Number, Object],
|
|
md: [Number, Object],
|
|
lg: [Number, Object],
|
|
xl: [Number, Object]
|
|
},
|
|
|
|
computed: {
|
|
gutter: function gutter() {
|
|
var parent = this.$parent;
|
|
while (parent && parent.$options.componentName !== 'ElRow') {
|
|
parent = parent.$parent;
|
|
}
|
|
return parent ? parent.gutter : 0;
|
|
}
|
|
},
|
|
render: function render(h) {
|
|
var _this = this;
|
|
|
|
var classList = [];
|
|
var style = {};
|
|
|
|
if (this.gutter) {
|
|
style.paddingLeft = this.gutter / 2 + 'px';
|
|
style.paddingRight = style.paddingLeft;
|
|
}
|
|
|
|
['span', 'offset', 'pull', 'push'].forEach(function (prop) {
|
|
if (_this[prop] || _this[prop] === 0) {
|
|
classList.push(prop !== 'span' ? 'el-col-' + prop + '-' + _this[prop] : 'el-col-' + _this[prop]);
|
|
}
|
|
});
|
|
|
|
['xs', 'sm', 'md', 'lg', 'xl'].forEach(function (size) {
|
|
if (typeof _this[size] === 'number') {
|
|
classList.push('el-col-' + size + '-' + _this[size]);
|
|
} else if (_typeof(_this[size]) === 'object') {
|
|
var props = _this[size];
|
|
Object.keys(props).forEach(function (prop) {
|
|
classList.push(prop !== 'span' ? 'el-col-' + size + '-' + prop + '-' + props[prop] : 'el-col-' + size + '-' + props[prop]);
|
|
});
|
|
}
|
|
});
|
|
|
|
return h(this.tag, {
|
|
class: ['el-col', classList],
|
|
style: style
|
|
}, this.$slots.default);
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/col/index.js
|
|
|
|
|
|
/* istanbul ignore next */
|
|
col.install = function (Vue) {
|
|
Vue.component(col.name, col);
|
|
};
|
|
|
|
/* harmony default export */ var packages_col = __webpack_exports__["default"] = (col);
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "c337":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "c3fc":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getTag = __webpack_require__("42a2"),
|
|
isObjectLike = __webpack_require__("1310");
|
|
|
|
/** `Object#toString` result references. */
|
|
var setTag = '[object Set]';
|
|
|
|
/**
|
|
* The base implementation of `_.isSet` without Node.js optimizations.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
|
|
*/
|
|
function baseIsSet(value) {
|
|
return isObjectLike(value) && getTag(value) == setTag;
|
|
}
|
|
|
|
module.exports = baseIsSet;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "c430":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = false;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "c6b6":
|
|
/***/ (function(module, exports) {
|
|
|
|
var toString = {}.toString;
|
|
|
|
module.exports = function (it) {
|
|
return toString.call(it).slice(8, -1);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "c6cd":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__("da84");
|
|
var setGlobal = __webpack_require__("ce4e");
|
|
|
|
var SHARED = '__core-js_shared__';
|
|
var store = global[SHARED] || setGlobal(SHARED, {});
|
|
|
|
module.exports = store;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "c740":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $ = __webpack_require__("23e7");
|
|
var $findIndex = __webpack_require__("b727").findIndex;
|
|
var addToUnscopables = __webpack_require__("44d2");
|
|
var arrayMethodUsesToLength = __webpack_require__("ae40");
|
|
|
|
var FIND_INDEX = 'findIndex';
|
|
var SKIPS_HOLES = true;
|
|
|
|
var USES_TO_LENGTH = arrayMethodUsesToLength(FIND_INDEX);
|
|
|
|
// Shouldn't skip holes
|
|
if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });
|
|
|
|
// `Array.prototype.findIndex` method
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype.findindex
|
|
$({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH }, {
|
|
findIndex: function findIndex(callbackfn /* , that = undefined */) {
|
|
return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
}
|
|
});
|
|
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
addToUnscopables(FIND_INDEX);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "c869":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getNative = __webpack_require__("0b07"),
|
|
root = __webpack_require__("2b3e");
|
|
|
|
/* Built-in method references that are verified to be native. */
|
|
var Set = getNative(root, 'Set');
|
|
|
|
module.exports = Set;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "c87c":
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* Initializes an array clone.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to clone.
|
|
* @returns {Array} Returns the initialized clone.
|
|
*/
|
|
function initCloneArray(array) {
|
|
var length = array.length,
|
|
result = new array.constructor(length);
|
|
|
|
// Add properties assigned by `RegExp#exec`.
|
|
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
|
result.index = array.index;
|
|
result.input = array.input;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = initCloneArray;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "c8ba":
|
|
/***/ (function(module, exports) {
|
|
|
|
var g;
|
|
|
|
// This works in non-strict mode
|
|
g = (function() {
|
|
return this;
|
|
})();
|
|
|
|
try {
|
|
// This works if eval is allowed (see CSP)
|
|
g = g || new Function("return this")();
|
|
} catch (e) {
|
|
// This works if the window reference is available
|
|
if (typeof window === "object") g = window;
|
|
}
|
|
|
|
// g can still be undefined, but nothing to do about it...
|
|
// We return undefined, instead of nothing here, so it's
|
|
// easier to handle this case. if(!global) { ...}
|
|
|
|
module.exports = g;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "c8fe":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var cloneArrayBuffer = __webpack_require__("f8af");
|
|
|
|
/**
|
|
* Creates a clone of `typedArray`.
|
|
*
|
|
* @private
|
|
* @param {Object} typedArray The typed array to clone.
|
|
* @param {boolean} [isDeep] Specify a deep clone.
|
|
* @returns {Object} Returns the cloned typed array.
|
|
*/
|
|
function cloneTypedArray(typedArray, isDeep) {
|
|
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
}
|
|
|
|
module.exports = cloneTypedArray;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "c901":
|
|
/***/ (function(module, exports) {
|
|
|
|
// 7.2.1 RequireObjectCoercible(argument)
|
|
module.exports = function (it) {
|
|
if (it == undefined) throw TypeError("Can't call method on " + it);
|
|
return it;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "c903":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Secure random string generator with custom alphabet.
|
|
*
|
|
* Alphabet must contain 256 symbols or less. Otherwise, the generator
|
|
* will not be secure.
|
|
*
|
|
* @param {generator} random The random bytes generator.
|
|
* @param {string} alphabet Symbols to be used in new random string.
|
|
* @param {size} size The number of symbols in new random string.
|
|
*
|
|
* @return {string} Random string.
|
|
*
|
|
* @example
|
|
* const format = require('nanoid/format')
|
|
*
|
|
* function random (size) {
|
|
* const result = []
|
|
* for (let i = 0; i < size; i++) {
|
|
* result.push(randomByte())
|
|
* }
|
|
* return result
|
|
* }
|
|
*
|
|
* format(random, "abcdef", 5) //=> "fbaef"
|
|
*
|
|
* @name format
|
|
* @function
|
|
*/
|
|
module.exports = function (random, alphabet, size) {
|
|
var mask = (2 << Math.log(alphabet.length - 1) / Math.LN2) - 1
|
|
var step = Math.ceil(1.6 * mask * size / alphabet.length)
|
|
|
|
var id = ''
|
|
while (true) {
|
|
var bytes = random(step)
|
|
for (var i = 0; i < step; i++) {
|
|
var byte = bytes[i] & mask
|
|
if (alphabet[byte]) {
|
|
id += alphabet[byte]
|
|
if (id.length === size) return id
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @callback generator
|
|
* @param {number} bytes The number of bytes to generate.
|
|
* @return {number[]} Random bytes.
|
|
*/
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "c975":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $ = __webpack_require__("23e7");
|
|
var $indexOf = __webpack_require__("4d64").indexOf;
|
|
var arrayMethodIsStrict = __webpack_require__("a640");
|
|
var arrayMethodUsesToLength = __webpack_require__("ae40");
|
|
|
|
var nativeIndexOf = [].indexOf;
|
|
|
|
var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
|
|
var STRICT_METHOD = arrayMethodIsStrict('indexOf');
|
|
var USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
|
|
|
|
// `Array.prototype.indexOf` method
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
|
|
$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD || !USES_TO_LENGTH }, {
|
|
indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
|
|
return NEGATIVE_ZERO
|
|
// convert -0 to +0
|
|
? nativeIndexOf.apply(this, arguments) || 0
|
|
: $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "ca84":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var has = __webpack_require__("5135");
|
|
var toIndexedObject = __webpack_require__("fc6a");
|
|
var indexOf = __webpack_require__("4d64").indexOf;
|
|
var hiddenKeys = __webpack_require__("d012");
|
|
|
|
module.exports = function (object, names) {
|
|
var O = toIndexedObject(object);
|
|
var i = 0;
|
|
var result = [];
|
|
var key;
|
|
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
|
|
// Don't enum bug & hidden keys
|
|
while (names.length > i) if (has(O, key = names[i++])) {
|
|
~indexOf(result, key) || result.push(key);
|
|
}
|
|
return result;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "cb5a":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var eq = __webpack_require__("9638");
|
|
|
|
/**
|
|
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {*} key The key to search for.
|
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
*/
|
|
function assocIndexOf(array, key) {
|
|
var length = array.length;
|
|
while (length--) {
|
|
if (eq(array[length][0], key)) {
|
|
return length;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
module.exports = assocIndexOf;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "cc12":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__("da84");
|
|
var isObject = __webpack_require__("861d");
|
|
|
|
var document = global.document;
|
|
// typeof document.createElement is 'object' in old IE
|
|
var EXISTS = isObject(document) && isObject(document.createElement);
|
|
|
|
module.exports = function (it) {
|
|
return EXISTS ? document.createElement(it) : {};
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "cc15":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var store = __webpack_require__("b367")('wks');
|
|
var uid = __webpack_require__("8b1a");
|
|
var Symbol = __webpack_require__("ef08").Symbol;
|
|
var USE_SYMBOL = typeof Symbol == 'function';
|
|
|
|
var $exports = module.exports = function (name) {
|
|
return store[name] || (store[name] =
|
|
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
|
|
};
|
|
|
|
$exports.store = store;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "cc45":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseIsMap = __webpack_require__("1a2d"),
|
|
baseUnary = __webpack_require__("b047"),
|
|
nodeUtil = __webpack_require__("99d3");
|
|
|
|
/* Node.js helper references. */
|
|
var nodeIsMap = nodeUtil && nodeUtil.isMap;
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `Map` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.3.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
|
|
* @example
|
|
*
|
|
* _.isMap(new Map);
|
|
* // => true
|
|
*
|
|
* _.isMap(new WeakMap);
|
|
* // => false
|
|
*/
|
|
var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
|
|
|
|
module.exports = isMap;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "cca6":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $ = __webpack_require__("23e7");
|
|
var assign = __webpack_require__("60da");
|
|
|
|
// `Object.assign` method
|
|
// https://tc39.github.io/ecma262/#sec-object.assign
|
|
$({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
|
|
assign: assign
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "cdf9":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var anObject = __webpack_require__("825a");
|
|
var isObject = __webpack_require__("861d");
|
|
var newPromiseCapability = __webpack_require__("f069");
|
|
|
|
module.exports = function (C, x) {
|
|
anObject(C);
|
|
if (isObject(x) && x.constructor === C) return x;
|
|
var promiseCapability = newPromiseCapability.f(C);
|
|
var resolve = promiseCapability.resolve;
|
|
resolve(x);
|
|
return promiseCapability.promise;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "ce4e":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__("da84");
|
|
var createNonEnumerableProperty = __webpack_require__("9112");
|
|
|
|
module.exports = function (key, value) {
|
|
try {
|
|
createNonEnumerableProperty(global, key, value);
|
|
} catch (error) {
|
|
global[key] = value;
|
|
} return value;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "ce7a":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
|
|
var has = __webpack_require__("9c0e");
|
|
var toObject = __webpack_require__("0983");
|
|
var IE_PROTO = __webpack_require__("5a94")('IE_PROTO');
|
|
var ObjectProto = Object.prototype;
|
|
|
|
module.exports = Object.getPrototypeOf || function (O) {
|
|
O = toObject(O);
|
|
if (has(O, IE_PROTO)) return O[IE_PROTO];
|
|
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
|
|
return O.constructor.prototype;
|
|
} return O instanceof Object ? ObjectProto : null;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "d010":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
function _broadcast(componentName, eventName, params) {
|
|
this.$children.forEach(function (child) {
|
|
var name = child.$options.componentName;
|
|
|
|
if (name === componentName) {
|
|
child.$emit.apply(child, [eventName].concat(params));
|
|
} else {
|
|
_broadcast.apply(child, [componentName, eventName].concat([params]));
|
|
}
|
|
});
|
|
}
|
|
exports.default = {
|
|
methods: {
|
|
dispatch: function dispatch(componentName, eventName, params) {
|
|
var parent = this.$parent || this.$root;
|
|
var name = parent.$options.componentName;
|
|
|
|
while (parent && (!name || name !== componentName)) {
|
|
parent = parent.$parent;
|
|
|
|
if (parent) {
|
|
name = parent.$options.componentName;
|
|
}
|
|
}
|
|
if (parent) {
|
|
parent.$emit.apply(parent, [eventName].concat(params));
|
|
}
|
|
},
|
|
broadcast: function broadcast(componentName, eventName, params) {
|
|
_broadcast.call(this, componentName, eventName, params);
|
|
}
|
|
}
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "d012":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = {};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "d02c":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var ListCache = __webpack_require__("5e2e"),
|
|
Map = __webpack_require__("79bc"),
|
|
MapCache = __webpack_require__("7b83");
|
|
|
|
/** Used as the size to enable large array optimizations. */
|
|
var LARGE_ARRAY_SIZE = 200;
|
|
|
|
/**
|
|
* Sets the stack `key` to `value`.
|
|
*
|
|
* @private
|
|
* @name set
|
|
* @memberOf Stack
|
|
* @param {string} key The key of the value to set.
|
|
* @param {*} value The value to set.
|
|
* @returns {Object} Returns the stack cache instance.
|
|
*/
|
|
function stackSet(key, value) {
|
|
var data = this.__data__;
|
|
if (data instanceof ListCache) {
|
|
var pairs = data.__data__;
|
|
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
|
pairs.push([key, value]);
|
|
this.size = ++data.size;
|
|
return this;
|
|
}
|
|
data = this.__data__ = new MapCache(pairs);
|
|
}
|
|
data.set(key, value);
|
|
this.size = data.size;
|
|
return this;
|
|
}
|
|
|
|
module.exports = stackSet;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "d039":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function (exec) {
|
|
try {
|
|
return !!exec();
|
|
} catch (error) {
|
|
return true;
|
|
}
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "d066":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var path = __webpack_require__("428f");
|
|
var global = __webpack_require__("da84");
|
|
|
|
var aFunction = function (variable) {
|
|
return typeof variable == 'function' ? variable : undefined;
|
|
};
|
|
|
|
module.exports = function (namespace, method) {
|
|
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
|
|
: path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "d16a":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 7.1.15 ToLength
|
|
var toInteger = __webpack_require__("fc5e");
|
|
var min = Math.min;
|
|
module.exports = function (it) {
|
|
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "d180":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 91);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 0:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
|
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
function normalizeComponent (
|
|
scriptExports,
|
|
render,
|
|
staticRenderFns,
|
|
functionalTemplate,
|
|
injectStyles,
|
|
scopeId,
|
|
moduleIdentifier, /* server only */
|
|
shadowMode /* vue-cli only */
|
|
) {
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (render) {
|
|
options.render = render
|
|
options.staticRenderFns = staticRenderFns
|
|
options._compiled = true
|
|
}
|
|
|
|
// functional template
|
|
if (functionalTemplate) {
|
|
options.functional = true
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = 'data-v-' + scopeId
|
|
}
|
|
|
|
var hook
|
|
if (moduleIdentifier) { // server build
|
|
hook = function (context) {
|
|
// 2.3 injection
|
|
context =
|
|
context || // cached call
|
|
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
// 2.2 with runInNewContext: true
|
|
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
context = __VUE_SSR_CONTEXT__
|
|
}
|
|
// inject component styles
|
|
if (injectStyles) {
|
|
injectStyles.call(this, context)
|
|
}
|
|
// register component module identifier for async chunk inferrence
|
|
if (context && context._registeredComponents) {
|
|
context._registeredComponents.add(moduleIdentifier)
|
|
}
|
|
}
|
|
// used by ssr in case component is cached and beforeCreate
|
|
// never gets called
|
|
options._ssrRegister = hook
|
|
} else if (injectStyles) {
|
|
hook = shadowMode
|
|
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
|
: injectStyles
|
|
}
|
|
|
|
if (hook) {
|
|
if (options.functional) {
|
|
// for template-only hot-reload because in that case the render fn doesn't
|
|
// go through the normalizer
|
|
options._injectStyles = hook
|
|
// register for functioal component in vue file
|
|
var originalRender = options.render
|
|
options.render = function renderWithStyleInjection (h, context) {
|
|
hook.call(context)
|
|
return originalRender(h, context)
|
|
}
|
|
} else {
|
|
// inject component registration as beforeCreate hook
|
|
var existing = options.beforeCreate
|
|
options.beforeCreate = existing
|
|
? [].concat(existing, hook)
|
|
: [hook]
|
|
}
|
|
}
|
|
|
|
return {
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 28:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("5488");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 3:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("8122");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 4:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("d010");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 91:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse-item.vue?vue&type=template&id=2d05faac&
|
|
var render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"div",
|
|
{
|
|
staticClass: "el-collapse-item",
|
|
class: { "is-active": _vm.isActive, "is-disabled": _vm.disabled }
|
|
},
|
|
[
|
|
_c(
|
|
"div",
|
|
{
|
|
attrs: {
|
|
role: "tab",
|
|
"aria-expanded": _vm.isActive,
|
|
"aria-controls": "el-collapse-content-" + _vm.id,
|
|
"aria-describedby": "el-collapse-content-" + _vm.id
|
|
}
|
|
},
|
|
[
|
|
_c(
|
|
"div",
|
|
{
|
|
staticClass: "el-collapse-item__header",
|
|
class: {
|
|
focusing: _vm.focusing,
|
|
"is-active": _vm.isActive
|
|
},
|
|
attrs: {
|
|
role: "button",
|
|
id: "el-collapse-head-" + _vm.id,
|
|
tabindex: _vm.disabled ? undefined : 0
|
|
},
|
|
on: {
|
|
click: _vm.handleHeaderClick,
|
|
keyup: function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k($event.keyCode, "space", 32, $event.key, [
|
|
" ",
|
|
"Spacebar"
|
|
]) &&
|
|
_vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
|
|
) {
|
|
return null
|
|
}
|
|
$event.stopPropagation()
|
|
return _vm.handleEnterClick($event)
|
|
},
|
|
focus: _vm.handleFocus,
|
|
blur: function($event) {
|
|
_vm.focusing = false
|
|
}
|
|
}
|
|
},
|
|
[
|
|
_vm._t("title", [_vm._v(_vm._s(_vm.title))]),
|
|
_c("i", {
|
|
staticClass: "el-collapse-item__arrow el-icon-arrow-right",
|
|
class: { "is-active": _vm.isActive }
|
|
})
|
|
],
|
|
2
|
|
)
|
|
]
|
|
),
|
|
_c("el-collapse-transition", [
|
|
_c(
|
|
"div",
|
|
{
|
|
directives: [
|
|
{
|
|
name: "show",
|
|
rawName: "v-show",
|
|
value: _vm.isActive,
|
|
expression: "isActive"
|
|
}
|
|
],
|
|
staticClass: "el-collapse-item__wrap",
|
|
attrs: {
|
|
role: "tabpanel",
|
|
"aria-hidden": !_vm.isActive,
|
|
"aria-labelledby": "el-collapse-head-" + _vm.id,
|
|
id: "el-collapse-content-" + _vm.id
|
|
}
|
|
},
|
|
[
|
|
_c(
|
|
"div",
|
|
{ staticClass: "el-collapse-item__content" },
|
|
[_vm._t("default")],
|
|
2
|
|
)
|
|
]
|
|
)
|
|
])
|
|
],
|
|
1
|
|
)
|
|
}
|
|
var staticRenderFns = []
|
|
render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/collapse/src/collapse-item.vue?vue&type=template&id=2d05faac&
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/transitions/collapse-transition"
|
|
var collapse_transition_ = __webpack_require__(28);
|
|
var collapse_transition_default = /*#__PURE__*/__webpack_require__.n(collapse_transition_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
|
|
var emitter_ = __webpack_require__(4);
|
|
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/util"
|
|
var util_ = __webpack_require__(3);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse-item.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var collapse_itemvue_type_script_lang_js_ = ({
|
|
name: 'ElCollapseItem',
|
|
|
|
componentName: 'ElCollapseItem',
|
|
|
|
mixins: [emitter_default.a],
|
|
|
|
components: { ElCollapseTransition: collapse_transition_default.a },
|
|
|
|
data: function data() {
|
|
return {
|
|
contentWrapStyle: {
|
|
height: 'auto',
|
|
display: 'block'
|
|
},
|
|
contentHeight: 0,
|
|
focusing: false,
|
|
isClick: false,
|
|
id: Object(util_["generateId"])()
|
|
};
|
|
},
|
|
|
|
|
|
inject: ['collapse'],
|
|
|
|
props: {
|
|
title: String,
|
|
name: {
|
|
type: [String, Number],
|
|
default: function _default() {
|
|
return this._uid;
|
|
}
|
|
},
|
|
disabled: Boolean
|
|
},
|
|
|
|
computed: {
|
|
isActive: function isActive() {
|
|
return this.collapse.activeNames.indexOf(this.name) > -1;
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
handleFocus: function handleFocus() {
|
|
var _this = this;
|
|
|
|
setTimeout(function () {
|
|
if (!_this.isClick) {
|
|
_this.focusing = true;
|
|
} else {
|
|
_this.isClick = false;
|
|
}
|
|
}, 50);
|
|
},
|
|
handleHeaderClick: function handleHeaderClick() {
|
|
if (this.disabled) return;
|
|
this.dispatch('ElCollapse', 'item-click', this);
|
|
this.focusing = false;
|
|
this.isClick = true;
|
|
},
|
|
handleEnterClick: function handleEnterClick() {
|
|
this.dispatch('ElCollapse', 'item-click', this);
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/collapse/src/collapse-item.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_collapse_itemvue_type_script_lang_js_ = (collapse_itemvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
var componentNormalizer = __webpack_require__(0);
|
|
|
|
// CONCATENATED MODULE: ./packages/collapse/src/collapse-item.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
src_collapse_itemvue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var api; }
|
|
component.options.__file = "packages/collapse/src/collapse-item.vue"
|
|
/* harmony default export */ var collapse_item = (component.exports);
|
|
// CONCATENATED MODULE: ./packages/collapse-item/index.js
|
|
|
|
|
|
/* istanbul ignore next */
|
|
collapse_item.install = function (Vue) {
|
|
Vue.component(collapse_item.name, collapse_item);
|
|
};
|
|
|
|
/* harmony default export */ var packages_collapse_item = __webpack_exports__["default"] = (collapse_item);
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "d1e7":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
|
|
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
|
|
// Nashorn ~ JDK8 bug
|
|
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
|
|
|
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
|
|
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
var descriptor = getOwnPropertyDescriptor(this, V);
|
|
return !!descriptor && descriptor.enumerable;
|
|
} : nativePropertyIsEnumerable;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "d327":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* This method returns a new empty array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.13.0
|
|
* @category Util
|
|
* @returns {Array} Returns the new empty array.
|
|
* @example
|
|
*
|
|
* var arrays = _.times(2, _.stubArray);
|
|
*
|
|
* console.log(arrays);
|
|
* // => [[], []]
|
|
*
|
|
* console.log(arrays[0] === arrays[1]);
|
|
* // => false
|
|
*/
|
|
function stubArray() {
|
|
return [];
|
|
}
|
|
|
|
module.exports = stubArray;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "d370":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseIsArguments = __webpack_require__("253c"),
|
|
isObjectLike = __webpack_require__("1310");
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/** Built-in value references. */
|
|
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
|
|
/**
|
|
* Checks if `value` is likely an `arguments` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
* else `false`.
|
|
* @example
|
|
*
|
|
* _.isArguments(function() { return arguments; }());
|
|
* // => true
|
|
*
|
|
* _.isArguments([1, 2, 3]);
|
|
* // => false
|
|
*/
|
|
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
|
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
|
|
!propertyIsEnumerable.call(value, 'callee');
|
|
};
|
|
|
|
module.exports = isArguments;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "d397":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.isDef = isDef;
|
|
exports.isKorean = isKorean;
|
|
function isDef(val) {
|
|
return val !== undefined && val !== null;
|
|
}
|
|
function isKorean(text) {
|
|
var reg = /([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi;
|
|
return reg.test(text);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "d3b7":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var TO_STRING_TAG_SUPPORT = __webpack_require__("00ee");
|
|
var redefine = __webpack_require__("6eeb");
|
|
var toString = __webpack_require__("b041");
|
|
|
|
// `Object.prototype.toString` method
|
|
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
|
|
if (!TO_STRING_TAG_SUPPORT) {
|
|
redefine(Object.prototype, 'toString', toString, { unsafe: true });
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "d44e":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var defineProperty = __webpack_require__("9bf2").f;
|
|
var has = __webpack_require__("5135");
|
|
var wellKnownSymbol = __webpack_require__("b622");
|
|
|
|
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
|
|
module.exports = function (it, TAG, STATIC) {
|
|
if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
|
|
defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
|
|
}
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "d784":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
__webpack_require__("ac1f");
|
|
var redefine = __webpack_require__("6eeb");
|
|
var fails = __webpack_require__("d039");
|
|
var wellKnownSymbol = __webpack_require__("b622");
|
|
var regexpExec = __webpack_require__("9263");
|
|
var createNonEnumerableProperty = __webpack_require__("9112");
|
|
|
|
var SPECIES = wellKnownSymbol('species');
|
|
|
|
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
|
// #replace needs built-in support for named groups.
|
|
// #match works fine because it just return the exec results, even if it has
|
|
// a "grops" property.
|
|
var re = /./;
|
|
re.exec = function () {
|
|
var result = [];
|
|
result.groups = { a: '7' };
|
|
return result;
|
|
};
|
|
return ''.replace(re, '$<a>') !== '7';
|
|
});
|
|
|
|
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
|
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
|
var REPLACE_KEEPS_$0 = (function () {
|
|
return 'a'.replace(/./, '$0') === '$0';
|
|
})();
|
|
|
|
var REPLACE = wellKnownSymbol('replace');
|
|
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
|
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
|
if (/./[REPLACE]) {
|
|
return /./[REPLACE]('a', '$0') === '';
|
|
}
|
|
return false;
|
|
})();
|
|
|
|
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
|
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
|
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
|
var re = /(?:)/;
|
|
var originalExec = re.exec;
|
|
re.exec = function () { return originalExec.apply(this, arguments); };
|
|
var result = 'ab'.split(re);
|
|
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
|
});
|
|
|
|
module.exports = function (KEY, length, exec, sham) {
|
|
var SYMBOL = wellKnownSymbol(KEY);
|
|
|
|
var DELEGATES_TO_SYMBOL = !fails(function () {
|
|
// String methods call symbol-named RegEp methods
|
|
var O = {};
|
|
O[SYMBOL] = function () { return 7; };
|
|
return ''[KEY](O) != 7;
|
|
});
|
|
|
|
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
|
|
// Symbol-named RegExp methods call .exec
|
|
var execCalled = false;
|
|
var re = /a/;
|
|
|
|
if (KEY === 'split') {
|
|
// We can't use real regex here since it causes deoptimization
|
|
// and serious performance degradation in V8
|
|
// https://github.com/zloirock/core-js/issues/306
|
|
re = {};
|
|
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
|
// a new one. We need to return the patched regex when creating the new one.
|
|
re.constructor = {};
|
|
re.constructor[SPECIES] = function () { return re; };
|
|
re.flags = '';
|
|
re[SYMBOL] = /./[SYMBOL];
|
|
}
|
|
|
|
re.exec = function () { execCalled = true; return null; };
|
|
|
|
re[SYMBOL]('');
|
|
return !execCalled;
|
|
});
|
|
|
|
if (
|
|
!DELEGATES_TO_SYMBOL ||
|
|
!DELEGATES_TO_EXEC ||
|
|
(KEY === 'replace' && !(
|
|
REPLACE_SUPPORTS_NAMED_GROUPS &&
|
|
REPLACE_KEEPS_$0 &&
|
|
!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
|
|
)) ||
|
|
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
|
) {
|
|
var nativeRegExpMethod = /./[SYMBOL];
|
|
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
|
if (regexp.exec === regexpExec) {
|
|
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
|
// The native String method already delegates to @@method (this
|
|
// polyfilled function), leasing to infinite recursion.
|
|
// We avoid it by directly calling the native @@method method.
|
|
return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
|
|
}
|
|
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
|
|
}
|
|
return { done: false };
|
|
}, {
|
|
REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
|
|
REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
|
|
});
|
|
var stringMethod = methods[0];
|
|
var regexMethod = methods[1];
|
|
|
|
redefine(String.prototype, KEY, stringMethod);
|
|
redefine(RegExp.prototype, SYMBOL, length == 2
|
|
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
|
|
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
|
|
? function (string, arg) { return regexMethod.call(string, this, arg); }
|
|
// 21.2.5.6 RegExp.prototype[@@match](string)
|
|
// 21.2.5.9 RegExp.prototype[@@search](string)
|
|
: function (string) { return regexMethod.call(string, this); }
|
|
);
|
|
}
|
|
|
|
if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "d7ee":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseIsSet = __webpack_require__("c3fc"),
|
|
baseUnary = __webpack_require__("b047"),
|
|
nodeUtil = __webpack_require__("99d3");
|
|
|
|
/* Node.js helper references. */
|
|
var nodeIsSet = nodeUtil && nodeUtil.isSet;
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `Set` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.3.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
|
|
* @example
|
|
*
|
|
* _.isSet(new Set);
|
|
* // => true
|
|
*
|
|
* _.isSet(new WeakSet);
|
|
* // => false
|
|
*/
|
|
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
|
|
module.exports = isSet;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "d818":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "d81d":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $ = __webpack_require__("23e7");
|
|
var $map = __webpack_require__("b727").map;
|
|
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");
|
|
var arrayMethodUsesToLength = __webpack_require__("ae40");
|
|
|
|
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
|
|
// FF49- issue
|
|
var USES_TO_LENGTH = arrayMethodUsesToLength('map');
|
|
|
|
// `Array.prototype.map` method
|
|
// https://tc39.github.io/ecma262/#sec-array.prototype.map
|
|
// with adding support of @@species
|
|
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
|
|
map: function map(callbackfn /* , thisArg */) {
|
|
return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "da03":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var root = __webpack_require__("2b3e");
|
|
|
|
/** Used to detect overreaching core-js shims. */
|
|
var coreJsData = root['__core-js_shared__'];
|
|
|
|
module.exports = coreJsData;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "da43":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "da84":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
/* WEBPACK VAR INJECTION */(function(global) {var check = function (it) {
|
|
return it && it.Math == Math && it;
|
|
};
|
|
|
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
module.exports =
|
|
// eslint-disable-next-line no-undef
|
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
check(typeof window == 'object' && window) ||
|
|
check(typeof self == 'object' && self) ||
|
|
check(typeof global == 'object' && global) ||
|
|
// eslint-disable-next-line no-new-func
|
|
Function('return this')();
|
|
|
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
|
|
|
|
/***/ }),
|
|
|
|
/***/ "db22":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var random = __webpack_require__("961e")
|
|
var format = __webpack_require__("c903")
|
|
|
|
/**
|
|
* Low-level function to change alphabet and ID size.
|
|
*
|
|
* Alphabet must contain 256 symbols or less. Otherwise, the generator
|
|
* will not be secure.
|
|
*
|
|
* @param {string} alphabet Symbols to be used in ID.
|
|
* @param {number} size The number of symbols in ID.
|
|
*
|
|
* @return {string} Unique ID.
|
|
*
|
|
* @example
|
|
* const generate = require('nanoid/generate')
|
|
* model.id = generate('0123456789абвгдеё', 5) //=> "8ё56а"
|
|
*
|
|
* @name generate
|
|
* @function
|
|
*/
|
|
module.exports = function (alphabet, size) {
|
|
return format(random, alphabet, size)
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "dbb4":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $ = __webpack_require__("23e7");
|
|
var DESCRIPTORS = __webpack_require__("83ab");
|
|
var ownKeys = __webpack_require__("56ef");
|
|
var toIndexedObject = __webpack_require__("fc6a");
|
|
var getOwnPropertyDescriptorModule = __webpack_require__("06cf");
|
|
var createProperty = __webpack_require__("8418");
|
|
|
|
// `Object.getOwnPropertyDescriptors` method
|
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
|
|
$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
|
|
getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
|
|
var O = toIndexedObject(object);
|
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
var keys = ownKeys(O);
|
|
var result = {};
|
|
var index = 0;
|
|
var key, descriptor;
|
|
while (keys.length > index) {
|
|
descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
|
|
if (descriptor !== undefined) createProperty(result, key, descriptor);
|
|
}
|
|
return result;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "dc57":
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used for built-in method references. */
|
|
var funcProto = Function.prototype;
|
|
|
|
/** Used to resolve the decompiled source of functions. */
|
|
var funcToString = funcProto.toString;
|
|
|
|
/**
|
|
* Converts `func` to its source code.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to convert.
|
|
* @returns {string} Returns the source code.
|
|
*/
|
|
function toSource(func) {
|
|
if (func != null) {
|
|
try {
|
|
return funcToString.call(func);
|
|
} catch (e) {}
|
|
try {
|
|
return (func + '');
|
|
} catch (e) {}
|
|
}
|
|
return '';
|
|
}
|
|
|
|
module.exports = toSource;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "dcdc":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 83);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 0:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
|
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
function normalizeComponent (
|
|
scriptExports,
|
|
render,
|
|
staticRenderFns,
|
|
functionalTemplate,
|
|
injectStyles,
|
|
scopeId,
|
|
moduleIdentifier, /* server only */
|
|
shadowMode /* vue-cli only */
|
|
) {
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (render) {
|
|
options.render = render
|
|
options.staticRenderFns = staticRenderFns
|
|
options._compiled = true
|
|
}
|
|
|
|
// functional template
|
|
if (functionalTemplate) {
|
|
options.functional = true
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = 'data-v-' + scopeId
|
|
}
|
|
|
|
var hook
|
|
if (moduleIdentifier) { // server build
|
|
hook = function (context) {
|
|
// 2.3 injection
|
|
context =
|
|
context || // cached call
|
|
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
// 2.2 with runInNewContext: true
|
|
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
context = __VUE_SSR_CONTEXT__
|
|
}
|
|
// inject component styles
|
|
if (injectStyles) {
|
|
injectStyles.call(this, context)
|
|
}
|
|
// register component module identifier for async chunk inferrence
|
|
if (context && context._registeredComponents) {
|
|
context._registeredComponents.add(moduleIdentifier)
|
|
}
|
|
}
|
|
// used by ssr in case component is cached and beforeCreate
|
|
// never gets called
|
|
options._ssrRegister = hook
|
|
} else if (injectStyles) {
|
|
hook = shadowMode
|
|
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
|
: injectStyles
|
|
}
|
|
|
|
if (hook) {
|
|
if (options.functional) {
|
|
// for template-only hot-reload because in that case the render fn doesn't
|
|
// go through the normalizer
|
|
options._injectStyles = hook
|
|
// register for functioal component in vue file
|
|
var originalRender = options.render
|
|
options.render = function renderWithStyleInjection (h, context) {
|
|
hook.call(context)
|
|
return originalRender(h, context)
|
|
}
|
|
} else {
|
|
// inject component registration as beforeCreate hook
|
|
var existing = options.beforeCreate
|
|
options.beforeCreate = existing
|
|
? [].concat(existing, hook)
|
|
: [hook]
|
|
}
|
|
}
|
|
|
|
return {
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 4:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("d010");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 83:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox.vue?vue&type=template&id=d0387074&
|
|
var render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"label",
|
|
{
|
|
staticClass: "el-checkbox",
|
|
class: [
|
|
_vm.border && _vm.checkboxSize
|
|
? "el-checkbox--" + _vm.checkboxSize
|
|
: "",
|
|
{ "is-disabled": _vm.isDisabled },
|
|
{ "is-bordered": _vm.border },
|
|
{ "is-checked": _vm.isChecked }
|
|
],
|
|
attrs: { id: _vm.id }
|
|
},
|
|
[
|
|
_c(
|
|
"span",
|
|
{
|
|
staticClass: "el-checkbox__input",
|
|
class: {
|
|
"is-disabled": _vm.isDisabled,
|
|
"is-checked": _vm.isChecked,
|
|
"is-indeterminate": _vm.indeterminate,
|
|
"is-focus": _vm.focus
|
|
},
|
|
attrs: {
|
|
tabindex: _vm.indeterminate ? 0 : false,
|
|
role: _vm.indeterminate ? "checkbox" : false,
|
|
"aria-checked": _vm.indeterminate ? "mixed" : false
|
|
}
|
|
},
|
|
[
|
|
_c("span", { staticClass: "el-checkbox__inner" }),
|
|
_vm.trueLabel || _vm.falseLabel
|
|
? _c("input", {
|
|
directives: [
|
|
{
|
|
name: "model",
|
|
rawName: "v-model",
|
|
value: _vm.model,
|
|
expression: "model"
|
|
}
|
|
],
|
|
staticClass: "el-checkbox__original",
|
|
attrs: {
|
|
type: "checkbox",
|
|
"aria-hidden": _vm.indeterminate ? "true" : "false",
|
|
name: _vm.name,
|
|
disabled: _vm.isDisabled,
|
|
"true-value": _vm.trueLabel,
|
|
"false-value": _vm.falseLabel
|
|
},
|
|
domProps: {
|
|
checked: Array.isArray(_vm.model)
|
|
? _vm._i(_vm.model, null) > -1
|
|
: _vm._q(_vm.model, _vm.trueLabel)
|
|
},
|
|
on: {
|
|
change: [
|
|
function($event) {
|
|
var $$a = _vm.model,
|
|
$$el = $event.target,
|
|
$$c = $$el.checked ? _vm.trueLabel : _vm.falseLabel
|
|
if (Array.isArray($$a)) {
|
|
var $$v = null,
|
|
$$i = _vm._i($$a, $$v)
|
|
if ($$el.checked) {
|
|
$$i < 0 && (_vm.model = $$a.concat([$$v]))
|
|
} else {
|
|
$$i > -1 &&
|
|
(_vm.model = $$a
|
|
.slice(0, $$i)
|
|
.concat($$a.slice($$i + 1)))
|
|
}
|
|
} else {
|
|
_vm.model = $$c
|
|
}
|
|
},
|
|
_vm.handleChange
|
|
],
|
|
focus: function($event) {
|
|
_vm.focus = true
|
|
},
|
|
blur: function($event) {
|
|
_vm.focus = false
|
|
}
|
|
}
|
|
})
|
|
: _c("input", {
|
|
directives: [
|
|
{
|
|
name: "model",
|
|
rawName: "v-model",
|
|
value: _vm.model,
|
|
expression: "model"
|
|
}
|
|
],
|
|
staticClass: "el-checkbox__original",
|
|
attrs: {
|
|
type: "checkbox",
|
|
"aria-hidden": _vm.indeterminate ? "true" : "false",
|
|
disabled: _vm.isDisabled,
|
|
name: _vm.name
|
|
},
|
|
domProps: {
|
|
value: _vm.label,
|
|
checked: Array.isArray(_vm.model)
|
|
? _vm._i(_vm.model, _vm.label) > -1
|
|
: _vm.model
|
|
},
|
|
on: {
|
|
change: [
|
|
function($event) {
|
|
var $$a = _vm.model,
|
|
$$el = $event.target,
|
|
$$c = $$el.checked ? true : false
|
|
if (Array.isArray($$a)) {
|
|
var $$v = _vm.label,
|
|
$$i = _vm._i($$a, $$v)
|
|
if ($$el.checked) {
|
|
$$i < 0 && (_vm.model = $$a.concat([$$v]))
|
|
} else {
|
|
$$i > -1 &&
|
|
(_vm.model = $$a
|
|
.slice(0, $$i)
|
|
.concat($$a.slice($$i + 1)))
|
|
}
|
|
} else {
|
|
_vm.model = $$c
|
|
}
|
|
},
|
|
_vm.handleChange
|
|
],
|
|
focus: function($event) {
|
|
_vm.focus = true
|
|
},
|
|
blur: function($event) {
|
|
_vm.focus = false
|
|
}
|
|
}
|
|
})
|
|
]
|
|
),
|
|
_vm.$slots.default || _vm.label
|
|
? _c(
|
|
"span",
|
|
{ staticClass: "el-checkbox__label" },
|
|
[
|
|
_vm._t("default"),
|
|
!_vm.$slots.default ? [_vm._v(_vm._s(_vm.label))] : _vm._e()
|
|
],
|
|
2
|
|
)
|
|
: _vm._e()
|
|
]
|
|
)
|
|
}
|
|
var staticRenderFns = []
|
|
render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=template&id=d0387074&
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
|
|
var emitter_ = __webpack_require__(4);
|
|
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
/* harmony default export */ var checkboxvue_type_script_lang_js_ = ({
|
|
name: 'ElCheckbox',
|
|
|
|
mixins: [emitter_default.a],
|
|
|
|
inject: {
|
|
elForm: {
|
|
default: ''
|
|
},
|
|
elFormItem: {
|
|
default: ''
|
|
}
|
|
},
|
|
|
|
componentName: 'ElCheckbox',
|
|
|
|
data: function data() {
|
|
return {
|
|
selfModel: false,
|
|
focus: false,
|
|
isLimitExceeded: false
|
|
};
|
|
},
|
|
|
|
|
|
computed: {
|
|
model: {
|
|
get: function get() {
|
|
return this.isGroup ? this.store : this.value !== undefined ? this.value : this.selfModel;
|
|
},
|
|
set: function set(val) {
|
|
if (this.isGroup) {
|
|
this.isLimitExceeded = false;
|
|
this._checkboxGroup.min !== undefined && val.length < this._checkboxGroup.min && (this.isLimitExceeded = true);
|
|
|
|
this._checkboxGroup.max !== undefined && val.length > this._checkboxGroup.max && (this.isLimitExceeded = true);
|
|
|
|
this.isLimitExceeded === false && this.dispatch('ElCheckboxGroup', 'input', [val]);
|
|
} else {
|
|
this.$emit('input', val);
|
|
this.selfModel = val;
|
|
}
|
|
}
|
|
},
|
|
|
|
isChecked: function isChecked() {
|
|
if ({}.toString.call(this.model) === '[object Boolean]') {
|
|
return this.model;
|
|
} else if (Array.isArray(this.model)) {
|
|
return this.model.indexOf(this.label) > -1;
|
|
} else if (this.model !== null && this.model !== undefined) {
|
|
return this.model === this.trueLabel;
|
|
}
|
|
},
|
|
isGroup: function isGroup() {
|
|
var parent = this.$parent;
|
|
while (parent) {
|
|
if (parent.$options.componentName !== 'ElCheckboxGroup') {
|
|
parent = parent.$parent;
|
|
} else {
|
|
this._checkboxGroup = parent;
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
},
|
|
store: function store() {
|
|
return this._checkboxGroup ? this._checkboxGroup.value : this.value;
|
|
},
|
|
|
|
|
|
/* used to make the isDisabled judgment under max/min props */
|
|
isLimitDisabled: function isLimitDisabled() {
|
|
var _checkboxGroup = this._checkboxGroup,
|
|
max = _checkboxGroup.max,
|
|
min = _checkboxGroup.min;
|
|
|
|
return !!(max || min) && this.model.length >= max && !this.isChecked || this.model.length <= min && this.isChecked;
|
|
},
|
|
isDisabled: function isDisabled() {
|
|
return this.isGroup ? this._checkboxGroup.disabled || this.disabled || (this.elForm || {}).disabled || this.isLimitDisabled : this.disabled || (this.elForm || {}).disabled;
|
|
},
|
|
_elFormItemSize: function _elFormItemSize() {
|
|
return (this.elFormItem || {}).elFormItemSize;
|
|
},
|
|
checkboxSize: function checkboxSize() {
|
|
var temCheckboxSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
|
|
return this.isGroup ? this._checkboxGroup.checkboxGroupSize || temCheckboxSize : temCheckboxSize;
|
|
}
|
|
},
|
|
|
|
props: {
|
|
value: {},
|
|
label: {},
|
|
indeterminate: Boolean,
|
|
disabled: Boolean,
|
|
checked: Boolean,
|
|
name: String,
|
|
trueLabel: [String, Number],
|
|
falseLabel: [String, Number],
|
|
id: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
|
|
controls: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
|
|
border: Boolean,
|
|
size: String
|
|
},
|
|
|
|
methods: {
|
|
addToStore: function addToStore() {
|
|
if (Array.isArray(this.model) && this.model.indexOf(this.label) === -1) {
|
|
this.model.push(this.label);
|
|
} else {
|
|
this.model = this.trueLabel || true;
|
|
}
|
|
},
|
|
handleChange: function handleChange(ev) {
|
|
var _this = this;
|
|
|
|
if (this.isLimitExceeded) return;
|
|
var value = void 0;
|
|
if (ev.target.checked) {
|
|
value = this.trueLabel === undefined ? true : this.trueLabel;
|
|
} else {
|
|
value = this.falseLabel === undefined ? false : this.falseLabel;
|
|
}
|
|
this.$emit('change', value, ev);
|
|
this.$nextTick(function () {
|
|
if (_this.isGroup) {
|
|
_this.dispatch('ElCheckboxGroup', 'change', [_this._checkboxGroup.value]);
|
|
}
|
|
});
|
|
}
|
|
},
|
|
|
|
created: function created() {
|
|
this.checked && this.addToStore();
|
|
},
|
|
mounted: function mounted() {
|
|
// 为indeterminate元素 添加aria-controls 属性
|
|
if (this.indeterminate) {
|
|
this.$el.setAttribute('aria-controls', this.controls);
|
|
}
|
|
},
|
|
|
|
|
|
watch: {
|
|
value: function value(_value) {
|
|
this.dispatch('ElFormItem', 'el.form.change', _value);
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_checkboxvue_type_script_lang_js_ = (checkboxvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
var componentNormalizer = __webpack_require__(0);
|
|
|
|
// CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
src_checkboxvue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var api; }
|
|
component.options.__file = "packages/checkbox/src/checkbox.vue"
|
|
/* harmony default export */ var src_checkbox = (component.exports);
|
|
// CONCATENATED MODULE: ./packages/checkbox/index.js
|
|
|
|
|
|
/* istanbul ignore next */
|
|
src_checkbox.install = function (Vue) {
|
|
Vue.component(src_checkbox.name, src_checkbox);
|
|
};
|
|
|
|
/* harmony default export */ var packages_checkbox = __webpack_exports__["default"] = (src_checkbox);
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "df69":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "df75":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var internalObjectKeys = __webpack_require__("ca84");
|
|
var enumBugKeys = __webpack_require__("7839");
|
|
|
|
// `Object.keys` method
|
|
// https://tc39.github.io/ecma262/#sec-object.keys
|
|
module.exports = Object.keys || function keys(O) {
|
|
return internalObjectKeys(O, enumBugKeys);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "dfe5":
|
|
/***/ (function(module, exports) {
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e198":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__("ef08");
|
|
var core = __webpack_require__("5524");
|
|
var LIBRARY = __webpack_require__("e444");
|
|
var wksExt = __webpack_require__("fcd4");
|
|
var defineProperty = __webpack_require__("1a14").f;
|
|
module.exports = function (name) {
|
|
var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
|
|
if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e24b":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var hashClear = __webpack_require__("49f4"),
|
|
hashDelete = __webpack_require__("1efc"),
|
|
hashGet = __webpack_require__("bbc0"),
|
|
hashHas = __webpack_require__("7a48"),
|
|
hashSet = __webpack_require__("2524");
|
|
|
|
/**
|
|
* Creates a hash object.
|
|
*
|
|
* @private
|
|
* @constructor
|
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
*/
|
|
function Hash(entries) {
|
|
var index = -1,
|
|
length = entries == null ? 0 : entries.length;
|
|
|
|
this.clear();
|
|
while (++index < length) {
|
|
var entry = entries[index];
|
|
this.set(entry[0], entry[1]);
|
|
}
|
|
}
|
|
|
|
// Add methods to `Hash`.
|
|
Hash.prototype.clear = hashClear;
|
|
Hash.prototype['delete'] = hashDelete;
|
|
Hash.prototype.get = hashGet;
|
|
Hash.prototype.has = hashHas;
|
|
Hash.prototype.set = hashSet;
|
|
|
|
module.exports = Hash;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e2cc":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var redefine = __webpack_require__("6eeb");
|
|
|
|
module.exports = function (target, src, options) {
|
|
for (var key in src) redefine(target, key, src[key], options);
|
|
return target;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e34a":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var META = __webpack_require__("8b1a")('meta');
|
|
var isObject = __webpack_require__("7a41");
|
|
var has = __webpack_require__("9c0e");
|
|
var setDesc = __webpack_require__("1a14").f;
|
|
var id = 0;
|
|
var isExtensible = Object.isExtensible || function () {
|
|
return true;
|
|
};
|
|
var FREEZE = !__webpack_require__("4b8b")(function () {
|
|
return isExtensible(Object.preventExtensions({}));
|
|
});
|
|
var setMeta = function (it) {
|
|
setDesc(it, META, { value: {
|
|
i: 'O' + ++id, // object ID
|
|
w: {} // weak collections IDs
|
|
} });
|
|
};
|
|
var fastKey = function (it, create) {
|
|
// return primitive with prefix
|
|
if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
|
|
if (!has(it, META)) {
|
|
// can't set metadata to uncaught frozen object
|
|
if (!isExtensible(it)) return 'F';
|
|
// not necessary to add metadata
|
|
if (!create) return 'E';
|
|
// add missing metadata
|
|
setMeta(it);
|
|
// return object ID
|
|
} return it[META].i;
|
|
};
|
|
var getWeak = function (it, create) {
|
|
if (!has(it, META)) {
|
|
// can't set metadata to uncaught frozen object
|
|
if (!isExtensible(it)) return true;
|
|
// not necessary to add metadata
|
|
if (!create) return false;
|
|
// add missing metadata
|
|
setMeta(it);
|
|
// return hash weak collections IDs
|
|
} return it[META].w;
|
|
};
|
|
// add metadata on freeze-family methods calling
|
|
var onFreeze = function (it) {
|
|
if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
|
|
return it;
|
|
};
|
|
var meta = module.exports = {
|
|
KEY: META,
|
|
NEED: false,
|
|
fastKey: fastKey,
|
|
getWeak: getWeak,
|
|
onFreeze: onFreeze
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e36a":
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_74b788e6_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7f11");
|
|
/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_74b788e6_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_74b788e6_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
|
|
/* unused harmony reexport * */
|
|
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_74b788e6_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e439":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $ = __webpack_require__("23e7");
|
|
var fails = __webpack_require__("d039");
|
|
var toIndexedObject = __webpack_require__("fc6a");
|
|
var nativeGetOwnPropertyDescriptor = __webpack_require__("06cf").f;
|
|
var DESCRIPTORS = __webpack_require__("83ab");
|
|
|
|
var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });
|
|
var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;
|
|
|
|
// `Object.getOwnPropertyDescriptor` method
|
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
|
|
$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
|
|
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
|
|
return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e444":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = true;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e450":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 114);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 0:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
|
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
function normalizeComponent (
|
|
scriptExports,
|
|
render,
|
|
staticRenderFns,
|
|
functionalTemplate,
|
|
injectStyles,
|
|
scopeId,
|
|
moduleIdentifier, /* server only */
|
|
shadowMode /* vue-cli only */
|
|
) {
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (render) {
|
|
options.render = render
|
|
options.staticRenderFns = staticRenderFns
|
|
options._compiled = true
|
|
}
|
|
|
|
// functional template
|
|
if (functionalTemplate) {
|
|
options.functional = true
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = 'data-v-' + scopeId
|
|
}
|
|
|
|
var hook
|
|
if (moduleIdentifier) { // server build
|
|
hook = function (context) {
|
|
// 2.3 injection
|
|
context =
|
|
context || // cached call
|
|
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
// 2.2 with runInNewContext: true
|
|
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
context = __VUE_SSR_CONTEXT__
|
|
}
|
|
// inject component styles
|
|
if (injectStyles) {
|
|
injectStyles.call(this, context)
|
|
}
|
|
// register component module identifier for async chunk inferrence
|
|
if (context && context._registeredComponents) {
|
|
context._registeredComponents.add(moduleIdentifier)
|
|
}
|
|
}
|
|
// used by ssr in case component is cached and beforeCreate
|
|
// never gets called
|
|
options._ssrRegister = hook
|
|
} else if (injectStyles) {
|
|
hook = shadowMode
|
|
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
|
: injectStyles
|
|
}
|
|
|
|
if (hook) {
|
|
if (options.functional) {
|
|
// for template-only hot-reload because in that case the render fn doesn't
|
|
// go through the normalizer
|
|
options._injectStyles = hook
|
|
// register for functioal component in vue file
|
|
var originalRender = options.render
|
|
options.render = function renderWithStyleInjection (h, context) {
|
|
hook.call(context)
|
|
return originalRender(h, context)
|
|
}
|
|
} else {
|
|
// inject component registration as beforeCreate hook
|
|
var existing = options.beforeCreate
|
|
options.beforeCreate = existing
|
|
? [].concat(existing, hook)
|
|
: [hook]
|
|
}
|
|
}
|
|
|
|
return {
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 10:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("f3ad");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 114:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/input-number/src/input-number.vue?vue&type=template&id=42f8cf66&
|
|
var render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"div",
|
|
{
|
|
class: [
|
|
"el-input-number",
|
|
_vm.inputNumberSize ? "el-input-number--" + _vm.inputNumberSize : "",
|
|
{ "is-disabled": _vm.inputNumberDisabled },
|
|
{ "is-without-controls": !_vm.controls },
|
|
{ "is-controls-right": _vm.controlsAtRight }
|
|
],
|
|
on: {
|
|
dragstart: function($event) {
|
|
$event.preventDefault()
|
|
}
|
|
}
|
|
},
|
|
[
|
|
_vm.controls
|
|
? _c(
|
|
"span",
|
|
{
|
|
directives: [
|
|
{
|
|
name: "repeat-click",
|
|
rawName: "v-repeat-click",
|
|
value: _vm.decrease,
|
|
expression: "decrease"
|
|
}
|
|
],
|
|
staticClass: "el-input-number__decrease",
|
|
class: { "is-disabled": _vm.minDisabled },
|
|
attrs: { role: "button" },
|
|
on: {
|
|
keydown: function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
|
|
) {
|
|
return null
|
|
}
|
|
return _vm.decrease($event)
|
|
}
|
|
}
|
|
},
|
|
[
|
|
_c("i", {
|
|
class:
|
|
"el-icon-" + (_vm.controlsAtRight ? "arrow-down" : "minus")
|
|
})
|
|
]
|
|
)
|
|
: _vm._e(),
|
|
_vm.controls
|
|
? _c(
|
|
"span",
|
|
{
|
|
directives: [
|
|
{
|
|
name: "repeat-click",
|
|
rawName: "v-repeat-click",
|
|
value: _vm.increase,
|
|
expression: "increase"
|
|
}
|
|
],
|
|
staticClass: "el-input-number__increase",
|
|
class: { "is-disabled": _vm.maxDisabled },
|
|
attrs: { role: "button" },
|
|
on: {
|
|
keydown: function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
|
|
) {
|
|
return null
|
|
}
|
|
return _vm.increase($event)
|
|
}
|
|
}
|
|
},
|
|
[
|
|
_c("i", {
|
|
class: "el-icon-" + (_vm.controlsAtRight ? "arrow-up" : "plus")
|
|
})
|
|
]
|
|
)
|
|
: _vm._e(),
|
|
_c("el-input", {
|
|
ref: "input",
|
|
attrs: {
|
|
value: _vm.displayValue,
|
|
placeholder: _vm.placeholder,
|
|
disabled: _vm.inputNumberDisabled,
|
|
size: _vm.inputNumberSize,
|
|
max: _vm.max,
|
|
min: _vm.min,
|
|
name: _vm.name,
|
|
label: _vm.label
|
|
},
|
|
on: {
|
|
blur: _vm.handleBlur,
|
|
focus: _vm.handleFocus,
|
|
input: _vm.handleInput,
|
|
change: _vm.handleInputChange
|
|
},
|
|
nativeOn: {
|
|
keydown: [
|
|
function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])
|
|
) {
|
|
return null
|
|
}
|
|
$event.preventDefault()
|
|
return _vm.increase($event)
|
|
},
|
|
function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k($event.keyCode, "down", 40, $event.key, [
|
|
"Down",
|
|
"ArrowDown"
|
|
])
|
|
) {
|
|
return null
|
|
}
|
|
$event.preventDefault()
|
|
return _vm.decrease($event)
|
|
}
|
|
]
|
|
}
|
|
})
|
|
],
|
|
1
|
|
)
|
|
}
|
|
var staticRenderFns = []
|
|
render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/input-number/src/input-number.vue?vue&type=template&id=42f8cf66&
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/input"
|
|
var input_ = __webpack_require__(10);
|
|
var input_default = /*#__PURE__*/__webpack_require__.n(input_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/focus"
|
|
var focus_ = __webpack_require__(22);
|
|
var focus_default = /*#__PURE__*/__webpack_require__.n(focus_);
|
|
|
|
// EXTERNAL MODULE: ./src/directives/repeat-click.js
|
|
var repeat_click = __webpack_require__(30);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input-number/src/input-number.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var input_numbervue_type_script_lang_js_ = ({
|
|
name: 'ElInputNumber',
|
|
mixins: [focus_default()('input')],
|
|
inject: {
|
|
elForm: {
|
|
default: ''
|
|
},
|
|
elFormItem: {
|
|
default: ''
|
|
}
|
|
},
|
|
directives: {
|
|
repeatClick: repeat_click["a" /* default */]
|
|
},
|
|
components: {
|
|
ElInput: input_default.a
|
|
},
|
|
props: {
|
|
step: {
|
|
type: Number,
|
|
default: 1
|
|
},
|
|
stepStrictly: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
max: {
|
|
type: Number,
|
|
default: Infinity
|
|
},
|
|
min: {
|
|
type: Number,
|
|
default: -Infinity
|
|
},
|
|
value: {},
|
|
disabled: Boolean,
|
|
size: String,
|
|
controls: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
controlsPosition: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
name: String,
|
|
label: String,
|
|
placeholder: String,
|
|
precision: {
|
|
type: Number,
|
|
validator: function validator(val) {
|
|
return val >= 0 && val === parseInt(val, 10);
|
|
}
|
|
}
|
|
},
|
|
data: function data() {
|
|
return {
|
|
currentValue: 0,
|
|
userInput: null
|
|
};
|
|
},
|
|
|
|
watch: {
|
|
value: {
|
|
immediate: true,
|
|
handler: function handler(value) {
|
|
var newVal = value === undefined ? value : Number(value);
|
|
if (newVal !== undefined) {
|
|
if (isNaN(newVal)) {
|
|
return;
|
|
}
|
|
|
|
if (this.stepStrictly) {
|
|
var stepPrecision = this.getPrecision(this.step);
|
|
var precisionFactor = Math.pow(10, stepPrecision);
|
|
newVal = Math.round(newVal / this.step) * precisionFactor * this.step / precisionFactor;
|
|
}
|
|
|
|
if (this.precision !== undefined) {
|
|
newVal = this.toPrecision(newVal, this.precision);
|
|
}
|
|
}
|
|
if (newVal >= this.max) newVal = this.max;
|
|
if (newVal <= this.min) newVal = this.min;
|
|
this.currentValue = newVal;
|
|
this.userInput = null;
|
|
this.$emit('input', newVal);
|
|
}
|
|
}
|
|
},
|
|
computed: {
|
|
minDisabled: function minDisabled() {
|
|
return this._decrease(this.value, this.step) < this.min;
|
|
},
|
|
maxDisabled: function maxDisabled() {
|
|
return this._increase(this.value, this.step) > this.max;
|
|
},
|
|
numPrecision: function numPrecision() {
|
|
var value = this.value,
|
|
step = this.step,
|
|
getPrecision = this.getPrecision,
|
|
precision = this.precision;
|
|
|
|
var stepPrecision = getPrecision(step);
|
|
if (precision !== undefined) {
|
|
if (stepPrecision > precision) {
|
|
console.warn('[Element Warn][InputNumber]precision should not be less than the decimal places of step');
|
|
}
|
|
return precision;
|
|
} else {
|
|
return Math.max(getPrecision(value), stepPrecision);
|
|
}
|
|
},
|
|
controlsAtRight: function controlsAtRight() {
|
|
return this.controls && this.controlsPosition === 'right';
|
|
},
|
|
_elFormItemSize: function _elFormItemSize() {
|
|
return (this.elFormItem || {}).elFormItemSize;
|
|
},
|
|
inputNumberSize: function inputNumberSize() {
|
|
return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
|
|
},
|
|
inputNumberDisabled: function inputNumberDisabled() {
|
|
return this.disabled || (this.elForm || {}).disabled;
|
|
},
|
|
displayValue: function displayValue() {
|
|
if (this.userInput !== null) {
|
|
return this.userInput;
|
|
}
|
|
|
|
var currentValue = this.currentValue;
|
|
|
|
if (typeof currentValue === 'number') {
|
|
if (this.stepStrictly) {
|
|
var stepPrecision = this.getPrecision(this.step);
|
|
var precisionFactor = Math.pow(10, stepPrecision);
|
|
currentValue = Math.round(currentValue / this.step) * precisionFactor * this.step / precisionFactor;
|
|
}
|
|
|
|
if (this.precision !== undefined) {
|
|
currentValue = currentValue.toFixed(this.precision);
|
|
}
|
|
}
|
|
|
|
return currentValue;
|
|
}
|
|
},
|
|
methods: {
|
|
toPrecision: function toPrecision(num, precision) {
|
|
if (precision === undefined) precision = this.numPrecision;
|
|
return parseFloat(Math.round(num * Math.pow(10, precision)) / Math.pow(10, precision));
|
|
},
|
|
getPrecision: function getPrecision(value) {
|
|
if (value === undefined) return 0;
|
|
var valueString = value.toString();
|
|
var dotPosition = valueString.indexOf('.');
|
|
var precision = 0;
|
|
if (dotPosition !== -1) {
|
|
precision = valueString.length - dotPosition - 1;
|
|
}
|
|
return precision;
|
|
},
|
|
_increase: function _increase(val, step) {
|
|
if (typeof val !== 'number' && val !== undefined) return this.currentValue;
|
|
|
|
var precisionFactor = Math.pow(10, this.numPrecision);
|
|
// Solve the accuracy problem of JS decimal calculation by converting the value to integer.
|
|
return this.toPrecision((precisionFactor * val + precisionFactor * step) / precisionFactor);
|
|
},
|
|
_decrease: function _decrease(val, step) {
|
|
if (typeof val !== 'number' && val !== undefined) return this.currentValue;
|
|
|
|
var precisionFactor = Math.pow(10, this.numPrecision);
|
|
|
|
return this.toPrecision((precisionFactor * val - precisionFactor * step) / precisionFactor);
|
|
},
|
|
increase: function increase() {
|
|
if (this.inputNumberDisabled || this.maxDisabled) return;
|
|
var value = this.value || 0;
|
|
var newVal = this._increase(value, this.step);
|
|
this.setCurrentValue(newVal);
|
|
},
|
|
decrease: function decrease() {
|
|
if (this.inputNumberDisabled || this.minDisabled) return;
|
|
var value = this.value || 0;
|
|
var newVal = this._decrease(value, this.step);
|
|
this.setCurrentValue(newVal);
|
|
},
|
|
handleBlur: function handleBlur(event) {
|
|
this.$emit('blur', event);
|
|
},
|
|
handleFocus: function handleFocus(event) {
|
|
this.$emit('focus', event);
|
|
},
|
|
setCurrentValue: function setCurrentValue(newVal) {
|
|
var oldVal = this.currentValue;
|
|
if (typeof newVal === 'number' && this.precision !== undefined) {
|
|
newVal = this.toPrecision(newVal, this.precision);
|
|
}
|
|
if (newVal >= this.max) newVal = this.max;
|
|
if (newVal <= this.min) newVal = this.min;
|
|
if (oldVal === newVal) return;
|
|
this.userInput = null;
|
|
this.$emit('input', newVal);
|
|
this.$emit('change', newVal, oldVal);
|
|
this.currentValue = newVal;
|
|
},
|
|
handleInput: function handleInput(value) {
|
|
this.userInput = value;
|
|
},
|
|
handleInputChange: function handleInputChange(value) {
|
|
var newVal = value === '' ? undefined : Number(value);
|
|
if (!isNaN(newVal) || value === '') {
|
|
this.setCurrentValue(newVal);
|
|
}
|
|
this.userInput = null;
|
|
},
|
|
select: function select() {
|
|
this.$refs.input.select();
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
var innerInput = this.$refs.input.$refs.input;
|
|
innerInput.setAttribute('role', 'spinbutton');
|
|
innerInput.setAttribute('aria-valuemax', this.max);
|
|
innerInput.setAttribute('aria-valuemin', this.min);
|
|
innerInput.setAttribute('aria-valuenow', this.currentValue);
|
|
innerInput.setAttribute('aria-disabled', this.inputNumberDisabled);
|
|
},
|
|
updated: function updated() {
|
|
if (!this.$refs || !this.$refs.input) return;
|
|
var innerInput = this.$refs.input.$refs.input;
|
|
innerInput.setAttribute('aria-valuenow', this.currentValue);
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/input-number/src/input-number.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_input_numbervue_type_script_lang_js_ = (input_numbervue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
var componentNormalizer = __webpack_require__(0);
|
|
|
|
// CONCATENATED MODULE: ./packages/input-number/src/input-number.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
src_input_numbervue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var api; }
|
|
component.options.__file = "packages/input-number/src/input-number.vue"
|
|
/* harmony default export */ var input_number = (component.exports);
|
|
// CONCATENATED MODULE: ./packages/input-number/index.js
|
|
|
|
|
|
/* istanbul ignore next */
|
|
input_number.install = function (Vue) {
|
|
Vue.component(input_number.name, input_number);
|
|
};
|
|
|
|
/* harmony default export */ var packages_input_number = __webpack_exports__["default"] = (input_number);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 2:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("5924");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 22:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("12f2");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 30:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony import */ var element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
/* harmony import */ var element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
|
|
|
/* harmony default export */ __webpack_exports__["a"] = ({
|
|
bind: function bind(el, binding, vnode) {
|
|
var interval = null;
|
|
var startTime = void 0;
|
|
var handler = function handler() {
|
|
return vnode.context[binding.expression].apply();
|
|
};
|
|
var clear = function clear() {
|
|
if (Date.now() - startTime < 100) {
|
|
handler();
|
|
}
|
|
clearInterval(interval);
|
|
interval = null;
|
|
};
|
|
|
|
Object(element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__["on"])(el, 'mousedown', function (e) {
|
|
if (e.button !== 0) return;
|
|
startTime = Date.now();
|
|
Object(element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__["once"])(document, 'mouseup', clear);
|
|
clearInterval(interval);
|
|
interval = setInterval(handler, 100);
|
|
});
|
|
}
|
|
});
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e452":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
var aria = aria || {};
|
|
|
|
aria.Utils = aria.Utils || {};
|
|
|
|
/**
|
|
* @desc Set focus on descendant nodes until the first focusable element is
|
|
* found.
|
|
* @param element
|
|
* DOM node for which to find the first focusable descendant.
|
|
* @returns
|
|
* true if a focusable element is found and focus is set.
|
|
*/
|
|
aria.Utils.focusFirstDescendant = function (element) {
|
|
for (var i = 0; i < element.childNodes.length; i++) {
|
|
var child = element.childNodes[i];
|
|
if (aria.Utils.attemptFocus(child) || aria.Utils.focusFirstDescendant(child)) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
};
|
|
|
|
/**
|
|
* @desc Find the last descendant node that is focusable.
|
|
* @param element
|
|
* DOM node for which to find the last focusable descendant.
|
|
* @returns
|
|
* true if a focusable element is found and focus is set.
|
|
*/
|
|
|
|
aria.Utils.focusLastDescendant = function (element) {
|
|
for (var i = element.childNodes.length - 1; i >= 0; i--) {
|
|
var child = element.childNodes[i];
|
|
if (aria.Utils.attemptFocus(child) || aria.Utils.focusLastDescendant(child)) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
};
|
|
|
|
/**
|
|
* @desc Set Attempt to set focus on the current node.
|
|
* @param element
|
|
* The node to attempt to focus on.
|
|
* @returns
|
|
* true if element is focused.
|
|
*/
|
|
aria.Utils.attemptFocus = function (element) {
|
|
if (!aria.Utils.isFocusable(element)) {
|
|
return false;
|
|
}
|
|
aria.Utils.IgnoreUtilFocusChanges = true;
|
|
try {
|
|
element.focus();
|
|
} catch (e) {}
|
|
aria.Utils.IgnoreUtilFocusChanges = false;
|
|
return document.activeElement === element;
|
|
};
|
|
|
|
aria.Utils.isFocusable = function (element) {
|
|
if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute('tabIndex') !== null) {
|
|
return true;
|
|
}
|
|
|
|
if (element.disabled) {
|
|
return false;
|
|
}
|
|
|
|
switch (element.nodeName) {
|
|
case 'A':
|
|
return !!element.href && element.rel !== 'ignore';
|
|
case 'INPUT':
|
|
return element.type !== 'hidden' && element.type !== 'file';
|
|
case 'BUTTON':
|
|
case 'SELECT':
|
|
case 'TEXTAREA':
|
|
return true;
|
|
default:
|
|
return false;
|
|
}
|
|
};
|
|
|
|
/**
|
|
* 触发一个事件
|
|
* mouseenter, mouseleave, mouseover, keyup, change, click 等
|
|
* @param {Element} elm
|
|
* @param {String} name
|
|
* @param {*} opts
|
|
*/
|
|
aria.Utils.triggerEvent = function (elm, name) {
|
|
var eventName = void 0;
|
|
|
|
if (/^mouse|click/.test(name)) {
|
|
eventName = 'MouseEvents';
|
|
} else if (/^key/.test(name)) {
|
|
eventName = 'KeyboardEvent';
|
|
} else {
|
|
eventName = 'HTMLEvents';
|
|
}
|
|
var evt = document.createEvent(eventName);
|
|
|
|
for (var _len = arguments.length, opts = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
opts[_key - 2] = arguments[_key];
|
|
}
|
|
|
|
evt.initEvent.apply(evt, [name].concat(opts));
|
|
elm.dispatchEvent ? elm.dispatchEvent(evt) : elm.fireEvent('on' + name, evt);
|
|
|
|
return elm;
|
|
};
|
|
|
|
aria.Utils.keys = {
|
|
tab: 9,
|
|
enter: 13,
|
|
space: 32,
|
|
left: 37,
|
|
up: 38,
|
|
right: 39,
|
|
down: 40,
|
|
esc: 27
|
|
};
|
|
|
|
exports.default = aria.Utils;
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e46d":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e507":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.3.1 Object.assign(target, source)
|
|
var $export = __webpack_require__("512c");
|
|
|
|
$export($export.S + $export.F, 'Object', { assign: __webpack_require__("072d") });
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e538":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var wellKnownSymbol = __webpack_require__("b622");
|
|
|
|
exports.f = wellKnownSymbol;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e5383":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__("2b3e");
|
|
|
|
/** Detect free variable `exports`. */
|
|
var freeExports = true && exports && !exports.nodeType && exports;
|
|
|
|
/** Detect free variable `module`. */
|
|
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
|
|
|
/** Detect the popular CommonJS extension `module.exports`. */
|
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
|
|
/** Built-in value references. */
|
|
var Buffer = moduleExports ? root.Buffer : undefined,
|
|
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
|
|
|
|
/**
|
|
* Creates a clone of `buffer`.
|
|
*
|
|
* @private
|
|
* @param {Buffer} buffer The buffer to clone.
|
|
* @param {boolean} [isDeep] Specify a deep clone.
|
|
* @returns {Buffer} Returns the cloned buffer.
|
|
*/
|
|
function cloneBuffer(buffer, isDeep) {
|
|
if (isDeep) {
|
|
return buffer.slice();
|
|
}
|
|
var length = buffer.length,
|
|
result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
|
|
buffer.copy(result);
|
|
return result;
|
|
}
|
|
|
|
module.exports = cloneBuffer;
|
|
|
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("62e4")(module)))
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e62d":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
|
|
exports.default = function () {
|
|
if (_vue2.default.prototype.$isServer) return 0;
|
|
if (scrollBarWidth !== undefined) return scrollBarWidth;
|
|
|
|
var outer = document.createElement('div');
|
|
outer.className = 'el-scrollbar__wrap';
|
|
outer.style.visibility = 'hidden';
|
|
outer.style.width = '100px';
|
|
outer.style.position = 'absolute';
|
|
outer.style.top = '-9999px';
|
|
document.body.appendChild(outer);
|
|
|
|
var widthNoScroll = outer.offsetWidth;
|
|
outer.style.overflow = 'scroll';
|
|
|
|
var inner = document.createElement('div');
|
|
inner.style.width = '100%';
|
|
outer.appendChild(inner);
|
|
|
|
var widthWithScroll = inner.offsetWidth;
|
|
outer.parentNode.removeChild(outer);
|
|
scrollBarWidth = widthNoScroll - widthWithScroll;
|
|
|
|
return scrollBarWidth;
|
|
};
|
|
|
|
var _vue = __webpack_require__("8bbf");
|
|
|
|
var _vue2 = _interopRequireDefault(_vue);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
var scrollBarWidth = void 0;
|
|
|
|
;
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e667":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function (exec) {
|
|
try {
|
|
return { error: false, value: exec() };
|
|
} catch (error) {
|
|
return { error: true, value: error };
|
|
}
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e6cf":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $ = __webpack_require__("23e7");
|
|
var IS_PURE = __webpack_require__("c430");
|
|
var global = __webpack_require__("da84");
|
|
var getBuiltIn = __webpack_require__("d066");
|
|
var NativePromise = __webpack_require__("fea9");
|
|
var redefine = __webpack_require__("6eeb");
|
|
var redefineAll = __webpack_require__("e2cc");
|
|
var setToStringTag = __webpack_require__("d44e");
|
|
var setSpecies = __webpack_require__("2626");
|
|
var isObject = __webpack_require__("861d");
|
|
var aFunction = __webpack_require__("1c0b");
|
|
var anInstance = __webpack_require__("19aa");
|
|
var classof = __webpack_require__("c6b6");
|
|
var inspectSource = __webpack_require__("8925");
|
|
var iterate = __webpack_require__("2266");
|
|
var checkCorrectnessOfIteration = __webpack_require__("1c7e");
|
|
var speciesConstructor = __webpack_require__("4840");
|
|
var task = __webpack_require__("2cf4").set;
|
|
var microtask = __webpack_require__("b575");
|
|
var promiseResolve = __webpack_require__("cdf9");
|
|
var hostReportErrors = __webpack_require__("44de");
|
|
var newPromiseCapabilityModule = __webpack_require__("f069");
|
|
var perform = __webpack_require__("e667");
|
|
var InternalStateModule = __webpack_require__("69f3");
|
|
var isForced = __webpack_require__("94ca");
|
|
var wellKnownSymbol = __webpack_require__("b622");
|
|
var V8_VERSION = __webpack_require__("2d00");
|
|
|
|
var SPECIES = wellKnownSymbol('species');
|
|
var PROMISE = 'Promise';
|
|
var getInternalState = InternalStateModule.get;
|
|
var setInternalState = InternalStateModule.set;
|
|
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
|
|
var PromiseConstructor = NativePromise;
|
|
var TypeError = global.TypeError;
|
|
var document = global.document;
|
|
var process = global.process;
|
|
var $fetch = getBuiltIn('fetch');
|
|
var newPromiseCapability = newPromiseCapabilityModule.f;
|
|
var newGenericPromiseCapability = newPromiseCapability;
|
|
var IS_NODE = classof(process) == 'process';
|
|
var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);
|
|
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
var REJECTION_HANDLED = 'rejectionhandled';
|
|
var PENDING = 0;
|
|
var FULFILLED = 1;
|
|
var REJECTED = 2;
|
|
var HANDLED = 1;
|
|
var UNHANDLED = 2;
|
|
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
|
|
|
|
var FORCED = isForced(PROMISE, function () {
|
|
var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);
|
|
if (!GLOBAL_CORE_JS_PROMISE) {
|
|
// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
|
// We can't detect it synchronously, so just check versions
|
|
if (V8_VERSION === 66) return true;
|
|
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
if (!IS_NODE && typeof PromiseRejectionEvent != 'function') return true;
|
|
}
|
|
// We need Promise#finally in the pure version for preventing prototype pollution
|
|
if (IS_PURE && !PromiseConstructor.prototype['finally']) return true;
|
|
// We can't use @@species feature detection in V8 since it causes
|
|
// deoptimization and performance degradation
|
|
// https://github.com/zloirock/core-js/issues/679
|
|
if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;
|
|
// Detect correctness of subclassing with @@species support
|
|
var promise = PromiseConstructor.resolve(1);
|
|
var FakePromise = function (exec) {
|
|
exec(function () { /* empty */ }, function () { /* empty */ });
|
|
};
|
|
var constructor = promise.constructor = {};
|
|
constructor[SPECIES] = FakePromise;
|
|
return !(promise.then(function () { /* empty */ }) instanceof FakePromise);
|
|
});
|
|
|
|
var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
|
|
PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
|
|
});
|
|
|
|
// helpers
|
|
var isThenable = function (it) {
|
|
var then;
|
|
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
|
|
};
|
|
|
|
var notify = function (promise, state, isReject) {
|
|
if (state.notified) return;
|
|
state.notified = true;
|
|
var chain = state.reactions;
|
|
microtask(function () {
|
|
var value = state.value;
|
|
var ok = state.state == FULFILLED;
|
|
var index = 0;
|
|
// variable length - can't use forEach
|
|
while (chain.length > index) {
|
|
var reaction = chain[index++];
|
|
var handler = ok ? reaction.ok : reaction.fail;
|
|
var resolve = reaction.resolve;
|
|
var reject = reaction.reject;
|
|
var domain = reaction.domain;
|
|
var result, then, exited;
|
|
try {
|
|
if (handler) {
|
|
if (!ok) {
|
|
if (state.rejection === UNHANDLED) onHandleUnhandled(promise, state);
|
|
state.rejection = HANDLED;
|
|
}
|
|
if (handler === true) result = value;
|
|
else {
|
|
if (domain) domain.enter();
|
|
result = handler(value); // can throw
|
|
if (domain) {
|
|
domain.exit();
|
|
exited = true;
|
|
}
|
|
}
|
|
if (result === reaction.promise) {
|
|
reject(TypeError('Promise-chain cycle'));
|
|
} else if (then = isThenable(result)) {
|
|
then.call(result, resolve, reject);
|
|
} else resolve(result);
|
|
} else reject(value);
|
|
} catch (error) {
|
|
if (domain && !exited) domain.exit();
|
|
reject(error);
|
|
}
|
|
}
|
|
state.reactions = [];
|
|
state.notified = false;
|
|
if (isReject && !state.rejection) onUnhandled(promise, state);
|
|
});
|
|
};
|
|
|
|
var dispatchEvent = function (name, promise, reason) {
|
|
var event, handler;
|
|
if (DISPATCH_EVENT) {
|
|
event = document.createEvent('Event');
|
|
event.promise = promise;
|
|
event.reason = reason;
|
|
event.initEvent(name, false, true);
|
|
global.dispatchEvent(event);
|
|
} else event = { promise: promise, reason: reason };
|
|
if (handler = global['on' + name]) handler(event);
|
|
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
|
|
};
|
|
|
|
var onUnhandled = function (promise, state) {
|
|
task.call(global, function () {
|
|
var value = state.value;
|
|
var IS_UNHANDLED = isUnhandled(state);
|
|
var result;
|
|
if (IS_UNHANDLED) {
|
|
result = perform(function () {
|
|
if (IS_NODE) {
|
|
process.emit('unhandledRejection', value, promise);
|
|
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
|
|
});
|
|
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
|
|
state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
|
|
if (result.error) throw result.value;
|
|
}
|
|
});
|
|
};
|
|
|
|
var isUnhandled = function (state) {
|
|
return state.rejection !== HANDLED && !state.parent;
|
|
};
|
|
|
|
var onHandleUnhandled = function (promise, state) {
|
|
task.call(global, function () {
|
|
if (IS_NODE) {
|
|
process.emit('rejectionHandled', promise);
|
|
} else dispatchEvent(REJECTION_HANDLED, promise, state.value);
|
|
});
|
|
};
|
|
|
|
var bind = function (fn, promise, state, unwrap) {
|
|
return function (value) {
|
|
fn(promise, state, value, unwrap);
|
|
};
|
|
};
|
|
|
|
var internalReject = function (promise, state, value, unwrap) {
|
|
if (state.done) return;
|
|
state.done = true;
|
|
if (unwrap) state = unwrap;
|
|
state.value = value;
|
|
state.state = REJECTED;
|
|
notify(promise, state, true);
|
|
};
|
|
|
|
var internalResolve = function (promise, state, value, unwrap) {
|
|
if (state.done) return;
|
|
state.done = true;
|
|
if (unwrap) state = unwrap;
|
|
try {
|
|
if (promise === value) throw TypeError("Promise can't be resolved itself");
|
|
var then = isThenable(value);
|
|
if (then) {
|
|
microtask(function () {
|
|
var wrapper = { done: false };
|
|
try {
|
|
then.call(value,
|
|
bind(internalResolve, promise, wrapper, state),
|
|
bind(internalReject, promise, wrapper, state)
|
|
);
|
|
} catch (error) {
|
|
internalReject(promise, wrapper, error, state);
|
|
}
|
|
});
|
|
} else {
|
|
state.value = value;
|
|
state.state = FULFILLED;
|
|
notify(promise, state, false);
|
|
}
|
|
} catch (error) {
|
|
internalReject(promise, { done: false }, error, state);
|
|
}
|
|
};
|
|
|
|
// constructor polyfill
|
|
if (FORCED) {
|
|
// 25.4.3.1 Promise(executor)
|
|
PromiseConstructor = function Promise(executor) {
|
|
anInstance(this, PromiseConstructor, PROMISE);
|
|
aFunction(executor);
|
|
Internal.call(this);
|
|
var state = getInternalState(this);
|
|
try {
|
|
executor(bind(internalResolve, this, state), bind(internalReject, this, state));
|
|
} catch (error) {
|
|
internalReject(this, state, error);
|
|
}
|
|
};
|
|
// eslint-disable-next-line no-unused-vars
|
|
Internal = function Promise(executor) {
|
|
setInternalState(this, {
|
|
type: PROMISE,
|
|
done: false,
|
|
notified: false,
|
|
parent: false,
|
|
reactions: [],
|
|
rejection: false,
|
|
state: PENDING,
|
|
value: undefined
|
|
});
|
|
};
|
|
Internal.prototype = redefineAll(PromiseConstructor.prototype, {
|
|
// `Promise.prototype.then` method
|
|
// https://tc39.github.io/ecma262/#sec-promise.prototype.then
|
|
then: function then(onFulfilled, onRejected) {
|
|
var state = getInternalPromiseState(this);
|
|
var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
|
|
reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
|
|
reaction.fail = typeof onRejected == 'function' && onRejected;
|
|
reaction.domain = IS_NODE ? process.domain : undefined;
|
|
state.parent = true;
|
|
state.reactions.push(reaction);
|
|
if (state.state != PENDING) notify(this, state, false);
|
|
return reaction.promise;
|
|
},
|
|
// `Promise.prototype.catch` method
|
|
// https://tc39.github.io/ecma262/#sec-promise.prototype.catch
|
|
'catch': function (onRejected) {
|
|
return this.then(undefined, onRejected);
|
|
}
|
|
});
|
|
OwnPromiseCapability = function () {
|
|
var promise = new Internal();
|
|
var state = getInternalState(promise);
|
|
this.promise = promise;
|
|
this.resolve = bind(internalResolve, promise, state);
|
|
this.reject = bind(internalReject, promise, state);
|
|
};
|
|
newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
|
|
return C === PromiseConstructor || C === PromiseWrapper
|
|
? new OwnPromiseCapability(C)
|
|
: newGenericPromiseCapability(C);
|
|
};
|
|
|
|
if (!IS_PURE && typeof NativePromise == 'function') {
|
|
nativeThen = NativePromise.prototype.then;
|
|
|
|
// wrap native Promise#then for native async functions
|
|
redefine(NativePromise.prototype, 'then', function then(onFulfilled, onRejected) {
|
|
var that = this;
|
|
return new PromiseConstructor(function (resolve, reject) {
|
|
nativeThen.call(that, resolve, reject);
|
|
}).then(onFulfilled, onRejected);
|
|
// https://github.com/zloirock/core-js/issues/640
|
|
}, { unsafe: true });
|
|
|
|
// wrap fetch result
|
|
if (typeof $fetch == 'function') $({ global: true, enumerable: true, forced: true }, {
|
|
// eslint-disable-next-line no-unused-vars
|
|
fetch: function fetch(input /* , init */) {
|
|
return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
$({ global: true, wrap: true, forced: FORCED }, {
|
|
Promise: PromiseConstructor
|
|
});
|
|
|
|
setToStringTag(PromiseConstructor, PROMISE, false, true);
|
|
setSpecies(PROMISE);
|
|
|
|
PromiseWrapper = getBuiltIn(PROMISE);
|
|
|
|
// statics
|
|
$({ target: PROMISE, stat: true, forced: FORCED }, {
|
|
// `Promise.reject` method
|
|
// https://tc39.github.io/ecma262/#sec-promise.reject
|
|
reject: function reject(r) {
|
|
var capability = newPromiseCapability(this);
|
|
capability.reject.call(undefined, r);
|
|
return capability.promise;
|
|
}
|
|
});
|
|
|
|
$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {
|
|
// `Promise.resolve` method
|
|
// https://tc39.github.io/ecma262/#sec-promise.resolve
|
|
resolve: function resolve(x) {
|
|
return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);
|
|
}
|
|
});
|
|
|
|
$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
|
|
// `Promise.all` method
|
|
// https://tc39.github.io/ecma262/#sec-promise.all
|
|
all: function all(iterable) {
|
|
var C = this;
|
|
var capability = newPromiseCapability(C);
|
|
var resolve = capability.resolve;
|
|
var reject = capability.reject;
|
|
var result = perform(function () {
|
|
var $promiseResolve = aFunction(C.resolve);
|
|
var values = [];
|
|
var counter = 0;
|
|
var remaining = 1;
|
|
iterate(iterable, function (promise) {
|
|
var index = counter++;
|
|
var alreadyCalled = false;
|
|
values.push(undefined);
|
|
remaining++;
|
|
$promiseResolve.call(C, promise).then(function (value) {
|
|
if (alreadyCalled) return;
|
|
alreadyCalled = true;
|
|
values[index] = value;
|
|
--remaining || resolve(values);
|
|
}, reject);
|
|
});
|
|
--remaining || resolve(values);
|
|
});
|
|
if (result.error) reject(result.value);
|
|
return capability.promise;
|
|
},
|
|
// `Promise.race` method
|
|
// https://tc39.github.io/ecma262/#sec-promise.race
|
|
race: function race(iterable) {
|
|
var C = this;
|
|
var capability = newPromiseCapability(C);
|
|
var reject = capability.reject;
|
|
var result = perform(function () {
|
|
var $promiseResolve = aFunction(C.resolve);
|
|
iterate(iterable, function (promise) {
|
|
$promiseResolve.call(C, promise).then(capability.resolve, reject);
|
|
});
|
|
});
|
|
if (result.error) reject(result.value);
|
|
return capability.promise;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e772":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 53);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 0:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
|
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
function normalizeComponent (
|
|
scriptExports,
|
|
render,
|
|
staticRenderFns,
|
|
functionalTemplate,
|
|
injectStyles,
|
|
scopeId,
|
|
moduleIdentifier, /* server only */
|
|
shadowMode /* vue-cli only */
|
|
) {
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (render) {
|
|
options.render = render
|
|
options.staticRenderFns = staticRenderFns
|
|
options._compiled = true
|
|
}
|
|
|
|
// functional template
|
|
if (functionalTemplate) {
|
|
options.functional = true
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = 'data-v-' + scopeId
|
|
}
|
|
|
|
var hook
|
|
if (moduleIdentifier) { // server build
|
|
hook = function (context) {
|
|
// 2.3 injection
|
|
context =
|
|
context || // cached call
|
|
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
// 2.2 with runInNewContext: true
|
|
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
context = __VUE_SSR_CONTEXT__
|
|
}
|
|
// inject component styles
|
|
if (injectStyles) {
|
|
injectStyles.call(this, context)
|
|
}
|
|
// register component module identifier for async chunk inferrence
|
|
if (context && context._registeredComponents) {
|
|
context._registeredComponents.add(moduleIdentifier)
|
|
}
|
|
}
|
|
// used by ssr in case component is cached and beforeCreate
|
|
// never gets called
|
|
options._ssrRegister = hook
|
|
} else if (injectStyles) {
|
|
hook = shadowMode
|
|
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
|
: injectStyles
|
|
}
|
|
|
|
if (hook) {
|
|
if (options.functional) {
|
|
// for template-only hot-reload because in that case the render fn doesn't
|
|
// go through the normalizer
|
|
options._injectStyles = hook
|
|
// register for functioal component in vue file
|
|
var originalRender = options.render
|
|
options.render = function renderWithStyleInjection (h, context) {
|
|
hook.call(context)
|
|
return originalRender(h, context)
|
|
}
|
|
} else {
|
|
// inject component registration as beforeCreate hook
|
|
var existing = options.beforeCreate
|
|
options.beforeCreate = existing
|
|
? [].concat(existing, hook)
|
|
: [hook]
|
|
}
|
|
}
|
|
|
|
return {
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 3:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("8122");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 34:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option.vue?vue&type=template&id=7a44c642&
|
|
var render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"li",
|
|
{
|
|
directives: [
|
|
{
|
|
name: "show",
|
|
rawName: "v-show",
|
|
value: _vm.visible,
|
|
expression: "visible"
|
|
}
|
|
],
|
|
staticClass: "el-select-dropdown__item",
|
|
class: {
|
|
selected: _vm.itemSelected,
|
|
"is-disabled": _vm.disabled || _vm.groupDisabled || _vm.limitReached,
|
|
hover: _vm.hover
|
|
},
|
|
on: {
|
|
mouseenter: _vm.hoverItem,
|
|
click: function($event) {
|
|
$event.stopPropagation()
|
|
return _vm.selectOptionClick($event)
|
|
}
|
|
}
|
|
},
|
|
[_vm._t("default", [_c("span", [_vm._v(_vm._s(_vm.currentLabel))])])],
|
|
2
|
|
)
|
|
}
|
|
var staticRenderFns = []
|
|
render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=template&id=7a44c642&
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
|
|
var emitter_ = __webpack_require__(4);
|
|
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/util"
|
|
var util_ = __webpack_require__(3);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option.vue?vue&type=script&lang=js&
|
|
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; };
|
|
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var optionvue_type_script_lang_js_ = ({
|
|
mixins: [emitter_default.a],
|
|
|
|
name: 'ElOption',
|
|
|
|
componentName: 'ElOption',
|
|
|
|
inject: ['select'],
|
|
|
|
props: {
|
|
value: {
|
|
required: true
|
|
},
|
|
label: [String, Number],
|
|
created: Boolean,
|
|
disabled: {
|
|
type: Boolean,
|
|
default: false
|
|
}
|
|
},
|
|
|
|
data: function data() {
|
|
return {
|
|
index: -1,
|
|
groupDisabled: false,
|
|
visible: true,
|
|
hitState: false,
|
|
hover: false
|
|
};
|
|
},
|
|
|
|
|
|
computed: {
|
|
isObject: function isObject() {
|
|
return Object.prototype.toString.call(this.value).toLowerCase() === '[object object]';
|
|
},
|
|
currentLabel: function currentLabel() {
|
|
return this.label || (this.isObject ? '' : this.value);
|
|
},
|
|
currentValue: function currentValue() {
|
|
return this.value || this.label || '';
|
|
},
|
|
itemSelected: function itemSelected() {
|
|
if (!this.select.multiple) {
|
|
return this.isEqual(this.value, this.select.value);
|
|
} else {
|
|
return this.contains(this.select.value, this.value);
|
|
}
|
|
},
|
|
limitReached: function limitReached() {
|
|
if (this.select.multiple) {
|
|
return !this.itemSelected && (this.select.value || []).length >= this.select.multipleLimit && this.select.multipleLimit > 0;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
},
|
|
|
|
watch: {
|
|
currentLabel: function currentLabel() {
|
|
if (!this.created && !this.select.remote) this.dispatch('ElSelect', 'setSelected');
|
|
},
|
|
value: function value(val, oldVal) {
|
|
var _select = this.select,
|
|
remote = _select.remote,
|
|
valueKey = _select.valueKey;
|
|
|
|
if (!this.created && !remote) {
|
|
if (valueKey && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' && (typeof oldVal === 'undefined' ? 'undefined' : _typeof(oldVal)) === 'object' && val[valueKey] === oldVal[valueKey]) {
|
|
return;
|
|
}
|
|
this.dispatch('ElSelect', 'setSelected');
|
|
}
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
isEqual: function isEqual(a, b) {
|
|
if (!this.isObject) {
|
|
return a === b;
|
|
} else {
|
|
var valueKey = this.select.valueKey;
|
|
return Object(util_["getValueByPath"])(a, valueKey) === Object(util_["getValueByPath"])(b, valueKey);
|
|
}
|
|
},
|
|
contains: function contains() {
|
|
var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
var target = arguments[1];
|
|
|
|
if (!this.isObject) {
|
|
return arr && arr.indexOf(target) > -1;
|
|
} else {
|
|
var valueKey = this.select.valueKey;
|
|
return arr && arr.some(function (item) {
|
|
return Object(util_["getValueByPath"])(item, valueKey) === Object(util_["getValueByPath"])(target, valueKey);
|
|
});
|
|
}
|
|
},
|
|
handleGroupDisabled: function handleGroupDisabled(val) {
|
|
this.groupDisabled = val;
|
|
},
|
|
hoverItem: function hoverItem() {
|
|
if (!this.disabled && !this.groupDisabled) {
|
|
this.select.hoverIndex = this.select.options.indexOf(this);
|
|
}
|
|
},
|
|
selectOptionClick: function selectOptionClick() {
|
|
if (this.disabled !== true && this.groupDisabled !== true) {
|
|
this.dispatch('ElSelect', 'handleOptionClick', [this, true]);
|
|
}
|
|
},
|
|
queryChange: function queryChange(query) {
|
|
this.visible = new RegExp(Object(util_["escapeRegexpString"])(query), 'i').test(this.currentLabel) || this.created;
|
|
if (!this.visible) {
|
|
this.select.filteredOptionsCount--;
|
|
}
|
|
}
|
|
},
|
|
|
|
created: function created() {
|
|
this.select.options.push(this);
|
|
this.select.cachedOptions.push(this);
|
|
this.select.optionsCount++;
|
|
this.select.filteredOptionsCount++;
|
|
|
|
this.$on('queryChange', this.queryChange);
|
|
this.$on('handleGroupDisabled', this.handleGroupDisabled);
|
|
},
|
|
beforeDestroy: function beforeDestroy() {
|
|
var _select2 = this.select,
|
|
selected = _select2.selected,
|
|
multiple = _select2.multiple;
|
|
|
|
var selectedOptions = multiple ? selected : [selected];
|
|
var index = this.select.cachedOptions.indexOf(this);
|
|
var selectedIndex = selectedOptions.indexOf(this);
|
|
|
|
// if option is not selected, remove it from cache
|
|
if (index > -1 && selectedIndex < 0) {
|
|
this.select.cachedOptions.splice(index, 1);
|
|
}
|
|
this.select.onOptionDestroy(this.select.options.indexOf(this));
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_optionvue_type_script_lang_js_ = (optionvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
var componentNormalizer = __webpack_require__(0);
|
|
|
|
// CONCATENATED MODULE: ./packages/select/src/option.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
src_optionvue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var api; }
|
|
component.options.__file = "packages/select/src/option.vue"
|
|
/* harmony default export */ var src_option = __webpack_exports__["a"] = (component.exports);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 4:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("d010");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 53:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var _select_src_option__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34);
|
|
|
|
|
|
/* istanbul ignore next */
|
|
_select_src_option__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].install = function (Vue) {
|
|
Vue.component(_select_src_option__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].name, _select_src_option__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
|
|
};
|
|
|
|
/* harmony default export */ __webpack_exports__["default"] = (_select_src_option__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e893":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var has = __webpack_require__("5135");
|
|
var ownKeys = __webpack_require__("56ef");
|
|
var getOwnPropertyDescriptorModule = __webpack_require__("06cf");
|
|
var definePropertyModule = __webpack_require__("9bf2");
|
|
|
|
module.exports = function (target, source) {
|
|
var keys = ownKeys(source);
|
|
var defineProperty = definePropertyModule.f;
|
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
for (var i = 0; i < keys.length; i++) {
|
|
var key = keys[i];
|
|
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
}
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e8b5":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var classof = __webpack_require__("c6b6");
|
|
|
|
// `IsArray` abstract operation
|
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
module.exports = Array.isArray || function isArray(arg) {
|
|
return classof(arg) == 'Array';
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e95a":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var wellKnownSymbol = __webpack_require__("b622");
|
|
var Iterators = __webpack_require__("3f8c");
|
|
|
|
var ITERATOR = wellKnownSymbol('iterator');
|
|
var ArrayPrototype = Array.prototype;
|
|
|
|
// check on default Array iterator
|
|
module.exports = function (it) {
|
|
return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "e974":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
|
|
var _vue = __webpack_require__("8bbf");
|
|
|
|
var _vue2 = _interopRequireDefault(_vue);
|
|
|
|
var _popup = __webpack_require__("5128");
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
var PopperJS = _vue2.default.prototype.$isServer ? function () {} : __webpack_require__("6167");
|
|
var stop = function stop(e) {
|
|
return e.stopPropagation();
|
|
};
|
|
|
|
/**
|
|
* @param {HTMLElement} [reference=$refs.reference] - The reference element used to position the popper.
|
|
* @param {HTMLElement} [popper=$refs.popper] - The HTML element used as popper, or a configuration used to generate the popper.
|
|
* @param {String} [placement=button] - Placement of the popper accepted values: top(-start, -end), right(-start, -end), bottom(-start, -end), left(-start, -end)
|
|
* @param {Number} [offset=0] - Amount of pixels the popper will be shifted (can be negative).
|
|
* @param {Boolean} [visible=false] Visibility of the popup element.
|
|
* @param {Boolean} [visible-arrow=false] Visibility of the arrow, no style.
|
|
*/
|
|
exports.default = {
|
|
props: {
|
|
transformOrigin: {
|
|
type: [Boolean, String],
|
|
default: true
|
|
},
|
|
placement: {
|
|
type: String,
|
|
default: 'bottom'
|
|
},
|
|
boundariesPadding: {
|
|
type: Number,
|
|
default: 5
|
|
},
|
|
reference: {},
|
|
popper: {},
|
|
offset: {
|
|
default: 0
|
|
},
|
|
value: Boolean,
|
|
visibleArrow: Boolean,
|
|
arrowOffset: {
|
|
type: Number,
|
|
default: 35
|
|
},
|
|
appendToBody: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
popperOptions: {
|
|
type: Object,
|
|
default: function _default() {
|
|
return {
|
|
gpuAcceleration: false
|
|
};
|
|
}
|
|
}
|
|
},
|
|
|
|
data: function data() {
|
|
return {
|
|
showPopper: false,
|
|
currentPlacement: ''
|
|
};
|
|
},
|
|
|
|
|
|
watch: {
|
|
value: {
|
|
immediate: true,
|
|
handler: function handler(val) {
|
|
this.showPopper = val;
|
|
this.$emit('input', val);
|
|
}
|
|
},
|
|
|
|
showPopper: function showPopper(val) {
|
|
if (this.disabled) return;
|
|
val ? this.updatePopper() : this.destroyPopper();
|
|
this.$emit('input', val);
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
createPopper: function createPopper() {
|
|
var _this = this;
|
|
|
|
if (this.$isServer) return;
|
|
this.currentPlacement = this.currentPlacement || this.placement;
|
|
if (!/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement)) {
|
|
return;
|
|
}
|
|
|
|
var options = this.popperOptions;
|
|
var popper = this.popperElm = this.popperElm || this.popper || this.$refs.popper;
|
|
var reference = this.referenceElm = this.referenceElm || this.reference || this.$refs.reference;
|
|
|
|
if (!reference && this.$slots.reference && this.$slots.reference[0]) {
|
|
reference = this.referenceElm = this.$slots.reference[0].elm;
|
|
}
|
|
|
|
if (!popper || !reference) return;
|
|
if (this.visibleArrow) this.appendArrow(popper);
|
|
if (this.appendToBody) document.body.appendChild(this.popperElm);
|
|
if (this.popperJS && this.popperJS.destroy) {
|
|
this.popperJS.destroy();
|
|
}
|
|
|
|
options.placement = this.currentPlacement;
|
|
options.offset = this.offset;
|
|
options.arrowOffset = this.arrowOffset;
|
|
this.popperJS = new PopperJS(reference, popper, options);
|
|
this.popperJS.onCreate(function (_) {
|
|
_this.$emit('created', _this);
|
|
_this.resetTransformOrigin();
|
|
_this.$nextTick(_this.updatePopper);
|
|
});
|
|
if (typeof options.onUpdate === 'function') {
|
|
this.popperJS.onUpdate(options.onUpdate);
|
|
}
|
|
this.popperJS._popper.style.zIndex = _popup.PopupManager.nextZIndex();
|
|
this.popperElm.addEventListener('click', stop);
|
|
},
|
|
updatePopper: function updatePopper() {
|
|
var popperJS = this.popperJS;
|
|
if (popperJS) {
|
|
popperJS.update();
|
|
if (popperJS._popper) {
|
|
popperJS._popper.style.zIndex = _popup.PopupManager.nextZIndex();
|
|
}
|
|
} else {
|
|
this.createPopper();
|
|
}
|
|
},
|
|
doDestroy: function doDestroy(forceDestroy) {
|
|
/* istanbul ignore if */
|
|
if (!this.popperJS || this.showPopper && !forceDestroy) return;
|
|
this.popperJS.destroy();
|
|
this.popperJS = null;
|
|
},
|
|
destroyPopper: function destroyPopper() {
|
|
if (this.popperJS) {
|
|
this.resetTransformOrigin();
|
|
}
|
|
},
|
|
resetTransformOrigin: function resetTransformOrigin() {
|
|
if (!this.transformOrigin) return;
|
|
var placementMap = {
|
|
top: 'bottom',
|
|
bottom: 'top',
|
|
left: 'right',
|
|
right: 'left'
|
|
};
|
|
var placement = this.popperJS._popper.getAttribute('x-placement').split('-')[0];
|
|
var origin = placementMap[placement];
|
|
this.popperJS._popper.style.transformOrigin = typeof this.transformOrigin === 'string' ? this.transformOrigin : ['top', 'bottom'].indexOf(placement) > -1 ? 'center ' + origin : origin + ' center';
|
|
},
|
|
appendArrow: function appendArrow(element) {
|
|
var hash = void 0;
|
|
if (this.appended) {
|
|
return;
|
|
}
|
|
|
|
this.appended = true;
|
|
|
|
for (var item in element.attributes) {
|
|
if (/^_v-/.test(element.attributes[item].name)) {
|
|
hash = element.attributes[item].name;
|
|
break;
|
|
}
|
|
}
|
|
|
|
var arrow = document.createElement('div');
|
|
|
|
if (hash) {
|
|
arrow.setAttribute(hash, '');
|
|
}
|
|
arrow.setAttribute('x-arrow', '');
|
|
arrow.className = 'popper__arrow';
|
|
element.appendChild(arrow);
|
|
}
|
|
},
|
|
|
|
beforeDestroy: function beforeDestroy() {
|
|
this.doDestroy(true);
|
|
if (this.popperElm && this.popperElm.parentNode === document.body) {
|
|
this.popperElm.removeEventListener('click', stop);
|
|
document.body.removeChild(this.popperElm);
|
|
}
|
|
},
|
|
|
|
|
|
// call destroy in keep-alive mode
|
|
deactivated: function deactivated() {
|
|
this.$options.beforeDestroy[0].call(this);
|
|
}
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "ea34":
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function (done, value) {
|
|
return { value: value, done: !!done };
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "eac5":
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/**
|
|
* Checks if `value` is likely a prototype object.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
*/
|
|
function isPrototype(value) {
|
|
var Ctor = value && value.constructor,
|
|
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
|
|
|
return value === proto;
|
|
}
|
|
|
|
module.exports = isPrototype;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "ec69":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arrayLikeKeys = __webpack_require__("6fcd"),
|
|
baseKeys = __webpack_require__("03dd"),
|
|
isArrayLike = __webpack_require__("30c9");
|
|
|
|
/**
|
|
* Creates an array of the own enumerable property names of `object`.
|
|
*
|
|
* **Note:** Non-object values are coerced to objects. See the
|
|
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
* for more details.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property names.
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* this.b = 2;
|
|
* }
|
|
*
|
|
* Foo.prototype.c = 3;
|
|
*
|
|
* _.keys(new Foo);
|
|
* // => ['a', 'b'] (iteration order is not guaranteed)
|
|
*
|
|
* _.keys('hi');
|
|
* // => ['0', '1']
|
|
*/
|
|
function keys(object) {
|
|
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
}
|
|
|
|
module.exports = keys;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "ec8c":
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* This function is like
|
|
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
* except that it includes inherited enumerable properties.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property names.
|
|
*/
|
|
function nativeKeysIn(object) {
|
|
var result = [];
|
|
if (object != null) {
|
|
for (var key in Object(object)) {
|
|
result.push(key);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = nativeKeysIn;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "eedf":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 97);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 0:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
|
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
function normalizeComponent (
|
|
scriptExports,
|
|
render,
|
|
staticRenderFns,
|
|
functionalTemplate,
|
|
injectStyles,
|
|
scopeId,
|
|
moduleIdentifier, /* server only */
|
|
shadowMode /* vue-cli only */
|
|
) {
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (render) {
|
|
options.render = render
|
|
options.staticRenderFns = staticRenderFns
|
|
options._compiled = true
|
|
}
|
|
|
|
// functional template
|
|
if (functionalTemplate) {
|
|
options.functional = true
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = 'data-v-' + scopeId
|
|
}
|
|
|
|
var hook
|
|
if (moduleIdentifier) { // server build
|
|
hook = function (context) {
|
|
// 2.3 injection
|
|
context =
|
|
context || // cached call
|
|
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
// 2.2 with runInNewContext: true
|
|
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
context = __VUE_SSR_CONTEXT__
|
|
}
|
|
// inject component styles
|
|
if (injectStyles) {
|
|
injectStyles.call(this, context)
|
|
}
|
|
// register component module identifier for async chunk inferrence
|
|
if (context && context._registeredComponents) {
|
|
context._registeredComponents.add(moduleIdentifier)
|
|
}
|
|
}
|
|
// used by ssr in case component is cached and beforeCreate
|
|
// never gets called
|
|
options._ssrRegister = hook
|
|
} else if (injectStyles) {
|
|
hook = shadowMode
|
|
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
|
: injectStyles
|
|
}
|
|
|
|
if (hook) {
|
|
if (options.functional) {
|
|
// for template-only hot-reload because in that case the render fn doesn't
|
|
// go through the normalizer
|
|
options._injectStyles = hook
|
|
// register for functioal component in vue file
|
|
var originalRender = options.render
|
|
options.render = function renderWithStyleInjection (h, context) {
|
|
hook.call(context)
|
|
return originalRender(h, context)
|
|
}
|
|
} else {
|
|
// inject component registration as beforeCreate hook
|
|
var existing = options.beforeCreate
|
|
options.beforeCreate = existing
|
|
? [].concat(existing, hook)
|
|
: [hook]
|
|
}
|
|
}
|
|
|
|
return {
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 97:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button.vue?vue&type=template&id=ca859fb4&
|
|
var render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"button",
|
|
{
|
|
staticClass: "el-button",
|
|
class: [
|
|
_vm.type ? "el-button--" + _vm.type : "",
|
|
_vm.buttonSize ? "el-button--" + _vm.buttonSize : "",
|
|
{
|
|
"is-disabled": _vm.buttonDisabled,
|
|
"is-loading": _vm.loading,
|
|
"is-plain": _vm.plain,
|
|
"is-round": _vm.round,
|
|
"is-circle": _vm.circle
|
|
}
|
|
],
|
|
attrs: {
|
|
disabled: _vm.buttonDisabled || _vm.loading,
|
|
autofocus: _vm.autofocus,
|
|
type: _vm.nativeType
|
|
},
|
|
on: { click: _vm.handleClick }
|
|
},
|
|
[
|
|
_vm.loading ? _c("i", { staticClass: "el-icon-loading" }) : _vm._e(),
|
|
_vm.icon && !_vm.loading ? _c("i", { class: _vm.icon }) : _vm._e(),
|
|
_vm.$slots.default ? _c("span", [_vm._t("default")], 2) : _vm._e()
|
|
]
|
|
)
|
|
}
|
|
var staticRenderFns = []
|
|
render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=template&id=ca859fb4&
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
/* harmony default export */ var buttonvue_type_script_lang_js_ = ({
|
|
name: 'ElButton',
|
|
|
|
inject: {
|
|
elForm: {
|
|
default: ''
|
|
},
|
|
elFormItem: {
|
|
default: ''
|
|
}
|
|
},
|
|
|
|
props: {
|
|
type: {
|
|
type: String,
|
|
default: 'default'
|
|
},
|
|
size: String,
|
|
icon: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
nativeType: {
|
|
type: String,
|
|
default: 'button'
|
|
},
|
|
loading: Boolean,
|
|
disabled: Boolean,
|
|
plain: Boolean,
|
|
autofocus: Boolean,
|
|
round: Boolean,
|
|
circle: Boolean
|
|
},
|
|
|
|
computed: {
|
|
_elFormItemSize: function _elFormItemSize() {
|
|
return (this.elFormItem || {}).elFormItemSize;
|
|
},
|
|
buttonSize: function buttonSize() {
|
|
return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
|
|
},
|
|
buttonDisabled: function buttonDisabled() {
|
|
return this.disabled || (this.elForm || {}).disabled;
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
handleClick: function handleClick(evt) {
|
|
this.$emit('click', evt);
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_buttonvue_type_script_lang_js_ = (buttonvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
var componentNormalizer = __webpack_require__(0);
|
|
|
|
// CONCATENATED MODULE: ./packages/button/src/button.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
src_buttonvue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var api; }
|
|
component.options.__file = "packages/button/src/button.vue"
|
|
/* harmony default export */ var src_button = (component.exports);
|
|
// CONCATENATED MODULE: ./packages/button/index.js
|
|
|
|
|
|
/* istanbul ignore next */
|
|
src_button.install = function (Vue) {
|
|
Vue.component(src_button.name, src_button);
|
|
};
|
|
|
|
/* harmony default export */ var packages_button = __webpack_exports__["default"] = (src_button);
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "ef08":
|
|
/***/ (function(module, exports) {
|
|
|
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
|
? window : typeof self != 'undefined' && self.Math == Math ? self
|
|
// eslint-disable-next-line no-new-func
|
|
: Function('return this')();
|
|
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "efb6":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var ListCache = __webpack_require__("5e2e");
|
|
|
|
/**
|
|
* Removes all key-value entries from the stack.
|
|
*
|
|
* @private
|
|
* @name clear
|
|
* @memberOf Stack
|
|
*/
|
|
function stackClear() {
|
|
this.__data__ = new ListCache;
|
|
this.size = 0;
|
|
}
|
|
|
|
module.exports = stackClear;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "f00f":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "f069":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var aFunction = __webpack_require__("1c0b");
|
|
|
|
var PromiseCapability = function (C) {
|
|
var resolve, reject;
|
|
this.promise = new C(function ($$resolve, $$reject) {
|
|
if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
|
|
resolve = $$resolve;
|
|
reject = $$reject;
|
|
});
|
|
this.resolve = aFunction(resolve);
|
|
this.reject = aFunction(reject);
|
|
};
|
|
|
|
// 25.4.1.5 NewPromiseCapability(C)
|
|
module.exports.f = function (C) {
|
|
return new PromiseCapability(C);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "f0d9":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
exports.__esModule = true;
|
|
exports.default = {
|
|
el: {
|
|
colorpicker: {
|
|
confirm: '确定',
|
|
clear: '清空'
|
|
},
|
|
datepicker: {
|
|
now: '此刻',
|
|
today: '今天',
|
|
cancel: '取消',
|
|
clear: '清空',
|
|
confirm: '确定',
|
|
selectDate: '选择日期',
|
|
selectTime: '选择时间',
|
|
startDate: '开始日期',
|
|
startTime: '开始时间',
|
|
endDate: '结束日期',
|
|
endTime: '结束时间',
|
|
prevYear: '前一年',
|
|
nextYear: '后一年',
|
|
prevMonth: '上个月',
|
|
nextMonth: '下个月',
|
|
year: '年',
|
|
month1: '1 月',
|
|
month2: '2 月',
|
|
month3: '3 月',
|
|
month4: '4 月',
|
|
month5: '5 月',
|
|
month6: '6 月',
|
|
month7: '7 月',
|
|
month8: '8 月',
|
|
month9: '9 月',
|
|
month10: '10 月',
|
|
month11: '11 月',
|
|
month12: '12 月',
|
|
// week: '周次',
|
|
weeks: {
|
|
sun: '日',
|
|
mon: '一',
|
|
tue: '二',
|
|
wed: '三',
|
|
thu: '四',
|
|
fri: '五',
|
|
sat: '六'
|
|
},
|
|
months: {
|
|
jan: '一月',
|
|
feb: '二月',
|
|
mar: '三月',
|
|
apr: '四月',
|
|
may: '五月',
|
|
jun: '六月',
|
|
jul: '七月',
|
|
aug: '八月',
|
|
sep: '九月',
|
|
oct: '十月',
|
|
nov: '十一月',
|
|
dec: '十二月'
|
|
}
|
|
},
|
|
select: {
|
|
loading: '加载中',
|
|
noMatch: '无匹配数据',
|
|
noData: '无数据',
|
|
placeholder: '请选择'
|
|
},
|
|
cascader: {
|
|
noMatch: '无匹配数据',
|
|
loading: '加载中',
|
|
placeholder: '请选择',
|
|
noData: '暂无数据'
|
|
},
|
|
pagination: {
|
|
goto: '前往',
|
|
pagesize: '条/页',
|
|
total: '共 {total} 条',
|
|
pageClassifier: '页'
|
|
},
|
|
messagebox: {
|
|
title: '提示',
|
|
confirm: '确定',
|
|
cancel: '取消',
|
|
error: '输入的数据不合法!'
|
|
},
|
|
upload: {
|
|
deleteTip: '按 delete 键可删除',
|
|
delete: '删除',
|
|
preview: '查看图片',
|
|
continue: '继续上传'
|
|
},
|
|
table: {
|
|
emptyText: '暂无数据',
|
|
confirmFilter: '筛选',
|
|
resetFilter: '重置',
|
|
clearFilter: '全部',
|
|
sumText: '合计'
|
|
},
|
|
tree: {
|
|
emptyText: '暂无数据'
|
|
},
|
|
transfer: {
|
|
noMatch: '无匹配数据',
|
|
noData: '无数据',
|
|
titles: ['列表 1', '列表 2'],
|
|
filterPlaceholder: '请输入搜索内容',
|
|
noCheckedFormat: '共 {total} 项',
|
|
hasCheckedFormat: '已选 {checked}/{total} 项'
|
|
},
|
|
image: {
|
|
error: '加载失败'
|
|
},
|
|
pageHeader: {
|
|
title: '返回'
|
|
},
|
|
popconfirm: {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消'
|
|
}
|
|
}
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "f0fb":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "f3ad":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 76);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 0:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
|
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
function normalizeComponent (
|
|
scriptExports,
|
|
render,
|
|
staticRenderFns,
|
|
functionalTemplate,
|
|
injectStyles,
|
|
scopeId,
|
|
moduleIdentifier, /* server only */
|
|
shadowMode /* vue-cli only */
|
|
) {
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (render) {
|
|
options.render = render
|
|
options.staticRenderFns = staticRenderFns
|
|
options._compiled = true
|
|
}
|
|
|
|
// functional template
|
|
if (functionalTemplate) {
|
|
options.functional = true
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = 'data-v-' + scopeId
|
|
}
|
|
|
|
var hook
|
|
if (moduleIdentifier) { // server build
|
|
hook = function (context) {
|
|
// 2.3 injection
|
|
context =
|
|
context || // cached call
|
|
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
// 2.2 with runInNewContext: true
|
|
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
context = __VUE_SSR_CONTEXT__
|
|
}
|
|
// inject component styles
|
|
if (injectStyles) {
|
|
injectStyles.call(this, context)
|
|
}
|
|
// register component module identifier for async chunk inferrence
|
|
if (context && context._registeredComponents) {
|
|
context._registeredComponents.add(moduleIdentifier)
|
|
}
|
|
}
|
|
// used by ssr in case component is cached and beforeCreate
|
|
// never gets called
|
|
options._ssrRegister = hook
|
|
} else if (injectStyles) {
|
|
hook = shadowMode
|
|
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
|
: injectStyles
|
|
}
|
|
|
|
if (hook) {
|
|
if (options.functional) {
|
|
// for template-only hot-reload because in that case the render fn doesn't
|
|
// go through the normalizer
|
|
options._injectStyles = hook
|
|
// register for functioal component in vue file
|
|
var originalRender = options.render
|
|
options.render = function renderWithStyleInjection (h, context) {
|
|
hook.call(context)
|
|
return originalRender(h, context)
|
|
}
|
|
} else {
|
|
// inject component registration as beforeCreate hook
|
|
var existing = options.beforeCreate
|
|
options.beforeCreate = existing
|
|
? [].concat(existing, hook)
|
|
: [hook]
|
|
}
|
|
}
|
|
|
|
return {
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 11:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("2bb5");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 21:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("d397");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 4:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("d010");
|
|
|
|
/***/ }),
|
|
|
|
/***/ 76:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=template&id=343dd774&
|
|
var render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"div",
|
|
{
|
|
class: [
|
|
_vm.type === "textarea" ? "el-textarea" : "el-input",
|
|
_vm.inputSize ? "el-input--" + _vm.inputSize : "",
|
|
{
|
|
"is-disabled": _vm.inputDisabled,
|
|
"is-exceed": _vm.inputExceed,
|
|
"el-input-group": _vm.$slots.prepend || _vm.$slots.append,
|
|
"el-input-group--append": _vm.$slots.append,
|
|
"el-input-group--prepend": _vm.$slots.prepend,
|
|
"el-input--prefix": _vm.$slots.prefix || _vm.prefixIcon,
|
|
"el-input--suffix":
|
|
_vm.$slots.suffix ||
|
|
_vm.suffixIcon ||
|
|
_vm.clearable ||
|
|
_vm.showPassword
|
|
}
|
|
],
|
|
on: {
|
|
mouseenter: function($event) {
|
|
_vm.hovering = true
|
|
},
|
|
mouseleave: function($event) {
|
|
_vm.hovering = false
|
|
}
|
|
}
|
|
},
|
|
[
|
|
_vm.type !== "textarea"
|
|
? [
|
|
_vm.$slots.prepend
|
|
? _c(
|
|
"div",
|
|
{ staticClass: "el-input-group__prepend" },
|
|
[_vm._t("prepend")],
|
|
2
|
|
)
|
|
: _vm._e(),
|
|
_vm.type !== "textarea"
|
|
? _c(
|
|
"input",
|
|
_vm._b(
|
|
{
|
|
ref: "input",
|
|
staticClass: "el-input__inner",
|
|
attrs: {
|
|
tabindex: _vm.tabindex,
|
|
type: _vm.showPassword
|
|
? _vm.passwordVisible
|
|
? "text"
|
|
: "password"
|
|
: _vm.type,
|
|
disabled: _vm.inputDisabled,
|
|
readonly: _vm.readonly,
|
|
autocomplete: _vm.autoComplete || _vm.autocomplete,
|
|
"aria-label": _vm.label
|
|
},
|
|
on: {
|
|
compositionstart: _vm.handleCompositionStart,
|
|
compositionupdate: _vm.handleCompositionUpdate,
|
|
compositionend: _vm.handleCompositionEnd,
|
|
input: _vm.handleInput,
|
|
focus: _vm.handleFocus,
|
|
blur: _vm.handleBlur,
|
|
change: _vm.handleChange
|
|
}
|
|
},
|
|
"input",
|
|
_vm.$attrs,
|
|
false
|
|
)
|
|
)
|
|
: _vm._e(),
|
|
_vm.$slots.prefix || _vm.prefixIcon
|
|
? _c(
|
|
"span",
|
|
{ staticClass: "el-input__prefix" },
|
|
[
|
|
_vm._t("prefix"),
|
|
_vm.prefixIcon
|
|
? _c("i", {
|
|
staticClass: "el-input__icon",
|
|
class: _vm.prefixIcon
|
|
})
|
|
: _vm._e()
|
|
],
|
|
2
|
|
)
|
|
: _vm._e(),
|
|
_vm.getSuffixVisible()
|
|
? _c("span", { staticClass: "el-input__suffix" }, [
|
|
_c(
|
|
"span",
|
|
{ staticClass: "el-input__suffix-inner" },
|
|
[
|
|
!_vm.showClear ||
|
|
!_vm.showPwdVisible ||
|
|
!_vm.isWordLimitVisible
|
|
? [
|
|
_vm._t("suffix"),
|
|
_vm.suffixIcon
|
|
? _c("i", {
|
|
staticClass: "el-input__icon",
|
|
class: _vm.suffixIcon
|
|
})
|
|
: _vm._e()
|
|
]
|
|
: _vm._e(),
|
|
_vm.showClear
|
|
? _c("i", {
|
|
staticClass:
|
|
"el-input__icon el-icon-circle-close el-input__clear",
|
|
on: {
|
|
mousedown: function($event) {
|
|
$event.preventDefault()
|
|
},
|
|
click: _vm.clear
|
|
}
|
|
})
|
|
: _vm._e(),
|
|
_vm.showPwdVisible
|
|
? _c("i", {
|
|
staticClass:
|
|
"el-input__icon el-icon-view el-input__clear",
|
|
on: { click: _vm.handlePasswordVisible }
|
|
})
|
|
: _vm._e(),
|
|
_vm.isWordLimitVisible
|
|
? _c("span", { staticClass: "el-input__count" }, [
|
|
_c(
|
|
"span",
|
|
{ staticClass: "el-input__count-inner" },
|
|
[
|
|
_vm._v(
|
|
"\n " +
|
|
_vm._s(_vm.textLength) +
|
|
"/" +
|
|
_vm._s(_vm.upperLimit) +
|
|
"\n "
|
|
)
|
|
]
|
|
)
|
|
])
|
|
: _vm._e()
|
|
],
|
|
2
|
|
),
|
|
_vm.validateState
|
|
? _c("i", {
|
|
staticClass: "el-input__icon",
|
|
class: ["el-input__validateIcon", _vm.validateIcon]
|
|
})
|
|
: _vm._e()
|
|
])
|
|
: _vm._e(),
|
|
_vm.$slots.append
|
|
? _c(
|
|
"div",
|
|
{ staticClass: "el-input-group__append" },
|
|
[_vm._t("append")],
|
|
2
|
|
)
|
|
: _vm._e()
|
|
]
|
|
: _c(
|
|
"textarea",
|
|
_vm._b(
|
|
{
|
|
ref: "textarea",
|
|
staticClass: "el-textarea__inner",
|
|
style: _vm.textareaStyle,
|
|
attrs: {
|
|
tabindex: _vm.tabindex,
|
|
disabled: _vm.inputDisabled,
|
|
readonly: _vm.readonly,
|
|
autocomplete: _vm.autoComplete || _vm.autocomplete,
|
|
"aria-label": _vm.label
|
|
},
|
|
on: {
|
|
compositionstart: _vm.handleCompositionStart,
|
|
compositionupdate: _vm.handleCompositionUpdate,
|
|
compositionend: _vm.handleCompositionEnd,
|
|
input: _vm.handleInput,
|
|
focus: _vm.handleFocus,
|
|
blur: _vm.handleBlur,
|
|
change: _vm.handleChange
|
|
}
|
|
},
|
|
"textarea",
|
|
_vm.$attrs,
|
|
false
|
|
)
|
|
),
|
|
_vm.isWordLimitVisible && _vm.type === "textarea"
|
|
? _c("span", { staticClass: "el-input__count" }, [
|
|
_vm._v(_vm._s(_vm.textLength) + "/" + _vm._s(_vm.upperLimit))
|
|
])
|
|
: _vm._e()
|
|
],
|
|
2
|
|
)
|
|
}
|
|
var staticRenderFns = []
|
|
render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=template&id=343dd774&
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
|
|
var emitter_ = __webpack_require__(4);
|
|
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/migrating"
|
|
var migrating_ = __webpack_require__(11);
|
|
var migrating_default = /*#__PURE__*/__webpack_require__.n(migrating_);
|
|
|
|
// CONCATENATED MODULE: ./packages/input/src/calcTextareaHeight.js
|
|
var hiddenTextarea = void 0;
|
|
|
|
var HIDDEN_STYLE = '\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n';
|
|
|
|
var CONTEXT_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing'];
|
|
|
|
function calculateNodeStyling(targetElement) {
|
|
var style = window.getComputedStyle(targetElement);
|
|
|
|
var boxSizing = style.getPropertyValue('box-sizing');
|
|
|
|
var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
|
|
|
|
var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
|
|
|
|
var contextStyle = CONTEXT_STYLE.map(function (name) {
|
|
return name + ':' + style.getPropertyValue(name);
|
|
}).join(';');
|
|
|
|
return { contextStyle: contextStyle, paddingSize: paddingSize, borderSize: borderSize, boxSizing: boxSizing };
|
|
}
|
|
|
|
function calcTextareaHeight(targetElement) {
|
|
var minRows = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
var maxRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
|
|
if (!hiddenTextarea) {
|
|
hiddenTextarea = document.createElement('textarea');
|
|
document.body.appendChild(hiddenTextarea);
|
|
}
|
|
|
|
var _calculateNodeStyling = calculateNodeStyling(targetElement),
|
|
paddingSize = _calculateNodeStyling.paddingSize,
|
|
borderSize = _calculateNodeStyling.borderSize,
|
|
boxSizing = _calculateNodeStyling.boxSizing,
|
|
contextStyle = _calculateNodeStyling.contextStyle;
|
|
|
|
hiddenTextarea.setAttribute('style', contextStyle + ';' + HIDDEN_STYLE);
|
|
hiddenTextarea.value = targetElement.value || targetElement.placeholder || '';
|
|
|
|
var height = hiddenTextarea.scrollHeight;
|
|
var result = {};
|
|
|
|
if (boxSizing === 'border-box') {
|
|
height = height + borderSize;
|
|
} else if (boxSizing === 'content-box') {
|
|
height = height - paddingSize;
|
|
}
|
|
|
|
hiddenTextarea.value = '';
|
|
var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
|
|
|
|
if (minRows !== null) {
|
|
var minHeight = singleRowHeight * minRows;
|
|
if (boxSizing === 'border-box') {
|
|
minHeight = minHeight + paddingSize + borderSize;
|
|
}
|
|
height = Math.max(minHeight, height);
|
|
result.minHeight = minHeight + 'px';
|
|
}
|
|
if (maxRows !== null) {
|
|
var maxHeight = singleRowHeight * maxRows;
|
|
if (boxSizing === 'border-box') {
|
|
maxHeight = maxHeight + paddingSize + borderSize;
|
|
}
|
|
height = Math.min(maxHeight, height);
|
|
}
|
|
result.height = height + 'px';
|
|
hiddenTextarea.parentNode && hiddenTextarea.parentNode.removeChild(hiddenTextarea);
|
|
hiddenTextarea = null;
|
|
return result;
|
|
};
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/merge"
|
|
var merge_ = __webpack_require__(9);
|
|
var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/utils/shared"
|
|
var shared_ = __webpack_require__(21);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var inputvue_type_script_lang_js_ = ({
|
|
name: 'ElInput',
|
|
|
|
componentName: 'ElInput',
|
|
|
|
mixins: [emitter_default.a, migrating_default.a],
|
|
|
|
inheritAttrs: false,
|
|
|
|
inject: {
|
|
elForm: {
|
|
default: ''
|
|
},
|
|
elFormItem: {
|
|
default: ''
|
|
}
|
|
},
|
|
|
|
data: function data() {
|
|
return {
|
|
textareaCalcStyle: {},
|
|
hovering: false,
|
|
focused: false,
|
|
isComposing: false,
|
|
passwordVisible: false
|
|
};
|
|
},
|
|
|
|
|
|
props: {
|
|
value: [String, Number],
|
|
size: String,
|
|
resize: String,
|
|
form: String,
|
|
disabled: Boolean,
|
|
readonly: Boolean,
|
|
type: {
|
|
type: String,
|
|
default: 'text'
|
|
},
|
|
autosize: {
|
|
type: [Boolean, Object],
|
|
default: false
|
|
},
|
|
autocomplete: {
|
|
type: String,
|
|
default: 'off'
|
|
},
|
|
/** @Deprecated in next major version */
|
|
autoComplete: {
|
|
type: String,
|
|
validator: function validator(val) {
|
|
false && false;
|
|
return true;
|
|
}
|
|
},
|
|
validateEvent: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
suffixIcon: String,
|
|
prefixIcon: String,
|
|
label: String,
|
|
clearable: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
showPassword: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
showWordLimit: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
tabindex: String
|
|
},
|
|
|
|
computed: {
|
|
_elFormItemSize: function _elFormItemSize() {
|
|
return (this.elFormItem || {}).elFormItemSize;
|
|
},
|
|
validateState: function validateState() {
|
|
return this.elFormItem ? this.elFormItem.validateState : '';
|
|
},
|
|
needStatusIcon: function needStatusIcon() {
|
|
return this.elForm ? this.elForm.statusIcon : false;
|
|
},
|
|
validateIcon: function validateIcon() {
|
|
return {
|
|
validating: 'el-icon-loading',
|
|
success: 'el-icon-circle-check',
|
|
error: 'el-icon-circle-close'
|
|
}[this.validateState];
|
|
},
|
|
textareaStyle: function textareaStyle() {
|
|
return merge_default()({}, this.textareaCalcStyle, { resize: this.resize });
|
|
},
|
|
inputSize: function inputSize() {
|
|
return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
|
|
},
|
|
inputDisabled: function inputDisabled() {
|
|
return this.disabled || (this.elForm || {}).disabled;
|
|
},
|
|
nativeInputValue: function nativeInputValue() {
|
|
return this.value === null || this.value === undefined ? '' : String(this.value);
|
|
},
|
|
showClear: function showClear() {
|
|
return this.clearable && !this.inputDisabled && !this.readonly && this.nativeInputValue && (this.focused || this.hovering);
|
|
},
|
|
showPwdVisible: function showPwdVisible() {
|
|
return this.showPassword && !this.inputDisabled && !this.readonly && (!!this.nativeInputValue || this.focused);
|
|
},
|
|
isWordLimitVisible: function isWordLimitVisible() {
|
|
return this.showWordLimit && this.$attrs.maxlength && (this.type === 'text' || this.type === 'textarea') && !this.inputDisabled && !this.readonly && !this.showPassword;
|
|
},
|
|
upperLimit: function upperLimit() {
|
|
return this.$attrs.maxlength;
|
|
},
|
|
textLength: function textLength() {
|
|
if (typeof this.value === 'number') {
|
|
return String(this.value).length;
|
|
}
|
|
|
|
return (this.value || '').length;
|
|
},
|
|
inputExceed: function inputExceed() {
|
|
// show exceed style if length of initial value greater then maxlength
|
|
return this.isWordLimitVisible && this.textLength > this.upperLimit;
|
|
}
|
|
},
|
|
|
|
watch: {
|
|
value: function value(val) {
|
|
this.$nextTick(this.resizeTextarea);
|
|
if (this.validateEvent) {
|
|
this.dispatch('ElFormItem', 'el.form.change', [val]);
|
|
}
|
|
},
|
|
|
|
// native input value is set explicitly
|
|
// do not use v-model / :value in template
|
|
// see: https://github.com/ElemeFE/element/issues/14521
|
|
nativeInputValue: function nativeInputValue() {
|
|
this.setNativeInputValue();
|
|
},
|
|
|
|
// when change between <input> and <textarea>,
|
|
// update DOM dependent value and styles
|
|
// https://github.com/ElemeFE/element/issues/14857
|
|
type: function type() {
|
|
var _this = this;
|
|
|
|
this.$nextTick(function () {
|
|
_this.setNativeInputValue();
|
|
_this.resizeTextarea();
|
|
_this.updateIconOffset();
|
|
});
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
focus: function focus() {
|
|
this.getInput().focus();
|
|
},
|
|
blur: function blur() {
|
|
this.getInput().blur();
|
|
},
|
|
getMigratingConfig: function getMigratingConfig() {
|
|
return {
|
|
props: {
|
|
'icon': 'icon is removed, use suffix-icon / prefix-icon instead.',
|
|
'on-icon-click': 'on-icon-click is removed.'
|
|
},
|
|
events: {
|
|
'click': 'click is removed.'
|
|
}
|
|
};
|
|
},
|
|
handleBlur: function handleBlur(event) {
|
|
this.focused = false;
|
|
this.$emit('blur', event);
|
|
if (this.validateEvent) {
|
|
this.dispatch('ElFormItem', 'el.form.blur', [this.value]);
|
|
}
|
|
},
|
|
select: function select() {
|
|
this.getInput().select();
|
|
},
|
|
resizeTextarea: function resizeTextarea() {
|
|
if (this.$isServer) return;
|
|
var autosize = this.autosize,
|
|
type = this.type;
|
|
|
|
if (type !== 'textarea') return;
|
|
if (!autosize) {
|
|
this.textareaCalcStyle = {
|
|
minHeight: calcTextareaHeight(this.$refs.textarea).minHeight
|
|
};
|
|
return;
|
|
}
|
|
var minRows = autosize.minRows;
|
|
var maxRows = autosize.maxRows;
|
|
|
|
this.textareaCalcStyle = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
|
|
},
|
|
setNativeInputValue: function setNativeInputValue() {
|
|
var input = this.getInput();
|
|
if (!input) return;
|
|
if (input.value === this.nativeInputValue) return;
|
|
input.value = this.nativeInputValue;
|
|
},
|
|
handleFocus: function handleFocus(event) {
|
|
this.focused = true;
|
|
this.$emit('focus', event);
|
|
},
|
|
handleCompositionStart: function handleCompositionStart() {
|
|
this.isComposing = true;
|
|
},
|
|
handleCompositionUpdate: function handleCompositionUpdate(event) {
|
|
var text = event.target.value;
|
|
var lastCharacter = text[text.length - 1] || '';
|
|
this.isComposing = !Object(shared_["isKorean"])(lastCharacter);
|
|
},
|
|
handleCompositionEnd: function handleCompositionEnd(event) {
|
|
if (this.isComposing) {
|
|
this.isComposing = false;
|
|
this.handleInput(event);
|
|
}
|
|
},
|
|
handleInput: function handleInput(event) {
|
|
// should not emit input during composition
|
|
// see: https://github.com/ElemeFE/element/issues/10516
|
|
if (this.isComposing) return;
|
|
|
|
// hack for https://github.com/ElemeFE/element/issues/8548
|
|
// should remove the following line when we don't support IE
|
|
if (event.target.value === this.nativeInputValue) return;
|
|
|
|
this.$emit('input', event.target.value);
|
|
|
|
// ensure native input value is controlled
|
|
// see: https://github.com/ElemeFE/element/issues/12850
|
|
this.$nextTick(this.setNativeInputValue);
|
|
},
|
|
handleChange: function handleChange(event) {
|
|
this.$emit('change', event.target.value);
|
|
},
|
|
calcIconOffset: function calcIconOffset(place) {
|
|
var elList = [].slice.call(this.$el.querySelectorAll('.el-input__' + place) || []);
|
|
if (!elList.length) return;
|
|
var el = null;
|
|
for (var i = 0; i < elList.length; i++) {
|
|
if (elList[i].parentNode === this.$el) {
|
|
el = elList[i];
|
|
break;
|
|
}
|
|
}
|
|
if (!el) return;
|
|
var pendantMap = {
|
|
suffix: 'append',
|
|
prefix: 'prepend'
|
|
};
|
|
|
|
var pendant = pendantMap[place];
|
|
if (this.$slots[pendant]) {
|
|
el.style.transform = 'translateX(' + (place === 'suffix' ? '-' : '') + this.$el.querySelector('.el-input-group__' + pendant).offsetWidth + 'px)';
|
|
} else {
|
|
el.removeAttribute('style');
|
|
}
|
|
},
|
|
updateIconOffset: function updateIconOffset() {
|
|
this.calcIconOffset('prefix');
|
|
this.calcIconOffset('suffix');
|
|
},
|
|
clear: function clear() {
|
|
this.$emit('input', '');
|
|
this.$emit('change', '');
|
|
this.$emit('clear');
|
|
},
|
|
handlePasswordVisible: function handlePasswordVisible() {
|
|
this.passwordVisible = !this.passwordVisible;
|
|
this.focus();
|
|
},
|
|
getInput: function getInput() {
|
|
return this.$refs.input || this.$refs.textarea;
|
|
},
|
|
getSuffixVisible: function getSuffixVisible() {
|
|
return this.$slots.suffix || this.suffixIcon || this.showClear || this.showPassword || this.isWordLimitVisible || this.validateState && this.needStatusIcon;
|
|
}
|
|
},
|
|
|
|
created: function created() {
|
|
this.$on('inputSelect', this.select);
|
|
},
|
|
mounted: function mounted() {
|
|
this.setNativeInputValue();
|
|
this.resizeTextarea();
|
|
this.updateIconOffset();
|
|
},
|
|
updated: function updated() {
|
|
this.$nextTick(this.updateIconOffset);
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_inputvue_type_script_lang_js_ = (inputvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
var componentNormalizer = __webpack_require__(0);
|
|
|
|
// CONCATENATED MODULE: ./packages/input/src/input.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
src_inputvue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var api; }
|
|
component.options.__file = "packages/input/src/input.vue"
|
|
/* harmony default export */ var input = (component.exports);
|
|
// CONCATENATED MODULE: ./packages/input/index.js
|
|
|
|
|
|
/* istanbul ignore next */
|
|
input.install = function (Vue) {
|
|
Vue.component(input.name, input);
|
|
};
|
|
|
|
/* harmony default export */ var packages_input = __webpack_exports__["default"] = (input);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 9:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("7f4d");
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "f494":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 116);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 0:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
|
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
function normalizeComponent (
|
|
scriptExports,
|
|
render,
|
|
staticRenderFns,
|
|
functionalTemplate,
|
|
injectStyles,
|
|
scopeId,
|
|
moduleIdentifier, /* server only */
|
|
shadowMode /* vue-cli only */
|
|
) {
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (render) {
|
|
options.render = render
|
|
options.staticRenderFns = staticRenderFns
|
|
options._compiled = true
|
|
}
|
|
|
|
// functional template
|
|
if (functionalTemplate) {
|
|
options.functional = true
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = 'data-v-' + scopeId
|
|
}
|
|
|
|
var hook
|
|
if (moduleIdentifier) { // server build
|
|
hook = function (context) {
|
|
// 2.3 injection
|
|
context =
|
|
context || // cached call
|
|
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
// 2.2 with runInNewContext: true
|
|
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
context = __VUE_SSR_CONTEXT__
|
|
}
|
|
// inject component styles
|
|
if (injectStyles) {
|
|
injectStyles.call(this, context)
|
|
}
|
|
// register component module identifier for async chunk inferrence
|
|
if (context && context._registeredComponents) {
|
|
context._registeredComponents.add(moduleIdentifier)
|
|
}
|
|
}
|
|
// used by ssr in case component is cached and beforeCreate
|
|
// never gets called
|
|
options._ssrRegister = hook
|
|
} else if (injectStyles) {
|
|
hook = shadowMode
|
|
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
|
: injectStyles
|
|
}
|
|
|
|
if (hook) {
|
|
if (options.functional) {
|
|
// for template-only hot-reload because in that case the render fn doesn't
|
|
// go through the normalizer
|
|
options._injectStyles = hook
|
|
// register for functioal component in vue file
|
|
var originalRender = options.render
|
|
options.render = function renderWithStyleInjection (h, context) {
|
|
hook.call(context)
|
|
return originalRender(h, context)
|
|
}
|
|
} else {
|
|
// inject component registration as beforeCreate hook
|
|
var existing = options.beforeCreate
|
|
options.beforeCreate = existing
|
|
? [].concat(existing, hook)
|
|
: [hook]
|
|
}
|
|
}
|
|
|
|
return {
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 116:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio.vue?vue&type=template&id=69cd6268&
|
|
var render = function() {
|
|
var _vm = this
|
|
var _h = _vm.$createElement
|
|
var _c = _vm._self._c || _h
|
|
return _c(
|
|
"label",
|
|
{
|
|
staticClass: "el-radio",
|
|
class: [
|
|
_vm.border && _vm.radioSize ? "el-radio--" + _vm.radioSize : "",
|
|
{ "is-disabled": _vm.isDisabled },
|
|
{ "is-focus": _vm.focus },
|
|
{ "is-bordered": _vm.border },
|
|
{ "is-checked": _vm.model === _vm.label }
|
|
],
|
|
attrs: {
|
|
role: "radio",
|
|
"aria-checked": _vm.model === _vm.label,
|
|
"aria-disabled": _vm.isDisabled,
|
|
tabindex: _vm.tabIndex
|
|
},
|
|
on: {
|
|
keydown: function($event) {
|
|
if (
|
|
!("button" in $event) &&
|
|
_vm._k($event.keyCode, "space", 32, $event.key, [" ", "Spacebar"])
|
|
) {
|
|
return null
|
|
}
|
|
$event.stopPropagation()
|
|
$event.preventDefault()
|
|
_vm.model = _vm.isDisabled ? _vm.model : _vm.label
|
|
}
|
|
}
|
|
},
|
|
[
|
|
_c(
|
|
"span",
|
|
{
|
|
staticClass: "el-radio__input",
|
|
class: {
|
|
"is-disabled": _vm.isDisabled,
|
|
"is-checked": _vm.model === _vm.label
|
|
}
|
|
},
|
|
[
|
|
_c("span", { staticClass: "el-radio__inner" }),
|
|
_c("input", {
|
|
directives: [
|
|
{
|
|
name: "model",
|
|
rawName: "v-model",
|
|
value: _vm.model,
|
|
expression: "model"
|
|
}
|
|
],
|
|
ref: "radio",
|
|
staticClass: "el-radio__original",
|
|
attrs: {
|
|
type: "radio",
|
|
"aria-hidden": "true",
|
|
name: _vm.name,
|
|
disabled: _vm.isDisabled,
|
|
tabindex: "-1"
|
|
},
|
|
domProps: {
|
|
value: _vm.label,
|
|
checked: _vm._q(_vm.model, _vm.label)
|
|
},
|
|
on: {
|
|
focus: function($event) {
|
|
_vm.focus = true
|
|
},
|
|
blur: function($event) {
|
|
_vm.focus = false
|
|
},
|
|
change: [
|
|
function($event) {
|
|
_vm.model = _vm.label
|
|
},
|
|
_vm.handleChange
|
|
]
|
|
}
|
|
})
|
|
]
|
|
),
|
|
_c(
|
|
"span",
|
|
{
|
|
staticClass: "el-radio__label",
|
|
on: {
|
|
keydown: function($event) {
|
|
$event.stopPropagation()
|
|
}
|
|
}
|
|
},
|
|
[
|
|
_vm._t("default"),
|
|
!_vm.$slots.default ? [_vm._v(_vm._s(_vm.label))] : _vm._e()
|
|
],
|
|
2
|
|
)
|
|
]
|
|
)
|
|
}
|
|
var staticRenderFns = []
|
|
render._withStripped = true
|
|
|
|
|
|
// CONCATENATED MODULE: ./packages/radio/src/radio.vue?vue&type=template&id=69cd6268&
|
|
|
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
|
|
var emitter_ = __webpack_require__(4);
|
|
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
/* harmony default export */ var radiovue_type_script_lang_js_ = ({
|
|
name: 'ElRadio',
|
|
|
|
mixins: [emitter_default.a],
|
|
|
|
inject: {
|
|
elForm: {
|
|
default: ''
|
|
},
|
|
|
|
elFormItem: {
|
|
default: ''
|
|
}
|
|
},
|
|
|
|
componentName: 'ElRadio',
|
|
|
|
props: {
|
|
value: {},
|
|
label: {},
|
|
disabled: Boolean,
|
|
name: String,
|
|
border: Boolean,
|
|
size: String
|
|
},
|
|
|
|
data: function data() {
|
|
return {
|
|
focus: false
|
|
};
|
|
},
|
|
|
|
computed: {
|
|
isGroup: function isGroup() {
|
|
var parent = this.$parent;
|
|
while (parent) {
|
|
if (parent.$options.componentName !== 'ElRadioGroup') {
|
|
parent = parent.$parent;
|
|
} else {
|
|
this._radioGroup = parent;
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
},
|
|
|
|
model: {
|
|
get: function get() {
|
|
return this.isGroup ? this._radioGroup.value : this.value;
|
|
},
|
|
set: function set(val) {
|
|
if (this.isGroup) {
|
|
this.dispatch('ElRadioGroup', 'input', [val]);
|
|
} else {
|
|
this.$emit('input', val);
|
|
}
|
|
this.$refs.radio && (this.$refs.radio.checked = this.model === this.label);
|
|
}
|
|
},
|
|
_elFormItemSize: function _elFormItemSize() {
|
|
return (this.elFormItem || {}).elFormItemSize;
|
|
},
|
|
radioSize: function radioSize() {
|
|
var temRadioSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
|
|
return this.isGroup ? this._radioGroup.radioGroupSize || temRadioSize : temRadioSize;
|
|
},
|
|
isDisabled: function isDisabled() {
|
|
return this.isGroup ? this._radioGroup.disabled || this.disabled || (this.elForm || {}).disabled : this.disabled || (this.elForm || {}).disabled;
|
|
},
|
|
tabIndex: function tabIndex() {
|
|
return this.isDisabled || this.isGroup && this.model !== this.label ? -1 : 0;
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
handleChange: function handleChange() {
|
|
var _this = this;
|
|
|
|
this.$nextTick(function () {
|
|
_this.$emit('change', _this.model);
|
|
_this.isGroup && _this.dispatch('ElRadioGroup', 'handleChange', _this.model);
|
|
});
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./packages/radio/src/radio.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_radiovue_type_script_lang_js_ = (radiovue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
var componentNormalizer = __webpack_require__(0);
|
|
|
|
// CONCATENATED MODULE: ./packages/radio/src/radio.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
src_radiovue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* hot reload */
|
|
if (false) { var api; }
|
|
component.options.__file = "packages/radio/src/radio.vue"
|
|
/* harmony default export */ var src_radio = (component.exports);
|
|
// CONCATENATED MODULE: ./packages/radio/index.js
|
|
|
|
|
|
/* istanbul ignore next */
|
|
src_radio.install = function (Vue) {
|
|
Vue.component(src_radio.name, src_radio);
|
|
};
|
|
|
|
/* harmony default export */ var packages_radio = __webpack_exports__["default"] = (src_radio);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 4:
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = __webpack_require__("d010");
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
|
|
/***/ }),
|
|
|
|
/***/ "f5b0":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "f5df":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var TO_STRING_TAG_SUPPORT = __webpack_require__("00ee");
|
|
var classofRaw = __webpack_require__("c6b6");
|
|
var wellKnownSymbol = __webpack_require__("b622");
|
|
|
|
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
// ES3 wrong here
|
|
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
|
|
// fallback for IE11 Script Access Denied error
|
|
var tryGet = function (it, key) {
|
|
try {
|
|
return it[key];
|
|
} catch (error) { /* empty */ }
|
|
};
|
|
|
|
// getting tag from ES6+ `Object.prototype.toString`
|
|
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
var O, tag, result;
|
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
// @@toStringTag case
|
|
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
|
|
// builtinTag case
|
|
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
// ES3 arguments fallback
|
|
: (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "f772":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var shared = __webpack_require__("5692");
|
|
var uid = __webpack_require__("90e3");
|
|
|
|
var keys = shared('keys');
|
|
|
|
module.exports = function (key) {
|
|
return keys[key] || (keys[key] = uid(key));
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "f893":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports = { "default": __webpack_require__("8119"), __esModule: true };
|
|
|
|
/***/ }),
|
|
|
|
/***/ "f8af":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var Uint8Array = __webpack_require__("2474");
|
|
|
|
/**
|
|
* Creates a clone of `arrayBuffer`.
|
|
*
|
|
* @private
|
|
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
|
|
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
|
*/
|
|
function cloneArrayBuffer(arrayBuffer) {
|
|
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
|
|
return result;
|
|
}
|
|
|
|
module.exports = cloneArrayBuffer;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "fa21":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseCreate = __webpack_require__("7530"),
|
|
getPrototype = __webpack_require__("2dcb"),
|
|
isPrototype = __webpack_require__("eac5");
|
|
|
|
/**
|
|
* Initializes an object clone.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to clone.
|
|
* @returns {Object} Returns the initialized clone.
|
|
*/
|
|
function initCloneObject(object) {
|
|
return (typeof object.constructor == 'function' && !isPrototype(object))
|
|
? baseCreate(getPrototype(object))
|
|
: {};
|
|
}
|
|
|
|
module.exports = initCloneObject;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "faf5":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports = !__webpack_require__("0bad") && !__webpack_require__("4b8b")(function () {
|
|
return Object.defineProperty(__webpack_require__("05f5")('div'), 'a', { get: function () { return 7; } }).a != 7;
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "fb15":
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
// ESM COMPAT FLAG
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
// This file is imported into lib/wc client bundles.
|
|
|
|
if (typeof window !== 'undefined') {
|
|
var currentScript = window.document.currentScript
|
|
if (true) {
|
|
var getCurrentScript = __webpack_require__("8875")
|
|
currentScript = getCurrentScript()
|
|
|
|
// for backward compatibility, because previously we directly included the polyfill
|
|
if (!('currentScript' in document)) {
|
|
Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
|
|
}
|
|
}
|
|
|
|
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
|
if (src) {
|
|
__webpack_require__.p = src[1] // eslint-disable-line
|
|
}
|
|
}
|
|
|
|
// Indicate to webpack that this file can be concatenated
|
|
/* harmony default export */ var setPublicPath = (null);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
|
|
var es_function_name = __webpack_require__("b0c0");
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/color-picker.css
|
|
var color_picker = __webpack_require__("fed5c");
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/base.css
|
|
var base = __webpack_require__("5950");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/color-picker.js
|
|
var lib_color_picker = __webpack_require__("7464");
|
|
var lib_color_picker_default = /*#__PURE__*/__webpack_require__.n(lib_color_picker);
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/tag.css
|
|
var tag = __webpack_require__("2a63");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/tag.js
|
|
var lib_tag = __webpack_require__("8bbc");
|
|
var lib_tag_default = /*#__PURE__*/__webpack_require__.n(lib_tag);
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/form-item.css
|
|
var form_item = __webpack_require__("f0fb");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/form-item.js
|
|
var lib_form_item = __webpack_require__("3787");
|
|
var lib_form_item_default = /*#__PURE__*/__webpack_require__.n(lib_form_item);
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/form.css
|
|
var theme_chalk_form = __webpack_require__("0bf0");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/form.js
|
|
var lib_form = __webpack_require__("4105");
|
|
var lib_form_default = /*#__PURE__*/__webpack_require__.n(lib_form);
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/collapse-item.css
|
|
var collapse_item = __webpack_require__("50f3");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/collapse-item.js
|
|
var lib_collapse_item = __webpack_require__("d180");
|
|
var lib_collapse_item_default = /*#__PURE__*/__webpack_require__.n(lib_collapse_item);
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/collapse.css
|
|
var collapse = __webpack_require__("0cc9");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/collapse.js
|
|
var lib_collapse = __webpack_require__("c0bb");
|
|
var lib_collapse_default = /*#__PURE__*/__webpack_require__.n(lib_collapse);
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/col.css
|
|
var col = __webpack_require__("a223");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/col.js
|
|
var lib_col = __webpack_require__("c2cc");
|
|
var lib_col_default = /*#__PURE__*/__webpack_require__.n(lib_col);
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/row.css
|
|
var row = __webpack_require__("2b1c");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/row.js
|
|
var lib_row = __webpack_require__("0f6c");
|
|
var lib_row_default = /*#__PURE__*/__webpack_require__.n(lib_row);
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/checkbox-group.css
|
|
var checkbox_group = __webpack_require__("f5b0");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/checkbox-group.js
|
|
var lib_checkbox_group = __webpack_require__("7fc1");
|
|
var lib_checkbox_group_default = /*#__PURE__*/__webpack_require__.n(lib_checkbox_group);
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/checkbox.css
|
|
var theme_chalk_checkbox = __webpack_require__("269b");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/checkbox.js
|
|
var lib_checkbox = __webpack_require__("dcdc");
|
|
var lib_checkbox_default = /*#__PURE__*/__webpack_require__.n(lib_checkbox);
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/popover.css
|
|
var popover = __webpack_require__("564a");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/popover.js
|
|
var lib_popover = __webpack_require__("6ac9");
|
|
var lib_popover_default = /*#__PURE__*/__webpack_require__.n(lib_popover);
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/radio.css
|
|
var theme_chalk_radio = __webpack_require__("c337");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/radio.js
|
|
var lib_radio = __webpack_require__("f494");
|
|
var lib_radio_default = /*#__PURE__*/__webpack_require__.n(lib_radio);
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/radio-group.css
|
|
var radio_group = __webpack_require__("d818");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/radio-group.js
|
|
var lib_radio_group = __webpack_require__("6ac5");
|
|
var lib_radio_group_default = /*#__PURE__*/__webpack_require__.n(lib_radio_group);
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/option.css
|
|
var theme_chalk_option = __webpack_require__("5986");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/option.js
|
|
var lib_option = __webpack_require__("e772");
|
|
var lib_option_default = /*#__PURE__*/__webpack_require__.n(lib_option);
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/select.css
|
|
var theme_chalk_select = __webpack_require__("6db8");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/select.js
|
|
var lib_select = __webpack_require__("4e4b");
|
|
var lib_select_default = /*#__PURE__*/__webpack_require__.n(lib_select);
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/switch.css
|
|
var theme_chalk_switch = __webpack_require__("71bc");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/switch.js
|
|
var lib_switch = __webpack_require__("b35bb");
|
|
var lib_switch_default = /*#__PURE__*/__webpack_require__.n(lib_switch);
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/input-number.css
|
|
var input_number = __webpack_require__("b4b3");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/input-number.js
|
|
var lib_input_number = __webpack_require__("e450");
|
|
var lib_input_number_default = /*#__PURE__*/__webpack_require__.n(lib_input_number);
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/input.css
|
|
var input = __webpack_require__("b258");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/input.js
|
|
var lib_input = __webpack_require__("f3ad");
|
|
var lib_input_default = /*#__PURE__*/__webpack_require__.n(lib_input);
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/scrollbar.css
|
|
var scrollbar = __webpack_require__("e46d");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/scrollbar.js
|
|
var lib_scrollbar = __webpack_require__("14e9");
|
|
var lib_scrollbar_default = /*#__PURE__*/__webpack_require__.n(lib_scrollbar);
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/button.css
|
|
var theme_chalk_button = __webpack_require__("77a5");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/button.js
|
|
var lib_button = __webpack_require__("eedf");
|
|
var lib_button_default = /*#__PURE__*/__webpack_require__.n(lib_button);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4032e232-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=template&id=023e224e&
|
|
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"kr-designer",attrs:{"data-theme":"kr-designer"}},[_c('viewport',{staticClass:"kr-designer-view"}),_c('div',{staticClass:"kr-designer-tool"},[_c('el-scrollbar',{staticClass:"kr-designer-tool_con"},[_c('panel',{staticClass:"control-panel"})],1),_c('div',{staticClass:"kr-designer-tool_bar"},[_c('el-button',{attrs:{"size":"mini","type":"success"},on:{"click":_vm.saveTemp}},[_vm._v("保存")]),_c('el-button',{attrs:{"size":"mini","type":"primary"},on:{"click":_vm.previewTemp}},[_vm._v("预览")])],1)],1)],1)}
|
|
var staticRenderFns = []
|
|
|
|
|
|
// CONCATENATED MODULE: ./src/App.vue?vue&type=template&id=023e224e&
|
|
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.js
|
|
var es_symbol = __webpack_require__("a4d3");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
|
|
var es_array_filter = __webpack_require__("4de4");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.for-each.js
|
|
var es_array_for_each = __webpack_require__("4160");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-descriptor.js
|
|
var es_object_get_own_property_descriptor = __webpack_require__("e439");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-descriptors.js
|
|
var es_object_get_own_property_descriptors = __webpack_require__("dbb4");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
|
|
var es_object_keys = __webpack_require__("b64b");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
|
|
var web_dom_collections_for_each = __webpack_require__("159b");
|
|
|
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
function _defineProperty(obj, key, value) {
|
|
if (key in obj) {
|
|
Object.defineProperty(obj, key, {
|
|
value: value,
|
|
enumerable: true,
|
|
configurable: true,
|
|
writable: true
|
|
});
|
|
} else {
|
|
obj[key] = value;
|
|
}
|
|
|
|
return obj;
|
|
}
|
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function ownKeys(object, enumerableOnly) {
|
|
var keys = Object.keys(object);
|
|
|
|
if (Object.getOwnPropertySymbols) {
|
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
});
|
|
keys.push.apply(keys, symbols);
|
|
}
|
|
|
|
return keys;
|
|
}
|
|
|
|
function _objectSpread2(target) {
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
|
|
if (i % 2) {
|
|
ownKeys(Object(source), true).forEach(function (key) {
|
|
_defineProperty(target, key, source[key]);
|
|
});
|
|
} else if (Object.getOwnPropertyDescriptors) {
|
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
} else {
|
|
ownKeys(Object(source)).forEach(function (key) {
|
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
});
|
|
}
|
|
}
|
|
|
|
return target;
|
|
}
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4032e232-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/viewport/index.vue?vue&type=template&id=13113f32&scoped=true&
|
|
var viewportvue_type_template_id_13113f32_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"holder",attrs:{"id":"viewport","data-type":"viewport"}},[_c('div',{staticClass:"screen",style:({
|
|
height: _vm.page.height + 'px',
|
|
width: _vm.page.width + 'px',
|
|
backgroundImage: 'url('+_vm.backImg+')'
|
|
})},[_vm._l((_vm.widgetStore),function(val){return _c(val.type,{key:val.uuid,tag:"component",staticClass:"layer",class:{'active': _vm.widgetId === val.uuid},attrs:{"data-title":val.type,"val":val,"data-type":val.type,"data-uuid":val.uuid}})}),_c('control')],2)])}
|
|
var viewportvue_type_template_id_13113f32_scoped_true_staticRenderFns = []
|
|
|
|
|
|
// CONCATENATED MODULE: ./src/components/viewport/index.vue?vue&type=template&id=13113f32&scoped=true&
|
|
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4032e232-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/viewport/size-control.vue?vue&type=template&id=49942b1a&scoped=true&
|
|
var size_controlvue_type_template_id_49942b1a_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.optionsType !=='page'),expression:"optionsType !=='page'"}]},[_c('div',{staticClass:"verti",style:({
|
|
height: _vm.elm.height + 'px',
|
|
top: _vm.elm.top + 'px',
|
|
left: _vm.elm.left + 'px'
|
|
}),on:{"mousedown":function($event){return _vm.handlemousedown($event, 'left', 'left', 'width')}}},[_c('div',{staticClass:"square"})]),_c('div',{staticClass:"verti",style:({
|
|
height: _vm.elm.height + 'px',
|
|
top: _vm.elm.top + 'px',
|
|
left: _vm.elm.left + _vm.elm.width + 'px'
|
|
}),on:{"mousedown":function($event){return _vm.handlemousedown($event, 'right', 'width')}}},[_c('div',{staticClass:"square"})]),_c('div',{staticClass:"horiz",style:({
|
|
width: _vm.elm.width + 'px',
|
|
top: _vm.elm.top + 'px',
|
|
left: _vm.elm.left + 'px'
|
|
}),on:{"mousedown":function($event){return _vm.handlemousedown($event, 'up', 'top', 'height')}}},[_c('div',{staticClass:"square"})]),_c('div',{staticClass:"horiz",style:({
|
|
width: _vm.elm.width + 'px',
|
|
top: _vm.elm.top + _vm.elm.height + 'px',
|
|
left: _vm.elm.left + 'px'
|
|
}),on:{"mousedown":function($event){return _vm.handlemousedown($event, 'down', 'height')}}},[_c('div',{staticClass:"square"})])])}
|
|
var size_controlvue_type_template_id_49942b1a_scoped_true_staticRenderFns = []
|
|
|
|
|
|
// CONCATENATED MODULE: ./src/components/viewport/size-control.vue?vue&type=template&id=49942b1a&scoped=true&
|
|
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/viewport/size-control.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
/* harmony default export */ var size_controlvue_type_script_lang_js_ = ({
|
|
data: function data() {
|
|
return {
|
|
type: '' // 调整方向 left | right | up | down
|
|
|
|
};
|
|
},
|
|
computed: {
|
|
optionsType: function optionsType() {
|
|
return this.$vptd.state.type;
|
|
},
|
|
elm: function elm() {
|
|
var target = this.$vptd.state.activeElement;
|
|
if (!target.resizable) return '';
|
|
return target;
|
|
}
|
|
},
|
|
methods: {
|
|
handlemousedown: function handlemousedown(e, type, originX, originY) {
|
|
e.stopPropagation();
|
|
this.type = type;
|
|
this.$vptd.commit('initmove', {
|
|
startX: e.pageX,
|
|
startY: e.pageY,
|
|
originX: this.elm[originX],
|
|
originY: this.elm[originY]
|
|
});
|
|
document.addEventListener('mousemove', this.handlemousemove, true);
|
|
document.addEventListener('mouseup', this.handlemouseup, true);
|
|
},
|
|
handlemousemove: function handlemousemove(e) {
|
|
e.stopPropagation();
|
|
e.preventDefault();
|
|
this.$vptd.commit('resize', {
|
|
x: e.pageX,
|
|
y: e.pageY,
|
|
type: this.type
|
|
});
|
|
},
|
|
handlemouseup: function handlemouseup() {
|
|
document.removeEventListener('mousemove', this.handlemousemove, true);
|
|
document.removeEventListener('mouseup', this.handlemouseup, true);
|
|
this.$vptd.commit('stopmove');
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./src/components/viewport/size-control.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var viewport_size_controlvue_type_script_lang_js_ = (size_controlvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./src/components/viewport/size-control.vue?vue&type=style&index=0&id=49942b1a&scoped=true&lang=css&
|
|
var size_controlvue_type_style_index_0_id_49942b1a_scoped_true_lang_css_ = __webpack_require__("bfb1");
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
|
|
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
// This module is a runtime utility for cleaner component module output and will
|
|
// be included in the final webpack user bundle.
|
|
|
|
function normalizeComponent (
|
|
scriptExports,
|
|
render,
|
|
staticRenderFns,
|
|
functionalTemplate,
|
|
injectStyles,
|
|
scopeId,
|
|
moduleIdentifier, /* server only */
|
|
shadowMode /* vue-cli only */
|
|
) {
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (render) {
|
|
options.render = render
|
|
options.staticRenderFns = staticRenderFns
|
|
options._compiled = true
|
|
}
|
|
|
|
// functional template
|
|
if (functionalTemplate) {
|
|
options.functional = true
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = 'data-v-' + scopeId
|
|
}
|
|
|
|
var hook
|
|
if (moduleIdentifier) { // server build
|
|
hook = function (context) {
|
|
// 2.3 injection
|
|
context =
|
|
context || // cached call
|
|
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
// 2.2 with runInNewContext: true
|
|
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
context = __VUE_SSR_CONTEXT__
|
|
}
|
|
// inject component styles
|
|
if (injectStyles) {
|
|
injectStyles.call(this, context)
|
|
}
|
|
// register component module identifier for async chunk inferrence
|
|
if (context && context._registeredComponents) {
|
|
context._registeredComponents.add(moduleIdentifier)
|
|
}
|
|
}
|
|
// used by ssr in case component is cached and beforeCreate
|
|
// never gets called
|
|
options._ssrRegister = hook
|
|
} else if (injectStyles) {
|
|
hook = shadowMode
|
|
? function () {
|
|
injectStyles.call(
|
|
this,
|
|
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
)
|
|
}
|
|
: injectStyles
|
|
}
|
|
|
|
if (hook) {
|
|
if (options.functional) {
|
|
// for template-only hot-reload because in that case the render fn doesn't
|
|
// go through the normalizer
|
|
options._injectStyles = hook
|
|
// register for functional component in vue file
|
|
var originalRender = options.render
|
|
options.render = function renderWithStyleInjection (h, context) {
|
|
hook.call(context)
|
|
return originalRender(h, context)
|
|
}
|
|
} else {
|
|
// inject component registration as beforeCreate hook
|
|
var existing = options.beforeCreate
|
|
options.beforeCreate = existing
|
|
? [].concat(existing, hook)
|
|
: [hook]
|
|
}
|
|
}
|
|
|
|
return {
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
// CONCATENATED MODULE: ./src/components/viewport/size-control.vue
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var component = normalizeComponent(
|
|
viewport_size_controlvue_type_script_lang_js_,
|
|
size_controlvue_type_template_id_49942b1a_scoped_true_render,
|
|
size_controlvue_type_template_id_49942b1a_scoped_true_staticRenderFns,
|
|
false,
|
|
null,
|
|
"49942b1a",
|
|
null
|
|
|
|
)
|
|
|
|
/* harmony default export */ var size_control = (component.exports);
|
|
// CONCATENATED MODULE: ./src/mixins/move.js
|
|
/* harmony default export */ var move = ({
|
|
methods: {
|
|
/**
|
|
* 初始化鼠标拖拽事件
|
|
* @param {*} e
|
|
*/
|
|
initmovement: function initmovement(e) {
|
|
var target = this.$vptd.state.activeElement; // 设置移动状态初始值
|
|
|
|
this.$vptd.commit('initmove', {
|
|
startX: e.pageX,
|
|
startY: e.pageY,
|
|
originX: target.left,
|
|
originY: target.top
|
|
}); // 绑定鼠标移动事件
|
|
|
|
document.addEventListener('mousemove', this.handlemousemove, true); // 取消鼠标移动事件
|
|
|
|
document.addEventListener('mouseup', this.handlemouseup, true);
|
|
},
|
|
|
|
/**
|
|
* 鼠标移动
|
|
* @param {*} e
|
|
*/
|
|
handlemousemove: function handlemousemove(e) {
|
|
e.stopPropagation();
|
|
e.preventDefault();
|
|
this.$vptd.commit('move', {
|
|
x: e.pageX,
|
|
y: e.pageY
|
|
});
|
|
},
|
|
|
|
/**
|
|
* 鼠标up
|
|
*/
|
|
handlemouseup: function handlemouseup() {
|
|
document.removeEventListener('mousemove', this.handlemousemove, true);
|
|
document.removeEventListener('mouseup', this.handlemouseup, true);
|
|
this.$vptd.commit('stopmove');
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/viewport/index.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
/* harmony default export */ var viewportvue_type_script_lang_js_ = ({
|
|
components: {
|
|
control: size_control // 尺寸控制
|
|
|
|
},
|
|
mixins: [move],
|
|
data: function data() {
|
|
return {};
|
|
},
|
|
computed: {
|
|
// 已添加的组件
|
|
widgetStore: function widgetStore() {
|
|
return this.$vptd.state.page.tempItems;
|
|
},
|
|
// 背景图地址
|
|
backImg: function backImg() {
|
|
return this.$vptd.state.page.imageUrl ? this.$vptd.state.page.imageUrl : '';
|
|
},
|
|
// 画布高度
|
|
page: function page() {
|
|
return this.$vptd.state.page;
|
|
},
|
|
// 选中项id
|
|
widgetId: function widgetId() {
|
|
return this.$vptd.state.uuid;
|
|
}
|
|
},
|
|
mounted: function mounted() {
|
|
var _this = this;
|
|
|
|
// 采用事件代理的方式监听元件的选中操作
|
|
var viewportDom = document.getElementById('viewport');
|
|
|
|
if (viewportDom) {
|
|
viewportDom.addEventListener('mousedown', this.handleSelection, false);
|
|
} else {
|
|
console.error('未找的‘viewport’节点');
|
|
} // 绑定键盘上下左右键用于元件的移动
|
|
|
|
|
|
document.addEventListener('keydown', function (e) {
|
|
e.stopPropagation();
|
|
var target = _this.$vptd.state.activeElement; // 左
|
|
|
|
if (e.keyCode === 37 && target.left) {
|
|
target.left -= 1;
|
|
return;
|
|
} // 上
|
|
|
|
|
|
if (e.keyCode === 38 && target.top) {
|
|
e.preventDefault();
|
|
target.top -= 1;
|
|
return;
|
|
} // 右
|
|
|
|
|
|
if (e.keyCode === 39 && target.left) {
|
|
target.left += 1;
|
|
return;
|
|
} // 下
|
|
|
|
|
|
if (e.keyCode === 40 && target.top) {
|
|
e.preventDefault();
|
|
target.top += 1;
|
|
}
|
|
}, true);
|
|
},
|
|
methods: {
|
|
/**
|
|
* 目标元素获得焦点
|
|
*/
|
|
handleSelection: function handleSelection(e) {
|
|
var target = this.selectTarget(e.target);
|
|
|
|
if (target) {
|
|
var uuid = target.getAttribute('data-uuid'); // 设置选中元素
|
|
|
|
this.$vptd.commit('select', {
|
|
uuid: uuid || -1
|
|
}); // 绑定移动事件:除背景图以外的元件才能移动
|
|
|
|
target = this.$vptd.state.activeElement;
|
|
|
|
if (target.dragable) {
|
|
this.initmovement(e); // 参见 mixins
|
|
}
|
|
} else {
|
|
// 取消选中元素
|
|
this.$vptd.commit('select', {
|
|
uuid: -1
|
|
});
|
|
}
|
|
},
|
|
|
|
/**
|
|
* 获得选中的目标,如果没有返回false
|
|
*/
|
|
selectTarget: function selectTarget(target) {
|
|
var type = target.getAttribute('data-type');
|
|
|
|
if (type) {
|
|
if (type === 'viewport') {
|
|
return false;
|
|
} else {
|
|
return target;
|
|
}
|
|
} else {
|
|
return this.selectTarget(target.parentNode);
|
|
}
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./src/components/viewport/index.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var components_viewportvue_type_script_lang_js_ = (viewportvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./src/components/viewport/index.vue?vue&type=style&index=0&id=13113f32&scoped=true&lang=css&
|
|
var viewportvue_type_style_index_0_id_13113f32_scoped_true_lang_css_ = __webpack_require__("3c53");
|
|
|
|
// CONCATENATED MODULE: ./src/components/viewport/index.vue
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var viewport_component = normalizeComponent(
|
|
components_viewportvue_type_script_lang_js_,
|
|
viewportvue_type_template_id_13113f32_scoped_true_render,
|
|
viewportvue_type_template_id_13113f32_scoped_true_staticRenderFns,
|
|
false,
|
|
null,
|
|
"13113f32",
|
|
null
|
|
|
|
)
|
|
|
|
/* harmony default export */ var components_viewport = (viewport_component.exports);
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4032e232-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/panel/index.vue?vue&type=template&id=66835d63&
|
|
var panelvue_type_template_id_66835d63_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"kr-collapse"},[_c('el-collapse',{model:{value:(_vm.activeNames),callback:function ($$v) {_vm.activeNames=$$v},expression:"activeNames"}},[_c('el-collapse-item',{attrs:{"title":"","name":"1"}},[_c('template',{slot:"title"},[_c('span',[_vm._v("页面参数")])]),_c('page')],2),_c('el-collapse-item',{attrs:{"name":"2"}},[_c('template',{slot:"title"},[_c('span',[_vm._v("样式")])]),_c('appearance',{staticClass:"pd-l-10"})],2),_c('el-collapse-item',{attrs:{"name":"3"}},[_c('template',{slot:"title"},[_c('span',[_vm._v("组件")])]),_c('options')],2),_c('el-collapse-item',{attrs:{"name":"4"}},[_c('template',{slot:"title"},[_c('span',[_vm._v("已加组件")])]),_c('layers')],2)],1)],1)}
|
|
var panelvue_type_template_id_66835d63_staticRenderFns = []
|
|
|
|
|
|
// CONCATENATED MODULE: ./src/components/panel/index.vue?vue&type=template&id=66835d63&
|
|
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4032e232-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/panel/page.vue?vue&type=template&id=4f33ebf6&
|
|
var pagevue_type_template_id_4f33ebf6_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('el-form',{staticClass:"kr-form",attrs:{"label-width":"80px","model":_vm.pageInfo,"size":"mini"}},[_c('el-row',[_c('el-form-item',{attrs:{"label":"模板名称"}},[_c('el-input',{staticClass:"full-w",model:{value:(_vm.pageInfo.title),callback:function ($$v) {_vm.$set(_vm.pageInfo, "title", $$v)},expression:"pageInfo.title"}})],1)],1),_c('el-row',[_c('el-col',{attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"模板宽度"}},[_c('el-input-number',{staticClass:"min-input",attrs:{"controls-position":"right","min":0},model:{value:(_vm.pageInfo.width),callback:function ($$v) {_vm.$set(_vm.pageInfo, "width", $$v)},expression:"pageInfo.width"}})],1)],1),_c('el-col',{attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"模板高度"}},[_c('el-input-number',{staticClass:"min-input",attrs:{"controls-position":"right","min":0},model:{value:(_vm.pageInfo.height),callback:function ($$v) {_vm.$set(_vm.pageInfo, "height", $$v)},expression:"pageInfo.height"}})],1)],1)],1),_c('el-row',[_c('el-form-item',{attrs:{"label":"纸张宽度"}},[_c('el-input-number',{staticClass:"min-input",attrs:{"controls-position":"right","min":0},model:{value:(_vm.pageInfo.pageWidth),callback:function ($$v) {_vm.$set(_vm.pageInfo, "pageWidth", $$v)},expression:"pageInfo.pageWidth"}}),_c('span',{staticClass:"unit-text"},[_vm._v("(mm)")])],1)],1),_c('el-row',[_c('el-form-item',{attrs:{"label":"纸张高度"}},[_c('el-input-number',{staticClass:"min-input",attrs:{"controls-position":"right","min":0},model:{value:(_vm.pageInfo.pageHeight),callback:function ($$v) {_vm.$set(_vm.pageInfo, "pageHeight", $$v)},expression:"pageInfo.pageHeight"}}),_c('span',{staticClass:"unit-text"},[_vm._v("(mm)")])],1)],1)],1)],1)}
|
|
var pagevue_type_template_id_4f33ebf6_staticRenderFns = []
|
|
|
|
|
|
// CONCATENATED MODULE: ./src/components/panel/page.vue?vue&type=template&id=4f33ebf6&
|
|
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/panel/page.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
/* harmony default export */ var pagevue_type_script_lang_js_ = ({
|
|
computed: {
|
|
pageInfo: function pageInfo() {
|
|
return this.$vptd.state.page;
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./src/components/panel/page.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var panel_pagevue_type_script_lang_js_ = (pagevue_type_script_lang_js_);
|
|
// CONCATENATED MODULE: ./src/components/panel/page.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var page_component = normalizeComponent(
|
|
panel_pagevue_type_script_lang_js_,
|
|
pagevue_type_template_id_4f33ebf6_render,
|
|
pagevue_type_template_id_4f33ebf6_staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* harmony default export */ var panel_page = (page_component.exports);
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4032e232-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/panel/style.vue?vue&type=template&id=2b1dd4fb&scoped=true&
|
|
var stylevue_type_template_id_2b1dd4fb_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('el-form',{staticClass:"kr-form",attrs:{"label-width":"80px","model":_vm.activeElement,"size":"mini"}},[_c('el-row',[_c('el-col',{attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"宽度"}},[_c('el-input-number',{staticClass:"min-input",attrs:{"controls-position":"right","min":1},model:{value:(_vm.activeElement.width),callback:function ($$v) {_vm.$set(_vm.activeElement, "width", $$v)},expression:"activeElement.width"}})],1)],1),_c('el-col',{attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"高度"}},[_c('el-input-number',{staticClass:"min-input",attrs:{"controls-position":"right","min":1},model:{value:(_vm.activeElement.height),callback:function ($$v) {_vm.$set(_vm.activeElement, "height", $$v)},expression:"activeElement.height"}})],1)],1)],1),_c('el-row',[_c('el-col',{attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"横坐标"}},[_c('el-input-number',{staticClass:"min-input",attrs:{"controls-position":"right","min":0},model:{value:(_vm.activeElement.left),callback:function ($$v) {_vm.$set(_vm.activeElement, "left", $$v)},expression:"activeElement.left"}})],1)],1),_c('el-col',{attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"纵坐标"}},[_c('el-input-number',{staticClass:"min-input",attrs:{"controls-position":"right","min":0},model:{value:(_vm.activeElement.top),callback:function ($$v) {_vm.$set(_vm.activeElement, "top", $$v)},expression:"activeElement.top"}})],1)],1)],1),_c('el-row',[_c('el-col',{attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"字号"}},[_c('el-input-number',{staticClass:"min-input",attrs:{"disabled":_vm.activeElement.style.FontSize===undefined,"controls-position":"right","min":0},model:{value:(_vm.activeElement.style.FontSize),callback:function ($$v) {_vm.$set(_vm.activeElement.style, "FontSize", $$v)},expression:"activeElement.style.FontSize"}})],1)],1),_c('el-col',{attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"加粗"}},[_c('el-switch',{attrs:{"disabled":_vm.activeElement.style.Bold===undefined,"active-value":true,"inactive-value":false},model:{value:(_vm.activeElement.style.Bold),callback:function ($$v) {_vm.$set(_vm.activeElement.style, "Bold", $$v)},expression:"activeElement.style.Bold"}})],1)],1)],1),_c('el-row',[_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":"字体颜色"}},[_c('el-color-picker',{attrs:{"disabled":_vm.activeElement.style.FontColor===undefined},model:{value:(_vm.activeElement.style.FontColor),callback:function ($$v) {_vm.$set(_vm.activeElement.style, "FontColor", $$v)},expression:"activeElement.style.FontColor"}})],1)],1),_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":"边框颜色"}},[_c('el-color-picker',{attrs:{"disabled":_vm.activeElement.style.BorderColor===undefined},model:{value:(_vm.activeElement.style.BorderColor),callback:function ($$v) {_vm.$set(_vm.activeElement.style, "BorderColor", $$v)},expression:"activeElement.style.BorderColor"}})],1)],1),_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":"条码值"}},[_c('el-switch',{attrs:{"disabled":_vm.activeElement.style.ShowBarText===undefined,"active-value":true,"inactive-value":false},model:{value:(_vm.activeElement.style.ShowBarText),callback:function ($$v) {_vm.$set(_vm.activeElement.style, "ShowBarText", $$v)},expression:"activeElement.style.ShowBarText"}})],1)],1)],1),_c('el-row',[_c('el-form-item',{attrs:{"label":"对齐方式"}},[_c('el-radio-group',{attrs:{"disabled":_vm.activeElement.style.Alignment===undefined},model:{value:(_vm.activeElement.style.Alignment),callback:function ($$v) {_vm.$set(_vm.activeElement.style, "Alignment", $$v)},expression:"activeElement.style.Alignment"}},[_c('el-radio',{attrs:{"label":'left'}},[_vm._v("左对齐")]),_c('el-radio',{attrs:{"label":'center'}},[_vm._v("居中")]),_c('el-radio',{attrs:{"label":'right'}},[_vm._v("右对齐")])],1)],1)],1),_c('el-row',[_c('el-col',{attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"条码类型"}},[_c('el-select',{staticClass:"min-input",attrs:{"disabled":_vm.activeElement.style.codeType===undefined},model:{value:(_vm.activeElement.style.codeType),callback:function ($$v) {_vm.$set(_vm.activeElement.style, "codeType", $$v)},expression:"activeElement.style.codeType"}},_vm._l((_vm.codeTypeArray),function(val){return _c('el-option',{key:val,attrs:{"label":val,"value":val}})}),1)],1)],1),_c('el-col',{attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"打印类型"}},[_c('el-select',{staticClass:"min-input",attrs:{"disabled":_vm.activeElement.style.ItemType===undefined},model:{value:(_vm.activeElement.style.ItemType),callback:function ($$v) {_vm.$set(_vm.activeElement.style, "ItemType", $$v)},expression:"activeElement.style.ItemType"}},_vm._l((_vm.itemTypeArray),function(val){return _c('el-option',{key:val.value,attrs:{"label":val.label,"value":val.value}})}),1)],1)],1),_c('el-col',{attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"高度自动"}},[_c('el-switch',{attrs:{"disabled":_vm.activeElement.style.AutoHeight===undefined,"active-value":true,"inactive-value":false},model:{value:(_vm.activeElement.style.AutoHeight),callback:function ($$v) {_vm.$set(_vm.activeElement.style, "AutoHeight", $$v)},expression:"activeElement.style.AutoHeight"}})],1)],1),_c('el-col',{attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"下边距"}},[_c('el-input-number',{staticClass:"min-input",attrs:{"disabled":_vm.activeElement.style.BottomMargin===undefined || !_vm.activeElement.style.AutoHeight,"controls-position":"right","min":0},model:{value:(_vm.activeElement.style.BottomMargin),callback:function ($$v) {_vm.$set(_vm.activeElement.style, "BottomMargin", $$v)},expression:"activeElement.style.BottomMargin"}})],1)],1)],1)],1)],1)}
|
|
var stylevue_type_template_id_2b1dd4fb_scoped_true_staticRenderFns = []
|
|
|
|
|
|
// CONCATENATED MODULE: ./src/components/panel/style.vue?vue&type=template&id=2b1dd4fb&scoped=true&
|
|
|
|
// CONCATENATED MODULE: ./src/libs/props.js
|
|
var getDefaultProps = function getDefaultProps() {
|
|
return {
|
|
uuid: '',
|
|
type: 'braid-txt',
|
|
name: '',
|
|
isEdit: true,
|
|
dragable: true,
|
|
// 是否可拖拽
|
|
resizable: true,
|
|
// 尺寸是否可变
|
|
width: 120,
|
|
height: 40,
|
|
left: 50,
|
|
top: 0,
|
|
value: '自定义文本',
|
|
title: '自定义文本',
|
|
defaultValue: '自定义文本',
|
|
style: {
|
|
zIndex: 1
|
|
}
|
|
};
|
|
};
|
|
var getCodeTypeArray = function getCodeTypeArray() {
|
|
return ['128A', '128B', '128C', '128Auto', 'EAN8', 'EAN13', 'EAN128A', 'EAN128B', 'EAN128C', 'Code39', '39Extended', '2_5interleaved', '2_5industrial', '2_5matrix', 'UPC_A', 'UPC_E0', 'UPC_E1', 'UPCsupp2', 'UPCsupp5', 'Code93', '93Extended', 'MSI', 'PostNet', 'Codabar', 'QRCode', 'PDF417'];
|
|
};
|
|
var getItemTypeArray = function getItemTypeArray() {
|
|
return [{
|
|
label: '普通项',
|
|
value: 0
|
|
}, {
|
|
label: '页眉页脚',
|
|
value: 1
|
|
}, {
|
|
label: '页号项',
|
|
value: 2
|
|
}, {
|
|
label: '页数项',
|
|
value: 3
|
|
}, {
|
|
label: '多页项',
|
|
value: 4
|
|
}];
|
|
};
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/panel/style.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
/* harmony default export */ var stylevue_type_script_lang_js_ = ({
|
|
data: function data() {
|
|
return {
|
|
codeTypeArray: getCodeTypeArray(),
|
|
itemTypeArray: getItemTypeArray()
|
|
};
|
|
},
|
|
computed: {
|
|
activeElement: function activeElement() {
|
|
return this.$vptd.state.activeElement;
|
|
},
|
|
// 页面高度
|
|
height: function height() {
|
|
return this.$vptd.state.page.height;
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./src/components/panel/style.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var panel_stylevue_type_script_lang_js_ = (stylevue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./src/components/panel/style.vue?vue&type=style&index=0&id=2b1dd4fb&lang=scss&scoped=true&
|
|
var stylevue_type_style_index_0_id_2b1dd4fb_lang_scss_scoped_true_ = __webpack_require__("760d");
|
|
|
|
// CONCATENATED MODULE: ./src/components/panel/style.vue
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var style_component = normalizeComponent(
|
|
panel_stylevue_type_script_lang_js_,
|
|
stylevue_type_template_id_2b1dd4fb_scoped_true_render,
|
|
stylevue_type_template_id_2b1dd4fb_scoped_true_staticRenderFns,
|
|
false,
|
|
null,
|
|
"2b1dd4fb",
|
|
null
|
|
|
|
)
|
|
|
|
/* harmony default export */ var style = (style_component.exports);
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4032e232-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/panel/options/index.vue?vue&type=template&id=74b788e6&scoped=true&
|
|
var optionsvue_type_template_id_74b788e6_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"options-box"},[_vm._l((_vm.optionItems),function(item,index){return [(item.type == 'braid-table')?_c('el-popover',{key:index,attrs:{"placement":"top","width":"200"},model:{value:(_vm.tablePopover),callback:function ($$v) {_vm.tablePopover=$$v},expression:"tablePopover"}},[_c('div',[_c('el-checkbox-group',{model:{value:(item.selectCol),callback:function ($$v) {_vm.$set(item, "selectCol", $$v)},expression:"item.selectCol"}},[_c('el-row',_vm._l((item.columnsAttr),function(col){return _c('el-col',{key:col.name,attrs:{"span":12}},[_c('el-checkbox',{attrs:{"label":col.name}},[_vm._v(_vm._s(col.title))])],1)}),1)],1),_c('el-button',{attrs:{"size":"mini","type":"primary"},on:{"click":function (e) {_vm.addTempItem(e,item)}}},[_vm._v("确定")])],1),_c('el-button',{attrs:{"slot":"reference","size":"mini"},slot:"reference"},[_vm._v(_vm._s(item.title))])],1):_c('el-button',{key:index,attrs:{"size":"mini"},on:{"click":function (e) {_vm.addTempItem(e,item)}}},[_vm._v(_vm._s(item.title))])]})],2)}
|
|
var optionsvue_type_template_id_74b788e6_scoped_true_staticRenderFns = []
|
|
|
|
|
|
// CONCATENATED MODULE: ./src/components/panel/options/index.vue?vue&type=template&id=74b788e6&scoped=true&
|
|
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.find.js
|
|
var es_array_find = __webpack_require__("7db0");
|
|
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/panel/options/index.vue?vue&type=script&lang=js&
|
|
|
|
|
|
|
|
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
/* harmony default export */ var optionsvue_type_script_lang_js_ = ({
|
|
data: function data() {
|
|
return {
|
|
tablePopover: false
|
|
};
|
|
},
|
|
computed: {
|
|
optionItems: function optionItems() {
|
|
return this.$vptd.state.optionItems;
|
|
}
|
|
},
|
|
methods: {
|
|
// 添加组件
|
|
addTempItem: function addTempItem(e, item) {
|
|
switch (item.type) {
|
|
case 'braid-table':
|
|
{
|
|
var selectCol = [];
|
|
item.selectCol.forEach(function (itemName) {
|
|
var colInfo = item.columnsAttr.find(function (col) {
|
|
return col.name === itemName;
|
|
});
|
|
|
|
if (colInfo) {
|
|
selectCol.push(colInfo);
|
|
}
|
|
});
|
|
item.columns = selectCol; //表格显示的字段
|
|
|
|
this.$vptd.dispatch('addTempItem', item);
|
|
this.tablePopover = false;
|
|
break;
|
|
}
|
|
|
|
default:
|
|
this.$vptd.dispatch('addTempItem', item);
|
|
}
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./src/components/panel/options/index.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var panel_optionsvue_type_script_lang_js_ = (optionsvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./src/components/panel/options/index.vue?vue&type=style&index=0&id=74b788e6&lang=scss&scoped=true&
|
|
var optionsvue_type_style_index_0_id_74b788e6_lang_scss_scoped_true_ = __webpack_require__("e36a");
|
|
|
|
// CONCATENATED MODULE: ./src/components/panel/options/index.vue
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var options_component = normalizeComponent(
|
|
panel_optionsvue_type_script_lang_js_,
|
|
optionsvue_type_template_id_74b788e6_scoped_true_render,
|
|
optionsvue_type_template_id_74b788e6_scoped_true_staticRenderFns,
|
|
false,
|
|
null,
|
|
"74b788e6",
|
|
null
|
|
|
|
)
|
|
|
|
/* harmony default export */ var panel_options = (options_component.exports);
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4032e232-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/panel/layers.vue?vue&type=template&id=a1ea05ca&scoped=true&
|
|
var layersvue_type_template_id_a1ea05ca_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"tag-box"},_vm._l((_vm.layers),function(layer,index){return _c('el-tag',{key:index,attrs:{"closable":layer === _vm.activeElement?true:false,"size":"small","type":layer === _vm.activeElement?'':'info'},on:{"click":function (e) {_vm.activeLayer(e, layer)},"close":function (e) {_vm.dele(e, layer)}}},[_vm._v(_vm._s(layer.title))])}),1)}
|
|
var layersvue_type_template_id_a1ea05ca_scoped_true_staticRenderFns = []
|
|
|
|
|
|
// CONCATENATED MODULE: ./src/components/panel/layers.vue?vue&type=template&id=a1ea05ca&scoped=true&
|
|
|
|
// CONCATENATED MODULE: ./src/utils/offset.js
|
|
/**
|
|
* 获取元素位置
|
|
* @param {*} element
|
|
*/
|
|
function cumulativeOffset(element) {
|
|
var top = el.offsetTop;
|
|
var left = el.offsetLeft;
|
|
return {
|
|
top: top,
|
|
left: left
|
|
};
|
|
}
|
|
/**
|
|
* 判断元素是否在窗口内
|
|
* @param {*} el
|
|
*/
|
|
|
|
function checkInView(el) {
|
|
var rect = el.getBoundingClientRect();
|
|
return rect.top > 0 && rect.top < window.innerHeight && rect.left < window.innerWidth && rect.right > 0;
|
|
}
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/panel/layers.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
/* harmony default export */ var layersvue_type_script_lang_js_ = ({
|
|
computed: {
|
|
// 已添加的组件
|
|
layers: function layers() {
|
|
return this.$vptd.state.page.tempItems;
|
|
},
|
|
activeElement: function activeElement() {
|
|
return this.$vptd.state.activeElement;
|
|
}
|
|
},
|
|
methods: {
|
|
activeLayer: function activeLayer(e, item) {
|
|
this.$vptd.commit('select', {
|
|
uuid: item.uuid
|
|
});
|
|
var viewport = document.querySelector('#viewport');
|
|
|
|
if (viewport) {
|
|
var target = viewport.querySelector("[data-uuid='".concat(item.uuid, "']"));
|
|
|
|
if (target && !checkInView(target)) {
|
|
viewport.scrollTop = cumulativeOffset(target).top - 50;
|
|
}
|
|
} else {
|
|
console.error('未找到 "#viewport" 的节点');
|
|
}
|
|
},
|
|
// 删除元件
|
|
dele: function dele(e, item) {
|
|
this.$vptd.commit('delete', item.uuid);
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./src/components/panel/layers.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var panel_layersvue_type_script_lang_js_ = (layersvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./src/components/panel/layers.vue?vue&type=style&index=0&id=a1ea05ca&lang=scss&scoped=true&
|
|
var layersvue_type_style_index_0_id_a1ea05ca_lang_scss_scoped_true_ = __webpack_require__("7e95");
|
|
|
|
// CONCATENATED MODULE: ./src/components/panel/layers.vue
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var layers_component = normalizeComponent(
|
|
panel_layersvue_type_script_lang_js_,
|
|
layersvue_type_template_id_a1ea05ca_scoped_true_render,
|
|
layersvue_type_template_id_a1ea05ca_scoped_true_staticRenderFns,
|
|
false,
|
|
null,
|
|
"a1ea05ca",
|
|
null
|
|
|
|
)
|
|
|
|
/* harmony default export */ var panel_layers = (layers_component.exports);
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/panel/index.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var panelvue_type_script_lang_js_ = ({
|
|
components: {
|
|
page: panel_page,
|
|
appearance: style,
|
|
options: panel_options,
|
|
layers: panel_layers
|
|
},
|
|
data: function data() {
|
|
return {
|
|
activeNames: ['1', '2', '3', '4']
|
|
};
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./src/components/panel/index.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var components_panelvue_type_script_lang_js_ = (panelvue_type_script_lang_js_);
|
|
// CONCATENATED MODULE: ./src/components/panel/index.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var panel_component = normalizeComponent(
|
|
components_panelvue_type_script_lang_js_,
|
|
panelvue_type_template_id_66835d63_render,
|
|
panelvue_type_template_id_66835d63_staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* harmony default export */ var panel = (panel_component.exports);
|
|
// EXTERNAL MODULE: ./node_modules/lodash/cloneDeep.js
|
|
var cloneDeep = __webpack_require__("0644");
|
|
var cloneDeep_default = /*#__PURE__*/__webpack_require__.n(cloneDeep);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=script&lang=js&
|
|
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
/* harmony default export */ var Appvue_type_script_lang_js_ = ({
|
|
name: 'kr-print-designer',
|
|
components: {
|
|
Viewport: components_viewport,
|
|
Panel: panel
|
|
},
|
|
props: {
|
|
widgetOptions: {
|
|
type: Array,
|
|
default: function _default() {
|
|
return [];
|
|
}
|
|
},
|
|
tempValue: {
|
|
type: Object,
|
|
default: function _default() {
|
|
return {
|
|
title: 'demo',
|
|
width: 750,
|
|
height: 550,
|
|
pageWidth: 750,
|
|
pageHeight: 550,
|
|
tempItems: []
|
|
};
|
|
}
|
|
}
|
|
},
|
|
created: function created() {
|
|
this.initTemp(this.tempValue, this.widgetOptions);
|
|
},
|
|
methods: {
|
|
// 保存模板
|
|
saveTemp: function saveTemp() {
|
|
var page = this.$vptd.state.page;
|
|
this.$emit('save', cloneDeep_default()(page));
|
|
},
|
|
// 预览模板
|
|
previewTemp: function previewTemp() {
|
|
var page = _objectSpread2({}, this.$vptd.state.page);
|
|
|
|
this.$lodop.previewTemp(cloneDeep_default()(page));
|
|
},
|
|
// 初始化设计器
|
|
initTemp: function initTemp(tempValue, widgetOptions) {
|
|
this.$vptd.dispatch('designerInit', {
|
|
tempValue: cloneDeep_default()(tempValue),
|
|
options: cloneDeep_default()(widgetOptions)
|
|
});
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./src/App.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var src_Appvue_type_script_lang_js_ = (Appvue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./src/App.vue?vue&type=style&index=0&lang=scss&
|
|
var Appvue_type_style_index_0_lang_scss_ = __webpack_require__("5c0b");
|
|
|
|
// CONCATENATED MODULE: ./src/App.vue
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var App_component = normalizeComponent(
|
|
src_Appvue_type_script_lang_js_,
|
|
render,
|
|
staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* harmony default export */ var App = (App_component.exports);
|
|
// EXTERNAL MODULE: ./src/assets/style/index.scss
|
|
var assets_style = __webpack_require__("44fd");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.index-of.js
|
|
var es_array_index_of = __webpack_require__("c975");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
|
|
var es_regexp_exec = __webpack_require__("ac1f");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js
|
|
var es_string_match = __webpack_require__("466d");
|
|
|
|
// EXTERNAL MODULE: ./theme-chalk/message-box.css
|
|
var message_box = __webpack_require__("df69");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/message-box.js
|
|
var lib_message_box = __webpack_require__("6ed5");
|
|
var lib_message_box_default = /*#__PURE__*/__webpack_require__.n(lib_message_box);
|
|
|
|
// CONCATENATED MODULE: ./src/libs/lodop/LodopFuncs.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//==本JS是加载Lodop插件及CLodop服务的综合示例,可直接使用,建议看懂后融进自己页面程序==
|
|
var CreatedOKLodopObject, CLodopIsLocal, CLodopJsState; //==判断是否需要CLodop(那些不支持插件的浏览器):==
|
|
|
|
function needCLodop() {
|
|
try {
|
|
var ua = navigator.userAgent;
|
|
if (ua.match(/Windows\sPhone/i)) return true;
|
|
if (ua.match(/iPhone|iPod|iPad/i)) return true;
|
|
if (ua.match(/Android/i)) return true;
|
|
if (ua.match(/Edge\D?\d+/i)) return true;
|
|
var verTrident = ua.match(/Trident\D?\d+/i);
|
|
var verIE = ua.match(/MSIE\D?\d+/i);
|
|
var verOPR = ua.match(/OPR\D?\d+/i);
|
|
var verFF = ua.match(/Firefox\D?\d+/i);
|
|
var x64 = ua.match(/x64/i);
|
|
if (!verTrident && !verIE && x64) return true;else if (verFF) {
|
|
verFF = verFF[0].match(/\d+/);
|
|
if (verFF[0] >= 41 || x64) return true;
|
|
} else if (verOPR) {
|
|
verOPR = verOPR[0].match(/\d+/);
|
|
if (verOPR[0] >= 32) return true;
|
|
} else if (!verTrident && !verIE) {
|
|
var verChrome = ua.match(/Chrome\D?\d+/i);
|
|
|
|
if (verChrome) {
|
|
verChrome = verChrome[0].match(/\d+/);
|
|
if (verChrome[0] >= 41) return true;
|
|
}
|
|
}
|
|
return false;
|
|
} catch (err) {
|
|
return true;
|
|
}
|
|
} //==引用CLodop的主JS,用双端口8000和18000(以防其中一个被占):==
|
|
|
|
|
|
if (needCLodop()) {
|
|
var head = document.head || document.getElementsByTagName('head')[0] || document.documentElement;
|
|
var JS1 = document.createElement('script');
|
|
JS1.src = 'http://localhost:8000/CLodopfuncs.js?priority=1';
|
|
head.insertBefore(JS1, head.firstChild);
|
|
var JS2 = document.createElement('script');
|
|
JS2.src = 'http://localhost:18000/CLodopfuncs.js?priority=0';
|
|
head.insertBefore(JS2, head.firstChild);
|
|
CLodopIsLocal = !!(JS1.src + JS2.src).match(/\/\/localho|\/\/127.0.0./i);
|
|
|
|
if (JS1.attachEvent) {
|
|
CLodopJsState = 'loading';
|
|
|
|
var onChange = function onChange() {
|
|
if (window.event.srcElement.readyState == 'loaded') CLodopJsState = 'complete';
|
|
};
|
|
|
|
JS1.attachEvent('onreadystatechange', onChange);
|
|
JS2.attachEvent('onreadystatechange', onChange);
|
|
}
|
|
} // /
|
|
//==获取LODOP对象主过程,判断是否安装、需否升级:==
|
|
|
|
|
|
function getLodop(oOBJECT, oEMBED) {
|
|
var exeUrl = 'http://www.lodop.net/download.html';
|
|
var strHtmInstall = '<br><font color=\'#FF00FF\'>打印控件未安装!点击这里<a href=' + exeUrl + ' target=\'_blank\'>下载</a>,安装后请刷新页面或重新进入。</font>';
|
|
var strHtmUpdate = '<br><font color=\'#FF00FF\'>打印控件需要升级!点击这里<a href=' + exeUrl + ' target=\'_blank\'>下载</a>,升级后请重新进入。</font>';
|
|
var strHtm64_Install = '<br><font color=\'#FF00FF\'>打印控件未安装!点击这里<a href=' + exeUrl + ' target=\'_blank\'>下载</a>,安装后请刷新页面或重新进入。</font>';
|
|
var strHtm64_Update = '<br><font color=\'#FF00FF\'>打印控件需要升级!点击这里<a href=' + exeUrl + ' target=\'_blank\'>下载</a>,升级后请重新进入。</font>';
|
|
var strHtmFireFox = '<br><font color=\'#FF00FF\'>(注意:如曾安装过Lodop旧版附件npActiveXPLugin,请在【工具】->【附加组件】->【扩展】中先卸它)</font>';
|
|
var strHtmChrome = '<br><font color=\'#FF00FF\'>(如果此前正常,仅因浏览器升级或重安装而出问题,需重新执行以上安装)</font>';
|
|
var strCLodopInstall_1 = '<br><font color=\'#FF00FF\'>Web打印服务CLodop未安装启动,点击这里<a href=' + exeUrl + ' target=\'_blank\'>下载</a>,';
|
|
var strCLodopInstall_2 = '<br>(若此前已安装过,可<a href=\'CLodop.protocol:setup\' target=\'_self\'>点这里直接再次启动</a>)';
|
|
var strCLodopInstall_3 = ',成功后请刷新本页面。</font>';
|
|
var strCLodopUpdate = '<br><font color=\'#FF00FF\'>Web打印服务CLodop需升级!点击这里<a href=' + exeUrl + ' target=\'_blank\'>下载</a>,,升级后请刷新页面。</font>';
|
|
var LODOP;
|
|
|
|
try {
|
|
var ua = navigator.userAgent;
|
|
var isIE = !!ua.match(/MSIE/i) || !!ua.match(/Trident/i);
|
|
|
|
if (needCLodop()) {
|
|
try {
|
|
LODOP = window.getCLodop();
|
|
} catch (err) {
|
|
'';
|
|
}
|
|
|
|
if (!LODOP && (document.readyState !== 'complete' || isIE && CLodopJsState == 'loading')) {
|
|
alert('网页还没下载完毕,请稍等一下再操作.');
|
|
return;
|
|
}
|
|
|
|
if (!LODOP) {
|
|
lib_message_box_default.a.alert(strCLodopInstall_1 + (CLodopIsLocal ? strCLodopInstall_2 : '') + strCLodopInstall_3, '提示', {
|
|
dangerouslyUseHTMLString: true
|
|
}); //document.body.innerHTML = strCLodopInstall_1 + (CLodopIsLocal ? strCLodopInstall_2 : '') + strCLodopInstall_3 + document.body.innerHTML
|
|
|
|
|
|
return;
|
|
} else {
|
|
if (window.CLODOP.CVERSION < '3.0.9.3') {
|
|
lib_message_box_default.a.alert(strCLodopUpdate, '提示', {
|
|
dangerouslyUseHTMLString: true
|
|
}); //document.body.innerHTML = strCLodopUpdate + document.body.innerHTML
|
|
|
|
}
|
|
|
|
if (oEMBED && oEMBED.parentNode) oEMBED.parentNode.removeChild(oEMBED);
|
|
if (oOBJECT && oOBJECT.parentNode) oOBJECT.parentNode.removeChild(oOBJECT);
|
|
}
|
|
} else {
|
|
var is64IE = isIE && !!ua.match(/x64/i); //==如果页面有Lodop就直接使用,否则新建:==
|
|
|
|
if (oOBJECT || oEMBED) {
|
|
if (isIE) LODOP = oOBJECT;else LODOP = oEMBED;
|
|
} else if (!CreatedOKLodopObject) {
|
|
LODOP = document.createElement('object');
|
|
LODOP.setAttribute('width', 0);
|
|
LODOP.setAttribute('height', 0);
|
|
LODOP.setAttribute('style', 'position:absolute;left:0px;top:-100px;width:0px;height:0px;');
|
|
if (isIE) LODOP.setAttribute('classid', 'clsid:2105C259-1E0C-4534-8141-A753534CB4CA');else LODOP.setAttribute('type', 'application/x-print-lodop');
|
|
document.documentElement.appendChild(LODOP);
|
|
CreatedOKLodopObject = LODOP;
|
|
} else LODOP = CreatedOKLodopObject; //==Lodop插件未安装时提示下载地址:==
|
|
|
|
|
|
if (!LODOP || !LODOP.VERSION) {
|
|
if (ua.indexOf('Chrome') >= 0) lib_message_box_default.a.alert(strHtmChrome, '提示', {
|
|
dangerouslyUseHTMLString: true
|
|
}); //document.body.innerHTML = strHtmChrome + document.body.innerHTML
|
|
|
|
if (ua.indexOf('Firefox') >= 0) lib_message_box_default.a.alert((is64IE ? strHtm64_Install : strHtmInstall) + strHtmFireFox, '提示', {
|
|
dangerouslyUseHTMLString: true
|
|
}); // document.body.innerHTML = strHtmFireFox + document.body.innerHTML
|
|
// document.body.innerHTML = (is64IE ? strHtm64_Install : strHtmInstall) + document.body.innerHTML
|
|
|
|
return LODOP;
|
|
}
|
|
}
|
|
|
|
if (LODOP.VERSION < '6.2.2.6') {
|
|
if (!needCLodop()) lib_message_box_default.a.alert(is64IE ? strHtm64_Update : strHtmUpdate, '提示', {
|
|
dangerouslyUseHTMLString: true
|
|
}); //document.body.innerHTML = (is64IE ? strHtm64_Update : strHtmUpdate) + document.body.innerHTML
|
|
} //===如下空白位置适合调用统一功能(如注册语句、语言选择等):==
|
|
//=======================================================
|
|
|
|
|
|
return LODOP;
|
|
} catch (err) {
|
|
alert('getLodop出错:' + err);
|
|
}
|
|
}
|
|
|
|
/* harmony default export */ var LodopFuncs = (getLodop);
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.find-index.js
|
|
var es_array_find_index = __webpack_require__("c740");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
|
|
var es_array_map = __webpack_require__("d81d");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js
|
|
var es_array_splice = __webpack_require__("a434");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
|
|
var es_string_replace = __webpack_require__("5319");
|
|
|
|
// CONCATENATED MODULE: ./src/libs/lodop/tools.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* 通过模板和模板数据生成打印内容
|
|
* @param temp 打印模板
|
|
* @param data 模板数据
|
|
*/
|
|
var tempToPrint = function tempToPrint(temp, data) {
|
|
var printContent = temp.map(function (item) {
|
|
var reg = /({[^{]*})/g;
|
|
var value = item.value.replace(reg, data[item.name] || '');
|
|
return {
|
|
top: item.top,
|
|
left: item.left,
|
|
width: item.width,
|
|
height: item.height,
|
|
value: value
|
|
};
|
|
});
|
|
return printContent;
|
|
};
|
|
/**
|
|
* braid-tabel类型的模板转换成html
|
|
* @param columns 表格列配置信息
|
|
* @param data 表格数据
|
|
*/
|
|
|
|
var tableTempTohtml = function tableTempTohtml(columns, data, style) {
|
|
// 表格全局样式
|
|
var styleStr = 'text-align:' + style.Alignment + ';';
|
|
styleStr += 'font-size:' + style.FontSize + 'pt;';
|
|
styleStr += 'color:' + style.FontColor + ';';
|
|
var html = '<style> table td,table th {word-break: break-all;box-sizing:border-box;border:1px solid ' + style.BorderColor + '}</style>';
|
|
html += '<table border=1 width=\'100%\' cellspacing=\'0\' frame="box" cellpadding=\'2\' style=\'border-collapse:collapse;' + styleStr + '\' bordercolor=\'' + style.BorderColor + '\'>'; // 解析表头
|
|
|
|
html += '<thead><tr>';
|
|
columns.forEach(function (column) {
|
|
if (column.name === '_seq') {
|
|
// 序号列
|
|
html += '<th width="30">';
|
|
} else {
|
|
html += '<th>';
|
|
}
|
|
|
|
html += column.title;
|
|
html += '</th>';
|
|
});
|
|
html += '</tr></thead>';
|
|
html += '<tbody>'; // 解析内容
|
|
|
|
if (Array.isArray(data)) {
|
|
data.forEach(function (item, idx) {
|
|
html += '<tr>';
|
|
columns.forEach(function (column) {
|
|
if (column.name === '_seq') {
|
|
html += '<td>';
|
|
html += idx + 1;
|
|
} else {
|
|
html += '<td>';
|
|
html += item[column.name];
|
|
}
|
|
|
|
html += '</td>';
|
|
});
|
|
html += '</tr>';
|
|
});
|
|
}
|
|
|
|
html += '</tbody>';
|
|
html += '</table>';
|
|
return html;
|
|
};
|
|
/**
|
|
* braid-image类型的模板转换成html
|
|
* @param value 图片相对地址
|
|
*/
|
|
|
|
var imageTempTohtml = function imageTempTohtml(value) {
|
|
var html = '<img style=\'width:100%\' src=\'' + value + '\'/>';
|
|
return html;
|
|
};
|
|
/**
|
|
* 将字符串模板中{}内的内容替换成指定值
|
|
* @param str 表格列配置信息
|
|
* @param value 表格数据
|
|
*/
|
|
|
|
var strTempToValue = function strTempToValue(str, value) {
|
|
var reg = /({[^}^{]*})/g;
|
|
return str.replace(reg, value || '');
|
|
};
|
|
var htmlTempTohtml = function htmlTempTohtml(val, style) {
|
|
// 表格全局样式
|
|
var styleStr = 'text-align:' + style.Alignment + ';';
|
|
styleStr += 'font-size:' + style.FontSize + 'pt;';
|
|
styleStr += 'color:' + style.FontColor + ';';
|
|
var html = '<span style=\'' + styleStr + '\'>';
|
|
html += val;
|
|
html += '</span>'; // console.log(html)
|
|
|
|
return html;
|
|
};
|
|
// CONCATENATED MODULE: ./src/libs/lodop/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var strCompanyName = '';
|
|
var strLicense = '';
|
|
var strLicenseA = '';
|
|
var strLicenseB = '';
|
|
/* harmony default export */ var lodop = ({
|
|
print: print,
|
|
preview: preview,
|
|
previewTemp: lodop_previewTemp,
|
|
setLicenses: setLicenses
|
|
});
|
|
/**
|
|
* 设置Lodop打印软件产品注册信息
|
|
* @param {*} licenseInfo
|
|
*/
|
|
|
|
function setLicenses(licenseInfo) {
|
|
strCompanyName = licenseInfo.strCompanyName || '';
|
|
strLicense = licenseInfo.strLicense || '';
|
|
strLicenseA = licenseInfo.strLicenseA || '';
|
|
strLicenseB = licenseInfo.strLicenseB || '';
|
|
}
|
|
/**
|
|
* 打印功能
|
|
* @param {*Object} temp 打印模板
|
|
* @param {*Array} data 打印数据
|
|
*/
|
|
|
|
|
|
function print(temp, data) {
|
|
var LODOP = _CreateLodop(temp.title, temp.width, temp.height, temp.pageWidth, temp.pageHeight);
|
|
|
|
var tempItems = cloneDeep_default()(temp.tempItems);
|
|
|
|
var printContent = _TempParser(tempItems, data);
|
|
|
|
if (printContent.length > 1) {
|
|
// 打印多份
|
|
printContent.forEach(function (aPrint, index) {
|
|
LODOP.NewPageA();
|
|
aPrint.forEach(function (printItem) {
|
|
_AddPrintItem(LODOP, printItem, index);
|
|
});
|
|
});
|
|
} else {
|
|
// 单份
|
|
printContent[0].forEach(function (printItem) {
|
|
_AddPrintItem(LODOP, printItem);
|
|
});
|
|
}
|
|
|
|
var flag = LODOP.PRINT();
|
|
return flag;
|
|
}
|
|
/**
|
|
* 打印预览功能
|
|
* @param {*Object} temp 打印模板
|
|
* @param {*Array} data 打印数据
|
|
*/
|
|
|
|
|
|
function preview(temp, data) {
|
|
var LODOP = _CreateLodop(temp.title, temp.width, temp.height, temp.pageWidth, temp.pageHeight);
|
|
|
|
var tempItems = cloneDeep_default()(temp.tempItems);
|
|
|
|
var printContent = _TempParser(tempItems, data);
|
|
|
|
if (data.length > 1) {
|
|
// 打印多份
|
|
printContent.forEach(function (aPrint, index) {
|
|
LODOP.NewPageA();
|
|
aPrint.forEach(function (printItem) {
|
|
_AddPrintItem(LODOP, printItem, index);
|
|
});
|
|
});
|
|
} else {
|
|
// 单份
|
|
printContent[0].forEach(function (printItem) {
|
|
_AddPrintItem(LODOP, printItem);
|
|
});
|
|
}
|
|
|
|
var flag = LODOP.PREVIEW();
|
|
return flag;
|
|
}
|
|
/**
|
|
* 模板预览功能
|
|
* @param {*Object} temp 打印模板
|
|
*/
|
|
|
|
|
|
function lodop_previewTemp(temp) {
|
|
var LODOP = _CreateLodop(temp.title, temp.width, temp.height, temp.pageWidth, temp.pageHeight);
|
|
|
|
var printContent = _TempParser(temp.tempItems);
|
|
|
|
printContent[0].forEach(function (printItem) {
|
|
_AddPrintItem(LODOP, printItem);
|
|
});
|
|
var flag = LODOP.PREVIEW();
|
|
return flag;
|
|
}
|
|
/**
|
|
* LODOP 根据属性创建打印
|
|
* @param pageName 纸张名称
|
|
* @param width 可视区域宽度(单位px)
|
|
* @param height 可视区域高度(单位px)
|
|
* @param pageWidth 纸张宽度(mm)
|
|
* @param pageHeight 纸张高度(mm)
|
|
* @param top 可视区域上边距(单位px)
|
|
* @param left 可视区域左边距(单位px)
|
|
*/
|
|
|
|
|
|
function _CreateLodop(pageName, width, height) {
|
|
var pageWidth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
var pageHeight = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
var top = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
|
|
var left = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0;
|
|
var LODOP = LodopFuncs(); // console.log(strCompanyName, strLicense, strLicenseA, strLicenseB)
|
|
// 设置软件产品注册信息
|
|
|
|
LODOP.SET_LICENSES(strCompanyName, strLicense, strLicenseA, strLicenseB);
|
|
LODOP.PRINT_INITA(top, left, width, height, pageName);
|
|
LODOP.SET_PRINT_PAGESIZE(1, pageWidth ? pageWidth + 'mm' : 0, pageHeight ? pageHeight + 'mm' : 0, '');
|
|
return LODOP;
|
|
}
|
|
/**
|
|
* 解析模板和数据生成打印项
|
|
* @param {*Array} tempItem 模板打赢项
|
|
* @param {Array} data 打印数据,
|
|
* @return {Array} 若data为null则返回处理后的模板
|
|
*/
|
|
|
|
|
|
function _TempParser(tempItem, data) {
|
|
var temp = cloneDeep_default()(tempItem); //修改模板答应项顺序
|
|
//将自适应高度的打印项(item.style.AutoHeight == true)放在第一项
|
|
|
|
var flag = temp.findIndex(function (item) {
|
|
return item.style.AutoHeight;
|
|
});
|
|
|
|
if (flag != -1) {
|
|
var autoItem = temp[flag];
|
|
temp.splice(flag, 1);
|
|
temp.unshift(autoItem); // 处理位于自适应打印项下方的打印项
|
|
|
|
temp.forEach(function (item) {
|
|
// 位于自适应高度项下的打印项修改top、left,并添加关联属性(style.LinkedItem)
|
|
if (item.top > autoItem.top && item.style.ItemType == 0) {
|
|
item.top = item.top - autoItem.top - autoItem.height;
|
|
item.left = item.left - autoItem.left;
|
|
item.style.LinkedItem = 1;
|
|
}
|
|
});
|
|
}
|
|
|
|
if (data && data.length > 0) {
|
|
// 解析打印模板和数据,生成生成打印内容
|
|
var tempContent = [];
|
|
data.forEach(function (dataItem) {
|
|
var conItem = temp.map(function (tempItem) {
|
|
var item = cloneDeep_default()(tempItem);
|
|
|
|
if (item.name) {
|
|
item.defaultValue = dataItem[item.name];
|
|
item.value = strTempToValue(item.value, item.defaultValue);
|
|
}
|
|
|
|
return item;
|
|
});
|
|
tempContent.push(conItem);
|
|
});
|
|
return tempContent;
|
|
} else {
|
|
return [temp];
|
|
}
|
|
}
|
|
/**
|
|
* 添加打印项
|
|
* @param {lodop} LODOP 打印实例
|
|
* @param {Object} printItem 打印项内容
|
|
* @param {Number} pageIndex 当前打印页的开始序号
|
|
*/
|
|
|
|
|
|
function _AddPrintItem(LODOP, tempItem) {
|
|
var pageIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
var printItem = cloneDeep_default()(tempItem); // TempItemStyle转换为LodopItemStyle
|
|
|
|
var lodopStyle = _createLodopStyle(printItem.style); // 批量打印时,修改关联打印项的关联序号
|
|
|
|
|
|
if (lodopStyle.LinkedItem == 1) {
|
|
lodopStyle.LinkedItem = 1 + pageIndex;
|
|
} // 添加打印项
|
|
|
|
|
|
switch (printItem.type) {
|
|
case 'braid-txt':
|
|
LODOP.ADD_PRINT_TEXT(printItem.top, printItem.left, printItem.width, printItem.height, printItem.value);
|
|
break;
|
|
|
|
case 'bar-code':
|
|
LODOP.ADD_PRINT_BARCODE(printItem.top, printItem.left, printItem.width, printItem.height, lodopStyle.codeType, printItem.value);
|
|
break;
|
|
|
|
case 'braid-html':
|
|
{
|
|
var html = htmlTempTohtml(printItem.defaultValue, printItem.style);
|
|
|
|
if (lodopStyle.AutoHeight) {
|
|
LODOP.ADD_PRINT_HTM(printItem.top, printItem.left, printItem.width, 'BottomMargin:' + lodopStyle.BottomMargin + 'mm', html);
|
|
} else {
|
|
LODOP.ADD_PRINT_HTM(printItem.top, printItem.left, printItem.width, printItem.height, html);
|
|
}
|
|
}
|
|
break;
|
|
|
|
case 'braid-table':
|
|
{
|
|
var _html = tableTempTohtml(printItem.columns ? printItem.columns : [], printItem.defaultValue, printItem.style);
|
|
|
|
if (lodopStyle.AutoHeight) {
|
|
LODOP.ADD_PRINT_TABLE(printItem.top, printItem.left, printItem.width, 'BottomMargin:' + lodopStyle.BottomMargin + 'mm', _html);
|
|
} else {
|
|
LODOP.ADD_PRINT_TABLE(printItem.top, printItem.left, printItem.width, printItem.height, _html);
|
|
}
|
|
}
|
|
break;
|
|
|
|
case 'braid-image':
|
|
{
|
|
var _html2 = imageTempTohtml(printItem.value);
|
|
|
|
LODOP.ADD_PRINT_IMAGE(printItem.top, printItem.left, printItem.width, printItem.height, _html2);
|
|
}
|
|
break;
|
|
|
|
default:
|
|
'';
|
|
} // 设置打印项样式
|
|
|
|
|
|
Object.keys(lodopStyle).forEach(function (key) {
|
|
LODOP.SET_PRINT_STYLEA(0, key, lodopStyle[key]);
|
|
}); // 设置默认LodopStyle
|
|
|
|
var defaultLodopStyle = printItem.lodopStyle;
|
|
|
|
if (defaultLodopStyle) {
|
|
Object.keys(defaultLodopStyle).forEach(function (key) {
|
|
LODOP.SET_PRINT_STYLEA(0, key, defaultLodopStyle[key]);
|
|
});
|
|
}
|
|
}
|
|
/**
|
|
* 将模板设计样式转换为lodop样式
|
|
* @param style 模板样式
|
|
* @returns lodop样式对象
|
|
*/
|
|
|
|
|
|
function _createLodopStyle(style) {
|
|
var lodopStyle = {
|
|
zIndex: style.zIndex
|
|
};
|
|
|
|
for (var key in style) {
|
|
if (['Bold', 'Italic', 'Underline', 'ShowBarText'].indexOf(key) > -1) {
|
|
lodopStyle[key] = style[key] ? 1 : 0;
|
|
} else if (key === 'Alignment') {
|
|
lodopStyle[key] = style[key] == 'left' ? 1 : style[key] == 'center' ? 2 : 3;
|
|
} else {
|
|
lodopStyle[key] = style[key];
|
|
}
|
|
}
|
|
|
|
return lodopStyle;
|
|
}
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
|
|
var es_array_concat = __webpack_require__("99af");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
|
|
var es_object_to_string = __webpack_require__("d3b7");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js
|
|
var es_promise = __webpack_require__("e6cf");
|
|
|
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
function _classCallCheck(instance, Constructor) {
|
|
if (!(instance instanceof Constructor)) {
|
|
throw new TypeError("Cannot call a class as a function");
|
|
}
|
|
}
|
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
function _defineProperties(target, props) {
|
|
for (var i = 0; i < props.length; i++) {
|
|
var descriptor = props[i];
|
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
descriptor.configurable = true;
|
|
if ("value" in descriptor) descriptor.writable = true;
|
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
}
|
|
}
|
|
|
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
return Constructor;
|
|
}
|
|
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
|
|
var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
|
|
|
|
// CONCATENATED MODULE: ./src/plugins/store.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function resolveSource(source, type) {
|
|
return typeof type === 'function' ? type : source[type];
|
|
}
|
|
|
|
function normalizeMap(map) {
|
|
return Array.isArray(map) ? map.map(function (k) {
|
|
return {
|
|
k: k,
|
|
v: k
|
|
};
|
|
}) : Object.keys(map).map(function (k) {
|
|
return {
|
|
k: k,
|
|
v: map[k]
|
|
};
|
|
});
|
|
}
|
|
|
|
var createMapState = function createMapState(_store) {
|
|
return function (states) {
|
|
var res = {};
|
|
var db = normalizeMap(states);
|
|
|
|
var _loop = function _loop(k) {
|
|
var v = db[k];
|
|
|
|
res[k] = function () {
|
|
var store = _store || this.$vptd;
|
|
return typeof v === 'function' ? v.call(this, store.state) : store.state[v];
|
|
};
|
|
};
|
|
|
|
for (var k in db) {
|
|
_loop(k);
|
|
}
|
|
|
|
return res;
|
|
};
|
|
};
|
|
|
|
var mapToMethods = function mapToMethods(sourceName, runnerName, _store) {
|
|
return function (map) {
|
|
var res = {};
|
|
var db = normalizeMap(map);
|
|
|
|
var _loop2 = function _loop2(k) {
|
|
var v = db[k];
|
|
|
|
res[k] = function (payload) {
|
|
var store = _store || this.$vptd;
|
|
var source = store[sourceName];
|
|
var runner = store[runnerName];
|
|
var actualSource = typeof v === 'function' ? v.call(this, source) : v;
|
|
return runner.call(store, actualSource, payload);
|
|
};
|
|
};
|
|
|
|
for (var k in db) {
|
|
_loop2(k);
|
|
}
|
|
|
|
return res;
|
|
};
|
|
};
|
|
|
|
var store_Store = /*#__PURE__*/function () {
|
|
function Store() {
|
|
var _this = this;
|
|
|
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
state = _ref.state,
|
|
_ref$mutations = _ref.mutations,
|
|
mutations = _ref$mutations === void 0 ? {} : _ref$mutations,
|
|
_ref$actions = _ref.actions,
|
|
actions = _ref$actions === void 0 ? {} : _ref$actions,
|
|
plugins = _ref.plugins,
|
|
_ref$subscribers = _ref.subscribers,
|
|
subscribers = _ref$subscribers === void 0 ? [] : _ref$subscribers;
|
|
|
|
_classCallCheck(this, Store);
|
|
|
|
this.vm = new external_commonjs_vue_commonjs2_vue_root_Vue_default.a({
|
|
data: {
|
|
$$state: typeof state === 'function' ? state() : state
|
|
}
|
|
});
|
|
this.mutations = mutations;
|
|
this.actions = actions;
|
|
this.subscribers = subscribers;
|
|
|
|
if (plugins) {
|
|
plugins.forEach(function (p) {
|
|
return _this.use(p);
|
|
});
|
|
}
|
|
|
|
this.mapState = createMapState(this);
|
|
this.mapActions = mapToMethods('actions', 'dispatch', this);
|
|
this.mapMutations = mapToMethods('mutations', 'commit', this);
|
|
}
|
|
|
|
_createClass(Store, [{
|
|
key: "$emit",
|
|
value: function $emit(event) {
|
|
var _this$vm;
|
|
|
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
args[_key - 1] = arguments[_key];
|
|
}
|
|
|
|
return (_this$vm = this.vm).$emit.apply(_this$vm, [event].concat(args));
|
|
}
|
|
}, {
|
|
key: "$on",
|
|
value: function $on(event, callback) {
|
|
return this.vm.$on(event, callback);
|
|
}
|
|
}, {
|
|
key: "subscribe",
|
|
value: function subscribe(sub) {
|
|
var _this2 = this;
|
|
|
|
this.subscribers.push(sub);
|
|
return function () {
|
|
return _this2.subscribers.splice(_this2.subscribers.indexOf(sub), 1);
|
|
};
|
|
}
|
|
}, {
|
|
key: "commit",
|
|
value: function commit(type, payload) {
|
|
var _this3 = this;
|
|
|
|
this.subscribers.forEach(function (sub) {
|
|
return sub({
|
|
type: type,
|
|
payload: payload
|
|
}, _this3.state);
|
|
});
|
|
var mutation = resolveSource(this.mutations, type);
|
|
return mutation && mutation(this.state, payload);
|
|
}
|
|
}, {
|
|
key: "dispatch",
|
|
value: function dispatch(type, payload) {
|
|
var action = resolveSource(this.actions, type);
|
|
var ctx = {
|
|
state: this.state,
|
|
dispatch: this.dispatch.bind(this),
|
|
commit: this.commit.bind(this),
|
|
store: this
|
|
};
|
|
return Promise.resolve(action && action(ctx, payload));
|
|
}
|
|
}, {
|
|
key: "use",
|
|
value: function use(fn) {
|
|
fn(this);
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "replaceState",
|
|
value: function replaceState(state) {
|
|
this.vm.$data.$$state = state;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "state",
|
|
get: function get() {
|
|
return this.vm.$data.$$state;
|
|
},
|
|
set: function set(v) {
|
|
if (false) {}
|
|
}
|
|
}]);
|
|
|
|
return Store;
|
|
}();
|
|
|
|
|
|
var mapState = createMapState();
|
|
var mapActions = mapToMethods('actions', 'dispatch');
|
|
var mapMutations = mapToMethods('mutations', 'commit');
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4032e232-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/widgets/txt/index.vue?vue&type=template&id=176cea30&
|
|
var txtvue_type_template_id_176cea30_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"widgets",style:({
|
|
position:'absolute',
|
|
left: _vm.val.left + 'px' ,
|
|
top: _vm.val.top + 'px',
|
|
width: _vm.val.width + 'px',
|
|
minHeight: _vm.val.height + 'px',
|
|
zIndex: _vm.val.style.zIndex,
|
|
fontSize: _vm.val.style.FontSize + 'pt',
|
|
color: _vm.val.style.FontColor,
|
|
textAlign: _vm.val.style.Alignment,
|
|
fontWeight: _vm.val.style.Bold ? 'bold': 'normal'
|
|
}),attrs:{"contenteditable":!!_vm.val.isEdit},domProps:{"innerHTML":_vm._s(_vm.val.value)},on:{"blur":function (e) { return _vm.updateText(e, _vm.val.uuid); }}})}
|
|
var txtvue_type_template_id_176cea30_staticRenderFns = []
|
|
|
|
|
|
// CONCATENATED MODULE: ./src/components/widgets/txt/index.vue?vue&type=template&id=176cea30&
|
|
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/widgets/txt/index.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
// let itemAttr = {
|
|
// type: 'braid-txt',
|
|
// isEdit: 0,
|
|
// title: '收货人手机',
|
|
// value: '{收货人手机}',
|
|
// defaultValue: '18982068702',
|
|
// name: 'buyerPhone'
|
|
// }
|
|
var WIDGET_NAME = 'braid-txt';
|
|
/* harmony default export */ var txtvue_type_script_lang_js_ = ({
|
|
name: WIDGET_NAME,
|
|
setting: {
|
|
type: WIDGET_NAME,
|
|
isEdit: true,
|
|
dragable: true,
|
|
// 是否可拖拽
|
|
resizable: true,
|
|
// 尺寸是否可变
|
|
width: 120,
|
|
height: 40,
|
|
left: 50,
|
|
top: 0,
|
|
title: '自定义文本',
|
|
value: '自定义文本',
|
|
defaultValue: '自定义文本',
|
|
name: '',
|
|
style: {
|
|
zIndex: 0,
|
|
FontSize: 9,
|
|
FontColor: '#000000',
|
|
Bold: false,
|
|
// 1代表粗体,0代表非粗体
|
|
Italic: false,
|
|
// 1代表斜体,0代表非斜体
|
|
Underline: false,
|
|
// 1代表有下划线,0代表无下划线
|
|
Alignment: 'left',
|
|
// 对齐方式
|
|
ItemType: 0 // 打印类型 0--普通项 1--页眉页脚 2--页号项 3--页数项 4--多页项
|
|
|
|
}
|
|
},
|
|
props: ['val' // 文本对象
|
|
],
|
|
methods: {
|
|
updateText: function updateText(e, uuid) {
|
|
var text = e.target.innerHTML;
|
|
this.$vptd.commit('updateData', {
|
|
uuid: uuid,
|
|
key: 'value',
|
|
value: text
|
|
});
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./src/components/widgets/txt/index.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var widgets_txtvue_type_script_lang_js_ = (txtvue_type_script_lang_js_);
|
|
// CONCATENATED MODULE: ./src/components/widgets/txt/index.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var txt_component = normalizeComponent(
|
|
widgets_txtvue_type_script_lang_js_,
|
|
txtvue_type_template_id_176cea30_render,
|
|
txtvue_type_template_id_176cea30_staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* harmony default export */ var txt = (txt_component.exports);
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4032e232-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/widgets/bar-code/index.vue?vue&type=template&id=5047f3cc&scoped=true&
|
|
var bar_codevue_type_template_id_5047f3cc_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"bar-code",style:({
|
|
position: 'absolute',
|
|
width: _vm.val.width + 'px',
|
|
height: _vm.val.height + 'px',
|
|
left: _vm.val.left + 'px',
|
|
top: _vm.val.top +'px',
|
|
zIndex: _vm.val.zIndex,
|
|
})},[_c('img',{attrs:{"src":_vm.codeUrl}}),_c('div',{staticClass:"text",style:({
|
|
display:_vm.val.style.ShowBarText ? '' : 'none',
|
|
fontSize: _vm.val.style.FontSize + 'pt',
|
|
fontWeight: _vm.val.style.Bold ? 'bold' : 'normal'
|
|
})},[_vm._v("1234567890")])])}
|
|
var bar_codevue_type_template_id_5047f3cc_scoped_true_staticRenderFns = []
|
|
|
|
|
|
// CONCATENATED MODULE: ./src/components/widgets/bar-code/index.vue?vue&type=template&id=5047f3cc&scoped=true&
|
|
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/widgets/bar-code/index.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
var bar_codevue_type_script_lang_js_WIDGET_NAME = 'bar-code';
|
|
/* harmony default export */ var bar_codevue_type_script_lang_js_ = ({
|
|
name: bar_codevue_type_script_lang_js_WIDGET_NAME,
|
|
setting: {
|
|
type: bar_codevue_type_script_lang_js_WIDGET_NAME,
|
|
isEdit: false,
|
|
dragable: true,
|
|
// 是否可拖拽
|
|
resizable: true,
|
|
// 尺寸是否可变
|
|
width: 120,
|
|
height: 40,
|
|
left: 50,
|
|
top: 0,
|
|
title: '条码',
|
|
value: '1234567890',
|
|
defaultValue: '1234567890',
|
|
name: '',
|
|
style: {
|
|
zIndex: 0,
|
|
FontSize: 9,
|
|
ShowBarText: false,
|
|
// 条码是否显示值 0--不显示 1--显示
|
|
codeType: 'Code39',
|
|
// 条码类型
|
|
ItemType: 0 // 打印类型 0--普通项 1--页眉页脚 2--页号项 3--页数项 4--多页项
|
|
|
|
}
|
|
},
|
|
props: ['val'],
|
|
data: function data() {
|
|
return {// codeImg: require('../../../assets/image/barCode.png'),
|
|
};
|
|
},
|
|
computed: {
|
|
// 'QRCode', 'PDF417'
|
|
codeUrl: function codeUrl() {
|
|
if (this.val.style.codeType === 'QRCode') {
|
|
return __webpack_require__("282a");
|
|
} else if (this.val.style.codeType === 'PDF417') {
|
|
return __webpack_require__("2510");
|
|
} else {
|
|
return __webpack_require__("7b54");
|
|
}
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./src/components/widgets/bar-code/index.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var widgets_bar_codevue_type_script_lang_js_ = (bar_codevue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./src/components/widgets/bar-code/index.vue?vue&type=style&index=0&id=5047f3cc&lang=scss&scoped=true&
|
|
var bar_codevue_type_style_index_0_id_5047f3cc_lang_scss_scoped_true_ = __webpack_require__("4c78");
|
|
|
|
// CONCATENATED MODULE: ./src/components/widgets/bar-code/index.vue
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var bar_code_component = normalizeComponent(
|
|
widgets_bar_codevue_type_script_lang_js_,
|
|
bar_codevue_type_template_id_5047f3cc_scoped_true_render,
|
|
bar_codevue_type_template_id_5047f3cc_scoped_true_staticRenderFns,
|
|
false,
|
|
null,
|
|
"5047f3cc",
|
|
null
|
|
|
|
)
|
|
|
|
/* harmony default export */ var bar_code = (bar_code_component.exports);
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4032e232-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/widgets/table/index.vue?vue&type=template&id=79629ba2&
|
|
var tablevue_type_template_id_79629ba2_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"widgets",staticStyle:{"position":"absolute","overflow":"hidden"},style:({
|
|
left: _vm.val.left + 'px' ,
|
|
top: _vm.val.top + 'px',
|
|
width: _vm.val.width + 'px',
|
|
height: _vm.val.height + 'px',
|
|
textAlign: _vm.val.style.Alignment,
|
|
fontSize: _vm.val.style.FontSize + 'pt',
|
|
color: _vm.val.style.FontColor,
|
|
})},[_c('table',{staticStyle:{"border-collapse":"collapse","font-size":"12px"},attrs:{"border":"1","width":"100%","cellspacing":"0","cellpadding":"2","bordercolor":"#000000"}},[_c('tr',_vm._l((_vm.columns),function(item){return _c('th',{key:item.name,attrs:{"width":item.name==='_seq'?40:''}},[_vm._v(_vm._s(item.title))])}),0),_c('tr',_vm._l((_vm.columns),function(item){return _c('td',{key:item.name},[_vm._v(_vm._s(item.value))])}),0)])])}
|
|
var tablevue_type_template_id_79629ba2_staticRenderFns = []
|
|
|
|
|
|
// CONCATENATED MODULE: ./src/components/widgets/table/index.vue?vue&type=template&id=79629ba2&
|
|
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/widgets/table/index.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
var tablevue_type_script_lang_js_WIDGET_NAME = 'braid-table';
|
|
/* harmony default export */ var tablevue_type_script_lang_js_ = ({
|
|
name: tablevue_type_script_lang_js_WIDGET_NAME,
|
|
setting: {
|
|
type: tablevue_type_script_lang_js_WIDGET_NAME,
|
|
isEdit: false,
|
|
// 是否可编辑
|
|
dragable: true,
|
|
// 是否可拖拽
|
|
resizable: true,
|
|
// 尺寸是否可变
|
|
width: 240,
|
|
height: 60,
|
|
left: 50,
|
|
top: 10,
|
|
title: '表格',
|
|
value: [],
|
|
defaultValue: [],
|
|
tabelHtml: '',
|
|
columnsAttr: [],
|
|
// 表格列选项
|
|
columns: [],
|
|
// 已选表格列表
|
|
selectCol: [],
|
|
// 已选表格列name数组(用于多选框双向绑定)
|
|
name: '',
|
|
style: {
|
|
zIndex: 0,
|
|
Alignment: 'left',
|
|
// 对齐方式 1--左靠齐 2--居中 3--右靠齐
|
|
FontSize: 9,
|
|
FontColor: '#000000',
|
|
BorderColor: '#000000',
|
|
AutoHeight: false,
|
|
// 高度自动(模板在该元素位置以下的元素都关联打印)
|
|
BottomMargin: 0 // 距离下边距
|
|
|
|
}
|
|
},
|
|
props: ['val' // 文本对象
|
|
],
|
|
computed: {
|
|
// 去掉type='row'的数据
|
|
columns: function columns() {
|
|
var col = this.val.columns || [];
|
|
return col;
|
|
}
|
|
},
|
|
methods: {}
|
|
});
|
|
// CONCATENATED MODULE: ./src/components/widgets/table/index.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var widgets_tablevue_type_script_lang_js_ = (tablevue_type_script_lang_js_);
|
|
// CONCATENATED MODULE: ./src/components/widgets/table/index.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var table_component = normalizeComponent(
|
|
widgets_tablevue_type_script_lang_js_,
|
|
tablevue_type_template_id_79629ba2_render,
|
|
tablevue_type_template_id_79629ba2_staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* harmony default export */ var table = (table_component.exports);
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4032e232-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/widgets/image/index.vue?vue&type=template&id=4a6bd5b4&scoped=true&
|
|
var imagevue_type_template_id_4a6bd5b4_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"widgets",style:({
|
|
position: 'absolute',
|
|
width: _vm.val.width + 'px',
|
|
height: _vm.val.height + 'px',
|
|
left: _vm.val.left + 'px',
|
|
top: _vm.val.top +'px',
|
|
zIndex: _vm.val.zIndex
|
|
})},[_c('img',{staticClass:"braid-image",attrs:{"title":_vm.val.title,"src":_vm.val.value || _vm.val.defaultValue}})])}
|
|
var imagevue_type_template_id_4a6bd5b4_scoped_true_staticRenderFns = []
|
|
|
|
|
|
// CONCATENATED MODULE: ./src/components/widgets/image/index.vue?vue&type=template&id=4a6bd5b4&scoped=true&
|
|
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/widgets/image/index.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
var imagevue_type_script_lang_js_WIDGET_NAME = 'braid-image';
|
|
/* harmony default export */ var imagevue_type_script_lang_js_ = ({
|
|
name: imagevue_type_script_lang_js_WIDGET_NAME,
|
|
setting: {
|
|
type: imagevue_type_script_lang_js_WIDGET_NAME,
|
|
title: '图片',
|
|
isEdit: false,
|
|
dragable: true,
|
|
// 是否可拖拽
|
|
resizable: true,
|
|
// 尺寸是否可变
|
|
width: 120,
|
|
height: 40,
|
|
left: 50,
|
|
top: 0,
|
|
value: '',
|
|
defaultValue: '',
|
|
name: '',
|
|
style: {
|
|
zIndex: 0,
|
|
ItemType: 0 // 打印类型 0--普通项 1--页眉页脚 2--页号项 3--页数项 4--多页项
|
|
|
|
}
|
|
},
|
|
props: ['val' // 图片对象
|
|
],
|
|
data: function data() {
|
|
return {};
|
|
},
|
|
computed: {
|
|
imageUrl: function imageUrl() {
|
|
return this.val.value;
|
|
}
|
|
},
|
|
watch: {
|
|
val: function val(newVal) {
|
|
this.imageUrl = newVal.value;
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./src/components/widgets/image/index.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var widgets_imagevue_type_script_lang_js_ = (imagevue_type_script_lang_js_);
|
|
// EXTERNAL MODULE: ./src/components/widgets/image/index.vue?vue&type=style&index=0&id=4a6bd5b4&scoped=true&lang=css&
|
|
var imagevue_type_style_index_0_id_4a6bd5b4_scoped_true_lang_css_ = __webpack_require__("4f1d");
|
|
|
|
// CONCATENATED MODULE: ./src/components/widgets/image/index.vue
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var image_component = normalizeComponent(
|
|
widgets_imagevue_type_script_lang_js_,
|
|
imagevue_type_template_id_4a6bd5b4_scoped_true_render,
|
|
imagevue_type_template_id_4a6bd5b4_scoped_true_staticRenderFns,
|
|
false,
|
|
null,
|
|
"4a6bd5b4",
|
|
null
|
|
|
|
)
|
|
|
|
/* harmony default export */ var widgets_image = (image_component.exports);
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4032e232-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/widgets/html/index.vue?vue&type=template&id=0e3fa864&
|
|
var htmlvue_type_template_id_0e3fa864_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"widgets",style:({
|
|
position:'absolute',
|
|
left: _vm.val.left + 'px' ,
|
|
top: _vm.val.top + 'px',
|
|
width: _vm.val.width + 'px',
|
|
minHeight: _vm.val.height + 'px',
|
|
zIndex: _vm.val.style.zIndex,
|
|
fontSize: _vm.val.style.FontSize + 'pt',
|
|
color: _vm.val.style.FontColor,
|
|
}),attrs:{"contenteditable":!!_vm.val.isEdit},domProps:{"innerHTML":_vm._s(_vm.val.value)},on:{"blur":function (e) { return _vm.updateText(e, _vm.val.uuid); }}})}
|
|
var htmlvue_type_template_id_0e3fa864_staticRenderFns = []
|
|
|
|
|
|
// CONCATENATED MODULE: ./src/components/widgets/html/index.vue?vue&type=template&id=0e3fa864&
|
|
|
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/widgets/html/index.vue?vue&type=script&lang=js&
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
var htmlvue_type_script_lang_js_WIDGET_NAME = 'braid-html';
|
|
/* harmony default export */ var htmlvue_type_script_lang_js_ = ({
|
|
name: htmlvue_type_script_lang_js_WIDGET_NAME,
|
|
setting: {
|
|
type: htmlvue_type_script_lang_js_WIDGET_NAME,
|
|
isEdit: false,
|
|
dragable: true,
|
|
// 是否可拖拽
|
|
resizable: true,
|
|
// 尺寸是否可变
|
|
width: 120,
|
|
height: 40,
|
|
left: 50,
|
|
top: 0,
|
|
title: 'html',
|
|
value: '<div>html<div>',
|
|
defaultValue: '<div>html<div>',
|
|
name: '',
|
|
style: {
|
|
zIndex: 0,
|
|
ItemType: 0,
|
|
// 打印类型 0--普通项 1--页眉页脚 2--页号项 3--页数项 4--多页项
|
|
AutoHeight: false,
|
|
// 高度自动(模板在该元素位置以下的元素都关联打印)
|
|
BottomMargin: 0 // 距离下边距
|
|
|
|
}
|
|
},
|
|
props: ['val' // 文本对象
|
|
],
|
|
methods: {
|
|
updateText: function updateText(e, uuid) {
|
|
var text = e.target.innerHTML;
|
|
this.$vptd.commit('updateData', {
|
|
uuid: uuid,
|
|
key: 'value',
|
|
value: text
|
|
});
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./src/components/widgets/html/index.vue?vue&type=script&lang=js&
|
|
/* harmony default export */ var widgets_htmlvue_type_script_lang_js_ = (htmlvue_type_script_lang_js_);
|
|
// CONCATENATED MODULE: ./src/components/widgets/html/index.vue
|
|
|
|
|
|
|
|
|
|
|
|
/* normalize component */
|
|
|
|
var html_component = normalizeComponent(
|
|
widgets_htmlvue_type_script_lang_js_,
|
|
htmlvue_type_template_id_0e3fa864_render,
|
|
htmlvue_type_template_id_0e3fa864_staticRenderFns,
|
|
false,
|
|
null,
|
|
null,
|
|
null
|
|
|
|
)
|
|
|
|
/* harmony default export */ var widgets_html = (html_component.exports);
|
|
// CONCATENATED MODULE: ./src/components/widgets/index.js
|
|
|
|
|
|
// import braidPic from './pic/index.vue'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var widgets_install = function install(Vue) {
|
|
Vue.component(txt.name, txt);
|
|
Vue.component(bar_code.name, bar_code);
|
|
Vue.component(table.name, table);
|
|
Vue.component(widgets_image.name, widgets_image);
|
|
Vue.component(widgets_html.name, widgets_html);
|
|
};
|
|
|
|
var widgets_getWidgetsSetting = function getWidgetsSetting() {
|
|
var _ref;
|
|
|
|
return _ref = {}, _defineProperty(_ref, txt.name, txt.setting), _defineProperty(_ref, bar_code.name, bar_code.setting), _defineProperty(_ref, table.name, table.setting), _defineProperty(_ref, widgets_image.name, widgets_image.setting), _defineProperty(_ref, widgets_html.name, widgets_html.setting), _ref;
|
|
};
|
|
|
|
/* harmony default export */ var widgets = ({
|
|
install: widgets_install,
|
|
getWidgetsSetting: widgets_getWidgetsSetting
|
|
});
|
|
// CONCATENATED MODULE: ./src/store/state.js
|
|
|
|
|
|
/* harmony default export */ var store_state = ({
|
|
zoom: 100,
|
|
// 画布缩放百分比
|
|
type: 'page',
|
|
// 选中元素类型
|
|
index: -1,
|
|
// 选中元素索引
|
|
uuid: -1,
|
|
// 选中元素uuid
|
|
originX: 0,
|
|
// 选中元件的横向初始值
|
|
originY: 0,
|
|
// 选中元件的纵向初始值
|
|
startX: 0,
|
|
// 鼠标摁下时的横坐标
|
|
startY: 0,
|
|
// 鼠标摁下时的纵坐标
|
|
moving: false,
|
|
// 是否正在移动元件(参考线仅在移动元件时显示)
|
|
activeElement: getDefaultProps(),
|
|
// 选中对象,要么是元件,要么是页面
|
|
// 模板信息
|
|
page: {
|
|
title: 'demo',
|
|
width: 750,
|
|
height: 550,
|
|
pageWidth: 750,
|
|
pageHeight: 550,
|
|
tempItems: [] // 模板已选项
|
|
|
|
},
|
|
optionItems: [],
|
|
// 可选项
|
|
//模板参数
|
|
tempId: '',
|
|
// 模板Id
|
|
loading: false,
|
|
// 是否正在初始化中
|
|
widgetSetting: widgets.getWidgetsSetting() // 模板组件默认属性
|
|
|
|
});
|
|
// EXTERNAL MODULE: ./node_modules/regenerator-runtime/runtime.js
|
|
var runtime = __webpack_require__("96cf");
|
|
|
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
|
|
|
|
|
|
|
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
try {
|
|
var info = gen[key](arg);
|
|
var value = info.value;
|
|
} catch (error) {
|
|
reject(error);
|
|
return;
|
|
}
|
|
|
|
if (info.done) {
|
|
resolve(value);
|
|
} else {
|
|
Promise.resolve(value).then(_next, _throw);
|
|
}
|
|
}
|
|
|
|
function _asyncToGenerator(fn) {
|
|
return function () {
|
|
var self = this,
|
|
args = arguments;
|
|
return new Promise(function (resolve, reject) {
|
|
var gen = fn.apply(self, args);
|
|
|
|
function _next(value) {
|
|
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
}
|
|
|
|
function _throw(err) {
|
|
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
}
|
|
|
|
_next(undefined);
|
|
});
|
|
};
|
|
}
|
|
// CONCATENATED MODULE: ./src/store/actions.js
|
|
|
|
|
|
/* harmony default export */ var store_actions = ({
|
|
// 添加模板项
|
|
addTempItem: function addTempItem(_ref, item) {
|
|
var state = _ref.state,
|
|
commit = _ref.commit;
|
|
commit('addTempItem', item); // 设置选中
|
|
|
|
commit('select', {
|
|
uuid: state.page.tempItems[state.page.tempItems.length - 1].uuid
|
|
});
|
|
},
|
|
// 初始化模板设计器
|
|
designerInit: function designerInit(_ref2, tempInfo) {
|
|
return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
var state, commit;
|
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
while (1) {
|
|
switch (_context.prev = _context.next) {
|
|
case 0:
|
|
state = _ref2.state, commit = _ref2.commit;
|
|
commit('initOptionItems', tempInfo.options);
|
|
commit('initPage', tempInfo.tempValue);
|
|
|
|
case 3:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}
|
|
}, _callee);
|
|
}))();
|
|
}
|
|
});
|
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.assign.js
|
|
var es_object_assign = __webpack_require__("cca6");
|
|
|
|
// CONCATENATED MODULE: ./src/store/mutation.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var generate = __webpack_require__("db22");
|
|
|
|
|
|
/* harmony default export */ var mutation = ({
|
|
// 初始化页面属性
|
|
initPage: function initPage(state, pageInfo) {
|
|
state.page = pageInfo; // 补全默认样式
|
|
|
|
var tempItems = pageInfo.tempItems ? pageInfo.tempItems.map(function (item) {
|
|
var optionItem = _objectSpread2(_objectSpread2(_objectSpread2({}, state.widgetSetting[item.type]), item), {}, {
|
|
style: _objectSpread2(_objectSpread2({}, state.widgetSetting[item.type].style), item.style || {})
|
|
});
|
|
|
|
return optionItem;
|
|
}) : [];
|
|
state.page.tempItems = tempItems;
|
|
},
|
|
// 初始化可选对象
|
|
initOptionItems: function initOptionItems(state, options) {
|
|
// 补全默认属性
|
|
var optionsObject = options ? options.map(function (item) {
|
|
var optionItem = _objectSpread2(_objectSpread2(_objectSpread2({}, state.widgetSetting[item.type]), item), {}, {
|
|
style: _objectSpread2(_objectSpread2({}, state.widgetSetting[item.type].style), item.style || {})
|
|
});
|
|
|
|
return optionItem;
|
|
}) : [];
|
|
state.optionItems = optionsObject;
|
|
},
|
|
// 初始化选中对象
|
|
initActive: function initActive(state) {
|
|
state.activeElement = getDefaultProps();
|
|
},
|
|
// 设置 mousemove 操作的初始值
|
|
initmove: function initmove(state, payload) {
|
|
state.startX = payload.startX;
|
|
state.startY = payload.startY;
|
|
state.originX = payload.originX;
|
|
state.originY = payload.originY;
|
|
state.moving = true;
|
|
},
|
|
// 选中元件与取消选中
|
|
select: function select(state, temp) {
|
|
state.uuid = temp.uuid;
|
|
|
|
if (temp.uuid === -1) {
|
|
state.activeElement = getDefaultProps();
|
|
state.type = 'page';
|
|
} else {
|
|
var widget = state.page.tempItems.find(function (w) {
|
|
return w.uuid === temp.uuid;
|
|
});
|
|
|
|
if (widget) {
|
|
state.activeElement = widget;
|
|
state.type = widget.type;
|
|
}
|
|
}
|
|
},
|
|
// 元件移动结束
|
|
stopmove: function stopmove(state) {
|
|
state.moving = false;
|
|
},
|
|
// 移动元件
|
|
move: function move(state, track) {
|
|
var target = state.activeElement;
|
|
var dx = track.x - state.startX;
|
|
var dy = track.y - state.startY;
|
|
var left = state.originX + Math.floor(dx * 100 / state.zoom);
|
|
var top = state.originY + Math.floor(dy * 100 / state.zoom);
|
|
target.left = left > 0 ? left : 0;
|
|
target.top = top > 0 ? top : 0;
|
|
},
|
|
// 调整元件尺寸
|
|
resize: function resize(state, track) {
|
|
var dx = track.x - state.startX;
|
|
var dy = track.y - state.startY;
|
|
var value;
|
|
|
|
if (track.type === 'right') {
|
|
value = state.originX + Math.floor(dx * 100 / state.zoom);
|
|
state.activeElement.width = value > 10 ? value : 10;
|
|
return;
|
|
}
|
|
|
|
if (track.type === 'down') {
|
|
value = state.originX + Math.floor(dy * 100 / state.zoom);
|
|
state.activeElement.height = value > 10 ? value : 10;
|
|
return;
|
|
}
|
|
|
|
if (track.type === 'left') {
|
|
var left = state.originX + Math.floor(dx * 100 / state.zoom);
|
|
var width = state.originY - Math.floor(dx * 100 / state.zoom);
|
|
state.activeElement.left = left > 0 ? left : 0;
|
|
state.activeElement.width = width > 10 ? width : 10;
|
|
return;
|
|
}
|
|
|
|
if (track.type === 'up') {
|
|
var top = state.originX + Math.floor(dy * 100 / state.zoom);
|
|
var height = state.originY - Math.floor(dy * 100 / state.zoom);
|
|
state.activeElement.top = top > 0 ? top : 0;
|
|
state.activeElement.height = height > 10 ? height : 10;
|
|
}
|
|
},
|
|
// 更新元件初始 top 值
|
|
updateSrollTop: function updateSrollTop(state, top) {
|
|
state.top = top;
|
|
},
|
|
// 页面缩放
|
|
zoom: function zoom(state, val) {
|
|
state.zoom = val;
|
|
},
|
|
// 删除选中元件
|
|
delete: function _delete(state, uuid) {
|
|
var type = state.type;
|
|
if (type === 'page') return;
|
|
var index = 0;
|
|
state.page.tempItems.forEach(function (item, idx) {
|
|
if (item.uuid === uuid) {
|
|
index = idx;
|
|
}
|
|
}); // 删除元件
|
|
|
|
state.page.tempItems.splice(index, 1); // 重置 activeElement
|
|
|
|
state.activeElement = getDefaultProps();
|
|
state.type = 'page';
|
|
state.uuid = -1;
|
|
},
|
|
// 添加组件
|
|
addTempItem: function addTempItem(state, item) {
|
|
var def = {
|
|
uuid: generate('1234567890abcdef', 10)
|
|
};
|
|
var setting = JSON.parse(JSON.stringify(item));
|
|
state.page.tempItems.push(Object.assign(setting, def));
|
|
},
|
|
// 更新数据
|
|
updateData: function updateData(state, _ref) {
|
|
var uuid = _ref.uuid,
|
|
value = _ref.value;
|
|
var widget = state.page.tempItems.find(function (w) {
|
|
return w.uuid === uuid;
|
|
});
|
|
widget ? widget.value = value : '';
|
|
},
|
|
// 设置模板Id
|
|
setTempId: function setTempId(state, id) {
|
|
state.tempId = id;
|
|
},
|
|
setLoading: function setLoading(state, flag) {
|
|
state.loading = flag;
|
|
},
|
|
// 设置模板默认属性
|
|
setWidgetSetting: function setWidgetSetting(state, settingObj) {
|
|
state.widgetSetting = settingObj;
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./src/store/index.js
|
|
|
|
|
|
|
|
|
|
/**
|
|
* 自定义状态管理器
|
|
*/
|
|
|
|
/* harmony default export */ var store = (new store_Store({
|
|
state: store_state,
|
|
actions: store_actions,
|
|
mutations: mutation
|
|
}));
|
|
// CONCATENATED MODULE: ./src/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// LODOP打印服务
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var src_install = function install(Vue) {
|
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
Vue.component(lib_button_default.a.name, lib_button_default.a);
|
|
Vue.component(lib_scrollbar_default.a.name, lib_scrollbar_default.a);
|
|
Vue.component(lib_input_default.a.name, lib_input_default.a);
|
|
Vue.component(lib_input_number_default.a.name, lib_input_number_default.a);
|
|
Vue.component(lib_switch_default.a.name, lib_switch_default.a);
|
|
Vue.component(lib_select_default.a.name, lib_select_default.a);
|
|
Vue.component(lib_option_default.a.name, lib_option_default.a);
|
|
Vue.component(lib_radio_group_default.a.name, lib_radio_group_default.a);
|
|
Vue.component(lib_radio_default.a.name, lib_radio_default.a);
|
|
Vue.component(lib_popover_default.a.name, lib_popover_default.a);
|
|
Vue.component(lib_checkbox_default.a.name, lib_checkbox_default.a);
|
|
Vue.component(lib_checkbox_group_default.a.name, lib_checkbox_group_default.a);
|
|
Vue.component(lib_row_default.a.name, lib_row_default.a);
|
|
Vue.component(lib_col_default.a.name, lib_col_default.a);
|
|
Vue.component(lib_collapse_default.a.name, lib_collapse_default.a);
|
|
Vue.component(lib_collapse_item_default.a.name, lib_collapse_item_default.a);
|
|
Vue.component(lib_form_default.a.name, lib_form_default.a);
|
|
Vue.component(lib_form_item_default.a.name, lib_form_item_default.a);
|
|
Vue.component(lib_tag_default.a.name, lib_tag_default.a);
|
|
Vue.component(lib_color_picker_default.a.name, lib_color_picker_default.a);
|
|
Vue.use(widgets);
|
|
Vue.component('kr-print-designer', App);
|
|
Vue.prototype.$lodop = lodop;
|
|
Vue.prototype.$vptd = store;
|
|
};
|
|
|
|
if (typeof window !== 'undefined' && window.Vue) {
|
|
src_install(window.Vue);
|
|
}
|
|
|
|
/* harmony default export */ var src_0 = ({
|
|
install: src_install,
|
|
KrPrintDesigner: App
|
|
});
|
|
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
|
|
|
|
|
/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (src_0);
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "fba5":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var assocIndexOf = __webpack_require__("cb5a");
|
|
|
|
/**
|
|
* Checks if a list cache value for `key` exists.
|
|
*
|
|
* @private
|
|
* @name has
|
|
* @memberOf ListCache
|
|
* @param {string} key The key of the entry to check.
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
*/
|
|
function listCacheHas(key) {
|
|
return assocIndexOf(this.__data__, key) > -1;
|
|
}
|
|
|
|
module.exports = listCacheHas;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "fc5e":
|
|
/***/ (function(module, exports) {
|
|
|
|
// 7.1.4 ToInteger
|
|
var ceil = Math.ceil;
|
|
var floor = Math.floor;
|
|
module.exports = function (it) {
|
|
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "fc6a":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// toObject with fallback for non-array-like ES3 strings
|
|
var IndexedObject = __webpack_require__("44ad");
|
|
var requireObjectCoercible = __webpack_require__("1d80");
|
|
|
|
module.exports = function (it) {
|
|
return IndexedObject(requireObjectCoercible(it));
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "fc83":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "fcd4":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
exports.f = __webpack_require__("cc15");
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "fdbc":
|
|
/***/ (function(module, exports) {
|
|
|
|
// iterable DOM collections
|
|
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
module.exports = {
|
|
CSSRuleList: 0,
|
|
CSSStyleDeclaration: 0,
|
|
CSSValueList: 0,
|
|
ClientRectList: 0,
|
|
DOMRectList: 0,
|
|
DOMStringList: 0,
|
|
DOMTokenList: 1,
|
|
DataTransferItemList: 0,
|
|
FileList: 0,
|
|
HTMLAllCollection: 0,
|
|
HTMLCollection: 0,
|
|
HTMLFormElement: 0,
|
|
HTMLSelectElement: 0,
|
|
MediaList: 0,
|
|
MimeTypeArray: 0,
|
|
NamedNodeMap: 0,
|
|
NodeList: 1,
|
|
PaintRequestList: 0,
|
|
Plugin: 0,
|
|
PluginArray: 0,
|
|
SVGLengthList: 0,
|
|
SVGNumberList: 0,
|
|
SVGPathSegList: 0,
|
|
SVGPointList: 0,
|
|
SVGStringList: 0,
|
|
SVGTransformList: 0,
|
|
SourceBufferList: 0,
|
|
StyleSheetList: 0,
|
|
TextTrackCueList: 0,
|
|
TextTrackList: 0,
|
|
TouchList: 0
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "fdbf":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var NATIVE_SYMBOL = __webpack_require__("4930");
|
|
|
|
module.exports = NATIVE_SYMBOL
|
|
// eslint-disable-next-line no-undef
|
|
&& !Symbol.sham
|
|
// eslint-disable-next-line no-undef
|
|
&& typeof Symbol.iterator == 'symbol';
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "fea9":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__("da84");
|
|
|
|
module.exports = global.Promise;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "fed5":
|
|
/***/ (function(module, exports) {
|
|
|
|
exports.f = Object.getOwnPropertySymbols;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "fed5c":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
});
|
|
//# sourceMappingURL=kr-print-designer.umd.js.map
|