zcloud-ui
Version:
A Component Library for Vue.js.
1,862 lines (1,583 loc) • 183 kB
JavaScript
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1];
/******/
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0, resolves = [];
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ resolves.push(installedChunks[chunkId][0]);
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules) {
/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
/******/ modules[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(parentJsonpFunction) parentJsonpFunction(data);
/******/
/******/ while(resolves.length) {
/******/ resolves.shift()();
/******/ }
/******/
/******/ };
/******/
/******/
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // Promise = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ 0: 0
/******/ };
/******/
/******/
/******/
/******/ // script path function
/******/ function jsonpScriptSrc(chunkId) {
/******/ return __webpack_require__.p + "" + chunkId + ".js"
/******/ }
/******/
/******/ // 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;
/******/ }
/******/
/******/ // This file contains only the entry chunk.
/******/ // The chunk loading function for additional chunks
/******/ __webpack_require__.e = function requireEnsure(chunkId) {
/******/ var promises = [];
/******/
/******/
/******/ // JSONP chunk loading for javascript
/******/
/******/ var installedChunkData = installedChunks[chunkId];
/******/ if(installedChunkData !== 0) { // 0 means "already installed".
/******/
/******/ // a Promise means "currently loading".
/******/ if(installedChunkData) {
/******/ promises.push(installedChunkData[2]);
/******/ } else {
/******/ // setup Promise in chunk cache
/******/ var promise = new Promise(function(resolve, reject) {
/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
/******/ });
/******/ promises.push(installedChunkData[2] = promise);
/******/
/******/ // start chunk loading
/******/ var script = document.createElement('script');
/******/ var onScriptComplete;
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120;
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
/******/ }
/******/ script.src = jsonpScriptSrc(chunkId);
/******/
/******/ // create error before stack unwound to get useful stacktrace later
/******/ var error = new Error();
/******/ onScriptComplete = function (event) {
/******/ // avoid mem leaks in IE.
/******/ script.onerror = script.onload = null;
/******/ clearTimeout(timeout);
/******/ var chunk = installedChunks[chunkId];
/******/ if(chunk !== 0) {
/******/ if(chunk) {
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
/******/ var realSrc = event && event.target && event.target.src;
/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
/******/ error.name = 'ChunkLoadError';
/******/ error.type = errorType;
/******/ error.request = realSrc;
/******/ chunk[1](error);
/******/ }
/******/ installedChunks[chunkId] = undefined;
/******/ }
/******/ };
/******/ var timeout = setTimeout(function(){
/******/ onScriptComplete({ type: 'timeout', target: script });
/******/ }, 120000);
/******/ script.onerror = script.onload = onScriptComplete;
/******/ document.head.appendChild(script);
/******/ }
/******/ }
/******/ return Promise.all(promises);
/******/ };
/******/
/******/ // 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 = "/";
/******/
/******/ // on error function for async loading
/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
/******/
/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
/******/ jsonpArray.push = webpackJsonpCallback;
/******/ jsonpArray = jsonpArray.slice();
/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
/******/ var parentJsonpFunction = oldJsonpFunction;
/******/
/******/
/******/ // 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,
(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
}
}
/***/ }),
/* 1 */
/***/ (function(module, exports) {
module.exports = require("zcloud-ui/lib/utils/util");
/***/ }),
/* 2 */
/***/ (function(module, exports) {
module.exports = require("zcloud-ui/lib/config/index");
/***/ }),
/* 3 */
/***/ (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 + ' */';
}
/***/ }),
/* 4 */
/***/ (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__(8);
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);
}
/***/ }),
/* 5 */
/***/ (function(module, exports) {
module.exports = require("zcloud-ui/lib/utils/global");
/***/ }),
/* 6 */
/***/ (function(module, exports) {
module.exports = require("zcloud-ui/lib/mixins/emitter");
/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(27);
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__(4)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 8 */
/***/ (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;
};
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(46);
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__(4)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 10 */
/***/ (function(module, exports) {
module.exports = require("lodash");
/***/ }),
/* 11 */
/***/ (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/form/src/formItem/input.vue?vue&type=template&id=789689d4&
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c(
"el-input",
{
staticStyle: { width: "100%" },
attrs: {
disabled: _vm.item.disabled ? _vm.item.disabled : _vm.disabled,
readonly: _vm.item.readonly ? _vm.item.readonly : _vm.readonly,
"show-word-limit": _vm.item.showWordLimit,
"show-password": _vm.item.showPassword,
"suffix-icon": _vm.item.iconRight,
"prefix-icon": _vm.item.iconLeft,
placeholder: _vm.item.placeholder
? _vm.item.placeholder
: "请输入" + _vm.item.label,
type: _vm.item.inputType ? _vm.item.inputType : "text",
rows: _vm.item.rows ? _vm.item.rows : 2,
maxlength: _vm.item.maxlength,
clearable: _vm.item.clearable === false ? false : true
},
on: {
change: function(val) {
return _vm.change(val)
},
focus: _vm.handleFocus,
input: _vm.handleInput,
blur: _vm.handleBlur
},
model: {
value: _vm.formModel[_vm.item.value],
callback: function($$v) {
_vm.$set(_vm.formModel, _vm.item.value, $$v)
},
expression: "formModel[item.value]"
}
},
[
_vm.item.sign
? _c("template", { slot: "append" }, [_vm._v(_vm._s(_vm.item.sign))])
: _vm._e()
],
2
)
}
var staticRenderFns = []
render._withStripped = true
// CONCATENATED MODULE: ./packages/form/src/formItem/input.vue?vue&type=template&id=789689d4&
// EXTERNAL MODULE: external "zcloud-ui/lib/utils/util"
var util_ = __webpack_require__(1);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/formItem/input.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var inputvue_type_script_lang_js_ = ({
name: 'input',
props: {
formModel: {
type: Object,
default: function _default() {}
},
item: {
type: Object,
default: function _default() {}
},
disabled: {
type: Boolean,
default: false
},
readonly: {
type: Boolean,
default: false
}
},
created: function created() {
this.init();
},
methods: {
init: function init() {
// 处理默认值
if (!Object(util_["doIsEmpty"])(this.formModel[this.item.value]) || this.formModel[this.item.value] === 0) {
this.change(this.formModel[this.item.value], true);
}
},
// 改变事件 isInit为true 初始化赋值改变 并非是表单事件改变
change: function change(val) {
var isInit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
this.item.onChange && this.item.onChange(val, this.item, isInit);
},
handleFocus: function handleFocus(e) {
var onFocus = this.item.onFocus;
onFocus && onFocus(this.formModel[this.item.value], this.item);
},
handleInput: function handleInput(e) {
var onInput = this.item.onInput;
onInput && onInput(this.formModel[this.item.value], this.item);
},
handleBlur: function handleBlur(e) {
var onBlur = this.item.onBlur;
onBlur && onBlur(this.formModel[this.item.value], this.item);
}
}
});
// CONCATENATED MODULE: ./packages/form/src/formItem/input.vue?vue&type=script&lang=js&
/* harmony default export */ var formItem_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/form/src/formItem/input.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
formItem_inputvue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
null,
null
)
/* hot reload */
if (false) { var api; }
component.options.__file = "packages/form/src/formItem/input.vue"
/* harmony default export */ var input = __webpack_exports__["a"] = (component.exports);
/***/ }),
/* 12 */
/***/ (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/form/src/formItem/select.vue?vue&type=template&id=30ffb93c&
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c(
"el-select",
{
staticStyle: { width: "100%" },
attrs: {
disabled: _vm.item.disabled ? _vm.item.disabled : _vm.disabled,
readonly: _vm.item.readonly ? _vm.item.readonly : _vm.readonly,
clearable: _vm.item.clearable === false ? false : true,
placeholder: _vm.item.placeholder
? _vm.item.placeholder
: "请选择" + _vm.item.label,
multiple: _vm.item.multiple,
"collapse-tags": _vm.item.collapseTags,
filterable: _vm.item.filterable,
"reserve-kyword": _vm.item.reserveKyword,
remote: _vm.item.remote,
"remote-method": _vm.remoteMethod,
"multiple-limit": _vm.item.limit
},
on: {
change: function(val) {
return _vm.change(val)
},
"visible-change": _vm.blurSelect
},
model: {
value: _vm.formModel[_vm.item.value],
callback: function($$v) {
_vm.$set(_vm.formModel, _vm.item.value, $$v)
},
expression: "formModel[item.value]"
}
},
_vm._l(_vm.item.options, function(its) {
return _c("el-option", {
key: its[_vm.item.optionsKeys.value],
attrs: {
label: _vm.getLable(its, _vm.item),
value: its[_vm.item.optionsKeys.value],
disabled: its.disabled
}
})
}),
1
)
}
var staticRenderFns = []
render._withStripped = true
// CONCATENATED MODULE: ./packages/form/src/formItem/select.vue?vue&type=template&id=30ffb93c&
// EXTERNAL MODULE: external "zcloud-ui/lib/utils/util"
var util_ = __webpack_require__(1);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/formItem/select.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var selectvue_type_script_lang_js_ = ({
name: 'select',
props: {
formModel: {
type: Object,
default: function _default() {}
},
item: {
type: Object,
default: function _default() {}
},
disabled: {
type: Boolean,
default: false
},
readonly: {
type: Boolean,
default: false
}
},
data: function data() {
return {
box: null
};
},
created: function created() {
this.init();
},
methods: {
init: function init() {
// 设置默认key
if (Object(util_["doIsEmpty"])(this.item.optionsKeys)) {
this.item.optionsKeys = {
key: 'typename',
key1: '',
value: 'typecode'
};
}
this.box = this.getObj();
// 是否增加全部选项 多选的时候有用
if (this.item.isAll && this.item.multiple) {
var obj = {};
obj[this.item.optionsKeys.key] = '全部';
obj[this.item.optionsKeys.value] = '全部';
if (!(this.item.options[0] && this.item.options[0][this.item.optionsKeys.key] === '全部')) {
this.item.options.unshift(obj);
}
}
// 处理默认值
if (!Object(util_["doIsEmpty"])(this.formModel[this.item.value]) || this.formModel[this.item.value] === 0) {
this.change(this.formModel[this.item.value], true);
}
},
/**
* @description: 远程搜索 下拉清空
* @param {*}
* @return {*}
*/
blurSelect: function blurSelect() {
if (this.item.remote) {
this.item.options = [];
}
},
// 获取lable
getLable: function getLable(its, item) {
var str = '';
if (its[item.optionsKeys.key1]) {
str = its[item.optionsKeys.key] + ' (' + its[item.optionsKeys.key1] + ')';
} else {
str = its[item.optionsKeys.key];
}
return str;
},
// 改变事件 isInit为true 初始化赋值改变 并非是表单事件改变
change: function change(val) {
var _this = this;
var isInit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var onChange = this.item.onChange;
if (Array.isArray(val)) {
if (val[val.length - 1] === '全部') {
this.formModel[this.item.value] = ['全部'];
} else if (val.indexOf('全部') !== -1) {
this.formModel[this.item.value].shift();
}
var arr = [];
val.forEach(function (its) {
arr.push(_this.box(its));
});
onChange && onChange(val, arr, isInit);
} else {
var obj = this.item.options.find(function (item) {
return item[_this.item.optionsKeys.value] === val;
});
onChange && onChange(val, obj, isInit);
}
},
/**
* @description: 高阶函数 柯里化函数
* @param {*}
* @return {*}
*/
getObj: function getObj() {
var _this2 = this;
// 缓存一个对象
var obj = {};
this.item.options.forEach(function (its, index) {
obj[its[_this2.item.optionsKeys.value]] = its;
});
return function (val) {
return obj[val];
};
},
/**
* @description: 远程搜索
* @param {*} key
* @return {*}
*/
remoteMethod: function remoteMethod(key) {
var remoteMethod = this.item.remoteMethod;
remoteMethod && remoteMethod(key, this.item);
}
}
});
// CONCATENATED MODULE: ./packages/form/src/formItem/select.vue?vue&type=script&lang=js&
/* harmony default export */ var formItem_selectvue_type_script_lang_js_ = (selectvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(0);
// CONCATENATED MODULE: ./packages/form/src/formItem/select.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
formItem_selectvue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
null,
null
)
/* hot reload */
if (false) { var api; }
component.options.__file = "packages/form/src/formItem/select.vue"
/* harmony default export */ var formItem_select = __webpack_exports__["a"] = (component.exports);
/***/ }),
/* 13 */
/***/ (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/form/src/formItem/checkbox.vue?vue&type=template&id=6ace1329&
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c(
"el-col",
[
_vm.item.isAllCheck
? _c(
"el-checkbox",
{
attrs: { indeterminate: _vm.isIndeterminate },
on: { change: _vm.handleCheckAllChange },
model: {
value: _vm.checkAll,
callback: function($$v) {
_vm.checkAll = $$v
},
expression: "checkAll"
}
},
[_vm._v("全选")]
)
: _vm._e(),
_c(
"el-checkbox-group",
{
staticStyle: { width: "100%" },
attrs: {
disabled: _vm.item.disabled ? _vm.item.disabled : _vm.disabled,
readonly: _vm.item.readonly ? _vm.item.readonly : _vm.readonly
},
on: {
change: function(val) {
return _vm.change(val)
}
},
model: {
value: _vm.formModel[_vm.item.value],
callback: function($$v) {
_vm.$set(_vm.formModel, _vm.item.value, $$v)
},
expression: "formModel[item.value]"
}
},
_vm._l(_vm.item.options, function(its) {
return _c(
"el-checkbox",
{
key: its[_vm.item.optionsKeys.value],
attrs: {
disabled: its.disabled,
label: its[_vm.item.optionsKeys.value]
}
},
[
_vm._v(
"\n " +
_vm._s(its[_vm.item.optionsKeys.key]) +
"\n "
)
]
)
}),
1
)
],
1
)
}
var staticRenderFns = []
render._withStripped = true
// CONCATENATED MODULE: ./packages/form/src/formItem/checkbox.vue?vue&type=template&id=6ace1329&
// EXTERNAL MODULE: external "zcloud-ui/lib/utils/util"
var util_ = __webpack_require__(1);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/formItem/checkbox.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var checkboxvue_type_script_lang_js_ = ({
name: 'checkbox',
props: {
formModel: {
type: Object,
default: function _default() {}
},
item: {
type: Object,
default: function _default() {}
},
disabled: {
type: Boolean,
default: false
},
readonly: {
type: Boolean,
default: false
}
},
data: function data() {
return {
checkAll: false,
isIndeterminate: false,
box: null
};
},
created: function created() {
this.init();
},
methods: {
init: function init() {
// 设置默认key
if (Object(util_["doIsEmpty"])(this.item.optionsKeys)) {
this.item.optionsKeys = {
key: 'typename',
value: 'typecode'
};
}
this.box = this.getObj();
// 处理默认值
if (!Object(util_["doIsEmpty"])(this.formModel[this.item.value])) {
this.change(this.formModel[this.item.value], true);
}
},
/**
* @description: 点击全选
* @param {*} val
* @return {*}
*/
handleCheckAllChange: function handleCheckAllChange(val) {
var _this = this;
var arr = [];
if (val) {
// 全选
this.item.options.forEach(function (its) {
!its.disabled && arr.push(its[_this.item.optionsKeys.value]);
});
this.formModel[this.item.value] = arr;
} else {
this.formModel[this.item.value] = [];
}
this.isIndeterminate = false;
// 组装onchange 第二个参数 选中的数据
var newArr = [];
arr.forEach(function (its) {
newArr.push(_this.box(its));
});
this.item.onChange && this.item.onChange(this.formModel[this.item.value], newArr);
},
// isInit为true 初始化赋值改变 并非是表单事件改变
change: function change(val) {
var _this2 = this;
var isInit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
// 判断全选
var checkedCount = val.length;
var checkData = this.item.options.filter(function (its) {
return !its.disabled;
});
this.checkAll = checkedCount === checkData.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < checkData.length;
// 组装onchange 第二个参数 选中的数据
var arr = [];
val.forEach(function (its) {
arr.push(_this2.box(its));
});
this.item.onChange && this.item.onChange(val, arr, isInit);
},
/**
* @description: 高阶函数 柯里化函数
* @param {*}
* @return {*}
*/
getObj: function getObj() {
var _this3 = this;
// 缓存一个对象
var obj = {};
this.item.options.forEach(function (its, index) {
obj[its[_this3.item.optionsKeys.value]] = its;
});
return function (val) {
return obj[val];
};
}
}
});
// CONCATENATED MODULE: ./packages/form/src/formItem/checkbox.vue?vue&type=script&lang=js&
/* harmony default export */ var formItem_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/form/src/formItem/checkbox.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
formItem_checkboxvue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
null,
null
)
/* hot reload */
if (false) { var api; }
component.options.__file = "packages/form/src/formItem/checkbox.vue"
/* harmony default export */ var formItem_checkbox = __webpack_exports__["a"] = (component.exports);
/***/ }),
/* 14 */
/***/ (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/form/src/formItem/radio.vue?vue&type=template&id=4df874f6&
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c(
"el-radio-group",
{
staticStyle: { width: "100%" },
attrs: {
disabled: _vm.item.disabled ? _vm.item.disabled : _vm.disabled,
readonly: _vm.item.readonly ? _vm.item.readonly : _vm.readonly
},
on: {
change: function(val) {
return _vm.change(val)
}
},
model: {
value: _vm.formModel[_vm.item.value],
callback: function($$v) {
_vm.$set(_vm.formModel, _vm.item.value, $$v)
},
expression: "formModel[item.value]"
}
},
_vm._l(_vm.item.options, function(its) {
return _c(
"el-radio",
{
key: its[_vm.item.optionsKeys.value],
attrs: {
disabled: its.disabled,
label: its[_vm.item.optionsKeys.value]
}
},
[
_vm._v(
"\n " +
_vm._s(its[_vm.item.optionsKeys.key]) +
"\n "
)
]
)
}),
1
)
}
var staticRenderFns = []
render._withStripped = true
// CONCATENATED MODULE: ./packages/form/src/formItem/radio.vue?vue&type=template&id=4df874f6&
// EXTERNAL MODULE: external "zcloud-ui/lib/utils/util"
var util_ = __webpack_require__(1);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/formItem/radio.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var radiovue_type_script_lang_js_ = ({
name: 'radio',
props: {
formModel: {
type: Object,
default: function _default() {}
},
item: {
type: Object,
default: function _default() {}
},
disabled: {
type: Boolean,
default: false
},
readonly: {
type: Boolean,
default: false
}
},
data: function data() {
return {
box: null
};
},
created: function created() {
this.init();
},
methods: {
init: function init() {
// 设置默认key
if (Object(util_["doIsEmpty"])(this.item.optionsKeys)) {
this.item.optionsKeys = {
key: 'typename',
value: 'typecode'
};
}
this.box = this.getObj();
// 处理默认值
if (!Object(util_["doIsEmpty"])(this.formModel[this.item.value]) || this.formModel[this.item.value] === 0) {
this.change(this.formModel[this.item.value], true);
}
},
// 改变事件 isInit为true 初始化赋值改变 并非是表单事件改变
change: function change(val) {
var _this = this;
var isInit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var obj = this.item.options.find(function (item) {
return item[_this.item.optionsKeys.value] === val;
});
this.item.onChange && this.item.onChange(val, obj, isInit);
},
/**
* @description: 高阶函数 柯里化函数
* @param {*}
* @return {*}
*/
getObj: function getObj() {
var _this2 = this;
// 缓存一个对象
var obj = {};
this.item.options.forEach(function (its, index) {
obj[its[_this2.item.optionsKeys.value]] = its;
});
return function (val) {
return obj[val];
};
}
}
});
// CONCATENATED MODULE: ./packages/form/src/formItem/radio.vue?vue&type=script&lang=js&
/* harmony default export */ var formItem_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/form/src/formItem/radio.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
formItem_radiovue_type_script_lang_