From ed2901ce2e4e359ce985d869e02a12af56ab9897 Mon Sep 17 00:00:00 2001 From: WebHW <664322480@qq.com> Date: Fri, 4 Jan 2019 16:03:30 +0800 Subject: [PATCH] return the case--this.$refs.inputArea is undefined --- package/vue-beauty.js | 608 +++++++++++++++++++++--------------------- 1 file changed, 304 insertions(+), 304 deletions(-) diff --git a/package/vue-beauty.js b/package/vue-beauty.js index 967eef2..42bce28 100644 --- a/package/vue-beauty.js +++ b/package/vue-beauty.js @@ -2816,28 +2816,28 @@ module.exports = isLength; /* 120 */ /***/ (function(module, exports) { -module.exports = function(module) { - if(!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - if(!module.children) module.children = []; - Object.defineProperty(module, "loaded", { - enumerable: true, - get: function() { - return module.l; - } - }); - Object.defineProperty(module, "id", { - enumerable: true, - get: function() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; -}; +module.exports = function(module) { + if(!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + if(!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } + return module; +}; /***/ }), @@ -3214,8 +3214,8 @@ var iterator_default = /*#__PURE__*/__webpack_require__.n(iterator); // CONCATENATED MODULE: ./vb/utils/config.js -/** - * Created by wl on 2017/3/16. +/** + * Created by wl on 2017/3/16. */ /* harmony default export */ var utils_config = ({ @@ -4895,8 +4895,8 @@ var src_popper = __webpack_require__(236); var popper_default = /*#__PURE__*/__webpack_require__.n(src_popper); // CONCATENATED MODULE: ./vb/mixins/popper.js -/** - * https://github.com/freeze-component/vue-popper +/** + * https://github.com/freeze-component/vue-popper * */ @@ -17208,437 +17208,437 @@ var modal_style = __webpack_require__(296); var modal_style_default = /*#__PURE__*/__webpack_require__.n(modal_style); // CONCATENATED MODULE: ./vb/utils/key-code.js -/** - * @ignore - * some key-codes definition and utils from closure-library - * @author yiminghe@gmail.com +/** + * @ignore + * some key-codes definition and utils from closure-library + * @author yiminghe@gmail.com */ var KeyCode = { - /** - * MAC_ENTER + /** + * MAC_ENTER */ MAC_ENTER: 3, - /** - * BACKSPACE + /** + * BACKSPACE */ BACKSPACE: 8, - /** - * TAB + /** + * TAB */ TAB: 9, - /** - * NUMLOCK on FF/Safari Mac + /** + * NUMLOCK on FF/Safari Mac */ NUM_CENTER: 12, // NUMLOCK on FF/Safari Mac - /** - * ENTER + /** + * ENTER */ ENTER: 13, - /** - * SHIFT + /** + * SHIFT */ SHIFT: 16, - /** - * CTRL + /** + * CTRL */ CTRL: 17, - /** - * ALT + /** + * ALT */ ALT: 18, - /** - * PAUSE + /** + * PAUSE */ PAUSE: 19, - /** - * CAPS_LOCK + /** + * CAPS_LOCK */ CAPS_LOCK: 20, - /** - * ESC + /** + * ESC */ ESC: 27, - /** - * SPACE + /** + * SPACE */ SPACE: 32, - /** - * PAGE_UP + /** + * PAGE_UP */ PAGE_UP: 33, // also NUM_NORTH_EAST - /** - * PAGE_DOWN + /** + * PAGE_DOWN */ PAGE_DOWN: 34, // also NUM_SOUTH_EAST - /** - * END + /** + * END */ END: 35, // also NUM_SOUTH_WEST - /** - * HOME + /** + * HOME */ HOME: 36, // also NUM_NORTH_WEST - /** - * LEFT + /** + * LEFT */ LEFT: 37, // also NUM_WEST - /** - * UP + /** + * UP */ UP: 38, // also NUM_NORTH - /** - * RIGHT + /** + * RIGHT */ RIGHT: 39, // also NUM_EAST - /** - * DOWN + /** + * DOWN */ DOWN: 40, // also NUM_SOUTH - /** - * PRINT_SCREEN + /** + * PRINT_SCREEN */ PRINT_SCREEN: 44, - /** - * INSERT + /** + * INSERT */ INSERT: 45, // also NUM_INSERT - /** - * DELETE + /** + * DELETE */ DELETE: 46, // also NUM_DELETE - /** - * ZERO + /** + * ZERO */ ZERO: 48, - /** - * ONE + /** + * ONE */ ONE: 49, - /** - * TWO + /** + * TWO */ TWO: 50, - /** - * THREE + /** + * THREE */ THREE: 51, - /** - * FOUR + /** + * FOUR */ FOUR: 52, - /** - * FIVE + /** + * FIVE */ FIVE: 53, - /** - * SIX + /** + * SIX */ SIX: 54, - /** - * SEVEN + /** + * SEVEN */ SEVEN: 55, - /** - * EIGHT + /** + * EIGHT */ EIGHT: 56, - /** - * NINE + /** + * NINE */ NINE: 57, - /** - * QUESTION_MARK + /** + * QUESTION_MARK */ QUESTION_MARK: 63, // needs localization - /** - * A + /** + * A */ A: 65, - /** - * B + /** + * B */ B: 66, - /** - * C + /** + * C */ C: 67, - /** - * D + /** + * D */ D: 68, - /** - * E + /** + * E */ E: 69, - /** - * F + /** + * F */ F: 70, - /** - * G + /** + * G */ G: 71, - /** - * H + /** + * H */ H: 72, - /** - * I + /** + * I */ I: 73, - /** - * J + /** + * J */ J: 74, - /** - * K + /** + * K */ K: 75, - /** - * L + /** + * L */ L: 76, - /** - * M + /** + * M */ M: 77, - /** - * N + /** + * N */ N: 78, - /** - * O + /** + * O */ O: 79, - /** - * P + /** + * P */ P: 80, - /** - * Q + /** + * Q */ Q: 81, - /** - * R + /** + * R */ R: 82, - /** - * S + /** + * S */ S: 83, - /** - * T + /** + * T */ T: 84, - /** - * U + /** + * U */ U: 85, - /** - * V + /** + * V */ V: 86, - /** - * W + /** + * W */ W: 87, - /** - * X + /** + * X */ X: 88, - /** - * Y + /** + * Y */ Y: 89, - /** - * Z + /** + * Z */ Z: 90, - /** - * META + /** + * META */ META: 91, // WIN_KEY_LEFT - /** - * WIN_KEY_RIGHT + /** + * WIN_KEY_RIGHT */ WIN_KEY_RIGHT: 92, - /** - * CONTEXT_MENU + /** + * CONTEXT_MENU */ CONTEXT_MENU: 93, - /** - * NUM_ZERO + /** + * NUM_ZERO */ NUM_ZERO: 96, - /** - * NUM_ONE + /** + * NUM_ONE */ NUM_ONE: 97, - /** - * NUM_TWO + /** + * NUM_TWO */ NUM_TWO: 98, - /** - * NUM_THREE + /** + * NUM_THREE */ NUM_THREE: 99, - /** - * NUM_FOUR + /** + * NUM_FOUR */ NUM_FOUR: 100, - /** - * NUM_FIVE + /** + * NUM_FIVE */ NUM_FIVE: 101, - /** - * NUM_SIX + /** + * NUM_SIX */ NUM_SIX: 102, - /** - * NUM_SEVEN + /** + * NUM_SEVEN */ NUM_SEVEN: 103, - /** - * NUM_EIGHT + /** + * NUM_EIGHT */ NUM_EIGHT: 104, - /** - * NUM_NINE + /** + * NUM_NINE */ NUM_NINE: 105, - /** - * NUM_MULTIPLY + /** + * NUM_MULTIPLY */ NUM_MULTIPLY: 106, - /** - * NUM_PLUS + /** + * NUM_PLUS */ NUM_PLUS: 107, - /** - * NUM_MINUS + /** + * NUM_MINUS */ NUM_MINUS: 109, - /** - * NUM_PERIOD + /** + * NUM_PERIOD */ NUM_PERIOD: 110, - /** - * NUM_DIVISION + /** + * NUM_DIVISION */ NUM_DIVISION: 111, - /** - * F1 + /** + * F1 */ F1: 112, - /** - * F2 + /** + * F2 */ F2: 113, - /** - * F3 + /** + * F3 */ F3: 114, - /** - * F4 + /** + * F4 */ F4: 115, - /** - * F5 + /** + * F5 */ F5: 116, - /** - * F6 + /** + * F6 */ F6: 117, - /** - * F7 + /** + * F7 */ F7: 118, - /** - * F8 + /** + * F8 */ F8: 119, - /** - * F9 + /** + * F9 */ F9: 120, - /** - * F10 + /** + * F10 */ F10: 121, - /** - * F11 + /** + * F11 */ F11: 122, - /** - * F12 + /** + * F12 */ F12: 123, - /** - * NUMLOCK + /** + * NUMLOCK */ NUMLOCK: 144, - /** - * SEMICOLON + /** + * SEMICOLON */ SEMICOLON: 186, // needs localization - /** - * DASH + /** + * DASH */ DASH: 189, // needs localization - /** - * EQUALS + /** + * EQUALS */ EQUALS: 187, // needs localization - /** - * COMMA + /** + * COMMA */ COMMA: 188, // needs localization - /** - * PERIOD + /** + * PERIOD */ PERIOD: 190, // needs localization - /** - * SLASH + /** + * SLASH */ SLASH: 191, // needs localization - /** - * APOSTROPHE + /** + * APOSTROPHE */ APOSTROPHE: 192, // needs localization - /** - * SINGLE_QUOTE + /** + * SINGLE_QUOTE */ SINGLE_QUOTE: 222, // needs localization - /** - * OPEN_SQUARE_BRACKET + /** + * OPEN_SQUARE_BRACKET */ OPEN_SQUARE_BRACKET: 219, // needs localization - /** - * BACKSLASH + /** + * BACKSLASH */ BACKSLASH: 220, // needs localization - /** - * CLOSE_SQUARE_BRACKET + /** + * CLOSE_SQUARE_BRACKET */ CLOSE_SQUARE_BRACKET: 221, // needs localization - /** - * WIN_KEY + /** + * WIN_KEY */ WIN_KEY: 224, - /** - * MAC_FF_META + /** + * MAC_FF_META */ MAC_FF_META: 224, // Firefox (Gecko) fires this for the meta key instead of 91 - /** - * WIN_IME + /** + * WIN_IME */ WIN_IME: 229 }; -/* - whether text and modified key is entered at the same time. +/* + whether text and modified key is entered at the same time. */ KeyCode.isTextModifyingKeyEvent = function (e) { var keyCode = e.keyCode; @@ -17680,8 +17680,8 @@ KeyCode.isTextModifyingKeyEvent = function (e) { } }; -/* - whether character is entered. +/* + whether character is entered. */ KeyCode.isCharacterKey = function (keyCode) { if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) { @@ -25562,8 +25562,8 @@ if (false) {(function () { /* harmony default export */ var data_table_data_table = (data_table_Component.exports); // CONCATENATED MODULE: ./vb/components/data-table/index.js -/** - * Created by bailey on 17/2/20. +/** + * Created by bailey on 17/2/20. */ @@ -29558,7 +29558,7 @@ function tree_select_select__toConsumableArray(arr) { if (Array.isArray(arr)) { }, methods: { setPosition: function setPosition() { - if (!this.$el) return; + if (!this.$el || !this.$refs.inputArea) return; var p = fn_getOffset(this.$refs.inputArea, this.container); this.style = { @@ -30367,10 +30367,10 @@ var directives_style_default = /*#__PURE__*/__webpack_require__.n(directives_sty } }); - /** - * 获取元素的坐标位置 - * @param el - * @returns {{top: number, left: number}} + /** + * 获取元素的坐标位置 + * @param el + * @returns {{top: number, left: number}} */ function getOffset(el) { var x = 0; @@ -30384,8 +30384,8 @@ var directives_style_default = /*#__PURE__*/__webpack_require__.n(directives_sty return { top: y, left: x }; } - /** - * 关闭方法 + /** + * 关闭方法 */ function closeTooltip(el, binding) { var directClose = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; @@ -30405,8 +30405,8 @@ var directives_style_default = /*#__PURE__*/__webpack_require__.n(directives_sty } } - /** - * 显示方法 + /** + * 显示方法 */ function openTooltip(el, binding) { if (!el) return; @@ -30506,14 +30506,14 @@ var directives_style_default = /*#__PURE__*/__webpack_require__.n(directives_sty }, 0); } - /** - * 注册自定义指令tooltip + /** + * 注册自定义指令tooltip */ Vue.directive('tooltip', { - /** - * 指令第一次绑定到元素时调用 - * @param el - * @param binding + /** + * 指令第一次绑定到元素时调用 + * @param el + * @param binding */ bind: function bind(el, binding) { /* 准备工作 */ @@ -30544,10 +30544,10 @@ var directives_style_default = /*#__PURE__*/__webpack_require__.n(directives_sty }, - /** - * 被绑定元素所在的模板更新时调用 - * @param el - * @param binding + /** + * 被绑定元素所在的模板更新时调用 + * @param el + * @param binding */ update: function update(el, binding) { /* 这里需要实时更新tooltip的值 */ @@ -30555,10 +30555,10 @@ var directives_style_default = /*#__PURE__*/__webpack_require__.n(directives_sty }, - /** - * 指令与元素解绑时调用 - * @param el - * @param binding + /** + * 指令与元素解绑时调用 + * @param el + * @param binding */ unbind: function unbind(el, binding) { /* 清理工作: 例如,删除 bind() 添加的事件监听器 */ @@ -30860,20 +30860,20 @@ if (typeof window !== 'undefined' && window.Vue) { install: vb_install }); -/* function isFlexSupported(style) { - return 'flex' in style || - 'webkitFlex' in style || - 'MozFlex' in style; -} - -if (typeof window !== 'undefined' && window.document && window.document.documentElement) { - const {documentElement} = window.document; - const NO_FLEX = 'no-flex'; - - if (!isFlexSupported(documentElement.style) && - documentElement.className.indexOf(NO_FLEX) === -1) { - documentElement.className += ` ${NO_FLEX}`; - } +/* function isFlexSupported(style) { + return 'flex' in style || + 'webkitFlex' in style || + 'MozFlex' in style; +} + +if (typeof window !== 'undefined' && window.document && window.document.documentElement) { + const {documentElement} = window.document; + const NO_FLEX = 'no-flex'; + + if (!isFlexSupported(documentElement.style) && + documentElement.className.indexOf(NO_FLEX) === -1) { + documentElement.className += ` ${NO_FLEX}`; + } } */ /***/ }), @@ -32257,27 +32257,27 @@ module.exports = baseIsNative; /* 213 */ /***/ (function(module, exports) { -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1,eval)("this"); -} catch(e) { - // This works if the window reference is available - if(typeof window === "object") - g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || Function("return this")() || (1,eval)("this"); +} catch(e) { + // This works if the window reference is available + if(typeof window === "object") + g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; /***/ }),