ninemoon-ui 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/directives/index.d.ts +10 -0
- package/dist/index.css +1033 -14
- package/dist/index.d.ts +9 -2
- package/dist/index.es.js +39 -32
- package/dist/index.umd.js +1341 -284
- package/dist/js/date/datepicker.js +1 -1
- package/dist/js/date/datepickerRange.js +1 -1
- package/dist/js/image/image.js +1 -101
- package/dist/js/index/index.js +329 -38
- package/dist/js/popover/popover.js +1 -99
- package/dist/js/scrollBar/scrollBar.js +1 -1
- package/dist/js/select/select.js +1 -59
- package/package.json +1 -1
- /package/dist/{components/scrollloading → directives}/scrolllead.d.ts +0 -0
package/dist/js/select/select.js
CHANGED
|
@@ -1,64 +1,6 @@
|
|
|
1
1
|
import { defineComponent, defineAsyncComponent, computed, inject, ref, watch, provide, toRef, openBlock, createBlock, unref, withCtx, createElementVNode, normalizeClass, createVNode, withDirectives, createElementBlock, renderSlot } from "vue";
|
|
2
2
|
import { A as ArrowIcon } from "../arrow/arrow.js";
|
|
3
|
-
import "../index/index.js";
|
|
4
|
-
const directionMap = {
|
|
5
|
-
ArrowUp: "up",
|
|
6
|
-
Up: "up",
|
|
7
|
-
// IE/Edge 兼容
|
|
8
|
-
ArrowDown: "down",
|
|
9
|
-
Down: "down",
|
|
10
|
-
// IE/Edge 兼容
|
|
11
|
-
ArrowLeft: "left",
|
|
12
|
-
Left: "left",
|
|
13
|
-
// IE/Edge 兼容
|
|
14
|
-
ArrowRight: "right",
|
|
15
|
-
Right: "right"
|
|
16
|
-
// IE/Edge 兼容
|
|
17
|
-
};
|
|
18
|
-
const createArrowKeysDirective = (options) => {
|
|
19
|
-
const config = {
|
|
20
|
-
// 默认配置
|
|
21
|
-
up: () => {
|
|
22
|
-
},
|
|
23
|
-
down: () => {
|
|
24
|
-
},
|
|
25
|
-
left: () => {
|
|
26
|
-
},
|
|
27
|
-
right: () => {
|
|
28
|
-
},
|
|
29
|
-
...options
|
|
30
|
-
};
|
|
31
|
-
const bindEvents = (el, binding) => {
|
|
32
|
-
const handler = (e) => {
|
|
33
|
-
var _a;
|
|
34
|
-
const direction = directionMap[e.key];
|
|
35
|
-
if (direction && config[direction]) {
|
|
36
|
-
e.preventDefault();
|
|
37
|
-
(_a = config[direction]) == null ? void 0 : _a.call(config, e);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
el._arrowKeysHandler = handler;
|
|
41
|
-
document.addEventListener("keydown", handler);
|
|
42
|
-
};
|
|
43
|
-
const unbindEvents = (el) => {
|
|
44
|
-
if (el._arrowKeysHandler) {
|
|
45
|
-
document.removeEventListener("keydown", el._arrowKeysHandler);
|
|
46
|
-
}
|
|
47
|
-
delete el._arrowKeysHandler;
|
|
48
|
-
};
|
|
49
|
-
return {
|
|
50
|
-
mounted(el, binding) {
|
|
51
|
-
bindEvents(el);
|
|
52
|
-
},
|
|
53
|
-
updated(el, binding) {
|
|
54
|
-
unbindEvents(el);
|
|
55
|
-
bindEvents(el);
|
|
56
|
-
},
|
|
57
|
-
unmounted(el) {
|
|
58
|
-
unbindEvents(el);
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
};
|
|
3
|
+
import { a as createArrowKeysDirective } from "../index/index.js";
|
|
62
4
|
const _hoisted_1 = ["value", "disabled", "readonly", "placeholder"];
|
|
63
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
64
6
|
__name: "select",
|
package/package.json
CHANGED
|
File without changes
|