UNPKG

@ykcl/smart-ui-oversea

Version:

A Component Library for Vue.js.

1,748 lines (1,543 loc) 136 kB
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 = 169); /******/ }) /************************************************************************/ /******/ ({ /***/ 0: /***/ (function(module, exports) { module.exports = require("vue"); /***/ }), /***/ 1: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; }); /* unused harmony export setStyle */ /* unused harmony export isScroll */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; }); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); 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 */ var isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.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 = 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 = 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 = 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.setAttribute('class', 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.setAttribute('class', trim(curClass)); } }; /* istanbul ignore next */ var 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 = 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|overlay)/); }; var 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 = 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; }; /***/ }), /***/ 10: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var element_ui_src_utils_popup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9); var PopperJS = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer ? function () {} : __webpack_require__(24); 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. */ /* harmony default export */ __webpack_exports__["a"] = ({ props: { transformOrigin: { type: [Boolean, String], default: true }, placement: { type: String, default: 'bottom' }, boundariesPadding: { type: Number, default: 10 }, 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; options.boundariesPadding = this.boundariesPadding; 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 = element_ui_src_utils_popup__WEBPACK_IMPORTED_MODULE_1__[/* PopupManager */ "a"].nextZIndex(); this.popperElm.addEventListener('click', stop); }, updatePopper: function updatePopper() { var popperJS = this.popperJS; if (popperJS) { popperJS.update(); if (popperJS._popper) { popperJS._popper.style.zIndex = element_ui_src_utils_popup__WEBPACK_IMPORTED_MODULE_1__[/* PopupManager */ "a"].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); } }); /***/ }), /***/ 11: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ t; }); // UNUSED EXPORTS: use, i18n // CONCATENATED MODULE: ./src/locale/lang/zh-CN.js /* harmony default export */ var zh_CN = ({ 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: '十二月' }, shortcuts: { Today: '今天', Yestoday: '昨天', FirstSecondDay: '前两天', FirstThreeDays: '前三天', LastThreeDays: '近三天', LastSevenDays: '近七天', ThisWeek: '本周', LastSecondWeek: '近两周', LastThirdWeek: '近三周', LastWeek: '上周', ThisMoth: '本月', LastMonth: '上月', LastSecondMonth: '近两月', LastThreeMonths: '近三月', LastSixMonths: '近六月' } }, 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: '合计', tableSize: '表格显示', large: '大', medium: '中', small: '小', customize: '自定义显示' }, tree: { emptyText: '暂无数据' }, transfer: { noMatch: '无匹配数据', noData: '无数据', titles: ['列表 1', '列表 2'], filterPlaceholder: '请输入搜索内容', noCheckedFormat: '共 {total} 项', hasCheckedFormat: '已选 {checked}/{total} 项' }, image: { error: '加载失败' }, pageHeader: { title: '返回' }, popconfirm: { confirmButtonText: '确认', cancelButtonText: '取消' }, empty: { description: '暂无数据' } } }); // EXTERNAL MODULE: external "vue" var external_vue_ = __webpack_require__(0); var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_); // EXTERNAL MODULE: external "deepmerge" var external_deepmerge_ = __webpack_require__(17); var external_deepmerge_default = /*#__PURE__*/__webpack_require__.n(external_deepmerge_); // EXTERNAL MODULE: ./src/utils/util.js var util = __webpack_require__(3); // CONCATENATED MODULE: ./src/locale/format.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 RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g; /** * String format template * - Inspired: * https://github.com/Matt-Esch/string-template/index.js */ /* harmony default export */ var format = (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 = Object(util["k" /* hasOwn */])(args, i) ? args[i] : null; if (result === null || result === undefined) { return ''; } return result; } }); } return template; }); // CONCATENATED MODULE: ./src/locale/index.js var locale_format = format(external_vue_default.a); var lang = zh_CN; var merged = false; var locale_i18nHandler = function i18nHandler() { var vuei18n = Object.getPrototypeOf(this || external_vue_default.a).$t; if (typeof vuei18n === 'function' && !!external_vue_default.a.locale) { if (!merged) { merged = true; external_vue_default.a.locale(external_vue_default.a.config.lang, external_deepmerge_default()(lang, external_vue_default.a.locale(external_vue_default.a.config.lang) || {}, { clone: true })); } return vuei18n.apply(this, arguments); } }; var t = function t(path, options) { var value = locale_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 locale_format(value, options); if (!value) return ''; current = value; } return ''; }; var use = function use(l) { lang = l || lang; }; var i18n = function i18n(fn) { locale_i18nHandler = fn || locale_i18nHandler; }; /* harmony default export */ var locale = ({ use: use, t: t, i18n: i18n }); /***/ }), /***/ 169: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/_vue-loader@15.11.1@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_vue-loader@15.11.1@vue-loader/lib??vue-loader-options!./packages/popconfirm/src/main.vue?vue&type=template&id=0b6b9aa4 var render = function () { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c( "yk-popover", _vm._b( { attrs: { trigger: "click" }, model: { value: _vm.visible, callback: function ($$v) { _vm.visible = $$v }, expression: "visible", }, }, "yk-popover", _vm.$attrs, false ), [ _c("div", { staticClass: "yk-popconfirm" }, [ _c("p", { staticClass: "yk-popconfirm__main" }, [ !_vm.hideIcon && _vm.icon ? _c("i", { staticClass: "yk-popconfirm__icon", class: _vm.icon, style: { color: _vm.iconColor }, }) : _vm._e(), !_vm.hideIcon && !_vm.icon ? _c("img", { staticClass: "yk-popconfirm__icon", attrs: { src: __webpack_require__(79) }, }) : _vm._e(), _vm._v("\n " + _vm._s(_vm.title) + "\n "), ]), _c( "div", { staticClass: "yk-popconfirm__action" }, [ _c( "yk-button", { staticStyle: { color: "#000" }, attrs: { size: "medium", type: _vm.cancelButtonType }, on: { click: _vm.cancel }, }, [ _vm._v( "\n " + _vm._s(_vm.displayCancelButtonText) + "\n " ), ] ), _c( "yk-button", { attrs: { size: "medium", type: _vm.confirmButtonType }, on: { click: _vm.confirm }, }, [ _vm._v( "\n " + _vm._s(_vm.displayConfirmButtonText) + "\n " ), ] ), ], 1 ), ]), _vm._t("reference", null, { slot: "reference" }), ], 2 ) } var staticRenderFns = [] render._withStripped = true // CONCATENATED MODULE: ./packages/popconfirm/src/main.vue?vue&type=template&id=0b6b9aa4 // EXTERNAL MODULE: ./packages/popover/index.js + 6 modules var popover = __webpack_require__(52); // EXTERNAL MODULE: ./packages/button/index.js + 10 modules var packages_button = __webpack_require__(22); // EXTERNAL MODULE: ./src/locale/index.js + 2 modules var locale = __webpack_require__(11); // CONCATENATED MODULE: ./node_modules/_babel-loader@7.1.5@babel-loader/lib!./node_modules/_vue-loader@15.11.1@vue-loader/lib??vue-loader-options!./packages/popconfirm/src/main.vue?vue&type=script&lang=js // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var mainvue_type_script_lang_js = ({ name: 'YkPopconfirm', props: { title: { type: String }, confirmButtonText: { type: String }, cancelButtonText: { type: String }, confirmButtonType: { type: String, default: 'primary' }, cancelButtonType: { type: String, default: 'ghost' }, icon: { type: String, default: '' }, iconColor: { type: String, default: '' }, hideIcon: { type: Boolean, default: false } }, components: { YkPopover: popover["default"], YkButton: packages_button["default"] }, data: function data() { return { visible: false }; }, computed: { displayConfirmButtonText: function displayConfirmButtonText() { return this.confirmButtonText || Object(locale["a" /* t */])('el.popconfirm.confirmButtonText'); }, displayCancelButtonText: function displayCancelButtonText() { return this.cancelButtonText || Object(locale["a" /* t */])('el.popconfirm.cancelButtonText'); } }, methods: { confirm: function confirm() { this.visible = false; this.$emit('confirm'); }, cancel: function cancel() { this.visible = false; this.$emit('cancel'); } } }); // CONCATENATED MODULE: ./packages/popconfirm/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@15.11.1@vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(2); // CONCATENATED MODULE: ./packages/popconfirm/src/main.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( src_mainvue_type_script_lang_js, render, staticRenderFns, false, null, null, null ) /* harmony default export */ var main = (component.exports); // CONCATENATED MODULE: ./packages/popconfirm/index.js /* istanbul ignore next */ main.install = function (Vue) { Vue.component(main.name, main); }; /* harmony default export */ var popconfirm = __webpack_exports__["default"] = (main); /***/ }), /***/ 17: /***/ (function(module, exports) { module.exports = require("deepmerge"); /***/ }), /***/ 19: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1); var nodeList = []; var ctx = '@@clickoutsideContext'; var startClick = void 0; var seed = 0; !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && Object(element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_1__[/* on */ "g"])(document, 'mousedown', function (e) { return startClick = e; }); !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && Object(element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_1__[/* on */ "g"])(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"> * ``` */ /* harmony default export */ __webpack_exports__["a"] = ({ 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]; } }); /***/ }), /***/ 2: /***/ (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 } } /***/ }), /***/ 22: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/_vue-loader@15.11.1@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_vue-loader@15.11.1@vue-loader/lib??vue-loader-options!./packages/button/src/button.vue?vue&type=template&id=087811ec var render = function () { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _vm.showOmit ? _c( "yk-tooltip", { attrs: { effect: "dark", placement: "top" } }, [ _c( "div", { attrs: { slot: "content" }, slot: "content" }, [_vm._t("default")], 2 ), _c( "btn", _vm._b( { ref: "button", attrs: { omit: _vm.showOmit }, on: { "update:omit": function ($event) { _vm.showOmit = $event }, click: _vm.handleClick, }, }, "btn", _vm.$props, false ), [_vm._t("default")], 2 ), ], 1 ) : _c( "btn", _vm._b( { ref: "button", attrs: { omit: _vm.showOmit }, on: { "update:omit": function ($event) { _vm.showOmit = $event }, click: _vm.handleClick, }, }, "btn", _vm.$props, false ), [_vm._t("default")], 2 ) } var staticRenderFns = [] render._withStripped = true // CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=template&id=087811ec // CONCATENATED MODULE: ./node_modules/_vue-loader@15.11.1@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_vue-loader@15.11.1@vue-loader/lib??vue-loader-options!./packages/button/src/btn.vue?vue&type=template&id=3d123cf2 var btnvue_type_template_id_3d123cf2_render = function () { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c( "button", { ref: "ykButtonRef", staticClass: "yk-button", class: [ _vm.type ? "yk-button--" + _vm.type : "", _vm.buttonSize ? "yk-button--" + _vm.buttonSize : "", { "is-disabled": _vm.buttonDisabled, "is-loading": _vm.loading, "is-plain": _vm.plain, "is-round": _vm.round, "is-circle": _vm.circle, "is-iconOnly": _vm.isIconOnly, "is-omit": _vm.omit, }, ], attrs: { disabled: _vm.buttonDisabled || _vm.loading, autofocus: _vm.autofocus, type: _vm.nativeType, }, on: { click: _vm.handleClick }, }, [ _vm.icon && !_vm.loading ? _c("i", { class: _vm.icon }) : _vm._e(), _vm.$slots.default ? _c("span", [_vm._t("default")], 2) : _vm._e(), _vm.loading ? _c("i", { staticClass: "el-icon-loading", staticStyle: { "margin-left": "7px" }, }) : _vm._e(), ] ) } var btnvue_type_template_id_3d123cf2_staticRenderFns = [] btnvue_type_template_id_3d123cf2_render._withStripped = true // CONCATENATED MODULE: ./packages/button/src/btn.vue?vue&type=template&id=3d123cf2 // CONCATENATED MODULE: ./node_modules/_babel-loader@7.1.5@babel-loader/lib!./node_modules/_vue-loader@15.11.1@vue-loader/lib??vue-loader-options!./packages/button/src/btn.vue?vue&type=script&lang=js // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var btnvue_type_script_lang_js = ({ name: 'YkButton', inject: { ykForm: { default: '' }, ykFormItem: { 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, omit: Boolean }, data: function data() { return { isIconOnly: false }; }, mounted: function mounted() { this.setIconOnly(); this.setDropdown(); }, computed: { _ykFormItemSize: function _ykFormItemSize() { return (this.ykFormItem || {}).ykFormItemSize; }, buttonSize: function buttonSize() { return this.size || this._ykFormItemSize || (this.$ELEMENT || {}).size; }, buttonDisabled: function buttonDisabled() { return this.disabled || (this.ykForm || {}).disabled; } }, methods: { handleClick: function handleClick(evt) { this.$emit('click', evt); }, setIconOnly: function setIconOnly() { var button = this.$refs.ykButtonRef; if (button.children.length === 1) { var el = button.children[0]; if (el.length === 0) { this.isIconOnly = el.className.indexOf('icon') > -1; } else { if (el.children && el.children.length === 1) { var ary = Array.from(el.children); if (ary[0] && ary[0].className && ary[0].className.baseVal) { this.isIconOnly = ary[0].className.baseVal.indexOf('icon') > -1; } else { this.isIconOnly = ary[0].className.indexOf('icon') > -1; } } else { this.isIconOnly = el.className && el.className.indexOf('icon') > -1; } } } }, setDropdown: function setDropdown() { var ButtonList = document.querySelectorAll('.yk-button-group'); ButtonList.forEach(function (button) { var ary = Array.from(button.children); ary.map(function (child) { if (child.className && child.className.indexOf('is-iconOnly') > -1) { if (child.children[0] && child.children[0].className.indexOf('down') > -1) { child.classList.add('is-downIcon'); } if (child.children[0].children && child.children[0].children.length === 1) { if (child.children[0].children[0].className.indexOf('down') > -1) { child.classList.add('is-downIcon'); } } } }); }); } } }); // CONCATENATED MODULE: ./packages/button/src/btn.vue?vue&type=script&lang=js /* harmony default export */ var src_btnvue_type_script_lang_js = (btnvue_type_script_lang_js); // EXTERNAL MODULE: ./node_modules/_vue-loader@15.11.1@vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(2); // CONCATENATED MODULE: ./packages/button/src/btn.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( src_btnvue_type_script_lang_js, btnvue_type_template_id_3d123cf2_render, btnvue_type_template_id_3d123cf2_staticRenderFns, false, null, null, null ) /* harmony default export */ var btn = (component.exports); // CONCATENATED MODULE: ./node_modules/_babel-loader@7.1.5@babel-loader/lib!./node_modules/_vue-loader@15.11.1@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: 'YkButton', components: { btn: btn }, inject: { ykForm: { default: '' }, ykFormItem: { 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, omit: Boolean }, data: function data() { return { showTooltop: false, showOmit: false }; }, computed: {}, mounted: function mounted() { var _this = this; this.$nextTick(function () { _this.init(); }); }, methods: { handleClick: function handleClick(evt) { this.$emit('click', evt); }, init: function init() { if (this.$props.omit) { this.showOmit = true; } // 内容的长度,如果超过了按钮长度,返回true var button = this.$refs.button.$refs.ykButtonRef; var span = button.querySelector('span'); if (span && span.offsetWidth > button.offsetWidth) { this.showOmit = true; } } } }); // 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); // CONCATENATED MODULE: ./packages/button/src/button.vue /* normalize component */ var button_component = Object(componentNormalizer["a" /* default */])( src_buttonvue_type_script_lang_js, render, staticRenderFns, false, null, null, null ) /* harmony default export */ var src_button = (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); /***/ }), /***/ 24: /***/ (function(module, exports, __webpack_require__) { 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 {} })(this, 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