element-nice-ui
Version:
A Component Library for Vue.js.
1,534 lines (1,488 loc) • 59 kB
JavaScript
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/dist/";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 255);
/******/ })
/************************************************************************/
/******/ ({
/***/ 122:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXTERNAL MODULE: external "throttle-debounce/debounce"
var debounce_ = __webpack_require__(28);
var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_);
// CONCATENATED MODULE: ./packages/perfect-scrollbar/src/ps.js
/*!
* perfect-scrollbar v1.5.0
* Copyright 2020 Hyunje Jun, MDBootstrap and Contributors
* Licensed under MIT
*/
function get(element) {
return getComputedStyle(element);
}
function set(element, obj) {
for (var key in obj) {
var val = obj[key];
if (typeof val === 'number') {
val = val + "px";
}
element.style[key] = val;
}
return element;
}
function div(className) {
var div = document.createElement('div');
div.className = className;
return div;
}
var elMatches = typeof Element !== 'undefined' && (Element.prototype.matches || Element.prototype.webkitMatchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector);
function matches(element, query) {
if (!elMatches) {
throw new Error('No element matching method supported');
}
return elMatches.call(element, query);
}
function remove(element) {
if (element.remove) {
element.remove();
} else {
if (element.parentNode) {
element.parentNode.removeChild(element);
}
}
}
function queryChildren(element, selector) {
return Array.prototype.filter.call(element.children, function (child) {
return matches(child, selector);
});
}
var cls = {
main: 'ps',
rtl: 'ps__rtl',
element: {
thumb: function thumb(x) {
return "ps__thumb-" + x;
},
rail: function rail(x) {
return "ps__rail-" + x;
},
consuming: 'ps__child--consume'
},
state: {
focus: 'ps--focus',
clicking: 'ps--clicking',
active: function active(x) {
return "ps--active-" + x;
},
scrolling: function scrolling(x) {
return "ps--scrolling-" + x;
}
}
};
/*
* Helper methods
*/
var scrollingClassTimeout = {
x: null,
y: null
};
function addScrollingClass(i, x) {
var classList = i.element.classList;
var className = cls.state.scrolling(x);
if (classList.contains(className)) {
clearTimeout(scrollingClassTimeout[x]);
} else {
classList.add(className);
}
}
function removeScrollingClass(i, x) {
scrollingClassTimeout[x] = setTimeout(function () {
return i.isAlive && i.element.classList.remove(cls.state.scrolling(x));
}, i.settings.scrollingThreshold);
}
function setScrollingClassInstantly(i, x) {
addScrollingClass(i, x);
removeScrollingClass(i, x);
}
var EventElement = function EventElement(element) {
this.element = element;
this.handlers = {};
};
var prototypeAccessors = {
isEmpty: {
configurable: true
}
};
EventElement.prototype.bind = function bind(eventName, handler) {
if (typeof this.handlers[eventName] === 'undefined') {
this.handlers[eventName] = [];
}
this.handlers[eventName].push(handler);
this.element.addEventListener(eventName, handler, false);
};
EventElement.prototype.unbind = function unbind(eventName, target) {
var this$1 = this;
this.handlers[eventName] = this.handlers[eventName].filter(function (handler) {
if (target && handler !== target) {
return true;
}
this$1.element.removeEventListener(eventName, handler, false);
return false;
});
};
EventElement.prototype.unbindAll = function unbindAll() {
for (var name in this.handlers) {
this.unbind(name);
}
};
prototypeAccessors.isEmpty.get = function () {
var this$1 = this;
return Object.keys(this.handlers).every(function (key) {
return this$1.handlers[key].length === 0;
});
};
Object.defineProperties(EventElement.prototype, prototypeAccessors);
var EventManager = function EventManager() {
this.eventElements = [];
};
EventManager.prototype.eventElement = function eventElement(element) {
var ee = this.eventElements.filter(function (ee) {
return ee.element === element;
})[0];
if (!ee) {
ee = new EventElement(element);
this.eventElements.push(ee);
}
return ee;
};
EventManager.prototype.bind = function bind(element, eventName, handler) {
this.eventElement(element).bind(eventName, handler);
};
EventManager.prototype.unbind = function unbind(element, eventName, handler) {
var ee = this.eventElement(element);
ee.unbind(eventName, handler);
if (ee.isEmpty) {
// remove
this.eventElements.splice(this.eventElements.indexOf(ee), 1);
}
};
EventManager.prototype.unbindAll = function unbindAll() {
this.eventElements.forEach(function (e) {
return e.unbindAll();
});
this.eventElements = [];
};
EventManager.prototype.once = function once(element, eventName, handler) {
var ee = this.eventElement(element);
var _onceHandler = function onceHandler(evt) {
ee.unbind(eventName, _onceHandler);
handler(evt);
};
ee.bind(eventName, _onceHandler);
};
function createEvent(name) {
if (typeof window.CustomEvent === 'function') {
return new CustomEvent(name);
} else {
var evt = document.createEvent('CustomEvent');
evt.initCustomEvent(name, false, false, undefined);
return evt;
}
}
function processScrollDiff(i, axis, diff, useScrollingClass, forceFireReachEvent) {
if (useScrollingClass === void 0) useScrollingClass = true;
if (forceFireReachEvent === void 0) forceFireReachEvent = false;
var fields;
if (axis === 'top') {
fields = ['contentHeight', 'containerHeight', 'scrollTop', 'y', 'up', 'down'];
} else if (axis === 'left') {
fields = ['contentWidth', 'containerWidth', 'scrollLeft', 'x', 'left', 'right'];
} else {
throw new Error('A proper axis should be provided');
}
processScrollDiff$1(i, diff, fields, useScrollingClass, forceFireReachEvent);
}
function processScrollDiff$1(i, diff, ref, useScrollingClass, forceFireReachEvent) {
var contentHeight = ref[0];
var containerHeight = ref[1];
var scrollTop = ref[2];
var y = ref[3];
var up = ref[4];
var down = ref[5];
if (useScrollingClass === void 0) useScrollingClass = true;
if (forceFireReachEvent === void 0) forceFireReachEvent = false;
var element = i.element;
// reset reach
i.reach[y] = null;
// 1 for subpixel rounding
if (element[scrollTop] < 1) {
i.reach[y] = 'start';
}
// 1 for subpixel rounding
if (element[scrollTop] > i[contentHeight] - i[containerHeight] - 1) {
i.reach[y] = 'end';
}
if (diff) {
element.dispatchEvent(createEvent("ps-scroll-" + y));
if (diff < 0) {
element.dispatchEvent(createEvent("ps-scroll-" + up));
} else if (diff > 0) {
element.dispatchEvent(createEvent("ps-scroll-" + down));
}
if (useScrollingClass) {
setScrollingClassInstantly(i, y);
}
}
if (i.reach[y] && (diff || forceFireReachEvent)) {
element.dispatchEvent(createEvent("ps-" + y + "-reach-" + i.reach[y]));
}
}
function toInt(x) {
return parseInt(x, 10) || 0;
}
function isEditable(el) {
return matches(el, 'input,[contenteditable]') || matches(el, 'select,[contenteditable]') || matches(el, 'textarea,[contenteditable]') || matches(el, 'button,[contenteditable]');
}
function ps_outerWidth(element) {
var styles = get(element);
return toInt(styles.width) + toInt(styles.paddingLeft) + toInt(styles.paddingRight) + toInt(styles.borderLeftWidth) + toInt(styles.borderRightWidth);
}
var env = {
isWebKit: typeof document !== 'undefined' && 'WebkitAppearance' in document.documentElement.style,
supportsTouch: typeof window !== 'undefined' && ('ontouchstart' in window || 'maxTouchPoints' in window.navigator && window.navigator.maxTouchPoints > 0 || window.DocumentTouch && document instanceof window.DocumentTouch),
supportsIePointer: typeof navigator !== 'undefined' && navigator.msMaxTouchPoints,
isChrome: typeof navigator !== 'undefined' && /Chrome/i.test(navigator && navigator.userAgent)
};
function updateGeometry(i) {
var element = i.element;
var roundedScrollTop = Math.floor(element.scrollTop);
var rect = element.getBoundingClientRect();
i.containerWidth = Math.round(rect.width);
i.containerHeight = Math.round(rect.height);
i.contentWidth = element.scrollWidth;
i.contentHeight = element.scrollHeight;
if (!element.contains(i.scrollbarXRail)) {
// clean up and append
queryChildren(element, cls.element.rail('x')).forEach(function (el) {
return remove(el);
});
element.appendChild(i.scrollbarXRail);
}
if (!element.contains(i.scrollbarYRail)) {
// clean up and append
queryChildren(element, cls.element.rail('y')).forEach(function (el) {
return remove(el);
});
element.appendChild(i.scrollbarYRail);
}
if (!i.settings.suppressScrollX && i.containerWidth + i.settings.scrollXMarginOffset < i.contentWidth) {
i.scrollbarXActive = true;
i.railXWidth = i.containerWidth - i.railXMarginWidth;
i.railXRatio = i.containerWidth / i.railXWidth;
i.scrollbarXWidth = getThumbSize(i, toInt(i.railXWidth * i.containerWidth / i.contentWidth));
i.scrollbarXLeft = toInt((i.negativeScrollAdjustment + element.scrollLeft) * (i.railXWidth - i.scrollbarXWidth) / (i.contentWidth - i.containerWidth));
} else {
i.scrollbarXActive = false;
}
if (!i.settings.suppressScrollY && i.containerHeight + i.settings.scrollYMarginOffset < i.contentHeight) {
i.scrollbarYActive = true;
i.railYHeight = i.containerHeight - i.railYMarginHeight;
i.railYRatio = i.containerHeight / i.railYHeight;
i.scrollbarYHeight = getThumbSize(i, toInt(i.railYHeight * i.containerHeight / i.contentHeight));
i.scrollbarYTop = toInt(roundedScrollTop * (i.railYHeight - i.scrollbarYHeight) / (i.contentHeight - i.containerHeight));
} else {
i.scrollbarYActive = false;
}
if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) {
i.scrollbarXLeft = i.railXWidth - i.scrollbarXWidth;
}
if (i.scrollbarYTop >= i.railYHeight - i.scrollbarYHeight) {
i.scrollbarYTop = i.railYHeight - i.scrollbarYHeight;
}
updateCss(element, i);
if (i.scrollbarXActive) {
element.classList.add(cls.state.active('x'));
} else {
element.classList.remove(cls.state.active('x'));
i.scrollbarXWidth = 0;
i.scrollbarXLeft = 0;
element.scrollLeft = i.isRtl === true ? i.contentWidth : 0;
}
if (i.scrollbarYActive) {
element.classList.add(cls.state.active('y'));
} else {
element.classList.remove(cls.state.active('y'));
i.scrollbarYHeight = 0;
i.scrollbarYTop = 0;
element.scrollTop = 0;
}
}
function getThumbSize(i, thumbSize) {
if (i.settings.minScrollbarLength) {
thumbSize = Math.max(thumbSize, i.settings.minScrollbarLength);
}
if (i.settings.maxScrollbarLength) {
thumbSize = Math.min(thumbSize, i.settings.maxScrollbarLength);
}
return thumbSize;
}
function updateCss(element, i) {
var xRailOffset = {
width: i.railXWidth
};
var roundedScrollTop = Math.floor(element.scrollTop);
if (i.isRtl) {
xRailOffset.left = i.negativeScrollAdjustment + element.scrollLeft + i.containerWidth - i.contentWidth;
} else {
xRailOffset.left = element.scrollLeft;
}
if (i.isScrollbarXUsingBottom) {
xRailOffset.bottom = i.scrollbarXBottom - roundedScrollTop;
} else {
xRailOffset.top = i.scrollbarXTop + roundedScrollTop;
}
set(i.scrollbarXRail, xRailOffset);
var yRailOffset = {
top: roundedScrollTop,
height: i.railYHeight
};
if (i.isScrollbarYUsingRight) {
if (i.isRtl) {
yRailOffset.right = i.contentWidth - (i.negativeScrollAdjustment + element.scrollLeft) - i.scrollbarYRight - i.scrollbarYOuterWidth - 9;
} else {
yRailOffset.right = i.scrollbarYRight - element.scrollLeft;
}
} else {
if (i.isRtl) {
yRailOffset.left = i.negativeScrollAdjustment + element.scrollLeft + i.containerWidth * 2 - i.contentWidth - i.scrollbarYLeft - i.scrollbarYOuterWidth;
} else {
yRailOffset.left = i.scrollbarYLeft + element.scrollLeft;
}
}
set(i.scrollbarYRail, yRailOffset);
set(i.scrollbarX, {
left: i.scrollbarXLeft,
width: i.scrollbarXWidth - i.railBorderXWidth
});
set(i.scrollbarY, {
top: i.scrollbarYTop,
height: i.scrollbarYHeight - i.railBorderYWidth
});
}
function clickRail(i) {
var element = i.element;
i.event.bind(i.scrollbarY, 'mousedown', function (e) {
return e.stopPropagation();
});
i.event.bind(i.scrollbarYRail, 'mousedown', function (e) {
var positionTop = e.pageY - window.pageYOffset - i.scrollbarYRail.getBoundingClientRect().top;
var direction = positionTop > i.scrollbarYTop ? 1 : -1;
i.element.scrollTop += direction * i.containerHeight;
updateGeometry(i);
e.stopPropagation();
});
i.event.bind(i.scrollbarX, 'mousedown', function (e) {
return e.stopPropagation();
});
i.event.bind(i.scrollbarXRail, 'mousedown', function (e) {
var positionLeft = e.pageX - window.pageXOffset - i.scrollbarXRail.getBoundingClientRect().left;
var direction = positionLeft > i.scrollbarXLeft ? 1 : -1;
i.element.scrollLeft += direction * i.containerWidth;
updateGeometry(i);
e.stopPropagation();
});
}
function dragThumb(i) {
bindMouseScrollHandler(i, ['containerWidth', 'contentWidth', 'pageX', 'railXWidth', 'scrollbarX', 'scrollbarXWidth', 'scrollLeft', 'x', 'scrollbarXRail']);
bindMouseScrollHandler(i, ['containerHeight', 'contentHeight', 'pageY', 'railYHeight', 'scrollbarY', 'scrollbarYHeight', 'scrollTop', 'y', 'scrollbarYRail']);
}
function bindMouseScrollHandler(i, ref) {
var containerHeight = ref[0];
var contentHeight = ref[1];
var pageY = ref[2];
var railYHeight = ref[3];
var scrollbarY = ref[4];
var scrollbarYHeight = ref[5];
var scrollTop = ref[6];
var y = ref[7];
var scrollbarYRail = ref[8];
var element = i.element;
var startingScrollTop = null;
var startingMousePageY = null;
var scrollBy = null;
function mouseMoveHandler(e) {
if (e.touches && e.touches[0]) {
e[pageY] = e.touches[0].pageY;
}
element[scrollTop] = startingScrollTop + scrollBy * (e[pageY] - startingMousePageY);
addScrollingClass(i, y);
updateGeometry(i);
e.stopPropagation();
e.preventDefault();
}
function mouseUpHandler() {
removeScrollingClass(i, y);
i[scrollbarYRail].classList.remove(cls.state.clicking);
i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);
}
function bindMoves(e, touchMode) {
startingScrollTop = element[scrollTop];
if (touchMode && e.touches) {
e[pageY] = e.touches[0].pageY;
}
startingMousePageY = e[pageY];
scrollBy = (i[contentHeight] - i[containerHeight]) / (i[railYHeight] - i[scrollbarYHeight]);
if (!touchMode) {
i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);
i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);
e.preventDefault();
} else {
i.event.bind(i.ownerDocument, 'touchmove', mouseMoveHandler);
}
i[scrollbarYRail].classList.add(cls.state.clicking);
e.stopPropagation();
}
i.event.bind(i[scrollbarY], 'mousedown', function (e) {
bindMoves(e);
});
i.event.bind(i[scrollbarY], 'touchstart', function (e) {
bindMoves(e, true);
});
}
function keyboard(i) {
var element = i.element;
var elementHovered = function elementHovered() {
return matches(element, ':hover');
};
var scrollbarFocused = function scrollbarFocused() {
return matches(i.scrollbarX, ':focus') || matches(i.scrollbarY, ':focus');
};
function shouldPreventDefault(deltaX, deltaY) {
var scrollTop = Math.floor(element.scrollTop);
if (deltaX === 0) {
if (!i.scrollbarYActive) {
return false;
}
if (scrollTop === 0 && deltaY > 0 || scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0) {
return !i.settings.wheelPropagation;
}
}
var scrollLeft = element.scrollLeft;
if (deltaY === 0) {
if (!i.scrollbarXActive) {
return false;
}
if (scrollLeft === 0 && deltaX < 0 || scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0) {
return !i.settings.wheelPropagation;
}
}
return true;
}
i.event.bind(i.ownerDocument, 'keydown', function (e) {
if (e.isDefaultPrevented && e.isDefaultPrevented() || e.defaultPrevented) {
return;
}
if (!elementHovered() && !scrollbarFocused()) {
return;
}
var activeElement = document.activeElement ? document.activeElement : i.ownerDocument.activeElement;
if (activeElement) {
if (activeElement.tagName === 'IFRAME') {
activeElement = activeElement.contentDocument.activeElement;
} else {
// go deeper if element is a webcomponent
while (activeElement.shadowRoot) {
activeElement = activeElement.shadowRoot.activeElement;
}
}
if (isEditable(activeElement)) {
return;
}
}
var deltaX = 0;
var deltaY = 0;
switch (e.which) {
case 37:
// left
if (e.metaKey) {
deltaX = -i.contentWidth;
} else if (e.altKey) {
deltaX = -i.containerWidth;
} else {
deltaX = -30;
}
break;
case 38:
// up
if (e.metaKey) {
deltaY = i.contentHeight;
} else if (e.altKey) {
deltaY = i.containerHeight;
} else {
deltaY = 30;
}
break;
case 39:
// right
if (e.metaKey) {
deltaX = i.contentWidth;
} else if (e.altKey) {
deltaX = i.containerWidth;
} else {
deltaX = 30;
}
break;
case 40:
// down
if (e.metaKey) {
deltaY = -i.contentHeight;
} else if (e.altKey) {
deltaY = -i.containerHeight;
} else {
deltaY = -30;
}
break;
case 32:
// space bar
if (e.shiftKey) {
deltaY = i.containerHeight;
} else {
deltaY = -i.containerHeight;
}
break;
case 33:
// page up
deltaY = i.containerHeight;
break;
case 34:
// page down
deltaY = -i.containerHeight;
break;
case 36:
// home
deltaY = i.contentHeight;
break;
case 35:
// end
deltaY = -i.contentHeight;
break;
default:
return;
}
if (i.settings.suppressScrollX && deltaX !== 0) {
return;
}
if (i.settings.suppressScrollY && deltaY !== 0) {
return;
}
element.scrollTop -= deltaY;
element.scrollLeft += deltaX;
updateGeometry(i);
if (shouldPreventDefault(deltaX, deltaY)) {
e.preventDefault();
}
});
}
function wheel(i) {
var element = i.element;
function shouldPreventDefault(deltaX, deltaY) {
var roundedScrollTop = Math.floor(element.scrollTop);
var isTop = element.scrollTop === 0;
var isBottom = roundedScrollTop + element.offsetHeight === element.scrollHeight;
var isLeft = element.scrollLeft === 0;
var isRight = element.scrollLeft + element.offsetWidth === element.scrollWidth;
var hitsBound;
// pick axis with primary direction
if (Math.abs(deltaY) > Math.abs(deltaX)) {
hitsBound = isTop || isBottom;
} else {
hitsBound = isLeft || isRight;
}
return hitsBound ? !i.settings.wheelPropagation : true;
}
function getDeltaFromEvent(e) {
var deltaX = e.deltaX;
var deltaY = -1 * e.deltaY;
if (typeof deltaX === 'undefined' || typeof deltaY === 'undefined') {
// OS X Safari
deltaX = -1 * e.wheelDeltaX / 6;
deltaY = e.wheelDeltaY / 6;
}
if (e.deltaMode && e.deltaMode === 1) {
// Firefox in deltaMode 1: Line scrolling
deltaX *= 10;
deltaY *= 10;
}
if (deltaX !== deltaX && deltaY !== deltaY /* NaN checks */) {
// IE in some mouse drivers
deltaX = 0;
deltaY = e.wheelDelta;
}
if (e.shiftKey) {
// reverse axis with shift key
return [-deltaY, -deltaX];
}
return [deltaX, deltaY];
}
function shouldBeConsumedByChild(target, deltaX, deltaY) {
// FIXME: this is a workaround for <select> issue in FF and IE #571
if (!env.isWebKit && element.querySelector('select:focus')) {
return true;
}
if (!element.contains(target)) {
return false;
}
var cursor = target;
while (cursor && cursor !== element) {
if (cursor.classList.contains(cls.element.consuming)) {
return true;
}
var style = get(cursor);
// if deltaY && vertical scrollable
if (deltaY && style.overflowY.match(/(scroll|auto)/)) {
var maxScrollTop = cursor.scrollHeight - cursor.clientHeight;
if (maxScrollTop > 0) {
if (cursor.scrollTop > 0 && deltaY < 0 || cursor.scrollTop < maxScrollTop && deltaY > 0) {
return true;
}
}
}
// if deltaX && horizontal scrollable
if (deltaX && style.overflowX.match(/(scroll|auto)/)) {
var maxScrollLeft = cursor.scrollWidth - cursor.clientWidth;
if (maxScrollLeft > 0) {
if (cursor.scrollLeft > 0 && deltaX < 0 || cursor.scrollLeft < maxScrollLeft && deltaX > 0) {
return true;
}
}
}
cursor = cursor.parentNode;
}
return false;
}
function mousewheelHandler(e) {
var ref = getDeltaFromEvent(e);
var deltaX = ref[0];
var deltaY = ref[1];
if (shouldBeConsumedByChild(e.target, deltaX, deltaY)) {
return;
}
var shouldPrevent = false;
if (!i.settings.useBothWheelAxes) {
// deltaX will only be used for horizontal scrolling and deltaY will
// only be used for vertical scrolling - this is the default
element.scrollTop -= deltaY * i.settings.wheelSpeed;
element.scrollLeft += deltaX * i.settings.wheelSpeed;
} else if (i.scrollbarYActive && !i.scrollbarXActive) {
// only vertical scrollbar is active and useBothWheelAxes option is
// active, so let's scroll vertical bar using both mouse wheel axes
if (deltaY) {
element.scrollTop -= deltaY * i.settings.wheelSpeed;
} else {
element.scrollTop += deltaX * i.settings.wheelSpeed;
}
shouldPrevent = true;
} else if (i.scrollbarXActive && !i.scrollbarYActive) {
// useBothWheelAxes and only horizontal bar is active, so use both
// wheel axes for horizontal bar
if (deltaX) {
element.scrollLeft += deltaX * i.settings.wheelSpeed;
} else {
element.scrollLeft -= deltaY * i.settings.wheelSpeed;
}
shouldPrevent = true;
}
updateGeometry(i);
shouldPrevent = shouldPrevent || shouldPreventDefault(deltaX, deltaY);
if (shouldPrevent && !e.ctrlKey) {
e.stopPropagation();
e.preventDefault();
}
}
if (typeof window.onwheel !== 'undefined') {
i.event.bind(element, 'wheel', mousewheelHandler);
} else if (typeof window.onmousewheel !== 'undefined') {
i.event.bind(element, 'mousewheel', mousewheelHandler);
}
}
function touch(i) {
if (!env.supportsTouch && !env.supportsIePointer) {
return;
}
var element = i.element;
function shouldPrevent(deltaX, deltaY) {
var scrollTop = Math.floor(element.scrollTop);
var scrollLeft = element.scrollLeft;
var magnitudeX = Math.abs(deltaX);
var magnitudeY = Math.abs(deltaY);
if (magnitudeY > magnitudeX) {
// user is perhaps trying to swipe up/down the page
if (deltaY < 0 && scrollTop === i.contentHeight - i.containerHeight || deltaY > 0 && scrollTop === 0) {
// set prevent for mobile Chrome refresh
return window.scrollY === 0 && deltaY > 0 && env.isChrome;
}
} else if (magnitudeX > magnitudeY) {
// user is perhaps trying to swipe left/right across the page
if (deltaX < 0 && scrollLeft === i.contentWidth - i.containerWidth || deltaX > 0 && scrollLeft === 0) {
return true;
}
}
return true;
}
function applyTouchMove(differenceX, differenceY) {
element.scrollTop -= differenceY;
element.scrollLeft -= differenceX;
updateGeometry(i);
}
var startOffset = {};
var startTime = 0;
var speed = {};
var easingLoop = null;
function getTouch(e) {
if (e.targetTouches) {
return e.targetTouches[0];
} else {
// Maybe IE pointer
return e;
}
}
function shouldHandle(e) {
if (e.pointerType && e.pointerType === 'pen' && e.buttons === 0) {
return false;
}
if (e.targetTouches && e.targetTouches.length === 1) {
return true;
}
if (e.pointerType && e.pointerType !== 'mouse' && e.pointerType !== e.MSPOINTER_TYPE_MOUSE) {
return true;
}
return false;
}
function touchStart(e) {
if (!shouldHandle(e)) {
return;
}
var touch = getTouch(e);
startOffset.pageX = touch.pageX;
startOffset.pageY = touch.pageY;
startTime = new Date().getTime();
if (easingLoop !== null) {
clearInterval(easingLoop);
}
}
function shouldBeConsumedByChild(target, deltaX, deltaY) {
if (!element.contains(target)) {
return false;
}
var cursor = target;
while (cursor && cursor !== element) {
if (cursor.classList.contains(cls.element.consuming)) {
return true;
}
var style = get(cursor);
// if deltaY && vertical scrollable
if (deltaY && style.overflowY.match(/(scroll|auto)/)) {
var maxScrollTop = cursor.scrollHeight - cursor.clientHeight;
if (maxScrollTop > 0) {
if (cursor.scrollTop > 0 && deltaY < 0 || cursor.scrollTop < maxScrollTop && deltaY > 0) {
return true;
}
}
}
// if deltaX && horizontal scrollable
if (deltaX && style.overflowX.match(/(scroll|auto)/)) {
var maxScrollLeft = cursor.scrollWidth - cursor.clientWidth;
if (maxScrollLeft > 0) {
if (cursor.scrollLeft > 0 && deltaX < 0 || cursor.scrollLeft < maxScrollLeft && deltaX > 0) {
return true;
}
}
}
cursor = cursor.parentNode;
}
return false;
}
function touchMove(e) {
if (shouldHandle(e)) {
var touch = getTouch(e);
var currentOffset = {
pageX: touch.pageX,
pageY: touch.pageY
};
var differenceX = currentOffset.pageX - startOffset.pageX;
var differenceY = currentOffset.pageY - startOffset.pageY;
if (shouldBeConsumedByChild(e.target, differenceX, differenceY)) {
return;
}
applyTouchMove(differenceX, differenceY);
startOffset = currentOffset;
var currentTime = new Date().getTime();
var timeGap = currentTime - startTime;
if (timeGap > 0) {
speed.x = differenceX / timeGap;
speed.y = differenceY / timeGap;
startTime = currentTime;
}
if (shouldPrevent(differenceX, differenceY)) {
e.preventDefault();
}
}
}
function touchEnd() {
if (i.settings.swipeEasing) {
clearInterval(easingLoop);
easingLoop = setInterval(function () {
if (i.isInitialized) {
clearInterval(easingLoop);
return;
}
if (!speed.x && !speed.y) {
clearInterval(easingLoop);
return;
}
if (Math.abs(speed.x) < 0.01 && Math.abs(speed.y) < 0.01) {
clearInterval(easingLoop);
return;
}
applyTouchMove(speed.x * 30, speed.y * 30);
speed.x *= 0.8;
speed.y *= 0.8;
}, 10);
}
}
if (env.supportsTouch) {
i.event.bind(element, 'touchstart', touchStart);
i.event.bind(element, 'touchmove', touchMove);
i.event.bind(element, 'touchend', touchEnd);
} else if (env.supportsIePointer) {
if (window.PointerEvent) {
i.event.bind(element, 'pointerdown', touchStart);
i.event.bind(element, 'pointermove', touchMove);
i.event.bind(element, 'pointerup', touchEnd);
} else if (window.MSPointerEvent) {
i.event.bind(element, 'MSPointerDown', touchStart);
i.event.bind(element, 'MSPointerMove', touchMove);
i.event.bind(element, 'MSPointerUp', touchEnd);
}
}
}
var defaultSettings = function defaultSettings() {
return {
handlers: ['click-rail', 'drag-thumb', 'keyboard', 'wheel', 'touch'],
maxScrollbarLength: null,
minScrollbarLength: null,
scrollingThreshold: 1000,
scrollXMarginOffset: 0,
scrollYMarginOffset: 0,
suppressScrollX: false,
suppressScrollY: false,
swipeEasing: true,
useBothWheelAxes: false,
wheelPropagation: true,
wheelSpeed: 1
};
};
var handlers = {
'click-rail': clickRail,
'drag-thumb': dragThumb,
keyboard: keyboard,
wheel: wheel,
touch: touch
};
var PerfectScrollbar = function PerfectScrollbar(element, userSettings) {
var this$1 = this;
if (userSettings === void 0) userSettings = {};
if (typeof element === 'string') {
element = document.querySelector(element);
}
if (!element || !element.nodeName) {
throw new Error('no element is specified to initialize PerfectScrollbar');
}
this.element = element;
element.classList.add(cls.main);
this.settings = defaultSettings();
for (var key in userSettings) {
this.settings[key] = userSettings[key];
}
this.containerWidth = null;
this.containerHeight = null;
this.contentWidth = null;
this.contentHeight = null;
var focus = function focus() {
return element.classList.add(cls.state.focus);
};
var blur = function blur() {
return element.classList.remove(cls.state.focus);
};
this.isRtl = get(element).direction === 'rtl';
if (this.isRtl === true) {
element.classList.add(cls.rtl);
}
this.isNegativeScroll = function () {
var originalScrollLeft = element.scrollLeft;
var result = null;
element.scrollLeft = -1;
result = element.scrollLeft < 0;
element.scrollLeft = originalScrollLeft;
return result;
}();
this.negativeScrollAdjustment = this.isNegativeScroll ? element.scrollWidth - element.clientWidth : 0;
this.event = new EventManager();
this.ownerDocument = element.ownerDocument || document;
this.scrollbarXRail = div(cls.element.rail('x'));
element.appendChild(this.scrollbarXRail);
this.scrollbarX = div(cls.element.thumb('x'));
this.scrollbarXRail.appendChild(this.scrollbarX);
this.scrollbarX.setAttribute('tabindex', 0);
this.event.bind(this.scrollbarX, 'focus', focus);
this.event.bind(this.scrollbarX, 'blur', blur);
this.scrollbarXActive = null;
this.scrollbarXWidth = null;
this.scrollbarXLeft = null;
var railXStyle = get(this.scrollbarXRail);
this.scrollbarXBottom = parseInt(railXStyle.bottom, 10);
if (isNaN(this.scrollbarXBottom)) {
this.isScrollbarXUsingBottom = false;
this.scrollbarXTop = toInt(railXStyle.top);
} else {
this.isScrollbarXUsingBottom = true;
}
this.railBorderXWidth = toInt(railXStyle.borderLeftWidth) + toInt(railXStyle.borderRightWidth);
// Set rail to display:block to calculate margins
set(this.scrollbarXRail, {
display: 'block'
});
this.railXMarginWidth = toInt(railXStyle.marginLeft) + toInt(railXStyle.marginRight);
set(this.scrollbarXRail, {
display: ''
});
this.railXWidth = null;
this.railXRatio = null;
this.scrollbarYRail = div(cls.element.rail('y'));
element.appendChild(this.scrollbarYRail);
this.scrollbarY = div(cls.element.thumb('y'));
this.scrollbarYRail.appendChild(this.scrollbarY);
this.scrollbarY.setAttribute('tabindex', 0);
this.event.bind(this.scrollbarY, 'focus', focus);
this.event.bind(this.scrollbarY, 'blur', blur);
this.scrollbarYActive = null;
this.scrollbarYHeight = null;
this.scrollbarYTop = null;
var railYStyle = get(this.scrollbarYRail);
this.scrollbarYRight = parseInt(railYStyle.right, 10);
if (isNaN(this.scrollbarYRight)) {
this.isScrollbarYUsingRight = false;
this.scrollbarYLeft = toInt(railYStyle.left);
} else {
this.isScrollbarYUsingRight = true;
}
this.scrollbarYOuterWidth = this.isRtl ? ps_outerWidth(this.scrollbarY) : null;
this.railBorderYWidth = toInt(railYStyle.borderTopWidth) + toInt(railYStyle.borderBottomWidth);
set(this.scrollbarYRail, {
display: 'block'
});
this.railYMarginHeight = toInt(railYStyle.marginTop) + toInt(railYStyle.marginBottom);
set(this.scrollbarYRail, {
display: ''
});
this.railYHeight = null;
this.railYRatio = null;
this.reach = {
x: element.scrollLeft <= 0 ? 'start' : element.scrollLeft >= this.contentWidth - this.containerWidth ? 'end' : null,
y: element.scrollTop <= 0 ? 'start' : element.scrollTop >= this.contentHeight - this.containerHeight ? 'end' : null
};
this.isAlive = true;
this.settings.handlers.forEach(function (handlerName) {
return handlers[handlerName](this$1);
});
this.lastScrollTop = Math.floor(element.scrollTop); // for onScroll only
this.lastScrollLeft = element.scrollLeft; // for onScroll only
this.event.bind(this.element, 'scroll', function (e) {
return this$1.onScroll(e);
});
updateGeometry(this);
};
PerfectScrollbar.prototype.update = function update() {
if (!this.isAlive) {
return;
}
// Recalcuate negative scrollLeft adjustment
this.negativeScrollAdjustment = this.isNegativeScroll ? this.element.scrollWidth - this.element.clientWidth : 0;
// Recalculate rail margins
set(this.scrollbarXRail, {
display: 'block'
});
set(this.scrollbarYRail, {
display: 'block'
});
this.railXMarginWidth = toInt(get(this.scrollbarXRail).marginLeft) + toInt(get(this.scrollbarXRail).marginRight);
this.railYMarginHeight = toInt(get(this.scrollbarYRail).marginTop) + toInt(get(this.scrollbarYRail).marginBottom);
// Hide scrollbars not to affect scrollWidth and scrollHeight
set(this.scrollbarXRail, {
display: 'none'
});
set(this.scrollbarYRail, {
display: 'none'
});
updateGeometry(this);
processScrollDiff(this, 'top', 0, false, true);
processScrollDiff(this, 'left', 0, false, true);
set(this.scrollbarXRail, {
display: ''
});
set(this.scrollbarYRail, {
display: ''
});
};
PerfectScrollbar.prototype.onScroll = function onScroll(e) {
if (!this.isAlive) {
return;
}
updateGeometry(this);
processScrollDiff(this, 'top', this.element.scrollTop - this.lastScrollTop);
processScrollDiff(this, 'left', this.element.scrollLeft - this.lastScrollLeft);
this.lastScrollTop = Math.floor(this.element.scrollTop);
this.lastScrollLeft = this.element.scrollLeft;
};
PerfectScrollbar.prototype.destroy = function destroy() {
if (!this.isAlive) {
return;
}
this.event.unbindAll();
remove(this.scrollbarX);
remove(this.scrollbarY);
remove(this.scrollbarXRail);
remove(this.scrollbarYRail);
this.removePsClasses();
// unset elements
this.element = null;
this.scrollbarX = null;
this.scrollbarY = null;
this.scrollbarXRail = null;
this.scrollbarYRail = null;
this.isAlive = false;
};
PerfectScrollbar.prototype.removePsClasses = function removePsClasses() {
this.element.className = this.element.className.split(' ').filter(function (name) {
return !name.match(/^ps([-_].+|)$/);
}).join(' ');
};
/* harmony default export */ var ps = (PerfectScrollbar);
// CONCATENATED MODULE: ./packages/perfect-scrollbar/src/utils.js
const raf = window.requestAnimationFrame || (func => setTimeout(func, 16));
const cubic = {
easeIn(v) {
return Math.pow(v, 3);
},
easeOut(v) {
return 1 - Math.pow(1 - v, 3);
},
easeInOut(v) {
return v < 0.5 ? Math.pow(v * 2, 3) / 2 : 1 - Math.pow((1 - v) * 2, 3) / 2;
}
};
/**
* 滚动函数
* @param {HTMLElement} container 容器
* @param {number} target 目标距离
* @param {number} duration 持续时间
* @param {'x'|'y'} type 横向或纵向
* @param {'easeIn'|'easeOut'|'easeInOut'} func 缓动函数
*/
const scrollTo = function scrollTo(container, target) {
let duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 500;
let type = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'y';
let func = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'easeInOut';
if (!container) return Promise.resolve();
return new Promise(resolve => {
let prop = '';
// 最大可滚动距离
let max = 0;
if (type === 'x') {
prop = 'scrollLeft';
max = container.scrollWidth - container.offsetWidth;
} else {
prop = 'scrollTop';
max = container.scrollHeight - container.offsetHeight;
}
let calc = cubic[func];
// 当前滚动距离
const current = container[prop];
// 总滚动距离
const len = (target < max ? target : max) - current;
const start = Date.now();
let progress = 0;
const frame = () => {
progress = (Date.now() - start) / duration;
if (progress > 1) {
container[prop] = current + len;
resolve();
} else {
container[prop] = current + calc(progress) * len;
raf(frame);
}
};
raf(frame);
});
};
// CONCATENATED MODULE: ./packages/perfect-scrollbar/src/scrollbar.js
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
/* harmony default export */ var scrollbar = ({
name: 'ElPerfectScrollbar',
inheritAttrs: false,
props: {
tag: {
type: String,
default: 'div'
},
transition: {
type: Boolean,
default: false
},
transitionName: {
type: String,
default: ''
},
noResize: Boolean,
// 如果 container 尺寸不会发生变化,最好设置它可以优化性能
/** 滚动速度 */
wheelSpeed: {
type: Number,
default: 1
},
/** 阻止滚动 */
wheelPropagation: {
type: Boolean,
default: true
}
},
data: () => ({
animationFinished: true,
_observer: null
}),
methods: {
scrollX(x) {
if (this.animationFinished) {
this.animationFinished = false;
scrollTo(this.$refs.container, x, 600, 'x', 'easeInOut').then(() => {
this.animationFinished = true;
});
}
},
scrollY(y) {
if (this.animationFinished) {
this.animationFinished = false;
scrollTo(this.$refs.container, y, 600, 'y', 'easeInOut').then(() => {
this.animationFinished = true;
});
}
},
getContainerDom() {
const {
container
} = this.$refs;
return this.transition ? container.$el : container;
},
update() {
this.ps && this.$nextTick(this.ps.update());
},
mutationHandler: debounce_default()(100, false, function (mutations, observer) {
let white = /(ps__rail-[xy]|ps__thumb-[xy])/;
let all = true;
for (let entry of mutations) {
if (!white.test(entry.target.className)) {
all = false;
}
}
if (all) return;
this.update();
}),
destroy() {
if (this.ps) {
this.ps.destroy();
this.ps = null;
}
}
},
render(h) {
if (this.transition) {
return h('transition-group', {
ref: 'container',
class: 'ps',
on: this.$listeners,
attrs: this.$attrs,
props: {
tag: this.tag,
name: this.transitionName
}
}, this.$slots.default);
} else {
return h(this.tag, {
ref: 'container',
class: 'ps',
on: this.$listeners,
attrs: this.$attrs
}, this.$slots.default);
}
},
mounted() {
const {
wheelSpeed,
wheelPropagation
} = this;
let dom = this.getContainerDom();
this.ps = new ps(dom, _objectSpread({
wheelSpeed,
wheelPropagation
}, this.$attrs));
if (this.noResize) return;
const observer = new MutationObserver(this.mutationHandler);
observer.observe(dom, {
childList: true,
characterData: true,
subtree: true,
attributeFilter: ['style']
});
this.$data._observer = observer;
},
beforeDestroy() {
this.destroy();
if (!this.noResize) {
this.$data._observer.disconnect();
}
}
});
// CONCATENATED MODULE: ./packages/perfect-scrollbar/index.js
scrollbar.install = function (Vue) {
Vue.component(scrollbar.name, scrollbar);
};
/* harmony default export */ var perfect_scrollbar = __webpack_exports__["default"] = (scrollbar);
/***/ }),
/***/ 13:
/***/ (function(module, exports) {
module.exports = require("element-nice-ui/lib/mixins/emitter");
/***/ }),
/***/ 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
}
}
/***/ }),
/***/ 255:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/.pnpm/vue-loader@15.11.1_@vue+compiler-sfc@3.5.18_css-loader@5.2.7_webpack@4.47.0__lodash@4.1_bb9a19950a80e648dc95ba33c71fa343/node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/.pnpm/vue-loader@15.11.1_@vue+compiler-sfc@3.5.18_css-loader@5.2.7_webpack@4.47.0__lodash@4.1_bb9a19950a80e648dc95ba33c71fa343/node_modules/vue-loader/lib??vue-loader-options!./packages/drawer/src/main.vue?vue&type=template&id=870f2214
var render = function render() {
var _vm = this,
_c = _vm._self._c
return _c(
"transition",
{
attrs: { name: "el-drawer-fade" },
on: { "after-enter": _vm.afterEnter, "after-leave": _vm.afterLeave },
},
[
_c(
"div",
{
directives: [
{
name: "show",
rawName: "v-show",
value: _vm.visible,
expression: "visible",
},
],
staticClass: "el-drawer__wrapper",
attrs: { tabindex: "-1" },
},
[
_c(
"div",
{
staticClass: "el-drawer__container",
class: _vm.visible && "el-drawer__open",
attrs: { role: "document", tabindex: "-1" },
on: {
click: function ($event) {
if ($event.target !== $event.currentTarget) return null
return _vm.handleWrapperClick.apply(null, arguments)
},
},
},