ninemoon-ui 0.0.13 → 0.0.15

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/index.es.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import "vue";
2
- import { H, w, K, N, C, B, q, s, L, f, h, p, j, I, t, M, y, v, x, z, A, G, J, k, l, O, m, n, E, F, P, D, i } from "./js/index/index.js";
2
+ import { I, x, N, O, D, C, q, s, L, f, h, p, j, J, v, M, z, w, y, A, B, H, K, k, l, P, m, n, F, G, Q, E, i } from "./js/index/index.js";
3
3
  export {
4
- H as LibAlert,
5
- w as LibBadge,
6
- K as LibCarousel,
7
- N as LibCarouselItem,
8
- C as LibCheckBox,
9
- B as LibCheckGroup,
4
+ I as LibAlert,
5
+ x as LibBadge,
6
+ N as LibCarousel,
7
+ O as LibCarouselItem,
8
+ D as LibCheckBox,
9
+ C as LibCheckGroup,
10
10
  q as LibDatePicker,
11
11
  s as LibDatePickerRange,
12
12
  L as LibDialog,
@@ -14,24 +14,24 @@ export {
14
14
  h as LibFormLabel,
15
15
  p as LibImage,
16
16
  j as LibInput,
17
- I as LibLoad,
18
- t as LibMenu,
17
+ J as LibLoad,
18
+ v as LibMenu,
19
19
  M as LibMessage,
20
- y as LibNumberInput,
21
- v as LibPagination,
22
- x as LibPopover,
23
- z as LibRadioBox,
24
- A as LibRadioGroup,
25
- G as LibScrollBar,
26
- J as LibScrollLoad,
20
+ z as LibNumberInput,
21
+ w as LibPagination,
22
+ y as LibPopover,
23
+ A as LibRadioBox,
24
+ B as LibRadioGroup,
25
+ H as LibScrollBar,
26
+ K as LibScrollLoad,
27
27
  k as LibSelect,
28
28
  l as LibSelectOption,
29
- O as LibSwitch,
29
+ P as LibSwitch,
30
30
  m as LibTable,
31
31
  n as LibTableItem,
32
- E as LibTabs,
33
- F as LibTabsPane,
34
- P as LibTree,
35
- D as LibUpload,
32
+ F as LibTabs,
33
+ G as LibTabsPane,
34
+ Q as LibTree,
35
+ E as LibUpload,
36
36
  i as default
37
37
  };
package/dist/index.umd.js CHANGED
@@ -1845,7 +1845,7 @@
1845
1845
  };
1846
1846
  }
1847
1847
  const { left: baseLeft, right, bottom, top: baseTop, width: baseWidth, height: baseHeight } = baseDom.getBoundingClientRect();
1848
- const { height: aimHeight, width: aimWidth } = aimDom.getBoundingClientRect();
1848
+ const { height: aimHeight, width: aimWidth, top: aimTop } = aimDom.getBoundingClientRect();
1849
1849
  const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
1850
1850
  const scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
1851
1851
  switch (set == null ? void 0 : set.position) {
@@ -1861,7 +1861,7 @@
1861
1861
  break;
1862
1862
  case "centerleft":
1863
1863
  case "centerright":
1864
- top = scrollTop + baseTop + (bottom - baseTop - aimHeight) / 2;
1864
+ top = scrollTop + baseTop + (baseHeight - aimHeight) / 2;
1865
1865
  arrowtop = aimHeight / 2 - 5;
1866
1866
  break;
1867
1867
  }
@@ -1890,34 +1890,36 @@
1890
1890
  arrowleft = -5;
1891
1891
  break;
1892
1892
  }
1893
- if (top + aimHeight + 10 > window.innerHeight) {
1894
- switch (set == null ? void 0 : set.position) {
1895
- case "bottommiddle":
1896
- case "bottomleft":
1897
- case "bottomright":
1898
- exchange = true;
1899
- top = scrollTop + baseTop - aimHeight - 24;
1900
- break;
1901
- case "centerleft":
1902
- case "centerright":
1903
- top = scrollTop + window.innerHeight - aimHeight - 10;
1904
- arrowtop = baseTop + baseHeight / 2 - 10;
1905
- break;
1893
+ if (aimHeight + 20 < window.innerHeight) {
1894
+ if (top + aimHeight + 10 > scrollTop + window.innerHeight) {
1895
+ switch (set == null ? void 0 : set.position) {
1896
+ case "bottommiddle":
1897
+ case "bottomleft":
1898
+ case "bottomright":
1899
+ exchange = true;
1900
+ top = scrollTop + baseTop - aimHeight - 24;
1901
+ break;
1902
+ case "centerleft":
1903
+ case "centerright":
1904
+ top = scrollTop + window.innerHeight - aimHeight - 10;
1905
+ arrowtop = baseTop - aimTop + baseHeight / 2 - 10;
1906
+ break;
1907
+ }
1906
1908
  }
1907
- }
1908
- if (top < 0) {
1909
- switch (set == null ? void 0 : set.position) {
1910
- case "topmiddle":
1911
- case "topleft":
1912
- case "topright":
1913
- exchange = true;
1914
- top = scrollTop + bottom + 24;
1915
- break;
1916
- case "centerleft":
1917
- case "centerright":
1918
- top = 10;
1919
- arrowtop = baseTop + baseHeight / 2 - 10;
1920
- break;
1909
+ if (top - scrollTop < 0 && scrollTop) {
1910
+ switch (set == null ? void 0 : set.position) {
1911
+ case "topmiddle":
1912
+ case "topleft":
1913
+ case "topright":
1914
+ exchange = true;
1915
+ top = scrollTop + bottom + 24;
1916
+ break;
1917
+ case "centerleft":
1918
+ case "centerright":
1919
+ top = 10 + scrollTop;
1920
+ arrowtop = baseTop + baseHeight / 2 - 10;
1921
+ break;
1922
+ }
1921
1923
  }
1922
1924
  }
1923
1925
  return {
@@ -3060,7 +3062,7 @@
3060
3062
  mouseX = e.pageX;
3061
3063
  mouseY = e.pageY;
3062
3064
  ImgIsMoving.value = true;
3063
- el._vueMove_ = debounce(setMoveHandle, 60);
3065
+ el._vueMove_ = throttle(setMoveHandle, 60);
3064
3066
  window.addEventListener("mousemove", el._vueMove_);
3065
3067
  }
3066
3068
  function upHandle() {
@@ -4732,7 +4734,6 @@
4732
4734
  }
4733
4735
  };
4734
4736
  const closeCenter = () => {
4735
- console.log(1111);
4736
4737
  if (props.beforeHidden) {
4737
4738
  props.beforeHidden(hideHandle);
4738
4739
  } else {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, watch, openBlock, createElementBlock, Fragment, createElementVNode, createCommentVNode, renderSlot, createBlock, Teleport, createVNode, Transition, withCtx, withDirectives, withModifiers, normalizeStyle, normalizeClass, nextTick } from "vue";
2
- import { d as debounce } from "../index/index.js";
2
+ import { t as throttle } from "../index/index.js";
3
3
  const _hoisted_1 = { class: "tdd-relative tdd-inline-block tdd-h-full tdd-w-full" };
4
4
  const _hoisted_2 = ["src"];
5
5
  const _hoisted_3 = /* @__PURE__ */ createElementVNode("svg", {
@@ -109,7 +109,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
109
109
  mouseX = e.pageX;
110
110
  mouseY = e.pageY;
111
111
  ImgIsMoving.value = true;
112
- el._vueMove_ = debounce(setMoveHandle, 60);
112
+ el._vueMove_ = throttle(setMoveHandle, 60);
113
113
  window.addEventListener("mousemove", el._vueMove_);
114
114
  }
115
115
  function upHandle() {
@@ -575,7 +575,7 @@ const usePotion = (baseDom, aimDom, set) => {
575
575
  };
576
576
  }
577
577
  const { left: baseLeft, right, bottom, top: baseTop, width: baseWidth, height: baseHeight } = baseDom.getBoundingClientRect();
578
- const { height: aimHeight, width: aimWidth } = aimDom.getBoundingClientRect();
578
+ const { height: aimHeight, width: aimWidth, top: aimTop } = aimDom.getBoundingClientRect();
579
579
  const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
580
580
  const scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
581
581
  switch (set == null ? void 0 : set.position) {
@@ -591,7 +591,7 @@ const usePotion = (baseDom, aimDom, set) => {
591
591
  break;
592
592
  case "centerleft":
593
593
  case "centerright":
594
- top = scrollTop + baseTop + (bottom - baseTop - aimHeight) / 2;
594
+ top = scrollTop + baseTop + (baseHeight - aimHeight) / 2;
595
595
  arrowtop = aimHeight / 2 - 5;
596
596
  break;
597
597
  }
@@ -620,34 +620,36 @@ const usePotion = (baseDom, aimDom, set) => {
620
620
  arrowleft = -5;
621
621
  break;
622
622
  }
623
- if (top + aimHeight + 10 > window.innerHeight) {
624
- switch (set == null ? void 0 : set.position) {
625
- case "bottommiddle":
626
- case "bottomleft":
627
- case "bottomright":
628
- exchange = true;
629
- top = scrollTop + baseTop - aimHeight - 24;
630
- break;
631
- case "centerleft":
632
- case "centerright":
633
- top = scrollTop + window.innerHeight - aimHeight - 10;
634
- arrowtop = baseTop + baseHeight / 2 - 10;
635
- break;
623
+ if (aimHeight + 20 < window.innerHeight) {
624
+ if (top + aimHeight + 10 > scrollTop + window.innerHeight) {
625
+ switch (set == null ? void 0 : set.position) {
626
+ case "bottommiddle":
627
+ case "bottomleft":
628
+ case "bottomright":
629
+ exchange = true;
630
+ top = scrollTop + baseTop - aimHeight - 24;
631
+ break;
632
+ case "centerleft":
633
+ case "centerright":
634
+ top = scrollTop + window.innerHeight - aimHeight - 10;
635
+ arrowtop = baseTop - aimTop + baseHeight / 2 - 10;
636
+ break;
637
+ }
636
638
  }
637
- }
638
- if (top < 0) {
639
- switch (set == null ? void 0 : set.position) {
640
- case "topmiddle":
641
- case "topleft":
642
- case "topright":
643
- exchange = true;
644
- top = scrollTop + bottom + 24;
645
- break;
646
- case "centerleft":
647
- case "centerright":
648
- top = 10;
649
- arrowtop = baseTop + baseHeight / 2 - 10;
650
- break;
639
+ if (top - scrollTop < 0 && scrollTop) {
640
+ switch (set == null ? void 0 : set.position) {
641
+ case "topmiddle":
642
+ case "topleft":
643
+ case "topright":
644
+ exchange = true;
645
+ top = scrollTop + bottom + 24;
646
+ break;
647
+ case "centerleft":
648
+ case "centerright":
649
+ top = 10 + scrollTop;
650
+ arrowtop = baseTop + baseHeight / 2 - 10;
651
+ break;
652
+ }
651
653
  }
652
654
  }
653
655
  return {
@@ -825,22 +827,23 @@ const index = {
825
827
  }
826
828
  };
827
829
  export {
828
- LibRadioGroup as A,
829
- LibCheckGroup as B,
830
- LibCheckBox as C,
831
- LibUpload as D,
832
- LibTabs as E,
833
- LibTabsPane as F,
834
- LibScrollBar as G,
835
- AlertCom as H,
836
- LibLoad as I,
837
- scrolllead as J,
838
- LibCarousel as K,
830
+ LibRadioBox as A,
831
+ LibRadioGroup as B,
832
+ LibCheckGroup as C,
833
+ LibCheckBox as D,
834
+ LibUpload as E,
835
+ LibTabs as F,
836
+ LibTabsPane as G,
837
+ LibScrollBar as H,
838
+ AlertCom as I,
839
+ LibLoad as J,
840
+ scrolllead as K,
839
841
  LibDialog as L,
840
842
  MessageCom as M,
841
- LibCarouselItem as N,
842
- LibSwitch as O,
843
- LibTree as P,
843
+ LibCarousel as N,
844
+ LibCarouselItem as O,
845
+ LibSwitch as P,
846
+ LibTree as Q,
844
847
  off as a,
845
848
  getScrollWidth as b,
846
849
  createAndAppendElementWithId as c,
@@ -860,11 +863,11 @@ export {
860
863
  LibDatePicker as q,
861
864
  removeResizeListener as r,
862
865
  LibDatePickerRange as s,
863
- LibMenu as t,
866
+ throttle as t,
864
867
  usePotion as u,
865
- LibPagination as v,
866
- LibBadge as w,
867
- LibPopover as x,
868
- LibNumberInput as y,
869
- LibRadioBox as z
868
+ LibMenu as v,
869
+ LibPagination as w,
870
+ LibBadge as x,
871
+ LibPopover as y,
872
+ LibNumberInput as z
870
873
  };
@@ -164,7 +164,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
164
164
  }
165
165
  };
166
166
  const closeCenter = () => {
167
- console.log(1111);
168
167
  if (props.beforeHidden) {
169
168
  props.beforeHidden(hideHandle);
170
169
  } else {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninemoon-ui",
3
3
  "private": false,
4
- "version": "0.0.13",
4
+ "version": "0.0.15",
5
5
  "author": "zhuboy",
6
6
  "keywords": [
7
7
  "vue3",