You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
1.5 KiB
1 line
1.5 KiB
{"version":3,"file":"index.mjs","sources":["../../../../../packages/directives/mousewheel/index.ts"],"sourcesContent":["import normalizeWheel from 'normalize-wheel-es'\nimport { isFirefox } from '@element-plus/utils/util'\nimport type { ObjectDirective, DirectiveBinding } from 'vue'\n\nconst mousewheel = function (element, callback) {\n if (element && element.addEventListener) {\n const fn = function (this: any, event) {\n const normalized = normalizeWheel(event)\n callback && callback.apply(this, [event, normalized])\n }\n if (isFirefox()) {\n element.addEventListener('DOMMouseScroll', fn)\n } else {\n element.onmousewheel = fn\n }\n }\n}\n\nconst Mousewheel: ObjectDirective = {\n beforeMount(el: HTMLElement, binding: DirectiveBinding) {\n mousewheel(el, binding.value)\n },\n}\n\nexport default Mousewheel\n"],"names":[],"mappings":";;;AAEA,MAAM,UAAU,GAAG,SAAS,OAAO,EAAE,QAAQ,EAAE;AAC/C,EAAE,IAAI,OAAO,IAAI,OAAO,CAAC,gBAAgB,EAAE;AAC3C,IAAI,MAAM,EAAE,GAAG,SAAS,KAAK,EAAE;AAC/B,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAC/C,MAAM,QAAQ,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;AAC5D,KAAK,CAAC;AACN,IAAI,IAAI,SAAS,EAAE,EAAE;AACrB,MAAM,OAAO,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;AACrD,KAAK,MAAM;AACX,MAAM,OAAO,CAAC,YAAY,GAAG,EAAE,CAAC;AAChC,KAAK;AACL,GAAG;AACH,CAAC,CAAC;AACG,MAAC,UAAU,GAAG;AACnB,EAAE,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE;AAC3B,IAAI,UAAU,CAAC,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;AAClC,GAAG;AACH;;;;"} |