鍒濆鎻愪氦锛氱墰鍙暟鎹鐞嗙郴缁?- 鍖呭惈鍚庣Spring Boot鍜屽墠绔疺ue3椤圭洰
This commit is contained in:
11
admin-system/node_modules/element-plus/lib/directives/mousewheel/index.d.ts
generated
vendored
Normal file
11
admin-system/node_modules/element-plus/lib/directives/mousewheel/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { ObjectDirective } from 'vue';
|
||||
import type { NormalizedWheelEvent } from 'normalize-wheel-es';
|
||||
export declare const SCOPE = "_Mousewheel";
|
||||
interface WheelElement extends HTMLElement {
|
||||
[SCOPE]: null | {
|
||||
wheelHandler?: (event: WheelEvent) => void;
|
||||
};
|
||||
}
|
||||
type MousewheelCallback = (e: WheelEvent, normalized: NormalizedWheelEvent) => void;
|
||||
declare const Mousewheel: ObjectDirective<WheelElement, MousewheelCallback>;
|
||||
export default Mousewheel;
|
||||
46
admin-system/node_modules/element-plus/lib/directives/mousewheel/index.js
generated
vendored
Normal file
46
admin-system/node_modules/element-plus/lib/directives/mousewheel/index.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var normalizeWheel = require('normalize-wheel-es');
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var normalizeWheel__default = /*#__PURE__*/_interopDefaultLegacy(normalizeWheel);
|
||||
|
||||
const SCOPE = "_Mousewheel";
|
||||
const mousewheel = function(element, callback) {
|
||||
if (element && element.addEventListener) {
|
||||
removeWheelHandler(element);
|
||||
const fn = function(event) {
|
||||
const normalized = normalizeWheel__default["default"](event);
|
||||
callback && Reflect.apply(callback, this, [event, normalized]);
|
||||
};
|
||||
element[SCOPE] = { wheelHandler: fn };
|
||||
element.addEventListener("wheel", fn, { passive: true });
|
||||
}
|
||||
};
|
||||
const removeWheelHandler = (element) => {
|
||||
var _a;
|
||||
if ((_a = element[SCOPE]) == null ? void 0 : _a.wheelHandler) {
|
||||
element.removeEventListener("wheel", element[SCOPE].wheelHandler);
|
||||
element[SCOPE] = null;
|
||||
}
|
||||
};
|
||||
const Mousewheel = {
|
||||
beforeMount(el, binding) {
|
||||
mousewheel(el, binding.value);
|
||||
},
|
||||
unmounted(el) {
|
||||
removeWheelHandler(el);
|
||||
},
|
||||
updated(el, binding) {
|
||||
if (binding.value !== binding.oldValue) {
|
||||
mousewheel(el, binding.value);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
exports.SCOPE = SCOPE;
|
||||
exports["default"] = Mousewheel;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
admin-system/node_modules/element-plus/lib/directives/mousewheel/index.js.map
generated
vendored
Normal file
1
admin-system/node_modules/element-plus/lib/directives/mousewheel/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sources":["../../../../../packages/directives/mousewheel/index.ts"],"sourcesContent":["import normalizeWheel from 'normalize-wheel-es'\n\nimport type { ObjectDirective } from 'vue'\nimport type { NormalizedWheelEvent } from 'normalize-wheel-es'\n\nexport const SCOPE = '_Mousewheel'\n\ninterface WheelElement extends HTMLElement {\n [SCOPE]: null | {\n wheelHandler?: (event: WheelEvent) => void\n }\n}\n\ntype MousewheelCallback = (\n e: WheelEvent,\n normalized: NormalizedWheelEvent\n) => void\n\nconst mousewheel = function (\n element: WheelElement,\n callback: MousewheelCallback\n) {\n if (element && element.addEventListener) {\n removeWheelHandler(element)\n\n const fn = function (this: HTMLElement, event: WheelEvent) {\n const normalized = normalizeWheel(event)\n callback && Reflect.apply(callback, this, [event, normalized])\n }\n\n element[SCOPE] = { wheelHandler: fn }\n element.addEventListener('wheel', fn, { passive: true })\n }\n}\n\nconst removeWheelHandler = (element: WheelElement) => {\n if (element[SCOPE]?.wheelHandler) {\n element.removeEventListener('wheel', element[SCOPE].wheelHandler)\n element[SCOPE] = null\n }\n}\n\nconst Mousewheel: ObjectDirective<WheelElement, MousewheelCallback> = {\n beforeMount(el, binding) {\n mousewheel(el, binding.value)\n },\n unmounted(el) {\n removeWheelHandler(el)\n },\n updated(el, binding) {\n if (binding.value !== binding.oldValue) {\n mousewheel(el, binding.value)\n }\n },\n}\n\nexport default Mousewheel\n"],"names":["normalizeWheel"],"mappings":";;;;;;;;;;AACY,MAAC,KAAK,GAAG,cAAc;AACnC,MAAM,UAAU,GAAG,SAAS,OAAO,EAAE,QAAQ,EAAE;AAC/C,EAAE,IAAI,OAAO,IAAI,OAAO,CAAC,gBAAgB,EAAE;AAC3C,IAAI,kBAAkB,CAAC,OAAO,CAAC,CAAC;AAChC,IAAI,MAAM,EAAE,GAAG,SAAS,KAAK,EAAE;AAC/B,MAAM,MAAM,UAAU,GAAGA,kCAAc,CAAC,KAAK,CAAC,CAAC;AAC/C,MAAM,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;AACrE,KAAK,CAAC;AACN,IAAI,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC;AAC1C,IAAI,OAAO,CAAC,gBAAgB,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7D,GAAG;AACH,CAAC,CAAC;AACF,MAAM,kBAAkB,GAAG,CAAC,OAAO,KAAK;AACxC,EAAE,IAAI,EAAE,CAAC;AACT,EAAE,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,YAAY,EAAE;AAChE,IAAI,OAAO,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC;AACtE,IAAI,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;AAC1B,GAAG;AACH,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