@gx-design-vue/pro-table 0.2.0-alpha.12 → 0.2.0-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ScrollBar/Bar.d.ts +1 -1
- package/dist/components/SearchForm/CollapseToggle.d.ts +1 -1
- package/dist/components/SearchForm/CollapseToggle.js +2 -2
- package/dist/components/SearchForm/FormItemContainer.d.ts +2 -2
- package/dist/components/SearchForm/FormItemWrapper.d.ts +1 -1
- package/dist/components/SearchForm/SearchForm.d.ts +2 -2
- 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/pro-table.esm.js +866 -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,134 @@ 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
|
-
function
|
|
1767
|
-
let i =
|
|
1284
|
+
var tn = [];
|
|
1285
|
+
function nn(e, t) {
|
|
1286
|
+
let n = k({}), r = /* @__PURE__ */ new Set();
|
|
1287
|
+
function i(e = {}) {
|
|
1288
|
+
let i = dt({}, e);
|
|
1768
1289
|
for (let e of r) e in i || (delete n[e], r.delete(e));
|
|
1769
1290
|
Object.assign(n, i);
|
|
1770
1291
|
for (let e of Object.keys(i)) r.add(e);
|
|
1771
1292
|
t?.request && (n.request = t.request);
|
|
1772
1293
|
}
|
|
1773
|
-
|
|
1774
|
-
|
|
1294
|
+
P(() => N(t?.state), (e) => {
|
|
1295
|
+
i(e ?? {});
|
|
1775
1296
|
}, {
|
|
1776
1297
|
deep: !0,
|
|
1777
1298
|
immediate: !0
|
|
1778
1299
|
});
|
|
1779
|
-
let
|
|
1780
|
-
...
|
|
1781
|
-
...
|
|
1782
|
-
})),
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
}),
|
|
1786
|
-
|
|
1300
|
+
let a = m(() => e.value?.actionRef?.() ?? {}), o = m(() => e.value?.formRef?.() ?? {}), s = m(() => ({
|
|
1301
|
+
...a.value?.pageInfo || {},
|
|
1302
|
+
...o.value?.getFormSearch?.() || {}
|
|
1303
|
+
})), c = A(!1);
|
|
1304
|
+
P(() => a.value?.loading?.value, (e) => {
|
|
1305
|
+
c.value = !!e;
|
|
1306
|
+
}), P(c, (e) => {
|
|
1307
|
+
a.value?.setLoading?.(!!e);
|
|
1787
1308
|
});
|
|
1309
|
+
function l(e) {
|
|
1310
|
+
a.value?.reload?.(e);
|
|
1311
|
+
}
|
|
1788
1312
|
function u(e) {
|
|
1789
|
-
|
|
1313
|
+
a.value?.setTableDataList?.(e);
|
|
1790
1314
|
}
|
|
1791
1315
|
function d(e) {
|
|
1792
|
-
|
|
1793
|
-
}
|
|
1794
|
-
function f(e) {
|
|
1795
|
-
o.value?.operateTableDataRow?.(e);
|
|
1316
|
+
a.value?.operateTableDataRow?.(e);
|
|
1796
1317
|
}
|
|
1797
|
-
function
|
|
1798
|
-
|
|
1318
|
+
function f(e, t, n, r) {
|
|
1319
|
+
a.value?.setPageInfo?.(e, t, n, r);
|
|
1799
1320
|
}
|
|
1800
|
-
function
|
|
1801
|
-
|
|
1321
|
+
function p(e) {
|
|
1322
|
+
a.value?.setPagination?.(e);
|
|
1802
1323
|
}
|
|
1803
1324
|
function h(e) {
|
|
1804
|
-
|
|
1325
|
+
a.value?.reloadAndReset?.(e);
|
|
1805
1326
|
}
|
|
1806
1327
|
function g(e) {
|
|
1807
|
-
|
|
1808
|
-
}
|
|
1809
|
-
let _ =
|
|
1810
|
-
clear: () =>
|
|
1811
|
-
select: (e, t) =>
|
|
1812
|
-
selectAll: (e, t) =>
|
|
1813
|
-
remove: (e) =>
|
|
1814
|
-
sync: () =>
|
|
1328
|
+
c.value = e;
|
|
1329
|
+
}
|
|
1330
|
+
let _ = m(() => a.value?.selectedKeys?.value ?? []), v = m(() => a.value?.selectedItems?.value ?? []), y = {
|
|
1331
|
+
clear: () => a.value?.rowsSelection?.clear?.(),
|
|
1332
|
+
select: (e, t) => a.value?.rowsSelection?.select?.(e, t),
|
|
1333
|
+
selectAll: (e, t) => a.value?.rowsSelection?.selectAll?.(e, t),
|
|
1334
|
+
remove: (e) => a.value?.rowsSelection?.remove?.(e),
|
|
1335
|
+
sync: () => a.value?.rowsSelection?.sync?.()
|
|
1815
1336
|
};
|
|
1816
1337
|
function b(e, t) {
|
|
1817
|
-
n.searchMap &&= n.searchMap.map((n) => n.name === e ?
|
|
1338
|
+
n.searchMap &&= n.searchMap.map((n) => n.name === e ? dt({}, n, t) : n);
|
|
1818
1339
|
}
|
|
1819
1340
|
return {
|
|
1820
|
-
loading:
|
|
1821
|
-
dataSource:
|
|
1822
|
-
requestSearch:
|
|
1341
|
+
loading: c,
|
|
1342
|
+
dataSource: m(() => a.value?.dataSource?.value ?? tn),
|
|
1343
|
+
requestSearch: s,
|
|
1823
1344
|
selectedKeys: _,
|
|
1824
1345
|
selectedItems: v,
|
|
1825
1346
|
rowsSelection: y,
|
|
1826
|
-
actionRef:
|
|
1827
|
-
formRef:
|
|
1828
|
-
reload:
|
|
1829
|
-
setTableDataList:
|
|
1830
|
-
operateTableDataRow:
|
|
1831
|
-
setPageInfo:
|
|
1832
|
-
setPagination:
|
|
1347
|
+
actionRef: a,
|
|
1348
|
+
formRef: o,
|
|
1349
|
+
reload: l,
|
|
1350
|
+
setTableDataList: u,
|
|
1351
|
+
operateTableDataRow: d,
|
|
1352
|
+
setPageInfo: f,
|
|
1353
|
+
setPagination: p,
|
|
1833
1354
|
reloadAndReset: h,
|
|
1834
1355
|
setLoading: g,
|
|
1835
1356
|
tableState: n,
|
|
@@ -1838,14 +1359,14 @@ function Hn(e, t) {
|
|
|
1838
1359
|
}
|
|
1839
1360
|
//#endregion
|
|
1840
1361
|
//#region src/hooks/useTableForm.ts
|
|
1841
|
-
function
|
|
1362
|
+
function rn(e) {
|
|
1842
1363
|
let t = e.reduce((e, t) => t.order === void 0 ? e : Math.max(e, t.order), 0), n = e.map((e) => e.order === void 0 ? (t += 1, {
|
|
1843
1364
|
...e,
|
|
1844
1365
|
order: t
|
|
1845
1366
|
}) : e);
|
|
1846
1367
|
return n.sort((e, t) => (e.order ?? 0) - (t.order ?? 0)), n;
|
|
1847
1368
|
}
|
|
1848
|
-
function
|
|
1369
|
+
function an(e) {
|
|
1849
1370
|
let t = {};
|
|
1850
1371
|
for (let n of e) {
|
|
1851
1372
|
let e = n.valueType ?? "text";
|
|
@@ -1853,25 +1374,25 @@ function Wn(e) {
|
|
|
1853
1374
|
}
|
|
1854
1375
|
return t;
|
|
1855
1376
|
}
|
|
1856
|
-
function
|
|
1857
|
-
let { searchMap: t, columns: n } = e, r =
|
|
1377
|
+
function on(e) {
|
|
1378
|
+
let { searchMap: t, columns: n } = e, r = m(() => {
|
|
1858
1379
|
let e = t.value, r = n.value.filter((e) => e.searchConfig).map((e) => ({
|
|
1859
1380
|
...e.searchConfig,
|
|
1860
1381
|
order: e.searchConfig.order ?? e.order ?? 0
|
|
1861
1382
|
}));
|
|
1862
|
-
return
|
|
1863
|
-
}),
|
|
1864
|
-
|
|
1865
|
-
|
|
1383
|
+
return rn([...e, ...r]);
|
|
1384
|
+
}), i = m(() => an(r.value)), a = A({});
|
|
1385
|
+
P(() => i.value, (e) => {
|
|
1386
|
+
a.value = ut(M(e));
|
|
1866
1387
|
}, {
|
|
1867
1388
|
deep: !0,
|
|
1868
1389
|
immediate: !0
|
|
1869
1390
|
});
|
|
1870
|
-
function
|
|
1871
|
-
let e =
|
|
1391
|
+
function o() {
|
|
1392
|
+
let e = ut(M(a.value));
|
|
1872
1393
|
for (let t of r.value) {
|
|
1873
1394
|
let n = t.valueType ?? "text", r = t.name;
|
|
1874
|
-
if (n === "text" && (e[r] =
|
|
1395
|
+
if (n === "text" && (e[r] = a.value[r] ?? t.initialValue), n === "dateRange" && (t.rangeStartName || t.rangeEndName)) {
|
|
1875
1396
|
let n = e[r];
|
|
1876
1397
|
e[t.rangeStartName || "start"] = Array.isArray(n) ? n[0] : void 0, e[t.rangeEndName || "end"] = Array.isArray(n) ? n[1] : void 0, delete e[r];
|
|
1877
1398
|
}
|
|
@@ -1879,9 +1400,9 @@ function Gn(e) {
|
|
|
1879
1400
|
let t = e[r];
|
|
1880
1401
|
e[r] = Array.isArray(t) ? t[t.length - 1] : void 0;
|
|
1881
1402
|
}
|
|
1882
|
-
if (n === "treeSelect" && Array.isArray(
|
|
1403
|
+
if (n === "treeSelect" && Array.isArray(a.value[r])) {
|
|
1883
1404
|
let n = t.valueKey === "text" ? "label" : "value";
|
|
1884
|
-
e[r] =
|
|
1405
|
+
e[r] = a.value[r].length > 0 ? a.value[r].map((e) => e[n]).join(",") : void 0;
|
|
1885
1406
|
}
|
|
1886
1407
|
if (n === "numberRange") {
|
|
1887
1408
|
let t = e[r];
|
|
@@ -1890,46 +1411,46 @@ function Gn(e) {
|
|
|
1890
1411
|
}
|
|
1891
1412
|
return e;
|
|
1892
1413
|
}
|
|
1893
|
-
function
|
|
1894
|
-
let e =
|
|
1895
|
-
|
|
1414
|
+
function s() {
|
|
1415
|
+
let e = ut(M(i.value));
|
|
1416
|
+
a.value = e;
|
|
1896
1417
|
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 ||
|
|
1418
|
+
let n = t.rangeStartName || "start", r = t.rangeEndName || "end", i = e[n], o = e[r];
|
|
1419
|
+
(i !== void 0 || o !== void 0) && (a.value[t.name] = [i, o]);
|
|
1899
1420
|
}
|
|
1900
1421
|
}
|
|
1901
|
-
function
|
|
1902
|
-
e && (
|
|
1422
|
+
function c(e, t) {
|
|
1423
|
+
e && (a.value[e] = t);
|
|
1903
1424
|
}
|
|
1904
1425
|
return {
|
|
1905
1426
|
formColumns: r,
|
|
1906
|
-
defaultFormSearch:
|
|
1907
|
-
formState:
|
|
1908
|
-
getFormSearch:
|
|
1909
|
-
resetFormState:
|
|
1910
|
-
changeFormState:
|
|
1427
|
+
defaultFormSearch: i,
|
|
1428
|
+
formState: a,
|
|
1429
|
+
getFormSearch: o,
|
|
1430
|
+
resetFormState: s,
|
|
1431
|
+
changeFormState: c
|
|
1911
1432
|
};
|
|
1912
1433
|
}
|
|
1913
1434
|
//#endregion
|
|
1914
1435
|
//#region src/hooks/useTableScroll.ts
|
|
1915
|
-
var
|
|
1436
|
+
var sn = 150, cn = 60, ln = {
|
|
1916
1437
|
desktop: 400,
|
|
1917
1438
|
mobile: 235
|
|
1918
1439
|
};
|
|
1919
|
-
function
|
|
1440
|
+
function un(e) {
|
|
1920
1441
|
if (e === !1) return {
|
|
1921
1442
|
mode: "disabled",
|
|
1922
1443
|
breakpoint: "xl",
|
|
1923
1444
|
modal: !1,
|
|
1924
|
-
modalY:
|
|
1445
|
+
modalY: ln,
|
|
1925
1446
|
actionFixed: !1
|
|
1926
1447
|
};
|
|
1927
1448
|
let t = typeof e?.modalY == "number" ? {
|
|
1928
1449
|
desktop: e.modalY,
|
|
1929
1450
|
mobile: e.modalY
|
|
1930
1451
|
} : {
|
|
1931
|
-
desktop: e?.modalY?.desktop ??
|
|
1932
|
-
mobile: e?.modalY?.mobile ??
|
|
1452
|
+
desktop: e?.modalY?.desktop ?? ln.desktop,
|
|
1453
|
+
mobile: e?.modalY?.mobile ?? ln.mobile
|
|
1933
1454
|
}, n = e?.mode ?? "auto";
|
|
1934
1455
|
return {
|
|
1935
1456
|
mode: n,
|
|
@@ -1939,49 +1460,49 @@ function Yn(e) {
|
|
|
1939
1460
|
actionFixed: n === "disabled" ? !1 : e?.actionFixed ?? "auto"
|
|
1940
1461
|
};
|
|
1941
1462
|
}
|
|
1942
|
-
function
|
|
1463
|
+
function dn(e, t, n) {
|
|
1943
1464
|
return typeof e == "number" ? n >= e : !!t[e];
|
|
1944
1465
|
}
|
|
1945
|
-
function
|
|
1466
|
+
function fn(e) {
|
|
1946
1467
|
let t = Number.parseInt(String(e.width ?? ""), 10);
|
|
1947
|
-
return Number.isFinite(t) && t > 0 ? t :
|
|
1468
|
+
return Number.isFinite(t) && t > 0 ? t : sn;
|
|
1948
1469
|
}
|
|
1949
|
-
function
|
|
1950
|
-
return e.reduce((e, t) => e +
|
|
1470
|
+
function pn(e, t) {
|
|
1471
|
+
return e.reduce((e, t) => e + fn(t), 0) + (t ? cn : 0);
|
|
1951
1472
|
}
|
|
1952
|
-
function
|
|
1953
|
-
let t =
|
|
1473
|
+
function mn(e) {
|
|
1474
|
+
let t = m(() => un(e.scrollPolicy.value)), n = m(() => {
|
|
1954
1475
|
let n = t.value;
|
|
1955
|
-
return
|
|
1956
|
-
}), r =
|
|
1476
|
+
return dn(n.breakpoint, e.screens.value, e.screenWidth.value);
|
|
1477
|
+
}), r = m(() => pn(e.columns.value, !!e.rowSelection.value)), i = m(() => {
|
|
1957
1478
|
let i = t.value, a = e.scroll.value;
|
|
1958
1479
|
if (i.mode === "disabled") return {};
|
|
1959
1480
|
if (i.mode === "manual") return a ?? {};
|
|
1960
1481
|
let o = { ...a ?? {} };
|
|
1961
1482
|
return !o.x && !n.value && (o.x = r.value), i.modal && !o.y && (o.y = n.value ? i.modalY.desktop : i.modalY.mobile), o;
|
|
1962
|
-
}),
|
|
1483
|
+
}), a = m(() => !!i.value?.x);
|
|
1963
1484
|
return {
|
|
1964
|
-
tableScroll:
|
|
1965
|
-
hasHorizontalScroll:
|
|
1966
|
-
shouldFixActionColumn:
|
|
1485
|
+
tableScroll: i,
|
|
1486
|
+
hasHorizontalScroll: a,
|
|
1487
|
+
shouldFixActionColumn: m(() => {
|
|
1967
1488
|
let e = t.value;
|
|
1968
|
-
return e.mode === "disabled" || e.actionFixed === !1 ? !1 :
|
|
1489
|
+
return e.mode === "disabled" || e.actionFixed === !1 ? !1 : a.value;
|
|
1969
1490
|
}),
|
|
1970
1491
|
normalizedScrollPolicy: t
|
|
1971
1492
|
};
|
|
1972
1493
|
}
|
|
1973
1494
|
//#endregion
|
|
1974
1495
|
//#region src/hooks/useTableSize.ts
|
|
1975
|
-
var
|
|
1496
|
+
var hn = new Set([
|
|
1976
1497
|
"small",
|
|
1977
1498
|
"medium",
|
|
1978
1499
|
"middle",
|
|
1979
1500
|
"large"
|
|
1980
|
-
]),
|
|
1981
|
-
function
|
|
1982
|
-
let t =
|
|
1501
|
+
]), gn = "middle";
|
|
1502
|
+
function _n(e) {
|
|
1503
|
+
let t = m(() => e.size.value ?? gn);
|
|
1983
1504
|
function n(t) {
|
|
1984
|
-
|
|
1505
|
+
hn.has(t) && e.onChange?.(t);
|
|
1985
1506
|
}
|
|
1986
1507
|
return {
|
|
1987
1508
|
tableSize: t,
|
|
@@ -1990,7 +1511,7 @@ function nr(e) {
|
|
|
1990
1511
|
}
|
|
1991
1512
|
//#endregion
|
|
1992
1513
|
//#region src/components/ScrollBar/util.ts
|
|
1993
|
-
var
|
|
1514
|
+
var vn = {
|
|
1994
1515
|
vertical: {
|
|
1995
1516
|
offset: "offsetHeight",
|
|
1996
1517
|
scroll: "scrollTop",
|
|
@@ -2012,13 +1533,13 @@ var rr = {
|
|
|
2012
1533
|
direction: "left"
|
|
2013
1534
|
}
|
|
2014
1535
|
};
|
|
2015
|
-
function
|
|
1536
|
+
function yn({ move: e, size: t, bar: n }) {
|
|
2016
1537
|
return {
|
|
2017
1538
|
[n.size]: t,
|
|
2018
1539
|
transform: `translate${n.axis}(${e}%)`
|
|
2019
1540
|
};
|
|
2020
1541
|
}
|
|
2021
|
-
var
|
|
1542
|
+
var bn = /* @__PURE__ */ g({
|
|
2022
1543
|
name: "ScrollBarThumb",
|
|
2023
1544
|
inheritAttrs: !1,
|
|
2024
1545
|
props: {
|
|
@@ -2036,68 +1557,68 @@ var ar = /* @__PURE__ */ o({
|
|
|
2036
1557
|
}
|
|
2037
1558
|
},
|
|
2038
1559
|
setup(e) {
|
|
2039
|
-
let t =
|
|
1560
|
+
let t = Ut(), n = A(), r = A(), a = A({}), o = A(!1), s = !1, c = !1, l = 0, u = 0, d = m(() => vn[e.vertical ? "vertical" : "horizontal"]), f = m(() => yn({
|
|
2040
1561
|
size: e.size,
|
|
2041
1562
|
move: e.move,
|
|
2042
|
-
bar:
|
|
2043
|
-
})),
|
|
2044
|
-
function
|
|
1563
|
+
bar: d.value
|
|
1564
|
+
})), p = m(() => !n.value || !r.value || !t?.wrapElement?.value ? 1 : n.value[d.value.offset] ** 2 / t.wrapElement.value[d.value.scrollSize] / e.ratio / r.value[d.value.offset]);
|
|
1565
|
+
function g(e) {
|
|
2045
1566
|
document.onselectstart !== e && (document.onselectstart = e);
|
|
2046
1567
|
}
|
|
2047
|
-
function
|
|
2048
|
-
if (!t?.wrapElement?.value || !n.value || !r.value || !
|
|
2049
|
-
let i =
|
|
1568
|
+
function _(e) {
|
|
1569
|
+
if (!t?.wrapElement?.value || !n.value || !r.value || !s) return;
|
|
1570
|
+
let i = a.value[d.value.axis];
|
|
2050
1571
|
if (!i) return;
|
|
2051
|
-
let
|
|
2052
|
-
|
|
1572
|
+
let o = ((n.value.getBoundingClientRect()[d.value.direction] - e[d.value.client]) * -1 - (r.value[d.value.offset] - i)) * 100 * p.value / n.value[d.value.offset];
|
|
1573
|
+
d.value.scroll === "scrollLeft" ? t.wrapElement.value[d.value.scroll] = o * u / 100 : t.wrapElement.value[d.value.scroll] = o * l / 100;
|
|
2053
1574
|
}
|
|
2054
|
-
let
|
|
1575
|
+
let v = document.onselectstart;
|
|
2055
1576
|
function y() {
|
|
2056
|
-
|
|
1577
|
+
s = !1, a.value[d.value.axis] = 0, document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", y), g(v), c && (o.value = !1);
|
|
2057
1578
|
}
|
|
2058
1579
|
function b(e) {
|
|
2059
|
-
t?.wrapElement?.value && (e.stopImmediatePropagation(),
|
|
1580
|
+
t?.wrapElement?.value && (e.stopImmediatePropagation(), s = !0, l = t.wrapElement.value.scrollHeight, u = t.wrapElement.value.scrollWidth, document.addEventListener("mousemove", _), document.addEventListener("mouseup", y), v = document.onselectstart, document.onselectstart = () => !1);
|
|
2060
1581
|
}
|
|
2061
1582
|
function x(e) {
|
|
2062
1583
|
if (e.stopPropagation(), e.ctrlKey || [1, 2].includes(e.button)) return;
|
|
2063
1584
|
window.getSelection()?.removeAllRanges(), b(e);
|
|
2064
1585
|
let t = e.currentTarget;
|
|
2065
|
-
t && (
|
|
1586
|
+
t && (a.value[d.value.axis] = t[d.value.offset] - (e[d.value.client] - t.getBoundingClientRect()[d.value.direction]));
|
|
2066
1587
|
}
|
|
2067
1588
|
function S(e) {
|
|
2068
1589
|
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
|
-
|
|
1590
|
+
let i = (Math.abs(e.target.getBoundingClientRect()[d.value.direction] - e[d.value.client]) - r.value[d.value.offset] / 2) * 100 * p.value / n.value[d.value.offset];
|
|
1591
|
+
t.wrapElement.value[d.value.scroll] = i * t.wrapElement.value[d.value.scrollSize] / 100;
|
|
1592
|
+
}
|
|
1593
|
+
return i(t?.scrollbarElement, "mousemove", () => {
|
|
1594
|
+
c = !1, o.value = !!e.size;
|
|
1595
|
+
}), i(t?.scrollbarElement, "mouseleave", () => {
|
|
1596
|
+
c = !0, o.value = s;
|
|
1597
|
+
}), w(() => {
|
|
1598
|
+
g(v), document.removeEventListener("mouseup", y);
|
|
2078
1599
|
}), () => {
|
|
2079
1600
|
if (!t) return null;
|
|
2080
|
-
let i =
|
|
2081
|
-
height: `calc(100% - ${
|
|
2082
|
-
top:
|
|
1601
|
+
let i = d.value.key === "vertical" ? {
|
|
1602
|
+
height: `calc(100% - ${F(t.tableHeaderHeight.value + 1)})`,
|
|
1603
|
+
top: F(t.tableHeaderHeight.value + 1)
|
|
2083
1604
|
} : {};
|
|
2084
|
-
return
|
|
1605
|
+
return h("div", {
|
|
2085
1606
|
ref: n,
|
|
2086
1607
|
style: {
|
|
2087
1608
|
...e.barStyle,
|
|
2088
1609
|
...i
|
|
2089
1610
|
},
|
|
2090
|
-
class: `${t.className}-bar is-${
|
|
1611
|
+
class: `${t.className}-bar is-${d.value.key}`,
|
|
2091
1612
|
onMousedown: S
|
|
2092
|
-
}, [
|
|
1613
|
+
}, [h("div", {
|
|
2093
1614
|
ref: r,
|
|
2094
1615
|
class: `${t.className}-thumb`,
|
|
2095
|
-
style:
|
|
1616
|
+
style: f.value,
|
|
2096
1617
|
onMousedown: x
|
|
2097
1618
|
}, null)]);
|
|
2098
1619
|
};
|
|
2099
1620
|
}
|
|
2100
|
-
}),
|
|
1621
|
+
}), xn = /* @__PURE__ */ g({
|
|
2101
1622
|
name: "ScrollBarBar",
|
|
2102
1623
|
inheritAttrs: !1,
|
|
2103
1624
|
props: {
|
|
@@ -2118,35 +1639,35 @@ var ar = /* @__PURE__ */ o({
|
|
|
2118
1639
|
default: !1
|
|
2119
1640
|
}
|
|
2120
1641
|
},
|
|
2121
|
-
setup(e, { expose:
|
|
2122
|
-
let
|
|
2123
|
-
function
|
|
1642
|
+
setup(e, { expose: t }) {
|
|
1643
|
+
let n = Ut(), r = A(0), i = A(0), a = A(""), o = A(""), s = A(1), c = A(1);
|
|
1644
|
+
function l(e) {
|
|
2124
1645
|
if (!e) return;
|
|
2125
1646
|
let t = e.offsetHeight - 4, n = e.offsetWidth - 4;
|
|
2126
|
-
|
|
1647
|
+
i.value = e.scrollTop * 100 / t * s.value, r.value = e.scrollLeft * 100 / n * c.value;
|
|
2127
1648
|
}
|
|
2128
|
-
function
|
|
2129
|
-
let t =
|
|
1649
|
+
function u() {
|
|
1650
|
+
let t = n?.wrapElement?.value;
|
|
2130
1651
|
if (!t) return;
|
|
2131
|
-
let
|
|
2132
|
-
|
|
2133
|
-
}
|
|
2134
|
-
return
|
|
2135
|
-
|
|
2136
|
-
}),
|
|
2137
|
-
update:
|
|
2138
|
-
handleScroll:
|
|
2139
|
-
}), () =>
|
|
2140
|
-
move:
|
|
1652
|
+
let r = t.offsetHeight - 4, i = t.offsetWidth - 4, l = r ** 2 / t.scrollHeight, u = i ** 2 / t.scrollWidth, d = Math.max(l, e.minSize), f = Math.max(u, e.minSize);
|
|
1653
|
+
s.value = l / (r - l) / (d / (r - d)), c.value = u / (i - u) / (f / (i - f)), o.value = d + 4 < r ? `${d}px` : "", a.value = f + 4 < i ? `${f}px` : "";
|
|
1654
|
+
}
|
|
1655
|
+
return E(() => {
|
|
1656
|
+
S(() => u());
|
|
1657
|
+
}), t({
|
|
1658
|
+
update: u,
|
|
1659
|
+
handleScroll: l
|
|
1660
|
+
}), () => n ? h(d, null, [h(bn, {
|
|
1661
|
+
move: r.value,
|
|
2141
1662
|
barStyle: e.barStyle.x,
|
|
2142
|
-
ratio:
|
|
2143
|
-
size:
|
|
1663
|
+
ratio: c.value,
|
|
1664
|
+
size: a.value,
|
|
2144
1665
|
always: e.always
|
|
2145
|
-
}, null), e.hasScrollY &&
|
|
2146
|
-
move:
|
|
1666
|
+
}, null), e.hasScrollY && h(bn, {
|
|
1667
|
+
move: i.value,
|
|
2147
1668
|
barStyle: e.barStyle.y,
|
|
2148
|
-
ratio:
|
|
2149
|
-
size:
|
|
1669
|
+
ratio: s.value,
|
|
1670
|
+
size: o.value,
|
|
2150
1671
|
vertical: !0,
|
|
2151
1672
|
always: e.always
|
|
2152
1673
|
}, null)]) : null;
|
|
@@ -2154,33 +1675,33 @@ var ar = /* @__PURE__ */ o({
|
|
|
2154
1675
|
});
|
|
2155
1676
|
//#endregion
|
|
2156
1677
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
|
|
2157
|
-
function
|
|
1678
|
+
function Sn(e) {
|
|
2158
1679
|
return e == null || typeof e != "object" && typeof e != "function";
|
|
2159
1680
|
}
|
|
2160
1681
|
//#endregion
|
|
2161
1682
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
|
|
2162
|
-
function
|
|
1683
|
+
function Cn(e) {
|
|
2163
1684
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
2164
1685
|
}
|
|
2165
1686
|
//#endregion
|
|
2166
1687
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
|
|
2167
|
-
function
|
|
1688
|
+
function wn(e) {
|
|
2168
1689
|
return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
|
|
2169
1690
|
}
|
|
2170
1691
|
//#endregion
|
|
2171
1692
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
2172
|
-
function
|
|
1693
|
+
function Tn(e) {
|
|
2173
1694
|
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
|
|
2174
1695
|
}
|
|
2175
1696
|
//#endregion
|
|
2176
1697
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
|
|
2177
|
-
var
|
|
1698
|
+
var En = "[object RegExp]", Dn = "[object String]", On = "[object Number]", kn = "[object Boolean]", An = "[object Arguments]", jn = "[object Symbol]", Mn = "[object Date]", Nn = "[object Map]", Pn = "[object Set]", Fn = "[object Array]", In = "[object ArrayBuffer]", Ln = "[object Object]", Rn = "[object DataView]", zn = "[object Uint8Array]", Bn = "[object Uint8ClampedArray]", Vn = "[object Uint16Array]", Hn = "[object Uint32Array]", Un = "[object Int8Array]", Wn = "[object Int16Array]", Gn = "[object Int32Array]", Kn = "[object Float32Array]", qn = "[object Float64Array]";
|
|
2178
1699
|
//#endregion
|
|
2179
1700
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
|
|
2180
1701
|
function Z(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
2181
1702
|
let a = i?.(e, t, n, r);
|
|
2182
1703
|
if (a !== void 0) return a;
|
|
2183
|
-
if (
|
|
1704
|
+
if (Sn(e)) return e;
|
|
2184
1705
|
if (r.has(e)) return r.get(e);
|
|
2185
1706
|
if (Array.isArray(e)) {
|
|
2186
1707
|
let t = Array(e.length);
|
|
@@ -2206,7 +1727,7 @@ function Z(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
|
2206
1727
|
return t;
|
|
2207
1728
|
}
|
|
2208
1729
|
if (typeof Buffer < "u" && Buffer.isBuffer(e)) return e.subarray();
|
|
2209
|
-
if (
|
|
1730
|
+
if (Cn(e)) {
|
|
2210
1731
|
let t = new (Object.getPrototypeOf(e)).constructor(e.length);
|
|
2211
1732
|
r.set(e, t);
|
|
2212
1733
|
for (let a = 0; a < e.length; a++) t[a] = Z(e[a], a, n, r, i);
|
|
@@ -2241,49 +1762,49 @@ function Z(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
|
2241
1762
|
let t = new String(e.valueOf());
|
|
2242
1763
|
return r.set(e, t), Q(t, e, n, r, i), t;
|
|
2243
1764
|
}
|
|
2244
|
-
if (typeof e == "object" &&
|
|
1765
|
+
if (typeof e == "object" && Jn(e)) {
|
|
2245
1766
|
let t = Object.create(Object.getPrototypeOf(e));
|
|
2246
1767
|
return r.set(e, t), Q(t, e, n, r, i), t;
|
|
2247
1768
|
}
|
|
2248
1769
|
return e;
|
|
2249
1770
|
}
|
|
2250
1771
|
function Q(e, t, n = e, r, i) {
|
|
2251
|
-
let a = [...Object.keys(t), ...
|
|
1772
|
+
let a = [...Object.keys(t), ...wn(t)];
|
|
2252
1773
|
for (let o = 0; o < a.length; o++) {
|
|
2253
1774
|
let s = a[o], c = Object.getOwnPropertyDescriptor(e, s);
|
|
2254
1775
|
(c == null || c.writable) && (e[s] = Z(t[s], s, n, r, i));
|
|
2255
1776
|
}
|
|
2256
1777
|
}
|
|
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
|
|
1778
|
+
function Jn(e) {
|
|
1779
|
+
switch (Tn(e)) {
|
|
1780
|
+
case An:
|
|
1781
|
+
case Fn:
|
|
1782
|
+
case In:
|
|
1783
|
+
case Rn:
|
|
1784
|
+
case kn:
|
|
1785
|
+
case Mn:
|
|
1786
|
+
case Kn:
|
|
1787
|
+
case qn:
|
|
1788
|
+
case Un:
|
|
1789
|
+
case Wn:
|
|
1790
|
+
case Gn:
|
|
1791
|
+
case Nn:
|
|
1792
|
+
case On:
|
|
1793
|
+
case Ln:
|
|
1794
|
+
case En:
|
|
1795
|
+
case Pn:
|
|
1796
|
+
case Dn:
|
|
1797
|
+
case jn:
|
|
1798
|
+
case zn:
|
|
1799
|
+
case Bn:
|
|
1800
|
+
case Vn:
|
|
1801
|
+
case Hn: return !0;
|
|
2281
1802
|
default: return !1;
|
|
2282
1803
|
}
|
|
2283
1804
|
}
|
|
2284
1805
|
//#endregion
|
|
2285
1806
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/cloneDeep.mjs
|
|
2286
|
-
function
|
|
1807
|
+
function Yn(e) {
|
|
2287
1808
|
return Z(e, void 0, e, /* @__PURE__ */ new Map(), void 0);
|
|
2288
1809
|
}
|
|
2289
1810
|
//#endregion
|
|
@@ -2291,17 +1812,17 @@ function Pr(e) {
|
|
|
2291
1812
|
function $(e, t) {
|
|
2292
1813
|
return typeof t == "function" ? t((0, Y.default)(e)) : (0, Y.default)(e).format(t);
|
|
2293
1814
|
}
|
|
2294
|
-
function
|
|
1815
|
+
function Xn(e, t) {
|
|
2295
1816
|
return t ? "YYYY-MM-DD HH:mm:ss" : e ?? "YYYY-MM-DD";
|
|
2296
1817
|
}
|
|
2297
|
-
function
|
|
1818
|
+
function Zn(e, t, n = "string") {
|
|
2298
1819
|
if (!Array.isArray(e) || e.length !== 2) return;
|
|
2299
1820
|
let [r, i] = e, a, o;
|
|
2300
1821
|
return Array.isArray(t) ? (a = t[0], o = t[1]) : typeof t == "object" && t !== void 0 ? (a = t.format, o = t.format) : (a = t, o = t), n === "dayjs" ? [(0, Y.default)(r), (0, Y.default)(i)] : [r ? $(r, a) : "", i ? $(i, o) : ""];
|
|
2301
1822
|
}
|
|
2302
1823
|
//#endregion
|
|
2303
1824
|
//#region src/components/SearchForm/CollapseToggle.tsx
|
|
2304
|
-
var
|
|
1825
|
+
var Qn = /* @__PURE__ */ g({
|
|
2305
1826
|
name: "ProTableCollapseToggle",
|
|
2306
1827
|
props: {
|
|
2307
1828
|
collapsed: {
|
|
@@ -2330,15 +1851,15 @@ var Lr = /* @__PURE__ */ o({
|
|
|
2330
1851
|
}
|
|
2331
1852
|
},
|
|
2332
1853
|
setup(e) {
|
|
2333
|
-
return () => e.collapseRender === !1 ? null : typeof e.collapseRender == "function" ?
|
|
1854
|
+
return () => e.collapseRender === !1 ? null : typeof e.collapseRender == "function" ? h("span", {
|
|
2334
1855
|
class: [`${e.prefixCls}-search-control-text`, e.hashId],
|
|
2335
1856
|
onClick: () => e.onToggle(!e.collapsed)
|
|
2336
|
-
}, [e.collapseRender(e.collapsed)]) :
|
|
1857
|
+
}, [e.collapseRender(e.collapsed)]) : h("span", {
|
|
2337
1858
|
class: `${e.prefixCls}-search-control-text`,
|
|
2338
1859
|
onClick: () => e.onToggle(!e.collapsed)
|
|
2339
|
-
}, [e.collapsed ? "展开" : "收起", e.collapsed ?
|
|
1860
|
+
}, [e.collapsed ? "展开" : "收起", e.collapsed ? h(H, { type: "DownOutlined" }, null) : h(H, { type: "UpOutlined" }, null)]);
|
|
2340
1861
|
}
|
|
2341
|
-
}), { RangePicker:
|
|
1862
|
+
}), { RangePicker: $n } = R, er = /* @__PURE__ */ g({
|
|
2342
1863
|
name: "ProTableFormItemContainer",
|
|
2343
1864
|
props: {
|
|
2344
1865
|
prefixCls: {
|
|
@@ -2371,7 +1892,7 @@ var Lr = /* @__PURE__ */ o({
|
|
|
2371
1892
|
}
|
|
2372
1893
|
},
|
|
2373
1894
|
setup(e) {
|
|
2374
|
-
let { optionList: t, loading: n } =
|
|
1895
|
+
let { optionList: t, loading: n } = $t({
|
|
2375
1896
|
fetch: e.record.request?.fetch,
|
|
2376
1897
|
manual: e.record.request?.manual,
|
|
2377
1898
|
debounceTime: e.record.request?.debounceTime
|
|
@@ -2383,7 +1904,7 @@ var Lr = /* @__PURE__ */ o({
|
|
|
2383
1904
|
function i(t, n) {
|
|
2384
1905
|
e.onChange(t, e.record, n);
|
|
2385
1906
|
}
|
|
2386
|
-
function
|
|
1907
|
+
function a() {
|
|
2387
1908
|
let t = e.record.field ?? {}, n = {
|
|
2388
1909
|
style: { width: "100%" },
|
|
2389
1910
|
value: e.formState[e.record.name],
|
|
@@ -2391,34 +1912,34 @@ var Lr = /* @__PURE__ */ o({
|
|
|
2391
1912
|
allowClear: e.record.allowClear ?? !0,
|
|
2392
1913
|
...t
|
|
2393
1914
|
};
|
|
2394
|
-
return e.autoRequest ?
|
|
1915
|
+
return e.autoRequest ? h(z.Search, x(n, {
|
|
2395
1916
|
onSearch: () => e.onSubmit?.(),
|
|
2396
1917
|
onChange: (t) => {
|
|
2397
1918
|
e.formState[e.record.name] = t.target?.value ?? t;
|
|
2398
1919
|
}
|
|
2399
|
-
}), null) :
|
|
1920
|
+
}), null) : h(z, x(n, { onChange: (e) => i(e.target?.value ?? e) }), null);
|
|
2400
1921
|
}
|
|
2401
|
-
function
|
|
2402
|
-
return
|
|
1922
|
+
function o() {
|
|
1923
|
+
return h(B, x({
|
|
2403
1924
|
style: { width: "100%" },
|
|
2404
1925
|
value: e.formState[e.record.name],
|
|
2405
1926
|
placeholder: e.record.placeholder || "请输入",
|
|
2406
1927
|
onChange: (e) => i(e ?? void 0)
|
|
2407
1928
|
}, e.record.field ?? {}), null);
|
|
2408
1929
|
}
|
|
2409
|
-
function
|
|
2410
|
-
let t = e.record.name, n = e.formState[t],
|
|
2411
|
-
return
|
|
1930
|
+
function s() {
|
|
1931
|
+
let t = e.record.name, n = e.formState[t], a = Array.isArray(e.record.placeholder) ? e.record.placeholder : ["请输入", "请输入"];
|
|
1932
|
+
return h(oe, {
|
|
2412
1933
|
class: `${e.prefixCls}-search-input-compact`,
|
|
2413
1934
|
style: { width: "100%" }
|
|
2414
1935
|
}, { default: () => [
|
|
2415
|
-
|
|
1936
|
+
h(B, {
|
|
2416
1937
|
value: n?.[0],
|
|
2417
|
-
placeholder:
|
|
1938
|
+
placeholder: a[0] || "请输入",
|
|
2418
1939
|
onChange: (e) => i(e, { key: 0 }),
|
|
2419
1940
|
style: r
|
|
2420
1941
|
}, null),
|
|
2421
|
-
|
|
1942
|
+
h(z, {
|
|
2422
1943
|
disabled: !0,
|
|
2423
1944
|
value: "~",
|
|
2424
1945
|
class: `${e.prefixCls}-number-range-separator`,
|
|
@@ -2428,17 +1949,17 @@ var Lr = /* @__PURE__ */ o({
|
|
|
2428
1949
|
pointerEvents: "none"
|
|
2429
1950
|
}
|
|
2430
1951
|
}, null),
|
|
2431
|
-
|
|
1952
|
+
h(B, {
|
|
2432
1953
|
value: n?.[1],
|
|
2433
|
-
placeholder:
|
|
1954
|
+
placeholder: a[1] || "请输入",
|
|
2434
1955
|
onChange: (e) => i(e, { key: 1 }),
|
|
2435
1956
|
style: r
|
|
2436
1957
|
}, null)
|
|
2437
1958
|
] });
|
|
2438
1959
|
}
|
|
2439
|
-
function
|
|
2440
|
-
let r = e.record.loading || n.value,
|
|
2441
|
-
return
|
|
1960
|
+
function c() {
|
|
1961
|
+
let r = e.record.loading || n.value, a = e.record.request ? t.value : e.record.valueEnum || [], o = e.record.field ?? {};
|
|
1962
|
+
return h(ae, x({
|
|
2442
1963
|
style: { width: "100%" },
|
|
2443
1964
|
value: r ? void 0 : e.formState[e.record.name],
|
|
2444
1965
|
optionFilterProp: "label",
|
|
@@ -2446,37 +1967,37 @@ var Lr = /* @__PURE__ */ o({
|
|
|
2446
1967
|
showSearch: e.record.showSearch,
|
|
2447
1968
|
allowClear: e.record.allowClear ?? !0,
|
|
2448
1969
|
loading: r,
|
|
2449
|
-
options:
|
|
1970
|
+
options: a,
|
|
2450
1971
|
onChange: (e) => i(e ?? void 0)
|
|
2451
|
-
},
|
|
1972
|
+
}, o), null);
|
|
2452
1973
|
}
|
|
2453
|
-
function
|
|
2454
|
-
let r = e.record.field ?? {},
|
|
2455
|
-
return
|
|
1974
|
+
function l() {
|
|
1975
|
+
let r = e.record.field ?? {}, a = e.record.loading || n.value;
|
|
1976
|
+
return h(de, x({
|
|
2456
1977
|
style: { width: "100%" },
|
|
2457
1978
|
value: e.formState[e.record.name],
|
|
2458
1979
|
placeholder: e.record.placeholder || "请选择",
|
|
2459
1980
|
allowClear: e.record.allowClear ?? !0,
|
|
2460
|
-
treeData:
|
|
2461
|
-
loading:
|
|
1981
|
+
treeData: a ? [] : e.record.request ? t.value : e.record.valueEnum || [],
|
|
1982
|
+
loading: a,
|
|
2462
1983
|
onChange: (e) => i(e ?? (r.treeCheckable || r.multiple ? [] : null))
|
|
2463
1984
|
}, r), null);
|
|
2464
1985
|
}
|
|
2465
|
-
function
|
|
2466
|
-
let r = e.record.field ?? {},
|
|
2467
|
-
return
|
|
1986
|
+
function u() {
|
|
1987
|
+
let r = e.record.field ?? {}, a = e.record.loading || n.value;
|
|
1988
|
+
return h(L, x({
|
|
2468
1989
|
style: { width: "100%" },
|
|
2469
1990
|
value: e.formState[e.record.name],
|
|
2470
1991
|
placeholder: e.record.placeholder || "请选择",
|
|
2471
1992
|
allowClear: e.record.allowClear ?? !0,
|
|
2472
|
-
options:
|
|
2473
|
-
loading:
|
|
1993
|
+
options: a ? [] : e.record.request ? t.value : e.record.valueEnum || [],
|
|
1994
|
+
loading: a,
|
|
2474
1995
|
onChange: (e) => i(e ?? void 0)
|
|
2475
1996
|
}, r), null);
|
|
2476
1997
|
}
|
|
2477
|
-
function
|
|
2478
|
-
let t =
|
|
2479
|
-
return
|
|
1998
|
+
function d() {
|
|
1999
|
+
let t = Xn(e.record.valueFormat, e.record.showTime);
|
|
2000
|
+
return h(R, x({
|
|
2480
2001
|
style: { width: "100%" },
|
|
2481
2002
|
value: e.formState[e.record.name] ? (0, Y.default)(e.formState[e.record.name]) : void 0,
|
|
2482
2003
|
placeholder: e.record.placeholder || "请选择",
|
|
@@ -2486,33 +2007,33 @@ var Lr = /* @__PURE__ */ o({
|
|
|
2486
2007
|
onChange: (e) => i(e ? $(e, t) : null)
|
|
2487
2008
|
}, e.record.field ?? {}), null);
|
|
2488
2009
|
}
|
|
2489
|
-
function
|
|
2490
|
-
let
|
|
2491
|
-
return
|
|
2010
|
+
function f(t, n, r) {
|
|
2011
|
+
let a = e.formState[e.record.name];
|
|
2012
|
+
return h(R, x({
|
|
2492
2013
|
style: { width: "100%" },
|
|
2493
2014
|
picker: t,
|
|
2494
|
-
value:
|
|
2015
|
+
value: a ? (0, Y.default)(a, n) : void 0,
|
|
2495
2016
|
placeholder: r || "请选择",
|
|
2496
2017
|
allowClear: e.record.allowClear ?? !0,
|
|
2497
2018
|
onChange: (e) => i(e ? $(e, n) : null)
|
|
2498
2019
|
}, e.record.field ?? {}), null);
|
|
2499
2020
|
}
|
|
2500
|
-
function
|
|
2501
|
-
let t =
|
|
2502
|
-
return
|
|
2021
|
+
function p() {
|
|
2022
|
+
let t = Xn(e.record.valueFormat, e.record.showTime), n = e.formState[e.record.name], r = e.record.field ?? {}, a = Array.isArray(e.record.placeholder) ? e.record.placeholder : ["开始日期", "结束日期"];
|
|
2023
|
+
return h($n, x({
|
|
2503
2024
|
style: { width: "100%" },
|
|
2504
|
-
value: Array.isArray(n) && n.length === 2 ?
|
|
2505
|
-
placeholder:
|
|
2025
|
+
value: Array.isArray(n) && n.length === 2 ? Zn(n, t, "dayjs") : void 0,
|
|
2026
|
+
placeholder: a,
|
|
2506
2027
|
format: t,
|
|
2507
2028
|
showTime: e.record.showTime,
|
|
2508
2029
|
onChange: (e) => {
|
|
2509
|
-
i(e && Array.isArray(e) && e.length === 2 ?
|
|
2030
|
+
i(e && Array.isArray(e) && e.length === 2 ? Zn(e, t, "string") : null);
|
|
2510
2031
|
}
|
|
2511
2032
|
}, r), null);
|
|
2512
2033
|
}
|
|
2513
|
-
function
|
|
2034
|
+
function m() {
|
|
2514
2035
|
let t = e.record.valueFormat || "HH:mm:ss";
|
|
2515
|
-
return
|
|
2036
|
+
return h(le, x({
|
|
2516
2037
|
style: { width: "100%" },
|
|
2517
2038
|
value: e.formState[e.record.name] ? (0, Y.default)(e.formState[e.record.name], t) : void 0,
|
|
2518
2039
|
placeholder: e.record.placeholder || "请选择",
|
|
@@ -2524,24 +2045,24 @@ var Lr = /* @__PURE__ */ o({
|
|
|
2524
2045
|
}
|
|
2525
2046
|
return () => {
|
|
2526
2047
|
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
|
|
2048
|
+
case "text": return a();
|
|
2049
|
+
case "number": return o();
|
|
2050
|
+
case "numberRange": return s();
|
|
2051
|
+
case "select": return c();
|
|
2052
|
+
case "treeSelect": return l();
|
|
2053
|
+
case "cascader": return u();
|
|
2054
|
+
case "date": return d();
|
|
2055
|
+
case "dateWeek": return f("week", "YYYY-wo", e.record.placeholder || "请选择");
|
|
2056
|
+
case "dateMonth": return f("month", "YYYY-MM", e.record.placeholder || "请选择");
|
|
2057
|
+
case "dateQuarter": return f("quarter", "YYYY-QQ", e.record.placeholder || "请选择");
|
|
2058
|
+
case "dateYear": return f("year", "YYYY", e.record.placeholder || "请选择");
|
|
2059
|
+
case "dateRange": return p();
|
|
2060
|
+
case "time": return m();
|
|
2061
|
+
default: return a();
|
|
2541
2062
|
}
|
|
2542
2063
|
};
|
|
2543
2064
|
}
|
|
2544
|
-
}),
|
|
2065
|
+
}), tr = /* @__PURE__ */ g({
|
|
2545
2066
|
name: "ProTableFormItemWrapper",
|
|
2546
2067
|
props: {
|
|
2547
2068
|
label: {
|
|
@@ -2580,29 +2101,29 @@ var Lr = /* @__PURE__ */ o({
|
|
|
2580
2101
|
setup(e, { slots: t }) {
|
|
2581
2102
|
return () => {
|
|
2582
2103
|
let n = !!e.label, r = e.labelAlign ? `${e.prefixCls}-search-item-label-${e.labelAlign}` : "", i = e.colon === !1 ? `${e.prefixCls}-search-item-label-no-colon` : "";
|
|
2583
|
-
return
|
|
2104
|
+
return h("div", {
|
|
2584
2105
|
class: [`${e.prefixCls}-search-item`, e.hashId],
|
|
2585
2106
|
style: {
|
|
2586
2107
|
...e.formItemStyle,
|
|
2587
2108
|
...e.globalLabelGap == null ? {} : { gap: `${e.globalLabelGap}px` }
|
|
2588
2109
|
}
|
|
2589
|
-
}, [n &&
|
|
2110
|
+
}, [n && h("div", {
|
|
2590
2111
|
class: [
|
|
2591
2112
|
`${e.prefixCls}-search-item-label`,
|
|
2592
2113
|
r,
|
|
2593
2114
|
i
|
|
2594
2115
|
],
|
|
2595
2116
|
style: e.labelWidth ? { width: typeof e.labelWidth == "number" ? `${e.labelWidth}px` : e.labelWidth } : void 0
|
|
2596
|
-
}, [e.label]),
|
|
2117
|
+
}, [e.label]), h("div", { class: `${e.prefixCls}-search-item-children` }, [t.default?.()])]);
|
|
2597
2118
|
};
|
|
2598
2119
|
}
|
|
2599
2120
|
});
|
|
2600
2121
|
//#endregion
|
|
2601
2122
|
//#region src/components/SearchForm/SearchForm.tsx
|
|
2602
|
-
function
|
|
2603
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
2123
|
+
function nr(e) {
|
|
2124
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !y(e);
|
|
2604
2125
|
}
|
|
2605
|
-
var
|
|
2126
|
+
var rr = /* @__PURE__ */ g({
|
|
2606
2127
|
name: "ProTableSearchForm",
|
|
2607
2128
|
inheritAttrs: !1,
|
|
2608
2129
|
props: {
|
|
@@ -2660,17 +2181,17 @@ var Hr = /* @__PURE__ */ o({
|
|
|
2660
2181
|
}
|
|
2661
2182
|
},
|
|
2662
2183
|
setup(e, { slots: t, expose: n }) {
|
|
2663
|
-
let r =
|
|
2664
|
-
|
|
2184
|
+
let r = A(e.formConfig?.collapsed ?? e.formConfig?.defaultCollapsed);
|
|
2185
|
+
P(() => e.formConfig?.collapsed, (e) => {
|
|
2665
2186
|
r.value = e;
|
|
2666
2187
|
});
|
|
2667
|
-
let { getRowItemsPerBreakpoint:
|
|
2668
|
-
if (
|
|
2669
|
-
}),
|
|
2670
|
-
let e =
|
|
2188
|
+
let { getRowItemsPerBreakpoint: i } = De(), a = m(() => e.formConfig), o = m(() => e.formAutoRequest), s = m(() => e.formActions), c = m(() => {
|
|
2189
|
+
if (a.value?.breakpoint && G(a.value.breakpoint) && Object.keys(a.value.breakpoint).length > 0) return a.value.breakpoint;
|
|
2190
|
+
}), l = m(() => i(a.value?.span, c.value)), u = m(() => {
|
|
2191
|
+
let e = a.value?.gap;
|
|
2671
2192
|
return typeof e == "number" ? `${e}px` : e ?? "16px";
|
|
2672
|
-
}),
|
|
2673
|
-
function
|
|
2193
|
+
}), d = m(() => a.value?.label), f = m(() => Me(s.value?.reset) ? s.value.reset : !o.value);
|
|
2194
|
+
function p(t, n, r) {
|
|
2674
2195
|
let i = n.name, a = n.valueType ?? "text", o = t;
|
|
2675
2196
|
switch (a) {
|
|
2676
2197
|
case "text": break;
|
|
@@ -2693,7 +2214,7 @@ var Hr = /* @__PURE__ */ o({
|
|
|
2693
2214
|
o = t ?? void 0;
|
|
2694
2215
|
break;
|
|
2695
2216
|
case "date": {
|
|
2696
|
-
let e =
|
|
2217
|
+
let e = Xn(n.valueFormat, n.showTime);
|
|
2697
2218
|
o = t ? $(t, e) : null;
|
|
2698
2219
|
break;
|
|
2699
2220
|
}
|
|
@@ -2710,29 +2231,29 @@ var Hr = /* @__PURE__ */ o({
|
|
|
2710
2231
|
o = t ? $(t, "YYYY") : null;
|
|
2711
2232
|
break;
|
|
2712
2233
|
case "dateRange": {
|
|
2713
|
-
let e =
|
|
2714
|
-
o = t &&
|
|
2234
|
+
let e = Xn(n.valueFormat, n.showTime);
|
|
2235
|
+
o = t && Ne(t) && t.length === 2 ? Zn(t, e, "string") : null;
|
|
2715
2236
|
break;
|
|
2716
2237
|
}
|
|
2717
2238
|
case "time":
|
|
2718
2239
|
o = t ? $(t, n.valueFormat || "HH:mm:ss") : null;
|
|
2719
2240
|
break;
|
|
2720
2241
|
}
|
|
2721
|
-
e.formState[i] = o,
|
|
2242
|
+
e.formState[i] = o, g();
|
|
2722
2243
|
}
|
|
2723
|
-
function
|
|
2724
|
-
|
|
2244
|
+
function g() {
|
|
2245
|
+
o.value && _();
|
|
2725
2246
|
}
|
|
2726
|
-
function
|
|
2247
|
+
function _() {
|
|
2727
2248
|
let t = b();
|
|
2728
2249
|
e.onSearch(t);
|
|
2729
2250
|
}
|
|
2730
|
-
function
|
|
2251
|
+
function v() {
|
|
2731
2252
|
let t = b();
|
|
2732
2253
|
e.onSearch(t, "submit");
|
|
2733
2254
|
}
|
|
2734
2255
|
function b() {
|
|
2735
|
-
let t =
|
|
2256
|
+
let t = Yn(e.formState);
|
|
2736
2257
|
for (let n of e.formColumns) {
|
|
2737
2258
|
let r = n.valueType ?? "text", i = n.name;
|
|
2738
2259
|
if (r === "text" && (t[i] = e.formState[i] ?? n.initialValue), r === "dateRange" && (n.rangeStartName || n.rangeEndName)) {
|
|
@@ -2745,13 +2266,13 @@ var Hr = /* @__PURE__ */ o({
|
|
|
2745
2266
|
}
|
|
2746
2267
|
if (r === "numberRange") {
|
|
2747
2268
|
let e = t[i];
|
|
2748
|
-
t[i] = Array.isArray(e) && e.some((e) =>
|
|
2269
|
+
t[i] = Array.isArray(e) && e.some((e) => W(e)) ? e : void 0;
|
|
2749
2270
|
}
|
|
2750
2271
|
}
|
|
2751
2272
|
return t;
|
|
2752
2273
|
}
|
|
2753
2274
|
function x() {
|
|
2754
|
-
let t =
|
|
2275
|
+
let t = Yn(e.defaultFormSearch);
|
|
2755
2276
|
Object.keys(e.formState).forEach((n) => {
|
|
2756
2277
|
e.formState[n] = n in t ? t[n] : void 0;
|
|
2757
2278
|
});
|
|
@@ -2766,7 +2287,7 @@ var Hr = /* @__PURE__ */ o({
|
|
|
2766
2287
|
r.value = e;
|
|
2767
2288
|
}
|
|
2768
2289
|
n({
|
|
2769
|
-
handleSubmit:
|
|
2290
|
+
handleSubmit: _,
|
|
2770
2291
|
resetForm: x
|
|
2771
2292
|
});
|
|
2772
2293
|
function C(e, t, n) {
|
|
@@ -2780,73 +2301,73 @@ var Hr = /* @__PURE__ */ o({
|
|
|
2780
2301
|
};
|
|
2781
2302
|
}
|
|
2782
2303
|
return () => {
|
|
2783
|
-
let n = [...e.formColumns], i =
|
|
2304
|
+
let n = [...e.formColumns], i = pt(t.default?.() || []), c = ir([...n, ...i.map((e) => ({
|
|
2784
2305
|
...e,
|
|
2785
2306
|
order: e.props?.order ?? void 0
|
|
2786
|
-
}))]),
|
|
2787
|
-
let r = C(n,
|
|
2788
|
-
return
|
|
2307
|
+
}))]), m = l.value, _ = u.value, b = c.length, w = r.value !== !1, T = b > m, E = (t, n) => {
|
|
2308
|
+
let r = C(n, m, _), i = y(t) ? t.props?.label : t.label, a = (y(t) ? t.props?.labelWidth : t.labelWidth) ?? d.value?.width, s = (y(t) ? t.props?.labelAlign : t.labelAlign) ?? d.value?.align;
|
|
2309
|
+
return y(t) ? h(tr, {
|
|
2789
2310
|
label: i,
|
|
2790
|
-
labelWidth:
|
|
2311
|
+
labelWidth: a,
|
|
2791
2312
|
labelAlign: s,
|
|
2792
|
-
colon:
|
|
2793
|
-
globalLabelGap:
|
|
2313
|
+
colon: d.value?.colon,
|
|
2314
|
+
globalLabelGap: d.value?.gap,
|
|
2794
2315
|
prefixCls: e.prefixCls,
|
|
2795
2316
|
formItemStyle: r
|
|
2796
|
-
},
|
|
2317
|
+
}, nr(t) ? t : { default: () => [t] }) : h(tr, {
|
|
2797
2318
|
key: String(t.name ?? t.key ?? n),
|
|
2798
2319
|
label: t.label,
|
|
2799
|
-
labelWidth:
|
|
2320
|
+
labelWidth: a,
|
|
2800
2321
|
labelAlign: s,
|
|
2801
|
-
colon:
|
|
2802
|
-
globalLabelGap:
|
|
2322
|
+
colon: d.value?.colon,
|
|
2323
|
+
globalLabelGap: d.value?.gap,
|
|
2803
2324
|
prefixCls: e.prefixCls,
|
|
2804
2325
|
formItemStyle: r
|
|
2805
|
-
}, { default: () => [
|
|
2326
|
+
}, { default: () => [h(er, {
|
|
2806
2327
|
prefixCls: e.prefixCls,
|
|
2807
2328
|
record: t,
|
|
2808
2329
|
formState: e.formState,
|
|
2809
|
-
autoRequest:
|
|
2330
|
+
autoRequest: o.value,
|
|
2810
2331
|
loading: typeof e.loading == "boolean" ? e.loading : !1,
|
|
2811
|
-
onChange:
|
|
2812
|
-
onSubmit:
|
|
2332
|
+
onChange: p,
|
|
2333
|
+
onSubmit: g
|
|
2813
2334
|
}, null)] });
|
|
2814
|
-
}, D = () => !
|
|
2335
|
+
}, D = () => !f.value && o.value ? null : h("div", {
|
|
2815
2336
|
class: [`${e.prefixCls}-search-buttons`, e.proClasses.searchButtons],
|
|
2816
2337
|
style: e.proStyles.searchButtons
|
|
2817
|
-
}, [
|
|
2338
|
+
}, [f.value && h(I, {
|
|
2818
2339
|
key: "reset",
|
|
2819
2340
|
onClick: x
|
|
2820
|
-
}, { default: () => [
|
|
2341
|
+
}, { default: () => [s.value?.resetText || "重置"] }), !o.value && h(I, {
|
|
2821
2342
|
key: "submit",
|
|
2822
2343
|
type: "primary",
|
|
2823
2344
|
loading: typeof e.loading == "boolean" ? e.loading : !1,
|
|
2824
|
-
onClick:
|
|
2825
|
-
}, { default: () => [
|
|
2826
|
-
if (
|
|
2345
|
+
onClick: v
|
|
2346
|
+
}, { default: () => [s.value?.searchText || "查询"] })]), O = (t, n) => {
|
|
2347
|
+
if (a.value?.collapseRender === !1 && !D()) return null;
|
|
2827
2348
|
let r = D();
|
|
2828
|
-
return !t && !r ? null :
|
|
2349
|
+
return !t && !r ? null : h("div", {
|
|
2829
2350
|
class: [`${e.prefixCls}-search-control`, e.proClasses.searchControl],
|
|
2830
2351
|
style: {
|
|
2831
2352
|
flex: 1,
|
|
2832
2353
|
justifyContent: "flex-end",
|
|
2833
2354
|
...e.proStyles.searchControl
|
|
2834
2355
|
}
|
|
2835
|
-
}, [
|
|
2356
|
+
}, [h("div", { class: [`${e.prefixCls}-search-control-content`, e.proClasses.searchContent] }, [r, t && h(Qn, {
|
|
2836
2357
|
collapsed: n,
|
|
2837
|
-
collapseRender:
|
|
2358
|
+
collapseRender: a.value?.collapseRender,
|
|
2838
2359
|
prefixCls: e.prefixCls,
|
|
2839
2360
|
onToggle: S
|
|
2840
2361
|
}, null)])]);
|
|
2841
|
-
},
|
|
2842
|
-
return
|
|
2843
|
-
class: J(e.proClasses.search, `${e.prefixCls}-search`,
|
|
2362
|
+
}, k = e.cardBordered ? `${e.prefixCls}-search-border` : "", A = b <= m || !w ? b : Math.max(m - 1, 0);
|
|
2363
|
+
return h("div", {
|
|
2364
|
+
class: J(e.proClasses.search, `${e.prefixCls}-search`, k, a.value?.className),
|
|
2844
2365
|
style: e.proStyles.search
|
|
2845
|
-
}, [
|
|
2366
|
+
}, [c.slice(0, A).map((e, t) => E(e, t)), O(T, w)]);
|
|
2846
2367
|
};
|
|
2847
2368
|
}
|
|
2848
2369
|
});
|
|
2849
|
-
function
|
|
2370
|
+
function ir(e) {
|
|
2850
2371
|
let t = e.reduce((e, t) => t.order === void 0 ? e : Math.max(e, t.order), 0), n = e.map((e) => e.order === void 0 ? (t += 1, {
|
|
2851
2372
|
...e,
|
|
2852
2373
|
order: t
|
|
@@ -2855,7 +2376,7 @@ function Ur(e) {
|
|
|
2855
2376
|
}
|
|
2856
2377
|
//#endregion
|
|
2857
2378
|
//#region src/components/Toolbar/FullscreenIcon.tsx
|
|
2858
|
-
var
|
|
2379
|
+
var ar = /* @__PURE__ */ g({
|
|
2859
2380
|
name: "ProTableFullscreenIcon",
|
|
2860
2381
|
props: {
|
|
2861
2382
|
isFullscreen: {
|
|
@@ -2868,26 +2389,26 @@ var Wr = /* @__PURE__ */ o({
|
|
|
2868
2389
|
}
|
|
2869
2390
|
},
|
|
2870
2391
|
setup(e) {
|
|
2871
|
-
return () =>
|
|
2392
|
+
return () => h(ue, { title: e.isFullscreen ? "退出全屏" : "全屏" }, { default: () => [h("span", { onClick: e.onToggle }, [e.isFullscreen ? h(H, { type: "FullscreenExitOutlined" }, null) : h(H, { type: "FullscreenOutlined" }, null)])] });
|
|
2872
2393
|
}
|
|
2873
2394
|
});
|
|
2874
2395
|
//#endregion
|
|
2875
2396
|
//#region src/components/Toolbar/ListToolBar.tsx
|
|
2876
|
-
function
|
|
2877
|
-
if (
|
|
2397
|
+
function or(e) {
|
|
2398
|
+
if (y(e)) return e;
|
|
2878
2399
|
if (!e) return null;
|
|
2879
2400
|
let { icon: t, tooltip: n, onClick: r, key: i } = e;
|
|
2880
|
-
return t && n ?
|
|
2401
|
+
return t && n ? h(ue, {
|
|
2881
2402
|
title: n,
|
|
2882
2403
|
key: i
|
|
2883
|
-
}, { default: () => [
|
|
2404
|
+
}, { default: () => [h("span", {
|
|
2884
2405
|
key: i,
|
|
2885
2406
|
onClick: () => {
|
|
2886
2407
|
r && r(i);
|
|
2887
2408
|
}
|
|
2888
2409
|
}, [t])] }) : t;
|
|
2889
2410
|
}
|
|
2890
|
-
var
|
|
2411
|
+
var sr = /* @__PURE__ */ g({
|
|
2891
2412
|
name: "ProTableListToolBar",
|
|
2892
2413
|
props: {
|
|
2893
2414
|
prefixCls: {
|
|
@@ -2932,30 +2453,30 @@ var Kr = /* @__PURE__ */ o({
|
|
|
2932
2453
|
}
|
|
2933
2454
|
},
|
|
2934
2455
|
setup(e) {
|
|
2935
|
-
let t =
|
|
2456
|
+
let t = m(() => !!(e.headerTitleTip || e.headerTitle)), n = m(() => e.actionsPlacement === "left" ? e.actions : []), r = m(() => e.actionsPlacement === "right" ? e.actions : []), i = m(() => t.value || n.value.length > 0), a = m(() => e.settings.length > 0 || r.value.length > 0);
|
|
2936
2457
|
return () => {
|
|
2937
|
-
if (!
|
|
2938
|
-
let
|
|
2939
|
-
class: `${
|
|
2458
|
+
if (!i.value && !a.value && !e.listToolAfter) return null;
|
|
2459
|
+
let o = e.prefixCls, s = i.value || a.value ? h("div", {
|
|
2460
|
+
class: `${o}-list-toolbar-left`,
|
|
2940
2461
|
style: e.proStyles.toolbarLeft
|
|
2941
|
-
}, [t.value &&
|
|
2942
|
-
class: [`${
|
|
2462
|
+
}, [t.value && h("div", {
|
|
2463
|
+
class: [`${o}-list-toolbar-title`, e.proClasses.toolbarTitle],
|
|
2943
2464
|
style: e.proStyles.toolbarTitle
|
|
2944
|
-
}, [e.headerTitle, e.headerTitleTip &&
|
|
2945
|
-
class: `${
|
|
2465
|
+
}, [e.headerTitle, e.headerTitleTip && h(ue, { title: e.titleTipText }, { default: () => [typeof e.headerTitleTip == "boolean" ? h(H, { type: "InfoCircleOutlined" }, null) : e.headerTitleTip] })]), n.value.length > 0 && h("div", { class: `${o}-list-toolbar-actions` }, [n.value])]) : a.value ? h("div", {
|
|
2466
|
+
class: `${o}-list-toolbar-left`,
|
|
2946
2467
|
style: e.proStyles.toolbarLeft
|
|
2947
|
-
}, null) : null,
|
|
2948
|
-
class: [`${
|
|
2468
|
+
}, null) : null, c = a.value ? h("div", {
|
|
2469
|
+
class: [`${o}-list-toolbar-right`, e.proClasses.toolbarRight],
|
|
2949
2470
|
style: e.proStyles.toolbarRight
|
|
2950
|
-
}, [r.value.length > 0 &&
|
|
2471
|
+
}, [r.value.length > 0 && h("div", { class: `${o}-list-toolbar-actions` }, [r.value]), e.settings.length > 0 && h("div", { class: `${o}-list-toolbar-setting-items` }, [e.settings.map((e, t) => h("div", {
|
|
2951
2472
|
key: t,
|
|
2952
|
-
class: `${
|
|
2953
|
-
}, [
|
|
2954
|
-
return
|
|
2955
|
-
class: [`${
|
|
2473
|
+
class: `${o}-list-toolbar-setting-item`
|
|
2474
|
+
}, [or(e)]))])]) : null;
|
|
2475
|
+
return h("div", {
|
|
2476
|
+
class: [`${o}-list-toolbar`, e.proClasses.toolbar],
|
|
2956
2477
|
style: e.proStyles.toolbar
|
|
2957
|
-
}, [(
|
|
2958
|
-
class: [`${
|
|
2478
|
+
}, [(s || c) && h("div", { class: `${o}-list-toolbar-container` }, [s, c]), e.listToolAfter && h("div", {
|
|
2479
|
+
class: [`${o}-list-toolbar-after`, e.proClasses.toolbarAfter],
|
|
2959
2480
|
style: e.proStyles.toolbarAfter
|
|
2960
2481
|
}, [e.listToolAfter])]);
|
|
2961
2482
|
};
|
|
@@ -2963,10 +2484,10 @@ var Kr = /* @__PURE__ */ o({
|
|
|
2963
2484
|
});
|
|
2964
2485
|
//#endregion
|
|
2965
2486
|
//#region src/components/Toolbar/index.tsx
|
|
2966
|
-
function
|
|
2487
|
+
function cr(e) {
|
|
2967
2488
|
return typeof e == "object" && !!e;
|
|
2968
2489
|
}
|
|
2969
|
-
var
|
|
2490
|
+
var lr = /* @__PURE__ */ g({
|
|
2970
2491
|
name: "ProTableToolbar",
|
|
2971
2492
|
props: {
|
|
2972
2493
|
prefixCls: {
|
|
@@ -3011,30 +2532,30 @@ var Jr = /* @__PURE__ */ o({
|
|
|
3011
2532
|
}
|
|
3012
2533
|
},
|
|
3013
2534
|
setup(e) {
|
|
3014
|
-
let t =
|
|
2535
|
+
let t = we(), n = m(() => {
|
|
3015
2536
|
if (e.options === !1) return [];
|
|
3016
|
-
let n =
|
|
2537
|
+
let n = cr(e.options) ? e.options : {}, r = [];
|
|
3017
2538
|
if (n.reload !== !1) {
|
|
3018
2539
|
let e = () => t?.reload?.();
|
|
3019
2540
|
if (typeof n.reload == "function") {
|
|
3020
2541
|
let t = n.reload(e);
|
|
3021
2542
|
t && r.push(t);
|
|
3022
|
-
} else r.push(
|
|
2543
|
+
} else r.push(h(ue, {
|
|
3023
2544
|
title: "刷新",
|
|
3024
2545
|
key: "reload"
|
|
3025
|
-
}, { default: () => [
|
|
2546
|
+
}, { default: () => [h("span", { onClick: e }, [h(H, { type: "ReloadOutlined" }, null)])] }));
|
|
3026
2547
|
}
|
|
3027
|
-
return n.fullScreen !== !1 && (typeof n.fullScreen == "function" ? r.push(
|
|
2548
|
+
return n.fullScreen !== !1 && (typeof n.fullScreen == "function" ? r.push(h(ar, {
|
|
3028
2549
|
key: "fullscreen",
|
|
3029
2550
|
isFullscreen: !!t?.isFullscreen?.value,
|
|
3030
2551
|
onToggle: n.fullScreen
|
|
3031
|
-
}, null)) : r.push(
|
|
2552
|
+
}, null)) : r.push(h(ar, {
|
|
3032
2553
|
key: "fullscreen",
|
|
3033
2554
|
isFullscreen: !!t?.isFullscreen?.value,
|
|
3034
2555
|
onToggle: () => t?.toggleFullscreen?.()
|
|
3035
2556
|
}, null))), r;
|
|
3036
2557
|
});
|
|
3037
|
-
return () =>
|
|
2558
|
+
return () => h(sr, {
|
|
3038
2559
|
prefixCls: e.prefixCls,
|
|
3039
2560
|
actions: e.actions,
|
|
3040
2561
|
actionsPlacement: e.actionsPlacement,
|
|
@@ -3047,7 +2568,7 @@ var Jr = /* @__PURE__ */ o({
|
|
|
3047
2568
|
proStyles: e.proStyles
|
|
3048
2569
|
}, null);
|
|
3049
2570
|
}
|
|
3050
|
-
}),
|
|
2571
|
+
}), ur = (e) => {
|
|
3051
2572
|
let t = e.componentCls;
|
|
3052
2573
|
return { [t]: { [`${t}-list-toolbar`]: {
|
|
3053
2574
|
lineHeight: 1,
|
|
@@ -3122,7 +2643,7 @@ var Jr = /* @__PURE__ */ o({
|
|
|
3122
2643
|
[`${t}-list-toolbar-right`]: { width: "100%" }
|
|
3123
2644
|
}
|
|
3124
2645
|
} } };
|
|
3125
|
-
},
|
|
2646
|
+
}, dr = (e) => {
|
|
3126
2647
|
let t = `${e.lineWidth} ${e.lineType} ${e.colorBorderSecondary}`;
|
|
3127
2648
|
return { [e.componentCls]: { [`&${e.componentCls}-full-page`]: {
|
|
3128
2649
|
flex: "1 1 auto",
|
|
@@ -3152,11 +2673,11 @@ var Jr = /* @__PURE__ */ o({
|
|
|
3152
2673
|
}
|
|
3153
2674
|
}
|
|
3154
2675
|
} } };
|
|
3155
|
-
},
|
|
2676
|
+
}, fr = (e) => ({ [e.componentCls]: { [`${e.componentCls}-list`]: {
|
|
3156
2677
|
clear: "both",
|
|
3157
2678
|
maxWidth: "100%",
|
|
3158
2679
|
[`${e.componentCls}-pagination${e.antCls}-pagination`]: { marginTop: e.margin }
|
|
3159
|
-
} } }),
|
|
2680
|
+
} } }), pr = (e) => ({ [e.componentCls]: {
|
|
3160
2681
|
".resizable-title": { position: "relative" },
|
|
3161
2682
|
".resizable-handle": {
|
|
3162
2683
|
position: "absolute",
|
|
@@ -3171,10 +2692,10 @@ var Jr = /* @__PURE__ */ o({
|
|
|
3171
2692
|
} });
|
|
3172
2693
|
//#endregion
|
|
3173
2694
|
//#region src/style/scroll.ts
|
|
3174
|
-
function
|
|
2695
|
+
function mr(e, t) {
|
|
3175
2696
|
return `color-mix(in srgb, ${e} ${t * 100}%, transparent)`;
|
|
3176
2697
|
}
|
|
3177
|
-
function
|
|
2698
|
+
function hr() {
|
|
3178
2699
|
return {
|
|
3179
2700
|
scrollbarWidth: "none",
|
|
3180
2701
|
"&::-webkit-scrollbar": {
|
|
@@ -3183,8 +2704,8 @@ function ei() {
|
|
|
3183
2704
|
}
|
|
3184
2705
|
};
|
|
3185
2706
|
}
|
|
3186
|
-
var
|
|
3187
|
-
let t =
|
|
2707
|
+
var gr = (e) => {
|
|
2708
|
+
let t = mr(e.colorText, .2), n = mr(e.colorText, .4);
|
|
3188
2709
|
return { [e.componentCls]: {
|
|
3189
2710
|
[`${e.antCls}-table-container`]: { position: "relative" },
|
|
3190
2711
|
[`${e.componentCls}-scroll`]: {
|
|
@@ -3193,7 +2714,7 @@ var ti = (e) => {
|
|
|
3193
2714
|
right: 2,
|
|
3194
2715
|
bottom: 2,
|
|
3195
2716
|
zIndex: 100,
|
|
3196
|
-
borderRadius: `calc(${
|
|
2717
|
+
borderRadius: `calc(${F(e.borderRadius)} - 2px)`,
|
|
3197
2718
|
"&.is-vertical": {
|
|
3198
2719
|
top: 2,
|
|
3199
2720
|
width: 6,
|
|
@@ -3221,10 +2742,10 @@ var ti = (e) => {
|
|
|
3221
2742
|
}
|
|
3222
2743
|
}
|
|
3223
2744
|
},
|
|
3224
|
-
[`${e.antCls}-table-body`]:
|
|
3225
|
-
[`${e.antCls}-table-container`]:
|
|
2745
|
+
[`${e.antCls}-table-body`]: hr(),
|
|
2746
|
+
[`${e.antCls}-table-container`]: hr()
|
|
3226
2747
|
} };
|
|
3227
|
-
},
|
|
2748
|
+
}, _r = (e) => ({ [e.componentCls]: {
|
|
3228
2749
|
[`${e.componentCls}-search`]: {
|
|
3229
2750
|
position: "relative",
|
|
3230
2751
|
display: "flex",
|
|
@@ -3233,7 +2754,7 @@ var ti = (e) => {
|
|
|
3233
2754
|
"&-border": {
|
|
3234
2755
|
paddingInline: e.paddingMD,
|
|
3235
2756
|
paddingBlock: e.paddingMD,
|
|
3236
|
-
paddingBlockEnd: `calc(${
|
|
2757
|
+
paddingBlockEnd: `calc(${F(e.paddingMD)} - 16px)`,
|
|
3237
2758
|
border: `${e.lineWidth} ${e.lineType} ${e.colorSplit}`,
|
|
3238
2759
|
borderRadius: e.borderRadiusLG,
|
|
3239
2760
|
marginBottom: e.marginLG,
|
|
@@ -3309,7 +2830,7 @@ var ti = (e) => {
|
|
|
3309
2830
|
content: "\":\"",
|
|
3310
2831
|
position: "relative",
|
|
3311
2832
|
marginBlock: 0,
|
|
3312
|
-
marginInlineStart: `calc(${
|
|
2833
|
+
marginInlineStart: `calc(${F(e.marginXXS)} / 2)`,
|
|
3313
2834
|
marginInlineEnd: e.marginXS
|
|
3314
2835
|
},
|
|
3315
2836
|
[`&${e.componentCls}-search-item-label-no-colon::after`]: { content: "\" \"" },
|
|
@@ -3326,7 +2847,7 @@ var ti = (e) => {
|
|
|
3326
2847
|
justifyContent: "center",
|
|
3327
2848
|
alignItems: "center"
|
|
3328
2849
|
}
|
|
3329
|
-
} }),
|
|
2850
|
+
} }), vr = (e) => ({ [e.componentCls]: {
|
|
3330
2851
|
[`${e.componentCls}-content`]: {
|
|
3331
2852
|
display: "flex",
|
|
3332
2853
|
flexDirection: "column"
|
|
@@ -3375,15 +2896,15 @@ var ti = (e) => {
|
|
|
3375
2896
|
cursor: "pointer",
|
|
3376
2897
|
"&:hover": { color: e.colorPrimaryHover }
|
|
3377
2898
|
}
|
|
3378
|
-
} }),
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
]),
|
|
2899
|
+
} }), yr = re("ProTable", (e) => [
|
|
2900
|
+
vr(e),
|
|
2901
|
+
fr(e),
|
|
2902
|
+
gr(e),
|
|
2903
|
+
dr(e),
|
|
2904
|
+
pr(e),
|
|
2905
|
+
_r(e),
|
|
2906
|
+
ur(e)
|
|
2907
|
+
]), br = {
|
|
3387
2908
|
rowKey: "id",
|
|
3388
2909
|
align: "left",
|
|
3389
2910
|
columns: [],
|
|
@@ -3398,7 +2919,7 @@ var ti = (e) => {
|
|
|
3398
2919
|
pollingTime: 2e3,
|
|
3399
2920
|
showLoading: !0,
|
|
3400
2921
|
keepAliveReload: !1
|
|
3401
|
-
},
|
|
2922
|
+
}, xr = [
|
|
3402
2923
|
"bordered",
|
|
3403
2924
|
"expandable",
|
|
3404
2925
|
"showHeader",
|
|
@@ -3416,136 +2937,136 @@ var ti = (e) => {
|
|
|
3416
2937
|
"prefixCls",
|
|
3417
2938
|
"classes",
|
|
3418
2939
|
"styles"
|
|
3419
|
-
],
|
|
3420
|
-
let { prefixCls:
|
|
3421
|
-
|
|
3422
|
-
|
|
2940
|
+
], Sr = /* @__PURE__ */ g((e, { attrs: t, slots: n, emit: r, expose: i }) => {
|
|
2941
|
+
let { prefixCls: o } = fe("pro-table", e), s = pe(o), [c, l] = yr(o, s), u = ie(), p = A(), { toggle: g, isFullscreen: _ } = a(p);
|
|
2942
|
+
P(_, (e) => {
|
|
2943
|
+
r("fullscreenChange", e);
|
|
3423
2944
|
});
|
|
3424
|
-
let v =
|
|
3425
|
-
size:
|
|
3426
|
-
onChange: (e) =>
|
|
3427
|
-
}), { loading:
|
|
3428
|
-
loading:
|
|
2945
|
+
let v = m(() => J(o.value, c.value, l.value, s.value, t.class, e.proClasses?.root, Me.value)), y = m(() => [e.proStyles?.root, t.style]), { isMobile: b, screenWidth: S, screens: C } = De(), { paginationInfo: w, paginationAlign: T, requestPagination: E, setPagination: D } = Qt({ pagination: ee(e, "pagination") }), { tableSize: O, setTableSize: k } = _n({
|
|
2946
|
+
size: m(() => e.size),
|
|
2947
|
+
onChange: (e) => r("sizeChange", e)
|
|
2948
|
+
}), { loading: j, setLoading: M } = Xt({
|
|
2949
|
+
loading: m(() => e.loading),
|
|
3429
2950
|
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:
|
|
2951
|
+
}), { selectedRowKeys: N, selectedItems: te, mergedRowSelection: ne, select: re, selectAll: F, remove: I, clear: L, sync: R } = en({
|
|
2952
|
+
rowKey: m(() => e.rowKey),
|
|
2953
|
+
rowSelection: m(() => e.rowSelection),
|
|
2954
|
+
dataSource: m(() => e.dataSource ?? [])
|
|
2955
|
+
}), z = m(() => At(e.columns ?? [], e.indexColumn, e.align ?? "left")), { tableScroll: B, shouldFixActionColumn: ae } = mn({
|
|
2956
|
+
scroll: m(() => e.scroll),
|
|
2957
|
+
columns: z,
|
|
2958
|
+
rowSelection: m(() => e.rowSelection),
|
|
2959
|
+
screens: C,
|
|
2960
|
+
screenWidth: S,
|
|
2961
|
+
scrollPolicy: m(() => e.scrollPolicy)
|
|
2962
|
+
}), { tableColumns: oe, cacheColumns: le, setColumns: ue } = Pt({
|
|
2963
|
+
columns: m(() => e.columns ?? []),
|
|
2964
|
+
align: m(() => e.align ?? "left"),
|
|
2965
|
+
indexColumn: m(() => e.indexColumn),
|
|
2966
|
+
shouldFixActionColumn: ae,
|
|
2967
|
+
wrapColumnRender: Ct({
|
|
2968
|
+
columnEmptyText: m(() => e.columnEmptyText),
|
|
2969
|
+
prefixCls: o
|
|
3449
2970
|
}).wrapColumnRender
|
|
3450
|
-
}), { resizableColumns:
|
|
3451
|
-
columns:
|
|
3452
|
-
onResize: (e, t) =>
|
|
3453
|
-
}),
|
|
2971
|
+
}), { resizableColumns: de, resizableComponents: H } = Lt({
|
|
2972
|
+
columns: oe,
|
|
2973
|
+
onResize: (e, t) => r("resizeColumn", e, t)
|
|
2974
|
+
}), me = m(() => e.form === !1 ? void 0 : e.form), he = m(() => e.form === !1 ? e.autoRequest ?? !0 : e.form?.autoRequest ?? e.autoRequest ?? !0), ge = m(() => {
|
|
3454
2975
|
if (e.form !== !1) return e.form?.actions;
|
|
3455
|
-
}), { formColumns:
|
|
3456
|
-
searchMap:
|
|
3457
|
-
columns:
|
|
3458
|
-
}), { dataSource:
|
|
3459
|
-
rowKey:
|
|
3460
|
-
polling:
|
|
3461
|
-
pollingTime:
|
|
2976
|
+
}), { formColumns: _e, defaultFormSearch: ve, formState: ye, getFormSearch: be, resetFormState: xe } = on({
|
|
2977
|
+
searchMap: m(() => e.searchMap ?? []),
|
|
2978
|
+
columns: m(() => e.columns ?? [])
|
|
2979
|
+
}), { dataSource: Se, setTableDataList: we, operateTableDataRow: Te, handleTableChange: Ee, reload: U, run: Oe } = zt({
|
|
2980
|
+
rowKey: m(() => e.rowKey),
|
|
2981
|
+
polling: m(() => e.polling ?? !1),
|
|
2982
|
+
pollingTime: m(() => e.pollingTime ?? 2e3),
|
|
3462
2983
|
request: e.request,
|
|
3463
2984
|
postData: e.postData,
|
|
3464
|
-
dataSource:
|
|
3465
|
-
immediate:
|
|
3466
|
-
waitRequest:
|
|
3467
|
-
autoRequest:
|
|
3468
|
-
debounceTime:
|
|
3469
|
-
params:
|
|
3470
|
-
defaultFormSearch:
|
|
2985
|
+
dataSource: m(() => e.dataSource),
|
|
2986
|
+
immediate: m(() => e.immediate ?? !0),
|
|
2987
|
+
waitRequest: m(() => e.waitRequest ?? !1),
|
|
2988
|
+
autoRequest: m(() => e.autoRequest ?? !0),
|
|
2989
|
+
debounceTime: m(() => e.debounceTime ?? 10),
|
|
2990
|
+
params: m(() => e.params),
|
|
2991
|
+
defaultFormSearch: ve,
|
|
3471
2992
|
onLoadingChange: e.onLoadingChange,
|
|
3472
2993
|
onRequestError: e.onRequestError,
|
|
3473
2994
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit
|
|
3474
2995
|
}, {
|
|
3475
2996
|
pageInfo: E,
|
|
3476
|
-
paginationInfo:
|
|
2997
|
+
paginationInfo: w,
|
|
3477
2998
|
setPagination: D,
|
|
3478
|
-
setLoading:
|
|
3479
|
-
setColumns:
|
|
3480
|
-
removeRowKeys:
|
|
3481
|
-
syncSelectedRows:
|
|
3482
|
-
columns:
|
|
2999
|
+
setLoading: M,
|
|
3000
|
+
setColumns: ue,
|
|
3001
|
+
removeRowKeys: I,
|
|
3002
|
+
syncSelectedRows: R,
|
|
3003
|
+
columns: le
|
|
3483
3004
|
});
|
|
3484
|
-
|
|
3485
|
-
enabled:
|
|
3486
|
-
reload:
|
|
3005
|
+
Jt({
|
|
3006
|
+
enabled: m(() => e.keepAliveReload ?? !1),
|
|
3007
|
+
reload: U
|
|
3487
3008
|
});
|
|
3488
|
-
let
|
|
3489
|
-
fitPage:
|
|
3490
|
-
cardEl:
|
|
3491
|
-
prefixCls:
|
|
3492
|
-
}),
|
|
3493
|
-
...
|
|
3494
|
-
...
|
|
3009
|
+
let ke = A(), { scrollY: Ae, overflowHidden: je, fullPageClass: Me, scrollEl: W, barRef: Ne } = Kt({
|
|
3010
|
+
fitPage: m(() => !B.value?.y && !!e.fitPage),
|
|
3011
|
+
cardEl: ke,
|
|
3012
|
+
prefixCls: o
|
|
3013
|
+
}), G = m(() => ({
|
|
3014
|
+
...B.value ?? {},
|
|
3015
|
+
...Ae.value > 0 ? { y: Ae.value } : {}
|
|
3495
3016
|
}));
|
|
3496
|
-
|
|
3497
|
-
reload:
|
|
3017
|
+
Ce({
|
|
3018
|
+
reload: U,
|
|
3498
3019
|
setPagination: D,
|
|
3499
3020
|
tableSize: O,
|
|
3500
|
-
setTableSize:
|
|
3501
|
-
formAutoRequest:
|
|
3502
|
-
formConfig:
|
|
3503
|
-
formActions:
|
|
3021
|
+
setTableSize: k,
|
|
3022
|
+
formAutoRequest: he,
|
|
3023
|
+
formConfig: me,
|
|
3024
|
+
formActions: ge,
|
|
3504
3025
|
isMobile: b,
|
|
3505
|
-
screenWidth:
|
|
3026
|
+
screenWidth: S,
|
|
3506
3027
|
toggleFullscreen: g,
|
|
3507
3028
|
isFullscreen: _
|
|
3508
3029
|
});
|
|
3509
|
-
let
|
|
3510
|
-
function
|
|
3511
|
-
if (
|
|
3512
|
-
|
|
3030
|
+
let Pe = m(() => !!(e.customRender || n.customRender)), Fe = m(() => e.form === !1 ? !1 : _e.value.length > 0 || !!n.form);
|
|
3031
|
+
function Ie(t, n) {
|
|
3032
|
+
if (he.value) {
|
|
3033
|
+
U({ params: t });
|
|
3513
3034
|
return;
|
|
3514
3035
|
}
|
|
3515
|
-
n === "reset" ? (
|
|
3036
|
+
n === "reset" ? (r("reset", t), e.request && ge.value?.resetReload && U({ params: t })) : e.request && (r("submit", t), U({ params: t }));
|
|
3516
3037
|
}
|
|
3517
|
-
function
|
|
3518
|
-
let t =
|
|
3038
|
+
function Le(e) {
|
|
3039
|
+
let t = w.value;
|
|
3519
3040
|
if (!t) return e;
|
|
3520
3041
|
let { current: n = 1, pageSize: r = 10 } = t;
|
|
3521
3042
|
return e.filter((e, t) => t >= (n - 1) * r && t < n * r);
|
|
3522
3043
|
}
|
|
3523
|
-
function
|
|
3524
|
-
let t = e.customRender ||
|
|
3044
|
+
function Re() {
|
|
3045
|
+
let t = e.customRender || n.customRender;
|
|
3525
3046
|
if (!t) return null;
|
|
3526
|
-
let
|
|
3527
|
-
return
|
|
3528
|
-
dataSource:
|
|
3529
|
-
currentData:
|
|
3530
|
-
}) : null :
|
|
3047
|
+
let r = Se.value;
|
|
3048
|
+
return r?.length ? typeof t == "function" ? t({
|
|
3049
|
+
dataSource: r,
|
|
3050
|
+
currentData: Le(r)
|
|
3051
|
+
}) : null : ze();
|
|
3531
3052
|
}
|
|
3532
|
-
function
|
|
3533
|
-
let t =
|
|
3534
|
-
slots:
|
|
3053
|
+
function ze() {
|
|
3054
|
+
let t = gt({
|
|
3055
|
+
slots: n,
|
|
3535
3056
|
props: e,
|
|
3536
3057
|
key: "emptyText"
|
|
3537
3058
|
});
|
|
3538
|
-
return t &&
|
|
3059
|
+
return t && u?.renderEmpty?.value ? t || u?.renderEmpty?.value?.() : null;
|
|
3539
3060
|
}
|
|
3540
|
-
function
|
|
3061
|
+
function Be(e, t) {
|
|
3541
3062
|
Ue({
|
|
3542
3063
|
current: e,
|
|
3543
3064
|
pageSize: t
|
|
3544
3065
|
}, {}, {}, {});
|
|
3545
3066
|
}
|
|
3546
|
-
let
|
|
3067
|
+
let Ve = m(() => e.showLoading === !1 ? !1 : j.value), He = m(() => {
|
|
3547
3068
|
let t = {};
|
|
3548
|
-
for (let n of
|
|
3069
|
+
for (let n of xr) {
|
|
3549
3070
|
if (n === "classes") {
|
|
3550
3071
|
let n = e.classes, r = e.proClasses?.table;
|
|
3551
3072
|
(n || r) && (t.classes = {
|
|
@@ -3560,15 +3081,15 @@ var ti = (e) => {
|
|
|
3560
3081
|
return t;
|
|
3561
3082
|
});
|
|
3562
3083
|
function Ue(t, n, r, i) {
|
|
3563
|
-
|
|
3564
|
-
}
|
|
3565
|
-
function U(e) {
|
|
3566
|
-
s("update:expandedRowKeys", e);
|
|
3084
|
+
Ee(t, n, r, i), e.onChange?.(t, n, r, i);
|
|
3567
3085
|
}
|
|
3568
3086
|
function We(e) {
|
|
3569
|
-
|
|
3087
|
+
r("update:expandedRowKeys", e);
|
|
3088
|
+
}
|
|
3089
|
+
function Ge(e) {
|
|
3090
|
+
r("scroll", e);
|
|
3570
3091
|
}
|
|
3571
|
-
let
|
|
3092
|
+
let Ke = [
|
|
3572
3093
|
"title",
|
|
3573
3094
|
"footer",
|
|
3574
3095
|
"summary",
|
|
@@ -3576,120 +3097,120 @@ var ti = (e) => {
|
|
|
3576
3097
|
"expandedRowRender",
|
|
3577
3098
|
"filterDropdown",
|
|
3578
3099
|
"filterIcon"
|
|
3579
|
-
],
|
|
3100
|
+
], qe = m(() => {
|
|
3580
3101
|
let t = {};
|
|
3581
|
-
for (let e of
|
|
3582
|
-
|
|
3583
|
-
let
|
|
3584
|
-
slots:
|
|
3102
|
+
for (let e of Ke) n[e] && (t[e] = n[e]);
|
|
3103
|
+
n.bodyCell && (t.bodyCell = (e) => n.bodyCell(e)), n.headerCell && (t.headerCell = (e) => n.headerCell(e));
|
|
3104
|
+
let r = gt({
|
|
3105
|
+
slots: n,
|
|
3585
3106
|
props: e,
|
|
3586
3107
|
key: "emptyText"
|
|
3587
3108
|
});
|
|
3588
|
-
return (
|
|
3109
|
+
return (r || u?.renderEmpty?.value) && (t.emptyText = () => r || u?.renderEmpty?.value?.()), t;
|
|
3589
3110
|
});
|
|
3590
|
-
return
|
|
3111
|
+
return i({
|
|
3591
3112
|
actionRef: () => ({
|
|
3592
|
-
loading:
|
|
3593
|
-
dataSource:
|
|
3113
|
+
loading: j,
|
|
3114
|
+
dataSource: Se,
|
|
3594
3115
|
pageInfo: E,
|
|
3595
|
-
reload:
|
|
3116
|
+
reload: U,
|
|
3596
3117
|
reloadAndReset: (e) => {
|
|
3597
|
-
D({ current: 1 }),
|
|
3118
|
+
D({ current: 1 }), xe(), Oe(), e?.callBack?.();
|
|
3598
3119
|
},
|
|
3599
3120
|
setPagination: D,
|
|
3600
3121
|
setPageInfo: (e, t, n, r) => {
|
|
3601
|
-
D(e),
|
|
3122
|
+
D(e), Ee(e, t ?? {}, n ?? {}, r ?? {});
|
|
3602
3123
|
},
|
|
3603
|
-
setTableDataList:
|
|
3604
|
-
operateTableDataRow:
|
|
3605
|
-
setLoading:
|
|
3606
|
-
selectedKeys:
|
|
3607
|
-
selectedItems:
|
|
3124
|
+
setTableDataList: we,
|
|
3125
|
+
operateTableDataRow: Te,
|
|
3126
|
+
setLoading: M,
|
|
3127
|
+
selectedKeys: N,
|
|
3128
|
+
selectedItems: te,
|
|
3608
3129
|
rowsSelection: {
|
|
3609
|
-
clear:
|
|
3610
|
-
select:
|
|
3611
|
-
selectAll:
|
|
3612
|
-
remove:
|
|
3613
|
-
sync:
|
|
3130
|
+
clear: L,
|
|
3131
|
+
select: re,
|
|
3132
|
+
selectAll: F,
|
|
3133
|
+
remove: I,
|
|
3134
|
+
sync: R
|
|
3614
3135
|
}
|
|
3615
3136
|
}),
|
|
3616
3137
|
formRef: () => ({
|
|
3617
|
-
getFormSearch:
|
|
3618
|
-
getFormInnerState: () =>
|
|
3138
|
+
getFormSearch: be,
|
|
3139
|
+
getFormInnerState: () => ye.value,
|
|
3619
3140
|
restFormState: (e) => {
|
|
3620
|
-
|
|
3141
|
+
xe(), e?.();
|
|
3621
3142
|
}
|
|
3622
3143
|
})
|
|
3623
3144
|
}), () => {
|
|
3624
|
-
let
|
|
3625
|
-
return
|
|
3626
|
-
ref:
|
|
3145
|
+
let t = n.actions?.() || e.actionProps?.actions;
|
|
3146
|
+
return h("div", {
|
|
3147
|
+
ref: p,
|
|
3627
3148
|
class: v.value,
|
|
3628
3149
|
style: y.value
|
|
3629
|
-
}, [
|
|
3630
|
-
class: J(e.proClasses?.content, `${
|
|
3150
|
+
}, [h("div", {
|
|
3151
|
+
class: J(e.proClasses?.content, `${o.value}-content`),
|
|
3631
3152
|
style: e.proStyles?.content
|
|
3632
|
-
}, [
|
|
3633
|
-
prefixCls:
|
|
3634
|
-
formColumns:
|
|
3635
|
-
formState:
|
|
3636
|
-
defaultFormSearch:
|
|
3637
|
-
formConfig:
|
|
3638
|
-
formAutoRequest:
|
|
3639
|
-
formActions:
|
|
3640
|
-
loading:
|
|
3153
|
+
}, [Fe.value && h(rr, {
|
|
3154
|
+
prefixCls: o.value,
|
|
3155
|
+
formColumns: _e.value,
|
|
3156
|
+
formState: ye.value,
|
|
3157
|
+
defaultFormSearch: ve.value,
|
|
3158
|
+
formConfig: me.value,
|
|
3159
|
+
formAutoRequest: he.value,
|
|
3160
|
+
formActions: ge.value,
|
|
3161
|
+
loading: Ve.value,
|
|
3641
3162
|
cardBordered: e.cardBordered,
|
|
3642
3163
|
proClasses: e.proClasses ?? {},
|
|
3643
3164
|
proStyles: e.proStyles ?? {},
|
|
3644
|
-
onSearch:
|
|
3645
|
-
onReset: (e) =>
|
|
3646
|
-
}, { default: () => [
|
|
3647
|
-
ref:
|
|
3648
|
-
class: J(e.proClasses?.card, `${
|
|
3165
|
+
onSearch: Ie,
|
|
3166
|
+
onReset: (e) => r("reset", e)
|
|
3167
|
+
}, { default: () => [n.form?.()] }), h("div", {
|
|
3168
|
+
ref: ke,
|
|
3169
|
+
class: J(e.proClasses?.card, `${o.value}-card`, e.cardBordered && `${o.value}-card-border`),
|
|
3649
3170
|
style: e.proStyles?.card
|
|
3650
|
-
}, [
|
|
3651
|
-
prefixCls:
|
|
3171
|
+
}, [h(lr, {
|
|
3172
|
+
prefixCls: o.value,
|
|
3652
3173
|
options: e.options,
|
|
3653
3174
|
titleTipText: e.titleTipText,
|
|
3654
3175
|
actionsPlacement: e.actionProps?.placement,
|
|
3655
|
-
actions:
|
|
3656
|
-
headerTitle:
|
|
3657
|
-
headerTitleTip:
|
|
3658
|
-
listToolAfter:
|
|
3176
|
+
actions: t,
|
|
3177
|
+
headerTitle: n.headerTitle?.() ?? e.headerTitle,
|
|
3178
|
+
headerTitleTip: n.headerTitleTip?.() ?? e.headerTitleTip,
|
|
3179
|
+
listToolAfter: n.listToolAfter?.() ?? e.listToolAfter,
|
|
3659
3180
|
proClasses: e.proClasses ?? {},
|
|
3660
3181
|
proStyles: e.proStyles ?? {}
|
|
3661
|
-
}, null),
|
|
3662
|
-
class: J(`${
|
|
3182
|
+
}, null), Pe.value ? h(se, { spinning: !!Ve.value }, { default: () => [h("div", { class: J(`${o.value}-list`, e.proClasses?.list) }, [h("div", {
|
|
3183
|
+
class: J(`${o.value}-list-content`, e.proClasses?.listContent),
|
|
3663
3184
|
style: e.proStyles?.listContent
|
|
3664
|
-
}, [
|
|
3665
|
-
align:
|
|
3666
|
-
class: J(`${
|
|
3185
|
+
}, [Re()]), w.value !== !1 && Se.value?.length > 0 && h(V, x(w.value, {
|
|
3186
|
+
align: T.value,
|
|
3187
|
+
class: J(`${o.value}-pagination`, e.proClasses?.pagination),
|
|
3667
3188
|
style: e.proStyles?.pagination,
|
|
3668
|
-
onChange:
|
|
3669
|
-
}), null)])] }) :
|
|
3670
|
-
scroll:
|
|
3671
|
-
dataSource:
|
|
3672
|
-
columns: e.draggable ?
|
|
3673
|
-
components: e.draggable ?
|
|
3189
|
+
onChange: Be
|
|
3190
|
+
}), null)])] }) : h(d, null, [h(ce, x(He.value, {
|
|
3191
|
+
scroll: G.value,
|
|
3192
|
+
dataSource: Se.value,
|
|
3193
|
+
columns: e.draggable ? de.value : oe.value,
|
|
3194
|
+
components: e.draggable ? H.value : He.value.components,
|
|
3674
3195
|
rowKey: e.rowKey,
|
|
3675
3196
|
size: O.value,
|
|
3676
|
-
pagination:
|
|
3677
|
-
loading:
|
|
3678
|
-
rowSelection:
|
|
3197
|
+
pagination: w.value,
|
|
3198
|
+
loading: Ve.value,
|
|
3199
|
+
rowSelection: ne.value,
|
|
3679
3200
|
onChange: Ue,
|
|
3680
|
-
"onUpdate:expandedRowKeys":
|
|
3681
|
-
onScroll:
|
|
3201
|
+
"onUpdate:expandedRowKeys": We,
|
|
3202
|
+
onScroll: Ge,
|
|
3682
3203
|
classes: {
|
|
3683
|
-
...
|
|
3684
|
-
...je.value ? { root: `${
|
|
3204
|
+
...He.value.classes,
|
|
3205
|
+
...je.value ? { root: `${o.value}-overflow-hidden` } : {}
|
|
3685
3206
|
}
|
|
3686
|
-
}),
|
|
3687
|
-
ref:
|
|
3688
|
-
hasScrollY: !!
|
|
3207
|
+
}), qe.value), W.value && h(f, { to: W.value }, { default: () => [h(xn, {
|
|
3208
|
+
ref: Ne,
|
|
3209
|
+
hasScrollY: !!G.value.y
|
|
3689
3210
|
}, null)] })])])])]);
|
|
3690
3211
|
};
|
|
3691
3212
|
}, {
|
|
3692
|
-
props:
|
|
3213
|
+
props: /*@__PURE__*/ b({
|
|
3693
3214
|
loading: {
|
|
3694
3215
|
type: [Boolean, Object],
|
|
3695
3216
|
required: !1,
|
|
@@ -4109,7 +3630,7 @@ var ti = (e) => {
|
|
|
4109
3630
|
type: String,
|
|
4110
3631
|
required: !1
|
|
4111
3632
|
}
|
|
4112
|
-
},
|
|
3633
|
+
}, br),
|
|
4113
3634
|
emits: [
|
|
4114
3635
|
"change",
|
|
4115
3636
|
"reset",
|
|
@@ -4127,4 +3648,4 @@ var ti = (e) => {
|
|
|
4127
3648
|
inheritAttrs: !1
|
|
4128
3649
|
});
|
|
4129
3650
|
//#endregion
|
|
4130
|
-
export {
|
|
3651
|
+
export { Sr as GProTable, zt as useFetchData, we as useInjectTableContext, Qt as usePagination, De as useProBreakpoints, $t as useRequestOptions, nn as useTable, on as useTableForm };
|