ninemoon-ui 0.1.14 → 0.2.1

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.
Files changed (40) hide show
  1. package/dist/components/carousel/carousel.vue.d.ts +2 -0
  2. package/dist/components/date/datepicker.vue.d.ts +1 -1
  3. package/dist/components/date/datepickerRange.vue.d.ts +16 -0
  4. package/dist/components/form/formlabel.vue.d.ts +1 -3
  5. package/dist/components/pagination/pagination.vue.d.ts +8 -15
  6. package/dist/components/popover/popover.vue.d.ts +5 -0
  7. package/dist/components/switch/switch.vue.d.ts +10 -0
  8. package/dist/components/upload/upload.vue.d.ts +5 -0
  9. package/dist/index.d.ts +139 -61
  10. package/dist/index.es.js +21 -21
  11. package/dist/js/arrow/arrow.js +2 -2
  12. package/dist/js/badge/badge.js +1 -1
  13. package/dist/js/calendar/calendar.js +4 -4
  14. package/dist/js/carousel/carousel.js +59 -38
  15. package/dist/js/check/checkbox.js +4 -4
  16. package/dist/js/date/datepicker.js +20 -8
  17. package/dist/js/date/datepickerRange.js +104 -69
  18. package/dist/js/dateArrowplus/dateArrowplus.js +2 -2
  19. package/dist/js/delete/delete.js +2 -2
  20. package/dist/js/dialog/dialog.js +41 -29
  21. package/dist/js/form/formlabel.js +21 -89
  22. package/dist/js/image/image.js +17 -18
  23. package/dist/js/index/index.js +274 -253
  24. package/dist/js/input/input.js +8 -8
  25. package/dist/js/menu/menu.js +1 -1
  26. package/dist/js/numberInput/numberinput.js +8 -8
  27. package/dist/js/pagination/pagination.js +17 -14
  28. package/dist/js/popover/popover.js +3 -239
  29. package/dist/js/popover.vue_vue_type_script_setup_true_lang/popover.vue_vue_type_script_setup_true_lang.js +249 -0
  30. package/dist/js/radio/radiobox.js +4 -4
  31. package/dist/js/scrollBar/scrollBar.js +4 -4
  32. package/dist/js/select/select.js +5 -5
  33. package/dist/js/select/selectoption.js +3 -3
  34. package/dist/js/switch/switch.js +33 -7
  35. package/dist/js/table/table.js +107 -77
  36. package/dist/js/table/tableItem.js +2 -2
  37. package/dist/js/tabs/tabs.js +202 -21
  38. package/dist/js/upload/upload.js +57 -12
  39. package/dist/utils/tool.d.ts +5 -0
  40. package/package.json +5 -2
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => {
4
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  return value;
6
6
  };
7
- import { openBlock, createElementBlock, createElementVNode, defineComponent, ref, onUnmounted, createBlock, Teleport, unref, createVNode, TransitionGroup, withCtx, Fragment, renderList, normalizeClass, resolveDynamicComponent, createTextVNode, toDisplayString, createCommentVNode, createApp, isVNode, watch, computed, Transition, withDirectives, withModifiers, reactive, defineAsyncComponent } from "vue";
7
+ import { openBlock, createElementBlock, createElementVNode, defineComponent, ref, onUnmounted, createBlock, Teleport, unref, createVNode, TransitionGroup, withCtx, Fragment, renderList, normalizeClass, resolveDynamicComponent, createTextVNode, toDisplayString, createCommentVNode, createApp, isVNode, watch, computed, Transition, withDirectives, normalizeStyle, withModifiers, reactive, defineAsyncComponent } from "vue";
8
8
  const _export_sfc = (sfc, props) => {
9
9
  const target = sfc.__vccOpts || sfc;
10
10
  for (const [key, val] of props) {
@@ -21,7 +21,7 @@ const _hoisted_1$8 = {
21
21
  fill: "inherit"
22
22
  };
23
23
  function _sfc_render$5(_ctx, _cache) {
24
- return openBlock(), createElementBlock("svg", _hoisted_1$8, _cache[0] || (_cache[0] = [
24
+ return openBlock(), createElementBlock("svg", _hoisted_1$8, [..._cache[0] || (_cache[0] = [
25
25
  createElementVNode("g", null, [
26
26
  createElementVNode("path", {
27
27
  "fill-rule": "evenodd",
@@ -30,7 +30,7 @@ function _sfc_render$5(_ctx, _cache) {
30
30
  fill: "inherit"
31
31
  })
32
32
  ], -1)
33
- ]));
33
+ ])]);
34
34
  }
35
35
  const CloseIcon = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$5]]);
36
36
  const _sfc_main$7 = {};
@@ -40,9 +40,9 @@ const _hoisted_1$7 = {
40
40
  xmlns: "http://www.w3.org/2000/svg"
41
41
  };
42
42
  function _sfc_render$4(_ctx, _cache) {
43
- return openBlock(), createElementBlock("svg", _hoisted_1$7, _cache[0] || (_cache[0] = [
43
+ return openBlock(), createElementBlock("svg", _hoisted_1$7, [..._cache[0] || (_cache[0] = [
44
44
  createElementVNode("path", { d: "M883.2 247.466667c-17.066667-17.066667-44.8-17.066667-59.733333 0L409.6 665.6l-209.066667-204.8c-17.066667-17.066667-44.8-17.066667-59.733333 0-17.066667 17.066667-17.066667 44.8 0 59.733333l238.933333 234.666667c8.533333 8.533333 19.2 12.8 29.866667 12.8 10.666667 0 21.333333-4.266667 29.866667-12.8l443.733333-448c17.066667-17.066667 17.066667-42.666667 0-59.733333z" }, null, -1)
45
- ]));
45
+ ])]);
46
46
  }
47
47
  const successTip = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$4]]);
48
48
  const _sfc_main$6 = {};
@@ -52,9 +52,9 @@ const _hoisted_1$6 = {
52
52
  xmlns: "http://www.w3.org/2000/svg"
53
53
  };
54
54
  function _sfc_render$3(_ctx, _cache) {
55
- return openBlock(), createElementBlock("svg", _hoisted_1$6, _cache[0] || (_cache[0] = [
55
+ return openBlock(), createElementBlock("svg", _hoisted_1$6, [..._cache[0] || (_cache[0] = [
56
56
  createElementVNode("path", { d: "M556.8 512L832 236.8c12.8-12.8 12.8-32 0-44.8-12.8-12.8-32-12.8-44.8 0L512 467.2l-275.2-277.333333c-12.8-12.8-32-12.8-44.8 0-12.8 12.8-12.8 32 0 44.8l275.2 277.333333-277.333333 275.2c-12.8 12.8-12.8 32 0 44.8 6.4 6.4 14.933333 8.533333 23.466666 8.533333s17.066667-2.133333 23.466667-8.533333L512 556.8 787.2 832c6.4 6.4 14.933333 8.533333 23.466667 8.533333s17.066667-2.133333 23.466666-8.533333c12.8-12.8 12.8-32 0-44.8L556.8 512z" }, null, -1)
57
- ]));
57
+ ])]);
58
58
  }
59
59
  const errTip = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$3]]);
60
60
  const _sfc_main$5 = {};
@@ -64,10 +64,10 @@ const _hoisted_1$5 = {
64
64
  xmlns: "http://www.w3.org/2000/svg"
65
65
  };
66
66
  function _sfc_render$2(_ctx, _cache) {
67
- return openBlock(), createElementBlock("svg", _hoisted_1$5, _cache[0] || (_cache[0] = [
67
+ return openBlock(), createElementBlock("svg", _hoisted_1$5, [..._cache[0] || (_cache[0] = [
68
68
  createElementVNode("path", { d: "M512 320m-42.666667 0a42.666667 42.666667 0 1 0 85.333334 0 42.666667 42.666667 0 1 0-85.333334 0Z" }, null, -1),
69
69
  createElementVNode("path", { d: "M512 437.333333c-17.066667 0-32 14.933333-32 32v234.666667c0 17.066667 14.933333 32 32 32s32-14.933333 32-32V469.333333c0-17.066667-14.933333-32-32-32z" }, null, -1)
70
- ]));
70
+ ])]);
71
71
  }
72
72
  const warnTip = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$2]]);
73
73
  const _sfc_main$4 = {};
@@ -77,9 +77,9 @@ const _hoisted_1$4 = {
77
77
  xmlns: "http://www.w3.org/2000/svg"
78
78
  };
79
79
  function _sfc_render$1(_ctx, _cache) {
80
- return openBlock(), createElementBlock("svg", _hoisted_1$4, _cache[0] || (_cache[0] = [
80
+ return openBlock(), createElementBlock("svg", _hoisted_1$4, [..._cache[0] || (_cache[0] = [
81
81
  createElementVNode("path", { d: "M800 625.066667V448c0-117.333333-70.4-217.6-170.666667-262.4-4.266667-61.866667-55.466667-110.933333-117.333333-110.933333s-113.066667 49.066667-117.333333 110.933333c-100.266667 44.8-170.666667 145.066667-170.666667 262.4v177.066667c-57.6 46.933333-85.333333 110.933333-85.333333 185.6 0 17.066667 14.933333 32 32 32h206.933333c14.933333 61.866667 70.4 106.666667 134.4 106.666666s119.466667-44.8 134.4-106.666666H853.333333c17.066667 0 32-14.933333 32-32 0-76.8-27.733333-138.666667-85.333333-185.6zM512 138.666667c19.2 0 36.266667 10.666667 44.8 25.6-14.933333-2.133333-29.866667-4.266667-44.8-4.266667-14.933333 0-29.866667 2.133333-44.8 4.266667 8.533333-14.933333 25.6-25.6 44.8-25.6z m0 746.666666c-29.866667 0-55.466667-17.066667-66.133333-42.666666h134.4c-12.8 25.6-38.4 42.666667-68.266667 42.666666z m-307.2-106.666666c6.4-46.933333 29.866667-83.2 70.4-113.066667 8.533333-6.4 12.8-14.933333 12.8-25.6v-192c0-123.733333 100.266667-224 224-224S736 324.266667 736 448v192c0 10.666667 4.266667 19.2 12.8 25.6 40.533333 29.866667 64 66.133333 70.4 113.066667H204.8z" }, null, -1)
82
- ]));
82
+ ])]);
83
83
  }
84
84
  const infoTip = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$1]]);
85
85
  let cachedContainer;
@@ -93,7 +93,7 @@ const usePopperContainer = () => {
93
93
  }
94
94
  return { container: cachedContainer };
95
95
  };
96
- const _hoisted_1$3 = { class: "pointer-events-none fixed right-0 left-0 bottom-0 top-4 z-2000 space-y-5" };
96
+ const _hoisted_1$3 = { class: "pointer-events-none fixed right-0 left-0 bottom-0 top-4 z-[3000] space-y-5" };
97
97
  const _hoisted_2$1 = { class: "pointer-events-auto inline-flex items-center space-x-3 bg-white p-3 text-sm text-word3 drop-shadow" };
98
98
  const _hoisted_3$1 = { class: "flex-1" };
99
99
  const _hoisted_4$1 = ["onClick"];
@@ -115,6 +115,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
115
115
  msg.content = options.content ?? msg.content;
116
116
  msg.duration = options.duration ?? msg.duration;
117
117
  msg.showClose = options.showClose ?? msg.showClose;
118
+ msg.type = options.type ?? msg.type;
118
119
  resetTimer(msg);
119
120
  return;
120
121
  }
@@ -345,11 +346,233 @@ const _hoisted_1$2 = {
345
346
  xmlns: "http://www.w3.org/2000/svg"
346
347
  };
347
348
  function _sfc_render(_ctx, _cache) {
348
- return openBlock(), createElementBlock("svg", _hoisted_1$2, _cache[0] || (_cache[0] = [
349
+ return openBlock(), createElementBlock("svg", _hoisted_1$2, [..._cache[0] || (_cache[0] = [
349
350
  createElementVNode("path", { d: "M512 74.666667c241.066667 0 437.333333 196.266667 437.333333 437.333333S753.066667 949.333333 512 949.333333 74.666667 753.066667 74.666667 512 270.933333 74.666667 512 74.666667z m0 341.333333c-17.066667 0-32 14.933333-32 32v300.8c2.133333 17.066667 14.933333 29.866667 32 29.866667s32-14.933333 32-32V445.866667c-2.133333-17.066667-14.933333-29.866667-32-29.866667z m0-160c-23.466667 0-42.666667 19.2-42.666667 42.666667s19.2 42.666667 42.666667 42.666666 42.666667-19.2 42.666667-42.666666-19.2-42.666667-42.666667-42.666667z" }, null, -1)
350
- ]));
351
+ ])]);
351
352
  }
352
353
  const tipIcon = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render]]);
354
+ function debounce(func, wait) {
355
+ let timeout;
356
+ return function() {
357
+ const context = this;
358
+ const args = arguments;
359
+ clearTimeout(timeout);
360
+ timeout = setTimeout(function() {
361
+ func.apply(context, args);
362
+ }, wait);
363
+ };
364
+ }
365
+ function throttle(func, wait) {
366
+ let timeout;
367
+ return function() {
368
+ const context = this;
369
+ const args = arguments;
370
+ if (!timeout) {
371
+ timeout = setTimeout(function() {
372
+ timeout = null;
373
+ func.apply(context, args);
374
+ }, wait);
375
+ }
376
+ };
377
+ }
378
+ const usePotion = (baseDom, aimDom, set) => {
379
+ let left = 0;
380
+ let top = 0;
381
+ let arrowleft = 0;
382
+ let arrowtop = 0;
383
+ let exchange = false;
384
+ if (!baseDom || !aimDom) {
385
+ return {
386
+ Top: top,
387
+ Left: left,
388
+ arrowLeft: arrowleft,
389
+ arrowTop: arrowtop,
390
+ exChange: exchange
391
+ };
392
+ }
393
+ const { left: baseLeft, right, bottom, top: baseTop, width: baseWidth, height: baseHeight } = baseDom.getBoundingClientRect();
394
+ const { height: aimHeight, width: aimWidth, top: aimTop } = aimDom.getBoundingClientRect();
395
+ const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
396
+ const scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
397
+ switch (set == null ? void 0 : set.position) {
398
+ case "bottomleft":
399
+ case "bottommiddle":
400
+ case "bottomright":
401
+ top = scrollTop + bottom;
402
+ break;
403
+ case "topleft":
404
+ case "topmiddle":
405
+ case "topright":
406
+ top = scrollTop + baseTop - aimHeight;
407
+ break;
408
+ case "centerleft":
409
+ case "centerright":
410
+ top = scrollTop + baseTop + (baseHeight - aimHeight) / 2;
411
+ arrowtop = aimHeight / 2 - 5;
412
+ break;
413
+ }
414
+ switch (set == null ? void 0 : set.position) {
415
+ case "topleft":
416
+ case "bottomleft":
417
+ left = scrollLeft + baseLeft;
418
+ arrowleft = (right - baseLeft) / 2;
419
+ break;
420
+ case "topmiddle":
421
+ case "bottommiddle":
422
+ left = scrollLeft + baseLeft + (right - baseLeft - aimWidth) / 2;
423
+ arrowleft = aimWidth / 2 - 5;
424
+ break;
425
+ case "topright":
426
+ case "bottomright":
427
+ left = scrollLeft + right - aimWidth;
428
+ arrowleft = aimWidth - baseWidth + baseWidth / 2 - 5;
429
+ break;
430
+ case "centerleft":
431
+ left = scrollLeft + baseLeft - aimWidth;
432
+ arrowleft = aimWidth - 5;
433
+ break;
434
+ case "centerright":
435
+ left = scrollLeft + right;
436
+ arrowleft = -5;
437
+ break;
438
+ }
439
+ if (aimHeight + 20 < window.innerHeight) {
440
+ if (top + aimHeight + 10 > scrollTop + window.innerHeight) {
441
+ switch (set == null ? void 0 : set.position) {
442
+ case "bottommiddle":
443
+ case "bottomleft":
444
+ case "bottomright":
445
+ exchange = true;
446
+ top = scrollTop + baseTop - aimHeight - 24;
447
+ break;
448
+ case "centerleft":
449
+ case "centerright":
450
+ top = scrollTop + window.innerHeight - aimHeight - 10;
451
+ arrowtop = baseTop - aimTop + baseHeight / 2 - 10;
452
+ break;
453
+ }
454
+ }
455
+ if (top - scrollTop < 0) {
456
+ switch (set == null ? void 0 : set.position) {
457
+ case "topmiddle":
458
+ case "topleft":
459
+ case "topright":
460
+ exchange = true;
461
+ top = scrollTop + bottom + 24;
462
+ break;
463
+ case "centerleft":
464
+ case "centerright":
465
+ top = 10 + scrollTop;
466
+ arrowtop = baseTop + baseHeight / 2 - 10;
467
+ break;
468
+ }
469
+ }
470
+ }
471
+ return {
472
+ Top: top,
473
+ Left: left,
474
+ arrowLeft: arrowleft,
475
+ arrowTop: arrowtop,
476
+ exChange: exchange
477
+ };
478
+ };
479
+ function getNewArray(array, subGroupLength) {
480
+ let index2 = 0;
481
+ const newArray = [];
482
+ while (index2 < array.length) {
483
+ newArray.push(array.slice(index2, index2 += subGroupLength));
484
+ }
485
+ return newArray;
486
+ }
487
+ const formatDate = (date) => {
488
+ if (!date)
489
+ return "";
490
+ const d = date instanceof Date ? date : new Date(date);
491
+ if (isNaN(d.getTime()))
492
+ return "";
493
+ return [
494
+ d.getFullYear(),
495
+ pad(d.getMonth() + 1),
496
+ pad(d.getDate())
497
+ ].join("-");
498
+ };
499
+ const pad = (n) => n.toString().padStart(2, "0");
500
+ const checkinputDate = (input, success, fail) => {
501
+ try {
502
+ input = input.trim();
503
+ if (!input) {
504
+ success(null);
505
+ return;
506
+ }
507
+ const dateRegex = /^(\d{4})[-/\.](\d{1,2})[-/\.]?(\d{1,2})?$/;
508
+ if (!dateRegex.test(input)) {
509
+ throw new Error("日期格式错误");
510
+ }
511
+ const [, yearStr, monthStr, dayStr] = input.match(dateRegex);
512
+ const year = parseInt(yearStr, 10);
513
+ const month = parseInt(monthStr, 10);
514
+ const day = dayStr ? parseInt(dayStr, 10) : 1;
515
+ if (year < 1970 || year > 2100)
516
+ throw new Error("年份超出范围");
517
+ if (month < 1 || month > 12)
518
+ throw new Error("无效月份");
519
+ const lastDayOfMonth = new Date(year, month, 0).getDate();
520
+ const safeDay = Math.min(day, lastDayOfMonth);
521
+ if (safeDay !== day) {
522
+ fail();
523
+ return;
524
+ }
525
+ const newDate = new Date(year, month - 1, safeDay);
526
+ if (newDate.getFullYear() !== year || newDate.getMonth() + 1 !== month || newDate.getDate() !== safeDay) {
527
+ fail();
528
+ return;
529
+ }
530
+ const formatted = formatDate(newDate);
531
+ success(formatted);
532
+ } catch (error) {
533
+ fail();
534
+ }
535
+ };
536
+ const on = function() {
537
+ return function(element, event, handler) {
538
+ if (element && event && handler) {
539
+ element.addEventListener(event, handler, false);
540
+ }
541
+ };
542
+ }();
543
+ const off = function() {
544
+ return function(element, event, handler) {
545
+ if (element && event) {
546
+ element.removeEventListener(event, handler, false);
547
+ }
548
+ };
549
+ }();
550
+ const useResizeObserver = (callback) => {
551
+ let observer = null;
552
+ const observe = (el) => {
553
+ observer = new ResizeObserver(callback);
554
+ observer.observe(el);
555
+ };
556
+ const unobserve = (el) => {
557
+ observer == null ? void 0 : observer.unobserve(el);
558
+ observer == null ? void 0 : observer.disconnect();
559
+ };
560
+ return { observe, unobserve };
561
+ };
562
+ let globalZIndex = 1e3;
563
+ const zIndexManager = {
564
+ getNextZIndex() {
565
+ return ++globalZIndex;
566
+ },
567
+ getCurrentZIndex() {
568
+ return globalZIndex;
569
+ },
570
+ setZIndex(zIndex) {
571
+ if (zIndex > globalZIndex) {
572
+ globalZIndex = zIndex;
573
+ }
574
+ }
575
+ };
353
576
  const _hoisted_1$1 = { class: "z-20 w-96 rounded bg-white px-4 pt-8 pb-9 drop-shadow mt-[20vh] mx-auto" };
354
577
  const _hoisted_2 = { class: "flex justify-center" };
355
578
  const _hoisted_3 = { class: "h-6 w-6 text-yellow-400" };
@@ -371,6 +594,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
371
594
  },
372
595
  setup(__props, { expose: __expose }) {
373
596
  const props = __props;
597
+ const currentZIndex = ref(zIndexManager.getNextZIndex());
374
598
  const vEsc = createEscapeDirective({
375
599
  onEscape: () => {
376
600
  props.onClose();
@@ -380,6 +604,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
380
604
  const stopwatch = watch(
381
605
  () => props.showAlert,
382
606
  (newVal) => {
607
+ if (newVal) {
608
+ currentZIndex.value = zIndexManager.getNextZIndex();
609
+ }
383
610
  visible.value = newVal;
384
611
  stopwatch();
385
612
  }
@@ -395,29 +622,30 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
395
622
  default: withCtx(() => [
396
623
  visible.value ? withDirectives((openBlock(), createElementBlock("div", {
397
624
  key: 0,
398
- class: normalizeClass(["fixed top-0 right-0 left-0 bottom-0 z-1000", { "bg-black bg-opacity-30": bgshow.value }]),
399
- onClick: _cache[2] || (_cache[2] = withModifiers(($event) => props.onClose(), ["self"]))
625
+ class: normalizeClass(["fixed top-0 right-0 left-0 bottom-0", { "bg-black bg-opacity-30": bgshow.value }]),
626
+ style: normalizeStyle({ "z-index": currentZIndex.value }),
627
+ onClick: _cache[2] || (_cache[2] = withModifiers(($event) => __props.onClose(), ["self"]))
400
628
  }, [
401
629
  createElementVNode("div", _hoisted_1$1, [
402
630
  createElementVNode("div", _hoisted_2, [
403
631
  createElementVNode("div", _hoisted_3, [
404
632
  createVNode(tipIcon, { class: "w-full h-full" })
405
633
  ]),
406
- createElementVNode("div", _hoisted_4, toDisplayString(props.title), 1)
634
+ createElementVNode("div", _hoisted_4, toDisplayString(__props.title), 1)
407
635
  ]),
408
- createElementVNode("div", _hoisted_5, toDisplayString(props.content), 1),
636
+ createElementVNode("div", _hoisted_5, toDisplayString(__props.content), 1),
409
637
  createElementVNode("div", _hoisted_6, [
410
638
  createElementVNode("div", {
411
639
  class: "h-8 px-4 rounded border text-word6 inline-block leading-8 cursor-pointer",
412
- onClick: _cache[0] || (_cache[0] = ($event) => props.onClose())
413
- }, toDisplayString(props.cancelword), 1),
640
+ onClick: _cache[0] || (_cache[0] = ($event) => __props.onClose())
641
+ }, toDisplayString(__props.cancelword), 1),
414
642
  createElementVNode("div", {
415
643
  class: "h-8 px-4 rounded bg-blue-light text-white inline-block leading-8 cursor-pointer",
416
- onClick: _cache[1] || (_cache[1] = ($event) => props.onConfirm())
417
- }, toDisplayString(props.sureword), 1)
644
+ onClick: _cache[1] || (_cache[1] = ($event) => __props.onConfirm())
645
+ }, toDisplayString(__props.sureword), 1)
418
646
  ])
419
647
  ])
420
- ], 2)), [
648
+ ], 6)), [
421
649
  [unref(vEsc), visible.value]
422
650
  ]) : createCommentVNode("", true)
423
651
  ]),
@@ -484,7 +712,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
484
712
  setup(__props) {
485
713
  return (_ctx, _cache) => {
486
714
  return openBlock(), createElementBlock("div", {
487
- class: normalizeClass(["top-0 right-0 left-0 bottom-0 z-50 flex h-full w-full flex-col items-center justify-center bg-white bg-opacity-90", _ctx.fullScreen ? "fixed" : "absolute"])
715
+ class: normalizeClass(["top-0 right-0 left-0 bottom-0 z-50 flex h-full w-full flex-col items-center justify-center bg-white bg-opacity-90", __props.fullScreen ? "fixed" : "absolute"])
488
716
  }, [
489
717
  _cache[0] || (_cache[0] = createElementVNode("div", { class: "relative flex justify-center w-10 h-10" }, [
490
718
  createElementVNode("svg", {
@@ -502,7 +730,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
502
730
  })
503
731
  ])
504
732
  ], -1)),
505
- createElementVNode("div", _hoisted_1, toDisplayString(_ctx.loadingText), 1)
733
+ createElementVNode("div", _hoisted_1, toDisplayString(__props.loadingText), 1)
506
734
  ], 2);
507
735
  };
508
736
  }
@@ -656,214 +884,6 @@ const createArrowKeysDirective = (options) => {
656
884
  }
657
885
  };
658
886
  };
659
- function debounce(func, wait) {
660
- let timeout;
661
- return function() {
662
- const context = this;
663
- const args = arguments;
664
- clearTimeout(timeout);
665
- timeout = setTimeout(function() {
666
- func.apply(context, args);
667
- }, wait);
668
- };
669
- }
670
- function throttle(func, wait) {
671
- let timeout;
672
- return function() {
673
- const context = this;
674
- const args = arguments;
675
- if (!timeout) {
676
- timeout = setTimeout(function() {
677
- timeout = null;
678
- func.apply(context, args);
679
- }, wait);
680
- }
681
- };
682
- }
683
- const usePotion = (baseDom, aimDom, set) => {
684
- let left = 0;
685
- let top = 0;
686
- let arrowleft = 0;
687
- let arrowtop = 0;
688
- let exchange = false;
689
- if (!baseDom || !aimDom) {
690
- return {
691
- Top: top,
692
- Left: left,
693
- arrowLeft: arrowleft,
694
- arrowTop: arrowtop,
695
- exChange: exchange
696
- };
697
- }
698
- const { left: baseLeft, right, bottom, top: baseTop, width: baseWidth, height: baseHeight } = baseDom.getBoundingClientRect();
699
- const { height: aimHeight, width: aimWidth, top: aimTop } = aimDom.getBoundingClientRect();
700
- const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
701
- const scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
702
- switch (set == null ? void 0 : set.position) {
703
- case "bottomleft":
704
- case "bottommiddle":
705
- case "bottomright":
706
- top = scrollTop + bottom;
707
- break;
708
- case "topleft":
709
- case "topmiddle":
710
- case "topright":
711
- top = scrollTop + baseTop - aimHeight;
712
- break;
713
- case "centerleft":
714
- case "centerright":
715
- top = scrollTop + baseTop + (baseHeight - aimHeight) / 2;
716
- arrowtop = aimHeight / 2 - 5;
717
- break;
718
- }
719
- switch (set == null ? void 0 : set.position) {
720
- case "topleft":
721
- case "bottomleft":
722
- left = scrollLeft + baseLeft;
723
- arrowleft = (right - baseLeft) / 2;
724
- break;
725
- case "topmiddle":
726
- case "bottommiddle":
727
- left = scrollLeft + baseLeft + (right - baseLeft - aimWidth) / 2;
728
- arrowleft = aimWidth / 2 - 5;
729
- break;
730
- case "topright":
731
- case "bottomright":
732
- left = scrollLeft + right - aimWidth;
733
- arrowleft = aimWidth - baseWidth + baseWidth / 2 - 5;
734
- break;
735
- case "centerleft":
736
- left = scrollLeft + baseLeft - aimWidth;
737
- arrowleft = aimWidth - 5;
738
- break;
739
- case "centerright":
740
- left = scrollLeft + right;
741
- arrowleft = -5;
742
- break;
743
- }
744
- if (aimHeight + 20 < window.innerHeight) {
745
- if (top + aimHeight + 10 > scrollTop + window.innerHeight) {
746
- switch (set == null ? void 0 : set.position) {
747
- case "bottommiddle":
748
- case "bottomleft":
749
- case "bottomright":
750
- exchange = true;
751
- top = scrollTop + baseTop - aimHeight - 24;
752
- break;
753
- case "centerleft":
754
- case "centerright":
755
- top = scrollTop + window.innerHeight - aimHeight - 10;
756
- arrowtop = baseTop - aimTop + baseHeight / 2 - 10;
757
- break;
758
- }
759
- }
760
- if (top - scrollTop < 0) {
761
- switch (set == null ? void 0 : set.position) {
762
- case "topmiddle":
763
- case "topleft":
764
- case "topright":
765
- exchange = true;
766
- top = scrollTop + bottom + 24;
767
- break;
768
- case "centerleft":
769
- case "centerright":
770
- top = 10 + scrollTop;
771
- arrowtop = baseTop + baseHeight / 2 - 10;
772
- break;
773
- }
774
- }
775
- }
776
- return {
777
- Top: top,
778
- Left: left,
779
- arrowLeft: arrowleft,
780
- arrowTop: arrowtop,
781
- exChange: exchange
782
- };
783
- };
784
- function getNewArray(array, subGroupLength) {
785
- let index2 = 0;
786
- const newArray = [];
787
- while (index2 < array.length) {
788
- newArray.push(array.slice(index2, index2 += subGroupLength));
789
- }
790
- return newArray;
791
- }
792
- const formatDate = (date) => {
793
- if (!date)
794
- return "";
795
- const d = date instanceof Date ? date : new Date(date);
796
- if (isNaN(d.getTime()))
797
- return "";
798
- return [
799
- d.getFullYear(),
800
- pad(d.getMonth() + 1),
801
- pad(d.getDate())
802
- ].join("-");
803
- };
804
- const pad = (n) => n.toString().padStart(2, "0");
805
- const checkinputDate = (input, success, fail) => {
806
- try {
807
- input = input.trim();
808
- if (!input) {
809
- success(null);
810
- return;
811
- }
812
- const dateRegex = /^(\d{4})[-/\.](\d{1,2})[-/\.]?(\d{1,2})?$/;
813
- if (!dateRegex.test(input)) {
814
- throw new Error("日期格式错误");
815
- }
816
- const [, yearStr, monthStr, dayStr] = input.match(dateRegex);
817
- const year = parseInt(yearStr, 10);
818
- const month = parseInt(monthStr, 10);
819
- const day = dayStr ? parseInt(dayStr, 10) : 1;
820
- if (year < 1970 || year > 2100)
821
- throw new Error("年份超出范围");
822
- if (month < 1 || month > 12)
823
- throw new Error("无效月份");
824
- const lastDayOfMonth = new Date(year, month, 0).getDate();
825
- const safeDay = Math.min(day, lastDayOfMonth);
826
- if (safeDay !== day) {
827
- fail();
828
- return;
829
- }
830
- const newDate = new Date(year, month - 1, safeDay);
831
- if (newDate.getFullYear() !== year || newDate.getMonth() + 1 !== month || newDate.getDate() !== safeDay) {
832
- fail();
833
- return;
834
- }
835
- const formatted = formatDate(newDate);
836
- success(formatted);
837
- } catch (error) {
838
- fail();
839
- }
840
- };
841
- const on = function() {
842
- return function(element, event, handler) {
843
- if (element && event && handler) {
844
- element.addEventListener(event, handler, false);
845
- }
846
- };
847
- }();
848
- const off = function() {
849
- return function(element, event, handler) {
850
- if (element && event) {
851
- element.removeEventListener(event, handler, false);
852
- }
853
- };
854
- }();
855
- const useResizeObserver = (callback) => {
856
- let observer = null;
857
- const observe = (el) => {
858
- observer = new ResizeObserver(callback);
859
- observer.observe(el);
860
- };
861
- const unobserve = (el) => {
862
- observer == null ? void 0 : observer.unobserve(el);
863
- observer == null ? void 0 : observer.disconnect();
864
- };
865
- return { observe, unobserve };
866
- };
867
887
  const DEFAULT_THROTTLE_WAIT = 60;
868
888
  const createDraggableDirective = (options) => {
869
889
  const config = {
@@ -1217,27 +1237,28 @@ const index = {
1217
1237
  }
1218
1238
  };
1219
1239
  export {
1220
- LibPagination as A,
1221
- LibBadge as B,
1240
+ LibMenu as A,
1241
+ LibPagination as B,
1222
1242
  CloseIcon as C,
1223
- LibPopover as D,
1224
- LibNumberInput as E,
1225
- LibRadioBox as F,
1226
- LibRadioGroup as G,
1227
- LibCheckGroup as H,
1228
- LibCheckBox as I,
1229
- LibUpload as J,
1230
- LibTabs as K,
1243
+ LibBadge as D,
1244
+ LibPopover as E,
1245
+ LibNumberInput as F,
1246
+ LibRadioBox as G,
1247
+ LibRadioGroup as H,
1248
+ LibCheckGroup as I,
1249
+ LibCheckBox as J,
1250
+ LibUpload as K,
1231
1251
  LibDialog as L,
1232
- LibTabsPane as M,
1233
- LibScrollBar as N,
1234
- MessageClass as O,
1235
- AlertFunction as P,
1236
- LibLoad as Q,
1237
- LibCarousel as R,
1238
- LibCarouselItem as S,
1239
- LibSwitch as T,
1240
- createLoadingDirective as U,
1252
+ LibTabs as M,
1253
+ LibTabsPane as N,
1254
+ LibScrollBar as O,
1255
+ MessageClass as P,
1256
+ AlertFunction as Q,
1257
+ LibLoad as R,
1258
+ LibCarousel as S,
1259
+ LibCarouselItem as T,
1260
+ LibSwitch as U,
1261
+ createLoadingDirective as V,
1241
1262
  _export_sfc as _,
1242
1263
  createArrowKeysDirective as a,
1243
1264
  createDraggableDirective as b,
@@ -1264,5 +1285,5 @@ export {
1264
1285
  LibImage as w,
1265
1286
  LibDatePicker as x,
1266
1287
  LibDatePickerRange as y,
1267
- LibMenu as z
1288
+ zIndexManager as z
1268
1289
  };