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