@dazhicheng/ui 1.6.44 → 1.6.46
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/tt-keep-alive/index.js +54 -54
- package/dist/components/tt-modal/src/RenderModal.vue.js +211 -204
- package/dist/components/tt-modal/src/hooks/useModalRender.js +85 -84
- package/dist/components/tt-modal/src/index.js +26 -13
- package/dist/components/tt-modal/src/utils/modal-scope.d.ts +5 -4
- package/dist/components/tt-modal/src/utils/modal-scope.js +13 -10
- package/dist/components/tt-modal-form/index.vue.js +54 -44
- package/dist/components/tt-modal-form/props.d.ts +2 -0
- package/package.json +1 -1
|
@@ -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
|
|
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
|
|
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:
|
|
22
|
-
const d = P(),
|
|
23
|
-
let
|
|
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:
|
|
27
|
+
m: C,
|
|
28
28
|
um: B,
|
|
29
29
|
o: { createElement: D }
|
|
30
30
|
}
|
|
31
|
-
} =
|
|
32
|
-
|
|
31
|
+
} = x, q = D("div");
|
|
32
|
+
x.activate = (e, n, t, i, u) => {
|
|
33
33
|
const s = e.component;
|
|
34
|
-
|
|
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
|
-
|
|
44
|
-
),
|
|
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
|
-
},
|
|
49
|
+
}, x.deactivate = (e) => {
|
|
50
50
|
const n = e.component;
|
|
51
|
-
|
|
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
|
|
58
|
-
|
|
57
|
+
function F(e) {
|
|
58
|
+
S(e), B(e, d, f, !0);
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
|
|
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
|
|
67
|
-
|
|
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 =
|
|
73
|
-
!
|
|
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
|
-
|
|
76
|
-
|
|
75
|
+
h({ remove: (e) => {
|
|
76
|
+
c.has(e) && m(e);
|
|
77
77
|
}, clear: () => {
|
|
78
|
-
|
|
79
|
-
} }),
|
|
78
|
+
c.forEach((e, n) => m(n));
|
|
79
|
+
} }), b(
|
|
80
80
|
() => [o.include, o.exclude],
|
|
81
81
|
([e, n]) => {
|
|
82
|
-
e &&
|
|
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
|
-
),
|
|
86
|
+
), b(
|
|
87
87
|
() => [o.includeKey, o.excludeKey],
|
|
88
88
|
([e, n]) => {
|
|
89
|
-
e &&
|
|
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
|
|
95
|
-
const
|
|
96
|
-
|
|
94
|
+
let y = null;
|
|
95
|
+
const k = () => {
|
|
96
|
+
y != null && c.set(y, v(d.subTree));
|
|
97
97
|
};
|
|
98
|
-
return W(
|
|
99
|
-
|
|
100
|
-
const { subTree: n, suspense: t } = d, i =
|
|
101
|
-
if (e.type === i.type) {
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
|
|
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
|
-
|
|
107
|
+
F(e);
|
|
108
108
|
});
|
|
109
109
|
}), () => {
|
|
110
|
-
if (
|
|
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
|
|
113
|
+
return a = null, e;
|
|
114
114
|
if (!J(n) || !(n.shapeFlag & 4) && !(n.shapeFlag & 128))
|
|
115
|
-
return
|
|
116
|
-
let t =
|
|
117
|
-
const i = t.type,
|
|
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:
|
|
120
|
-
if (g && (!
|
|
121
|
-
return
|
|
122
|
-
const
|
|
123
|
-
return t.el && (t = O(t), n.shapeFlag & 128 && (n.ssContent = 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
|
-
},
|
|
126
|
+
}, ae = Z;
|
|
127
127
|
function l(o, r) {
|
|
128
|
-
return z(o) ? o.some((
|
|
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
|
|
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
|
|
134
|
+
function v(o) {
|
|
135
135
|
return o.shapeFlag & 128 ? o.ssContent : o;
|
|
136
136
|
}
|
|
137
137
|
export {
|
|
138
|
-
|
|
138
|
+
ae as TtKeepAlive
|
|
139
139
|
};
|