@opentiny/vue-hooks 3.26.0 → 3.28.0

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.
@@ -6,21 +6,21 @@ const x = ({
6
6
  watch: p,
7
7
  vm: o,
8
8
  api: r,
9
- props: d,
9
+ props: t,
10
10
  state: s,
11
- nextTick: t
11
+ nextTick: d
12
12
  }) => {
13
13
  l(() => {
14
14
  o._popupId = `popup-${I++}`, n.register(o._popupId, o);
15
15
  }), e(() => {
16
16
  n.deregister(o._popupId), n.closeModal(o._popupId);
17
17
  }), p(
18
- () => d.visible,
18
+ () => t.visible,
19
19
  (i) => {
20
20
  if (i) {
21
21
  if (o._opening)
22
22
  return;
23
- s.rendered ? r.open() : (s.rendered = !0, t(() => {
23
+ s.rendered ? r.open() : (s.rendered = !0, d(() => {
24
24
  r.open();
25
25
  }));
26
26
  } else
@@ -35,18 +35,18 @@ const x = ({
35
35
  if (T || l.opened)
36
36
  return;
37
37
  e._opening = !0;
38
- const s = e.$el, t = o.modal, i = o.zIndex;
39
- i && (n.zIndex = i), t && (e._closing && (n.closeModal(e._popupId), e._closing = !1), n.openModal(
38
+ const s = e.$el, d = o.modal, i = o.zIndex;
39
+ i && (n.zIndex = i), d && (e._closing && (n.closeModal(e._popupId), e._closing = !1), n.openModal(
40
40
  e._popupId,
41
41
  n.nextZIndex(),
42
42
  o.modalAppendToBody ? void 0 : s,
43
43
  o.modalClass,
44
- o.modalFade
44
+ !o.noAnimation
45
45
  ), o.lockScroll && (n.fixBodyBorder(), g(document.body, n.popLockClass))), getComputedStyle(s).position === "static" && (s.style.position = "absolute"), s.style.zIndex = n.nextZIndex().toString(), l.opened = !0, e._opening = !1;
46
- }, d = Number(o.openDelay);
47
- d > 0 ? e._openTimer = setTimeout(() => {
46
+ }, t = Number(o.openDelay);
47
+ t > 0 ? e._openTimer = setTimeout(() => {
48
48
  e._openTimer = null, r();
49
- }, d) : r();
49
+ }, t) : r();
50
50
  }, M = ({ state: l, vm: e }) => () => {
51
51
  e._openTimer !== null && (clearTimeout(e._openTimer), e._openTimer = null), clearTimeout(e._closeTimer);
52
52
  const p = () => {
@@ -56,13 +56,13 @@ const x = ({
56
56
  e._closeTimer = null, p();
57
57
  }, o) : p();
58
58
  }, m = (l) => {
59
- const { api: e, nextTick: p, onBeforeUnmount: o, onMounted: r, props: d, reactive: s, toRefs: t, vm: i, watch: u } = l, c = s({
59
+ const { api: e, nextTick: p, onBeforeUnmount: o, onMounted: r, props: t, reactive: s, toRefs: d, vm: i, watch: u } = l, c = s({
60
60
  opened: !1,
61
61
  rendered: !1
62
62
  });
63
- x({ onMounted: r, onBeforeUnmount: o, watch: u, vm: i, api: e, props: d, state: c, nextTick: p });
63
+ x({ onMounted: r, onBeforeUnmount: o, watch: u, vm: i, api: e, props: t, state: c, nextTick: p });
64
64
  const a = y({ state: c, vm: i }), _ = M({ state: c, vm: i });
65
- return { open: a, close: _, PopupManager: n, ...t(c) };
65
+ return { open: a, close: _, PopupManager: n, ...d(c) };
66
66
  };
67
67
  export {
68
68
  m as usePopup
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/vue-hooks",
3
- "version": "3.26.0",
3
+ "version": "3.28.0",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@floating-ui/dom": "^1.6.9",
14
- "@opentiny/utils": "~3.26.0"
14
+ "@opentiny/utils": "~3.28.0"
15
15
  },
16
16
  "devDependencies": {
17
17
  "typescript": "~5.3.3",
package/src/vue-popup.ts CHANGED
@@ -116,7 +116,7 @@ const openFn =
116
116
  PopupManager.nextZIndex(),
117
117
  props.modalAppendToBody ? undefined : dom,
118
118
  props.modalClass,
119
- props.modalFade
119
+ !props.noAnimation
120
120
  )
121
121
 
122
122
  if (props.lockScroll) {