UNPKG

tdesign-vue

Version:
38 lines (34 loc) 934 B
/** * tdesign v1.14.1 * (c) 2025 tdesign * @license MIT */ import { on, off } from '../utils/dom.js'; import 'vue'; import 'raf'; import 'lodash-es'; import '../utils/easing.js'; var triggers = ["click", "hover", "focus", "context-menu"]; var defaultVisibleDelay = [250, 150]; function getPopperPlacement(placement) { return placement.replace(/-(left|top)$/, "-start").replace(/-(right|bottom)$/, "-end"); } function attachListeners(elm) { var offs = []; return { add: function add(type, listener) { on(elm, type, listener); offs.push(function () { off(elm, type, listener); }); }, clean: function clean() { offs.forEach(function (handler) { return handler === null || handler === void 0 ? void 0 : handler(); }); offs.length = 0; } }; } export { attachListeners, defaultVisibleDelay, getPopperPlacement, triggers }; //# sourceMappingURL=utils.js.map