vxe-table-select-area
Version:
一个基于 vxe-table 的可区域选中复制、粘贴的组件
1 lines • 637 B
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _default={bind:function(t,e,n){var o,e=e.value,a=e.events,r=e.callback;Array.isArray(a)&&a.length&&"function"==typeof r?(t.__eventsOutside__=o=function(e){if(t.contains(e.target)||t===e.target)return!1;r(e)},a.forEach(function(e){document.addEventListener(e,o,!0)})):(e=n.context.name,console.error("[events-outside] Please provided 'events' and 'callback' in ".concat(e)))},unbind:function(t,e,n){e.value.events.forEach(function(e){document.removeEventListener(e,t.__eventsOutside__,!0)}),t.__eventsOutside__=null}};exports.default=_default;