lojk-ui
Version:
lojk vue ui components library
1,740 lines (1,400 loc) • 60.2 kB
JavaScript
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 = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 229);
/******/ })
/************************************************************************/
/******/ ({
/***/ 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:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
// css base code, injected by the css-loader
module.exports = function (useSourceMap) {
var list = []; // return the list of modules as css string
list.toString = function toString() {
return this.map(function (item) {
var content = cssWithMappingToString(item, useSourceMap);
if (item[2]) {
return '@media ' + item[2] + '{' + content + '}';
} else {
return content;
}
}).join('');
}; // import a list of modules into the list
list.i = function (modules, mediaQuery) {
if (typeof modules === 'string') {
modules = [[null, modules, '']];
}
var alreadyImportedModules = {};
for (var i = 0; i < this.length; i++) {
var id = this[i][0];
if (id != null) {
alreadyImportedModules[id] = true;
}
}
for (i = 0; i < modules.length; i++) {
var item = modules[i]; // skip already imported module
// this implementation is not 100% perfect for weird media query combinations
// when a module is imported multiple times with different media queries.
// I hope this will never occur (Hey this way we have smaller bundles)
if (item[0] == null || !alreadyImportedModules[item[0]]) {
if (mediaQuery && !item[2]) {
item[2] = mediaQuery;
} else if (mediaQuery) {
item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';
}
list.push(item);
}
}
};
return list;
};
function cssWithMappingToString(item, useSourceMap) {
var content = item[1] || '';
var cssMapping = item[3];
if (!cssMapping) {
return content;
}
if (useSourceMap && typeof btoa === 'function') {
var sourceMapping = toComment(cssMapping);
var sourceURLs = cssMapping.sources.map(function (source) {
return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
});
return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
}
return [content].join('\n');
} // Adapted from convert-source-map (MIT)
function toComment(sourceMap) {
// eslint-disable-next-line no-undef
var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
return '/*# ' + data + ' */';
}
/***/ }),
/***/ 11:
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(14)(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/***/ 12:
/***/ (function(module, exports) {
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/***/ 121:
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(176);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(2)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/***/ 14:
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return !!exec();
} catch (e) {
return true;
}
};
/***/ }),
/***/ 157:
/***/ (function(module, exports, __webpack_require__) {
var pIE = __webpack_require__(171);
var createDesc = __webpack_require__(45);
var toIObject = __webpack_require__(34);
var toPrimitive = __webpack_require__(51);
var has = __webpack_require__(18);
var IE8_DOM_DEFINE = __webpack_require__(56);
var gOPD = Object.getOwnPropertyDescriptor;
exports.f = __webpack_require__(11) ? 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]);
};
/***/ }),
/***/ 168:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(7);
var has = __webpack_require__(18);
var cof = __webpack_require__(30);
var inheritIfRequired = __webpack_require__(169);
var toPrimitive = __webpack_require__(51);
var fails = __webpack_require__(14);
var gOPN = __webpack_require__(172).f;
var gOPD = __webpack_require__(157).f;
var dP = __webpack_require__(25).f;
var $trim = __webpack_require__(173).trim;
var NUMBER = 'Number';
var $Number = global[NUMBER];
var Base = $Number;
var proto = $Number.prototype;
// Opera ~12 has broken Object#toString
var BROKEN_COF = cof(__webpack_require__(77)(proto)) == NUMBER;
var TRIM = 'trim' in String.prototype;
// 7.1.3 ToNumber(argument)
var toNumber = function (argument) {
var it = toPrimitive(argument, false);
if (typeof it == 'string' && it.length > 2) {
it = TRIM ? it.trim() : $trim(it, 3);
var first = it.charCodeAt(0);
var third, radix, maxCode;
if (first === 43 || first === 45) {
third = it.charCodeAt(2);
if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
} else if (first === 48) {
switch (it.charCodeAt(1)) {
case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
default: return +it;
}
for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {
code = digits.charCodeAt(i);
// parseInt parses a string to a first unavailable symbol
// but ToNumber should return NaN if a string contains unavailable symbols
if (code < 48 || code > maxCode) return NaN;
} return parseInt(digits, radix);
}
} return +it;
};
if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {
$Number = function Number(value) {
var it = arguments.length < 1 ? 0 : value;
var that = this;
return that instanceof $Number
// check on 1..constructor(foo) case
&& (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)
? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
};
for (var keys = __webpack_require__(11) ? gOPN(Base) : (
// ES3:
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
// ES6 (in case, if modules with ES6 Number statics required before):
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
).split(','), j = 0, key; keys.length > j; j++) {
if (has(Base, key = keys[j]) && !has($Number, key)) {
dP($Number, key, gOPD(Base, key));
}
}
$Number.prototype = proto;
proto.constructor = $Number;
__webpack_require__(22)(global, NUMBER, $Number);
}
/***/ }),
/***/ 169:
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(12);
var setPrototypeOf = __webpack_require__(170).set;
module.exports = function (that, target, C) {
var S = target.constructor;
var P;
if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
setPrototypeOf(that, P);
} return that;
};
/***/ }),
/***/ 17:
/***/ (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;
};
/***/ }),
/***/ 170:
/***/ (function(module, exports, __webpack_require__) {
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
var isObject = __webpack_require__(12);
var anObject = __webpack_require__(6);
var check = function (O, proto) {
anObject(O);
if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
};
module.exports = {
set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
function (test, buggy, set) {
try {
set = __webpack_require__(57)(Function.call, __webpack_require__(157).f(Object.prototype, '__proto__').set, 2);
set(test, []);
buggy = !(test instanceof Array);
} catch (e) { buggy = true; }
return function setPrototypeOf(O, proto) {
check(O, proto);
if (buggy) O.__proto__ = proto;
else set(O, proto);
return O;
};
}({}, false) : undefined),
check: check
};
/***/ }),
/***/ 171:
/***/ (function(module, exports) {
exports.f = {}.propertyIsEnumerable;
/***/ }),
/***/ 172:
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
var $keys = __webpack_require__(73);
var hiddenKeys = __webpack_require__(54).concat('length', 'prototype');
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return $keys(O, hiddenKeys);
};
/***/ }),
/***/ 173:
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(53);
var defined = __webpack_require__(17);
var fails = __webpack_require__(14);
var spaces = __webpack_require__(174);
var space = '[' + spaces + ']';
var non = '\u200b\u0085';
var ltrim = RegExp('^' + space + space + '*');
var rtrim = RegExp(space + space + '*$');
var exporter = function (KEY, exec, ALIAS) {
var exp = {};
var FORCE = fails(function () {
return !!spaces[KEY]() || non[KEY]() != non;
});
var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
if (ALIAS) exp[ALIAS] = fn;
$export($export.P + $export.F * FORCE, 'String', exp);
};
// 1 -> String#trimLeft
// 2 -> String#trimRight
// 3 -> String#trim
var trim = exporter.trim = function (string, TYPE) {
string = String(defined(string));
if (TYPE & 1) string = string.replace(ltrim, '');
if (TYPE & 2) string = string.replace(rtrim, '');
return string;
};
module.exports = exporter;
/***/ }),
/***/ 174:
/***/ (function(module, exports) {
module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
'\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
/***/ }),
/***/ 175:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _node_modules_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LotusCarousel_vue_vue_type_style_index_0_id_533e61ac_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(121);
/* harmony import */ var _node_modules_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LotusCarousel_vue_vue_type_style_index_0_id_533e61ac_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LotusCarousel_vue_vue_type_style_index_0_id_533e61ac_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LotusCarousel_vue_vue_type_style_index_0_id_533e61ac_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a);
/***/ }),
/***/ 176:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(1)(false);
// Module
exports.push([module.i, ".lotus-slider-wrap[data-v-533e61ac] {\n position: relative;\n overflow: hidden;\n user-select: none;\n}\n.lotus-slider-wrap-list li[data-v-533e61ac] {\n float: left;\n}\n.lotus-slider-wrap-list img[data-v-533e61ac] {\n pointer-events: none;\n}\n.lotus-slider-wrap-dot[data-v-533e61ac] {\n position: absolute;\n left: 50%;\n transform: translate3D(-50%, 0, 0);\n bottom: 0.26666667rem;\n z-index: 2;\n line-height: 0;\n font-size: 0;\n text-align: center;\n cursor: pointer;\n}\n.lotus-slider-wrap-dot span[data-v-533e61ac] {\n width: 8px;\n height: 8px;\n border: 1px solid #fff;\n border-radius: 50% 50%;\n display: inline-block;\n margin-right: 8px;\n}\n.lotus-slider-wrap-dot span.active[data-v-533e61ac] {\n background: #fff;\n}\n", ""]);
/***/ }),
/***/ 18:
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/***/ 19:
/***/ (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);
};
/***/ }),
/***/ 2:
/***/ (function(module, exports, __webpack_require__) {
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
var stylesInDom = {};
var memoize = function (fn) {
var memo;
return function () {
if (typeof memo === "undefined") memo = fn.apply(this, arguments);
return memo;
};
};
var isOldIE = memoize(function () {
// Test for IE <= 9 as proposed by Browserhacks
// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
// Tests for existence of standard globals is to allow style-loader
// to operate correctly into non-standard environments
// @see https://github.com/webpack-contrib/style-loader/issues/177
return window && document && document.all && !window.atob;
});
var getTarget = function (target, parent) {
if (parent){
return parent.querySelector(target);
}
return document.querySelector(target);
};
var getElement = (function (fn) {
var memo = {};
return function(target, parent) {
// If passing function in options, then use it for resolve "head" element.
// Useful for Shadow Root style i.e
// {
// insertInto: function () { return document.querySelector("#foo").shadowRoot }
// }
if (typeof target === 'function') {
return target();
}
if (typeof memo[target] === "undefined") {
var styleTarget = getTarget.call(this, target, parent);
// Special case to return head of iframe instead of iframe itself
if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
try {
// This will throw an exception if access to iframe is blocked
// due to cross-origin restrictions
styleTarget = styleTarget.contentDocument.head;
} catch(e) {
styleTarget = null;
}
}
memo[target] = styleTarget;
}
return memo[target]
};
})();
var singleton = null;
var singletonCounter = 0;
var stylesInsertedAtTop = [];
var fixUrls = __webpack_require__(3);
module.exports = function(list, options) {
if (typeof DEBUG !== "undefined" && DEBUG) {
if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
}
options = options || {};
options.attrs = typeof options.attrs === "object" ? options.attrs : {};
// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
// tags it will allow on a page
if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();
// By default, add <style> tags to the <head> element
if (!options.insertInto) options.insertInto = "head";
// By default, add <style> tags to the bottom of the target
if (!options.insertAt) options.insertAt = "bottom";
var styles = listToStyles(list, options);
addStylesToDom(styles, options);
return function update (newList) {
var mayRemove = [];
for (var i = 0; i < styles.length; i++) {
var item = styles[i];
var domStyle = stylesInDom[item.id];
domStyle.refs--;
mayRemove.push(domStyle);
}
if(newList) {
var newStyles = listToStyles(newList, options);
addStylesToDom(newStyles, options);
}
for (var i = 0; i < mayRemove.length; i++) {
var domStyle = mayRemove[i];
if(domStyle.refs === 0) {
for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
delete stylesInDom[domStyle.id];
}
}
};
};
function addStylesToDom (styles, options) {
for (var i = 0; i < styles.length; i++) {
var item = styles[i];
var domStyle = stylesInDom[item.id];
if(domStyle) {
domStyle.refs++;
for(var j = 0; j < domStyle.parts.length; j++) {
domStyle.parts[j](item.parts[j]);
}
for(; j < item.parts.length; j++) {
domStyle.parts.push(addStyle(item.parts[j], options));
}
} else {
var parts = [];
for(var j = 0; j < item.parts.length; j++) {
parts.push(addStyle(item.parts[j], options));
}
stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
}
}
}
function listToStyles (list, options) {
var styles = [];
var newStyles = {};
for (var i = 0; i < list.length; i++) {
var item = list[i];
var id = options.base ? item[0] + options.base : item[0];
var css = item[1];
var media = item[2];
var sourceMap = item[3];
var part = {css: css, media: media, sourceMap: sourceMap};
if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
else newStyles[id].parts.push(part);
}
return styles;
}
function insertStyleElement (options, style) {
var target = getElement(options.insertInto)
if (!target) {
throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
}
var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
if (options.insertAt === "top") {
if (!lastStyleElementInsertedAtTop) {
target.insertBefore(style, target.firstChild);
} else if (lastStyleElementInsertedAtTop.nextSibling) {
target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
} else {
target.appendChild(style);
}
stylesInsertedAtTop.push(style);
} else if (options.insertAt === "bottom") {
target.appendChild(style);
} else if (typeof options.insertAt === "object" && options.insertAt.before) {
var nextSibling = getElement(options.insertAt.before, target);
target.insertBefore(style, nextSibling);
} else {
throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
}
}
function removeStyleElement (style) {
if (style.parentNode === null) return false;
style.parentNode.removeChild(style);
var idx = stylesInsertedAtTop.indexOf(style);
if(idx >= 0) {
stylesInsertedAtTop.splice(idx, 1);
}
}
function createStyleElement (options) {
var style = document.createElement("style");
if(options.attrs.type === undefined) {
options.attrs.type = "text/css";
}
if(options.attrs.nonce === undefined) {
var nonce = getNonce();
if (nonce) {
options.attrs.nonce = nonce;
}
}
addAttrs(style, options.attrs);
insertStyleElement(options, style);
return style;
}
function createLinkElement (options) {
var link = document.createElement("link");
if(options.attrs.type === undefined) {
options.attrs.type = "text/css";
}
options.attrs.rel = "stylesheet";
addAttrs(link, options.attrs);
insertStyleElement(options, link);
return link;
}
function addAttrs (el, attrs) {
Object.keys(attrs).forEach(function (key) {
el.setAttribute(key, attrs[key]);
});
}
function getNonce() {
if (false) {}
return __webpack_require__.nc;
}
function addStyle (obj, options) {
var style, update, remove, result;
// If a transform function was defined, run it on the css
if (options.transform && obj.css) {
result = typeof options.transform === 'function'
? options.transform(obj.css)
: options.transform.default(obj.css);
if (result) {
// If transform returns a value, use that instead of the original css.
// This allows running runtime transformations on the css.
obj.css = result;
} else {
// If the transform function returns a falsy value, don't add this css.
// This allows conditional loading of css
return function() {
// noop
};
}
}
if (options.singleton) {
var styleIndex = singletonCounter++;
style = singleton || (singleton = createStyleElement(options));
update = applyToSingletonTag.bind(null, style, styleIndex, false);
remove = applyToSingletonTag.bind(null, style, styleIndex, true);
} else if (
obj.sourceMap &&
typeof URL === "function" &&
typeof URL.createObjectURL === "function" &&
typeof URL.revokeObjectURL === "function" &&
typeof Blob === "function" &&
typeof btoa === "function"
) {
style = createLinkElement(options);
update = updateLink.bind(null, style, options);
remove = function () {
removeStyleElement(style);
if(style.href) URL.revokeObjectURL(style.href);
};
} else {
style = createStyleElement(options);
update = applyToTag.bind(null, style);
remove = function () {
removeStyleElement(style);
};
}
update(obj);
return function updateStyle (newObj) {
if (newObj) {
if (
newObj.css === obj.css &&
newObj.media === obj.media &&
newObj.sourceMap === obj.sourceMap
) {
return;
}
update(obj = newObj);
} else {
remove();
}
};
}
var replaceText = (function () {
var textStore = [];
return function (index, replacement) {
textStore[index] = replacement;
return textStore.filter(Boolean).join('\n');
};
})();
function applyToSingletonTag (style, index, remove, obj) {
var css = remove ? "" : obj.css;
if (style.styleSheet) {
style.styleSheet.cssText = replaceText(index, css);
} else {
var cssNode = document.createTextNode(css);
var childNodes = style.childNodes;
if (childNodes[index]) style.removeChild(childNodes[index]);
if (childNodes.length) {
style.insertBefore(cssNode, childNodes[index]);
} else {
style.appendChild(cssNode);
}
}
}
function applyToTag (style, obj) {
var css = obj.css;
var media = obj.media;
if(media) {
style.setAttribute("media", media)
}
if(style.styleSheet) {
style.styleSheet.cssText = css;
} else {
while(style.firstChild) {
style.removeChild(style.firstChild);
}
style.appendChild(document.createTextNode(css));
}
}
function updateLink (link, options, obj) {
var css = obj.css;
var sourceMap = obj.sourceMap;
/*
If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
and there is no publicPath defined then lets turn convertToAbsoluteUrls
on by default. Otherwise default to the convertToAbsoluteUrls option
directly
*/
var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
if (options.convertToAbsoluteUrls || autoFixUrls) {
css = fixUrls(css);
}
if (sourceMap) {
// http://stackoverflow.com/a/26603875
css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
}
var blob = new Blob([css], { type: "text/css" });
var oldSrc = link.href;
link.href = URL.createObjectURL(blob);
if(oldSrc) URL.revokeObjectURL(oldSrc);
}
/***/ }),
/***/ 21:
/***/ (function(module, exports) {
var core = module.exports = { version: '2.6.9' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
/***/ }),
/***/ 22:
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(7);
var hide = __webpack_require__(9);
var has = __webpack_require__(18);
var SRC = __webpack_require__(29)('src');
var $toString = __webpack_require__(66);
var TO_STRING = 'toString';
var TPL = ('' + $toString).split(TO_STRING);
__webpack_require__(21).inspectSource = function (it) {
return $toString.call(it);
};
(module.exports = function (O, key, val, safe) {
var isFunction = typeof val == 'function';
if (isFunction) has(val, 'name') || hide(val, 'name', key);
if (O[key] === val) return;
if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
if (O === global) {
O[key] = val;
} else if (!safe) {
delete O[key];
hide(O, key, val);
} else if (O[key]) {
O[key] = val;
} else {
hide(O, key, val);
}
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, TO_STRING, function toString() {
return typeof this == 'function' && this[SRC] || $toString.call(this);
});
/***/ }),
/***/ 229:
/***/ (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!./src/lojk-ui/src/components/lotusCarousel/LotusCarousel.vue?vue&type=template&id=533e61ac&scoped=true&
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c("div", { staticClass: "lotus-slider-wrap" }, [
_c(
"ul",
{
staticClass: "lotus-slider-wrap-list",
attrs: { id: "lotus-slider-wrap-list" },
on: { mouseout: _vm.mouseOutFn, mouseover: _vm.mouseOverFn }
},
_vm._l(_vm.imageList.concat(_vm.imageList), function(item, index) {
return _c(
"li",
{
key: index,
on: {
click: function($event) {
return _vm.clickLink(item.url)
},
touchstart: _vm.touchStart,
mousedown: _vm.touchStart,
touchmove: _vm.touchMove,
touchend: _vm.touchEnd,
transitionend: _vm.transitionEnd
}
},
[
_c("img", {
attrs: { src: item.pic, alt: "" },
on: { load: _vm.load }
})
]
)
}),
0
),
_vm._v(" "),
_vm.imageList.length > 1
? _c(
"p",
{ staticClass: "lotus-slider-wrap-dot" },
_vm._l(_vm.imageList, function(item, index) {
return _c("span", {
key: index,
class: index === 0 && "active",
on: {
click: function($event) {
return _vm.clickChangeBenner(index)
}
}
})
}),
0
)
: _vm._e()
])
}
var staticRenderFns = []
render._withStripped = true
// CONCATENATED MODULE: ./src/lojk-ui/src/components/lotusCarousel/LotusCarousel.vue?vue&type=template&id=533e61ac&scoped=true&
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.number.constructor.js
var es6_number_constructor = __webpack_require__(168);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/lojk-ui/src/components/lotusCarousel/LotusCarousel.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var LotusCarouselvue_type_script_lang_js_ = ({
name: 'lotus-carousel',
props: {
//图片list
imageList: {
required: true,
type: Array
},
//开启自动轮播
_isAuto: {
type: Boolean,
default: true
},
//轮播时间
_autoTime: {
type: Number,
default: 3000
},
//支持点击按钮切换
_dotClickFlag: {
type: Boolean,
default: false
}
},
data: function data() {
return {
windowWidth: Math.min(window.innerWidth, document.documentElement.clientWidth),
liLength: 0,
listWidth: 0,
imgNaturalHeight: 0,
imgNaturalWidth: 0,
imgHeight: 0,
startX: 0,
endX: 0,
index: 0,
distance: 0,
time: null,
isAuto: this._props._isAuto,
imageUrls: [],
clickFlag: true
};
},
components: {},
methods: {
//获取x轴滑动距离
getFinger: function getFinger(e) {
var x = 0;
if (e.touches) {
var touches = e.touches;
x = touches[0].clientX;
} else {
x = e.pageX;
}
return x;
},
//设置位置
setTranslate: function setTranslate(index, windowWidth) {
if (typeof document === "undefined") {
return false;
}
var list = document.querySelector('.lotus-slider-wrap-list');
if (document.querySelector('.lotus-slider-wrap-dot')) {
var dot = document.querySelector('.lotus-slider-wrap-dot');
var span = dot.getElementsByTagName('span'); //设置dot className
for (var i = 0; i <= span.length - 1; i++) {
span[i].className = '';
}
span[Math.abs(index) % span.length].className = 'active';
}
this.setTransition(list, index * windowWidth, 300);
},
//设置transition
setTransition: function setTransition(obj, distance, time) {
obj.style.webkitTransition = 'all ' + time + 'ms ease-out';
obj.style.webkitTransform = 'translate3D(' + distance + 'px,0px,0px)';
},
//自动轮播
autoCarousel: function autoCarousel() {
var _this = this;
clearInterval(this.time); //轮播间隔时间
var autoTime = ~~this._props._autoTime;
this.time = setInterval(function () {
if (Math.abs(_this.index) === _this.liLength - 1) {
_this.index = -(_this.liLength / 2 - 1);
} //设置切换位置
_this.setTranslate(_this.index, _this.windowWidth);
if (typeof document === "undefined") {
return false;
} //切换过渡小优化,不然切换的时候,会有小的闪动
document.querySelector('.lotus-slider-wrap-list').style.webkitTransition = 'none';
setTimeout(function () {
_this.index--;
_this.setTranslate(_this.index, _this.windowWidth);
}, 30); //console.log(this.index);
}, autoTime);
},
touchStart: function touchStart(e) {
var _this2 = this;
this.startX = this.getFinger(e);
if (this.index === 0) {
this.index = -this.liLength / 2;
} else if (this.index === this.liLength - 1) {
this.index = -(this.liLength / 2 - 1);
}
clearInterval(this.time);
if (typeof document === "undefined") {
return false;
}
document.querySelector("#lotus-slider-wrap-list").onmousemove = function (ev) {
_this2.touchMove(ev);
};
document.querySelector("#lotus-slider-wrap-list").onmouseup = function (ev) {
_this2.touchEnd(ev);
document.querySelector("#lotus-slider-wrap-list").onmousemove = null;
document.querySelector("#lotus-slider-wrap-list").onmouseup = null;
};
},
touchMove: function touchMove(e) {
clearInterval(this.time);
if (typeof document === "undefined") {
return false;
}
var list = document.querySelector('.lotus-slider-wrap-list');
this.endX = this.getFinger(e);
this.distance = this.endX - this.startX; //console.log(this.distance);
if (Math.abs(this.distance) >= 30) {
this.clickFlag = false;
e.preventDefault();
} else {
this.clickFlag = true;
}
var ss = 0; //判断滑动到最左边加回弹效果
if (this.index === 0 && this.distance > 0) {
//console.log('最左边');
ss = Math.sqrt(Math.abs(this.distance)) + 10;
this.setTransition(list, ~~ss, 100);
return false;
} else if (this.index === -(this.liLength - 1) && this.distance < 0) {
//判断滑动到最右边加回弹效果
//console.log('最右边');
ss = this.index * this.windowWidth - (Math.sqrt(Math.abs(this.distance)) + 10);
this.setTransition(list, ~~ss, 100);
return false;
}
this.setTransition(list, this.index * this.windowWidth + this.distance, 0);
},
touchEnd: function touchEnd() {
var _this3 = this;
if (typeof document === "undefined") {
return false;
}
var list = document.querySelector('.lotus-slider-wrap-list');
clearInterval(this.time); //重新开启自动轮播
if (this._props.imageList.length >= 2 && this.isAuto) {
this.autoCarousel();
} //回弹
if (this.distance !== 0 && Math.abs(this.distance) < this.windowWidth / 3) {
//console.log('回弹');
this.setTransition(list, this.index * this.windowWidth, 300);
return false;
} //滑动距离超过50
if (Math.abs(this.distance) > 50) {
//左滑动 index-- distance<0 ? '左滑动':'右滑动'
if (this.distance < 0) {
this.index--; //滑动到最后一个 index = -(liLength-1);
if (Math.abs(this.index) >= this.liLength - 1) {
this.index = -(this.liLength - 1);
}
} else {
//右滑动
this.index++;
if (this.index >= 0) {
this.index = 0;
}
} //设置切换位置
this.setTranslate(this.index, this.windowWidth);
}
/*this.distance = 0;
this.clickFlag = true;*/
setTimeout(function () {
_this3.distance = 0;
_this3.clickFlag = true;
}, 100);
console.log('end:' + this.distance);
},
transitionEnd: function transitionEnd() {
//判断滑动到最后一个
if (Math.abs(this.index) === this.liLength - 1) {
this.index = -(this.liLength / 2 - 1);
}
},
//鼠标移入调用函数
mouseOverFn: function mouseOverFn() {
clearInterval(this.time);
},
//鼠标移开调用函数
mouseOutFn: function mouseOutFn() {
document.getElementById("lotus-slider-wrap-list").onmousemove = null;
document.getElementById("lotus-slider-wrap-list").onmouseup = null;
this.autoCarousel();
},
//加载数据
load: function load() {
if (typeof document === "undefined") {
return false;
}
var list = document.querySelector('.lotus-slider-wrap-list');
var li = list.querySelectorAll('li');
this.liLength = li.length;
this.listWidth = ~~this.windowWidth * this.liLength;
var img = list.getElementsByTagName('img');
var imgNaturalHeight = img[0].naturalHeight;
var imgNaturalWidth = img[0].naturalWidth;
this.imgHeight = ~~(imgNaturalHeight * this.windowWidth / imgNaturalWidth); //给list设置width height
list.style.width = this.listWidth + 'px';
list.style.webkitTransform = 'translate3D(0px,0px,0px)'; //给li设置width height
for (var i = 0; i < this.liLength; i++) {
li[i].style.width = this.windowWidth + 'px';
li[i].style.height = this.imgHeight > imgNaturalHeight ? imgNaturalHeight + 'px' : this.imgHeight + 'px';
img[i].style.width = this.windowWidth > 750 ? 750 + 'px' : this.windowWidth + 'px';
img[i].style.display = 'block';
}
},
//支持点击按钮切换
clickChangeBenner: function clickChangeBenner(index) {
if (this._props._dotClickFlag) {
this.index = -index;
clearInterval(this.time); //设置切换位置
this.setTranslate(this.index, this.windowWidth);
this.autoCarousel();
}
},
//图片链接跳转
clickLink: function clickLink(url) {
console.log(this.clickFlag);
if (this.clickFlag) {
this.$router.push(url);
}
}
},
mounted: function mounted() {
if (this._props.imageList.length > 1) {
//图片大于2个开始轮播开启自动轮播
this.autoCarousel();
}
},
created: function created() {},
destroyed: function destroyed() {
//销毁 关闭定时器
clearInterval(this.time);
}
});
// CONCATENATED MODULE: ./src/lojk-ui/src/components/lotusCarousel/LotusCarousel.vue?vue&type=script&lang=js&
/* harmony default export */ var lotusCarousel_LotusCarouselvue_type_script_lang_js_ = (LotusCarouselvue_type_script_lang_js_);
// EXTERNAL MODULE: ./src/lojk-ui/src/components/lotusCarousel/LotusCarousel.vue?vue&type=style&index=0&id=533e61ac&lang=less&scoped=true&
var LotusCarouselvue_type_style_index_0_id_533e61ac_lang_less_scoped_true_ = __webpack_require__(175);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(0);
// CONCATENATED MODULE: ./src/lojk-ui/src/components/lotusCarousel/LotusCarousel.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
lotusCarousel_LotusCarouselvue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
"533e61ac",
null
)
/* hot reload */
if (false) { var api; }
component.options.__file = "src/lojk-ui/src/components/lotusCarousel/LotusCarousel.vue"
/* harmony default export */ var LotusCarousel = (component.exports);
// CONCATENATED MODULE: ./src/lojk-ui/src/components/lotusCarousel/index.js
/* concated harmony reexport default */__webpack_require__.d(__webpack_exports__, "default", function() { return LotusCarousel; });
/***/ }),
/***/ 23:
/***/ (function(module, exports, __webpack_require__) {
// 7.1.15 ToLength
var toInteger = __webpack_require__(19);
var min = Math.min;
module.exports = function (it) {
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
/***/ }),
/***/ 25:
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(6);
var IE8_DOM_DEFINE = __webpack_require__(56);
var toPrimitive = __webpack_require__(51);
var dP = Object.defineProperty;
exports.f = __webpack_require__(11) ? 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;
};
/***/ }),
/***/ 28:
/***/ (function(module, exports, __webpack_require__) {
var core = __webpack_require__(21);
var global = __webpack_require__(7);
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__(52) ? 'pure' : 'global',
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
});
/***/ }),
/***/ 29:
/***/ (function(module, exports) {
var id = 0;
var px = Math.random();
module.exports = function (key) {
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
/***/ }),
/***/ 3:
/***/ (function(module, exports) {
/**
* When source maps are enabled, `style-loader` uses a link element with a data-uri to
* embed the css on the page. This breaks all relative urls because now they are relative to a
* bundle instead of the current page.
*
* One solution is to only use full urls, but that may be impossible.
*
* Instead, this function "fixes" the relative urls to be absolute according to the current page location.
*
* A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
*
*/
module.exports = function (css) {
// get current location
var location = typeof window !== "undefined" && window.location;
if (!location) {
throw new Error("fixUrls requires window.location");
}
// blank or null?
if (!css || typeof css !== "string") {
return css;
}
var baseUrl = location.protocol + "//" + location.host;
var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
// convert each url(...)
/*
This regular expression is just a way to recursively match brackets within
a string.
/url\s*\( = Match on the word "url" with any whitespace after it and then a parens
( = Start a capturing group
(?: = Start a non-capturing group
[^)(] = Match anything that isn't a parentheses
| = OR
\( = Match a start parentheses
(?: = Start another non-capturing groups
[^)(]+ = Match anything that isn't a parentheses
| = OR
\( = Match a start parentheses
[^)(]* = Match anything that isn't a parentheses
\) = Match a end parentheses
) = End Group
*\) = Match anything and then a close parens
) = Close non-capturing group
* = Match anything
) = Close capturing group
\) = Match a close parens
/gi = Get all matches, not the first. Be case insensitive.
*/
var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
// strip quotes (if they exist)
var unquotedOrigUrl = origUrl
.trim()
.replace(/^"(.*)"$/, function(o, $1){ return $1; })
.replace(/^'(.*)'$/, function(o, $1){ return $1; });
// already a full url? no change
if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) {
return fullMatch;
}
// convert the url to a full url
var newUrl;
if (unquotedOrigUrl.indexOf("//") === 0) {
//TODO: should we add protocol?
newUrl = unquotedOrigUrl;
} else if (unquotedOrigUrl.indexOf("/") === 0) {
// path should be relative to the base url
newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
} else {
// path should be relative to current directory
newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
}
// send back the fixed url(...)
return "url(" + JSON.stringify(newUrl) + ")";
});
// send back the fixed css
return fixedCss;
};
/***/ }),
/***/ 30:
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = function (it) {
return toString.call(it).slice(8, -1);
};
/***/ }),
/***/ 34:
/***/ (function(module, exports, __webpack_require__) {
// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__(76);
var defined = __webpack_require__(17);
module.exports = function (it) {
return IObject(defined(it));
};
/***/ }),
/***/ 44:
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(12);
var document = __webpack_require__(7).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) : {};
};
/***/ }),
/***/ 45:
/***/ (function(module, exports) {
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/***/ 46:
/***/ (function(module, exports) {
module.exports = function (it) {
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
return it;
};
/***/ }),
/***/ 47:
/***/ (function(module, exports, __webpack_require__) {
var shared = __webpack_require__(28)('keys');
var uid = __webpack_require__(29);
module.exports =