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