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