ninemoon-ui 0.1.2 → 0.1.4
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/components/loadding/loadding.d.ts +1 -1
- package/dist/components/popover/poparrow.d.ts +2 -10
- package/dist/components/popover/popover.vue.d.ts +1 -6
- package/dist/components/scrollBar/scrollBar.vue.d.ts +2 -0
- package/dist/directives/index.d.ts +10 -0
- package/dist/{components/scrollloading → directives}/scrolllead.d.ts +1 -1
- package/dist/directives/watchwindow.d.ts +1 -0
- package/dist/index.css +24 -966
- package/dist/index.d.ts +24 -23
- package/dist/index.es.js +39 -32
- package/dist/index.umd.js +453 -1393
- package/dist/js/date/datepicker.js +4 -4
- package/dist/js/date/datepickerRange.js +4 -4
- package/dist/js/image/image.js +1 -101
- package/dist/js/index/index.js +334 -41
- package/dist/js/input/input.js +3 -3
- package/dist/js/numberInput/numberinput.js +3 -3
- package/dist/js/popover/popover.js +11 -108
- package/dist/js/scrollBar/scrollBar.js +8 -5
- package/dist/js/select/select.js +7 -63
- package/dist/js/tabs/tabs.js +3 -1
- package/dist/tabs.css +3 -49
- package/package.json +1 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, defineAsyncComponent, computed, ref, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, normalizeClass, withKeys, createElementBlock, createCommentVNode, toDisplayString, withDirectives, vShow, TransitionGroup, Fragment, renderList, nextTick } from "vue";
|
|
2
|
-
import { g as getNewArray,
|
|
2
|
+
import { g as getNewArray, e as checkinputDate, f as formatDate } from "../index/index.js";
|
|
3
3
|
import { g as getMonthDays, C as Calendar, A as Arrow, a as addZero } from "../calendar/calendar.js";
|
|
4
4
|
import { A as ArrowPlug } from "../dateArrowplus/dateArrowplus.js";
|
|
5
5
|
const _hoisted_1 = { class: "flex items-center justify-between p-3" };
|
|
@@ -32,9 +32,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
32
|
const Pop = defineAsyncComponent(() => import("../popover/popover.js"));
|
|
33
33
|
const props = __props;
|
|
34
34
|
const heightClass = computed(() => ({
|
|
35
|
-
"h-
|
|
36
|
-
"h-
|
|
37
|
-
"h-
|
|
35
|
+
"h-10": props.size === "large",
|
|
36
|
+
"h-9": props.size === "default",
|
|
37
|
+
"h-8": props.size === "small"
|
|
38
38
|
}));
|
|
39
39
|
const emit = __emit;
|
|
40
40
|
const dateChangeHandle = (e) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, defineAsyncComponent, computed, ref, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, normalizeClass, toDisplayString, createTextVNode, createElementBlock, Fragment, renderList, nextTick } from "vue";
|
|
2
|
-
import { f as formatDate, g as getNewArray,
|
|
2
|
+
import { f as formatDate, g as getNewArray, e as checkinputDate } from "../index/index.js";
|
|
3
3
|
import { g as getMonthDays, C as Calendar, A as Arrow, a as addZero } from "../calendar/calendar.js";
|
|
4
4
|
import { A as ArrowPlug } from "../dateArrowplus/dateArrowplus.js";
|
|
5
5
|
const _hoisted_1 = { class: "flex justify-between items-center p-3" };
|
|
@@ -45,9 +45,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
45
|
const emit = __emit;
|
|
46
46
|
const props = __props;
|
|
47
47
|
const heightClass = computed(() => ({
|
|
48
|
-
"h-
|
|
49
|
-
"h-
|
|
50
|
-
"h-
|
|
48
|
+
"h-10": props.size === "large",
|
|
49
|
+
"h-9": props.size === "default",
|
|
50
|
+
"h-8": props.size === "small"
|
|
51
51
|
}));
|
|
52
52
|
const deleteDateHandle = () => {
|
|
53
53
|
emit("update:modelValue", [null, null]);
|
package/dist/js/image/image.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { openBlock, createElementBlock, createElementVNode, defineComponent, ref, watch, Fragment, createVNode, createCommentVNode, renderSlot, createBlock, Teleport, Transition, withCtx, withDirectives, withModifiers, normalizeStyle, normalizeClass, unref } from "vue";
|
|
2
|
-
import { _ as _export_sfc,
|
|
2
|
+
import { _ as _export_sfc, b as createDraggableDirective, d as createWheelDirective } from "../index/index.js";
|
|
3
3
|
import { d as delIcon } from "../delete/delete.js";
|
|
4
4
|
const _sfc_main$3 = {};
|
|
5
5
|
const _hoisted_1$3 = {
|
|
@@ -48,106 +48,6 @@ function _sfc_render(_ctx, _cache) {
|
|
|
48
48
|
]));
|
|
49
49
|
}
|
|
50
50
|
const turnRightIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render]]);
|
|
51
|
-
const DEFAULT_THROTTLE_WAIT = 60;
|
|
52
|
-
const createDraggableDirective = (options) => {
|
|
53
|
-
const config = {
|
|
54
|
-
throttleWait: DEFAULT_THROTTLE_WAIT,
|
|
55
|
-
resetOnEnd: false,
|
|
56
|
-
onDrag: () => {
|
|
57
|
-
},
|
|
58
|
-
// default implementation
|
|
59
|
-
...options
|
|
60
|
-
};
|
|
61
|
-
const bindEvents = (el, binding) => {
|
|
62
|
-
if (el.__draggable_handlers__)
|
|
63
|
-
return;
|
|
64
|
-
let startX = 0;
|
|
65
|
-
let startY = 0;
|
|
66
|
-
let initialX = 0;
|
|
67
|
-
let initialY = 0;
|
|
68
|
-
const handleMove = throttle((e) => {
|
|
69
|
-
e.preventDefault();
|
|
70
|
-
const deltaX = e.pageX - startX;
|
|
71
|
-
const deltaY = e.pageY - startY;
|
|
72
|
-
config.onDrag({
|
|
73
|
-
x: deltaX + initialX,
|
|
74
|
-
y: deltaY + initialY
|
|
75
|
-
});
|
|
76
|
-
}, config.throttleWait);
|
|
77
|
-
const handleDown = (e) => {
|
|
78
|
-
var _a;
|
|
79
|
-
e.preventDefault();
|
|
80
|
-
const rect = el.getBoundingClientRect();
|
|
81
|
-
initialX = rect.left + window.scrollX;
|
|
82
|
-
initialY = rect.top + window.scrollY;
|
|
83
|
-
startX = e.pageX;
|
|
84
|
-
startY = e.pageY;
|
|
85
|
-
(_a = config.onDragStart) == null ? void 0 : _a.call(config, { x: initialX, y: initialY });
|
|
86
|
-
window.addEventListener("mousemove", handleMove);
|
|
87
|
-
window.addEventListener("mouseup", handleUp);
|
|
88
|
-
};
|
|
89
|
-
const handleUp = () => {
|
|
90
|
-
var _a;
|
|
91
|
-
window.removeEventListener("mousemove", handleMove);
|
|
92
|
-
window.removeEventListener("mouseup", handleUp);
|
|
93
|
-
if (config.resetOnEnd) {
|
|
94
|
-
config.onDrag({ x: initialX, y: initialY });
|
|
95
|
-
}
|
|
96
|
-
(_a = config.onDragEnd) == null ? void 0 : _a.call(config, { x: initialX, y: initialY });
|
|
97
|
-
};
|
|
98
|
-
el.__draggable_handlers__ = {
|
|
99
|
-
move: handleMove,
|
|
100
|
-
up: handleUp
|
|
101
|
-
};
|
|
102
|
-
el.addEventListener("mousedown", handleDown);
|
|
103
|
-
};
|
|
104
|
-
const unbindEvents = (el) => {
|
|
105
|
-
if (el.__draggable_handlers__) {
|
|
106
|
-
window.removeEventListener("mousemove", el.__draggable_handlers__.move);
|
|
107
|
-
window.removeEventListener("mouseup", el.__draggable_handlers__.up);
|
|
108
|
-
delete el.__draggable_handlers__;
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
return {
|
|
112
|
-
mounted(el, binding) {
|
|
113
|
-
bindEvents(el);
|
|
114
|
-
},
|
|
115
|
-
beforeUnmount(el) {
|
|
116
|
-
unbindEvents(el);
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
|
-
const createWheelDirective = (options) => {
|
|
121
|
-
const config = {
|
|
122
|
-
onWheel: () => {
|
|
123
|
-
},
|
|
124
|
-
...options
|
|
125
|
-
};
|
|
126
|
-
const bindEvents = (el, binding) => {
|
|
127
|
-
const wheelHandler = (e) => {
|
|
128
|
-
e.preventDefault();
|
|
129
|
-
config.onWheel(e);
|
|
130
|
-
};
|
|
131
|
-
el._wheel_handlers_ = {
|
|
132
|
-
wheel: wheelHandler
|
|
133
|
-
};
|
|
134
|
-
el.addEventListener("wheel", wheelHandler);
|
|
135
|
-
};
|
|
136
|
-
const unbindEvents = (el) => {
|
|
137
|
-
if (el._wheel_handlers_) {
|
|
138
|
-
el.removeEventListener("wheel", el._wheel_handlers_.wheel);
|
|
139
|
-
delete el._wheel_handlers_;
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
return {
|
|
143
|
-
mounted(el, binding) {
|
|
144
|
-
bindEvents(el);
|
|
145
|
-
},
|
|
146
|
-
beforeUnmount(el) {
|
|
147
|
-
unbindEvents(el);
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
51
|
const _hoisted_1 = { class: "relative inline-block h-full w-full" };
|
|
152
52
|
const _hoisted_2 = ["src"];
|
|
153
53
|
const _hoisted_3 = { key: 0 };
|
package/dist/js/index/index.js
CHANGED
|
@@ -516,10 +516,12 @@ const LibLoad = {
|
|
|
516
516
|
handleLoadingState(el, binding, binding.value);
|
|
517
517
|
}
|
|
518
518
|
},
|
|
519
|
-
beforeUnmount(el) {
|
|
519
|
+
beforeUnmount(el, binding) {
|
|
520
520
|
var _a;
|
|
521
521
|
if (el.__loading_instance__) {
|
|
522
|
-
|
|
522
|
+
const modifiers = binding.modifiers;
|
|
523
|
+
const target = modifiers.fullScreen ? document.body : el;
|
|
524
|
+
cleanupLoadingState(el, target);
|
|
523
525
|
(_a = el.__loading_instance__) == null ? void 0 : _a.$el.remove();
|
|
524
526
|
delete el.__loading_instance__;
|
|
525
527
|
}
|
|
@@ -575,6 +577,64 @@ function cleanupLoadingState(el, container, modifiers) {
|
|
|
575
577
|
}
|
|
576
578
|
delete el.__loading_instance__;
|
|
577
579
|
}
|
|
580
|
+
const directionMap = {
|
|
581
|
+
ArrowUp: "up",
|
|
582
|
+
Up: "up",
|
|
583
|
+
// IE/Edge 兼容
|
|
584
|
+
ArrowDown: "down",
|
|
585
|
+
Down: "down",
|
|
586
|
+
// IE/Edge 兼容
|
|
587
|
+
ArrowLeft: "left",
|
|
588
|
+
Left: "left",
|
|
589
|
+
// IE/Edge 兼容
|
|
590
|
+
ArrowRight: "right",
|
|
591
|
+
Right: "right"
|
|
592
|
+
// IE/Edge 兼容
|
|
593
|
+
};
|
|
594
|
+
const createArrowKeysDirective = (options) => {
|
|
595
|
+
const config = {
|
|
596
|
+
// 默认配置
|
|
597
|
+
up: () => {
|
|
598
|
+
},
|
|
599
|
+
down: () => {
|
|
600
|
+
},
|
|
601
|
+
left: () => {
|
|
602
|
+
},
|
|
603
|
+
right: () => {
|
|
604
|
+
},
|
|
605
|
+
...options
|
|
606
|
+
};
|
|
607
|
+
const bindEvents = (el, binding) => {
|
|
608
|
+
const handler = (e) => {
|
|
609
|
+
var _a;
|
|
610
|
+
const direction = directionMap[e.key];
|
|
611
|
+
if (direction && config[direction]) {
|
|
612
|
+
e.preventDefault();
|
|
613
|
+
(_a = config[direction]) == null ? void 0 : _a.call(config, e);
|
|
614
|
+
}
|
|
615
|
+
};
|
|
616
|
+
el._arrowKeysHandler = handler;
|
|
617
|
+
document.addEventListener("keydown", handler);
|
|
618
|
+
};
|
|
619
|
+
const unbindEvents = (el) => {
|
|
620
|
+
if (el._arrowKeysHandler) {
|
|
621
|
+
document.removeEventListener("keydown", el._arrowKeysHandler);
|
|
622
|
+
}
|
|
623
|
+
delete el._arrowKeysHandler;
|
|
624
|
+
};
|
|
625
|
+
return {
|
|
626
|
+
mounted(el, binding) {
|
|
627
|
+
bindEvents(el);
|
|
628
|
+
},
|
|
629
|
+
updated(el, binding) {
|
|
630
|
+
unbindEvents(el);
|
|
631
|
+
bindEvents(el);
|
|
632
|
+
},
|
|
633
|
+
unmounted(el) {
|
|
634
|
+
unbindEvents(el);
|
|
635
|
+
}
|
|
636
|
+
};
|
|
637
|
+
};
|
|
578
638
|
function debounce(func, wait) {
|
|
579
639
|
let timeout;
|
|
580
640
|
return function() {
|
|
@@ -783,11 +843,131 @@ const useResizeObserver = (callback) => {
|
|
|
783
843
|
};
|
|
784
844
|
return { observe, unobserve };
|
|
785
845
|
};
|
|
786
|
-
const
|
|
846
|
+
const DEFAULT_THROTTLE_WAIT = 60;
|
|
847
|
+
const createDraggableDirective = (options) => {
|
|
848
|
+
const config = {
|
|
849
|
+
throttleWait: DEFAULT_THROTTLE_WAIT,
|
|
850
|
+
resetOnEnd: false,
|
|
851
|
+
onDrag: () => {
|
|
852
|
+
},
|
|
853
|
+
// default implementation
|
|
854
|
+
...options
|
|
855
|
+
};
|
|
856
|
+
const bindEvents = (el, binding) => {
|
|
857
|
+
if (el.__draggable_handlers__)
|
|
858
|
+
return;
|
|
859
|
+
let startX = 0;
|
|
860
|
+
let startY = 0;
|
|
861
|
+
let initialX = 0;
|
|
862
|
+
let initialY = 0;
|
|
863
|
+
const handleMove = throttle((e) => {
|
|
864
|
+
e.preventDefault();
|
|
865
|
+
const deltaX = e.pageX - startX;
|
|
866
|
+
const deltaY = e.pageY - startY;
|
|
867
|
+
config.onDrag({
|
|
868
|
+
x: deltaX + initialX,
|
|
869
|
+
y: deltaY + initialY
|
|
870
|
+
});
|
|
871
|
+
}, config.throttleWait);
|
|
872
|
+
const handleDown = (e) => {
|
|
873
|
+
var _a;
|
|
874
|
+
e.preventDefault();
|
|
875
|
+
const rect = el.getBoundingClientRect();
|
|
876
|
+
initialX = rect.left + window.scrollX;
|
|
877
|
+
initialY = rect.top + window.scrollY;
|
|
878
|
+
startX = e.pageX;
|
|
879
|
+
startY = e.pageY;
|
|
880
|
+
(_a = config.onDragStart) == null ? void 0 : _a.call(config, { x: initialX, y: initialY });
|
|
881
|
+
window.addEventListener("mousemove", handleMove);
|
|
882
|
+
window.addEventListener("mouseup", handleUp);
|
|
883
|
+
};
|
|
884
|
+
const handleUp = () => {
|
|
885
|
+
var _a;
|
|
886
|
+
window.removeEventListener("mousemove", handleMove);
|
|
887
|
+
window.removeEventListener("mouseup", handleUp);
|
|
888
|
+
if (config.resetOnEnd) {
|
|
889
|
+
config.onDrag({ x: initialX, y: initialY });
|
|
890
|
+
}
|
|
891
|
+
(_a = config.onDragEnd) == null ? void 0 : _a.call(config, { x: initialX, y: initialY });
|
|
892
|
+
};
|
|
893
|
+
el.__draggable_handlers__ = {
|
|
894
|
+
move: handleMove,
|
|
895
|
+
up: handleUp
|
|
896
|
+
};
|
|
897
|
+
el.addEventListener("mousedown", handleDown);
|
|
898
|
+
};
|
|
899
|
+
const unbindEvents = (el) => {
|
|
900
|
+
if (el.__draggable_handlers__) {
|
|
901
|
+
window.removeEventListener("mousemove", el.__draggable_handlers__.move);
|
|
902
|
+
window.removeEventListener("mouseup", el.__draggable_handlers__.up);
|
|
903
|
+
delete el.__draggable_handlers__;
|
|
904
|
+
}
|
|
905
|
+
};
|
|
906
|
+
return {
|
|
907
|
+
mounted(el, binding) {
|
|
908
|
+
bindEvents(el);
|
|
909
|
+
},
|
|
910
|
+
beforeUnmount(el) {
|
|
911
|
+
unbindEvents(el);
|
|
912
|
+
}
|
|
913
|
+
};
|
|
914
|
+
};
|
|
915
|
+
const DEFAULT_DEBOUNCE_WAIT$2 = 100;
|
|
916
|
+
const createBgClickDirective = (options) => {
|
|
917
|
+
const config = {
|
|
918
|
+
debounceWait: DEFAULT_DEBOUNCE_WAIT$2,
|
|
919
|
+
moveModel: false,
|
|
920
|
+
onCheckOut: () => {
|
|
921
|
+
},
|
|
922
|
+
...options
|
|
923
|
+
};
|
|
924
|
+
const bindEvents = (el, binding) => {
|
|
925
|
+
if (el._checkout_handlers_)
|
|
926
|
+
return;
|
|
927
|
+
const clickDom = debounce((e) => {
|
|
928
|
+
e.preventDefault();
|
|
929
|
+
config.onCheckOut(e, el);
|
|
930
|
+
}, config.debounceWait);
|
|
931
|
+
el._checkout_handlers_ = {
|
|
932
|
+
click: clickDom
|
|
933
|
+
};
|
|
934
|
+
if (config.moveModel) {
|
|
935
|
+
document.addEventListener("mousemove", clickDom);
|
|
936
|
+
} else {
|
|
937
|
+
document.addEventListener("click", clickDom);
|
|
938
|
+
}
|
|
939
|
+
};
|
|
940
|
+
const unbindEvents = (el) => {
|
|
941
|
+
if (el._checkout_handlers_) {
|
|
942
|
+
if (config.moveModel) {
|
|
943
|
+
document.removeEventListener("mousemove", el._checkout_handlers_.click);
|
|
944
|
+
} else {
|
|
945
|
+
document.removeEventListener("click", el._checkout_handlers_.click);
|
|
946
|
+
}
|
|
947
|
+
delete el._checkout_handlers_;
|
|
948
|
+
}
|
|
949
|
+
};
|
|
950
|
+
return {
|
|
951
|
+
mounted(el, binding) {
|
|
952
|
+
bindEvents(el);
|
|
953
|
+
},
|
|
954
|
+
beforeUnmount(el) {
|
|
955
|
+
unbindEvents(el);
|
|
956
|
+
},
|
|
957
|
+
// 添加 updated 钩子处理配置变化
|
|
958
|
+
updated(el, binding) {
|
|
959
|
+
if (binding.value !== binding.oldValue) {
|
|
960
|
+
unbindEvents(el);
|
|
961
|
+
bindEvents(el);
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
};
|
|
965
|
+
};
|
|
966
|
+
const DEFAULT_DEBOUNCE_WAIT$1 = 100;
|
|
787
967
|
const DEFAULT_HOLD = 0;
|
|
788
|
-
const
|
|
968
|
+
const createLoadingDirective = (options) => {
|
|
789
969
|
const config = {
|
|
790
|
-
throttleTime: DEFAULT_DEBOUNCE_WAIT,
|
|
970
|
+
throttleTime: DEFAULT_DEBOUNCE_WAIT$1,
|
|
791
971
|
threshold: DEFAULT_HOLD,
|
|
792
972
|
edge: "bottom",
|
|
793
973
|
onWheel: () => {
|
|
@@ -851,6 +1031,115 @@ const createScrollDirective = (options) => {
|
|
|
851
1031
|
}
|
|
852
1032
|
};
|
|
853
1033
|
};
|
|
1034
|
+
const DEFAULT_DEBOUNCE_WAIT = 50;
|
|
1035
|
+
const createScrollDirective = (options) => {
|
|
1036
|
+
const config = {
|
|
1037
|
+
debounceWait: DEFAULT_DEBOUNCE_WAIT,
|
|
1038
|
+
onMove: () => {
|
|
1039
|
+
},
|
|
1040
|
+
...options
|
|
1041
|
+
};
|
|
1042
|
+
const bindEvents = (el, binding) => {
|
|
1043
|
+
if (el._watchwindow_handlers_) {
|
|
1044
|
+
return;
|
|
1045
|
+
}
|
|
1046
|
+
const moveDom = debounce((e) => {
|
|
1047
|
+
e.preventDefault();
|
|
1048
|
+
config.onMove();
|
|
1049
|
+
}, config.debounceWait);
|
|
1050
|
+
el._watchwindow_handlers_ = {
|
|
1051
|
+
move: moveDom
|
|
1052
|
+
};
|
|
1053
|
+
window.addEventListener("resize", el._watchwindow_handlers_.move);
|
|
1054
|
+
const scrollContainer = typeof config.scrollContainerId === "string" ? document.querySelector(config.scrollContainerId) || window : window;
|
|
1055
|
+
scrollContainer.addEventListener("scroll", el._watchwindow_handlers_.move);
|
|
1056
|
+
};
|
|
1057
|
+
const unbindEvents = (el) => {
|
|
1058
|
+
if (el._watchwindow_handlers_) {
|
|
1059
|
+
window.removeEventListener("resize", el._watchwindow_handlers_.move);
|
|
1060
|
+
const scrollContainer = typeof config.scrollContainerId === "string" ? document.querySelector(config.scrollContainerId) || window : window;
|
|
1061
|
+
scrollContainer.removeEventListener("scroll", el._watchwindow_handlers_.move);
|
|
1062
|
+
delete el._watchwindow_handlers_;
|
|
1063
|
+
}
|
|
1064
|
+
};
|
|
1065
|
+
return {
|
|
1066
|
+
mounted(el, binding) {
|
|
1067
|
+
bindEvents(el);
|
|
1068
|
+
},
|
|
1069
|
+
beforeUnmount(el) {
|
|
1070
|
+
unbindEvents(el);
|
|
1071
|
+
},
|
|
1072
|
+
// 添加 updated 钩子处理配置变化
|
|
1073
|
+
updated(el, binding) {
|
|
1074
|
+
if (binding.value !== binding.oldValue) {
|
|
1075
|
+
unbindEvents(el);
|
|
1076
|
+
bindEvents(el);
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
};
|
|
1080
|
+
};
|
|
1081
|
+
const createWheelDirective = (options) => {
|
|
1082
|
+
const config = {
|
|
1083
|
+
onWheel: () => {
|
|
1084
|
+
},
|
|
1085
|
+
...options
|
|
1086
|
+
};
|
|
1087
|
+
const bindEvents = (el, binding) => {
|
|
1088
|
+
const wheelHandler = (e) => {
|
|
1089
|
+
e.preventDefault();
|
|
1090
|
+
config.onWheel(e);
|
|
1091
|
+
};
|
|
1092
|
+
el._wheel_handlers_ = {
|
|
1093
|
+
wheel: wheelHandler
|
|
1094
|
+
};
|
|
1095
|
+
el.addEventListener("wheel", wheelHandler);
|
|
1096
|
+
};
|
|
1097
|
+
const unbindEvents = (el) => {
|
|
1098
|
+
if (el._wheel_handlers_) {
|
|
1099
|
+
el.removeEventListener("wheel", el._wheel_handlers_.wheel);
|
|
1100
|
+
delete el._wheel_handlers_;
|
|
1101
|
+
}
|
|
1102
|
+
};
|
|
1103
|
+
return {
|
|
1104
|
+
mounted(el, binding) {
|
|
1105
|
+
bindEvents(el);
|
|
1106
|
+
},
|
|
1107
|
+
beforeUnmount(el) {
|
|
1108
|
+
unbindEvents(el);
|
|
1109
|
+
}
|
|
1110
|
+
};
|
|
1111
|
+
};
|
|
1112
|
+
const createBgClickeDirective = (options) => {
|
|
1113
|
+
const config = {
|
|
1114
|
+
onBgPicture: () => {
|
|
1115
|
+
},
|
|
1116
|
+
...options
|
|
1117
|
+
};
|
|
1118
|
+
const bindEvents = (el, binding) => {
|
|
1119
|
+
const bgPictureHandler = (e) => {
|
|
1120
|
+
e.preventDefault();
|
|
1121
|
+
config.onBgPicture(e);
|
|
1122
|
+
};
|
|
1123
|
+
el._bgPicture_handlers_ = {
|
|
1124
|
+
bgPicture: bgPictureHandler
|
|
1125
|
+
};
|
|
1126
|
+
el.addEventListener("click", bgPictureHandler);
|
|
1127
|
+
};
|
|
1128
|
+
const unbindEvents = (el) => {
|
|
1129
|
+
if (el._bgPicture_handlers_) {
|
|
1130
|
+
el.removeEventListener("click", el._bgPicture_handlers_.bgPicture);
|
|
1131
|
+
delete el._bgPicture_handlers_;
|
|
1132
|
+
}
|
|
1133
|
+
};
|
|
1134
|
+
return {
|
|
1135
|
+
mounted(el, binding) {
|
|
1136
|
+
bindEvents(el);
|
|
1137
|
+
},
|
|
1138
|
+
beforeUnmount(el) {
|
|
1139
|
+
unbindEvents(el);
|
|
1140
|
+
}
|
|
1141
|
+
};
|
|
1142
|
+
};
|
|
854
1143
|
const tailwind = "";
|
|
855
1144
|
const LibDialog = defineAsyncComponent(() => import("../dialog/dialog.js"));
|
|
856
1145
|
const LibForm = defineAsyncComponent(() => import("../form/form.js"));
|
|
@@ -911,48 +1200,52 @@ const index = {
|
|
|
911
1200
|
}
|
|
912
1201
|
};
|
|
913
1202
|
export {
|
|
914
|
-
|
|
915
|
-
|
|
1203
|
+
LibBadge as A,
|
|
1204
|
+
LibPopover as B,
|
|
916
1205
|
CloseIcon as C,
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
1206
|
+
LibNumberInput as D,
|
|
1207
|
+
LibRadioBox as E,
|
|
1208
|
+
LibRadioGroup as F,
|
|
1209
|
+
LibCheckGroup as G,
|
|
1210
|
+
LibCheckBox as H,
|
|
1211
|
+
LibUpload as I,
|
|
1212
|
+
LibTabs as J,
|
|
1213
|
+
LibTabsPane as K,
|
|
925
1214
|
LibDialog as L,
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
1215
|
+
LibScrollBar as M,
|
|
1216
|
+
MessageClass as N,
|
|
1217
|
+
AlertFunction as O,
|
|
1218
|
+
LibLoad as P,
|
|
1219
|
+
LibCarousel as Q,
|
|
1220
|
+
LibCarouselItem as R,
|
|
1221
|
+
LibSwitch as S,
|
|
1222
|
+
createLoadingDirective as T,
|
|
1223
|
+
createBgClickeDirective as U,
|
|
931
1224
|
_export_sfc as _,
|
|
932
|
-
|
|
933
|
-
|
|
1225
|
+
createArrowKeysDirective as a,
|
|
1226
|
+
createDraggableDirective as b,
|
|
934
1227
|
createEscapeDirective as c,
|
|
935
|
-
|
|
936
|
-
|
|
1228
|
+
createWheelDirective as d,
|
|
1229
|
+
checkinputDate as e,
|
|
937
1230
|
formatDate as f,
|
|
938
1231
|
getNewArray as g,
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
1232
|
+
createScrollDirective as h,
|
|
1233
|
+
createBgClickDirective as i,
|
|
1234
|
+
off as j,
|
|
1235
|
+
useResizeObserver as k,
|
|
1236
|
+
index as l,
|
|
1237
|
+
LibForm as m,
|
|
1238
|
+
LibFormLabel as n,
|
|
946
1239
|
on as o,
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
1240
|
+
LibInput as p,
|
|
1241
|
+
LibSelect as q,
|
|
1242
|
+
LibSelectOption as r,
|
|
1243
|
+
LibTable as s,
|
|
1244
|
+
LibTableItem as t,
|
|
952
1245
|
usePotion as u,
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
1246
|
+
LibImage as v,
|
|
1247
|
+
LibDatePicker as w,
|
|
1248
|
+
LibDatePickerRange as x,
|
|
1249
|
+
LibMenu as y,
|
|
1250
|
+
LibPagination as z
|
|
958
1251
|
};
|
package/dist/js/input/input.js
CHANGED
|
@@ -17,9 +17,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
17
|
setup(__props, { emit: __emit }) {
|
|
18
18
|
const props = __props;
|
|
19
19
|
const heightClass = computed(() => ({
|
|
20
|
-
"h-
|
|
21
|
-
"h-
|
|
22
|
-
"h-
|
|
20
|
+
"h-10": props.size === "large",
|
|
21
|
+
"h-9": props.size === "default",
|
|
22
|
+
"h-8": props.size === "small"
|
|
23
23
|
}));
|
|
24
24
|
const inputValue = computed({
|
|
25
25
|
get() {
|
|
@@ -42,9 +42,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
setup(__props, { emit: __emit }) {
|
|
43
43
|
const props = __props;
|
|
44
44
|
const sizeClass = computed(() => ({
|
|
45
|
-
"h-
|
|
46
|
-
"h-
|
|
47
|
-
"h-
|
|
45
|
+
"h-10 w-10": props.size === "large",
|
|
46
|
+
"h-9 w-9": props.size === "default",
|
|
47
|
+
"h-8 w-8": props.size === "small"
|
|
48
48
|
}));
|
|
49
49
|
const bounds = computed(() => ({
|
|
50
50
|
min: props.min ?? -Infinity,
|