@dazhicheng/ui 1.6.45 → 1.6.47

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.
@@ -1,8 +1,8 @@
1
1
  import { isArray as z, isString as L, invokeArrayFns as I } from "../../node_modules/.pnpm/@vue_shared@3.5.34/node_modules/@vue/shared/dist/shared.esm-bundler.js";
2
- import { getCurrentInstance as P, watch as k, onMounted as W, onUpdated as j, onBeforeUnmount as G, isVNode as J, cloneVNode as O, setTransitionHooks as Q } from "vue";
2
+ import { getCurrentInstance as P, watch as b, onMounted as W, onUpdated as j, onBeforeUnmount as G, isVNode as J, cloneVNode as O, setTransitionHooks as Q } from "vue";
3
3
  import { isAsyncWrapper as X } from "./core/apiAsyncComponent.js";
4
4
  import { getComponentName as w } from "./core/component.js";
5
- import { MoveType as H, queuePostRenderEffect as v } from "./core/renderer.js";
5
+ import { MoveType as H, queuePostRenderEffect as A } from "./core/renderer.js";
6
6
  import { isSuspense as Y } from "./core/Suspense.js";
7
7
  import { invokeVNodeHook as M } from "./core/vnode.js";
8
8
  const Z = {
@@ -18,20 +18,20 @@ const Z = {
18
18
  includeKey: [String, RegExp, Array],
19
19
  excludeKey: [String, RegExp, Array]
20
20
  },
21
- setup(o, { slots: r, expose: y }) {
22
- const d = P(), E = d.ctx, a = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Set();
23
- let u = null;
21
+ setup(o, { slots: r, expose: h }) {
22
+ const d = P(), x = d.ctx, c = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Set();
23
+ let a = null;
24
24
  const f = d.suspense, {
25
25
  renderer: {
26
26
  p: U,
27
- m: N,
27
+ m: C,
28
28
  um: B,
29
29
  o: { createElement: D }
30
30
  }
31
- } = E, q = D("div");
32
- E.activate = (e, n, t, i, c) => {
31
+ } = x, q = D("div");
32
+ x.activate = (e, n, t, i, u) => {
33
33
  const s = e.component;
34
- N(e, n, t, H.ENTER, f), U(
34
+ C(e, n, t, H.ENTER, f), U(
35
35
  s.vnode,
36
36
  e,
37
37
  n,
@@ -40,100 +40,100 @@ const Z = {
40
40
  f,
41
41
  i,
42
42
  e.slotScopeIds,
43
- c
44
- ), v(() => {
43
+ u
44
+ ), A(() => {
45
45
  s.isDeactivated = !1, s.a && I(s.a);
46
46
  const g = e.props && e.props.onVnodeMounted;
47
47
  g && M(g, s.parent, e);
48
48
  }, f);
49
- }, E.deactivate = (e) => {
49
+ }, x.deactivate = (e) => {
50
50
  const n = e.component;
51
- N(e, q, null, H.LEAVE, f), v(() => {
51
+ C(e, q, null, H.LEAVE, f), A(() => {
52
52
  n.da && I(n.da);
53
53
  const t = e.props && e.props.onVnodeUnmounted;
54
54
  t && M(t, n.parent, e), n.isDeactivated = !0;
55
55
  }, f);
56
56
  };
57
- function K(e) {
58
- C(e), B(e, d, f, !0);
57
+ function F(e) {
58
+ S(e), B(e, d, f, !0);
59
59
  }
60
- function V(e) {
61
- a.forEach((n, t) => {
60
+ function K(e) {
61
+ c.forEach((n, t) => {
62
62
  const i = w(n.type);
63
63
  i && (!e || !e(i)) && m(t);
64
64
  });
65
65
  }
66
- function R(e) {
67
- a.forEach((n, t) => {
66
+ function N(e) {
67
+ c.forEach((n, t) => {
68
68
  (!e || !e(t)) && m(t);
69
69
  });
70
70
  }
71
71
  function m(e) {
72
- const n = a.get(e);
73
- !u || n.type !== u.type ? K(n) : u && C(u), a.delete(e), p.delete(e);
72
+ const n = c.get(e);
73
+ n && (!a || n.type !== a.type || n.key !== a.key) ? F(n) : a && S(a), c.delete(e), p.delete(e);
74
74
  }
75
- y({ remove: (e) => {
76
- a.has(e) && m(e);
75
+ h({ remove: (e) => {
76
+ c.has(e) && m(e);
77
77
  }, clear: () => {
78
- a.forEach((e, n) => m(n));
79
- } }), k(
78
+ c.forEach((e, n) => m(n));
79
+ } }), b(
80
80
  () => [o.include, o.exclude],
81
81
  ([e, n]) => {
82
- e && V((t) => l(e, t)), n && V((t) => !l(n, t));
82
+ e && K((t) => l(e, t)), n && K((t) => !l(n, t));
83
83
  },
84
84
  // prune post-render after `current` has been updated
85
85
  { flush: "post", deep: !0 }
86
- ), k(
86
+ ), b(
87
87
  () => [o.includeKey, o.excludeKey],
88
88
  ([e, n]) => {
89
- e && e.length && R((t) => typeof t == "string" && l(e, t)), n && n.length && R((t) => typeof t != "string" || !l(n, t));
89
+ e && N((t) => typeof t == "string" && l(e, t)), n && N((t) => typeof t != "string" || !l(n, t));
90
90
  },
91
91
  // prune post-render after `current` has been updated
92
92
  { flush: "post", deep: !0 }
93
93
  );
94
- let h = null;
95
- const T = () => {
96
- h != null && a.set(h, F(d.subTree));
94
+ let y = null;
95
+ const k = () => {
96
+ y != null && c.set(y, v(d.subTree));
97
97
  };
98
- return W(T), j(T), G(() => {
99
- a.forEach((e) => {
100
- const { subTree: n, suspense: t } = d, i = F(n);
101
- if (e.type === i.type) {
102
- C(i);
103
- const c = i.component.da;
104
- c && v(c, t);
98
+ return W(k), j(k), G(() => {
99
+ c.forEach((e) => {
100
+ const { subTree: n, suspense: t } = d, i = v(n);
101
+ if (e.type === i.type && e.key === i.key) {
102
+ S(i);
103
+ const u = i.component.da;
104
+ u && A(u, t);
105
105
  return;
106
106
  }
107
- K(e);
107
+ F(e);
108
108
  });
109
109
  }), () => {
110
- if (h = null, !r.default) return null;
110
+ if (y = null, !r.default) return null;
111
111
  const e = r.default(), n = e[0];
112
112
  if (e.length > 1)
113
- return u = null, e;
113
+ return a = null, e;
114
114
  if (!J(n) || !(n.shapeFlag & 4) && !(n.shapeFlag & 128))
115
- return u = null, n;
116
- let t = F(n);
117
- const i = t.type, c = w(
115
+ return a = null, n;
116
+ let t = v(n);
117
+ const i = t.type, u = w(
118
118
  X(t) ? t.type.__asyncResolved || {} : i
119
- ), s = t.key == null ? i : t.key, { include: g, exclude: _, includeKey: x, excludeKey: A, max: b } = o;
120
- if (g && (!c || !l(g, c)) || _ && c && l(_, c) || x && x.length && (typeof s != "string" || !l(x, s)) || A && A.length && typeof s == "string" && l(A, s))
121
- return u = t, n;
122
- const S = a.get(s);
123
- return t.el && (t = O(t), n.shapeFlag & 128 && (n.ssContent = t)), h = s, S ? (t.el = S.el, t.component = S.component, t.transition && Q(t, t.transition), t.shapeFlag |= 512, p.delete(s), p.add(s)) : (p.add(s), b && p.size > Number.parseInt(b, 10) && m(p.values().next().value || "")), t.shapeFlag |= 256, u = t, Y(n.type) ? n : t;
119
+ ), s = t.key == null ? i : t.key, { include: g, exclude: V, includeKey: R, excludeKey: T, max: _ } = o;
120
+ if (g && (!u || !l(g, u)) || V && u && l(V, u) || R && (typeof s != "string" || !l(R, s)) || T && typeof s == "string" && l(T, s))
121
+ return a = t, n;
122
+ const E = c.get(s);
123
+ return t.el && (t = O(t), n.shapeFlag & 128 && (n.ssContent = t)), y = s, E ? (t.el = E.el, t.component = E.component, t.transition && Q(t, t.transition), t.shapeFlag |= 512, p.delete(s), p.add(s)) : (p.add(s), _ && p.size > Number.parseInt(_, 10) && m(p.values().next().value)), t.shapeFlag |= 256, a = t, Y(n.type) ? n : t;
124
124
  };
125
125
  }
126
- }, ce = Z;
126
+ }, ae = Z;
127
127
  function l(o, r) {
128
- return z(o) ? o.some((y) => l(y, r)) : L(o) ? o.split(",").includes(r) : o.test ? o.test(r) : !1;
128
+ return z(o) ? o.some((h) => l(h, r)) : L(o) ? o.split(",").includes(r) : o.test ? (o.lastIndex = 0, o.test(r)) : !1;
129
129
  }
130
- function C(o) {
130
+ function S(o) {
131
131
  let r = o.shapeFlag;
132
132
  r & 256 && (r -= 256), r & 512 && (r -= 512), o.shapeFlag = r;
133
133
  }
134
- function F(o) {
134
+ function v(o) {
135
135
  return o.shapeFlag & 128 ? o.ssContent : o;
136
136
  }
137
137
  export {
138
- ce as TtKeepAlive
138
+ ae as TtKeepAlive
139
139
  };