@hkyhy/marsun-components-core 0.1.26 → 0.1.28
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/Filter/FilterTreeSelect/index.d.ts +6 -0
- package/dist/components/Filter/FilterTreeSelect/index.js +271 -201
- package/dist/components/Filter/FilterTreeSelect/index.js.map +1 -1
- package/dist/components/Layout/AgentAppShell/AgentAppShell.d.ts +45 -0
- package/dist/components/Layout/AgentAppShell/AgentAppShell.js +103 -0
- package/dist/components/Layout/AgentAppShell/AgentAppShell.js.map +1 -0
- package/dist/components/Layout/AgentAppShell/index.d.ts +2 -0
- package/dist/components/Layout/AgentAppShell/style.module.scss.js +24 -0
- package/dist/components/Layout/AgentAppShell/style.module.scss.js.map +1 -0
- package/dist/components/Layout/index.d.ts +3 -1
- package/dist/index.js +293 -291
- package/dist/index.js.map +1 -1
- package/dist/marsun-components-core.css +1 -1
- package/dist/styles/global.css +1 -1
- package/package.json +1 -1
|
@@ -15,6 +15,12 @@ export interface FilterTreeSelectProps extends BaseFilterProps {
|
|
|
15
15
|
onChange?: (value: string | string[] | undefined) => void;
|
|
16
16
|
showSearch?: boolean;
|
|
17
17
|
multiple?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* 仅叶子写入最终值。
|
|
20
|
+
* - 单选:点父节点只展开
|
|
21
|
+
* - 多选:点父节点 / 勾选框 = 全选或取消其下全部叶子;父勾选框支持半选
|
|
22
|
+
*/
|
|
23
|
+
leafOnly?: boolean;
|
|
18
24
|
/** 自定义节点展示标签(默认 name) */
|
|
19
25
|
getNodeLabel?: (node: TreeFilterNode) => string;
|
|
20
26
|
}
|
|
@@ -1,249 +1,319 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { ChevronDown as
|
|
3
|
-
import { useFetchData as
|
|
4
|
-
import { Input as
|
|
5
|
-
import
|
|
6
|
-
import { useState as
|
|
7
|
-
import
|
|
8
|
-
import { resolveFilterVisible as
|
|
9
|
-
import { useFilterRegister as
|
|
10
|
-
import
|
|
11
|
-
import { useMarsunFetch as
|
|
12
|
-
const { Search:
|
|
13
|
-
function
|
|
14
|
-
var
|
|
15
|
-
const
|
|
16
|
-
for (const
|
|
17
|
-
|
|
18
|
-
return
|
|
1
|
+
import { jsxs as D, jsx as x } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDown as oe, ChevronRight as ae, Check as fe, X as de } from "../../Icons/index.js";
|
|
3
|
+
import { useFetchData as he } from "../../../hooks/useFetchData.js";
|
|
4
|
+
import { Input as pe, Checkbox as ue, Space as me } from "antd";
|
|
5
|
+
import Y from "classnames";
|
|
6
|
+
import { useState as V, useEffect as Z, useMemo as L, useCallback as C } from "react";
|
|
7
|
+
import ge from "../FilterPopover/index.js";
|
|
8
|
+
import { resolveFilterVisible as O } from "../types.js";
|
|
9
|
+
import { useFilterRegister as xe } from "../useFilterState.js";
|
|
10
|
+
import g from "./style.module.scss.js";
|
|
11
|
+
import { useMarsunFetch as ve } from "../../../provider/context.js";
|
|
12
|
+
const { Search: we } = pe;
|
|
13
|
+
function ee(u, f = 0, v = null) {
|
|
14
|
+
var N;
|
|
15
|
+
const h = [];
|
|
16
|
+
for (const p of u)
|
|
17
|
+
h.push({ id: p.id, name: p.name, depth: f, parentId: v }), (N = p.children) != null && N.length && h.push(...ee(p.children, f + 1, p.id));
|
|
18
|
+
return h;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
if (!
|
|
22
|
-
const
|
|
23
|
-
function
|
|
24
|
-
var
|
|
25
|
-
const
|
|
26
|
-
for (const
|
|
27
|
-
const
|
|
28
|
-
(
|
|
20
|
+
function Me(u, f) {
|
|
21
|
+
if (!f) return u;
|
|
22
|
+
const v = f.toLowerCase();
|
|
23
|
+
function h(N) {
|
|
24
|
+
var P;
|
|
25
|
+
const p = [];
|
|
26
|
+
for (const d of N) {
|
|
27
|
+
const l = (P = d.children) != null && P.length ? h(d.children) : [];
|
|
28
|
+
(d.name.toLowerCase().includes(v) || l.length > 0) && p.push({ ...d, children: l.length > 0 ? l : void 0 });
|
|
29
29
|
}
|
|
30
|
-
return
|
|
30
|
+
return p;
|
|
31
31
|
}
|
|
32
|
-
return
|
|
32
|
+
return h(u);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
var
|
|
36
|
-
const
|
|
37
|
-
for (const
|
|
38
|
-
(
|
|
39
|
-
return
|
|
34
|
+
function te(u) {
|
|
35
|
+
var v;
|
|
36
|
+
const f = [];
|
|
37
|
+
for (const h of u)
|
|
38
|
+
(v = h.children) != null && v.length && (f.push(h.id), f.push(...te(h.children)));
|
|
39
|
+
return f;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const
|
|
43
|
-
for (const
|
|
44
|
-
|
|
41
|
+
function Se(u, f) {
|
|
42
|
+
const v = /* @__PURE__ */ new Map(), h = (N) => {
|
|
43
|
+
for (const p of N)
|
|
44
|
+
v.set(p.id, f(p)), p.children && h(p.children);
|
|
45
45
|
};
|
|
46
|
-
return
|
|
46
|
+
return h(u), v;
|
|
47
47
|
}
|
|
48
|
-
const
|
|
49
|
-
filterKey:
|
|
50
|
-
label:
|
|
51
|
-
treeData:
|
|
52
|
-
fetchUrl:
|
|
53
|
-
fetchOptions:
|
|
54
|
-
transformData:
|
|
55
|
-
enabled:
|
|
56
|
-
value:
|
|
57
|
-
onChange:
|
|
58
|
-
showSearch:
|
|
59
|
-
multiple:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
48
|
+
const Re = ({
|
|
49
|
+
filterKey: u,
|
|
50
|
+
label: f,
|
|
51
|
+
treeData: v,
|
|
52
|
+
fetchUrl: h,
|
|
53
|
+
fetchOptions: N,
|
|
54
|
+
transformData: p,
|
|
55
|
+
enabled: P = !0,
|
|
56
|
+
value: d,
|
|
57
|
+
onChange: l,
|
|
58
|
+
showSearch: E = !1,
|
|
59
|
+
multiple: o = !1,
|
|
60
|
+
leafOnly: k = !1,
|
|
61
|
+
active: se,
|
|
62
|
+
hidden: U,
|
|
63
|
+
display: B,
|
|
64
|
+
getNodeLabel: _ = (z) => z.name
|
|
64
65
|
}) => {
|
|
65
|
-
const
|
|
66
|
-
data:
|
|
67
|
-
fetchUrl:
|
|
68
|
-
fetchOptions:
|
|
69
|
-
transformData:
|
|
70
|
-
enabled:
|
|
71
|
-
baseUrl:
|
|
72
|
-
defaultHeaders:
|
|
73
|
-
timeoutMs:
|
|
74
|
-
}),
|
|
75
|
-
|
|
76
|
-
), [
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}, [
|
|
80
|
-
|
|
81
|
-
}, [
|
|
82
|
-
const
|
|
83
|
-
() =>
|
|
84
|
-
[
|
|
85
|
-
),
|
|
86
|
-
if (!
|
|
87
|
-
if (
|
|
88
|
-
const e =
|
|
89
|
-
return e.length > 0 ? e.map((t) =>
|
|
66
|
+
const z = ve(), { data: re } = he({
|
|
67
|
+
data: v,
|
|
68
|
+
fetchUrl: h,
|
|
69
|
+
fetchOptions: N,
|
|
70
|
+
transformData: p,
|
|
71
|
+
enabled: P,
|
|
72
|
+
baseUrl: z.baseUrl,
|
|
73
|
+
defaultHeaders: z.headers,
|
|
74
|
+
timeoutMs: z.timeoutMs
|
|
75
|
+
}), M = re ?? [], [ce, R] = V(!1), [m, w] = V(
|
|
76
|
+
d ?? (o ? [] : void 0)
|
|
77
|
+
), [H, y] = V(/* @__PURE__ */ new Set()), [T, X] = V(""), A = xe(), $ = { filterKey: u, label: f, value: d };
|
|
78
|
+
Z(() => {
|
|
79
|
+
w(d ?? (o ? [] : void 0)), d == null && X("");
|
|
80
|
+
}, [d, o]), Z(() => {
|
|
81
|
+
M.length && y(new Set(te(M)));
|
|
82
|
+
}, [M]);
|
|
83
|
+
const j = L(
|
|
84
|
+
() => Se(M, _),
|
|
85
|
+
[M, _]
|
|
86
|
+
), q = L(() => {
|
|
87
|
+
if (!M.length || d == null) return "";
|
|
88
|
+
if (o) {
|
|
89
|
+
const e = d;
|
|
90
|
+
return e.length > 0 ? e.map((t) => j.get(t) ?? t).join("、") : "";
|
|
90
91
|
}
|
|
91
|
-
return
|
|
92
|
-
}, [
|
|
93
|
-
|
|
94
|
-
if (
|
|
95
|
-
if (!
|
|
96
|
-
|
|
92
|
+
return j.get(d) ?? "";
|
|
93
|
+
}, [M, d, o, j]);
|
|
94
|
+
Z(() => {
|
|
95
|
+
if (A) {
|
|
96
|
+
if (!O({ display: B, hidden: U }, $)) {
|
|
97
|
+
A.unregister(u);
|
|
97
98
|
return;
|
|
98
99
|
}
|
|
99
|
-
|
|
100
|
-
label:
|
|
101
|
-
valueLabel:
|
|
102
|
-
onRemove: () =>
|
|
103
|
-
}) :
|
|
100
|
+
q ? A.register(u, {
|
|
101
|
+
label: f,
|
|
102
|
+
valueLabel: q,
|
|
103
|
+
onRemove: () => l == null ? void 0 : l(o ? [] : void 0)
|
|
104
|
+
}) : A.unregister(u);
|
|
104
105
|
}
|
|
105
|
-
}, [
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
106
|
+
}, [
|
|
107
|
+
q,
|
|
108
|
+
u,
|
|
109
|
+
f,
|
|
110
|
+
B,
|
|
111
|
+
U,
|
|
112
|
+
A,
|
|
113
|
+
l,
|
|
114
|
+
o,
|
|
115
|
+
$
|
|
116
|
+
]);
|
|
117
|
+
const S = L(
|
|
118
|
+
() => E && T ? Me(M, T) : M,
|
|
119
|
+
[E, T, M]
|
|
120
|
+
), K = L(() => ee(S), [S]), F = L(() => {
|
|
121
|
+
const e = /* @__PURE__ */ new Map(), t = (a) => {
|
|
122
|
+
var r;
|
|
123
|
+
for (const s of a)
|
|
124
|
+
e.set(s.id, !!((r = s.children) != null && r.length)), s.children && t(s.children);
|
|
114
125
|
};
|
|
115
|
-
return t(
|
|
116
|
-
}, [
|
|
117
|
-
const e = /* @__PURE__ */ new Map(), t = (
|
|
118
|
-
var
|
|
119
|
-
for (const s of
|
|
120
|
-
if ((
|
|
121
|
-
const
|
|
122
|
-
var
|
|
123
|
-
|
|
126
|
+
return t(S), e;
|
|
127
|
+
}, [S]), G = L(() => {
|
|
128
|
+
const e = /* @__PURE__ */ new Map(), t = (a) => {
|
|
129
|
+
var r;
|
|
130
|
+
for (const s of a)
|
|
131
|
+
if ((r = s.children) != null && r.length) {
|
|
132
|
+
const c = [], i = (n) => {
|
|
133
|
+
var b;
|
|
134
|
+
c.push(n.id), (b = n.children) == null || b.forEach(i);
|
|
124
135
|
};
|
|
125
|
-
s.children.forEach(
|
|
136
|
+
s.children.forEach(i), e.set(s.id, c), t(s.children);
|
|
126
137
|
}
|
|
127
138
|
};
|
|
128
|
-
return t(
|
|
129
|
-
}, [
|
|
130
|
-
const e = /* @__PURE__ */ new Map(), t = (
|
|
131
|
-
var
|
|
132
|
-
for (const s of
|
|
133
|
-
if ((
|
|
134
|
-
for (const
|
|
139
|
+
return t(S), e;
|
|
140
|
+
}, [S]), I = L(() => {
|
|
141
|
+
const e = /* @__PURE__ */ new Map(), t = (a) => {
|
|
142
|
+
var r;
|
|
143
|
+
for (const s of a)
|
|
144
|
+
if ((r = s.children) != null && r.length) {
|
|
145
|
+
for (const c of s.children) e.set(c.id, s.id);
|
|
135
146
|
t(s.children);
|
|
136
147
|
}
|
|
137
148
|
};
|
|
138
|
-
return t(
|
|
139
|
-
}, [
|
|
149
|
+
return t(S), e;
|
|
150
|
+
}, [S]), J = L(() => {
|
|
151
|
+
const e = /* @__PURE__ */ new Map(), t = (a) => {
|
|
152
|
+
var r;
|
|
153
|
+
for (const s of a) {
|
|
154
|
+
if (!((r = s.children) != null && r.length)) continue;
|
|
155
|
+
const c = [], i = (n) => {
|
|
156
|
+
var b;
|
|
157
|
+
if (!((b = n.children) != null && b.length)) {
|
|
158
|
+
c.push(n.id);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
n.children.forEach(i);
|
|
162
|
+
};
|
|
163
|
+
s.children.forEach(i), e.set(s.id, c), t(s.children);
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
return t(S), e;
|
|
167
|
+
}, [S]), Q = C((e) => {
|
|
168
|
+
y((t) => {
|
|
169
|
+
const a = new Set(t);
|
|
170
|
+
return a.has(e) ? a.delete(e) : a.add(e), a;
|
|
171
|
+
});
|
|
172
|
+
}, []), ne = C(
|
|
140
173
|
(e) => {
|
|
141
|
-
|
|
142
|
-
|
|
174
|
+
if (k && F.get(e)) {
|
|
175
|
+
Q(e);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
const t = m === e ? void 0 : e;
|
|
179
|
+
w(t), l == null || l(t), R(!1);
|
|
143
180
|
},
|
|
144
|
-
[
|
|
145
|
-
),
|
|
181
|
+
[m, l, k, F, Q]
|
|
182
|
+
), W = C(
|
|
146
183
|
(e) => {
|
|
147
|
-
const t = (
|
|
148
|
-
if (
|
|
184
|
+
const t = (m || []).slice(), a = G.get(e), r = J.get(e), s = I.get(e);
|
|
185
|
+
if (k && (r != null && r.length)) {
|
|
186
|
+
if (r.every((i) => t.includes(i))) {
|
|
187
|
+
const i = new Set(r);
|
|
188
|
+
w(t.filter((n) => !i.has(n)));
|
|
189
|
+
} else
|
|
190
|
+
w([.../* @__PURE__ */ new Set([...t, ...r])]);
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
if (a)
|
|
149
194
|
if (t.includes(e)) {
|
|
150
|
-
const
|
|
151
|
-
|
|
195
|
+
const i = /* @__PURE__ */ new Set([e, ...a]);
|
|
196
|
+
w(t.filter((n) => !i.has(n)));
|
|
152
197
|
} else
|
|
153
|
-
|
|
198
|
+
w([.../* @__PURE__ */ new Set([...t, e, ...a])]);
|
|
154
199
|
else if (t.includes(e)) {
|
|
155
|
-
const
|
|
156
|
-
|
|
200
|
+
const c = t.filter((i) => i !== e);
|
|
201
|
+
w(
|
|
202
|
+
s && c.includes(s) ? c.filter((i) => i !== s) : c
|
|
203
|
+
);
|
|
157
204
|
} else {
|
|
158
|
-
const
|
|
159
|
-
|
|
205
|
+
const c = [...t, e];
|
|
206
|
+
s && !k && (G.get(s) || []).every((n) => c.includes(n)) ? w([.../* @__PURE__ */ new Set([...c, s])]) : w(c);
|
|
160
207
|
}
|
|
161
208
|
},
|
|
162
|
-
[
|
|
163
|
-
),
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
return o.has(e) ? o.delete(e) : o.add(e), o;
|
|
167
|
-
});
|
|
168
|
-
}, []), ce = j(
|
|
169
|
-
(e) => e.parentId === null || b && N ? !0 : O.has(e.parentId),
|
|
170
|
-
[O, b, N]
|
|
209
|
+
[m, G, I, k, J]
|
|
210
|
+
), ie = C(
|
|
211
|
+
(e) => e.parentId === null || E && T ? !0 : H.has(e.parentId),
|
|
212
|
+
[H, E, T]
|
|
171
213
|
);
|
|
172
|
-
return
|
|
173
|
-
|
|
214
|
+
return O({ display: B, hidden: U }, $) ? /* @__PURE__ */ D(
|
|
215
|
+
ge,
|
|
174
216
|
{
|
|
175
|
-
label:
|
|
176
|
-
active:
|
|
177
|
-
open:
|
|
178
|
-
onOpenChange:
|
|
179
|
-
onConfirm:
|
|
180
|
-
|
|
217
|
+
label: f,
|
|
218
|
+
active: se || (o ? (m == null ? void 0 : m.length) > 0 : !!d),
|
|
219
|
+
open: ce,
|
|
220
|
+
onOpenChange: R,
|
|
221
|
+
onConfirm: o ? () => {
|
|
222
|
+
let e = m;
|
|
223
|
+
k && Array.isArray(e) && (e = e.filter((t) => !F.get(t))), l == null || l(e), R(!1);
|
|
181
224
|
} : void 0,
|
|
182
225
|
onReset: () => {
|
|
183
|
-
const e =
|
|
184
|
-
|
|
226
|
+
const e = o ? [] : void 0;
|
|
227
|
+
w(e), X(""), l == null || l(e), R(!1);
|
|
185
228
|
},
|
|
186
229
|
children: [
|
|
187
|
-
|
|
188
|
-
|
|
230
|
+
E && /* @__PURE__ */ x(
|
|
231
|
+
we,
|
|
189
232
|
{
|
|
190
|
-
placeholder: `搜索${
|
|
233
|
+
placeholder: `搜索${f}`,
|
|
191
234
|
allowClear: !0,
|
|
192
235
|
size: "middle",
|
|
193
|
-
className:
|
|
194
|
-
value:
|
|
195
|
-
onChange: (e) =>
|
|
236
|
+
className: Y("filter-tree-select-search", g["filter-tree-select-search"]),
|
|
237
|
+
value: T,
|
|
238
|
+
onChange: (e) => X(e.target.value)
|
|
239
|
+
}
|
|
240
|
+
),
|
|
241
|
+
/* @__PURE__ */ D(
|
|
242
|
+
"div",
|
|
243
|
+
{
|
|
244
|
+
className: Y("filter-tree-select-options", g["filter-tree-select-options"]),
|
|
245
|
+
children: [
|
|
246
|
+
K.map((e) => {
|
|
247
|
+
if (!ie(e)) return null;
|
|
248
|
+
const t = !F.get(e.id), a = H.has(e.id), r = !o && m === e.id, s = o ? m || [] : [];
|
|
249
|
+
let c = o && s.includes(e.id), i = !1;
|
|
250
|
+
if (o && k && !t) {
|
|
251
|
+
const n = J.get(e.id) || [], b = n.filter((le) => s.includes(le)).length;
|
|
252
|
+
c = n.length > 0 && b === n.length, i = b > 0 && b < n.length;
|
|
253
|
+
}
|
|
254
|
+
return /* @__PURE__ */ D(
|
|
255
|
+
"div",
|
|
256
|
+
{
|
|
257
|
+
className: Y(
|
|
258
|
+
"filter-tree-select-option",
|
|
259
|
+
g["filter-tree-select-option"],
|
|
260
|
+
r && g["filter-tree-select-option-selected"]
|
|
261
|
+
),
|
|
262
|
+
style: { paddingLeft: 8 + e.depth * 20 },
|
|
263
|
+
onClick: () => o ? W(e.id) : ne(e.id),
|
|
264
|
+
children: [
|
|
265
|
+
t ? /* @__PURE__ */ x("span", { className: g["filter-tree-select-expand-placeholder"] }) : /* @__PURE__ */ x(
|
|
266
|
+
"span",
|
|
267
|
+
{
|
|
268
|
+
className: g["filter-tree-select-expand-icon"],
|
|
269
|
+
onClick: (n) => {
|
|
270
|
+
n.stopPropagation(), Q(e.id);
|
|
271
|
+
},
|
|
272
|
+
children: a || E && T ? /* @__PURE__ */ x(oe, { style: { fontSize: 10 } }) : /* @__PURE__ */ x(ae, { style: { fontSize: 10 } })
|
|
273
|
+
}
|
|
274
|
+
),
|
|
275
|
+
o && /* @__PURE__ */ x(
|
|
276
|
+
ue,
|
|
277
|
+
{
|
|
278
|
+
checked: c,
|
|
279
|
+
indeterminate: i,
|
|
280
|
+
onClick: (n) => n.stopPropagation(),
|
|
281
|
+
onChange: () => W(e.id)
|
|
282
|
+
}
|
|
283
|
+
),
|
|
284
|
+
/* @__PURE__ */ x("span", { className: g["filter-tree-select-node-label"], children: e.name }),
|
|
285
|
+
!o && r && /* @__PURE__ */ x(fe, { className: g["filter-tree-select-option-check"] })
|
|
286
|
+
]
|
|
287
|
+
},
|
|
288
|
+
e.id
|
|
289
|
+
);
|
|
290
|
+
}),
|
|
291
|
+
K.length === 0 && /* @__PURE__ */ x("div", { className: g["filter-tree-select-empty"], children: "暂无数据" })
|
|
292
|
+
]
|
|
196
293
|
}
|
|
197
294
|
),
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
"
|
|
204
|
-
{
|
|
205
|
-
|
|
206
|
-
"filter-tree-select-option",
|
|
207
|
-
u["filter-tree-select-option"],
|
|
208
|
-
c && u["filter-tree-select-option-selected"]
|
|
209
|
-
),
|
|
210
|
-
style: { paddingLeft: 8 + e.depth * 20 },
|
|
211
|
-
onClick: () => l ? Q(e.id) : se(e.id),
|
|
212
|
-
children: [
|
|
213
|
-
t ? /* @__PURE__ */ m("span", { className: u["filter-tree-select-expand-placeholder"] }) : /* @__PURE__ */ m(
|
|
214
|
-
"span",
|
|
215
|
-
{
|
|
216
|
-
className: u["filter-tree-select-expand-icon"],
|
|
217
|
-
onClick: (p) => {
|
|
218
|
-
p.stopPropagation(), re(e.id);
|
|
219
|
-
},
|
|
220
|
-
children: o || b && N ? /* @__PURE__ */ m(ie, { style: { fontSize: 10 } }) : /* @__PURE__ */ m(ne, { style: { fontSize: 10 } })
|
|
221
|
-
}
|
|
222
|
-
),
|
|
223
|
-
l && /* @__PURE__ */ m(de, { checked: s }),
|
|
224
|
-
/* @__PURE__ */ m("span", { className: u["filter-tree-select-node-label"], children: e.name }),
|
|
225
|
-
!l && c && /* @__PURE__ */ m(le, { className: u["filter-tree-select-option-check"] })
|
|
226
|
-
]
|
|
295
|
+
o && (k ? (m || []).some((e) => !F.get(e)) : (m || []).length > 0) && /* @__PURE__ */ D("div", { className: g["filter-tree-select-selected-bar"], children: [
|
|
296
|
+
/* @__PURE__ */ x("div", { className: g["filter-tree-select-selected-label"], children: "已选:" }),
|
|
297
|
+
/* @__PURE__ */ x(me, { size: [4, 4], wrap: !0, children: (m || []).filter((e) => !(k && F.get(e))).map((e) => /* @__PURE__ */ D(
|
|
298
|
+
"span",
|
|
299
|
+
{
|
|
300
|
+
className: g["filter-tree-select-selected-tag"],
|
|
301
|
+
onClick: (t) => {
|
|
302
|
+
t.stopPropagation(), W(e);
|
|
227
303
|
},
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
/* @__PURE__ */ m(he, { size: [4, 4], wrap: !0, children: h.map((e) => /* @__PURE__ */ F("span", { className: u["filter-tree-select-selected-tag"], onClick: (t) => {
|
|
236
|
-
t.stopPropagation(), Q(e);
|
|
237
|
-
}, children: [
|
|
238
|
-
z.get(e) ?? e,
|
|
239
|
-
/* @__PURE__ */ m(oe, { className: u["filter-tree-select-selected-remove"] })
|
|
240
|
-
] }, e)) })
|
|
304
|
+
children: [
|
|
305
|
+
j.get(e) ?? e,
|
|
306
|
+
/* @__PURE__ */ x(de, { className: g["filter-tree-select-selected-remove"] })
|
|
307
|
+
]
|
|
308
|
+
},
|
|
309
|
+
e
|
|
310
|
+
)) })
|
|
241
311
|
] })
|
|
242
312
|
]
|
|
243
313
|
}
|
|
244
314
|
) : null;
|
|
245
315
|
};
|
|
246
316
|
export {
|
|
247
|
-
|
|
317
|
+
Re as default
|
|
248
318
|
};
|
|
249
319
|
//# sourceMappingURL=index.js.map
|