UNPKG

ivue-material-plus

Version:

A high quality UI components Library with Vue.js

20 lines (17 loc) 533 B
import normalizeWheel from 'normalize-wheel-es'; const mousewheel = (element, callback) => { if (element && element.addEventListener) { const fn = function(event) { const normalized = normalizeWheel(event); callback && Reflect.apply(callback, this, [event, normalized]); }; element.addEventListener("wheel", fn, { passive: true }); } }; const Mousewheel = { beforeMount(el, binding) { mousewheel(el, binding.value); } }; export { Mousewheel as default }; //# sourceMappingURL=mousewheel.mjs.map