@gx-design-vue/pro-table 0.2.0-alpha.11 → 0.2.0-alpha.13
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/ProTable.js +12 -16
- package/dist/components/ScrollBar/Bar.d.ts +1 -1
- package/dist/components/ScrollBar/Thumb.js +1 -1
- package/dist/components/SearchForm/CollapseToggle.d.ts +1 -1
- package/dist/components/SearchForm/CollapseToggle.js +2 -2
- package/dist/components/SearchForm/FormItemContainer.d.ts +2 -2
- package/dist/components/SearchForm/SearchForm.d.ts +4 -4
- package/dist/components/Toolbar/FullscreenIcon.js +2 -2
- package/dist/components/Toolbar/ListToolBar.d.ts +8 -8
- package/dist/components/Toolbar/ListToolBar.js +2 -2
- package/dist/components/Toolbar/index.d.ts +5 -5
- package/dist/components/Toolbar/index.js +2 -2
- package/dist/pro-table.esm.js +900 -1384
- package/dist/pro-table.js +1 -1
- package/package.json +7 -8
package/dist/pro-table.esm.js
CHANGED
|
@@ -1,501 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { createInjectionState as e, useBreakpoints as t, useDebounceFn as n, useElementSize as r, useEventListener as i, useFullscreen as a, useMutationObserver as o, useResizeObserver as s, useScroll as c, useWindowSize as l } from "@vueuse/core";
|
|
2
|
+
import { Comment as u, Fragment as d, Teleport as f, Text as p, computed as m, createVNode as h, defineComponent as g, getCurrentInstance as _, h as v, isVNode as y, mergeDefaults as b, mergeProps as x, nextTick as S, onActivated as C, onBeforeUnmount as w, onDeactivated as T, onMounted as E, onScopeDispose as D, onUnmounted as O, reactive as k, ref as A, shallowRef as j, toRaw as M, toRef as ee, toValue as N, unref as te, watch as P, watchEffect as ne } from "vue";
|
|
3
|
+
import { proGenStyleHooks as re, unit as F, useProConfigContext as ie } from "@gx-design-vue/pro-provider";
|
|
4
|
+
import { Button as I, Cascader as L, DatePicker as R, Input as z, InputNumber as B, Pagination as V, Select as ae, SpaceCompact as oe, Spin as se, Table as ce, TimePicker as le, Tooltip as ue, TreeSelect as de } from "antdv-next";
|
|
4
5
|
import { useBaseConfig as fe } from "antdv-next/config-provider/context";
|
|
5
6
|
import pe from "antdv-next/config-provider/hooks/useCSSVarCls";
|
|
6
|
-
import {
|
|
7
|
-
import { DownOutlined as he, FullscreenExitOutlined as ge, FullscreenOutlined as _e, InfoCircleOutlined as ve, ReloadOutlined as ye, UpOutlined as be } from "@antdv-next/icons";
|
|
7
|
+
import { GIcon as H } from "@gx-design-vue/icon";
|
|
8
8
|
//#region \0rolldown/runtime.js
|
|
9
|
-
var
|
|
10
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
9
|
+
var me = Object.create, he = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, _e = Object.getOwnPropertyNames, ve = Object.getPrototypeOf, ye = Object.prototype.hasOwnProperty, be = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), xe = (e, t, n, r) => {
|
|
10
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = _e(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !ye.call(e, s) && s !== n && he(e, s, {
|
|
11
11
|
get: ((e) => t[e]).bind(null, s),
|
|
12
|
-
enumerable: !(r =
|
|
12
|
+
enumerable: !(r = ge(t, s)) || r.enumerable
|
|
13
13
|
});
|
|
14
14
|
return e;
|
|
15
|
-
},
|
|
15
|
+
}, Se = (e, t, n) => (n = e == null ? {} : me(ve(e)), xe(t || !e || !e.__esModule ? he(n, "default", {
|
|
16
16
|
value: e,
|
|
17
17
|
enumerable: !0
|
|
18
|
-
}) : n, e))
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region ../../node_modules/.pnpm/@vueuse+shared@14.3.0_vue@3.5.27_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
|
|
21
|
-
function Ae(e, t) {
|
|
22
|
-
return c() ? (x(e, t), !0) : !1;
|
|
23
|
-
}
|
|
24
|
-
var I = /* @__PURE__ */ new WeakMap(), L = (...e) => {
|
|
25
|
-
let t = e[0], n = s()?.proxy ?? c();
|
|
26
|
-
if (n == null && !u()) throw Error("injectLocal must be called in setup");
|
|
27
|
-
return n && I.has(n) && t in I.get(n) ? I.get(n)[t] : d(...e);
|
|
28
|
-
};
|
|
29
|
-
function je(e, t) {
|
|
30
|
-
let n = s()?.proxy ?? c();
|
|
31
|
-
if (n == null) throw Error("provideLocal must be called in setup");
|
|
32
|
-
I.has(n) || I.set(n, Object.create(null));
|
|
33
|
-
let r = I.get(n);
|
|
34
|
-
return r[e] = t, C(e, t);
|
|
35
|
-
}
|
|
36
|
-
function Me(e, t) {
|
|
37
|
-
let n = t?.injectionKey || Symbol(e.name || "InjectionState"), r = t?.defaultValue;
|
|
38
|
-
return [(...t) => {
|
|
39
|
-
let r = e(...t);
|
|
40
|
-
return je(n, r), r;
|
|
41
|
-
}, () => L(n, r)];
|
|
42
|
-
}
|
|
43
|
-
var R = typeof window < "u" && typeof document < "u";
|
|
44
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
45
|
-
var Ne = (e) => e != null, Pe = Object.prototype.toString, Fe = (e) => Pe.call(e) === "[object Object]", z = () => {};
|
|
46
|
-
function Ie(e, t) {
|
|
47
|
-
function n(...n) {
|
|
48
|
-
return new Promise((r, i) => {
|
|
49
|
-
Promise.resolve(e(() => t.apply(this, n), {
|
|
50
|
-
fn: t,
|
|
51
|
-
thisArg: this,
|
|
52
|
-
args: n
|
|
53
|
-
})).then(r).catch(i);
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
return n;
|
|
57
|
-
}
|
|
58
|
-
function Le(e, t = {}) {
|
|
59
|
-
let n, r, i = z, a = (e) => {
|
|
60
|
-
clearTimeout(e), i(), i = z;
|
|
61
|
-
}, o;
|
|
62
|
-
return (s) => {
|
|
63
|
-
let c = O(e), l = O(t.maxWait);
|
|
64
|
-
return n && a(n), c <= 0 || l !== void 0 && l <= 0 ? (r &&= (a(r), void 0), Promise.resolve(s())) : new Promise((e, u) => {
|
|
65
|
-
i = t.rejectOnCancel ? u : e, o = s, l && !r && (r = setTimeout(() => {
|
|
66
|
-
n && a(n), r = void 0, e(o());
|
|
67
|
-
}, l)), n = setTimeout(() => {
|
|
68
|
-
r && a(r), r = void 0, e(s());
|
|
69
|
-
}, c);
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
function Re(...e) {
|
|
74
|
-
let t = 0, n, r = !0, i = z, a, o, s, c, l;
|
|
75
|
-
!f(e[0]) && typeof e[0] == "object" ? {delay: o, trailing: s = !0, leading: c = !0, rejectOnCancel: l = !1} = e[0] : [o, s = !0, c = !0, l = !1] = e;
|
|
76
|
-
let u = () => {
|
|
77
|
-
n && (clearTimeout(n), n = void 0, i(), i = z);
|
|
78
|
-
};
|
|
79
|
-
return (e) => {
|
|
80
|
-
let d = O(o), f = Date.now() - t, p = () => a = e();
|
|
81
|
-
return u(), d <= 0 ? (t = Date.now(), p()) : (f > d ? (t = Date.now(), (c || !r) && p()) : s && (a = new Promise((e, a) => {
|
|
82
|
-
i = l ? a : e, n = setTimeout(() => {
|
|
83
|
-
t = Date.now(), r = !0, e(p()), u();
|
|
84
|
-
}, Math.max(0, d - f));
|
|
85
|
-
})), !c && !n && (n = setTimeout(() => r = !0, d)), r = !1, a);
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
function ze(e, t) {
|
|
89
|
-
if (typeof e == "number") return e + t;
|
|
90
|
-
let n = e.match(/^-?\d+\.?\d*/)?.[0] || "", r = e.slice(n.length), i = Number.parseFloat(n) + t;
|
|
91
|
-
return Number.isNaN(i) ? e : i + r;
|
|
92
|
-
}
|
|
93
|
-
function B(e) {
|
|
94
|
-
return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
|
|
95
|
-
}
|
|
96
|
-
function V(e) {
|
|
97
|
-
return Array.isArray(e) ? e : [e];
|
|
98
|
-
}
|
|
99
|
-
function Be(e) {
|
|
100
|
-
return e || s();
|
|
101
|
-
}
|
|
102
|
-
function Ve(e, t = 200, n = {}) {
|
|
103
|
-
return Ie(Le(t, n), e);
|
|
104
|
-
}
|
|
105
|
-
function He(e, t = 200, n = !1, r = !0, i = !1) {
|
|
106
|
-
return Ie(Re(t, n, r, i), e);
|
|
107
|
-
}
|
|
108
|
-
function H(e, t = !0, n) {
|
|
109
|
-
Be(n) ? b(e, n) : t ? e() : g(e);
|
|
110
|
-
}
|
|
111
|
-
function Ue(e, t, n) {
|
|
112
|
-
return k(e, t, {
|
|
113
|
-
...n,
|
|
114
|
-
immediate: !0
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
//#endregion
|
|
118
|
-
//#region ../../node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.27_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
|
|
119
|
-
var U = R ? window : void 0, We = R ? window.document : void 0;
|
|
120
|
-
R && window.navigator, R && window.location;
|
|
121
|
-
function W(e) {
|
|
122
|
-
let t = O(e);
|
|
123
|
-
return t?.$el ?? t;
|
|
124
|
-
}
|
|
125
|
-
function G(...e) {
|
|
126
|
-
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = i(() => {
|
|
127
|
-
let t = V(O(e[0])).filter((e) => e != null);
|
|
128
|
-
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
129
|
-
});
|
|
130
|
-
return Ue(() => [
|
|
131
|
-
n.value?.map((e) => W(e)) ?? [U].filter((e) => e != null),
|
|
132
|
-
V(O(n.value ? e[1] : e[0])),
|
|
133
|
-
V(te(n.value ? e[2] : e[1])),
|
|
134
|
-
O(n.value ? e[3] : e[2])
|
|
135
|
-
], ([e, n, r, i], a, o) => {
|
|
136
|
-
if (!e?.length || !n?.length || !r?.length) return;
|
|
137
|
-
let s = Fe(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
|
|
138
|
-
o(() => {
|
|
139
|
-
c.forEach((e) => e());
|
|
140
|
-
});
|
|
141
|
-
}, { flush: "post" });
|
|
142
|
-
}
|
|
143
|
-
function Ge() {
|
|
144
|
-
let e = E(!1), t = s();
|
|
145
|
-
return t && b(() => {
|
|
146
|
-
e.value = !0;
|
|
147
|
-
}, t), e;
|
|
148
|
-
}
|
|
149
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
150
|
-
function Ke(e) {
|
|
151
|
-
let t = Ge();
|
|
152
|
-
return i(() => (t.value, !!e()));
|
|
153
|
-
}
|
|
154
|
-
function qe(e, t, n = {}) {
|
|
155
|
-
let { window: r = U, ...a } = n, o, s = /* @__PURE__ */ Ke(() => r && "MutationObserver" in r), c = () => {
|
|
156
|
-
o &&= (o.disconnect(), void 0);
|
|
157
|
-
}, l = k(i(() => {
|
|
158
|
-
let t = V(O(e)).map(W).filter(Ne);
|
|
159
|
-
return new Set(t);
|
|
160
|
-
}), (e) => {
|
|
161
|
-
c(), s.value && e.size && (o = new MutationObserver(t), e.forEach((e) => o.observe(e, a)));
|
|
162
|
-
}, {
|
|
163
|
-
immediate: !0,
|
|
164
|
-
flush: "post"
|
|
165
|
-
}), u = () => o?.takeRecords(), d = () => {
|
|
166
|
-
l(), c();
|
|
167
|
-
};
|
|
168
|
-
return Ae(d), {
|
|
169
|
-
isSupported: s,
|
|
170
|
-
stop: d,
|
|
171
|
-
takeRecords: u
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
var Je = Symbol("vueuse-ssr-width");
|
|
175
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
176
|
-
function Ye() {
|
|
177
|
-
let e = u() ? L(Je, null) : null;
|
|
178
|
-
return typeof e == "number" ? e : void 0;
|
|
179
|
-
}
|
|
180
|
-
function K(e, t = {}) {
|
|
181
|
-
let { window: n = U, ssrWidth: r = /* @__PURE__ */ Ye() } = t, a = /* @__PURE__ */ Ke(() => n && "matchMedia" in n && typeof n.matchMedia == "function"), o = E(typeof r == "number"), s = E(), c = E(!1);
|
|
182
|
-
return A(() => {
|
|
183
|
-
if (o.value) {
|
|
184
|
-
o.value = !a.value, c.value = O(e).split(",").some((e) => {
|
|
185
|
-
let t = e.includes("not all"), n = e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), i = e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), a = !!(n || i);
|
|
186
|
-
return n && a && (a = r >= B(n[1])), i && a && (a = r <= B(i[1])), t ? !a : a;
|
|
187
|
-
});
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
a.value && (s.value = n.matchMedia(O(e)), c.value = s.value.matches);
|
|
191
|
-
}), G(s, "change", (e) => {
|
|
192
|
-
c.value = e.matches;
|
|
193
|
-
}, { passive: !0 }), i(() => c.value);
|
|
194
|
-
}
|
|
195
|
-
function Xe(e, t = {}) {
|
|
196
|
-
function n(t, n) {
|
|
197
|
-
let r = O(e[O(t)]);
|
|
198
|
-
return n != null && (r = ze(r, n)), typeof r == "number" && (r = `${r}px`), r;
|
|
199
|
-
}
|
|
200
|
-
let { window: r = U, strategy: a = "min-width", ssrWidth: o = /* @__PURE__ */ Ye() } = t, s = typeof o == "number", c = s ? E(!1) : { value: !0 };
|
|
201
|
-
s && H(() => c.value = !!r);
|
|
202
|
-
function l(e, t) {
|
|
203
|
-
return !c.value && s ? e === "min" ? o >= B(t) : o <= B(t) : r ? r.matchMedia(`(${e}-width: ${t})`).matches : !1;
|
|
204
|
-
}
|
|
205
|
-
let u = (e) => K(() => `(min-width: ${n(e)})`, t), d = (e) => K(() => `(max-width: ${n(e)})`, t), f = Object.keys(e).reduce((e, t) => (Object.defineProperty(e, t, {
|
|
206
|
-
get: () => a === "min-width" ? u(t) : d(t),
|
|
207
|
-
enumerable: !0,
|
|
208
|
-
configurable: !0
|
|
209
|
-
}), e), {});
|
|
210
|
-
function p() {
|
|
211
|
-
let t = Object.keys(e).map((e) => [
|
|
212
|
-
e,
|
|
213
|
-
f[e],
|
|
214
|
-
B(n(e))
|
|
215
|
-
]).sort((e, t) => e[2] - t[2]);
|
|
216
|
-
return i(() => t.filter(([, e]) => e.value).map(([e]) => e));
|
|
217
|
-
}
|
|
218
|
-
return Object.assign(f, {
|
|
219
|
-
greaterOrEqual: u,
|
|
220
|
-
smallerOrEqual: d,
|
|
221
|
-
greater(e) {
|
|
222
|
-
return K(() => `(min-width: ${n(e, .1)})`, t);
|
|
223
|
-
},
|
|
224
|
-
smaller(e) {
|
|
225
|
-
return K(() => `(max-width: ${n(e, -.1)})`, t);
|
|
226
|
-
},
|
|
227
|
-
between(e, r) {
|
|
228
|
-
return K(() => `(min-width: ${n(e)}) and (max-width: ${n(r, -.1)})`, t);
|
|
229
|
-
},
|
|
230
|
-
isGreater(e) {
|
|
231
|
-
return l("min", n(e, .1));
|
|
232
|
-
},
|
|
233
|
-
isGreaterOrEqual(e) {
|
|
234
|
-
return l("min", n(e));
|
|
235
|
-
},
|
|
236
|
-
isSmaller(e) {
|
|
237
|
-
return l("max", n(e, -.1));
|
|
238
|
-
},
|
|
239
|
-
isSmallerOrEqual(e) {
|
|
240
|
-
return l("max", n(e));
|
|
241
|
-
},
|
|
242
|
-
isInBetween(e, t) {
|
|
243
|
-
return l("min", n(e)) && l("max", n(t, -.1));
|
|
244
|
-
},
|
|
245
|
-
current: p,
|
|
246
|
-
active() {
|
|
247
|
-
let e = p();
|
|
248
|
-
return i(() => e.value.length === 0 ? "" : e.value.at(a === "min-width" ? -1 : 0));
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
function Ze(e, t, n = {}) {
|
|
253
|
-
let { window: r = U, ...a } = n, o, s = /* @__PURE__ */ Ke(() => r && "ResizeObserver" in r), c = () => {
|
|
254
|
-
o &&= (o.disconnect(), void 0);
|
|
255
|
-
}, l = k(i(() => {
|
|
256
|
-
let t = O(e);
|
|
257
|
-
return Array.isArray(t) ? t.map((e) => W(e)) : [W(t)];
|
|
258
|
-
}), (e) => {
|
|
259
|
-
if (c(), s.value && r) {
|
|
260
|
-
o = new ResizeObserver(t);
|
|
261
|
-
for (let t of e) t && o.observe(t, a);
|
|
262
|
-
}
|
|
263
|
-
}, {
|
|
264
|
-
immediate: !0,
|
|
265
|
-
flush: "post"
|
|
266
|
-
}), u = () => {
|
|
267
|
-
c(), l();
|
|
268
|
-
};
|
|
269
|
-
return Ae(u), {
|
|
270
|
-
isSupported: s,
|
|
271
|
-
stop: u
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
function Qe(e, t = {
|
|
275
|
-
width: 0,
|
|
276
|
-
height: 0
|
|
277
|
-
}, n = {}) {
|
|
278
|
-
let { window: r = U, box: a = "content-box" } = n, o = i(() => {
|
|
279
|
-
var t;
|
|
280
|
-
return (t = W(e)) == null || (t = t.namespaceURI) == null ? void 0 : t.includes("svg");
|
|
281
|
-
}), s = E(t.width), c = E(t.height), { stop: l } = Ze(e, ([t]) => {
|
|
282
|
-
let n = a === "border-box" ? t.borderBoxSize : a === "content-box" ? t.contentBoxSize : t.devicePixelContentBoxSize;
|
|
283
|
-
if (r && o.value) {
|
|
284
|
-
let t = W(e);
|
|
285
|
-
if (t) {
|
|
286
|
-
let e = t.getBoundingClientRect();
|
|
287
|
-
s.value = e.width, c.value = e.height;
|
|
288
|
-
}
|
|
289
|
-
} else if (n) {
|
|
290
|
-
let e = V(n);
|
|
291
|
-
s.value = e.reduce((e, { inlineSize: t }) => e + t, 0), c.value = e.reduce((e, { blockSize: t }) => e + t, 0);
|
|
292
|
-
} else s.value = t.contentRect.width, c.value = t.contentRect.height;
|
|
293
|
-
}, n);
|
|
294
|
-
H(() => {
|
|
295
|
-
let n = W(e);
|
|
296
|
-
n && (s.value = "offsetWidth" in n ? n.offsetWidth : t.width, c.value = "offsetHeight" in n ? n.offsetHeight : t.height);
|
|
297
|
-
});
|
|
298
|
-
let u = k(() => W(e), (e) => {
|
|
299
|
-
s.value = e ? t.width : 0, c.value = e ? t.height : 0;
|
|
300
|
-
});
|
|
301
|
-
function d() {
|
|
302
|
-
l(), u();
|
|
303
|
-
}
|
|
304
|
-
return {
|
|
305
|
-
width: s,
|
|
306
|
-
height: c,
|
|
307
|
-
stop: d
|
|
308
|
-
};
|
|
309
|
-
}
|
|
310
|
-
var $e = [
|
|
311
|
-
"fullscreenchange",
|
|
312
|
-
"webkitfullscreenchange",
|
|
313
|
-
"webkitendfullscreen",
|
|
314
|
-
"mozfullscreenchange",
|
|
315
|
-
"MSFullscreenChange"
|
|
316
|
-
];
|
|
317
|
-
function et(e, t = {}) {
|
|
318
|
-
let { document: n = We, autoExit: r = !1 } = t, a = i(() => W(e) ?? n?.documentElement), o = E(!1), s = i(() => [
|
|
319
|
-
"requestFullscreen",
|
|
320
|
-
"webkitRequestFullscreen",
|
|
321
|
-
"webkitEnterFullscreen",
|
|
322
|
-
"webkitEnterFullScreen",
|
|
323
|
-
"webkitRequestFullScreen",
|
|
324
|
-
"mozRequestFullScreen",
|
|
325
|
-
"msRequestFullscreen"
|
|
326
|
-
].find((e) => n && e in n || a.value && e in a.value)), c = i(() => [
|
|
327
|
-
"exitFullscreen",
|
|
328
|
-
"webkitExitFullscreen",
|
|
329
|
-
"webkitExitFullScreen",
|
|
330
|
-
"webkitCancelFullScreen",
|
|
331
|
-
"mozCancelFullScreen",
|
|
332
|
-
"msExitFullscreen"
|
|
333
|
-
].find((e) => n && e in n || a.value && e in a.value)), l = i(() => [
|
|
334
|
-
"fullScreen",
|
|
335
|
-
"webkitIsFullScreen",
|
|
336
|
-
"webkitDisplayingFullscreen",
|
|
337
|
-
"mozFullScreen",
|
|
338
|
-
"msFullscreenElement"
|
|
339
|
-
].find((e) => n && e in n || a.value && e in a.value)), u = [
|
|
340
|
-
"fullscreenElement",
|
|
341
|
-
"webkitFullscreenElement",
|
|
342
|
-
"mozFullScreenElement",
|
|
343
|
-
"msFullscreenElement"
|
|
344
|
-
].find((e) => n && e in n), d = /* @__PURE__ */ Ke(() => a.value && n && s.value !== void 0 && c.value !== void 0 && l.value !== void 0), f = () => u ? n?.[u] === a.value : !1, p = () => {
|
|
345
|
-
if (l.value) {
|
|
346
|
-
if (n && n[l.value] != null) return n[l.value];
|
|
347
|
-
{
|
|
348
|
-
let e = a.value;
|
|
349
|
-
if (e?.[l.value] != null) return !!e[l.value];
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
return !1;
|
|
353
|
-
};
|
|
354
|
-
async function m() {
|
|
355
|
-
if (!(!d.value || !o.value)) {
|
|
356
|
-
if (c.value) if (n?.[c.value] != null) await n[c.value]();
|
|
357
|
-
else {
|
|
358
|
-
let e = a.value;
|
|
359
|
-
e?.[c.value] != null && await e[c.value]();
|
|
360
|
-
}
|
|
361
|
-
o.value = !1;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
async function h() {
|
|
365
|
-
if (!d.value || o.value) return;
|
|
366
|
-
p() && await m();
|
|
367
|
-
let e = a.value;
|
|
368
|
-
s.value && e?.[s.value] != null && (await e[s.value](), o.value = !0);
|
|
369
|
-
}
|
|
370
|
-
async function g() {
|
|
371
|
-
await (o.value ? m() : h());
|
|
372
|
-
}
|
|
373
|
-
let _ = () => {
|
|
374
|
-
let e = p();
|
|
375
|
-
(!e || e && f()) && (o.value = e);
|
|
376
|
-
}, v = {
|
|
377
|
-
capture: !1,
|
|
378
|
-
passive: !0
|
|
379
|
-
};
|
|
380
|
-
return G(n, $e, _, v), G(() => W(a), $e, _, v), H(_, !1), r && Ae(m), {
|
|
381
|
-
isSupported: d,
|
|
382
|
-
isFullscreen: o,
|
|
383
|
-
enter: h,
|
|
384
|
-
exit: m,
|
|
385
|
-
toggle: g
|
|
386
|
-
};
|
|
387
|
-
}
|
|
388
|
-
var tt = 1;
|
|
389
|
-
function nt(e, t = {}) {
|
|
390
|
-
let { throttle: n = 0, idle: r = 200, onStop: a = z, onScroll: o = z, offset: s = {
|
|
391
|
-
left: 0,
|
|
392
|
-
right: 0,
|
|
393
|
-
top: 0,
|
|
394
|
-
bottom: 0
|
|
395
|
-
}, observe: c = { mutation: !1 }, eventListenerOptions: l = {
|
|
396
|
-
capture: !1,
|
|
397
|
-
passive: !0
|
|
398
|
-
}, behavior: u = "auto", window: d = U, onError: f = (e) => {
|
|
399
|
-
console.error(e);
|
|
400
|
-
} } = t, p = typeof c == "boolean" ? { mutation: c } : c, m = E(0), h = E(0), g = i({
|
|
401
|
-
get() {
|
|
402
|
-
return m.value;
|
|
403
|
-
},
|
|
404
|
-
set(e) {
|
|
405
|
-
v(e, void 0);
|
|
406
|
-
}
|
|
407
|
-
}), _ = i({
|
|
408
|
-
get() {
|
|
409
|
-
return h.value;
|
|
410
|
-
},
|
|
411
|
-
set(e) {
|
|
412
|
-
v(void 0, e);
|
|
413
|
-
}
|
|
414
|
-
});
|
|
415
|
-
function v(t, n) {
|
|
416
|
-
var r, i;
|
|
417
|
-
if (!d) return;
|
|
418
|
-
let a = O(e);
|
|
419
|
-
if (!a) return;
|
|
420
|
-
(r = a instanceof Document ? d.document.body : a) == null || r.scrollTo({
|
|
421
|
-
top: O(n) ?? _.value,
|
|
422
|
-
left: O(t) ?? g.value,
|
|
423
|
-
behavior: O(u)
|
|
424
|
-
});
|
|
425
|
-
let o = (a == null || (i = a.document) == null ? void 0 : i.documentElement) || a?.documentElement || a;
|
|
426
|
-
g != null && (m.value = o.scrollLeft), _ != null && (h.value = o.scrollTop);
|
|
427
|
-
}
|
|
428
|
-
let y = E(!1), b = w({
|
|
429
|
-
left: !0,
|
|
430
|
-
right: !1,
|
|
431
|
-
top: !0,
|
|
432
|
-
bottom: !1
|
|
433
|
-
}), x = w({
|
|
434
|
-
left: !1,
|
|
435
|
-
right: !1,
|
|
436
|
-
top: !1,
|
|
437
|
-
bottom: !1
|
|
438
|
-
}), S = (e) => {
|
|
439
|
-
y.value && (y.value = !1, x.left = !1, x.right = !1, x.top = !1, x.bottom = !1, a(e));
|
|
440
|
-
}, C = Ve(S, n + r), T = (e) => {
|
|
441
|
-
var t;
|
|
442
|
-
if (!d) return;
|
|
443
|
-
let n = (e == null || (t = e.document) == null ? void 0 : t.documentElement) || e?.documentElement || W(e), { display: r, flexDirection: i, direction: a } = d.getComputedStyle(n), o = a === "rtl" ? -1 : 1, c = n.scrollLeft;
|
|
444
|
-
x.left = c < m.value, x.right = c > m.value;
|
|
445
|
-
let l = Math.abs(c * o) <= (s.left || 0), u = Math.abs(c * o) + n.clientWidth >= n.scrollWidth - (s.right || 0) - tt;
|
|
446
|
-
r === "flex" && i === "row-reverse" ? (b.left = u, b.right = l) : (b.left = l, b.right = u), m.value = c;
|
|
447
|
-
let f = n.scrollTop;
|
|
448
|
-
e === d.document && !f && (f = d.document.body.scrollTop), x.top = f < h.value, x.bottom = f > h.value;
|
|
449
|
-
let p = Math.abs(f) <= (s.top || 0), g = Math.abs(f) + n.clientHeight >= n.scrollHeight - (s.bottom || 0) - tt;
|
|
450
|
-
r === "flex" && i === "column-reverse" ? (b.top = g, b.bottom = p) : (b.top = p, b.bottom = g), h.value = f;
|
|
451
|
-
}, D = (e) => {
|
|
452
|
-
d && (T(e.target.documentElement ?? e.target), y.value = !0, C(e), o(e));
|
|
453
|
-
};
|
|
454
|
-
return G(e, "scroll", n ? He(D, n, !0, !1) : D, l), H(() => {
|
|
455
|
-
try {
|
|
456
|
-
let t = O(e);
|
|
457
|
-
if (!t) return;
|
|
458
|
-
T(t);
|
|
459
|
-
} catch (e) {
|
|
460
|
-
f(e);
|
|
461
|
-
}
|
|
462
|
-
}), p?.mutation && e != null && e !== d && e !== document && qe(e, () => {
|
|
463
|
-
let t = O(e);
|
|
464
|
-
t && T(t);
|
|
465
|
-
}, {
|
|
466
|
-
attributes: !0,
|
|
467
|
-
childList: !0,
|
|
468
|
-
subtree: !0
|
|
469
|
-
}), G(e, "scrollend", S, l), {
|
|
470
|
-
x: g,
|
|
471
|
-
y: _,
|
|
472
|
-
isScrolling: y,
|
|
473
|
-
arrivedState: b,
|
|
474
|
-
directions: x,
|
|
475
|
-
measure() {
|
|
476
|
-
let t = O(e);
|
|
477
|
-
d && t && T(t);
|
|
478
|
-
}
|
|
479
|
-
};
|
|
480
|
-
}
|
|
481
|
-
function rt(e = {}) {
|
|
482
|
-
let { window: t = U, initialWidth: n = Infinity, initialHeight: r = Infinity, listenOrientation: i = !0, includeScrollbar: a = !0, type: o = "inner" } = e, s = E(n), c = E(r), l = () => {
|
|
483
|
-
if (t) if (o === "outer") s.value = t.outerWidth, c.value = t.outerHeight;
|
|
484
|
-
else if (o === "visual" && t.visualViewport) {
|
|
485
|
-
let { width: e, height: n, scale: r } = t.visualViewport;
|
|
486
|
-
s.value = Math.round(e * r), c.value = Math.round(n * r);
|
|
487
|
-
} else a ? (s.value = t.innerWidth, c.value = t.innerHeight) : (s.value = t.document.documentElement.clientWidth, c.value = t.document.documentElement.clientHeight);
|
|
488
|
-
};
|
|
489
|
-
l(), H(l);
|
|
490
|
-
let u = { passive: !0 };
|
|
491
|
-
return G("resize", l, u), t && o === "visual" && t.visualViewport && G(t.visualViewport, "resize", l, u), i && k(K("(orientation: portrait)"), () => l()), {
|
|
492
|
-
width: s,
|
|
493
|
-
height: c
|
|
494
|
-
};
|
|
495
|
-
}
|
|
496
|
-
//#endregion
|
|
497
|
-
//#region src/context/TableContext.ts
|
|
498
|
-
var [it, at] = Me((e) => e), ot = [
|
|
18
|
+
}) : n, e)), [Ce, we] = e((e) => e), Te = [
|
|
499
19
|
{
|
|
500
20
|
breakpoint: "xxl",
|
|
501
21
|
span: 4
|
|
@@ -520,7 +40,7 @@ var [it, at] = Me((e) => e), ot = [
|
|
|
520
40
|
breakpoint: "xs",
|
|
521
41
|
span: 1
|
|
522
42
|
}
|
|
523
|
-
],
|
|
43
|
+
], Ee = {
|
|
524
44
|
xs: 0,
|
|
525
45
|
sm: 576,
|
|
526
46
|
md: 768,
|
|
@@ -528,26 +48,26 @@ var [it, at] = Me((e) => e), ot = [
|
|
|
528
48
|
xl: 1200,
|
|
529
49
|
xxl: 1600
|
|
530
50
|
};
|
|
531
|
-
function
|
|
532
|
-
let e =
|
|
51
|
+
function De() {
|
|
52
|
+
let e = t(Ee), { width: n } = l(), r = m(() => ({
|
|
533
53
|
xs: e.isGreaterOrEqual("xs"),
|
|
534
54
|
sm: e.isGreaterOrEqual("sm"),
|
|
535
55
|
md: e.isGreaterOrEqual("md"),
|
|
536
56
|
lg: e.isGreaterOrEqual("lg"),
|
|
537
57
|
xl: e.isGreaterOrEqual("xl"),
|
|
538
58
|
xxl: e.isGreaterOrEqual("xxl")
|
|
539
|
-
})),
|
|
540
|
-
function a(e,
|
|
541
|
-
return
|
|
59
|
+
})), i = m(() => !r.value.xl);
|
|
60
|
+
function a(e, t) {
|
|
61
|
+
return t && typeof t == "object" && Object.keys(t).length > 0 ? U(t, n.value) : Oe(e, r.value);
|
|
542
62
|
}
|
|
543
63
|
return {
|
|
544
|
-
screens:
|
|
545
|
-
isMobile:
|
|
546
|
-
screenWidth:
|
|
64
|
+
screens: r,
|
|
65
|
+
isMobile: i,
|
|
66
|
+
screenWidth: m(() => n.value),
|
|
547
67
|
getRowItemsPerBreakpoint: a
|
|
548
68
|
};
|
|
549
69
|
}
|
|
550
|
-
function
|
|
70
|
+
function U(e, t) {
|
|
551
71
|
let n = 4, r = Object.keys(e).map(Number).filter((e) => !Number.isNaN(e)).sort((e, t) => t - e);
|
|
552
72
|
for (let i of r) if (e[i] && t >= i) {
|
|
553
73
|
n = e[i];
|
|
@@ -555,12 +75,12 @@ function lt(e, t) {
|
|
|
555
75
|
}
|
|
556
76
|
return n;
|
|
557
77
|
}
|
|
558
|
-
function
|
|
78
|
+
function Oe(e, t) {
|
|
559
79
|
let n = 4;
|
|
560
|
-
for (let r = 0; r <
|
|
561
|
-
let i =
|
|
80
|
+
for (let r = 0; r < Te.length; r += 1) {
|
|
81
|
+
let i = Te[r].breakpoint;
|
|
562
82
|
if (t[i]) {
|
|
563
|
-
n = e?.[i] ??
|
|
83
|
+
n = e?.[i] ?? Te[r].span;
|
|
564
84
|
break;
|
|
565
85
|
}
|
|
566
86
|
}
|
|
@@ -568,55 +88,55 @@ function ut(e, t) {
|
|
|
568
88
|
}
|
|
569
89
|
//#endregion
|
|
570
90
|
//#region ../pro-utils/dist/is/nil.js
|
|
571
|
-
function
|
|
91
|
+
function ke(e) {
|
|
572
92
|
return e == null;
|
|
573
93
|
}
|
|
574
94
|
//#endregion
|
|
575
95
|
//#region ../pro-utils/dist/function/object.js
|
|
576
|
-
function
|
|
96
|
+
function Ae(e) {
|
|
577
97
|
return Object.getOwnPropertySymbols(e);
|
|
578
98
|
}
|
|
579
99
|
//#endregion
|
|
580
100
|
//#region ../pro-utils/dist/is/type.js
|
|
581
|
-
function
|
|
101
|
+
function je(e, t) {
|
|
582
102
|
return Object.prototype.toString.call(e) === `[object ${t}]`;
|
|
583
103
|
}
|
|
584
|
-
function
|
|
104
|
+
function Me(e) {
|
|
585
105
|
return typeof e == "boolean";
|
|
586
106
|
}
|
|
587
|
-
function
|
|
107
|
+
function W(e) {
|
|
588
108
|
return typeof e == "number";
|
|
589
109
|
}
|
|
590
|
-
function
|
|
110
|
+
function Ne(e) {
|
|
591
111
|
return Array.isArray === void 0 ? Object.prototype.toString.call(e) === "[object Array]" : Array.isArray(e);
|
|
592
112
|
}
|
|
593
|
-
function
|
|
594
|
-
return e !== null &&
|
|
113
|
+
function G(e) {
|
|
114
|
+
return e !== null && je(e, "Object");
|
|
595
115
|
}
|
|
596
|
-
function
|
|
116
|
+
function Pe(e) {
|
|
597
117
|
return typeof e == "string";
|
|
598
118
|
}
|
|
599
|
-
function
|
|
119
|
+
function Fe(e) {
|
|
600
120
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
|
|
601
121
|
}
|
|
602
122
|
//#endregion
|
|
603
123
|
//#region ../pro-utils/dist/is/primitive.js
|
|
604
|
-
function
|
|
124
|
+
function Ie(e) {
|
|
605
125
|
return e === null || typeof e != "object" && typeof e != "function";
|
|
606
126
|
}
|
|
607
127
|
//#endregion
|
|
608
128
|
//#region ../pro-utils/dist/is/typedArray.js
|
|
609
|
-
function
|
|
129
|
+
function Le(e) {
|
|
610
130
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
611
131
|
}
|
|
612
132
|
//#endregion
|
|
613
133
|
//#region ../pro-utils/dist/is/valid.js
|
|
614
|
-
function
|
|
134
|
+
function Re(e) {
|
|
615
135
|
return e != null && e !== "";
|
|
616
136
|
}
|
|
617
137
|
//#endregion
|
|
618
138
|
//#region ../pro-utils/dist/array/tree.js
|
|
619
|
-
function
|
|
139
|
+
function ze(e = [], t, n = "children") {
|
|
620
140
|
function r(e, t) {
|
|
621
141
|
return t.map((t, i) => {
|
|
622
142
|
let a = `${e}-${i + 1}`;
|
|
@@ -624,29 +144,29 @@ function St(e = [], t, n = "children") {
|
|
|
624
144
|
});
|
|
625
145
|
}
|
|
626
146
|
return structuredClone(e).map((e, i) => {
|
|
627
|
-
let a =
|
|
147
|
+
let a = G(t) && t.current || 1, o = G(t) && t.pageSize || 10, s = `${a ? (a - 1) * o + (i + 1) : i + 1}`;
|
|
628
148
|
return e[n] && (e[n] = r(`${s}`, e[n])), e.sortIndex = s, e;
|
|
629
149
|
});
|
|
630
150
|
}
|
|
631
151
|
//#endregion
|
|
632
152
|
//#region ../pro-utils/dist/clone/getTag.js
|
|
633
|
-
function
|
|
153
|
+
function Be(e) {
|
|
634
154
|
return Object.prototype.toString.call(e);
|
|
635
155
|
}
|
|
636
156
|
//#endregion
|
|
637
157
|
//#region ../pro-utils/dist/clone/tags.js
|
|
638
|
-
var
|
|
158
|
+
var Ve = "[object Arguments]", He = "[object Array]", Ue = "[object ArrayBuffer]", We = "[object Boolean]", Ge = "[object DataView]", Ke = "[object Date]", qe = "[object Float32Array]", Je = "[object Float64Array]", Ye = "[object Int8Array]", Xe = "[object Int16Array]", Ze = "[object Int32Array]", Qe = "[object Map]", $e = "[object Number]", et = "[object Object]", tt = "[object RegExp]", nt = "[object Set]", rt = "[object String]", it = "[object Symbol]", at = "[object Uint8Array]", ot = "[object Uint8ClampedArray]", st = "[object Uint16Array]", ct = "[object Uint32Array]";
|
|
639
159
|
//#endregion
|
|
640
160
|
//#region ../pro-utils/dist/clone/cloneDeepWith.js
|
|
641
|
-
function
|
|
161
|
+
function K(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
642
162
|
let a = i?.(e, t, n, r);
|
|
643
163
|
if (a !== void 0) return a;
|
|
644
|
-
if (
|
|
164
|
+
if (Ie(e)) return e;
|
|
645
165
|
if (r.has(e)) return r.get(e);
|
|
646
166
|
if (Array.isArray(e)) {
|
|
647
167
|
let t = Array.from({ length: e.length });
|
|
648
168
|
r.set(e, t);
|
|
649
|
-
for (let a = 0; a < e.length; a++) t[a] =
|
|
169
|
+
for (let a = 0; a < e.length; a++) t[a] = K(e[a], a, n, r, i);
|
|
650
170
|
return Object.hasOwn(e, "index") && (t.index = e.index), Object.hasOwn(e, "input") && (t.input = e.input), t;
|
|
651
171
|
}
|
|
652
172
|
if (e instanceof Date) return new Date(e.getTime());
|
|
@@ -657,99 +177,99 @@ function J(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
|
657
177
|
if (e instanceof Map) {
|
|
658
178
|
let t = /* @__PURE__ */ new Map();
|
|
659
179
|
r.set(e, t);
|
|
660
|
-
for (let [a, o] of e) t.set(a,
|
|
180
|
+
for (let [a, o] of e) t.set(a, K(o, a, n, r, i));
|
|
661
181
|
return t;
|
|
662
182
|
}
|
|
663
183
|
if (e instanceof Set) {
|
|
664
184
|
let t = /* @__PURE__ */ new Set();
|
|
665
185
|
r.set(e, t);
|
|
666
|
-
for (let a of e) t.add(
|
|
186
|
+
for (let a of e) t.add(K(a, void 0, n, r, i));
|
|
667
187
|
return t;
|
|
668
188
|
}
|
|
669
189
|
if (typeof Buffer < "u" && Buffer.isBuffer(e)) return e.subarray();
|
|
670
|
-
if (
|
|
190
|
+
if (Le(e)) {
|
|
671
191
|
let t = new (Object.getPrototypeOf(e)).constructor(e.length);
|
|
672
192
|
r.set(e, t);
|
|
673
|
-
for (let a = 0; a < e.length; a++) t[a] =
|
|
193
|
+
for (let a = 0; a < e.length; a++) t[a] = K(e[a], a, n, r, i);
|
|
674
194
|
return t;
|
|
675
195
|
}
|
|
676
196
|
if (e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer) return e.slice(0);
|
|
677
197
|
if (e instanceof DataView) {
|
|
678
198
|
let t = new DataView(e.buffer.slice(0), e.byteOffset, e.byteLength);
|
|
679
|
-
return r.set(e, t),
|
|
199
|
+
return r.set(e, t), q(t, e, n, r, i), t;
|
|
680
200
|
}
|
|
681
201
|
if (typeof File < "u" && e instanceof File) {
|
|
682
202
|
let t = new File([e], e.name, { type: e.type });
|
|
683
|
-
return r.set(e, t),
|
|
203
|
+
return r.set(e, t), q(t, e, n, r, i), t;
|
|
684
204
|
}
|
|
685
205
|
if (typeof Blob < "u" && e instanceof Blob) {
|
|
686
206
|
let t = new Blob([e], { type: e.type });
|
|
687
|
-
return r.set(e, t),
|
|
207
|
+
return r.set(e, t), q(t, e, n, r, i), t;
|
|
688
208
|
}
|
|
689
209
|
if (e instanceof Error) {
|
|
690
210
|
let t = new e.constructor();
|
|
691
|
-
return r.set(e, t), t.message = e.message, t.name = e.name, t.stack = e.stack, t.cause = e.cause,
|
|
211
|
+
return r.set(e, t), t.message = e.message, t.name = e.name, t.stack = e.stack, t.cause = e.cause, q(t, e, n, r, i), t;
|
|
692
212
|
}
|
|
693
213
|
if (typeof e == "boolean") {
|
|
694
214
|
let t = !!e.valueOf();
|
|
695
|
-
return r.set(e, t),
|
|
215
|
+
return r.set(e, t), q(t, e, n, r, i), t;
|
|
696
216
|
}
|
|
697
217
|
if (typeof e == "number") {
|
|
698
218
|
let t = Number(e.valueOf());
|
|
699
|
-
return r.set(e, t),
|
|
219
|
+
return r.set(e, t), q(t, e, n, r, i), t;
|
|
700
220
|
}
|
|
701
221
|
if (typeof e == "string") {
|
|
702
222
|
let t = String(e.valueOf());
|
|
703
|
-
return r.set(e, t),
|
|
223
|
+
return r.set(e, t), q(t, e, n, r, i), t;
|
|
704
224
|
}
|
|
705
|
-
if (typeof e == "object" &&
|
|
225
|
+
if (typeof e == "object" && lt(e)) {
|
|
706
226
|
let t = Object.create(Object.getPrototypeOf(e));
|
|
707
|
-
return r.set(e, t),
|
|
227
|
+
return r.set(e, t), q(t, e, n, r, i), t;
|
|
708
228
|
}
|
|
709
229
|
return e;
|
|
710
230
|
}
|
|
711
|
-
function
|
|
712
|
-
let a = [...Object.keys(t), ...
|
|
231
|
+
function q(e, t, n = e, r, i) {
|
|
232
|
+
let a = [...Object.keys(t), ...Ae(t)];
|
|
713
233
|
for (let o = 0; o < a.length; o++) {
|
|
714
234
|
let s = a[o], c = Object.getOwnPropertyDescriptor(e, s);
|
|
715
|
-
(c == null || c.writable) && (e[s] =
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
function
|
|
719
|
-
switch (
|
|
720
|
-
case
|
|
721
|
-
case
|
|
722
|
-
case
|
|
723
|
-
case
|
|
724
|
-
case
|
|
725
|
-
case
|
|
726
|
-
case
|
|
727
|
-
case
|
|
728
|
-
case
|
|
729
|
-
case
|
|
730
|
-
case
|
|
731
|
-
case
|
|
732
|
-
case
|
|
733
|
-
case
|
|
734
|
-
case
|
|
735
|
-
case
|
|
736
|
-
case
|
|
737
|
-
case
|
|
738
|
-
case
|
|
739
|
-
case
|
|
740
|
-
case
|
|
741
|
-
case
|
|
235
|
+
(c == null || c.writable) && (e[s] = K(t[s], s, n, r, i));
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
function lt(e) {
|
|
239
|
+
switch (Be(e)) {
|
|
240
|
+
case Ve:
|
|
241
|
+
case He:
|
|
242
|
+
case Ue:
|
|
243
|
+
case Ge:
|
|
244
|
+
case We:
|
|
245
|
+
case Ke:
|
|
246
|
+
case qe:
|
|
247
|
+
case Je:
|
|
248
|
+
case Ye:
|
|
249
|
+
case Xe:
|
|
250
|
+
case Ze:
|
|
251
|
+
case Qe:
|
|
252
|
+
case $e:
|
|
253
|
+
case et:
|
|
254
|
+
case tt:
|
|
255
|
+
case nt:
|
|
256
|
+
case rt:
|
|
257
|
+
case it:
|
|
258
|
+
case at:
|
|
259
|
+
case ot:
|
|
260
|
+
case st:
|
|
261
|
+
case ct: return !0;
|
|
742
262
|
default: return !1;
|
|
743
263
|
}
|
|
744
264
|
}
|
|
745
265
|
//#endregion
|
|
746
266
|
//#region ../pro-utils/dist/clone/cloneDeep.js
|
|
747
|
-
function
|
|
748
|
-
return
|
|
267
|
+
function ut(e) {
|
|
268
|
+
return K(e, void 0, e, /* @__PURE__ */ new Map(), void 0);
|
|
749
269
|
}
|
|
750
270
|
//#endregion
|
|
751
271
|
//#region ../pro-utils/dist/merge/index.js
|
|
752
|
-
function
|
|
272
|
+
function dt(...e) {
|
|
753
273
|
let t = {}, n = e.length, r, i = 0;
|
|
754
274
|
for (; i < n; i += 1) for (r in e[i]) Object.getOwnPropertyDescriptor(e[i], r) && (typeof t[r] == "object" && typeof e[i][r] == "object" && t[r] !== void 0 && t[r] !== null && !Array.isArray(t[r]) && !Array.isArray(e[i][r]) ? t[r] = {
|
|
755
275
|
...t[r],
|
|
@@ -759,53 +279,53 @@ function Jt(...e) {
|
|
|
759
279
|
}
|
|
760
280
|
//#endregion
|
|
761
281
|
//#region ../pro-utils/dist/object/classNames.js
|
|
762
|
-
function
|
|
282
|
+
function J(...e) {
|
|
763
283
|
let t = [];
|
|
764
284
|
for (let n = 0; n < e.length; n++) {
|
|
765
285
|
let r = e[n];
|
|
766
286
|
if (r) {
|
|
767
|
-
if (
|
|
768
|
-
else if (
|
|
769
|
-
let n =
|
|
287
|
+
if (Pe(r)) t.push(r);
|
|
288
|
+
else if (Ne(r)) for (let e = 0; e < r.length; e++) {
|
|
289
|
+
let n = J(r[e]);
|
|
770
290
|
n && t.push(n);
|
|
771
291
|
}
|
|
772
|
-
else if (
|
|
292
|
+
else if (G(r)) for (let e in r) r[e] && t.push(e);
|
|
773
293
|
}
|
|
774
294
|
}
|
|
775
295
|
return t.filter((e) => e).join(" ");
|
|
776
296
|
}
|
|
777
297
|
//#endregion
|
|
778
298
|
//#region ../pro-utils/dist/slots/index.js
|
|
779
|
-
function
|
|
780
|
-
return
|
|
299
|
+
function ft(e) {
|
|
300
|
+
return e && (e.type === u || e.type === d && e.children.length === 0 || e.type === p && e.children.trim() === "");
|
|
781
301
|
}
|
|
782
|
-
function
|
|
783
|
-
let
|
|
784
|
-
return
|
|
785
|
-
Array.isArray(e) ?
|
|
786
|
-
}),
|
|
302
|
+
function pt(e = [], t = !0) {
|
|
303
|
+
let n = Array.isArray(e) ? e : [e], r = [];
|
|
304
|
+
return n.forEach((e) => {
|
|
305
|
+
Array.isArray(e) ? r.push(...pt(e, t)) : e?.type === d || e?.type === "template" ? r.push(...pt(e.children, t)) : e && y(e) ? t && !ft(e) ? r.push(e) : t || r.push(e) : Re(e) && r.push(e);
|
|
306
|
+
}), r;
|
|
787
307
|
}
|
|
788
|
-
function
|
|
308
|
+
function mt({ vnode: e, defaultVNode: t }, ...n) {
|
|
789
309
|
return e === !1 ? null : typeof e == "function" ? e?.(...n) : e || t;
|
|
790
310
|
}
|
|
791
|
-
function
|
|
792
|
-
return e === !1 ? !1 : e === !0 ? t ?? n :
|
|
311
|
+
function ht({ value: e, slotsValue: t, defaultVNode: n, render: r }) {
|
|
312
|
+
return e === !1 ? !1 : e === !0 ? t ?? n : G(e) && r ? y(e) ? e : t : e || t;
|
|
793
313
|
}
|
|
794
|
-
function
|
|
795
|
-
let { slots: n, key: r = "default", props: i, defaultChildren: a } = e, o = i[r], s = n?.[r]?.(...t), c = typeof a == "function" ? a?.() : a, l =
|
|
314
|
+
function gt(e, ...t) {
|
|
315
|
+
let { slots: n, key: r = "default", props: i, defaultChildren: a } = e, o = i[r], s = n?.[r]?.(...t), c = typeof a == "function" ? a?.() : a, l = ht({
|
|
796
316
|
value: o,
|
|
797
317
|
slotsValue: s,
|
|
798
318
|
defaultVNode: c,
|
|
799
319
|
render: !0
|
|
800
320
|
});
|
|
801
|
-
return l === !1 ? !1 :
|
|
321
|
+
return l === !1 ? !1 : mt({
|
|
802
322
|
vnode: l,
|
|
803
323
|
defaultVNode: c
|
|
804
324
|
}, ...t);
|
|
805
325
|
}
|
|
806
326
|
//#endregion
|
|
807
327
|
//#region ../pro-utils/dist/string/empty.js
|
|
808
|
-
function
|
|
328
|
+
function _t(e, t) {
|
|
809
329
|
let n = ["null", "undefined"], r = !0;
|
|
810
330
|
return e === 0 ? r = !0 : n.includes(e) ? r = !1 : e || (r = !1), r ? {
|
|
811
331
|
value: e,
|
|
@@ -817,11 +337,11 @@ function en(e, t) {
|
|
|
817
337
|
}
|
|
818
338
|
//#endregion
|
|
819
339
|
//#region ../pro-utils/dist/string/uuid.js
|
|
820
|
-
var
|
|
821
|
-
function
|
|
340
|
+
var vt = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
|
|
341
|
+
function yt() {
|
|
822
342
|
return {
|
|
823
343
|
uuid(e, t) {
|
|
824
|
-
let n =
|
|
344
|
+
let n = vt, r = t || n.length;
|
|
825
345
|
if (e) {
|
|
826
346
|
let t = "";
|
|
827
347
|
for (let i = 0; i < e; i += 1) t += n[Math.floor(Math.random() * r)];
|
|
@@ -833,7 +353,7 @@ function nn() {
|
|
|
833
353
|
});
|
|
834
354
|
},
|
|
835
355
|
uuidFast() {
|
|
836
|
-
let e =
|
|
356
|
+
let e = vt, t = Array.from({ length: 36 });
|
|
837
357
|
for (let n = 0; n < 36; n += 1) if (n === 8 || n === 13 || n === 18 || n === 23) t[n] = "-";
|
|
838
358
|
else if (n === 14) t[n] = "4";
|
|
839
359
|
else {
|
|
@@ -855,8 +375,8 @@ function nn() {
|
|
|
855
375
|
}
|
|
856
376
|
//#endregion
|
|
857
377
|
//#region ../pro-utils/dist/table/page.js
|
|
858
|
-
function
|
|
859
|
-
if (
|
|
378
|
+
function bt(e, t) {
|
|
379
|
+
if (G(e)) {
|
|
860
380
|
let { pageSize: n = 10, total: r = 0 } = e, { current: i = 1 } = e;
|
|
861
381
|
return r - t <= n * (i - 1) && --i, i === 0 ? 1 : i;
|
|
862
382
|
}
|
|
@@ -864,7 +384,7 @@ function rn(e, t) {
|
|
|
864
384
|
}
|
|
865
385
|
//#endregion
|
|
866
386
|
//#region src/utils/valueFormat.ts
|
|
867
|
-
var
|
|
387
|
+
var Y = /* @__PURE__ */ Se((/* @__PURE__ */ be(((e, t) => {
|
|
868
388
|
(function(n, r) {
|
|
869
389
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs = r();
|
|
870
390
|
})(e, (function() {
|
|
@@ -1159,36 +679,36 @@ var Z = /* @__PURE__ */ ke((/* @__PURE__ */ De(((e, t) => {
|
|
|
1159
679
|
}, w.en = b[y], w.Ls = b, w.p = {}, w;
|
|
1160
680
|
}));
|
|
1161
681
|
})))(), 1);
|
|
1162
|
-
function
|
|
1163
|
-
if (
|
|
1164
|
-
if (
|
|
682
|
+
function xt(e, t, n = {}) {
|
|
683
|
+
if (ke(e) || e === "" || !t || t === "text") return e;
|
|
684
|
+
if (G(t) && !Array.isArray(t)) {
|
|
1165
685
|
let n = t, r = n.node ?? "span";
|
|
1166
|
-
return
|
|
686
|
+
return v(r === "a" ? "span" : r, {
|
|
1167
687
|
class: n.class,
|
|
1168
688
|
...n.attr ?? {},
|
|
1169
689
|
...n.click ? { onClick: n.click } : {}
|
|
1170
690
|
}, e);
|
|
1171
691
|
}
|
|
1172
692
|
switch (t) {
|
|
1173
|
-
case "link": return
|
|
1174
|
-
case "time": return (0,
|
|
1175
|
-
case "dateMonth": return `${(0,
|
|
1176
|
-
case "date": return (0,
|
|
1177
|
-
case "dateTime": return (0,
|
|
693
|
+
case "link": return v("span", { class: [`${n.className}-a`] }, e);
|
|
694
|
+
case "time": return (0, Y.default)(e).format("HH:mm:ss");
|
|
695
|
+
case "dateMonth": return `${(0, Y.default)(e).month() + 1}月`;
|
|
696
|
+
case "date": return (0, Y.default)(e).format("YYYY-MM-DD");
|
|
697
|
+
case "dateTime": return (0, Y.default)(e).format("YYYY-MM-DD HH:mm:ss");
|
|
1178
698
|
default: return e;
|
|
1179
699
|
}
|
|
1180
700
|
}
|
|
1181
701
|
//#endregion
|
|
1182
702
|
//#region src/hooks/useCellRender.ts
|
|
1183
|
-
function
|
|
703
|
+
function St(e, t, n) {
|
|
1184
704
|
return e.columnEmptyText === void 0 ? n === void 0 ? "-" : typeof n == "function" ? n(t) : n : typeof e.columnEmptyText == "function" ? e.columnEmptyText(t) : e.columnEmptyText;
|
|
1185
705
|
}
|
|
1186
|
-
function
|
|
706
|
+
function Ct(e) {
|
|
1187
707
|
function t(t) {
|
|
1188
708
|
let n = t.render, r = (r, i, a) => {
|
|
1189
709
|
let o = n ? n(r, i, a) : r;
|
|
1190
|
-
!n && t.valueType && !
|
|
1191
|
-
let s =
|
|
710
|
+
!n && t.valueType && !y(o) && (o = xt(o, t.valueType, { className: e.prefixCls.value }));
|
|
711
|
+
let s = St(t, i, e.columnEmptyText?.value), { value: c } = _t(o, s);
|
|
1192
712
|
return c;
|
|
1193
713
|
};
|
|
1194
714
|
return {
|
|
@@ -1200,78 +720,78 @@ function sn(e) {
|
|
|
1200
720
|
}
|
|
1201
721
|
//#endregion
|
|
1202
722
|
//#region src/hooks/useColumns.ts
|
|
1203
|
-
function
|
|
723
|
+
function wt(e) {
|
|
1204
724
|
return e.key ?? e.dataIndex;
|
|
1205
725
|
}
|
|
1206
|
-
function
|
|
1207
|
-
return
|
|
726
|
+
function Tt(e) {
|
|
727
|
+
return wt(e) === "action" || e.dataIndex === "action";
|
|
1208
728
|
}
|
|
1209
|
-
function
|
|
729
|
+
function Et(e) {
|
|
1210
730
|
return e === "left" ? "start" : e === "right" ? "end" : e;
|
|
1211
731
|
}
|
|
1212
|
-
function
|
|
1213
|
-
let r =
|
|
732
|
+
function Dt(e, t, n) {
|
|
733
|
+
let r = wt(e), i = {
|
|
1214
734
|
...e,
|
|
1215
735
|
key: r,
|
|
1216
736
|
dataIndex: e.dataIndex ?? r,
|
|
1217
737
|
order: e.order ?? t,
|
|
1218
738
|
align: e.align ?? n
|
|
1219
739
|
};
|
|
1220
|
-
return e.children?.length && (i.children = e.children.map((e, t) =>
|
|
740
|
+
return e.children?.length && (i.children = e.children.map((e, t) => Dt(e, t, n))), i;
|
|
1221
741
|
}
|
|
1222
|
-
function
|
|
1223
|
-
return e.map((e, n) =>
|
|
742
|
+
function Ot(e, t) {
|
|
743
|
+
return e.map((e, n) => Dt(e, n, t));
|
|
1224
744
|
}
|
|
1225
|
-
function
|
|
745
|
+
function kt(e, t, n) {
|
|
1226
746
|
let r = typeof e == "object" ? e : {};
|
|
1227
747
|
return {
|
|
1228
748
|
title: r.title ?? "序号",
|
|
1229
749
|
align: r.align ?? t,
|
|
1230
|
-
fixed:
|
|
750
|
+
fixed: Et(r.fixed ?? n?.fixed),
|
|
1231
751
|
width: r.width ?? 60,
|
|
1232
|
-
uuid:
|
|
752
|
+
uuid: yt().uuid(15),
|
|
1233
753
|
dataIndex: "sortIndex",
|
|
1234
754
|
key: "sortIndex"
|
|
1235
755
|
};
|
|
1236
756
|
}
|
|
1237
|
-
function
|
|
1238
|
-
return !t || e.length === 0 || e.some((e) => e.dataIndex === "sortIndex" ||
|
|
757
|
+
function At(e, t, n) {
|
|
758
|
+
return !t || e.length === 0 || e.some((e) => e.dataIndex === "sortIndex" || wt(e) === "sortIndex") ? e : [kt(t === !0 ? !0 : t, n, e[0]), ...e];
|
|
1239
759
|
}
|
|
1240
|
-
function
|
|
1241
|
-
return t ? e.map((e) => !
|
|
760
|
+
function jt(e, t) {
|
|
761
|
+
return t ? e.map((e) => !Tt(e) || e.fixed !== void 0 ? e : {
|
|
1242
762
|
...e,
|
|
1243
763
|
fixed: "end"
|
|
1244
764
|
}) : e;
|
|
1245
765
|
}
|
|
1246
|
-
function
|
|
766
|
+
function Mt(e) {
|
|
1247
767
|
return e.filter((e) => e.show !== !1);
|
|
1248
768
|
}
|
|
1249
|
-
function
|
|
769
|
+
function Nt(e) {
|
|
1250
770
|
return [...e].sort((e, t) => (e.order ?? 0) - (t.order ?? 0));
|
|
1251
771
|
}
|
|
1252
|
-
function
|
|
1253
|
-
let t =
|
|
772
|
+
function Pt(e) {
|
|
773
|
+
let t = j(null), n = P(() => e.columns.value, () => {
|
|
1254
774
|
t.value = null;
|
|
1255
775
|
});
|
|
1256
|
-
|
|
1257
|
-
let r =
|
|
1258
|
-
let t =
|
|
776
|
+
D(() => n());
|
|
777
|
+
let r = m(() => jt(Ot(At(t.value ?? e.columns.value, e.indexColumn?.value, e.align.value), e.align.value), !!e.shouldFixActionColumn?.value)), i = m(() => {
|
|
778
|
+
let t = Nt(Mt(r.value));
|
|
1259
779
|
return e.wrapColumnRender ? t.map((t) => e.wrapColumnRender(t)) : t;
|
|
1260
780
|
});
|
|
1261
|
-
function
|
|
781
|
+
function a(e) {
|
|
1262
782
|
t.value = e;
|
|
1263
783
|
}
|
|
1264
784
|
return {
|
|
1265
|
-
tableColumns:
|
|
785
|
+
tableColumns: i,
|
|
1266
786
|
cacheColumns: r,
|
|
1267
|
-
setColumns:
|
|
787
|
+
setColumns: a
|
|
1268
788
|
};
|
|
1269
789
|
}
|
|
1270
790
|
//#endregion
|
|
1271
791
|
//#region src/hooks/useColumnResize.ts
|
|
1272
|
-
var
|
|
1273
|
-
function
|
|
1274
|
-
return
|
|
792
|
+
var Ft = 40;
|
|
793
|
+
function It() {
|
|
794
|
+
return g({
|
|
1275
795
|
name: "ResizableTitle",
|
|
1276
796
|
inheritAttrs: !1,
|
|
1277
797
|
props: {
|
|
@@ -1285,13 +805,13 @@ function bn() {
|
|
|
1285
805
|
}
|
|
1286
806
|
},
|
|
1287
807
|
setup(e, { slots: t, attrs: n }) {
|
|
1288
|
-
let r =
|
|
808
|
+
let r = j(!1), i = j(!1), a = j(0), o = j(0);
|
|
1289
809
|
function s(t) {
|
|
1290
810
|
t.preventDefault(), t.stopPropagation(), r.value = !0, i.value = !1, a.value = t.clientX, o.value = e.width || t.currentTarget?.parentElement?.offsetWidth || 0;
|
|
1291
811
|
function n(t) {
|
|
1292
812
|
if (!r.value) return;
|
|
1293
813
|
i.value = !0;
|
|
1294
|
-
let n = Math.max(o.value + t.clientX - a.value,
|
|
814
|
+
let n = Math.max(o.value + t.clientX - a.value, Ft);
|
|
1295
815
|
e.onResize?.(t, { size: { width: n } });
|
|
1296
816
|
}
|
|
1297
817
|
function s() {
|
|
@@ -1304,7 +824,7 @@ function bn() {
|
|
|
1304
824
|
function c(e) {
|
|
1305
825
|
i.value &&= (e.stopPropagation(), e.preventDefault(), !1);
|
|
1306
826
|
}
|
|
1307
|
-
return () => e.width == null ?
|
|
827
|
+
return () => e.width == null ? v("th", n, t.default?.()) : v("th", {
|
|
1308
828
|
...n,
|
|
1309
829
|
class: ["resizable-title", n.class],
|
|
1310
830
|
style: {
|
|
@@ -1312,83 +832,83 @@ function bn() {
|
|
|
1312
832
|
width: `${e.width}px`
|
|
1313
833
|
},
|
|
1314
834
|
onClickCapture: c
|
|
1315
|
-
}, [t.default?.(),
|
|
835
|
+
}, [t.default?.(), v("span", {
|
|
1316
836
|
class: "resizable-handle",
|
|
1317
837
|
onMousedown: s
|
|
1318
838
|
})]);
|
|
1319
839
|
}
|
|
1320
840
|
});
|
|
1321
841
|
}
|
|
1322
|
-
function
|
|
1323
|
-
let t =
|
|
842
|
+
function Lt(e) {
|
|
843
|
+
let t = j(/* @__PURE__ */ new Map());
|
|
1324
844
|
function n(e, n) {
|
|
1325
845
|
let r = new Map(t.value);
|
|
1326
846
|
r.set(e, n.size.width), t.value = r;
|
|
1327
847
|
}
|
|
1328
|
-
let r =
|
|
848
|
+
let r = It(), i = m(() => {
|
|
1329
849
|
let r = e.columns.value, i = t.value;
|
|
1330
850
|
return r.map((t) => {
|
|
1331
|
-
let r =
|
|
851
|
+
let r = wt(t), a = i.get(r);
|
|
1332
852
|
return {
|
|
1333
853
|
...t,
|
|
1334
854
|
...a == null ? {} : { width: a },
|
|
1335
855
|
onHeaderCell: (t) => ({
|
|
1336
856
|
width: t.width,
|
|
1337
857
|
onResize: (r, i) => {
|
|
1338
|
-
n(
|
|
858
|
+
n(wt(t), i), e.onResize?.(i.size.width, t);
|
|
1339
859
|
}
|
|
1340
860
|
})
|
|
1341
861
|
};
|
|
1342
862
|
});
|
|
1343
|
-
}),
|
|
1344
|
-
return
|
|
863
|
+
}), a = m(() => ({ header: { cell: r } }));
|
|
864
|
+
return D(() => {
|
|
1345
865
|
t.value = /* @__PURE__ */ new Map();
|
|
1346
866
|
}), {
|
|
1347
|
-
resizableColumns:
|
|
1348
|
-
resizableComponents:
|
|
867
|
+
resizableColumns: i,
|
|
868
|
+
resizableComponents: a
|
|
1349
869
|
};
|
|
1350
870
|
}
|
|
1351
871
|
//#endregion
|
|
1352
872
|
//#region src/hooks/useFetchData.ts
|
|
1353
|
-
var
|
|
1354
|
-
function
|
|
1355
|
-
let { rowKey:
|
|
1356
|
-
function
|
|
1357
|
-
|
|
873
|
+
var Rt = [];
|
|
874
|
+
function zt(e, t) {
|
|
875
|
+
let { rowKey: r, polling: i, pollingTime: a, request: o, postData: s, dataSource: c, immediate: l, waitRequest: u, autoRequest: d, debounceTime: f, params: p, defaultFormSearch: h, onLoadingChange: g, onRequestError: _, onBeforeSearchSubmit: v } = e, { pageInfo: y, paginationInfo: b, setPagination: x, setLoading: S, setColumns: w, removeRowKeys: E, syncSelectedRows: D, columns: k } = t, j = A([]), ee = A(!1), N = A(null), te = A(null), ne = A("");
|
|
876
|
+
function re(e) {
|
|
877
|
+
g && g(e);
|
|
1358
878
|
}
|
|
1359
|
-
function
|
|
1360
|
-
|
|
879
|
+
function F() {
|
|
880
|
+
N.value != null && (clearTimeout(N.value), N.value = null);
|
|
1361
881
|
}
|
|
1362
|
-
function
|
|
1363
|
-
|
|
882
|
+
function ie() {
|
|
883
|
+
F();
|
|
1364
884
|
}
|
|
1365
|
-
function
|
|
1366
|
-
if (
|
|
885
|
+
function I(e) {
|
|
886
|
+
if (ee.value || !i.value) return;
|
|
1367
887
|
let t = Math.max(a.value || 2e3, 2e3);
|
|
1368
|
-
|
|
1369
|
-
|
|
888
|
+
F(), N.value = setTimeout(() => {
|
|
889
|
+
V({
|
|
1370
890
|
...e,
|
|
1371
891
|
isPolling: !0
|
|
1372
892
|
});
|
|
1373
893
|
}, t);
|
|
1374
894
|
}
|
|
1375
|
-
function
|
|
1376
|
-
|
|
895
|
+
function L() {
|
|
896
|
+
te.value?.abort(), te.value = null;
|
|
1377
897
|
}
|
|
1378
|
-
function
|
|
1379
|
-
if (
|
|
898
|
+
function R(e) {
|
|
899
|
+
if (j.value = ze(e, M(y)), !o || !Fe(o)) {
|
|
1380
900
|
let t = e.length || 0;
|
|
1381
|
-
t !==
|
|
901
|
+
t !== y.total && x({ total: t });
|
|
1382
902
|
}
|
|
1383
903
|
}
|
|
1384
|
-
async function
|
|
904
|
+
async function z(e = {}) {
|
|
1385
905
|
let { pagination: t = {}, filters: n = {}, sorter: r = {}, removeKeys: i = [], isPolling: a = !1, extra: l } = e;
|
|
1386
|
-
if (!o || !
|
|
1387
|
-
a || (
|
|
906
|
+
if (!o || !Fe(o)) return c.value || [];
|
|
907
|
+
a || (S(!0), re(!0)), t && Object.keys(t).length && x(t);
|
|
1388
908
|
try {
|
|
1389
|
-
i.length &&
|
|
1390
|
-
let t =
|
|
1391
|
-
|
|
909
|
+
i.length && E(i);
|
|
910
|
+
let t = G(r) && Object.keys(r).length ? [r] : Ne(r) ? r : [];
|
|
911
|
+
w && k && w(k.value.map((e) => {
|
|
1392
912
|
let n = t.find((t) => (t?.columnKey || t?.field) === e.dataIndex);
|
|
1393
913
|
return {
|
|
1394
914
|
...e,
|
|
@@ -1396,24 +916,24 @@ function Cn(e, t) {
|
|
|
1396
916
|
};
|
|
1397
917
|
}));
|
|
1398
918
|
let a = {
|
|
1399
|
-
...
|
|
1400
|
-
pageSize:
|
|
1401
|
-
current:
|
|
919
|
+
...b.value === !1 ? {} : {
|
|
920
|
+
pageSize: y.pageSize,
|
|
921
|
+
current: bt(M(y), i.length)
|
|
1402
922
|
},
|
|
1403
|
-
...
|
|
1404
|
-
...
|
|
923
|
+
...M(h.value),
|
|
924
|
+
...M(p.value),
|
|
1405
925
|
...e.params || {}
|
|
1406
926
|
};
|
|
1407
|
-
v &&
|
|
927
|
+
v && Fe(v) && (a = await v({
|
|
1408
928
|
params: a,
|
|
1409
929
|
sorter: t,
|
|
1410
930
|
filter: n,
|
|
1411
931
|
extra: l
|
|
1412
932
|
}));
|
|
1413
|
-
let c = `table_request_${
|
|
1414
|
-
|
|
933
|
+
let c = `table_request_${yt().uuid(10)}`;
|
|
934
|
+
ne.value = c;
|
|
1415
935
|
let u = new AbortController();
|
|
1416
|
-
|
|
936
|
+
te.value = u;
|
|
1417
937
|
let d = await o({
|
|
1418
938
|
params: { ...a },
|
|
1419
939
|
sorter: t,
|
|
@@ -1421,49 +941,49 @@ function Cn(e, t) {
|
|
|
1421
941
|
extra: l,
|
|
1422
942
|
signal: u.signal
|
|
1423
943
|
});
|
|
1424
|
-
if (
|
|
944
|
+
if (ne.value !== c || u.signal.aborted) return [];
|
|
1425
945
|
if (d) {
|
|
1426
946
|
let { success: t = !0, data: n = [] } = d;
|
|
1427
947
|
if (!t) return [];
|
|
1428
948
|
let r = typeof s == "function" ? s(n) : n, i = d.total || r.length || 0;
|
|
1429
|
-
return i !==
|
|
949
|
+
return i !== y.total && x({ total: i }), R(r), D(r), I(e), r;
|
|
1430
950
|
}
|
|
1431
951
|
return [];
|
|
1432
952
|
} catch (e) {
|
|
1433
953
|
if (e.name === "AbortError") return [];
|
|
1434
|
-
if (
|
|
954
|
+
if (_) return j.value === void 0 && R([]), _(e), [];
|
|
1435
955
|
throw e;
|
|
1436
956
|
} finally {
|
|
1437
|
-
a || (
|
|
957
|
+
a || (S(!1), re(!1));
|
|
1438
958
|
}
|
|
1439
959
|
}
|
|
1440
|
-
let
|
|
1441
|
-
function
|
|
1442
|
-
|
|
960
|
+
let B = n((e) => z(e), () => f.value ?? 10);
|
|
961
|
+
function V(e = {}) {
|
|
962
|
+
L(), B(e);
|
|
1443
963
|
}
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
}),
|
|
1447
|
-
|
|
1448
|
-
}),
|
|
1449
|
-
|
|
1450
|
-
}),
|
|
1451
|
-
e && !
|
|
964
|
+
C(() => {
|
|
965
|
+
ee.value = !1;
|
|
966
|
+
}), O(() => {
|
|
967
|
+
ee.value = !0, L(), ie();
|
|
968
|
+
}), T(() => {
|
|
969
|
+
ee.value = !0, L(), ie();
|
|
970
|
+
}), P(() => c.value, (e) => {
|
|
971
|
+
e && !Fe(o) && R(e);
|
|
1452
972
|
}, {
|
|
1453
973
|
deep: !0,
|
|
1454
974
|
immediate: !0
|
|
1455
|
-
}),
|
|
1456
|
-
u.value || d.value && (
|
|
1457
|
-
}, { deep: !0 }),
|
|
1458
|
-
u.value || e !== t && (
|
|
1459
|
-
}, { deep: !0 }),
|
|
1460
|
-
u.value || (
|
|
1461
|
-
}),
|
|
1462
|
-
e ? (
|
|
1463
|
-
}), !u.value && l.value &&
|
|
1464
|
-
let
|
|
1465
|
-
function
|
|
1466
|
-
|
|
975
|
+
}), P(() => p.value, () => {
|
|
976
|
+
u.value || d.value && (x({ current: 1 }), V({ isPolling: !1 }));
|
|
977
|
+
}, { deep: !0 }), P(() => h.value, (e, t) => {
|
|
978
|
+
u.value || e !== t && (x({ current: 1 }), V({ isPolling: !1 }));
|
|
979
|
+
}, { deep: !0 }), P(() => i.value, () => {
|
|
980
|
+
u.value || (i.value ? V({ isPolling: !0 }) : ie());
|
|
981
|
+
}), P(() => u.value, (e) => {
|
|
982
|
+
e ? (S(!0), re(!0)) : l.value && V({ isPolling: !1 });
|
|
983
|
+
}), !u.value && l.value && V({ isPolling: !1 });
|
|
984
|
+
let ae = m(() => j.value.some((e) => Ne(e.children) && e.children.length > 0));
|
|
985
|
+
function oe(e, t = {}, n = {}, r) {
|
|
986
|
+
V({
|
|
1467
987
|
pagination: e,
|
|
1468
988
|
filters: t,
|
|
1469
989
|
sorter: n,
|
|
@@ -1471,132 +991,132 @@ function Cn(e, t) {
|
|
|
1471
991
|
isPolling: !1
|
|
1472
992
|
});
|
|
1473
993
|
}
|
|
1474
|
-
function
|
|
1475
|
-
let { key: t, row:
|
|
1476
|
-
switch (!
|
|
994
|
+
function se(e) {
|
|
995
|
+
let { key: t, row: n, value: i, type: a = "update" } = e, o = t ?? r.value, s = n?.[o] ?? i;
|
|
996
|
+
switch (!n && a !== "delete" && console.warn("row is required"), a) {
|
|
1477
997
|
case "update":
|
|
1478
|
-
o && s &&
|
|
998
|
+
o && s && n && (j.value = j.value.map((e) => s === e[o] ? dt({}, e, n) : e));
|
|
1479
999
|
break;
|
|
1480
1000
|
case "push":
|
|
1481
|
-
|
|
1001
|
+
n && j.value.push(n);
|
|
1482
1002
|
break;
|
|
1483
1003
|
case "unshift":
|
|
1484
|
-
|
|
1004
|
+
n && j.value.unshift(n);
|
|
1485
1005
|
break;
|
|
1486
1006
|
case "delete":
|
|
1487
|
-
o && (
|
|
1007
|
+
o && (j.value = j.value.filter((e) => i !== e[o]));
|
|
1488
1008
|
break;
|
|
1489
1009
|
}
|
|
1490
1010
|
}
|
|
1491
|
-
function
|
|
1492
|
-
u.value || (o ?
|
|
1011
|
+
function ce(e) {
|
|
1012
|
+
u.value || (o ? V({
|
|
1493
1013
|
...e,
|
|
1494
1014
|
isPolling: !1
|
|
1495
|
-
}) :
|
|
1015
|
+
}) : R(c.value || []));
|
|
1496
1016
|
}
|
|
1497
|
-
function
|
|
1498
|
-
|
|
1017
|
+
function le(e) {
|
|
1018
|
+
ce(e);
|
|
1499
1019
|
}
|
|
1500
1020
|
return {
|
|
1501
|
-
dataSource:
|
|
1502
|
-
isTreeDataRef:
|
|
1503
|
-
setTableDataList:
|
|
1504
|
-
operateTableDataRow:
|
|
1505
|
-
handleTableChange:
|
|
1506
|
-
run:
|
|
1507
|
-
reload:
|
|
1021
|
+
dataSource: m(() => j.value.length ? j.value : Rt),
|
|
1022
|
+
isTreeDataRef: ae,
|
|
1023
|
+
setTableDataList: R,
|
|
1024
|
+
operateTableDataRow: se,
|
|
1025
|
+
handleTableChange: oe,
|
|
1026
|
+
run: ce,
|
|
1027
|
+
reload: le
|
|
1508
1028
|
};
|
|
1509
1029
|
}
|
|
1510
1030
|
//#endregion
|
|
1511
1031
|
//#region ../pro-hooks/dist/core/useIsIos.js
|
|
1512
|
-
var
|
|
1513
|
-
typeof window > "u" ||
|
|
1032
|
+
var Bt = (typeof window > "u" ? !1 : /iPad|iPhone|iPod/.test(navigator.platform) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1) && !window.MSStream;
|
|
1033
|
+
typeof window > "u" || Bt || window.safari;
|
|
1514
1034
|
//#endregion
|
|
1515
1035
|
//#region ../pro-hooks/dist/lifeCycle/onMountedOrActivated.js
|
|
1516
|
-
function
|
|
1036
|
+
function Vt(e) {
|
|
1517
1037
|
let t = !1;
|
|
1518
|
-
|
|
1519
|
-
e(!1),
|
|
1038
|
+
E(() => {
|
|
1039
|
+
e(!1), S(() => {
|
|
1520
1040
|
t = !0;
|
|
1521
1041
|
});
|
|
1522
|
-
}),
|
|
1042
|
+
}), C(() => {
|
|
1523
1043
|
t && e(!0);
|
|
1524
1044
|
});
|
|
1525
1045
|
}
|
|
1526
1046
|
//#endregion
|
|
1527
1047
|
//#region src/components/ScrollBar/context.ts
|
|
1528
|
-
var [
|
|
1048
|
+
var [Ht, Ut] = e((e) => e);
|
|
1529
1049
|
//#endregion
|
|
1530
1050
|
//#region src/hooks/useFitPage.ts
|
|
1531
|
-
function
|
|
1051
|
+
function Wt(e, t, n) {
|
|
1532
1052
|
n.toolbarEl.value = e.querySelector(`.${t}-list-toolbar`) ?? void 0, n.headerEl.value = e.querySelector(".ant-table-header") ?? void 0, n.pageEl.value = e.querySelector(".ant-table-pagination") ?? void 0, n.scrollEl.value = e.querySelector(".ant-table-body") ?? void 0, n.bodyInnerEl.value = e.querySelector(".ant-table-body > table") ?? void 0;
|
|
1533
1053
|
}
|
|
1534
|
-
function
|
|
1054
|
+
function Gt(e) {
|
|
1535
1055
|
if (!e) return 0;
|
|
1536
1056
|
let t = getComputedStyle(e);
|
|
1537
1057
|
return (Number.parseFloat(t.marginTop) || 0) + (Number.parseFloat(t.marginBottom) || 0);
|
|
1538
1058
|
}
|
|
1539
|
-
function
|
|
1540
|
-
let { fitPage: t, cardEl: n, prefixCls:
|
|
1541
|
-
toolbarEl:
|
|
1542
|
-
headerEl:
|
|
1543
|
-
pageEl:
|
|
1544
|
-
scrollEl:
|
|
1545
|
-
bodyInnerEl:
|
|
1546
|
-
}, { height:
|
|
1547
|
-
|
|
1548
|
-
n.value &&
|
|
1059
|
+
function Kt(e) {
|
|
1060
|
+
let { fitPage: t, cardEl: n, prefixCls: i } = e, a = A(), l = A(), u = A(), d = A(), f = A(), p = A(), h = {
|
|
1061
|
+
toolbarEl: l,
|
|
1062
|
+
headerEl: u,
|
|
1063
|
+
pageEl: d,
|
|
1064
|
+
scrollEl: f,
|
|
1065
|
+
bodyInnerEl: p
|
|
1066
|
+
}, { height: g } = r(n), { height: _ } = r(l), { height: v } = r(u), { height: y } = r(d), { height: b } = r(p);
|
|
1067
|
+
o(n, () => {
|
|
1068
|
+
n.value && Wt(n.value, i.value, h);
|
|
1549
1069
|
}, {
|
|
1550
1070
|
childList: !0,
|
|
1551
1071
|
subtree: !0
|
|
1552
|
-
}),
|
|
1553
|
-
n.value &&
|
|
1072
|
+
}), Vt(() => {
|
|
1073
|
+
n.value && Wt(n.value, i.value, h);
|
|
1554
1074
|
});
|
|
1555
|
-
let
|
|
1075
|
+
let x = m(() => Gt(l.value)), S = m(() => Gt(d.value)), C = m(() => {
|
|
1556
1076
|
if (!n.value || !t.value) return 0;
|
|
1557
|
-
let e =
|
|
1077
|
+
let e = g.value - _.value - x.value - v.value - y.value - S.value;
|
|
1558
1078
|
return Math.max(0, e);
|
|
1559
|
-
}),
|
|
1560
|
-
return
|
|
1561
|
-
|
|
1562
|
-
}),
|
|
1563
|
-
|
|
1564
|
-
} }),
|
|
1079
|
+
}), w = m(() => !C.value || !t.value ? !1 : b.value <= C.value), T = m(() => t.value ? `${i.value}-full-page` : "");
|
|
1080
|
+
return ne(() => {
|
|
1081
|
+
f.value && (t.value && C.value > 0 ? f.value.style.height = `${C.value}px` : f.value.style.height = "");
|
|
1082
|
+
}), c(f, { onScroll: () => {
|
|
1083
|
+
f.value && a.value?.handleScroll(f.value);
|
|
1084
|
+
} }), s(f, () => {
|
|
1565
1085
|
a.value?.update();
|
|
1566
|
-
}),
|
|
1567
|
-
className: `${
|
|
1568
|
-
tableHeaderHeight:
|
|
1569
|
-
tableScrollYHeight:
|
|
1086
|
+
}), Ht({
|
|
1087
|
+
className: `${i.value}-scroll`,
|
|
1088
|
+
tableHeaderHeight: v,
|
|
1089
|
+
tableScrollYHeight: C,
|
|
1570
1090
|
scrollbarElement: n,
|
|
1571
|
-
wrapElement:
|
|
1091
|
+
wrapElement: f
|
|
1572
1092
|
}), {
|
|
1573
|
-
scrollY:
|
|
1574
|
-
overflowHidden:
|
|
1575
|
-
fullPageClass:
|
|
1576
|
-
scrollEl:
|
|
1093
|
+
scrollY: C,
|
|
1094
|
+
overflowHidden: w,
|
|
1095
|
+
fullPageClass: T,
|
|
1096
|
+
scrollEl: f,
|
|
1577
1097
|
barRef: a
|
|
1578
1098
|
};
|
|
1579
1099
|
}
|
|
1580
1100
|
//#endregion
|
|
1581
1101
|
//#region src/hooks/useKeepAliveReload.ts
|
|
1582
|
-
function
|
|
1583
|
-
|
|
1102
|
+
function qt(e) {
|
|
1103
|
+
_() ? C(e) : S(e);
|
|
1584
1104
|
}
|
|
1585
|
-
function
|
|
1586
|
-
let t =
|
|
1587
|
-
return
|
|
1105
|
+
function Jt(e) {
|
|
1106
|
+
let t = A(!1);
|
|
1107
|
+
return qt(() => {
|
|
1588
1108
|
t.value ? e.enabled.value && e.reload() : t.value = !0;
|
|
1589
1109
|
}), { hasActivated: t };
|
|
1590
1110
|
}
|
|
1591
1111
|
//#endregion
|
|
1592
1112
|
//#region src/hooks/useLoading.ts
|
|
1593
|
-
function
|
|
1594
|
-
return
|
|
1113
|
+
function Yt(e, t = !1) {
|
|
1114
|
+
return Me(e) ? e : G(e) ? e.spinning ?? t : t;
|
|
1595
1115
|
}
|
|
1596
|
-
function
|
|
1597
|
-
let t =
|
|
1598
|
-
|
|
1599
|
-
let r =
|
|
1116
|
+
function Xt(e) {
|
|
1117
|
+
let t = A(Yt(e.loading.value));
|
|
1118
|
+
P(() => e.loading.value, (n) => {
|
|
1119
|
+
let r = Yt(n, t.value);
|
|
1600
1120
|
r !== t.value && (t.value = r, e.onChange?.(r));
|
|
1601
1121
|
});
|
|
1602
1122
|
function n(n) {
|
|
@@ -1609,7 +1129,7 @@ function Pn(e) {
|
|
|
1609
1129
|
}
|
|
1610
1130
|
//#endregion
|
|
1611
1131
|
//#region src/hooks/usePagination.ts
|
|
1612
|
-
var
|
|
1132
|
+
var Zt = {
|
|
1613
1133
|
current: 1,
|
|
1614
1134
|
pageSize: 10,
|
|
1615
1135
|
showQuickJumper: !0,
|
|
@@ -1621,19 +1141,19 @@ var Fn = {
|
|
|
1621
1141
|
"100"
|
|
1622
1142
|
]
|
|
1623
1143
|
};
|
|
1624
|
-
function
|
|
1625
|
-
let t =
|
|
1626
|
-
current:
|
|
1627
|
-
pageSize:
|
|
1144
|
+
function Qt({ pagination: e }) {
|
|
1145
|
+
let t = A({ ...Zt }), n = k({
|
|
1146
|
+
current: Zt.current,
|
|
1147
|
+
pageSize: Zt.pageSize,
|
|
1628
1148
|
total: 0
|
|
1629
1149
|
});
|
|
1630
|
-
|
|
1150
|
+
P(() => e.value, (e) => {
|
|
1631
1151
|
if (e === !1) {
|
|
1632
1152
|
t.value = !1;
|
|
1633
1153
|
return;
|
|
1634
1154
|
}
|
|
1635
1155
|
let n = {
|
|
1636
|
-
...
|
|
1156
|
+
...Zt,
|
|
1637
1157
|
...e || {}
|
|
1638
1158
|
};
|
|
1639
1159
|
t.value = n, r(n);
|
|
@@ -1642,14 +1162,14 @@ function In({ pagination: e }) {
|
|
|
1642
1162
|
immediate: !0
|
|
1643
1163
|
});
|
|
1644
1164
|
function r(e) {
|
|
1645
|
-
|
|
1165
|
+
W(e.current) && (n.current = e.current), W(e.pageSize) && (n.pageSize = e.pageSize), W(e.total) && (n.total = e.total);
|
|
1646
1166
|
}
|
|
1647
|
-
function
|
|
1648
|
-
t.value !== !1 && (t.value =
|
|
1167
|
+
function i(e) {
|
|
1168
|
+
t.value !== !1 && (t.value = dt({}, t.value, e), r(e));
|
|
1649
1169
|
}
|
|
1650
1170
|
return {
|
|
1651
1171
|
paginationInfo: t,
|
|
1652
|
-
paginationAlign:
|
|
1172
|
+
paginationAlign: m(() => {
|
|
1653
1173
|
let e = t.value;
|
|
1654
1174
|
if (!e) return "end";
|
|
1655
1175
|
let n = e.placement;
|
|
@@ -1658,179 +1178,179 @@ function In({ pagination: e }) {
|
|
|
1658
1178
|
return r ? r.includes("Start") ? "start" : r.includes("Center") ? "center" : "end" : "end";
|
|
1659
1179
|
}),
|
|
1660
1180
|
requestPagination: n,
|
|
1661
|
-
setPagination:
|
|
1181
|
+
setPagination: i
|
|
1662
1182
|
};
|
|
1663
1183
|
}
|
|
1664
1184
|
//#endregion
|
|
1665
1185
|
//#region src/hooks/useRequestOptions.ts
|
|
1666
|
-
function
|
|
1667
|
-
let t =
|
|
1186
|
+
function $t(e) {
|
|
1187
|
+
let t = A([]), r = A(!1), i = A("idle"), a = n(async () => {
|
|
1668
1188
|
if (e.fetch) {
|
|
1669
|
-
|
|
1189
|
+
r.value = !0, i.value = "loading";
|
|
1670
1190
|
try {
|
|
1671
1191
|
let n = await e.fetch();
|
|
1672
|
-
return t.value = n ?? [],
|
|
1192
|
+
return t.value = n ?? [], i.value = "success", n;
|
|
1673
1193
|
} catch (e) {
|
|
1674
|
-
console.error("[useRequestOptions] fetch error:", e),
|
|
1194
|
+
console.error("[useRequestOptions] fetch error:", e), i.value = "error", t.value = [];
|
|
1675
1195
|
return;
|
|
1676
1196
|
} finally {
|
|
1677
|
-
|
|
1197
|
+
r.value = !1;
|
|
1678
1198
|
}
|
|
1679
1199
|
}
|
|
1680
1200
|
}, e.debounceTime ?? 10);
|
|
1681
|
-
return e.fetch && !e.manual &&
|
|
1682
|
-
t.value = [],
|
|
1201
|
+
return e.fetch && !e.manual && a(), O(() => {
|
|
1202
|
+
t.value = [], r.value = !1;
|
|
1683
1203
|
}), {
|
|
1684
1204
|
optionList: t,
|
|
1685
|
-
loading:
|
|
1686
|
-
status:
|
|
1687
|
-
fetchOptions:
|
|
1205
|
+
loading: r,
|
|
1206
|
+
status: i,
|
|
1207
|
+
fetchOptions: a
|
|
1688
1208
|
};
|
|
1689
1209
|
}
|
|
1690
1210
|
//#endregion
|
|
1691
1211
|
//#region src/hooks/useRowSelection.ts
|
|
1692
|
-
function
|
|
1212
|
+
function X(e, t) {
|
|
1693
1213
|
return e[t];
|
|
1694
1214
|
}
|
|
1695
|
-
function
|
|
1696
|
-
let t =
|
|
1215
|
+
function en(e) {
|
|
1216
|
+
let t = k(/* @__PURE__ */ new Map()), n = P(() => e.rowSelection.value?.selectedRowKeys, (n) => {
|
|
1697
1217
|
if (!n) return;
|
|
1698
1218
|
let r = /* @__PURE__ */ new Map(), i = e.dataSource.value;
|
|
1699
1219
|
for (let a of n) {
|
|
1700
|
-
let n = t.get(a), o = i.find((t) =>
|
|
1220
|
+
let n = t.get(a), o = i.find((t) => X(t, e.rowKey.value) === a);
|
|
1701
1221
|
r.set(a, o ?? n);
|
|
1702
1222
|
}
|
|
1703
1223
|
t.clear();
|
|
1704
1224
|
for (let [e, n] of r) t.set(e, n);
|
|
1705
1225
|
}, { immediate: !0 });
|
|
1706
|
-
|
|
1707
|
-
let r =
|
|
1708
|
-
function
|
|
1709
|
-
e.rowSelection.value?.onChange?.(r.value,
|
|
1226
|
+
D(() => n());
|
|
1227
|
+
let r = m(() => Array.from(t.keys())), i = m(() => Array.from(t.values()).filter((e) => e != null));
|
|
1228
|
+
function a(t) {
|
|
1229
|
+
e.rowSelection.value?.onChange?.(r.value, i.value, { type: t });
|
|
1710
1230
|
}
|
|
1711
|
-
function
|
|
1712
|
-
let i =
|
|
1713
|
-
r ? (
|
|
1231
|
+
function o(n, r) {
|
|
1232
|
+
let i = X(n, e.rowKey.value), o = e.rowSelection.value?.type ?? "checkbox";
|
|
1233
|
+
r ? (o === "radio" && t.clear(), t.set(i, n)) : t.delete(i), a(r ? o === "radio" ? "single" : "multiple" : "none");
|
|
1714
1234
|
}
|
|
1715
|
-
function
|
|
1716
|
-
if (r) for (let r of n) t.set(
|
|
1717
|
-
else for (let r of n) t.delete(
|
|
1718
|
-
|
|
1235
|
+
function s(n, r) {
|
|
1236
|
+
if (r) for (let r of n) t.set(X(r, e.rowKey.value), r);
|
|
1237
|
+
else for (let r of n) t.delete(X(r, e.rowKey.value));
|
|
1238
|
+
a(r ? "all" : "none");
|
|
1719
1239
|
}
|
|
1720
|
-
function
|
|
1240
|
+
function c(e) {
|
|
1721
1241
|
for (let n of e) t.delete(n);
|
|
1722
|
-
|
|
1242
|
+
a("none");
|
|
1723
1243
|
}
|
|
1724
|
-
function
|
|
1725
|
-
t.clear(),
|
|
1244
|
+
function l() {
|
|
1245
|
+
t.clear(), a("none");
|
|
1726
1246
|
}
|
|
1727
|
-
function
|
|
1247
|
+
function u() {
|
|
1728
1248
|
let n = e.dataSource.value, r = e.rowKey.value;
|
|
1729
1249
|
for (let [e, i] of t) if (i == null) {
|
|
1730
|
-
let i = n.find((t) =>
|
|
1250
|
+
let i = n.find((t) => X(t, r) === e);
|
|
1731
1251
|
i && t.set(e, i);
|
|
1732
1252
|
}
|
|
1733
1253
|
}
|
|
1734
|
-
function
|
|
1254
|
+
function d(n, a, o) {
|
|
1735
1255
|
let s = e.rowKey.value, c = /* @__PURE__ */ new Map();
|
|
1736
1256
|
for (let e of n) {
|
|
1737
|
-
let n =
|
|
1257
|
+
let n = a.find((t) => X(t, s) === e), r = t.get(e);
|
|
1738
1258
|
c.set(e, n ?? r);
|
|
1739
1259
|
}
|
|
1740
1260
|
t.clear();
|
|
1741
1261
|
for (let [e, n] of c) t.set(e, n);
|
|
1742
|
-
e.rowSelection.value?.onChange?.(r.value,
|
|
1262
|
+
e.rowSelection.value?.onChange?.(r.value, i.value, o);
|
|
1743
1263
|
}
|
|
1744
1264
|
return {
|
|
1745
1265
|
selectedRowKeys: r,
|
|
1746
|
-
selectedItems:
|
|
1747
|
-
mergedRowSelection:
|
|
1266
|
+
selectedItems: i,
|
|
1267
|
+
mergedRowSelection: m(() => {
|
|
1748
1268
|
let t = e.rowSelection.value;
|
|
1749
1269
|
if (t) return {
|
|
1750
1270
|
...t,
|
|
1751
1271
|
selectedRowKeys: r.value,
|
|
1752
|
-
onChange:
|
|
1272
|
+
onChange: d
|
|
1753
1273
|
};
|
|
1754
1274
|
}),
|
|
1755
|
-
select:
|
|
1756
|
-
selectAll:
|
|
1757
|
-
remove:
|
|
1758
|
-
clear:
|
|
1759
|
-
sync:
|
|
1275
|
+
select: o,
|
|
1276
|
+
selectAll: s,
|
|
1277
|
+
remove: c,
|
|
1278
|
+
clear: l,
|
|
1279
|
+
sync: u
|
|
1760
1280
|
};
|
|
1761
1281
|
}
|
|
1762
1282
|
//#endregion
|
|
1763
1283
|
//#region src/hooks/useTable.ts
|
|
1764
|
-
var
|
|
1765
|
-
function
|
|
1766
|
-
let n =
|
|
1767
|
-
function
|
|
1768
|
-
let i =
|
|
1284
|
+
var tn = [];
|
|
1285
|
+
function nn(e, t) {
|
|
1286
|
+
let n = k({}), r = /* @__PURE__ */ new Set();
|
|
1287
|
+
function i(e = {}) {
|
|
1288
|
+
let i = dt({}, e);
|
|
1769
1289
|
for (let e of r) e in i || (delete n[e], r.delete(e));
|
|
1770
1290
|
Object.assign(n, i);
|
|
1771
1291
|
for (let e of Object.keys(i)) r.add(e);
|
|
1772
1292
|
t?.request && (n.request = t.request);
|
|
1773
1293
|
}
|
|
1774
|
-
|
|
1775
|
-
|
|
1294
|
+
P(() => N(t?.state), (e) => {
|
|
1295
|
+
i(e ?? {});
|
|
1776
1296
|
}, {
|
|
1777
1297
|
deep: !0,
|
|
1778
1298
|
immediate: !0
|
|
1779
1299
|
});
|
|
1780
|
-
let
|
|
1781
|
-
...
|
|
1782
|
-
...
|
|
1783
|
-
})),
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
}),
|
|
1787
|
-
|
|
1300
|
+
let a = m(() => e.value?.actionRef?.() ?? {}), o = m(() => e.value?.formRef?.() ?? {}), s = m(() => ({
|
|
1301
|
+
...a.value?.pageInfo || {},
|
|
1302
|
+
...o.value?.getFormSearch?.() || {}
|
|
1303
|
+
})), c = A(!1);
|
|
1304
|
+
P(() => a.value?.loading?.value, (e) => {
|
|
1305
|
+
c.value = !!e;
|
|
1306
|
+
}), P(c, (e) => {
|
|
1307
|
+
a.value?.setLoading?.(!!e);
|
|
1788
1308
|
});
|
|
1309
|
+
function l(e) {
|
|
1310
|
+
a.value?.reload?.(e);
|
|
1311
|
+
}
|
|
1789
1312
|
function u(e) {
|
|
1790
|
-
|
|
1313
|
+
a.value?.setTableDataList?.(e);
|
|
1791
1314
|
}
|
|
1792
1315
|
function d(e) {
|
|
1793
|
-
|
|
1794
|
-
}
|
|
1795
|
-
function f(e) {
|
|
1796
|
-
o.value?.operateTableDataRow?.(e);
|
|
1316
|
+
a.value?.operateTableDataRow?.(e);
|
|
1797
1317
|
}
|
|
1798
|
-
function
|
|
1799
|
-
|
|
1318
|
+
function f(e, t, n, r) {
|
|
1319
|
+
a.value?.setPageInfo?.(e, t, n, r);
|
|
1800
1320
|
}
|
|
1801
|
-
function
|
|
1802
|
-
|
|
1321
|
+
function p(e) {
|
|
1322
|
+
a.value?.setPagination?.(e);
|
|
1803
1323
|
}
|
|
1804
1324
|
function h(e) {
|
|
1805
|
-
|
|
1325
|
+
a.value?.reloadAndReset?.(e);
|
|
1806
1326
|
}
|
|
1807
1327
|
function g(e) {
|
|
1808
|
-
|
|
1809
|
-
}
|
|
1810
|
-
let _ =
|
|
1811
|
-
clear: () =>
|
|
1812
|
-
select: (e, t) =>
|
|
1813
|
-
selectAll: (e, t) =>
|
|
1814
|
-
remove: (e) =>
|
|
1815
|
-
sync: () =>
|
|
1328
|
+
c.value = e;
|
|
1329
|
+
}
|
|
1330
|
+
let _ = m(() => a.value?.selectedKeys?.value ?? []), v = m(() => a.value?.selectedItems?.value ?? []), y = {
|
|
1331
|
+
clear: () => a.value?.rowsSelection?.clear?.(),
|
|
1332
|
+
select: (e, t) => a.value?.rowsSelection?.select?.(e, t),
|
|
1333
|
+
selectAll: (e, t) => a.value?.rowsSelection?.selectAll?.(e, t),
|
|
1334
|
+
remove: (e) => a.value?.rowsSelection?.remove?.(e),
|
|
1335
|
+
sync: () => a.value?.rowsSelection?.sync?.()
|
|
1816
1336
|
};
|
|
1817
1337
|
function b(e, t) {
|
|
1818
|
-
n.searchMap &&= n.searchMap.map((n) => n.name === e ?
|
|
1338
|
+
n.searchMap &&= n.searchMap.map((n) => n.name === e ? dt({}, n, t) : n);
|
|
1819
1339
|
}
|
|
1820
1340
|
return {
|
|
1821
|
-
loading:
|
|
1822
|
-
dataSource:
|
|
1823
|
-
requestSearch:
|
|
1341
|
+
loading: c,
|
|
1342
|
+
dataSource: m(() => a.value?.dataSource?.value ?? tn),
|
|
1343
|
+
requestSearch: s,
|
|
1824
1344
|
selectedKeys: _,
|
|
1825
1345
|
selectedItems: v,
|
|
1826
1346
|
rowsSelection: y,
|
|
1827
|
-
actionRef:
|
|
1828
|
-
formRef:
|
|
1829
|
-
reload:
|
|
1830
|
-
setTableDataList:
|
|
1831
|
-
operateTableDataRow:
|
|
1832
|
-
setPageInfo:
|
|
1833
|
-
setPagination:
|
|
1347
|
+
actionRef: a,
|
|
1348
|
+
formRef: o,
|
|
1349
|
+
reload: l,
|
|
1350
|
+
setTableDataList: u,
|
|
1351
|
+
operateTableDataRow: d,
|
|
1352
|
+
setPageInfo: f,
|
|
1353
|
+
setPagination: p,
|
|
1834
1354
|
reloadAndReset: h,
|
|
1835
1355
|
setLoading: g,
|
|
1836
1356
|
tableState: n,
|
|
@@ -1839,14 +1359,14 @@ function Vn(e, t) {
|
|
|
1839
1359
|
}
|
|
1840
1360
|
//#endregion
|
|
1841
1361
|
//#region src/hooks/useTableForm.ts
|
|
1842
|
-
function
|
|
1362
|
+
function rn(e) {
|
|
1843
1363
|
let t = e.reduce((e, t) => t.order === void 0 ? e : Math.max(e, t.order), 0), n = e.map((e) => e.order === void 0 ? (t += 1, {
|
|
1844
1364
|
...e,
|
|
1845
1365
|
order: t
|
|
1846
1366
|
}) : e);
|
|
1847
1367
|
return n.sort((e, t) => (e.order ?? 0) - (t.order ?? 0)), n;
|
|
1848
1368
|
}
|
|
1849
|
-
function
|
|
1369
|
+
function an(e) {
|
|
1850
1370
|
let t = {};
|
|
1851
1371
|
for (let n of e) {
|
|
1852
1372
|
let e = n.valueType ?? "text";
|
|
@@ -1854,25 +1374,25 @@ function Un(e) {
|
|
|
1854
1374
|
}
|
|
1855
1375
|
return t;
|
|
1856
1376
|
}
|
|
1857
|
-
function
|
|
1858
|
-
let { searchMap: t, columns: n } = e, r =
|
|
1377
|
+
function on(e) {
|
|
1378
|
+
let { searchMap: t, columns: n } = e, r = m(() => {
|
|
1859
1379
|
let e = t.value, r = n.value.filter((e) => e.searchConfig).map((e) => ({
|
|
1860
1380
|
...e.searchConfig,
|
|
1861
1381
|
order: e.searchConfig.order ?? e.order ?? 0
|
|
1862
1382
|
}));
|
|
1863
|
-
return
|
|
1864
|
-
}),
|
|
1865
|
-
|
|
1866
|
-
|
|
1383
|
+
return rn([...e, ...r]);
|
|
1384
|
+
}), i = m(() => an(r.value)), a = A({});
|
|
1385
|
+
P(() => i.value, (e) => {
|
|
1386
|
+
a.value = ut(M(e));
|
|
1867
1387
|
}, {
|
|
1868
1388
|
deep: !0,
|
|
1869
1389
|
immediate: !0
|
|
1870
1390
|
});
|
|
1871
|
-
function
|
|
1872
|
-
let e =
|
|
1391
|
+
function o() {
|
|
1392
|
+
let e = ut(M(a.value));
|
|
1873
1393
|
for (let t of r.value) {
|
|
1874
1394
|
let n = t.valueType ?? "text", r = t.name;
|
|
1875
|
-
if (n === "text" && (e[r] =
|
|
1395
|
+
if (n === "text" && (e[r] = a.value[r] ?? t.initialValue), n === "dateRange" && (t.rangeStartName || t.rangeEndName)) {
|
|
1876
1396
|
let n = e[r];
|
|
1877
1397
|
e[t.rangeStartName || "start"] = Array.isArray(n) ? n[0] : void 0, e[t.rangeEndName || "end"] = Array.isArray(n) ? n[1] : void 0, delete e[r];
|
|
1878
1398
|
}
|
|
@@ -1880,9 +1400,9 @@ function Wn(e) {
|
|
|
1880
1400
|
let t = e[r];
|
|
1881
1401
|
e[r] = Array.isArray(t) ? t[t.length - 1] : void 0;
|
|
1882
1402
|
}
|
|
1883
|
-
if (n === "treeSelect" && Array.isArray(
|
|
1403
|
+
if (n === "treeSelect" && Array.isArray(a.value[r])) {
|
|
1884
1404
|
let n = t.valueKey === "text" ? "label" : "value";
|
|
1885
|
-
e[r] =
|
|
1405
|
+
e[r] = a.value[r].length > 0 ? a.value[r].map((e) => e[n]).join(",") : void 0;
|
|
1886
1406
|
}
|
|
1887
1407
|
if (n === "numberRange") {
|
|
1888
1408
|
let t = e[r];
|
|
@@ -1891,46 +1411,46 @@ function Wn(e) {
|
|
|
1891
1411
|
}
|
|
1892
1412
|
return e;
|
|
1893
1413
|
}
|
|
1894
|
-
function
|
|
1895
|
-
let e =
|
|
1896
|
-
|
|
1414
|
+
function s() {
|
|
1415
|
+
let e = ut(M(i.value));
|
|
1416
|
+
a.value = e;
|
|
1897
1417
|
for (let t of r.value) if (t.valueType === "dateRange" && (t.rangeStartName || t.rangeEndName)) {
|
|
1898
|
-
let n = t.rangeStartName || "start", r = t.rangeEndName || "end", i = e[n],
|
|
1899
|
-
(i !== void 0 ||
|
|
1418
|
+
let n = t.rangeStartName || "start", r = t.rangeEndName || "end", i = e[n], o = e[r];
|
|
1419
|
+
(i !== void 0 || o !== void 0) && (a.value[t.name] = [i, o]);
|
|
1900
1420
|
}
|
|
1901
1421
|
}
|
|
1902
|
-
function
|
|
1903
|
-
e && (
|
|
1422
|
+
function c(e, t) {
|
|
1423
|
+
e && (a.value[e] = t);
|
|
1904
1424
|
}
|
|
1905
1425
|
return {
|
|
1906
1426
|
formColumns: r,
|
|
1907
|
-
defaultFormSearch:
|
|
1908
|
-
formState:
|
|
1909
|
-
getFormSearch:
|
|
1910
|
-
resetFormState:
|
|
1911
|
-
changeFormState:
|
|
1427
|
+
defaultFormSearch: i,
|
|
1428
|
+
formState: a,
|
|
1429
|
+
getFormSearch: o,
|
|
1430
|
+
resetFormState: s,
|
|
1431
|
+
changeFormState: c
|
|
1912
1432
|
};
|
|
1913
1433
|
}
|
|
1914
1434
|
//#endregion
|
|
1915
1435
|
//#region src/hooks/useTableScroll.ts
|
|
1916
|
-
var
|
|
1436
|
+
var sn = 150, cn = 60, ln = {
|
|
1917
1437
|
desktop: 400,
|
|
1918
1438
|
mobile: 235
|
|
1919
1439
|
};
|
|
1920
|
-
function
|
|
1440
|
+
function un(e) {
|
|
1921
1441
|
if (e === !1) return {
|
|
1922
1442
|
mode: "disabled",
|
|
1923
1443
|
breakpoint: "xl",
|
|
1924
1444
|
modal: !1,
|
|
1925
|
-
modalY:
|
|
1445
|
+
modalY: ln,
|
|
1926
1446
|
actionFixed: !1
|
|
1927
1447
|
};
|
|
1928
1448
|
let t = typeof e?.modalY == "number" ? {
|
|
1929
1449
|
desktop: e.modalY,
|
|
1930
1450
|
mobile: e.modalY
|
|
1931
1451
|
} : {
|
|
1932
|
-
desktop: e?.modalY?.desktop ??
|
|
1933
|
-
mobile: e?.modalY?.mobile ??
|
|
1452
|
+
desktop: e?.modalY?.desktop ?? ln.desktop,
|
|
1453
|
+
mobile: e?.modalY?.mobile ?? ln.mobile
|
|
1934
1454
|
}, n = e?.mode ?? "auto";
|
|
1935
1455
|
return {
|
|
1936
1456
|
mode: n,
|
|
@@ -1940,49 +1460,49 @@ function Jn(e) {
|
|
|
1940
1460
|
actionFixed: n === "disabled" ? !1 : e?.actionFixed ?? "auto"
|
|
1941
1461
|
};
|
|
1942
1462
|
}
|
|
1943
|
-
function
|
|
1463
|
+
function dn(e, t, n) {
|
|
1944
1464
|
return typeof e == "number" ? n >= e : !!t[e];
|
|
1945
1465
|
}
|
|
1946
|
-
function
|
|
1466
|
+
function fn(e) {
|
|
1947
1467
|
let t = Number.parseInt(String(e.width ?? ""), 10);
|
|
1948
|
-
return Number.isFinite(t) && t > 0 ? t :
|
|
1468
|
+
return Number.isFinite(t) && t > 0 ? t : sn;
|
|
1949
1469
|
}
|
|
1950
|
-
function
|
|
1951
|
-
return e.reduce((e, t) => e +
|
|
1470
|
+
function pn(e, t) {
|
|
1471
|
+
return e.reduce((e, t) => e + fn(t), 0) + (t ? cn : 0);
|
|
1952
1472
|
}
|
|
1953
|
-
function
|
|
1954
|
-
let t =
|
|
1473
|
+
function mn(e) {
|
|
1474
|
+
let t = m(() => un(e.scrollPolicy.value)), n = m(() => {
|
|
1955
1475
|
let n = t.value;
|
|
1956
|
-
return
|
|
1957
|
-
}), r =
|
|
1476
|
+
return dn(n.breakpoint, e.screens.value, e.screenWidth.value);
|
|
1477
|
+
}), r = m(() => pn(e.columns.value, !!e.rowSelection.value)), i = m(() => {
|
|
1958
1478
|
let i = t.value, a = e.scroll.value;
|
|
1959
1479
|
if (i.mode === "disabled") return {};
|
|
1960
1480
|
if (i.mode === "manual") return a ?? {};
|
|
1961
1481
|
let o = { ...a ?? {} };
|
|
1962
1482
|
return !o.x && !n.value && (o.x = r.value), i.modal && !o.y && (o.y = n.value ? i.modalY.desktop : i.modalY.mobile), o;
|
|
1963
|
-
}),
|
|
1483
|
+
}), a = m(() => !!i.value?.x);
|
|
1964
1484
|
return {
|
|
1965
|
-
tableScroll:
|
|
1966
|
-
hasHorizontalScroll:
|
|
1967
|
-
shouldFixActionColumn:
|
|
1485
|
+
tableScroll: i,
|
|
1486
|
+
hasHorizontalScroll: a,
|
|
1487
|
+
shouldFixActionColumn: m(() => {
|
|
1968
1488
|
let e = t.value;
|
|
1969
|
-
return e.mode === "disabled" || e.actionFixed === !1 ? !1 :
|
|
1489
|
+
return e.mode === "disabled" || e.actionFixed === !1 ? !1 : a.value;
|
|
1970
1490
|
}),
|
|
1971
1491
|
normalizedScrollPolicy: t
|
|
1972
1492
|
};
|
|
1973
1493
|
}
|
|
1974
1494
|
//#endregion
|
|
1975
1495
|
//#region src/hooks/useTableSize.ts
|
|
1976
|
-
var
|
|
1496
|
+
var hn = new Set([
|
|
1977
1497
|
"small",
|
|
1978
1498
|
"medium",
|
|
1979
1499
|
"middle",
|
|
1980
1500
|
"large"
|
|
1981
|
-
]),
|
|
1982
|
-
function
|
|
1983
|
-
let t =
|
|
1501
|
+
]), gn = "middle";
|
|
1502
|
+
function _n(e) {
|
|
1503
|
+
let t = m(() => e.size.value ?? gn);
|
|
1984
1504
|
function n(t) {
|
|
1985
|
-
|
|
1505
|
+
hn.has(t) && e.onChange?.(t);
|
|
1986
1506
|
}
|
|
1987
1507
|
return {
|
|
1988
1508
|
tableSize: t,
|
|
@@ -1991,7 +1511,7 @@ function tr(e) {
|
|
|
1991
1511
|
}
|
|
1992
1512
|
//#endregion
|
|
1993
1513
|
//#region src/components/ScrollBar/util.ts
|
|
1994
|
-
var
|
|
1514
|
+
var vn = {
|
|
1995
1515
|
vertical: {
|
|
1996
1516
|
offset: "offsetHeight",
|
|
1997
1517
|
scroll: "scrollTop",
|
|
@@ -2013,13 +1533,13 @@ var nr = {
|
|
|
2013
1533
|
direction: "left"
|
|
2014
1534
|
}
|
|
2015
1535
|
};
|
|
2016
|
-
function
|
|
1536
|
+
function yn({ move: e, size: t, bar: n }) {
|
|
2017
1537
|
return {
|
|
2018
1538
|
[n.size]: t,
|
|
2019
1539
|
transform: `translate${n.axis}(${e}%)`
|
|
2020
1540
|
};
|
|
2021
1541
|
}
|
|
2022
|
-
var
|
|
1542
|
+
var bn = /* @__PURE__ */ g({
|
|
2023
1543
|
name: "ScrollBarThumb",
|
|
2024
1544
|
inheritAttrs: !1,
|
|
2025
1545
|
props: {
|
|
@@ -2037,68 +1557,68 @@ var ir = /* @__PURE__ */ o({
|
|
|
2037
1557
|
}
|
|
2038
1558
|
},
|
|
2039
1559
|
setup(e) {
|
|
2040
|
-
let t =
|
|
1560
|
+
let t = Ut(), n = A(), r = A(), a = A({}), o = A(!1), s = !1, c = !1, l = 0, u = 0, d = m(() => vn[e.vertical ? "vertical" : "horizontal"]), f = m(() => yn({
|
|
2041
1561
|
size: e.size,
|
|
2042
1562
|
move: e.move,
|
|
2043
|
-
bar:
|
|
2044
|
-
})),
|
|
2045
|
-
function
|
|
1563
|
+
bar: d.value
|
|
1564
|
+
})), p = m(() => !n.value || !r.value || !t?.wrapElement?.value ? 1 : n.value[d.value.offset] ** 2 / t.wrapElement.value[d.value.scrollSize] / e.ratio / r.value[d.value.offset]);
|
|
1565
|
+
function g(e) {
|
|
2046
1566
|
document.onselectstart !== e && (document.onselectstart = e);
|
|
2047
1567
|
}
|
|
2048
|
-
function
|
|
2049
|
-
if (!t?.wrapElement?.value || !n.value || !r.value || !
|
|
2050
|
-
let i =
|
|
1568
|
+
function _(e) {
|
|
1569
|
+
if (!t?.wrapElement?.value || !n.value || !r.value || !s) return;
|
|
1570
|
+
let i = a.value[d.value.axis];
|
|
2051
1571
|
if (!i) return;
|
|
2052
|
-
let
|
|
2053
|
-
|
|
1572
|
+
let o = ((n.value.getBoundingClientRect()[d.value.direction] - e[d.value.client]) * -1 - (r.value[d.value.offset] - i)) * 100 * p.value / n.value[d.value.offset];
|
|
1573
|
+
d.value.scroll === "scrollLeft" ? t.wrapElement.value[d.value.scroll] = o * u / 100 : t.wrapElement.value[d.value.scroll] = o * l / 100;
|
|
2054
1574
|
}
|
|
2055
|
-
let
|
|
1575
|
+
let v = document.onselectstart;
|
|
2056
1576
|
function y() {
|
|
2057
|
-
|
|
1577
|
+
s = !1, a.value[d.value.axis] = 0, document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", y), g(v), c && (o.value = !1);
|
|
2058
1578
|
}
|
|
2059
1579
|
function b(e) {
|
|
2060
|
-
t?.wrapElement?.value && (e.stopImmediatePropagation(),
|
|
1580
|
+
t?.wrapElement?.value && (e.stopImmediatePropagation(), s = !0, l = t.wrapElement.value.scrollHeight, u = t.wrapElement.value.scrollWidth, document.addEventListener("mousemove", _), document.addEventListener("mouseup", y), v = document.onselectstart, document.onselectstart = () => !1);
|
|
2061
1581
|
}
|
|
2062
1582
|
function x(e) {
|
|
2063
1583
|
if (e.stopPropagation(), e.ctrlKey || [1, 2].includes(e.button)) return;
|
|
2064
1584
|
window.getSelection()?.removeAllRanges(), b(e);
|
|
2065
1585
|
let t = e.currentTarget;
|
|
2066
|
-
t && (
|
|
1586
|
+
t && (a.value[d.value.axis] = t[d.value.offset] - (e[d.value.client] - t.getBoundingClientRect()[d.value.direction]));
|
|
2067
1587
|
}
|
|
2068
1588
|
function S(e) {
|
|
2069
1589
|
if (!r.value || !n.value || !t?.wrapElement?.value) return;
|
|
2070
|
-
let i = (Math.abs(e.target.getBoundingClientRect()[
|
|
2071
|
-
t.wrapElement.value[
|
|
2072
|
-
}
|
|
2073
|
-
return
|
|
2074
|
-
|
|
2075
|
-
}),
|
|
2076
|
-
|
|
2077
|
-
}),
|
|
2078
|
-
|
|
1590
|
+
let i = (Math.abs(e.target.getBoundingClientRect()[d.value.direction] - e[d.value.client]) - r.value[d.value.offset] / 2) * 100 * p.value / n.value[d.value.offset];
|
|
1591
|
+
t.wrapElement.value[d.value.scroll] = i * t.wrapElement.value[d.value.scrollSize] / 100;
|
|
1592
|
+
}
|
|
1593
|
+
return i(t?.scrollbarElement, "mousemove", () => {
|
|
1594
|
+
c = !1, o.value = !!e.size;
|
|
1595
|
+
}), i(t?.scrollbarElement, "mouseleave", () => {
|
|
1596
|
+
c = !0, o.value = s;
|
|
1597
|
+
}), w(() => {
|
|
1598
|
+
g(v), document.removeEventListener("mouseup", y);
|
|
2079
1599
|
}), () => {
|
|
2080
1600
|
if (!t) return null;
|
|
2081
|
-
let i =
|
|
1601
|
+
let i = d.value.key === "vertical" ? {
|
|
2082
1602
|
height: `calc(100% - ${F(t.tableHeaderHeight.value + 1)})`,
|
|
2083
1603
|
top: F(t.tableHeaderHeight.value + 1)
|
|
2084
1604
|
} : {};
|
|
2085
|
-
return
|
|
1605
|
+
return h("div", {
|
|
2086
1606
|
ref: n,
|
|
2087
1607
|
style: {
|
|
2088
1608
|
...e.barStyle,
|
|
2089
1609
|
...i
|
|
2090
1610
|
},
|
|
2091
|
-
class: `${t.className}-bar is-${
|
|
1611
|
+
class: `${t.className}-bar is-${d.value.key}`,
|
|
2092
1612
|
onMousedown: S
|
|
2093
|
-
}, [
|
|
1613
|
+
}, [h("div", {
|
|
2094
1614
|
ref: r,
|
|
2095
1615
|
class: `${t.className}-thumb`,
|
|
2096
|
-
style:
|
|
1616
|
+
style: f.value,
|
|
2097
1617
|
onMousedown: x
|
|
2098
1618
|
}, null)]);
|
|
2099
1619
|
};
|
|
2100
1620
|
}
|
|
2101
|
-
}),
|
|
1621
|
+
}), xn = /* @__PURE__ */ g({
|
|
2102
1622
|
name: "ScrollBarBar",
|
|
2103
1623
|
inheritAttrs: !1,
|
|
2104
1624
|
props: {
|
|
@@ -2119,35 +1639,35 @@ var ir = /* @__PURE__ */ o({
|
|
|
2119
1639
|
default: !1
|
|
2120
1640
|
}
|
|
2121
1641
|
},
|
|
2122
|
-
setup(e, { expose:
|
|
2123
|
-
let
|
|
2124
|
-
function
|
|
1642
|
+
setup(e, { expose: t }) {
|
|
1643
|
+
let n = Ut(), r = A(0), i = A(0), a = A(""), o = A(""), s = A(1), c = A(1);
|
|
1644
|
+
function l(e) {
|
|
2125
1645
|
if (!e) return;
|
|
2126
1646
|
let t = e.offsetHeight - 4, n = e.offsetWidth - 4;
|
|
2127
|
-
|
|
1647
|
+
i.value = e.scrollTop * 100 / t * s.value, r.value = e.scrollLeft * 100 / n * c.value;
|
|
2128
1648
|
}
|
|
2129
|
-
function
|
|
2130
|
-
let t =
|
|
1649
|
+
function u() {
|
|
1650
|
+
let t = n?.wrapElement?.value;
|
|
2131
1651
|
if (!t) return;
|
|
2132
|
-
let
|
|
2133
|
-
|
|
2134
|
-
}
|
|
2135
|
-
return
|
|
2136
|
-
|
|
2137
|
-
}),
|
|
2138
|
-
update:
|
|
2139
|
-
handleScroll:
|
|
2140
|
-
}), () =>
|
|
2141
|
-
move:
|
|
1652
|
+
let r = t.offsetHeight - 4, i = t.offsetWidth - 4, l = r ** 2 / t.scrollHeight, u = i ** 2 / t.scrollWidth, d = Math.max(l, e.minSize), f = Math.max(u, e.minSize);
|
|
1653
|
+
s.value = l / (r - l) / (d / (r - d)), c.value = u / (i - u) / (f / (i - f)), o.value = d + 4 < r ? `${d}px` : "", a.value = f + 4 < i ? `${f}px` : "";
|
|
1654
|
+
}
|
|
1655
|
+
return E(() => {
|
|
1656
|
+
S(() => u());
|
|
1657
|
+
}), t({
|
|
1658
|
+
update: u,
|
|
1659
|
+
handleScroll: l
|
|
1660
|
+
}), () => n ? h(d, null, [h(bn, {
|
|
1661
|
+
move: r.value,
|
|
2142
1662
|
barStyle: e.barStyle.x,
|
|
2143
|
-
ratio:
|
|
2144
|
-
size:
|
|
1663
|
+
ratio: c.value,
|
|
1664
|
+
size: a.value,
|
|
2145
1665
|
always: e.always
|
|
2146
|
-
}, null), e.hasScrollY &&
|
|
2147
|
-
move:
|
|
1666
|
+
}, null), e.hasScrollY && h(bn, {
|
|
1667
|
+
move: i.value,
|
|
2148
1668
|
barStyle: e.barStyle.y,
|
|
2149
|
-
ratio:
|
|
2150
|
-
size:
|
|
1669
|
+
ratio: s.value,
|
|
1670
|
+
size: o.value,
|
|
2151
1671
|
vertical: !0,
|
|
2152
1672
|
always: e.always
|
|
2153
1673
|
}, null)]) : null;
|
|
@@ -2155,38 +1675,38 @@ var ir = /* @__PURE__ */ o({
|
|
|
2155
1675
|
});
|
|
2156
1676
|
//#endregion
|
|
2157
1677
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
|
|
2158
|
-
function
|
|
1678
|
+
function Sn(e) {
|
|
2159
1679
|
return e == null || typeof e != "object" && typeof e != "function";
|
|
2160
1680
|
}
|
|
2161
1681
|
//#endregion
|
|
2162
1682
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
|
|
2163
|
-
function
|
|
1683
|
+
function Cn(e) {
|
|
2164
1684
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
2165
1685
|
}
|
|
2166
1686
|
//#endregion
|
|
2167
1687
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
|
|
2168
|
-
function
|
|
1688
|
+
function wn(e) {
|
|
2169
1689
|
return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
|
|
2170
1690
|
}
|
|
2171
1691
|
//#endregion
|
|
2172
1692
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
2173
|
-
function
|
|
1693
|
+
function Tn(e) {
|
|
2174
1694
|
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
|
|
2175
1695
|
}
|
|
2176
1696
|
//#endregion
|
|
2177
1697
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
|
|
2178
|
-
var
|
|
1698
|
+
var En = "[object RegExp]", Dn = "[object String]", On = "[object Number]", kn = "[object Boolean]", An = "[object Arguments]", jn = "[object Symbol]", Mn = "[object Date]", Nn = "[object Map]", Pn = "[object Set]", Fn = "[object Array]", In = "[object ArrayBuffer]", Ln = "[object Object]", Rn = "[object DataView]", zn = "[object Uint8Array]", Bn = "[object Uint8ClampedArray]", Vn = "[object Uint16Array]", Hn = "[object Uint32Array]", Un = "[object Int8Array]", Wn = "[object Int16Array]", Gn = "[object Int32Array]", Kn = "[object Float32Array]", qn = "[object Float64Array]";
|
|
2179
1699
|
//#endregion
|
|
2180
1700
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
|
|
2181
|
-
function
|
|
1701
|
+
function Z(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
2182
1702
|
let a = i?.(e, t, n, r);
|
|
2183
1703
|
if (a !== void 0) return a;
|
|
2184
|
-
if (
|
|
1704
|
+
if (Sn(e)) return e;
|
|
2185
1705
|
if (r.has(e)) return r.get(e);
|
|
2186
1706
|
if (Array.isArray(e)) {
|
|
2187
1707
|
let t = Array(e.length);
|
|
2188
1708
|
r.set(e, t);
|
|
2189
|
-
for (let a = 0; a < e.length; a++) t[a] =
|
|
1709
|
+
for (let a = 0; a < e.length; a++) t[a] = Z(e[a], a, n, r, i);
|
|
2190
1710
|
return Object.hasOwn(e, "index") && (t.index = e.index), Object.hasOwn(e, "input") && (t.input = e.input), t;
|
|
2191
1711
|
}
|
|
2192
1712
|
if (e instanceof Date) return new Date(e.getTime());
|
|
@@ -2197,20 +1717,20 @@ function Mr(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
|
2197
1717
|
if (e instanceof Map) {
|
|
2198
1718
|
let t = /* @__PURE__ */ new Map();
|
|
2199
1719
|
r.set(e, t);
|
|
2200
|
-
for (let [a, o] of e) t.set(a,
|
|
1720
|
+
for (let [a, o] of e) t.set(a, Z(o, a, n, r, i));
|
|
2201
1721
|
return t;
|
|
2202
1722
|
}
|
|
2203
1723
|
if (e instanceof Set) {
|
|
2204
1724
|
let t = /* @__PURE__ */ new Set();
|
|
2205
1725
|
r.set(e, t);
|
|
2206
|
-
for (let a of e) t.add(
|
|
1726
|
+
for (let a of e) t.add(Z(a, void 0, n, r, i));
|
|
2207
1727
|
return t;
|
|
2208
1728
|
}
|
|
2209
1729
|
if (typeof Buffer < "u" && Buffer.isBuffer(e)) return e.subarray();
|
|
2210
|
-
if (
|
|
1730
|
+
if (Cn(e)) {
|
|
2211
1731
|
let t = new (Object.getPrototypeOf(e)).constructor(e.length);
|
|
2212
1732
|
r.set(e, t);
|
|
2213
|
-
for (let a = 0; a < e.length; a++) t[a] =
|
|
1733
|
+
for (let a = 0; a < e.length; a++) t[a] = Z(e[a], a, n, r, i);
|
|
2214
1734
|
return t;
|
|
2215
1735
|
}
|
|
2216
1736
|
if (e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer) return e.slice(0);
|
|
@@ -2242,67 +1762,67 @@ function Mr(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
|
2242
1762
|
let t = new String(e.valueOf());
|
|
2243
1763
|
return r.set(e, t), Q(t, e, n, r, i), t;
|
|
2244
1764
|
}
|
|
2245
|
-
if (typeof e == "object" &&
|
|
1765
|
+
if (typeof e == "object" && Jn(e)) {
|
|
2246
1766
|
let t = Object.create(Object.getPrototypeOf(e));
|
|
2247
1767
|
return r.set(e, t), Q(t, e, n, r, i), t;
|
|
2248
1768
|
}
|
|
2249
1769
|
return e;
|
|
2250
1770
|
}
|
|
2251
1771
|
function Q(e, t, n = e, r, i) {
|
|
2252
|
-
let a = [...Object.keys(t), ...
|
|
1772
|
+
let a = [...Object.keys(t), ...wn(t)];
|
|
2253
1773
|
for (let o = 0; o < a.length; o++) {
|
|
2254
1774
|
let s = a[o], c = Object.getOwnPropertyDescriptor(e, s);
|
|
2255
|
-
(c == null || c.writable) && (e[s] =
|
|
1775
|
+
(c == null || c.writable) && (e[s] = Z(t[s], s, n, r, i));
|
|
2256
1776
|
}
|
|
2257
1777
|
}
|
|
2258
|
-
function
|
|
2259
|
-
switch (
|
|
2260
|
-
case
|
|
2261
|
-
case
|
|
2262
|
-
case
|
|
2263
|
-
case
|
|
2264
|
-
case
|
|
2265
|
-
case
|
|
2266
|
-
case
|
|
2267
|
-
case
|
|
2268
|
-
case
|
|
2269
|
-
case
|
|
2270
|
-
case
|
|
2271
|
-
case
|
|
2272
|
-
case
|
|
2273
|
-
case
|
|
2274
|
-
case
|
|
2275
|
-
case
|
|
2276
|
-
case
|
|
2277
|
-
case
|
|
2278
|
-
case
|
|
2279
|
-
case
|
|
2280
|
-
case
|
|
2281
|
-
case
|
|
1778
|
+
function Jn(e) {
|
|
1779
|
+
switch (Tn(e)) {
|
|
1780
|
+
case An:
|
|
1781
|
+
case Fn:
|
|
1782
|
+
case In:
|
|
1783
|
+
case Rn:
|
|
1784
|
+
case kn:
|
|
1785
|
+
case Mn:
|
|
1786
|
+
case Kn:
|
|
1787
|
+
case qn:
|
|
1788
|
+
case Un:
|
|
1789
|
+
case Wn:
|
|
1790
|
+
case Gn:
|
|
1791
|
+
case Nn:
|
|
1792
|
+
case On:
|
|
1793
|
+
case Ln:
|
|
1794
|
+
case En:
|
|
1795
|
+
case Pn:
|
|
1796
|
+
case Dn:
|
|
1797
|
+
case jn:
|
|
1798
|
+
case zn:
|
|
1799
|
+
case Bn:
|
|
1800
|
+
case Vn:
|
|
1801
|
+
case Hn: return !0;
|
|
2282
1802
|
default: return !1;
|
|
2283
1803
|
}
|
|
2284
1804
|
}
|
|
2285
1805
|
//#endregion
|
|
2286
1806
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/cloneDeep.mjs
|
|
2287
|
-
function
|
|
2288
|
-
return
|
|
1807
|
+
function Yn(e) {
|
|
1808
|
+
return Z(e, void 0, e, /* @__PURE__ */ new Map(), void 0);
|
|
2289
1809
|
}
|
|
2290
1810
|
//#endregion
|
|
2291
1811
|
//#region src/utils/dateFormat.ts
|
|
2292
1812
|
function $(e, t) {
|
|
2293
|
-
return typeof t == "function" ? t((0,
|
|
1813
|
+
return typeof t == "function" ? t((0, Y.default)(e)) : (0, Y.default)(e).format(t);
|
|
2294
1814
|
}
|
|
2295
|
-
function
|
|
1815
|
+
function Xn(e, t) {
|
|
2296
1816
|
return t ? "YYYY-MM-DD HH:mm:ss" : e ?? "YYYY-MM-DD";
|
|
2297
1817
|
}
|
|
2298
|
-
function
|
|
1818
|
+
function Zn(e, t, n = "string") {
|
|
2299
1819
|
if (!Array.isArray(e) || e.length !== 2) return;
|
|
2300
1820
|
let [r, i] = e, a, o;
|
|
2301
|
-
return Array.isArray(t) ? (a = t[0], o = t[1]) : typeof t == "object" && t !== void 0 ? (a = t.format, o = t.format) : (a = t, o = t), n === "dayjs" ? [(0,
|
|
1821
|
+
return Array.isArray(t) ? (a = t[0], o = t[1]) : typeof t == "object" && t !== void 0 ? (a = t.format, o = t.format) : (a = t, o = t), n === "dayjs" ? [(0, Y.default)(r), (0, Y.default)(i)] : [r ? $(r, a) : "", i ? $(i, o) : ""];
|
|
2302
1822
|
}
|
|
2303
1823
|
//#endregion
|
|
2304
1824
|
//#region src/components/SearchForm/CollapseToggle.tsx
|
|
2305
|
-
var
|
|
1825
|
+
var Qn = /* @__PURE__ */ g({
|
|
2306
1826
|
name: "ProTableCollapseToggle",
|
|
2307
1827
|
props: {
|
|
2308
1828
|
collapsed: {
|
|
@@ -2331,15 +1851,15 @@ var Lr = /* @__PURE__ */ o({
|
|
|
2331
1851
|
}
|
|
2332
1852
|
},
|
|
2333
1853
|
setup(e) {
|
|
2334
|
-
return () => e.collapseRender === !1 ? null : typeof e.collapseRender == "function" ?
|
|
1854
|
+
return () => e.collapseRender === !1 ? null : typeof e.collapseRender == "function" ? h("span", {
|
|
2335
1855
|
class: [`${e.prefixCls}-search-control-text`, e.hashId],
|
|
2336
1856
|
onClick: () => e.onToggle(!e.collapsed)
|
|
2337
|
-
}, [e.collapseRender(e.collapsed)]) :
|
|
1857
|
+
}, [e.collapseRender(e.collapsed)]) : h("span", {
|
|
2338
1858
|
class: `${e.prefixCls}-search-control-text`,
|
|
2339
1859
|
onClick: () => e.onToggle(!e.collapsed)
|
|
2340
|
-
}, [e.collapsed ? "展开" : "收起", e.collapsed ?
|
|
1860
|
+
}, [e.collapsed ? "展开" : "收起", e.collapsed ? h(H, { type: "DownOutlined" }, null) : h(H, { type: "UpOutlined" }, null)]);
|
|
2341
1861
|
}
|
|
2342
|
-
}), { RangePicker:
|
|
1862
|
+
}), { RangePicker: $n } = R, er = /* @__PURE__ */ g({
|
|
2343
1863
|
name: "ProTableFormItemContainer",
|
|
2344
1864
|
props: {
|
|
2345
1865
|
prefixCls: {
|
|
@@ -2372,7 +1892,7 @@ var Lr = /* @__PURE__ */ o({
|
|
|
2372
1892
|
}
|
|
2373
1893
|
},
|
|
2374
1894
|
setup(e) {
|
|
2375
|
-
let { optionList: t, loading: n } =
|
|
1895
|
+
let { optionList: t, loading: n } = $t({
|
|
2376
1896
|
fetch: e.record.request?.fetch,
|
|
2377
1897
|
manual: e.record.request?.manual,
|
|
2378
1898
|
debounceTime: e.record.request?.debounceTime
|
|
@@ -2384,7 +1904,7 @@ var Lr = /* @__PURE__ */ o({
|
|
|
2384
1904
|
function i(t, n) {
|
|
2385
1905
|
e.onChange(t, e.record, n);
|
|
2386
1906
|
}
|
|
2387
|
-
function
|
|
1907
|
+
function a() {
|
|
2388
1908
|
let t = e.record.field ?? {}, n = {
|
|
2389
1909
|
style: { width: "100%" },
|
|
2390
1910
|
value: e.formState[e.record.name],
|
|
@@ -2392,34 +1912,34 @@ var Lr = /* @__PURE__ */ o({
|
|
|
2392
1912
|
allowClear: e.record.allowClear ?? !0,
|
|
2393
1913
|
...t
|
|
2394
1914
|
};
|
|
2395
|
-
return e.autoRequest ?
|
|
1915
|
+
return e.autoRequest ? h(z.Search, x(n, {
|
|
2396
1916
|
onSearch: () => e.onSubmit?.(),
|
|
2397
1917
|
onChange: (t) => {
|
|
2398
1918
|
e.formState[e.record.name] = t.target?.value ?? t;
|
|
2399
1919
|
}
|
|
2400
|
-
}), null) :
|
|
1920
|
+
}), null) : h(z, x(n, { onChange: (e) => i(e.target?.value ?? e) }), null);
|
|
2401
1921
|
}
|
|
2402
|
-
function
|
|
2403
|
-
return
|
|
1922
|
+
function o() {
|
|
1923
|
+
return h(B, x({
|
|
2404
1924
|
style: { width: "100%" },
|
|
2405
1925
|
value: e.formState[e.record.name],
|
|
2406
1926
|
placeholder: e.record.placeholder || "请输入",
|
|
2407
1927
|
onChange: (e) => i(e ?? void 0)
|
|
2408
1928
|
}, e.record.field ?? {}), null);
|
|
2409
1929
|
}
|
|
2410
|
-
function
|
|
2411
|
-
let t = e.record.name, n = e.formState[t],
|
|
2412
|
-
return
|
|
1930
|
+
function s() {
|
|
1931
|
+
let t = e.record.name, n = e.formState[t], a = Array.isArray(e.record.placeholder) ? e.record.placeholder : ["请输入", "请输入"];
|
|
1932
|
+
return h(oe, {
|
|
2413
1933
|
class: `${e.prefixCls}-search-input-compact`,
|
|
2414
1934
|
style: { width: "100%" }
|
|
2415
1935
|
}, { default: () => [
|
|
2416
|
-
|
|
1936
|
+
h(B, {
|
|
2417
1937
|
value: n?.[0],
|
|
2418
|
-
placeholder:
|
|
1938
|
+
placeholder: a[0] || "请输入",
|
|
2419
1939
|
onChange: (e) => i(e, { key: 0 }),
|
|
2420
1940
|
style: r
|
|
2421
1941
|
}, null),
|
|
2422
|
-
|
|
1942
|
+
h(z, {
|
|
2423
1943
|
disabled: !0,
|
|
2424
1944
|
value: "~",
|
|
2425
1945
|
class: `${e.prefixCls}-number-range-separator`,
|
|
@@ -2429,17 +1949,17 @@ var Lr = /* @__PURE__ */ o({
|
|
|
2429
1949
|
pointerEvents: "none"
|
|
2430
1950
|
}
|
|
2431
1951
|
}, null),
|
|
2432
|
-
|
|
1952
|
+
h(B, {
|
|
2433
1953
|
value: n?.[1],
|
|
2434
|
-
placeholder:
|
|
1954
|
+
placeholder: a[1] || "请输入",
|
|
2435
1955
|
onChange: (e) => i(e, { key: 1 }),
|
|
2436
1956
|
style: r
|
|
2437
1957
|
}, null)
|
|
2438
1958
|
] });
|
|
2439
1959
|
}
|
|
2440
|
-
function
|
|
2441
|
-
let r = e.record.loading || n.value,
|
|
2442
|
-
return
|
|
1960
|
+
function c() {
|
|
1961
|
+
let r = e.record.loading || n.value, a = e.record.request ? t.value : e.record.valueEnum || [], o = e.record.field ?? {};
|
|
1962
|
+
return h(ae, x({
|
|
2443
1963
|
style: { width: "100%" },
|
|
2444
1964
|
value: r ? void 0 : e.formState[e.record.name],
|
|
2445
1965
|
optionFilterProp: "label",
|
|
@@ -2447,39 +1967,39 @@ var Lr = /* @__PURE__ */ o({
|
|
|
2447
1967
|
showSearch: e.record.showSearch,
|
|
2448
1968
|
allowClear: e.record.allowClear ?? !0,
|
|
2449
1969
|
loading: r,
|
|
2450
|
-
options:
|
|
1970
|
+
options: a,
|
|
2451
1971
|
onChange: (e) => i(e ?? void 0)
|
|
2452
|
-
},
|
|
1972
|
+
}, o), null);
|
|
2453
1973
|
}
|
|
2454
|
-
function
|
|
2455
|
-
let r = e.record.field ?? {},
|
|
2456
|
-
return
|
|
1974
|
+
function l() {
|
|
1975
|
+
let r = e.record.field ?? {}, a = e.record.loading || n.value;
|
|
1976
|
+
return h(de, x({
|
|
2457
1977
|
style: { width: "100%" },
|
|
2458
1978
|
value: e.formState[e.record.name],
|
|
2459
1979
|
placeholder: e.record.placeholder || "请选择",
|
|
2460
1980
|
allowClear: e.record.allowClear ?? !0,
|
|
2461
|
-
treeData:
|
|
2462
|
-
loading:
|
|
1981
|
+
treeData: a ? [] : e.record.request ? t.value : e.record.valueEnum || [],
|
|
1982
|
+
loading: a,
|
|
2463
1983
|
onChange: (e) => i(e ?? (r.treeCheckable || r.multiple ? [] : null))
|
|
2464
1984
|
}, r), null);
|
|
2465
1985
|
}
|
|
2466
|
-
function
|
|
2467
|
-
let r = e.record.field ?? {},
|
|
2468
|
-
return
|
|
1986
|
+
function u() {
|
|
1987
|
+
let r = e.record.field ?? {}, a = e.record.loading || n.value;
|
|
1988
|
+
return h(L, x({
|
|
2469
1989
|
style: { width: "100%" },
|
|
2470
1990
|
value: e.formState[e.record.name],
|
|
2471
1991
|
placeholder: e.record.placeholder || "请选择",
|
|
2472
1992
|
allowClear: e.record.allowClear ?? !0,
|
|
2473
|
-
options:
|
|
2474
|
-
loading:
|
|
1993
|
+
options: a ? [] : e.record.request ? t.value : e.record.valueEnum || [],
|
|
1994
|
+
loading: a,
|
|
2475
1995
|
onChange: (e) => i(e ?? void 0)
|
|
2476
1996
|
}, r), null);
|
|
2477
1997
|
}
|
|
2478
|
-
function
|
|
2479
|
-
let t =
|
|
2480
|
-
return
|
|
1998
|
+
function d() {
|
|
1999
|
+
let t = Xn(e.record.valueFormat, e.record.showTime);
|
|
2000
|
+
return h(R, x({
|
|
2481
2001
|
style: { width: "100%" },
|
|
2482
|
-
value: e.formState[e.record.name] ? (0,
|
|
2002
|
+
value: e.formState[e.record.name] ? (0, Y.default)(e.formState[e.record.name]) : void 0,
|
|
2483
2003
|
placeholder: e.record.placeholder || "请选择",
|
|
2484
2004
|
allowClear: e.record.allowClear ?? !0,
|
|
2485
2005
|
format: t,
|
|
@@ -2487,35 +2007,35 @@ var Lr = /* @__PURE__ */ o({
|
|
|
2487
2007
|
onChange: (e) => i(e ? $(e, t) : null)
|
|
2488
2008
|
}, e.record.field ?? {}), null);
|
|
2489
2009
|
}
|
|
2490
|
-
function
|
|
2491
|
-
let
|
|
2492
|
-
return
|
|
2010
|
+
function f(t, n, r) {
|
|
2011
|
+
let a = e.formState[e.record.name];
|
|
2012
|
+
return h(R, x({
|
|
2493
2013
|
style: { width: "100%" },
|
|
2494
2014
|
picker: t,
|
|
2495
|
-
value:
|
|
2015
|
+
value: a ? (0, Y.default)(a, n) : void 0,
|
|
2496
2016
|
placeholder: r || "请选择",
|
|
2497
2017
|
allowClear: e.record.allowClear ?? !0,
|
|
2498
2018
|
onChange: (e) => i(e ? $(e, n) : null)
|
|
2499
2019
|
}, e.record.field ?? {}), null);
|
|
2500
2020
|
}
|
|
2501
|
-
function
|
|
2502
|
-
let t =
|
|
2503
|
-
return
|
|
2021
|
+
function p() {
|
|
2022
|
+
let t = Xn(e.record.valueFormat, e.record.showTime), n = e.formState[e.record.name], r = e.record.field ?? {}, a = Array.isArray(e.record.placeholder) ? e.record.placeholder : ["开始日期", "结束日期"];
|
|
2023
|
+
return h($n, x({
|
|
2504
2024
|
style: { width: "100%" },
|
|
2505
|
-
value: Array.isArray(n) && n.length === 2 ?
|
|
2506
|
-
placeholder:
|
|
2025
|
+
value: Array.isArray(n) && n.length === 2 ? Zn(n, t, "dayjs") : void 0,
|
|
2026
|
+
placeholder: a,
|
|
2507
2027
|
format: t,
|
|
2508
2028
|
showTime: e.record.showTime,
|
|
2509
2029
|
onChange: (e) => {
|
|
2510
|
-
i(e && Array.isArray(e) && e.length === 2 ?
|
|
2030
|
+
i(e && Array.isArray(e) && e.length === 2 ? Zn(e, t, "string") : null);
|
|
2511
2031
|
}
|
|
2512
2032
|
}, r), null);
|
|
2513
2033
|
}
|
|
2514
|
-
function
|
|
2034
|
+
function m() {
|
|
2515
2035
|
let t = e.record.valueFormat || "HH:mm:ss";
|
|
2516
|
-
return
|
|
2036
|
+
return h(le, x({
|
|
2517
2037
|
style: { width: "100%" },
|
|
2518
|
-
value: e.formState[e.record.name] ? (0,
|
|
2038
|
+
value: e.formState[e.record.name] ? (0, Y.default)(e.formState[e.record.name], t) : void 0,
|
|
2519
2039
|
placeholder: e.record.placeholder || "请选择",
|
|
2520
2040
|
allowClear: e.record.allowClear ?? !0,
|
|
2521
2041
|
use12Hours: e.record.use12Hours,
|
|
@@ -2525,24 +2045,24 @@ var Lr = /* @__PURE__ */ o({
|
|
|
2525
2045
|
}
|
|
2526
2046
|
return () => {
|
|
2527
2047
|
switch (e.record.valueType ?? "text") {
|
|
2528
|
-
case "text": return
|
|
2529
|
-
case "number": return
|
|
2530
|
-
case "numberRange": return
|
|
2531
|
-
case "select": return
|
|
2532
|
-
case "treeSelect": return
|
|
2533
|
-
case "cascader": return
|
|
2534
|
-
case "date": return
|
|
2535
|
-
case "dateWeek": return
|
|
2536
|
-
case "dateMonth": return
|
|
2537
|
-
case "dateQuarter": return
|
|
2538
|
-
case "dateYear": return
|
|
2539
|
-
case "dateRange": return
|
|
2540
|
-
case "time": return
|
|
2541
|
-
default: return
|
|
2048
|
+
case "text": return a();
|
|
2049
|
+
case "number": return o();
|
|
2050
|
+
case "numberRange": return s();
|
|
2051
|
+
case "select": return c();
|
|
2052
|
+
case "treeSelect": return l();
|
|
2053
|
+
case "cascader": return u();
|
|
2054
|
+
case "date": return d();
|
|
2055
|
+
case "dateWeek": return f("week", "YYYY-wo", e.record.placeholder || "请选择");
|
|
2056
|
+
case "dateMonth": return f("month", "YYYY-MM", e.record.placeholder || "请选择");
|
|
2057
|
+
case "dateQuarter": return f("quarter", "YYYY-QQ", e.record.placeholder || "请选择");
|
|
2058
|
+
case "dateYear": return f("year", "YYYY", e.record.placeholder || "请选择");
|
|
2059
|
+
case "dateRange": return p();
|
|
2060
|
+
case "time": return m();
|
|
2061
|
+
default: return a();
|
|
2542
2062
|
}
|
|
2543
2063
|
};
|
|
2544
2064
|
}
|
|
2545
|
-
}),
|
|
2065
|
+
}), tr = /* @__PURE__ */ g({
|
|
2546
2066
|
name: "ProTableFormItemWrapper",
|
|
2547
2067
|
props: {
|
|
2548
2068
|
label: {
|
|
@@ -2581,29 +2101,29 @@ var Lr = /* @__PURE__ */ o({
|
|
|
2581
2101
|
setup(e, { slots: t }) {
|
|
2582
2102
|
return () => {
|
|
2583
2103
|
let n = !!e.label, r = e.labelAlign ? `${e.prefixCls}-search-item-label-${e.labelAlign}` : "", i = e.colon === !1 ? `${e.prefixCls}-search-item-label-no-colon` : "";
|
|
2584
|
-
return
|
|
2104
|
+
return h("div", {
|
|
2585
2105
|
class: [`${e.prefixCls}-search-item`, e.hashId],
|
|
2586
2106
|
style: {
|
|
2587
2107
|
...e.formItemStyle,
|
|
2588
2108
|
...e.globalLabelGap == null ? {} : { gap: `${e.globalLabelGap}px` }
|
|
2589
2109
|
}
|
|
2590
|
-
}, [n &&
|
|
2110
|
+
}, [n && h("div", {
|
|
2591
2111
|
class: [
|
|
2592
2112
|
`${e.prefixCls}-search-item-label`,
|
|
2593
2113
|
r,
|
|
2594
2114
|
i
|
|
2595
2115
|
],
|
|
2596
2116
|
style: e.labelWidth ? { width: typeof e.labelWidth == "number" ? `${e.labelWidth}px` : e.labelWidth } : void 0
|
|
2597
|
-
}, [e.label]),
|
|
2117
|
+
}, [e.label]), h("div", { class: `${e.prefixCls}-search-item-children` }, [t.default?.()])]);
|
|
2598
2118
|
};
|
|
2599
2119
|
}
|
|
2600
2120
|
});
|
|
2601
2121
|
//#endregion
|
|
2602
2122
|
//#region src/components/SearchForm/SearchForm.tsx
|
|
2603
|
-
function
|
|
2604
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
2123
|
+
function nr(e) {
|
|
2124
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !y(e);
|
|
2605
2125
|
}
|
|
2606
|
-
var
|
|
2126
|
+
var rr = /* @__PURE__ */ g({
|
|
2607
2127
|
name: "ProTableSearchForm",
|
|
2608
2128
|
inheritAttrs: !1,
|
|
2609
2129
|
props: {
|
|
@@ -2661,17 +2181,17 @@ var Hr = /* @__PURE__ */ o({
|
|
|
2661
2181
|
}
|
|
2662
2182
|
},
|
|
2663
2183
|
setup(e, { slots: t, expose: n }) {
|
|
2664
|
-
let r =
|
|
2665
|
-
|
|
2184
|
+
let r = A(e.formConfig?.collapsed ?? e.formConfig?.defaultCollapsed);
|
|
2185
|
+
P(() => e.formConfig?.collapsed, (e) => {
|
|
2666
2186
|
r.value = e;
|
|
2667
2187
|
});
|
|
2668
|
-
let { getRowItemsPerBreakpoint:
|
|
2669
|
-
if (
|
|
2670
|
-
}),
|
|
2671
|
-
let e =
|
|
2188
|
+
let { getRowItemsPerBreakpoint: i } = De(), a = m(() => e.formConfig), o = m(() => e.formAutoRequest), s = m(() => e.formActions), c = m(() => {
|
|
2189
|
+
if (a.value?.breakpoint && G(a.value.breakpoint) && Object.keys(a.value.breakpoint).length > 0) return a.value.breakpoint;
|
|
2190
|
+
}), l = m(() => i(a.value?.span, c.value)), u = m(() => {
|
|
2191
|
+
let e = a.value?.gap;
|
|
2672
2192
|
return typeof e == "number" ? `${e}px` : e ?? "16px";
|
|
2673
|
-
}),
|
|
2674
|
-
function
|
|
2193
|
+
}), d = m(() => a.value?.label), f = m(() => Me(s.value?.reset) ? s.value.reset : !o.value);
|
|
2194
|
+
function p(t, n, r) {
|
|
2675
2195
|
let i = n.name, a = n.valueType ?? "text", o = t;
|
|
2676
2196
|
switch (a) {
|
|
2677
2197
|
case "text": break;
|
|
@@ -2694,7 +2214,7 @@ var Hr = /* @__PURE__ */ o({
|
|
|
2694
2214
|
o = t ?? void 0;
|
|
2695
2215
|
break;
|
|
2696
2216
|
case "date": {
|
|
2697
|
-
let e =
|
|
2217
|
+
let e = Xn(n.valueFormat, n.showTime);
|
|
2698
2218
|
o = t ? $(t, e) : null;
|
|
2699
2219
|
break;
|
|
2700
2220
|
}
|
|
@@ -2711,29 +2231,29 @@ var Hr = /* @__PURE__ */ o({
|
|
|
2711
2231
|
o = t ? $(t, "YYYY") : null;
|
|
2712
2232
|
break;
|
|
2713
2233
|
case "dateRange": {
|
|
2714
|
-
let e =
|
|
2715
|
-
o = t &&
|
|
2234
|
+
let e = Xn(n.valueFormat, n.showTime);
|
|
2235
|
+
o = t && Ne(t) && t.length === 2 ? Zn(t, e, "string") : null;
|
|
2716
2236
|
break;
|
|
2717
2237
|
}
|
|
2718
2238
|
case "time":
|
|
2719
2239
|
o = t ? $(t, n.valueFormat || "HH:mm:ss") : null;
|
|
2720
2240
|
break;
|
|
2721
2241
|
}
|
|
2722
|
-
e.formState[i] = o,
|
|
2242
|
+
e.formState[i] = o, g();
|
|
2723
2243
|
}
|
|
2724
|
-
function
|
|
2725
|
-
|
|
2244
|
+
function g() {
|
|
2245
|
+
o.value && _();
|
|
2726
2246
|
}
|
|
2727
|
-
function
|
|
2247
|
+
function _() {
|
|
2728
2248
|
let t = b();
|
|
2729
2249
|
e.onSearch(t);
|
|
2730
2250
|
}
|
|
2731
|
-
function
|
|
2251
|
+
function v() {
|
|
2732
2252
|
let t = b();
|
|
2733
2253
|
e.onSearch(t, "submit");
|
|
2734
2254
|
}
|
|
2735
2255
|
function b() {
|
|
2736
|
-
let t =
|
|
2256
|
+
let t = Yn(e.formState);
|
|
2737
2257
|
for (let n of e.formColumns) {
|
|
2738
2258
|
let r = n.valueType ?? "text", i = n.name;
|
|
2739
2259
|
if (r === "text" && (t[i] = e.formState[i] ?? n.initialValue), r === "dateRange" && (n.rangeStartName || n.rangeEndName)) {
|
|
@@ -2746,13 +2266,13 @@ var Hr = /* @__PURE__ */ o({
|
|
|
2746
2266
|
}
|
|
2747
2267
|
if (r === "numberRange") {
|
|
2748
2268
|
let e = t[i];
|
|
2749
|
-
t[i] = Array.isArray(e) && e.some((e) =>
|
|
2269
|
+
t[i] = Array.isArray(e) && e.some((e) => W(e)) ? e : void 0;
|
|
2750
2270
|
}
|
|
2751
2271
|
}
|
|
2752
2272
|
return t;
|
|
2753
2273
|
}
|
|
2754
2274
|
function x() {
|
|
2755
|
-
let t =
|
|
2275
|
+
let t = Yn(e.defaultFormSearch);
|
|
2756
2276
|
Object.keys(e.formState).forEach((n) => {
|
|
2757
2277
|
e.formState[n] = n in t ? t[n] : void 0;
|
|
2758
2278
|
});
|
|
@@ -2767,7 +2287,7 @@ var Hr = /* @__PURE__ */ o({
|
|
|
2767
2287
|
r.value = e;
|
|
2768
2288
|
}
|
|
2769
2289
|
n({
|
|
2770
|
-
handleSubmit:
|
|
2290
|
+
handleSubmit: _,
|
|
2771
2291
|
resetForm: x
|
|
2772
2292
|
});
|
|
2773
2293
|
function C(e, t, n) {
|
|
@@ -2781,73 +2301,73 @@ var Hr = /* @__PURE__ */ o({
|
|
|
2781
2301
|
};
|
|
2782
2302
|
}
|
|
2783
2303
|
return () => {
|
|
2784
|
-
let n = [...e.formColumns], i =
|
|
2304
|
+
let n = [...e.formColumns], i = pt(t.default?.() || []), c = ir([...n, ...i.map((e) => ({
|
|
2785
2305
|
...e,
|
|
2786
2306
|
order: e.props?.order ?? void 0
|
|
2787
|
-
}))]),
|
|
2788
|
-
let r = C(n,
|
|
2789
|
-
return
|
|
2307
|
+
}))]), m = l.value, _ = u.value, b = c.length, w = r.value !== !1, T = b > m, E = (t, n) => {
|
|
2308
|
+
let r = C(n, m, _), i = y(t) ? t.props?.label : t.label, a = (y(t) ? t.props?.labelWidth : t.labelWidth) ?? d.value?.width, s = (y(t) ? t.props?.labelAlign : t.labelAlign) ?? d.value?.align;
|
|
2309
|
+
return y(t) ? h(tr, {
|
|
2790
2310
|
label: i,
|
|
2791
|
-
labelWidth:
|
|
2311
|
+
labelWidth: a,
|
|
2792
2312
|
labelAlign: s,
|
|
2793
|
-
colon:
|
|
2794
|
-
globalLabelGap:
|
|
2313
|
+
colon: d.value?.colon,
|
|
2314
|
+
globalLabelGap: d.value?.gap,
|
|
2795
2315
|
prefixCls: e.prefixCls,
|
|
2796
2316
|
formItemStyle: r
|
|
2797
|
-
},
|
|
2317
|
+
}, nr(t) ? t : { default: () => [t] }) : h(tr, {
|
|
2798
2318
|
key: String(t.name ?? t.key ?? n),
|
|
2799
2319
|
label: t.label,
|
|
2800
|
-
labelWidth:
|
|
2320
|
+
labelWidth: a,
|
|
2801
2321
|
labelAlign: s,
|
|
2802
|
-
colon:
|
|
2803
|
-
globalLabelGap:
|
|
2322
|
+
colon: d.value?.colon,
|
|
2323
|
+
globalLabelGap: d.value?.gap,
|
|
2804
2324
|
prefixCls: e.prefixCls,
|
|
2805
2325
|
formItemStyle: r
|
|
2806
|
-
}, { default: () => [
|
|
2326
|
+
}, { default: () => [h(er, {
|
|
2807
2327
|
prefixCls: e.prefixCls,
|
|
2808
2328
|
record: t,
|
|
2809
2329
|
formState: e.formState,
|
|
2810
|
-
autoRequest:
|
|
2330
|
+
autoRequest: o.value,
|
|
2811
2331
|
loading: typeof e.loading == "boolean" ? e.loading : !1,
|
|
2812
|
-
onChange:
|
|
2813
|
-
onSubmit:
|
|
2332
|
+
onChange: p,
|
|
2333
|
+
onSubmit: g
|
|
2814
2334
|
}, null)] });
|
|
2815
|
-
}, D = () => !
|
|
2335
|
+
}, D = () => !f.value && o.value ? null : h("div", {
|
|
2816
2336
|
class: [`${e.prefixCls}-search-buttons`, e.proClasses.searchButtons],
|
|
2817
2337
|
style: e.proStyles.searchButtons
|
|
2818
|
-
}, [
|
|
2338
|
+
}, [f.value && h(I, {
|
|
2819
2339
|
key: "reset",
|
|
2820
2340
|
onClick: x
|
|
2821
|
-
}, { default: () => [
|
|
2341
|
+
}, { default: () => [s.value?.resetText || "重置"] }), !o.value && h(I, {
|
|
2822
2342
|
key: "submit",
|
|
2823
2343
|
type: "primary",
|
|
2824
2344
|
loading: typeof e.loading == "boolean" ? e.loading : !1,
|
|
2825
|
-
onClick:
|
|
2826
|
-
}, { default: () => [
|
|
2827
|
-
if (
|
|
2345
|
+
onClick: v
|
|
2346
|
+
}, { default: () => [s.value?.searchText || "查询"] })]), O = (t, n) => {
|
|
2347
|
+
if (a.value?.collapseRender === !1 && !D()) return null;
|
|
2828
2348
|
let r = D();
|
|
2829
|
-
return !t && !r ? null :
|
|
2349
|
+
return !t && !r ? null : h("div", {
|
|
2830
2350
|
class: [`${e.prefixCls}-search-control`, e.proClasses.searchControl],
|
|
2831
2351
|
style: {
|
|
2832
2352
|
flex: 1,
|
|
2833
2353
|
justifyContent: "flex-end",
|
|
2834
2354
|
...e.proStyles.searchControl
|
|
2835
2355
|
}
|
|
2836
|
-
}, [
|
|
2356
|
+
}, [h("div", { class: [`${e.prefixCls}-search-control-content`, e.proClasses.searchContent] }, [r, t && h(Qn, {
|
|
2837
2357
|
collapsed: n,
|
|
2838
|
-
collapseRender:
|
|
2358
|
+
collapseRender: a.value?.collapseRender,
|
|
2839
2359
|
prefixCls: e.prefixCls,
|
|
2840
2360
|
onToggle: S
|
|
2841
2361
|
}, null)])]);
|
|
2842
|
-
},
|
|
2843
|
-
return
|
|
2844
|
-
class:
|
|
2362
|
+
}, k = e.cardBordered ? `${e.prefixCls}-search-border` : "", A = b <= m || !w ? b : Math.max(m - 1, 0);
|
|
2363
|
+
return h("div", {
|
|
2364
|
+
class: J(e.proClasses.search, `${e.prefixCls}-search`, k, a.value?.className),
|
|
2845
2365
|
style: e.proStyles.search
|
|
2846
|
-
}, [
|
|
2366
|
+
}, [c.slice(0, A).map((e, t) => E(e, t)), O(T, w)]);
|
|
2847
2367
|
};
|
|
2848
2368
|
}
|
|
2849
2369
|
});
|
|
2850
|
-
function
|
|
2370
|
+
function ir(e) {
|
|
2851
2371
|
let t = e.reduce((e, t) => t.order === void 0 ? e : Math.max(e, t.order), 0), n = e.map((e) => e.order === void 0 ? (t += 1, {
|
|
2852
2372
|
...e,
|
|
2853
2373
|
order: t
|
|
@@ -2856,7 +2376,7 @@ function Ur(e) {
|
|
|
2856
2376
|
}
|
|
2857
2377
|
//#endregion
|
|
2858
2378
|
//#region src/components/Toolbar/FullscreenIcon.tsx
|
|
2859
|
-
var
|
|
2379
|
+
var ar = /* @__PURE__ */ g({
|
|
2860
2380
|
name: "ProTableFullscreenIcon",
|
|
2861
2381
|
props: {
|
|
2862
2382
|
isFullscreen: {
|
|
@@ -2869,26 +2389,26 @@ var Wr = /* @__PURE__ */ o({
|
|
|
2869
2389
|
}
|
|
2870
2390
|
},
|
|
2871
2391
|
setup(e) {
|
|
2872
|
-
return () =>
|
|
2392
|
+
return () => h(ue, { title: e.isFullscreen ? "退出全屏" : "全屏" }, { default: () => [h("span", { onClick: e.onToggle }, [e.isFullscreen ? h(H, { type: "FullscreenExitOutlined" }, null) : h(H, { type: "FullscreenOutlined" }, null)])] });
|
|
2873
2393
|
}
|
|
2874
2394
|
});
|
|
2875
2395
|
//#endregion
|
|
2876
2396
|
//#region src/components/Toolbar/ListToolBar.tsx
|
|
2877
|
-
function
|
|
2878
|
-
if (
|
|
2397
|
+
function or(e) {
|
|
2398
|
+
if (y(e)) return e;
|
|
2879
2399
|
if (!e) return null;
|
|
2880
2400
|
let { icon: t, tooltip: n, onClick: r, key: i } = e;
|
|
2881
|
-
return t && n ?
|
|
2401
|
+
return t && n ? h(ue, {
|
|
2882
2402
|
title: n,
|
|
2883
2403
|
key: i
|
|
2884
|
-
}, { default: () => [
|
|
2404
|
+
}, { default: () => [h("span", {
|
|
2885
2405
|
key: i,
|
|
2886
2406
|
onClick: () => {
|
|
2887
2407
|
r && r(i);
|
|
2888
2408
|
}
|
|
2889
2409
|
}, [t])] }) : t;
|
|
2890
2410
|
}
|
|
2891
|
-
var
|
|
2411
|
+
var sr = /* @__PURE__ */ g({
|
|
2892
2412
|
name: "ProTableListToolBar",
|
|
2893
2413
|
props: {
|
|
2894
2414
|
prefixCls: {
|
|
@@ -2933,30 +2453,30 @@ var Kr = /* @__PURE__ */ o({
|
|
|
2933
2453
|
}
|
|
2934
2454
|
},
|
|
2935
2455
|
setup(e) {
|
|
2936
|
-
let t =
|
|
2456
|
+
let t = m(() => !!(e.headerTitleTip || e.headerTitle)), n = m(() => e.actionsPlacement === "left" ? e.actions : []), r = m(() => e.actionsPlacement === "right" ? e.actions : []), i = m(() => t.value || n.value.length > 0), a = m(() => e.settings.length > 0 || r.value.length > 0);
|
|
2937
2457
|
return () => {
|
|
2938
|
-
if (!
|
|
2939
|
-
let
|
|
2940
|
-
class: `${
|
|
2458
|
+
if (!i.value && !a.value && !e.listToolAfter) return null;
|
|
2459
|
+
let o = e.prefixCls, s = i.value || a.value ? h("div", {
|
|
2460
|
+
class: `${o}-list-toolbar-left`,
|
|
2941
2461
|
style: e.proStyles.toolbarLeft
|
|
2942
|
-
}, [t.value &&
|
|
2943
|
-
class: [`${
|
|
2462
|
+
}, [t.value && h("div", {
|
|
2463
|
+
class: [`${o}-list-toolbar-title`, e.proClasses.toolbarTitle],
|
|
2944
2464
|
style: e.proStyles.toolbarTitle
|
|
2945
|
-
}, [e.headerTitle, e.headerTitleTip &&
|
|
2946
|
-
class: `${
|
|
2465
|
+
}, [e.headerTitle, e.headerTitleTip && h(ue, { title: e.titleTipText }, { default: () => [typeof e.headerTitleTip == "boolean" ? h(H, { type: "InfoCircleOutlined" }, null) : e.headerTitleTip] })]), n.value.length > 0 && h("div", { class: `${o}-list-toolbar-actions` }, [n.value])]) : a.value ? h("div", {
|
|
2466
|
+
class: `${o}-list-toolbar-left`,
|
|
2947
2467
|
style: e.proStyles.toolbarLeft
|
|
2948
|
-
}, null) : null,
|
|
2949
|
-
class: [`${
|
|
2468
|
+
}, null) : null, c = a.value ? h("div", {
|
|
2469
|
+
class: [`${o}-list-toolbar-right`, e.proClasses.toolbarRight],
|
|
2950
2470
|
style: e.proStyles.toolbarRight
|
|
2951
|
-
}, [r.value.length > 0 &&
|
|
2471
|
+
}, [r.value.length > 0 && h("div", { class: `${o}-list-toolbar-actions` }, [r.value]), e.settings.length > 0 && h("div", { class: `${o}-list-toolbar-setting-items` }, [e.settings.map((e, t) => h("div", {
|
|
2952
2472
|
key: t,
|
|
2953
|
-
class: `${
|
|
2954
|
-
}, [
|
|
2955
|
-
return
|
|
2956
|
-
class: [`${
|
|
2473
|
+
class: `${o}-list-toolbar-setting-item`
|
|
2474
|
+
}, [or(e)]))])]) : null;
|
|
2475
|
+
return h("div", {
|
|
2476
|
+
class: [`${o}-list-toolbar`, e.proClasses.toolbar],
|
|
2957
2477
|
style: e.proStyles.toolbar
|
|
2958
|
-
}, [(
|
|
2959
|
-
class: [`${
|
|
2478
|
+
}, [(s || c) && h("div", { class: `${o}-list-toolbar-container` }, [s, c]), e.listToolAfter && h("div", {
|
|
2479
|
+
class: [`${o}-list-toolbar-after`, e.proClasses.toolbarAfter],
|
|
2960
2480
|
style: e.proStyles.toolbarAfter
|
|
2961
2481
|
}, [e.listToolAfter])]);
|
|
2962
2482
|
};
|
|
@@ -2964,10 +2484,10 @@ var Kr = /* @__PURE__ */ o({
|
|
|
2964
2484
|
});
|
|
2965
2485
|
//#endregion
|
|
2966
2486
|
//#region src/components/Toolbar/index.tsx
|
|
2967
|
-
function
|
|
2487
|
+
function cr(e) {
|
|
2968
2488
|
return typeof e == "object" && !!e;
|
|
2969
2489
|
}
|
|
2970
|
-
var
|
|
2490
|
+
var lr = /* @__PURE__ */ g({
|
|
2971
2491
|
name: "ProTableToolbar",
|
|
2972
2492
|
props: {
|
|
2973
2493
|
prefixCls: {
|
|
@@ -3012,30 +2532,30 @@ var Jr = /* @__PURE__ */ o({
|
|
|
3012
2532
|
}
|
|
3013
2533
|
},
|
|
3014
2534
|
setup(e) {
|
|
3015
|
-
let t =
|
|
2535
|
+
let t = we(), n = m(() => {
|
|
3016
2536
|
if (e.options === !1) return [];
|
|
3017
|
-
let n =
|
|
2537
|
+
let n = cr(e.options) ? e.options : {}, r = [];
|
|
3018
2538
|
if (n.reload !== !1) {
|
|
3019
2539
|
let e = () => t?.reload?.();
|
|
3020
2540
|
if (typeof n.reload == "function") {
|
|
3021
2541
|
let t = n.reload(e);
|
|
3022
2542
|
t && r.push(t);
|
|
3023
|
-
} else r.push(
|
|
2543
|
+
} else r.push(h(ue, {
|
|
3024
2544
|
title: "刷新",
|
|
3025
2545
|
key: "reload"
|
|
3026
|
-
}, { default: () => [
|
|
2546
|
+
}, { default: () => [h("span", { onClick: e }, [h(H, { type: "ReloadOutlined" }, null)])] }));
|
|
3027
2547
|
}
|
|
3028
|
-
return n.fullScreen !== !1 && (typeof n.fullScreen == "function" ? r.push(
|
|
2548
|
+
return n.fullScreen !== !1 && (typeof n.fullScreen == "function" ? r.push(h(ar, {
|
|
3029
2549
|
key: "fullscreen",
|
|
3030
2550
|
isFullscreen: !!t?.isFullscreen?.value,
|
|
3031
2551
|
onToggle: n.fullScreen
|
|
3032
|
-
}, null)) : r.push(
|
|
2552
|
+
}, null)) : r.push(h(ar, {
|
|
3033
2553
|
key: "fullscreen",
|
|
3034
2554
|
isFullscreen: !!t?.isFullscreen?.value,
|
|
3035
2555
|
onToggle: () => t?.toggleFullscreen?.()
|
|
3036
2556
|
}, null))), r;
|
|
3037
2557
|
});
|
|
3038
|
-
return () =>
|
|
2558
|
+
return () => h(sr, {
|
|
3039
2559
|
prefixCls: e.prefixCls,
|
|
3040
2560
|
actions: e.actions,
|
|
3041
2561
|
actionsPlacement: e.actionsPlacement,
|
|
@@ -3048,7 +2568,7 @@ var Jr = /* @__PURE__ */ o({
|
|
|
3048
2568
|
proStyles: e.proStyles
|
|
3049
2569
|
}, null);
|
|
3050
2570
|
}
|
|
3051
|
-
}),
|
|
2571
|
+
}), ur = (e) => {
|
|
3052
2572
|
let t = e.componentCls;
|
|
3053
2573
|
return { [t]: { [`${t}-list-toolbar`]: {
|
|
3054
2574
|
lineHeight: 1,
|
|
@@ -3123,7 +2643,7 @@ var Jr = /* @__PURE__ */ o({
|
|
|
3123
2643
|
[`${t}-list-toolbar-right`]: { width: "100%" }
|
|
3124
2644
|
}
|
|
3125
2645
|
} } };
|
|
3126
|
-
},
|
|
2646
|
+
}, dr = (e) => {
|
|
3127
2647
|
let t = `${e.lineWidth} ${e.lineType} ${e.colorBorderSecondary}`;
|
|
3128
2648
|
return { [e.componentCls]: { [`&${e.componentCls}-full-page`]: {
|
|
3129
2649
|
flex: "1 1 auto",
|
|
@@ -3153,11 +2673,11 @@ var Jr = /* @__PURE__ */ o({
|
|
|
3153
2673
|
}
|
|
3154
2674
|
}
|
|
3155
2675
|
} } };
|
|
3156
|
-
},
|
|
2676
|
+
}, fr = (e) => ({ [e.componentCls]: { [`${e.componentCls}-list`]: {
|
|
3157
2677
|
clear: "both",
|
|
3158
2678
|
maxWidth: "100%",
|
|
3159
2679
|
[`${e.componentCls}-pagination${e.antCls}-pagination`]: { marginTop: e.margin }
|
|
3160
|
-
} } }),
|
|
2680
|
+
} } }), pr = (e) => ({ [e.componentCls]: {
|
|
3161
2681
|
".resizable-title": { position: "relative" },
|
|
3162
2682
|
".resizable-handle": {
|
|
3163
2683
|
position: "absolute",
|
|
@@ -3172,10 +2692,10 @@ var Jr = /* @__PURE__ */ o({
|
|
|
3172
2692
|
} });
|
|
3173
2693
|
//#endregion
|
|
3174
2694
|
//#region src/style/scroll.ts
|
|
3175
|
-
function
|
|
2695
|
+
function mr(e, t) {
|
|
3176
2696
|
return `color-mix(in srgb, ${e} ${t * 100}%, transparent)`;
|
|
3177
2697
|
}
|
|
3178
|
-
function
|
|
2698
|
+
function hr() {
|
|
3179
2699
|
return {
|
|
3180
2700
|
scrollbarWidth: "none",
|
|
3181
2701
|
"&::-webkit-scrollbar": {
|
|
@@ -3184,8 +2704,8 @@ function ei() {
|
|
|
3184
2704
|
}
|
|
3185
2705
|
};
|
|
3186
2706
|
}
|
|
3187
|
-
var
|
|
3188
|
-
let t =
|
|
2707
|
+
var gr = (e) => {
|
|
2708
|
+
let t = mr(e.colorText, .2), n = mr(e.colorText, .4);
|
|
3189
2709
|
return { [e.componentCls]: {
|
|
3190
2710
|
[`${e.antCls}-table-container`]: { position: "relative" },
|
|
3191
2711
|
[`${e.componentCls}-scroll`]: {
|
|
@@ -3222,10 +2742,10 @@ var ti = (e) => {
|
|
|
3222
2742
|
}
|
|
3223
2743
|
}
|
|
3224
2744
|
},
|
|
3225
|
-
[`${e.antCls}-table-body`]:
|
|
3226
|
-
[`${e.antCls}-table-container`]:
|
|
2745
|
+
[`${e.antCls}-table-body`]: hr(),
|
|
2746
|
+
[`${e.antCls}-table-container`]: hr()
|
|
3227
2747
|
} };
|
|
3228
|
-
},
|
|
2748
|
+
}, _r = (e) => ({ [e.componentCls]: {
|
|
3229
2749
|
[`${e.componentCls}-search`]: {
|
|
3230
2750
|
position: "relative",
|
|
3231
2751
|
display: "flex",
|
|
@@ -3327,7 +2847,7 @@ var ti = (e) => {
|
|
|
3327
2847
|
justifyContent: "center",
|
|
3328
2848
|
alignItems: "center"
|
|
3329
2849
|
}
|
|
3330
|
-
} }),
|
|
2850
|
+
} }), vr = (e) => ({ [e.componentCls]: {
|
|
3331
2851
|
[`${e.componentCls}-content`]: {
|
|
3332
2852
|
display: "flex",
|
|
3333
2853
|
flexDirection: "column"
|
|
@@ -3376,15 +2896,15 @@ var ti = (e) => {
|
|
|
3376
2896
|
cursor: "pointer",
|
|
3377
2897
|
"&:hover": { color: e.colorPrimaryHover }
|
|
3378
2898
|
}
|
|
3379
|
-
} }),
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
]),
|
|
2899
|
+
} }), yr = re("ProTable", (e) => [
|
|
2900
|
+
vr(e),
|
|
2901
|
+
fr(e),
|
|
2902
|
+
gr(e),
|
|
2903
|
+
dr(e),
|
|
2904
|
+
pr(e),
|
|
2905
|
+
_r(e),
|
|
2906
|
+
ur(e)
|
|
2907
|
+
]), br = {
|
|
3388
2908
|
rowKey: "id",
|
|
3389
2909
|
align: "left",
|
|
3390
2910
|
columns: [],
|
|
@@ -3399,7 +2919,7 @@ var ti = (e) => {
|
|
|
3399
2919
|
pollingTime: 2e3,
|
|
3400
2920
|
showLoading: !0,
|
|
3401
2921
|
keepAliveReload: !1
|
|
3402
|
-
},
|
|
2922
|
+
}, xr = [
|
|
3403
2923
|
"bordered",
|
|
3404
2924
|
"expandable",
|
|
3405
2925
|
"showHeader",
|
|
@@ -3417,141 +2937,141 @@ var ti = (e) => {
|
|
|
3417
2937
|
"prefixCls",
|
|
3418
2938
|
"classes",
|
|
3419
2939
|
"styles"
|
|
3420
|
-
],
|
|
3421
|
-
let { prefixCls:
|
|
3422
|
-
|
|
3423
|
-
|
|
2940
|
+
], Sr = /* @__PURE__ */ g((e, { attrs: t, slots: n, emit: r, expose: i }) => {
|
|
2941
|
+
let { prefixCls: o } = fe("pro-table", e), s = pe(o), [c, l] = yr(o, s), u = ie(), p = A(), { toggle: g, isFullscreen: _ } = a(p);
|
|
2942
|
+
P(_, (e) => {
|
|
2943
|
+
r("fullscreenChange", e);
|
|
3424
2944
|
});
|
|
3425
|
-
let v =
|
|
3426
|
-
size:
|
|
3427
|
-
onChange: (e) =>
|
|
3428
|
-
}), { loading:
|
|
3429
|
-
loading:
|
|
2945
|
+
let v = m(() => J(o.value, c.value, l.value, s.value, t.class, e.proClasses?.root, Me.value)), y = m(() => [e.proStyles?.root, t.style]), { isMobile: b, screenWidth: S, screens: C } = De(), { paginationInfo: w, paginationAlign: T, requestPagination: E, setPagination: D } = Qt({ pagination: ee(e, "pagination") }), { tableSize: O, setTableSize: k } = _n({
|
|
2946
|
+
size: m(() => e.size),
|
|
2947
|
+
onChange: (e) => r("sizeChange", e)
|
|
2948
|
+
}), { loading: j, setLoading: M } = Xt({
|
|
2949
|
+
loading: m(() => e.loading),
|
|
3430
2950
|
onChange: (t) => e.onLoadingChange?.(t)
|
|
3431
|
-
}), { selectedRowKeys:
|
|
3432
|
-
rowKey:
|
|
3433
|
-
rowSelection:
|
|
3434
|
-
dataSource:
|
|
3435
|
-
}),
|
|
3436
|
-
scroll:
|
|
3437
|
-
columns:
|
|
3438
|
-
rowSelection:
|
|
3439
|
-
screens:
|
|
3440
|
-
screenWidth:
|
|
3441
|
-
scrollPolicy:
|
|
3442
|
-
}), { tableColumns:
|
|
3443
|
-
columns:
|
|
3444
|
-
align:
|
|
3445
|
-
indexColumn:
|
|
3446
|
-
shouldFixActionColumn:
|
|
3447
|
-
wrapColumnRender:
|
|
3448
|
-
columnEmptyText:
|
|
3449
|
-
prefixCls:
|
|
2951
|
+
}), { selectedRowKeys: N, selectedItems: te, mergedRowSelection: ne, select: re, selectAll: F, remove: I, clear: L, sync: R } = en({
|
|
2952
|
+
rowKey: m(() => e.rowKey),
|
|
2953
|
+
rowSelection: m(() => e.rowSelection),
|
|
2954
|
+
dataSource: m(() => e.dataSource ?? [])
|
|
2955
|
+
}), z = m(() => At(e.columns ?? [], e.indexColumn, e.align ?? "left")), { tableScroll: B, shouldFixActionColumn: ae } = mn({
|
|
2956
|
+
scroll: m(() => e.scroll),
|
|
2957
|
+
columns: z,
|
|
2958
|
+
rowSelection: m(() => e.rowSelection),
|
|
2959
|
+
screens: C,
|
|
2960
|
+
screenWidth: S,
|
|
2961
|
+
scrollPolicy: m(() => e.scrollPolicy)
|
|
2962
|
+
}), { tableColumns: oe, cacheColumns: le, setColumns: ue } = Pt({
|
|
2963
|
+
columns: m(() => e.columns ?? []),
|
|
2964
|
+
align: m(() => e.align ?? "left"),
|
|
2965
|
+
indexColumn: m(() => e.indexColumn),
|
|
2966
|
+
shouldFixActionColumn: ae,
|
|
2967
|
+
wrapColumnRender: Ct({
|
|
2968
|
+
columnEmptyText: m(() => e.columnEmptyText),
|
|
2969
|
+
prefixCls: o
|
|
3450
2970
|
}).wrapColumnRender
|
|
3451
|
-
}), { resizableColumns:
|
|
3452
|
-
columns:
|
|
3453
|
-
onResize: (e, t) =>
|
|
3454
|
-
}),
|
|
2971
|
+
}), { resizableColumns: de, resizableComponents: H } = Lt({
|
|
2972
|
+
columns: oe,
|
|
2973
|
+
onResize: (e, t) => r("resizeColumn", e, t)
|
|
2974
|
+
}), me = m(() => e.form === !1 ? void 0 : e.form), he = m(() => e.form === !1 ? e.autoRequest ?? !0 : e.form?.autoRequest ?? e.autoRequest ?? !0), ge = m(() => {
|
|
3455
2975
|
if (e.form !== !1) return e.form?.actions;
|
|
3456
|
-
}), { formColumns:
|
|
3457
|
-
searchMap:
|
|
3458
|
-
columns:
|
|
3459
|
-
}), { dataSource:
|
|
3460
|
-
rowKey:
|
|
3461
|
-
polling:
|
|
3462
|
-
pollingTime:
|
|
2976
|
+
}), { formColumns: _e, defaultFormSearch: ve, formState: ye, getFormSearch: be, resetFormState: xe } = on({
|
|
2977
|
+
searchMap: m(() => e.searchMap ?? []),
|
|
2978
|
+
columns: m(() => e.columns ?? [])
|
|
2979
|
+
}), { dataSource: Se, setTableDataList: we, operateTableDataRow: Te, handleTableChange: Ee, reload: U, run: Oe } = zt({
|
|
2980
|
+
rowKey: m(() => e.rowKey),
|
|
2981
|
+
polling: m(() => e.polling ?? !1),
|
|
2982
|
+
pollingTime: m(() => e.pollingTime ?? 2e3),
|
|
3463
2983
|
request: e.request,
|
|
3464
2984
|
postData: e.postData,
|
|
3465
|
-
dataSource:
|
|
3466
|
-
immediate:
|
|
3467
|
-
waitRequest:
|
|
3468
|
-
autoRequest:
|
|
3469
|
-
debounceTime:
|
|
3470
|
-
params:
|
|
3471
|
-
defaultFormSearch:
|
|
2985
|
+
dataSource: m(() => e.dataSource),
|
|
2986
|
+
immediate: m(() => e.immediate ?? !0),
|
|
2987
|
+
waitRequest: m(() => e.waitRequest ?? !1),
|
|
2988
|
+
autoRequest: m(() => e.autoRequest ?? !0),
|
|
2989
|
+
debounceTime: m(() => e.debounceTime ?? 10),
|
|
2990
|
+
params: m(() => e.params),
|
|
2991
|
+
defaultFormSearch: ve,
|
|
3472
2992
|
onLoadingChange: e.onLoadingChange,
|
|
3473
2993
|
onRequestError: e.onRequestError,
|
|
3474
2994
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit
|
|
3475
2995
|
}, {
|
|
3476
2996
|
pageInfo: E,
|
|
3477
|
-
paginationInfo:
|
|
2997
|
+
paginationInfo: w,
|
|
3478
2998
|
setPagination: D,
|
|
3479
|
-
setLoading:
|
|
3480
|
-
setColumns:
|
|
3481
|
-
removeRowKeys:
|
|
3482
|
-
syncSelectedRows:
|
|
3483
|
-
columns:
|
|
2999
|
+
setLoading: M,
|
|
3000
|
+
setColumns: ue,
|
|
3001
|
+
removeRowKeys: I,
|
|
3002
|
+
syncSelectedRows: R,
|
|
3003
|
+
columns: le
|
|
3484
3004
|
});
|
|
3485
|
-
|
|
3486
|
-
enabled:
|
|
3487
|
-
reload:
|
|
3005
|
+
Jt({
|
|
3006
|
+
enabled: m(() => e.keepAliveReload ?? !1),
|
|
3007
|
+
reload: U
|
|
3488
3008
|
});
|
|
3489
|
-
let
|
|
3490
|
-
fitPage:
|
|
3491
|
-
cardEl:
|
|
3492
|
-
prefixCls:
|
|
3493
|
-
}),
|
|
3494
|
-
...
|
|
3495
|
-
...
|
|
3009
|
+
let ke = A(), { scrollY: Ae, overflowHidden: je, fullPageClass: Me, scrollEl: W, barRef: Ne } = Kt({
|
|
3010
|
+
fitPage: m(() => !B.value?.y && !!e.fitPage),
|
|
3011
|
+
cardEl: ke,
|
|
3012
|
+
prefixCls: o
|
|
3013
|
+
}), G = m(() => ({
|
|
3014
|
+
...B.value ?? {},
|
|
3015
|
+
...Ae.value > 0 ? { y: Ae.value } : {}
|
|
3496
3016
|
}));
|
|
3497
|
-
|
|
3498
|
-
reload:
|
|
3017
|
+
Ce({
|
|
3018
|
+
reload: U,
|
|
3499
3019
|
setPagination: D,
|
|
3500
3020
|
tableSize: O,
|
|
3501
|
-
setTableSize:
|
|
3502
|
-
formAutoRequest:
|
|
3503
|
-
formConfig:
|
|
3504
|
-
formActions:
|
|
3021
|
+
setTableSize: k,
|
|
3022
|
+
formAutoRequest: he,
|
|
3023
|
+
formConfig: me,
|
|
3024
|
+
formActions: ge,
|
|
3505
3025
|
isMobile: b,
|
|
3506
|
-
screenWidth:
|
|
3026
|
+
screenWidth: S,
|
|
3507
3027
|
toggleFullscreen: g,
|
|
3508
3028
|
isFullscreen: _
|
|
3509
3029
|
});
|
|
3510
|
-
let
|
|
3511
|
-
function
|
|
3512
|
-
if (
|
|
3513
|
-
|
|
3030
|
+
let Pe = m(() => !!(e.customRender || n.customRender)), Fe = m(() => e.form === !1 ? !1 : _e.value.length > 0 || !!n.form);
|
|
3031
|
+
function Ie(t, n) {
|
|
3032
|
+
if (he.value) {
|
|
3033
|
+
U({ params: t });
|
|
3514
3034
|
return;
|
|
3515
3035
|
}
|
|
3516
|
-
n === "reset" ? (
|
|
3036
|
+
n === "reset" ? (r("reset", t), e.request && ge.value?.resetReload && U({ params: t })) : e.request && (r("submit", t), U({ params: t }));
|
|
3517
3037
|
}
|
|
3518
|
-
function
|
|
3519
|
-
let t =
|
|
3038
|
+
function Le(e) {
|
|
3039
|
+
let t = w.value;
|
|
3520
3040
|
if (!t) return e;
|
|
3521
3041
|
let { current: n = 1, pageSize: r = 10 } = t;
|
|
3522
3042
|
return e.filter((e, t) => t >= (n - 1) * r && t < n * r);
|
|
3523
3043
|
}
|
|
3524
|
-
function
|
|
3525
|
-
let t = e.customRender ||
|
|
3044
|
+
function Re() {
|
|
3045
|
+
let t = e.customRender || n.customRender;
|
|
3526
3046
|
if (!t) return null;
|
|
3527
|
-
let
|
|
3528
|
-
return
|
|
3529
|
-
dataSource:
|
|
3530
|
-
currentData:
|
|
3531
|
-
}) : null :
|
|
3532
|
-
}
|
|
3533
|
-
function
|
|
3534
|
-
let t =
|
|
3535
|
-
slots:
|
|
3047
|
+
let r = Se.value;
|
|
3048
|
+
return r?.length ? typeof t == "function" ? t({
|
|
3049
|
+
dataSource: r,
|
|
3050
|
+
currentData: Le(r)
|
|
3051
|
+
}) : null : ze();
|
|
3052
|
+
}
|
|
3053
|
+
function ze() {
|
|
3054
|
+
let t = gt({
|
|
3055
|
+
slots: n,
|
|
3536
3056
|
props: e,
|
|
3537
3057
|
key: "emptyText"
|
|
3538
3058
|
});
|
|
3539
|
-
return t
|
|
3059
|
+
return t && u?.renderEmpty?.value ? t || u?.renderEmpty?.value?.() : null;
|
|
3540
3060
|
}
|
|
3541
|
-
function
|
|
3061
|
+
function Be(e, t) {
|
|
3542
3062
|
Ue({
|
|
3543
3063
|
current: e,
|
|
3544
3064
|
pageSize: t
|
|
3545
3065
|
}, {}, {}, {});
|
|
3546
3066
|
}
|
|
3547
|
-
let
|
|
3067
|
+
let Ve = m(() => e.showLoading === !1 ? !1 : j.value), He = m(() => {
|
|
3548
3068
|
let t = {};
|
|
3549
|
-
for (let n of
|
|
3069
|
+
for (let n of xr) {
|
|
3550
3070
|
if (n === "classes") {
|
|
3551
3071
|
let n = e.classes, r = e.proClasses?.table;
|
|
3552
3072
|
(n || r) && (t.classes = {
|
|
3553
3073
|
...n ?? {},
|
|
3554
|
-
...r ? { root:
|
|
3074
|
+
...r ? { root: J(n?.root, r) } : {}
|
|
3555
3075
|
});
|
|
3556
3076
|
continue;
|
|
3557
3077
|
}
|
|
@@ -3561,15 +3081,15 @@ var ti = (e) => {
|
|
|
3561
3081
|
return t;
|
|
3562
3082
|
});
|
|
3563
3083
|
function Ue(t, n, r, i) {
|
|
3564
|
-
|
|
3565
|
-
}
|
|
3566
|
-
function U(e) {
|
|
3567
|
-
s("update:expandedRowKeys", e);
|
|
3084
|
+
Ee(t, n, r, i), e.onChange?.(t, n, r, i);
|
|
3568
3085
|
}
|
|
3569
3086
|
function We(e) {
|
|
3570
|
-
|
|
3087
|
+
r("update:expandedRowKeys", e);
|
|
3088
|
+
}
|
|
3089
|
+
function Ge(e) {
|
|
3090
|
+
r("scroll", e);
|
|
3571
3091
|
}
|
|
3572
|
-
let
|
|
3092
|
+
let Ke = [
|
|
3573
3093
|
"title",
|
|
3574
3094
|
"footer",
|
|
3575
3095
|
"summary",
|
|
@@ -3577,120 +3097,120 @@ var ti = (e) => {
|
|
|
3577
3097
|
"expandedRowRender",
|
|
3578
3098
|
"filterDropdown",
|
|
3579
3099
|
"filterIcon"
|
|
3580
|
-
],
|
|
3100
|
+
], qe = m(() => {
|
|
3581
3101
|
let t = {};
|
|
3582
|
-
for (let e of
|
|
3583
|
-
|
|
3584
|
-
let
|
|
3585
|
-
slots:
|
|
3102
|
+
for (let e of Ke) n[e] && (t[e] = n[e]);
|
|
3103
|
+
n.bodyCell && (t.bodyCell = (e) => n.bodyCell(e)), n.headerCell && (t.headerCell = (e) => n.headerCell(e));
|
|
3104
|
+
let r = gt({
|
|
3105
|
+
slots: n,
|
|
3586
3106
|
props: e,
|
|
3587
3107
|
key: "emptyText"
|
|
3588
3108
|
});
|
|
3589
|
-
return (
|
|
3109
|
+
return (r || u?.renderEmpty?.value) && (t.emptyText = () => r || u?.renderEmpty?.value?.()), t;
|
|
3590
3110
|
});
|
|
3591
|
-
return
|
|
3111
|
+
return i({
|
|
3592
3112
|
actionRef: () => ({
|
|
3593
|
-
loading:
|
|
3594
|
-
dataSource:
|
|
3113
|
+
loading: j,
|
|
3114
|
+
dataSource: Se,
|
|
3595
3115
|
pageInfo: E,
|
|
3596
|
-
reload:
|
|
3116
|
+
reload: U,
|
|
3597
3117
|
reloadAndReset: (e) => {
|
|
3598
|
-
D({ current: 1 }),
|
|
3118
|
+
D({ current: 1 }), xe(), Oe(), e?.callBack?.();
|
|
3599
3119
|
},
|
|
3600
3120
|
setPagination: D,
|
|
3601
3121
|
setPageInfo: (e, t, n, r) => {
|
|
3602
|
-
D(e),
|
|
3122
|
+
D(e), Ee(e, t ?? {}, n ?? {}, r ?? {});
|
|
3603
3123
|
},
|
|
3604
|
-
setTableDataList:
|
|
3605
|
-
operateTableDataRow:
|
|
3606
|
-
setLoading:
|
|
3607
|
-
selectedKeys:
|
|
3608
|
-
selectedItems:
|
|
3124
|
+
setTableDataList: we,
|
|
3125
|
+
operateTableDataRow: Te,
|
|
3126
|
+
setLoading: M,
|
|
3127
|
+
selectedKeys: N,
|
|
3128
|
+
selectedItems: te,
|
|
3609
3129
|
rowsSelection: {
|
|
3610
|
-
clear:
|
|
3611
|
-
select:
|
|
3612
|
-
selectAll:
|
|
3613
|
-
remove:
|
|
3614
|
-
sync:
|
|
3130
|
+
clear: L,
|
|
3131
|
+
select: re,
|
|
3132
|
+
selectAll: F,
|
|
3133
|
+
remove: I,
|
|
3134
|
+
sync: R
|
|
3615
3135
|
}
|
|
3616
3136
|
}),
|
|
3617
3137
|
formRef: () => ({
|
|
3618
|
-
getFormSearch:
|
|
3619
|
-
getFormInnerState: () =>
|
|
3138
|
+
getFormSearch: be,
|
|
3139
|
+
getFormInnerState: () => ye.value,
|
|
3620
3140
|
restFormState: (e) => {
|
|
3621
|
-
|
|
3141
|
+
xe(), e?.();
|
|
3622
3142
|
}
|
|
3623
3143
|
})
|
|
3624
3144
|
}), () => {
|
|
3625
|
-
let
|
|
3626
|
-
return
|
|
3627
|
-
ref:
|
|
3145
|
+
let t = n.actions?.() || e.actionProps?.actions;
|
|
3146
|
+
return h("div", {
|
|
3147
|
+
ref: p,
|
|
3628
3148
|
class: v.value,
|
|
3629
3149
|
style: y.value
|
|
3630
|
-
}, [
|
|
3631
|
-
class:
|
|
3150
|
+
}, [h("div", {
|
|
3151
|
+
class: J(e.proClasses?.content, `${o.value}-content`),
|
|
3632
3152
|
style: e.proStyles?.content
|
|
3633
|
-
}, [
|
|
3634
|
-
prefixCls:
|
|
3635
|
-
formColumns:
|
|
3636
|
-
formState:
|
|
3637
|
-
defaultFormSearch:
|
|
3638
|
-
formConfig:
|
|
3639
|
-
formAutoRequest:
|
|
3640
|
-
formActions:
|
|
3641
|
-
loading:
|
|
3153
|
+
}, [Fe.value && h(rr, {
|
|
3154
|
+
prefixCls: o.value,
|
|
3155
|
+
formColumns: _e.value,
|
|
3156
|
+
formState: ye.value,
|
|
3157
|
+
defaultFormSearch: ve.value,
|
|
3158
|
+
formConfig: me.value,
|
|
3159
|
+
formAutoRequest: he.value,
|
|
3160
|
+
formActions: ge.value,
|
|
3161
|
+
loading: Ve.value,
|
|
3642
3162
|
cardBordered: e.cardBordered,
|
|
3643
3163
|
proClasses: e.proClasses ?? {},
|
|
3644
3164
|
proStyles: e.proStyles ?? {},
|
|
3645
|
-
onSearch:
|
|
3646
|
-
onReset: (e) =>
|
|
3647
|
-
}, { default: () => [
|
|
3648
|
-
ref:
|
|
3649
|
-
class:
|
|
3165
|
+
onSearch: Ie,
|
|
3166
|
+
onReset: (e) => r("reset", e)
|
|
3167
|
+
}, { default: () => [n.form?.()] }), h("div", {
|
|
3168
|
+
ref: ke,
|
|
3169
|
+
class: J(e.proClasses?.card, `${o.value}-card`, e.cardBordered && `${o.value}-card-border`),
|
|
3650
3170
|
style: e.proStyles?.card
|
|
3651
|
-
}, [
|
|
3652
|
-
prefixCls:
|
|
3171
|
+
}, [h(lr, {
|
|
3172
|
+
prefixCls: o.value,
|
|
3653
3173
|
options: e.options,
|
|
3654
3174
|
titleTipText: e.titleTipText,
|
|
3655
3175
|
actionsPlacement: e.actionProps?.placement,
|
|
3656
|
-
actions:
|
|
3657
|
-
headerTitle:
|
|
3658
|
-
headerTitleTip:
|
|
3659
|
-
listToolAfter:
|
|
3176
|
+
actions: t,
|
|
3177
|
+
headerTitle: n.headerTitle?.() ?? e.headerTitle,
|
|
3178
|
+
headerTitleTip: n.headerTitleTip?.() ?? e.headerTitleTip,
|
|
3179
|
+
listToolAfter: n.listToolAfter?.() ?? e.listToolAfter,
|
|
3660
3180
|
proClasses: e.proClasses ?? {},
|
|
3661
3181
|
proStyles: e.proStyles ?? {}
|
|
3662
|
-
}, null),
|
|
3663
|
-
class:
|
|
3182
|
+
}, null), Pe.value ? h(se, { spinning: !!Ve.value }, { default: () => [h("div", { class: J(`${o.value}-list`, e.proClasses?.list) }, [h("div", {
|
|
3183
|
+
class: J(`${o.value}-list-content`, e.proClasses?.listContent),
|
|
3664
3184
|
style: e.proStyles?.listContent
|
|
3665
|
-
}, [
|
|
3666
|
-
align:
|
|
3667
|
-
class:
|
|
3185
|
+
}, [Re()]), w.value !== !1 && Se.value?.length > 0 && h(V, x(w.value, {
|
|
3186
|
+
align: T.value,
|
|
3187
|
+
class: J(`${o.value}-pagination`, e.proClasses?.pagination),
|
|
3668
3188
|
style: e.proStyles?.pagination,
|
|
3669
|
-
onChange:
|
|
3670
|
-
}), null)])] }) :
|
|
3671
|
-
scroll:
|
|
3672
|
-
dataSource:
|
|
3673
|
-
columns: e.draggable ?
|
|
3674
|
-
components: e.draggable ?
|
|
3189
|
+
onChange: Be
|
|
3190
|
+
}), null)])] }) : h(d, null, [h(ce, x(He.value, {
|
|
3191
|
+
scroll: G.value,
|
|
3192
|
+
dataSource: Se.value,
|
|
3193
|
+
columns: e.draggable ? de.value : oe.value,
|
|
3194
|
+
components: e.draggable ? H.value : He.value.components,
|
|
3675
3195
|
rowKey: e.rowKey,
|
|
3676
3196
|
size: O.value,
|
|
3677
|
-
pagination:
|
|
3678
|
-
loading:
|
|
3679
|
-
rowSelection:
|
|
3197
|
+
pagination: w.value,
|
|
3198
|
+
loading: Ve.value,
|
|
3199
|
+
rowSelection: ne.value,
|
|
3680
3200
|
onChange: Ue,
|
|
3681
|
-
"onUpdate:expandedRowKeys":
|
|
3682
|
-
onScroll:
|
|
3201
|
+
"onUpdate:expandedRowKeys": We,
|
|
3202
|
+
onScroll: Ge,
|
|
3683
3203
|
classes: {
|
|
3684
|
-
...
|
|
3685
|
-
...
|
|
3204
|
+
...He.value.classes,
|
|
3205
|
+
...je.value ? { root: `${o.value}-overflow-hidden` } : {}
|
|
3686
3206
|
}
|
|
3687
|
-
}),
|
|
3688
|
-
ref:
|
|
3689
|
-
hasScrollY: !!
|
|
3207
|
+
}), qe.value), W.value && h(f, { to: W.value }, { default: () => [h(xn, {
|
|
3208
|
+
ref: Ne,
|
|
3209
|
+
hasScrollY: !!G.value.y
|
|
3690
3210
|
}, null)] })])])])]);
|
|
3691
3211
|
};
|
|
3692
3212
|
}, {
|
|
3693
|
-
props:
|
|
3213
|
+
props: /*@__PURE__*/ b({
|
|
3694
3214
|
loading: {
|
|
3695
3215
|
type: [Boolean, Object],
|
|
3696
3216
|
required: !1,
|
|
@@ -3863,12 +3383,11 @@ var ti = (e) => {
|
|
|
3863
3383
|
emptyText: {
|
|
3864
3384
|
type: [
|
|
3865
3385
|
Function,
|
|
3866
|
-
Object,
|
|
3867
3386
|
String,
|
|
3868
3387
|
Number,
|
|
3869
|
-
Boolean,
|
|
3870
3388
|
null,
|
|
3871
|
-
|
|
3389
|
+
Object,
|
|
3390
|
+
Boolean
|
|
3872
3391
|
],
|
|
3873
3392
|
required: !1,
|
|
3874
3393
|
default: void 0
|
|
@@ -3876,12 +3395,11 @@ var ti = (e) => {
|
|
|
3876
3395
|
headerTitle: {
|
|
3877
3396
|
type: [
|
|
3878
3397
|
Function,
|
|
3879
|
-
Object,
|
|
3880
3398
|
String,
|
|
3881
3399
|
Number,
|
|
3882
|
-
Boolean,
|
|
3883
3400
|
null,
|
|
3884
|
-
|
|
3401
|
+
Object,
|
|
3402
|
+
Boolean
|
|
3885
3403
|
],
|
|
3886
3404
|
required: !1,
|
|
3887
3405
|
default: void 0
|
|
@@ -3889,12 +3407,11 @@ var ti = (e) => {
|
|
|
3889
3407
|
headerTitleTip: {
|
|
3890
3408
|
type: [
|
|
3891
3409
|
Function,
|
|
3892
|
-
Object,
|
|
3893
3410
|
String,
|
|
3894
3411
|
Number,
|
|
3895
|
-
Boolean,
|
|
3896
3412
|
null,
|
|
3897
|
-
|
|
3413
|
+
Object,
|
|
3414
|
+
Boolean
|
|
3898
3415
|
],
|
|
3899
3416
|
required: !1,
|
|
3900
3417
|
default: void 0
|
|
@@ -3902,12 +3419,11 @@ var ti = (e) => {
|
|
|
3902
3419
|
listToolAfter: {
|
|
3903
3420
|
type: [
|
|
3904
3421
|
Function,
|
|
3905
|
-
Object,
|
|
3906
3422
|
String,
|
|
3907
3423
|
Number,
|
|
3908
|
-
Boolean,
|
|
3909
3424
|
null,
|
|
3910
|
-
|
|
3425
|
+
Object,
|
|
3426
|
+
Boolean
|
|
3911
3427
|
],
|
|
3912
3428
|
required: !1,
|
|
3913
3429
|
default: void 0
|
|
@@ -4114,7 +3630,7 @@ var ti = (e) => {
|
|
|
4114
3630
|
type: String,
|
|
4115
3631
|
required: !1
|
|
4116
3632
|
}
|
|
4117
|
-
},
|
|
3633
|
+
}, br),
|
|
4118
3634
|
emits: [
|
|
4119
3635
|
"change",
|
|
4120
3636
|
"reset",
|
|
@@ -4132,4 +3648,4 @@ var ti = (e) => {
|
|
|
4132
3648
|
inheritAttrs: !1
|
|
4133
3649
|
});
|
|
4134
3650
|
//#endregion
|
|
4135
|
-
export {
|
|
3651
|
+
export { Sr as GProTable, zt as useFetchData, we as useInjectTableContext, Qt as usePagination, De as useProBreakpoints, $t as useRequestOptions, nn as useTable, on as useTableForm };
|