@vue-start/pro 0.5.35 → 0.5.37
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/CHANGELOG.md +11 -0
- package/dist/index.css +46 -25
- package/dist/index.d.ts +139 -11
- package/dist/index.es.js +1475 -1430
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { reduce as
|
|
3
|
-
import { filter as
|
|
4
|
-
import { map as
|
|
5
|
-
import { mergeStateToData as
|
|
6
|
-
import { useRequestProvide as
|
|
7
|
-
import { useDispatchStore as
|
|
8
|
-
import { parseQuery as
|
|
9
|
-
import { css as
|
|
10
|
-
import
|
|
11
|
-
const
|
|
1
|
+
import { defineComponent as w, provide as ve, inject as he, reactive as Oe, createVNode as d, Fragment as de, computed as A, h as Ce, isVNode as Ee, mergeProps as x, ref as V, createTextVNode as nt, toRef as an } from "vue";
|
|
2
|
+
import { reduce as ae, get as m, map as D, isString as ue, forEach as te, size as X, endsWith as gt, set as se, isArray as _, pick as H, add as on, subtract as un, isFunction as z, filter as Y, has as We, keys as W, isObject as Me, omit as $, some as ye, isNumber as Ge, head as cn, split as sn, isEmpty as St, mergeWith as ln, startsWith as dn, mapKeys as fn, debounce as Pt, clone as mn, isBoolean as Te, sortBy as pt, every as yn, join as Xe, findLast as vn, cloneDeep as Ct } from "lodash";
|
|
3
|
+
import { filter as Ke, tap as Re, merge as hn, Subject as bn } from "rxjs";
|
|
4
|
+
import { map as gn, tap as Sn } from "rxjs/operators";
|
|
5
|
+
import { mergeStateToData as Pn, mergeStateToData2 as pn, useEffect as ce, findFirstValidMenu as Cn, setReactiveValue as Et, restorePath as Mt, isValidPath as Tt, isPathHasParent as It, useUpdateKey as Nt, useRuleState as Be, convertCollection as At, useWatch as Ot, useState as rt, signTableMerge as En, useResizeObserver as Fe, decimalFixed as Mn, thousandDivision as Tn, listToMap as In, treeToMap as Nn, getMenuTopNameMap as An, findTreeItem as at, strToJson as $t, jsonToStr as On, useSafeActivated as $n } from "@vue-start/hooks";
|
|
6
|
+
import { useRequestProvide as $e, isDoneRequestActor as wt, isFailedRequestActor as xt } from "@vue-start/request";
|
|
7
|
+
import { useDispatchStore as Ft, useStore as Dt, useObservableRef as wn, useStoreConn as xn, shallowEqual as Fn, createStateUse as Dn } from "@vue-start/store";
|
|
8
|
+
import { parseQuery as ot, stringifyQuery as Kn, useRouter as _e, useRoute as Ye } from "vue-router";
|
|
9
|
+
import { css as ut } from "@emotion/css";
|
|
10
|
+
import ct from "dayjs";
|
|
11
|
+
const Rn = () => ({
|
|
12
12
|
elementMap: { type: Object },
|
|
13
13
|
formElementMap: { type: Object },
|
|
14
14
|
columns: { type: Array },
|
|
15
15
|
convertColumn: { type: Function },
|
|
16
16
|
columnState: { type: Object },
|
|
17
17
|
columnState2: { type: Object }
|
|
18
|
-
}),
|
|
18
|
+
}), be = Rn(), ke = (e, t, r) => {
|
|
19
19
|
let o = e;
|
|
20
|
-
return t && (o =
|
|
20
|
+
return t && (o = Pn(o, t, (a) => le(a))), r && (o = pn(o, r, (a) => le(a))), o;
|
|
21
21
|
}, Ln = () => ({
|
|
22
22
|
elementMap: { type: Object },
|
|
23
23
|
formElementMap: { type: Object },
|
|
@@ -27,31 +27,31 @@ const Kn = () => ({
|
|
|
27
27
|
registerMetas: { type: Array },
|
|
28
28
|
convertRouter: { type: Function },
|
|
29
29
|
expressionMethods: { type: Object },
|
|
30
|
-
showMsg: { type:
|
|
31
|
-
showModal: { type:
|
|
32
|
-
showNotify: { type:
|
|
33
|
-
}),
|
|
34
|
-
const { showMsg: e } =
|
|
30
|
+
showMsg: { type: Function },
|
|
31
|
+
showModal: { type: Function },
|
|
32
|
+
showNotify: { type: Function }
|
|
33
|
+
}), Qe = Symbol("pro-config"), ne = () => he(Qe) || {}, Gr = () => {
|
|
34
|
+
const { showMsg: e } = ne();
|
|
35
35
|
return (t) => e(t);
|
|
36
|
-
},
|
|
37
|
-
const { showModal: e } =
|
|
36
|
+
}, Xr = () => {
|
|
37
|
+
const { showModal: e } = ne();
|
|
38
38
|
return (t) => e(t);
|
|
39
|
-
},
|
|
40
|
-
const { showNotify: e } =
|
|
39
|
+
}, _r = () => {
|
|
40
|
+
const { showNotify: e } = ne();
|
|
41
41
|
return (t) => e(t);
|
|
42
|
-
},
|
|
42
|
+
}, Yr = w({
|
|
43
43
|
props: {
|
|
44
44
|
...Ln()
|
|
45
45
|
},
|
|
46
46
|
setup: (e, { slots: t }) => {
|
|
47
|
-
const r =
|
|
48
|
-
|
|
49
|
-
const { dispatchRequest: n } =
|
|
50
|
-
const b =
|
|
47
|
+
const r = ae(e.registerStores, (c, l) => ({ ...c, [l.key]: l }), {}), o = ae(e.registerActors, (c, l) => ({ ...c, [l.actor.name]: l }), {}), a = ae(e.registerMetas, (c, l) => ({ ...c, [l.actorName]: l }), {});
|
|
48
|
+
Un(a, o);
|
|
49
|
+
const { dispatchRequest: n } = $e(), u = (c, l, i) => {
|
|
50
|
+
const b = m(o, c);
|
|
51
51
|
if (!!b)
|
|
52
|
-
return n(b.actor,
|
|
52
|
+
return n(b.actor, l, i);
|
|
53
53
|
};
|
|
54
|
-
return
|
|
54
|
+
return ve(Qe, {
|
|
55
55
|
elementMap: e.elementMap,
|
|
56
56
|
formElementMap: e.formElementMap,
|
|
57
57
|
formExtraMap: e.formExtraMap,
|
|
@@ -68,14 +68,14 @@ const Kn = () => ({
|
|
|
68
68
|
return (c = t.default) == null ? void 0 : c.call(t);
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
}),
|
|
72
|
-
t.provide(
|
|
73
|
-
},
|
|
74
|
-
const { requestSubject$: o } =
|
|
75
|
-
|
|
71
|
+
}), Qr = (e = {}) => (t) => {
|
|
72
|
+
t.provide(Qe, e);
|
|
73
|
+
}, Kt = (e) => (t, r) => {
|
|
74
|
+
const { requestSubject$: o } = $e(), a = new Set(D(t, (n) => ue(n) ? n : n.name));
|
|
75
|
+
ce(() => {
|
|
76
76
|
const n = o.pipe(
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
Ke(e),
|
|
78
|
+
Re((u) => {
|
|
79
79
|
a.has(u.name) && r(u);
|
|
80
80
|
})
|
|
81
81
|
).subscribe();
|
|
@@ -83,65 +83,65 @@ const Kn = () => ({
|
|
|
83
83
|
n.unsubscribe();
|
|
84
84
|
};
|
|
85
85
|
}, []);
|
|
86
|
-
},
|
|
87
|
-
const { requestSubject$: o, dispatchRequest: a } =
|
|
88
|
-
|
|
89
|
-
const c =
|
|
86
|
+
}, Jr = Kt(wt), Zr = Kt(xt), jn = (e, t, r) => {
|
|
87
|
+
const { requestSubject$: o, dispatchRequest: a } = $e(), n = new Set(D(e, (c) => ue(c) ? c : c.name)), u = {};
|
|
88
|
+
ce(() => {
|
|
89
|
+
const c = hn(
|
|
90
90
|
o.pipe(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
var
|
|
94
|
-
n.has(
|
|
91
|
+
Ke(wt),
|
|
92
|
+
Re((l) => {
|
|
93
|
+
var i, b;
|
|
94
|
+
n.has(l.name) && ((i = t.onSuccess) == null || i.call(t, l), (b = t.onFinish) == null || b.call(t, l), u[l.name] = void 0);
|
|
95
95
|
})
|
|
96
96
|
),
|
|
97
97
|
o.pipe(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
var
|
|
101
|
-
n.has(
|
|
98
|
+
Ke(xt),
|
|
99
|
+
Re((l) => {
|
|
100
|
+
var i, b;
|
|
101
|
+
n.has(l.name) && ((i = t.onFailed) == null || i.call(t, l), (b = t.onFinish) == null || b.call(t, l), u[l.name] = void 0);
|
|
102
102
|
})
|
|
103
103
|
)
|
|
104
104
|
).subscribe();
|
|
105
105
|
return () => {
|
|
106
|
-
c.unsubscribe(), r &&
|
|
107
|
-
|
|
106
|
+
c.unsubscribe(), r && te(u, (l) => {
|
|
107
|
+
l && a({ ...l, stage: "CANCEL" });
|
|
108
108
|
});
|
|
109
109
|
};
|
|
110
110
|
}, []);
|
|
111
|
-
},
|
|
111
|
+
}, kn = (e, t, r) => {
|
|
112
112
|
var a;
|
|
113
113
|
const o = (a = e.res) == null ? void 0 : a.data;
|
|
114
|
-
return t ? t(o, e) : r ?
|
|
115
|
-
},
|
|
116
|
-
const e =
|
|
114
|
+
return t ? t(o, e) : r ? m(o, r) : o;
|
|
115
|
+
}, ea = () => {
|
|
116
|
+
const e = Dt(), { registerMetaMap: t, dispatchRequest: r } = ne();
|
|
117
117
|
return (o) => {
|
|
118
|
-
const a =
|
|
118
|
+
const a = m(t, o);
|
|
119
119
|
if (!a)
|
|
120
120
|
return;
|
|
121
121
|
const n = a.storeName || o;
|
|
122
|
-
|
|
122
|
+
m(e.value, n) || r(o, a.initParams || {});
|
|
123
123
|
};
|
|
124
|
-
},
|
|
125
|
-
const { requestSubject$: r } =
|
|
126
|
-
const u =
|
|
124
|
+
}, Un = (e, t) => {
|
|
125
|
+
const { requestSubject$: r } = $e(), o = Ft(), a = (n) => {
|
|
126
|
+
const u = m(e, n.name), c = m(t, n.name);
|
|
127
127
|
return !!(u && c && c.actor);
|
|
128
128
|
};
|
|
129
|
-
|
|
129
|
+
ce(() => {
|
|
130
130
|
const n = r.pipe(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
const c =
|
|
131
|
+
Ke(a),
|
|
132
|
+
Re((u) => {
|
|
133
|
+
const c = m(e, u.name);
|
|
134
134
|
if (!c)
|
|
135
135
|
return;
|
|
136
|
-
const
|
|
137
|
-
o(
|
|
136
|
+
const l = c.storeName || u.name, i = kn(u, c.convertData, c.convertPath);
|
|
137
|
+
o(l, i, !1, void 0);
|
|
138
138
|
})
|
|
139
139
|
).subscribe();
|
|
140
140
|
return () => {
|
|
141
141
|
n.unsubscribe();
|
|
142
142
|
};
|
|
143
143
|
}, []);
|
|
144
|
-
},
|
|
144
|
+
}, Bn = {
|
|
145
145
|
open: (e, t, r) => window.open(e, t, r),
|
|
146
146
|
parseStr: (e) => {
|
|
147
147
|
var n;
|
|
@@ -153,7 +153,7 @@ const Kn = () => ({
|
|
|
153
153
|
protocol: u.protocol,
|
|
154
154
|
path: u.pathname,
|
|
155
155
|
origin: u.origin,
|
|
156
|
-
query:
|
|
156
|
+
query: ot(u.search),
|
|
157
157
|
url: u.origin + u.pathname
|
|
158
158
|
};
|
|
159
159
|
} catch {
|
|
@@ -161,18 +161,18 @@ const Kn = () => ({
|
|
|
161
161
|
const t = e.indexOf("//") > -1 ? (n = e.split("//")) == null ? void 0 : n[0] : "";
|
|
162
162
|
let r = "", o = "";
|
|
163
163
|
e.indexOf("?") >= -1 && (r = e.substring(0, e.indexOf("?")), o = e.substring(e.indexOf("?")));
|
|
164
|
-
const a = o ?
|
|
164
|
+
const a = o ? ot(o) : {};
|
|
165
165
|
return { protocol: t, query: a, url: r };
|
|
166
166
|
},
|
|
167
167
|
stringifyUrl: ({ url: e, query: t }) => {
|
|
168
|
-
const r =
|
|
168
|
+
const r = Kn(t);
|
|
169
169
|
return `${e}${r ? "?" : ""}${r || ""}`;
|
|
170
170
|
}
|
|
171
|
-
},
|
|
172
|
-
const { convertRouter: e } =
|
|
171
|
+
}, Rt = () => {
|
|
172
|
+
const { convertRouter: e } = ne(), t = _e(), r = Ye(), a = { ...t, openMenu: (u) => {
|
|
173
173
|
if (!!u) {
|
|
174
|
-
if (
|
|
175
|
-
const c =
|
|
174
|
+
if (X(u.children) > 0) {
|
|
175
|
+
const c = Cn(u.children, (l) => !l.children || X(l.children) <= 0);
|
|
176
176
|
if (c) {
|
|
177
177
|
t.push({ name: c.value });
|
|
178
178
|
return;
|
|
@@ -180,56 +180,56 @@ const Kn = () => ({
|
|
|
180
180
|
}
|
|
181
181
|
t.push({ name: u.value });
|
|
182
182
|
}
|
|
183
|
-
}, ...
|
|
183
|
+
}, ...Bn };
|
|
184
184
|
return { router: e ? e(a) : a, route: r };
|
|
185
|
-
},
|
|
186
|
-
if (!
|
|
185
|
+
}, qn = (e) => {
|
|
186
|
+
if (!_(e) || X(e) <= 0)
|
|
187
187
|
return !1;
|
|
188
188
|
const t = e[0];
|
|
189
|
-
return
|
|
190
|
-
},
|
|
191
|
-
if (
|
|
192
|
-
const r =
|
|
193
|
-
return e.namePath$ ?
|
|
194
|
-
} else if (
|
|
189
|
+
return ue(t) ? gt(t, "$") : !1;
|
|
190
|
+
}, Vn = (e) => typeof e != "object" || !e.type$ ? !1 : e.type$ === "data$" && e.type$, zn = (e) => typeof e != "object" || !e.type$ ? !1 : e.type$ === "obj", Hn = { get: m, pick: H, add: on, subtract: un }, Le = (e, t) => {
|
|
191
|
+
if (Vn(e)) {
|
|
192
|
+
const r = m(t, e.name$);
|
|
193
|
+
return e.namePath$ ? m(r, e.namePath$) : r;
|
|
194
|
+
} else if (zn(e)) {
|
|
195
195
|
const r = {};
|
|
196
|
-
return
|
|
196
|
+
return te(e, (o, a) => {
|
|
197
197
|
if (a !== "type$")
|
|
198
|
-
if (
|
|
199
|
-
const n =
|
|
200
|
-
|
|
198
|
+
if (gt(a, "$")) {
|
|
199
|
+
const n = Le(o, t);
|
|
200
|
+
se(r, a.replace("$", ""), n);
|
|
201
201
|
} else
|
|
202
202
|
r[a] = o;
|
|
203
203
|
}), r;
|
|
204
|
-
} else if (
|
|
205
|
-
const [r, ...o] = e, a = t.expressionMethods ||
|
|
204
|
+
} else if (qn(e)) {
|
|
205
|
+
const [r, ...o] = e, a = t.expressionMethods || Hn, n = m(a, r.replace("$", ""));
|
|
206
206
|
if (!n) {
|
|
207
207
|
console.log("ex", "\u672A\u627E\u5230\u5BF9\u5E94\u7684\u65B9\u6CD5", e);
|
|
208
208
|
return;
|
|
209
209
|
}
|
|
210
|
-
const u =
|
|
210
|
+
const u = D(o, (c) => Le(c, t));
|
|
211
211
|
return n(...u);
|
|
212
212
|
}
|
|
213
213
|
return e;
|
|
214
|
-
},
|
|
215
|
-
const e =
|
|
214
|
+
}, Wn = () => {
|
|
215
|
+
const e = Ft(), { registerStoreMap: t } = ne();
|
|
216
216
|
return (r, o) => {
|
|
217
|
-
const a =
|
|
217
|
+
const a = m(t, r);
|
|
218
218
|
!a || e(r, o, !!a.persist, a.initialState);
|
|
219
219
|
};
|
|
220
|
-
},
|
|
221
|
-
const { registerStoreMap: t } =
|
|
222
|
-
return
|
|
223
|
-
const u =
|
|
220
|
+
}, ta = (e) => {
|
|
221
|
+
const { registerStoreMap: t } = ne(), r = m(t, e), o = `${r != null && r.persist ? "$" : ""}${r == null ? void 0 : r.key}`;
|
|
222
|
+
return wn(xn((n) => {
|
|
223
|
+
const u = m(n, o);
|
|
224
224
|
return u || (z(r == null ? void 0 : r.initialState) ? r == null ? void 0 : r.initialState() : r == null ? void 0 : r.initialState);
|
|
225
225
|
}));
|
|
226
|
-
}, Lt = Symbol("pro-module"),
|
|
227
|
-
|
|
228
|
-
},
|
|
226
|
+
}, Lt = Symbol("pro-module"), ge = () => he(Lt), Gn = (e) => {
|
|
227
|
+
ve(Lt, e);
|
|
228
|
+
}, Je = (e) => {
|
|
229
229
|
const {
|
|
230
230
|
subject$: t
|
|
231
|
-
} =
|
|
232
|
-
|
|
231
|
+
} = ge();
|
|
232
|
+
ce(() => {
|
|
233
233
|
const r = t.subscribe({
|
|
234
234
|
next: (o) => {
|
|
235
235
|
e(o);
|
|
@@ -237,10 +237,10 @@ const Kn = () => ({
|
|
|
237
237
|
});
|
|
238
238
|
return () => r.unsubscribe();
|
|
239
239
|
}, []);
|
|
240
|
-
},
|
|
240
|
+
}, Ie = {
|
|
241
241
|
Success: "request-success$",
|
|
242
242
|
Fail: "request-fail$"
|
|
243
|
-
},
|
|
243
|
+
}, Xn = () => ({
|
|
244
244
|
state: {
|
|
245
245
|
type: Object
|
|
246
246
|
},
|
|
@@ -265,49 +265,49 @@ const Kn = () => ({
|
|
|
265
265
|
requests: {
|
|
266
266
|
type: Array
|
|
267
267
|
}
|
|
268
|
-
}),
|
|
268
|
+
}), De = w({
|
|
269
269
|
props: {
|
|
270
|
-
...
|
|
270
|
+
...Xn()
|
|
271
271
|
},
|
|
272
272
|
setup: (e, {
|
|
273
273
|
slots: t,
|
|
274
274
|
expose: r
|
|
275
275
|
}) => {
|
|
276
|
-
const o =
|
|
276
|
+
const o = Dt(), {
|
|
277
277
|
router: a
|
|
278
|
-
} =
|
|
278
|
+
} = Rt(), {
|
|
279
279
|
elementMap: n,
|
|
280
280
|
registerStoreMap: u,
|
|
281
281
|
expressionMethods: c
|
|
282
|
-
} =
|
|
282
|
+
} = ne(), l = e.elementMap || n, i = (v) => _(v) ? et(l, v) : Ne(l, v), b = new bn(), g = (v) => {
|
|
283
283
|
b.next(v);
|
|
284
|
-
},
|
|
285
|
-
const
|
|
284
|
+
}, f = Y(e.storeKeys, (v) => We(u, v)), S = () => ae(f, (v, P) => {
|
|
285
|
+
const C = m(u, P);
|
|
286
286
|
return {
|
|
287
287
|
...v,
|
|
288
|
-
[
|
|
288
|
+
[P]: m(o.value, `${C.persist ? "$" : ""}${P}`) || m(u, [P, "initialState"])
|
|
289
289
|
};
|
|
290
|
-
}, {}),
|
|
291
|
-
...
|
|
290
|
+
}, {}), p = S(), y = e.state || Oe({
|
|
291
|
+
...p,
|
|
292
292
|
...e.initState
|
|
293
|
-
}),
|
|
294
|
-
const
|
|
295
|
-
if (
|
|
296
|
-
|
|
293
|
+
}), T = {}, N = (v) => {
|
|
294
|
+
const P = y[v.type], C = z(v.payload) ? v.payload(P) : v.payload;
|
|
295
|
+
if (Me(P)) {
|
|
296
|
+
Et(y[v.type], C);
|
|
297
297
|
return;
|
|
298
298
|
}
|
|
299
|
-
|
|
300
|
-
},
|
|
301
|
-
dispatch:
|
|
302
|
-
dispatchStore:
|
|
299
|
+
y[v.type] = C;
|
|
300
|
+
}, s = Wn(), h = {
|
|
301
|
+
dispatch: N,
|
|
302
|
+
dispatchStore: s
|
|
303
303
|
};
|
|
304
|
-
|
|
305
|
-
const v = o.pipe(
|
|
306
|
-
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
type:
|
|
310
|
-
payload:
|
|
304
|
+
ce(() => {
|
|
305
|
+
const v = o.pipe(gn(() => S()), Sn((P) => {
|
|
306
|
+
te(P, (C, j) => {
|
|
307
|
+
const Z = m(y, j);
|
|
308
|
+
Fn(Z, C) || N({
|
|
309
|
+
type: j,
|
|
310
|
+
payload: C
|
|
311
311
|
});
|
|
312
312
|
});
|
|
313
313
|
})).subscribe();
|
|
@@ -316,243 +316,243 @@ const Kn = () => ({
|
|
|
316
316
|
};
|
|
317
317
|
}, []);
|
|
318
318
|
const {
|
|
319
|
-
dispatchRequest:
|
|
320
|
-
} =
|
|
321
|
-
const v = {},
|
|
322
|
-
...
|
|
323
|
-
[
|
|
319
|
+
dispatchRequest: E
|
|
320
|
+
} = $e(), M = (() => {
|
|
321
|
+
const v = {}, P = ae(e.actors || [], (C, j) => ({
|
|
322
|
+
...C,
|
|
323
|
+
[j.name]: j
|
|
324
324
|
}), {});
|
|
325
|
-
return
|
|
326
|
-
if (
|
|
327
|
-
const
|
|
328
|
-
if (!
|
|
325
|
+
return te(e.requests, (C) => {
|
|
326
|
+
if (ue(C.actor)) {
|
|
327
|
+
const j = m(P, C.actor);
|
|
328
|
+
if (!j)
|
|
329
329
|
return;
|
|
330
|
-
|
|
330
|
+
C.actor = j;
|
|
331
331
|
}
|
|
332
|
-
!
|
|
332
|
+
!C.actor || (v[C.actor.name] = C, C.action && (v[C.action] = C));
|
|
333
333
|
}), v;
|
|
334
|
-
})(),
|
|
335
|
-
var
|
|
336
|
-
return v.convertData ? v.convertData(
|
|
337
|
-
},
|
|
338
|
-
const
|
|
339
|
-
if (!
|
|
334
|
+
})(), R = (v, ...P) => v.convertParams ? v.convertParams(...P) : v.convertParamsEx ? G(v.convertParamsEx, P) : m(P, 0), L = (v, P) => {
|
|
335
|
+
var C;
|
|
336
|
+
return v.convertData ? v.convertData(P) : v.convertDataEx ? G(v.convertDataEx, P) : (C = P.res) == null ? void 0 : C.data;
|
|
337
|
+
}, B = (v, ...P) => {
|
|
338
|
+
const C = m(M, v);
|
|
339
|
+
if (!C)
|
|
340
340
|
return;
|
|
341
|
-
const
|
|
342
|
-
|
|
343
|
-
type:
|
|
341
|
+
const j = R(C, ...P);
|
|
342
|
+
C.loadingName && N({
|
|
343
|
+
type: C.loadingName,
|
|
344
344
|
payload: !0
|
|
345
|
-
}), C
|
|
345
|
+
}), E(C.actor, j);
|
|
346
346
|
};
|
|
347
|
-
|
|
347
|
+
jn(W(M), {
|
|
348
348
|
onSuccess: (v) => {
|
|
349
|
-
var
|
|
350
|
-
const
|
|
351
|
-
|
|
352
|
-
type:
|
|
353
|
-
payload:
|
|
349
|
+
var j;
|
|
350
|
+
const P = m(M, v.name), C = L(P, v);
|
|
351
|
+
P != null && P.stateName && N({
|
|
352
|
+
type: P.stateName,
|
|
353
|
+
payload: C
|
|
354
354
|
}), g({
|
|
355
|
-
type:
|
|
355
|
+
type: Ie.Success,
|
|
356
356
|
payload: {
|
|
357
357
|
actor: v,
|
|
358
|
-
requestOpts:
|
|
358
|
+
requestOpts: P
|
|
359
359
|
}
|
|
360
|
-
}), (
|
|
360
|
+
}), (j = P.onSuccess) == null || j.call(P, v), P.onSuccessEx && J(P.onSuccessEx, [C]);
|
|
361
361
|
},
|
|
362
362
|
onFailed: (v) => {
|
|
363
|
-
var
|
|
364
|
-
const
|
|
363
|
+
var C;
|
|
364
|
+
const P = m(M, v.name);
|
|
365
365
|
g({
|
|
366
|
-
type:
|
|
366
|
+
type: Ie.Fail,
|
|
367
367
|
payload: {
|
|
368
368
|
actor: v,
|
|
369
|
-
requestOpts:
|
|
369
|
+
requestOpts: P
|
|
370
370
|
}
|
|
371
|
-
}), (
|
|
371
|
+
}), (C = P.onFailed) == null || C.call(P, v), P.onFailedEx && J(P.onFailedEx, [v.err]);
|
|
372
372
|
},
|
|
373
373
|
onFinish: (v) => {
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
type:
|
|
374
|
+
const P = m(M, [v.name, "loadingName"]);
|
|
375
|
+
P && N({
|
|
376
|
+
type: P,
|
|
377
377
|
payload: !1
|
|
378
378
|
});
|
|
379
379
|
}
|
|
380
380
|
}, !0);
|
|
381
|
-
const
|
|
382
|
-
state:
|
|
383
|
-
data:
|
|
384
|
-
args:
|
|
381
|
+
const G = (v, P) => Le(v, {
|
|
382
|
+
state: y,
|
|
383
|
+
data: T,
|
|
384
|
+
args: P,
|
|
385
385
|
expressionMethods: c
|
|
386
|
-
}),
|
|
386
|
+
}), J = (v, P) => {
|
|
387
387
|
if (!v)
|
|
388
388
|
return;
|
|
389
|
-
const
|
|
390
|
-
state:
|
|
391
|
-
data:
|
|
392
|
-
args:
|
|
389
|
+
const C = {
|
|
390
|
+
state: y,
|
|
391
|
+
data: T,
|
|
392
|
+
args: P,
|
|
393
393
|
expressionMethods: c
|
|
394
394
|
};
|
|
395
|
-
|
|
396
|
-
if (!
|
|
397
|
-
console.log("execute invalid",
|
|
395
|
+
te(v, (j) => {
|
|
396
|
+
if (!_(j) || X(j) < 2) {
|
|
397
|
+
console.log("execute invalid", j);
|
|
398
398
|
return;
|
|
399
399
|
}
|
|
400
|
-
const [
|
|
401
|
-
let
|
|
402
|
-
switch (
|
|
400
|
+
const [Z, q, ...fe] = j;
|
|
401
|
+
let O;
|
|
402
|
+
switch (Z) {
|
|
403
403
|
case "router":
|
|
404
|
-
|
|
404
|
+
O = m(a, q);
|
|
405
405
|
break;
|
|
406
406
|
case "state":
|
|
407
|
-
|
|
407
|
+
O = m(h, q);
|
|
408
408
|
break;
|
|
409
409
|
}
|
|
410
|
-
if (
|
|
410
|
+
if (O)
|
|
411
411
|
try {
|
|
412
|
-
const
|
|
413
|
-
|
|
414
|
-
} catch (
|
|
415
|
-
console.log("execute err",
|
|
412
|
+
const K = D(fe, (ee) => Le(ee, C));
|
|
413
|
+
O(...K);
|
|
414
|
+
} catch (K) {
|
|
415
|
+
console.log("execute err", K);
|
|
416
416
|
}
|
|
417
417
|
});
|
|
418
418
|
};
|
|
419
|
-
return
|
|
420
|
-
elementMap:
|
|
419
|
+
return Gn({
|
|
420
|
+
elementMap: l,
|
|
421
421
|
subject$: b,
|
|
422
422
|
sendEvent: g,
|
|
423
|
-
state:
|
|
424
|
-
dispatch:
|
|
425
|
-
data:
|
|
423
|
+
state: y,
|
|
424
|
+
dispatch: N,
|
|
425
|
+
data: T,
|
|
426
426
|
requests: e.requests,
|
|
427
|
-
sendRequest:
|
|
428
|
-
executeExp:
|
|
429
|
-
execute:
|
|
427
|
+
sendRequest: B,
|
|
428
|
+
executeExp: G,
|
|
429
|
+
execute: J
|
|
430
430
|
}), r({
|
|
431
431
|
sendEvent: g,
|
|
432
|
-
sendRequest:
|
|
432
|
+
sendRequest: B
|
|
433
433
|
}), () => {
|
|
434
434
|
var v;
|
|
435
|
-
return
|
|
435
|
+
return d(de, null, [X(e.elementConfigs) > 0 && i(e.elementConfigs), (v = t.default) == null ? void 0 : v.call(t)]);
|
|
436
436
|
};
|
|
437
437
|
}
|
|
438
|
-
}),
|
|
438
|
+
}), _n = (e) => !(!e || X(e) === 1 && e[0].children === null), jt = (e) => e.formValueType || e.valueType || "text", le = (e) => {
|
|
439
439
|
var o, a;
|
|
440
440
|
const t = (o = e.formItemProps) == null ? void 0 : o.name;
|
|
441
441
|
return ((a = e.inputProps) == null ? void 0 : a.name) || t || e.dataIndex;
|
|
442
|
-
},
|
|
442
|
+
}, Yn = (e, t) => {
|
|
443
443
|
let r = t;
|
|
444
|
-
return
|
|
445
|
-
},
|
|
446
|
-
var b, g,
|
|
447
|
-
const a =
|
|
444
|
+
return ue(t) && (r = m(e, t)), z(r) || (r = m(e, "render")), z(r) ? r : void 0;
|
|
445
|
+
}, Ze = (e, t, r, o) => {
|
|
446
|
+
var b, g, f;
|
|
447
|
+
const a = Yn(t, o == null ? void 0 : o.render);
|
|
448
448
|
if (a)
|
|
449
449
|
return a({
|
|
450
450
|
...r,
|
|
451
451
|
column: t
|
|
452
452
|
});
|
|
453
|
-
const n = t.valueType || "text", u =
|
|
453
|
+
const n = t.valueType || "text", u = m(e, n);
|
|
454
454
|
if (!u)
|
|
455
455
|
return null;
|
|
456
|
-
const c = ((b = t.props) == null ? void 0 : b.slots) || ((g = t.formFieldProps) == null ? void 0 : g.slots) || {},
|
|
457
|
-
u.props.showProps && (
|
|
458
|
-
const
|
|
459
|
-
|
|
460
|
-
...
|
|
456
|
+
const c = ((b = t.props) == null ? void 0 : b.slots) || ((g = t.formFieldProps) == null ? void 0 : g.slots) || {}, l = r || {};
|
|
457
|
+
u.props.showProps && (l.showProps = t.props ? (f = t.props) == null ? void 0 : f.showProps : t.showProps);
|
|
458
|
+
const i = t.props ? {
|
|
459
|
+
...$(t.props, "slots"),
|
|
460
|
+
...l
|
|
461
461
|
} : {
|
|
462
|
-
|
|
463
|
-
...
|
|
462
|
+
...$(t.formFieldProps, "slots"),
|
|
463
|
+
...l
|
|
464
464
|
};
|
|
465
|
-
return
|
|
466
|
-
...
|
|
465
|
+
return Ce(u, {
|
|
466
|
+
...i
|
|
467
467
|
}, c);
|
|
468
|
-
},
|
|
468
|
+
}, kt = (e, t, r) => {
|
|
469
469
|
var b, g;
|
|
470
|
-
const o =
|
|
470
|
+
const o = jt(r), a = m(t, o);
|
|
471
471
|
if (!a)
|
|
472
472
|
return null;
|
|
473
473
|
const n = r.inputProps, u = ((b = n == null ? void 0 : n.fieldProps) == null ? void 0 : b.slots) || ((g = r.formFieldProps) == null ? void 0 : g.slots) || {};
|
|
474
|
-
!u.renderInput && z(r.inputRender) && (u.renderInput = (
|
|
475
|
-
...
|
|
474
|
+
!u.renderInput && z(r.inputRender) && (u.renderInput = (f) => r.inputRender({
|
|
475
|
+
...f,
|
|
476
476
|
column: r
|
|
477
|
-
})), u.renderShow || (u.renderShow = (
|
|
478
|
-
value:
|
|
477
|
+
})), u.renderShow || (u.renderShow = (f) => Ze(e, r, {
|
|
478
|
+
value: f.value
|
|
479
479
|
}, {
|
|
480
480
|
render: "formReadRender"
|
|
481
|
-
}) ||
|
|
482
|
-
const c =
|
|
481
|
+
}) || f.value);
|
|
482
|
+
const c = le(r), l = r.title, i = n ? {
|
|
483
483
|
...n,
|
|
484
|
-
fieldProps:
|
|
484
|
+
fieldProps: $(n.fieldProps, "slots")
|
|
485
485
|
} : {
|
|
486
486
|
...r.formItemProps,
|
|
487
|
-
fieldProps:
|
|
487
|
+
fieldProps: $(r.formFieldProps, "slots"),
|
|
488
488
|
showProps: r.showProps
|
|
489
489
|
};
|
|
490
|
-
return
|
|
490
|
+
return Ce(a, {
|
|
491
491
|
key: c,
|
|
492
492
|
name: c,
|
|
493
|
-
label:
|
|
494
|
-
...
|
|
493
|
+
label: l,
|
|
494
|
+
...i
|
|
495
495
|
}, u);
|
|
496
|
-
},
|
|
496
|
+
}, Qn = (e) => e && !z(e) && e.elementType, et = (e, t) => D(t, (r) => Ne(e, r)), Ut = (e, t) => {
|
|
497
497
|
var n;
|
|
498
498
|
const r = t.elementProps, o = {
|
|
499
499
|
...t.elementProps
|
|
500
500
|
}, a = r == null ? void 0 : r.class;
|
|
501
|
-
return a && (typeof a == "object" ? o.class =
|
|
501
|
+
return a && (typeof a == "object" ? o.class = ut(a) : ue(a) && a.indexOf(":") > 0 && (o.class = ut`
|
|
502
502
|
${a}
|
|
503
|
-
`)),
|
|
504
|
-
const c =
|
|
505
|
-
if (!(!c ||
|
|
506
|
-
if (
|
|
507
|
-
if (
|
|
503
|
+
`)), te((n = t.highConfig$) == null ? void 0 : n.registerPropsTrans, (u) => {
|
|
504
|
+
const c = m(r, u.name);
|
|
505
|
+
if (!(!c || Ee(c))) {
|
|
506
|
+
if (_(c)) {
|
|
507
|
+
if (ye(c, (l) => Ee(l)))
|
|
508
508
|
return;
|
|
509
|
-
|
|
509
|
+
se(o, u.name, et(e, c));
|
|
510
510
|
return;
|
|
511
511
|
}
|
|
512
|
-
!c.elementType || (u.isFun ?
|
|
513
|
-
const
|
|
512
|
+
!c.elementType || (u.isFun ? se(o, u.name, (...l) => {
|
|
513
|
+
const i = u.needParams ? {
|
|
514
514
|
...c.elementProps,
|
|
515
|
-
params$:
|
|
515
|
+
params$: l
|
|
516
516
|
} : c.elementProps;
|
|
517
|
-
return
|
|
517
|
+
return Ne(e, {
|
|
518
518
|
...c,
|
|
519
|
-
elementProps:
|
|
519
|
+
elementProps: i
|
|
520
520
|
});
|
|
521
|
-
}) :
|
|
521
|
+
}) : se(o, u.name, Ne(e, c)));
|
|
522
522
|
}
|
|
523
523
|
}), o;
|
|
524
|
-
},
|
|
525
|
-
const r =
|
|
526
|
-
return
|
|
524
|
+
}, Bt = (e, t) => {
|
|
525
|
+
const r = X(t.children) > 0 ? et(e, t.children) : void 0, o = t.childrenSlotName || "default", a = $(t.slots, r ? o : "");
|
|
526
|
+
return te(W(a), (n) => {
|
|
527
527
|
const u = a[n];
|
|
528
|
-
|
|
529
|
-
const
|
|
528
|
+
Qn(u) ? a[n] = (...c) => {
|
|
529
|
+
const l = u.needParams ? {
|
|
530
530
|
...u.elementProps,
|
|
531
531
|
params$: c
|
|
532
532
|
} : u.elementProps;
|
|
533
|
-
return
|
|
533
|
+
return Ne(e, {
|
|
534
534
|
...u,
|
|
535
|
-
elementProps:
|
|
535
|
+
elementProps: l
|
|
536
536
|
});
|
|
537
|
-
} : (
|
|
537
|
+
} : (ue(u) || Ge(u)) && (a[n] = () => u);
|
|
538
538
|
}), {
|
|
539
539
|
[o]: r ? () => r : void 0,
|
|
540
540
|
...a
|
|
541
541
|
};
|
|
542
|
-
},
|
|
543
|
-
const r =
|
|
542
|
+
}, Ne = (e, t) => {
|
|
543
|
+
const r = m(e, t.elementType) || t.elementType;
|
|
544
544
|
if (t.highConfig$)
|
|
545
|
-
return
|
|
545
|
+
return Ce(Zn, {
|
|
546
546
|
key: t.elementId,
|
|
547
547
|
elementMap: e,
|
|
548
548
|
elementConfig: t
|
|
549
549
|
});
|
|
550
|
-
const o =
|
|
551
|
-
return
|
|
550
|
+
const o = Bt(e, t), a = Ut(e, t);
|
|
551
|
+
return Ce(r, {
|
|
552
552
|
key: t.elementId,
|
|
553
553
|
...a
|
|
554
554
|
}, o);
|
|
555
|
-
},
|
|
555
|
+
}, Jn = (e) => _(e) ? cn(e) : ue(e) && e.indexOf(".") > 0 ? e.substring(0, e.indexOf(".")) : e, Zn = w({
|
|
556
556
|
props: {
|
|
557
557
|
elementMap: {
|
|
558
558
|
type: Object
|
|
@@ -562,49 +562,49 @@ const Kn = () => ({
|
|
|
562
562
|
}
|
|
563
563
|
},
|
|
564
564
|
setup: (e) => {
|
|
565
|
-
var
|
|
565
|
+
var S;
|
|
566
566
|
const {
|
|
567
567
|
state: t,
|
|
568
568
|
sendEvent: r,
|
|
569
569
|
execute: o
|
|
570
|
-
} =
|
|
570
|
+
} = ge(), {
|
|
571
571
|
elementMap: a,
|
|
572
572
|
elementConfig: n
|
|
573
|
-
} = e, u = n.highConfig$, c =
|
|
574
|
-
|
|
575
|
-
const
|
|
576
|
-
const
|
|
573
|
+
} = e, u = n.highConfig$, c = Ut(a, n);
|
|
574
|
+
te((S = n.highConfig$) == null ? void 0 : S.registerEventList, (p) => {
|
|
575
|
+
const y = (...N) => {
|
|
576
|
+
const s = `${n.elementId}-${p.name}`;
|
|
577
577
|
r({
|
|
578
|
-
type:
|
|
579
|
-
payload:
|
|
580
|
-
}), o(
|
|
581
|
-
},
|
|
582
|
-
c &&
|
|
578
|
+
type: s,
|
|
579
|
+
payload: N
|
|
580
|
+
}), o(p.executeList, N);
|
|
581
|
+
}, T = Mt(p.name, c);
|
|
582
|
+
c && Tt(T) && It(T, c) && se(c, T, y);
|
|
583
583
|
});
|
|
584
|
-
const
|
|
585
|
-
if (!u.registerStateList ||
|
|
584
|
+
const l = A(() => {
|
|
585
|
+
if (!u.registerStateList || X(u.registerStateList) <= 0)
|
|
586
586
|
return;
|
|
587
|
-
const
|
|
587
|
+
const p = {
|
|
588
588
|
...c
|
|
589
|
-
},
|
|
590
|
-
const
|
|
591
|
-
return
|
|
589
|
+
}, y = Y(u.registerStateList, (N) => !N.target || N.target === "prop"), T = D(y, (N) => {
|
|
590
|
+
const s = N.mapName || N.name, h = m(t, N.name);
|
|
591
|
+
return se(p, s, h), Jn(s);
|
|
592
592
|
});
|
|
593
|
-
return H(
|
|
594
|
-
}),
|
|
595
|
-
...
|
|
596
|
-
[
|
|
597
|
-
}), {}),
|
|
593
|
+
return H(p, T);
|
|
594
|
+
}), i = m(a, n.elementType) || n.elementType, b = Bt(a, n), g = ae(Y(u.registerStateList, (p) => p.target === "slot"), (p, y) => ({
|
|
595
|
+
...p,
|
|
596
|
+
[y.mapName]: () => m(t, y.name)
|
|
597
|
+
}), {}), f = {
|
|
598
598
|
...b,
|
|
599
599
|
...g
|
|
600
600
|
};
|
|
601
|
-
return () =>
|
|
601
|
+
return () => m(l.value, "show$") === !1 ? null : Ce(i, {
|
|
602
602
|
key: n.elementId,
|
|
603
603
|
...c,
|
|
604
|
-
|
|
605
|
-
},
|
|
604
|
+
...$(l.value, "show$")
|
|
605
|
+
}, f);
|
|
606
606
|
}
|
|
607
|
-
}),
|
|
607
|
+
}), U = {
|
|
608
608
|
TypographyKey: "Typography$",
|
|
609
609
|
LoadingKey: "Loading$",
|
|
610
610
|
RowKey: "Row$",
|
|
@@ -617,6 +617,7 @@ const Kn = () => ({
|
|
|
617
617
|
CheckboxKey: "Checkbox$",
|
|
618
618
|
MenusKey: "Menus$",
|
|
619
619
|
ModalKey: "Modal$",
|
|
620
|
+
ScrollKey: "Scroll$",
|
|
620
621
|
FormKey: "Form$",
|
|
621
622
|
FormItemKey: "FormItem$",
|
|
622
623
|
TableKey: "Table$",
|
|
@@ -627,14 +628,14 @@ const Kn = () => ({
|
|
|
627
628
|
ProTableKey: "ProTable$",
|
|
628
629
|
ProCurdKey: "ProCurd$",
|
|
629
630
|
ProListKey: "ProList$"
|
|
630
|
-
},
|
|
631
|
-
const { elementMap: e } =
|
|
632
|
-
return (t) =>
|
|
631
|
+
}, Q = () => {
|
|
632
|
+
const { elementMap: e } = ne();
|
|
633
|
+
return (t) => m(e, t);
|
|
633
634
|
};
|
|
634
|
-
function
|
|
635
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
635
|
+
function er(e) {
|
|
636
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ee(e);
|
|
636
637
|
}
|
|
637
|
-
const
|
|
638
|
+
const tr = () => ({
|
|
638
639
|
row: {
|
|
639
640
|
type: Object,
|
|
640
641
|
default: void 0
|
|
@@ -645,15 +646,15 @@ const Zn = () => ({
|
|
|
645
646
|
items: {
|
|
646
647
|
type: Array
|
|
647
648
|
}
|
|
648
|
-
}),
|
|
649
|
+
}), Pe = w({
|
|
649
650
|
props: {
|
|
650
|
-
...
|
|
651
|
+
...tr()
|
|
651
652
|
},
|
|
652
653
|
setup: (e) => {
|
|
653
|
-
const t =
|
|
654
|
+
const t = Q(), r = t(U.RowKey), o = t(U.ColKey);
|
|
654
655
|
return () => {
|
|
655
656
|
let a;
|
|
656
|
-
return !r || !o ? null :
|
|
657
|
+
return !r || !o ? null : d(r, e.row, er(a = D(e.items, (n) => d(o, x({
|
|
657
658
|
key: n.rowKey
|
|
658
659
|
}, e.col, n.col), {
|
|
659
660
|
default: () => [n.vNode]
|
|
@@ -662,27 +663,27 @@ const Zn = () => ({
|
|
|
662
663
|
});
|
|
663
664
|
};
|
|
664
665
|
}
|
|
665
|
-
}),
|
|
666
|
+
}), nr = (e, t, r) => {
|
|
666
667
|
if (t) {
|
|
667
668
|
const o = Y(W(t), (a) => !t[a]);
|
|
668
|
-
return
|
|
669
|
+
return $(e, o);
|
|
669
670
|
}
|
|
670
671
|
if (r) {
|
|
671
672
|
const o = Y(W(r), (a) => !r[a](e));
|
|
672
|
-
return
|
|
673
|
+
return $(e, o);
|
|
673
674
|
}
|
|
674
675
|
return e;
|
|
675
|
-
},
|
|
676
|
+
}, qt = (e) => {
|
|
676
677
|
if (!!e)
|
|
677
|
-
return
|
|
678
|
-
},
|
|
679
|
-
const a = z(r) ? r(o) :
|
|
680
|
-
return !n ||
|
|
681
|
-
if (
|
|
678
|
+
return _(e) ? e : e && ue(e) && e.indexOf(".") > 0 ? sn(e, ".") : [e];
|
|
679
|
+
}, na = (e, t, r) => !t || !r ? e : D(e, (o) => {
|
|
680
|
+
const a = z(r) ? r(o) : m(o, r), n = m(t, a);
|
|
681
|
+
return !n || St(n) || z(n) || !Me(n) ? o : ln(o, n, (u, c) => {
|
|
682
|
+
if (_(u) || _(c))
|
|
682
683
|
return c;
|
|
683
684
|
});
|
|
684
|
-
}),
|
|
685
|
-
const r =
|
|
685
|
+
}), Se = (e, t) => {
|
|
686
|
+
const r = ae(
|
|
686
687
|
e,
|
|
687
688
|
(o, a) => ({
|
|
688
689
|
...o,
|
|
@@ -694,20 +695,20 @@ const Zn = () => ({
|
|
|
694
695
|
{}
|
|
695
696
|
);
|
|
696
697
|
return r.originRef = t, r;
|
|
697
|
-
},
|
|
698
|
+
}, ra = (e, t, r) => {
|
|
698
699
|
const o = { originRef: e, ...r };
|
|
699
|
-
return t &&
|
|
700
|
+
return t && X(t) > 0 && te(t, (a) => {
|
|
700
701
|
o[a] = (...n) => {
|
|
701
702
|
var u, c;
|
|
702
703
|
return (c = (u = e.value) == null ? void 0 : u[a]) == null ? void 0 : c.call(u, ...n);
|
|
703
704
|
};
|
|
704
705
|
}), o;
|
|
705
|
-
},
|
|
706
|
-
const r = W(e), o = `${t}-`, a = Y(r, (u) =>
|
|
707
|
-
return
|
|
708
|
-
},
|
|
709
|
-
|
|
710
|
-
},
|
|
706
|
+
}, rr = (e, t) => m(e, ["extra", t]) || m(e, t), ie = (e, t) => {
|
|
707
|
+
const r = W(e), o = `${t}-`, a = Y(r, (u) => dn(u, o)), n = H(e, a);
|
|
708
|
+
return fn(n, (u, c) => c.replace(o, ""));
|
|
709
|
+
}, Vt = Symbol("pro-form-list"), zt = () => he(Vt), Ht = (e) => {
|
|
710
|
+
ve(Vt, e);
|
|
711
|
+
}, ar = w({
|
|
711
712
|
props: {
|
|
712
713
|
pathList: {
|
|
713
714
|
type: Array
|
|
@@ -715,13 +716,13 @@ const Zn = () => ({
|
|
|
715
716
|
},
|
|
716
717
|
setup: (e, {
|
|
717
718
|
slots: t
|
|
718
|
-
}) => (
|
|
719
|
+
}) => (Ht({
|
|
719
720
|
pathList: e.pathList
|
|
720
721
|
}), () => {
|
|
721
722
|
var r;
|
|
722
723
|
return (r = t.default) == null ? void 0 : r.call(t);
|
|
723
724
|
})
|
|
724
|
-
}),
|
|
725
|
+
}), st = () => ({
|
|
725
726
|
rowKey: {
|
|
726
727
|
type: String,
|
|
727
728
|
default: "id"
|
|
@@ -758,120 +759,120 @@ const Zn = () => ({
|
|
|
758
759
|
onRemove: {
|
|
759
760
|
type: Function
|
|
760
761
|
}
|
|
761
|
-
}),
|
|
762
|
+
}), aa = w({
|
|
762
763
|
props: {
|
|
763
|
-
...
|
|
764
|
-
|
|
764
|
+
...st(),
|
|
765
|
+
...$(Pe.props, "items")
|
|
765
766
|
},
|
|
766
767
|
setup: (e, {
|
|
767
768
|
slots: t
|
|
768
769
|
}) => {
|
|
769
|
-
const o =
|
|
770
|
+
const o = Q()(U.FormItemKey), {
|
|
770
771
|
formState: a,
|
|
771
772
|
readonly: n,
|
|
772
773
|
elementMap: u,
|
|
773
774
|
formElementMap: c
|
|
774
|
-
} =
|
|
775
|
-
var
|
|
776
|
-
if (((
|
|
775
|
+
} = Gt(), l = zt(), i = qt(e.name), b = l != null && l.pathList ? [...l.pathList, ...i] : i, [g, f] = Nt(), S = () => {
|
|
776
|
+
var E;
|
|
777
|
+
if (((E = e.onPreAdd) == null ? void 0 : E.call(e)) === !0)
|
|
777
778
|
return;
|
|
778
|
-
const
|
|
779
|
-
let
|
|
780
|
-
|
|
779
|
+
const h = () => {
|
|
780
|
+
let I = m(a, b);
|
|
781
|
+
_(I) || (I = []), I.push({
|
|
781
782
|
[e.rowKey]: new Date().valueOf()
|
|
782
|
-
}),
|
|
783
|
+
}), se(a, b, I);
|
|
783
784
|
};
|
|
784
785
|
if (e.onAdd) {
|
|
785
|
-
e.onAdd(
|
|
786
|
+
e.onAdd(h);
|
|
786
787
|
return;
|
|
787
788
|
}
|
|
788
|
-
|
|
789
|
-
},
|
|
790
|
-
var
|
|
791
|
-
if (((
|
|
792
|
-
index:
|
|
793
|
-
item:
|
|
789
|
+
h();
|
|
790
|
+
}, p = (s, h) => {
|
|
791
|
+
var M;
|
|
792
|
+
if (((M = e.onPreRemove) == null ? void 0 : M.call(e, {
|
|
793
|
+
index: s,
|
|
794
|
+
item: h
|
|
794
795
|
})) === !0)
|
|
795
796
|
return;
|
|
796
|
-
const
|
|
797
|
-
const
|
|
798
|
-
|
|
797
|
+
const I = () => {
|
|
798
|
+
const R = m(a, b);
|
|
799
|
+
X(R) <= 0 || (R.splice(s, 1), f());
|
|
799
800
|
};
|
|
800
801
|
if (e.onRemove) {
|
|
801
|
-
e.onRemove(
|
|
802
|
-
index:
|
|
803
|
-
item:
|
|
802
|
+
e.onRemove(I, {
|
|
803
|
+
index: s,
|
|
804
|
+
item: h
|
|
804
805
|
});
|
|
805
806
|
return;
|
|
806
807
|
}
|
|
807
|
-
|
|
808
|
-
},
|
|
809
|
-
const
|
|
810
|
-
return
|
|
811
|
-
item:
|
|
808
|
+
I();
|
|
809
|
+
}, y = (s, h) => {
|
|
810
|
+
const E = le(s);
|
|
811
|
+
return E && t[E] ? t[E]({
|
|
812
|
+
item: s,
|
|
812
813
|
formState: a,
|
|
813
|
-
pathList:
|
|
814
|
-
}) :
|
|
815
|
-
},
|
|
816
|
-
if (!c ||
|
|
814
|
+
pathList: h
|
|
815
|
+
}) : kt(u, c, s);
|
|
816
|
+
}, T = (s, h) => {
|
|
817
|
+
if (!c || X(e.columns) <= 0)
|
|
817
818
|
return null;
|
|
818
819
|
if (!e.row)
|
|
819
|
-
return
|
|
820
|
-
const
|
|
821
|
-
rowKey:
|
|
822
|
-
vNode:
|
|
823
|
-
col:
|
|
820
|
+
return D(e.columns, (I) => y(I, s));
|
|
821
|
+
const E = D(e.columns, (I) => ({
|
|
822
|
+
rowKey: le(I),
|
|
823
|
+
vNode: y(I, s),
|
|
824
|
+
col: m(I, ["extra", "col"])
|
|
824
825
|
}));
|
|
825
|
-
return
|
|
826
|
+
return d(Pe, {
|
|
826
827
|
row: e.row,
|
|
827
828
|
col: e.col,
|
|
828
|
-
items:
|
|
829
|
+
items: E
|
|
829
830
|
}, null);
|
|
830
|
-
},
|
|
831
|
-
return () => o ?
|
|
831
|
+
}, N = W(st());
|
|
832
|
+
return () => o ? d(o, x({
|
|
832
833
|
class: `pro-form-list ${e.inline ? "pro-form-list-inline" : ""}`,
|
|
833
834
|
name: e.name
|
|
834
|
-
},
|
|
835
|
+
}, $(e, N)), {
|
|
835
836
|
default: () => {
|
|
836
|
-
var
|
|
837
|
-
return [
|
|
838
|
-
const
|
|
839
|
-
return
|
|
840
|
-
key:
|
|
841
|
-
pathList:
|
|
837
|
+
var s, h;
|
|
838
|
+
return [D(m(a, b), (E, I) => {
|
|
839
|
+
const M = [...b, I];
|
|
840
|
+
return d(ar, {
|
|
841
|
+
key: E[e.rowKey] + g.value,
|
|
842
|
+
pathList: M
|
|
842
843
|
}, {
|
|
843
844
|
default: () => {
|
|
844
|
-
var
|
|
845
|
-
return [
|
|
845
|
+
var R, L, B, G, J, v;
|
|
846
|
+
return [d("div", {
|
|
846
847
|
class: "pro-form-list-item"
|
|
847
|
-
}, [(
|
|
848
|
+
}, [(R = t.start) == null ? void 0 : R.call(t, {
|
|
848
849
|
state: a,
|
|
849
850
|
path: b,
|
|
850
|
-
index:
|
|
851
|
-
}),
|
|
851
|
+
index: I
|
|
852
|
+
}), T(M), (L = t.default) == null ? void 0 : L.call(t), !n.value && d(de, null, [d("div", {
|
|
852
853
|
class: "pro-form-list-item-add",
|
|
853
|
-
onClick:
|
|
854
|
-
}, [((
|
|
854
|
+
onClick: S
|
|
855
|
+
}, [((B = t.itemAdd) == null ? void 0 : B.call(t)) || ((G = e.renderItemAdd) == null ? void 0 : G.call(e))]), d("div", {
|
|
855
856
|
class: "pro-form-list-item-minus",
|
|
856
|
-
onClick: () =>
|
|
857
|
-
}, [((
|
|
857
|
+
onClick: () => p(I, E)
|
|
858
|
+
}, [((J = t.itemMinus) == null ? void 0 : J.call(t)) || ((v = e.renderItemMinus) == null ? void 0 : v.call(e))])])])];
|
|
858
859
|
}
|
|
859
860
|
});
|
|
860
|
-
}), !n.value &&
|
|
861
|
+
}), !n.value && d("div", {
|
|
861
862
|
class: "pro-form-list-add",
|
|
862
|
-
onClick:
|
|
863
|
-
}, [((
|
|
863
|
+
onClick: S
|
|
864
|
+
}, [((s = t.add) == null ? void 0 : s.call(t)) || ((h = e.renderAdd) == null ? void 0 : h.call(e))])];
|
|
864
865
|
}
|
|
865
866
|
}) : null;
|
|
866
867
|
}
|
|
867
|
-
}),
|
|
868
|
-
|
|
868
|
+
}), Wt = Symbol("pro-form"), Gt = () => he(Wt), or = (e, t = 300, r) => Pt(e, t, r), ur = (e) => {
|
|
869
|
+
ve(Wt, e);
|
|
869
870
|
};
|
|
870
|
-
let
|
|
871
|
+
let re;
|
|
871
872
|
(function(e) {
|
|
872
873
|
e.RESET = "RESET", e.SUBMIT = "SUBMIT", e.CONTINUE = "CONTINUE";
|
|
873
|
-
})(
|
|
874
|
-
const
|
|
874
|
+
})(re || (re = {}));
|
|
875
|
+
const lt = () => ({
|
|
875
876
|
clsName: {
|
|
876
877
|
type: String,
|
|
877
878
|
default: "pro-form"
|
|
@@ -921,12 +922,12 @@ const ct = () => ({
|
|
|
921
922
|
type: Function,
|
|
922
923
|
default: void 0
|
|
923
924
|
}
|
|
924
|
-
}),
|
|
925
|
+
}), oa = w({
|
|
925
926
|
inheritAttrs: !1,
|
|
926
927
|
props: {
|
|
927
|
-
...
|
|
928
|
-
...
|
|
929
|
-
|
|
928
|
+
...be,
|
|
929
|
+
...lt(),
|
|
930
|
+
...$(Pe.props, "items")
|
|
930
931
|
},
|
|
931
932
|
setup: (e, {
|
|
932
933
|
slots: t,
|
|
@@ -937,116 +938,125 @@ const ct = () => ({
|
|
|
937
938
|
const {
|
|
938
939
|
elementMap: n,
|
|
939
940
|
formElementMap: u
|
|
940
|
-
} =
|
|
941
|
-
const
|
|
942
|
-
return e.convertColumn ?
|
|
943
|
-
}),
|
|
944
|
-
var
|
|
945
|
-
((
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
},
|
|
950
|
-
|
|
951
|
-
|
|
941
|
+
} = ne(), c = e.elementMap || n, l = e.formElementMap || u, i = e.model || Oe({}), b = Be(i, e.showStateRules, e.showState), g = Be(i, e.readonlyStateRules, e.readonlyState), f = Be(i, e.disableStateRules, e.disableState), S = A(() => e.readonly), p = A(() => {
|
|
942
|
+
const O = ke(e.columns, e.columnState, e.columnState2);
|
|
943
|
+
return e.convertColumn ? At(O, e.convertColumn) : O;
|
|
944
|
+
}), y = V(!1), T = V(0), N = (...O) => {
|
|
945
|
+
var ee;
|
|
946
|
+
((ee = e.onPreFinish) == null ? void 0 : ee.call(e, ...O)) !== !0 && r("finish", ...O, {
|
|
947
|
+
userOpe: y,
|
|
948
|
+
asyncNum: T
|
|
949
|
+
});
|
|
950
|
+
}, s = e.debounceSubmit, h = (typeof s == "object" ? s.wait : s) || 300, E = or((...O) => N(...O), h, s == null ? void 0 : s.options), I = (O) => {
|
|
951
|
+
const K = nr(O, b, e.showStateRules);
|
|
952
|
+
s !== void 0 ? E(K, O) : N(K, O);
|
|
953
|
+
}, M = V();
|
|
954
|
+
o({
|
|
955
|
+
...Se(e.formMethods || [], M),
|
|
956
|
+
userOpe: y,
|
|
957
|
+
asyncNum: T
|
|
958
|
+
}), ur({
|
|
959
|
+
formState: i,
|
|
952
960
|
showState: b,
|
|
953
961
|
readonlyState: g,
|
|
954
|
-
disableState:
|
|
962
|
+
disableState: f,
|
|
955
963
|
elementMap: c,
|
|
956
|
-
formElementMap:
|
|
957
|
-
readonly:
|
|
958
|
-
columns:
|
|
959
|
-
formRef:
|
|
964
|
+
formElementMap: l,
|
|
965
|
+
readonly: S,
|
|
966
|
+
columns: p,
|
|
967
|
+
formRef: M,
|
|
968
|
+
userOpe: y,
|
|
969
|
+
asyncNum: T,
|
|
960
970
|
...e.provideExtra
|
|
961
|
-
}),
|
|
962
|
-
const
|
|
963
|
-
value:
|
|
971
|
+
}), Ht({});
|
|
972
|
+
const R = [{
|
|
973
|
+
value: re.RESET,
|
|
964
974
|
label: "\u91CD\u7F6E"
|
|
965
975
|
}, {
|
|
966
|
-
value:
|
|
976
|
+
value: re.SUBMIT,
|
|
967
977
|
label: "\u63D0\u4EA4",
|
|
968
978
|
extraProps: {
|
|
969
979
|
type: "primary"
|
|
970
980
|
}
|
|
971
|
-
}],
|
|
972
|
-
var
|
|
973
|
-
if ((
|
|
981
|
+
}], L = () => {
|
|
982
|
+
var O, K;
|
|
983
|
+
if ((O = e.operate) != null && O.onReset) {
|
|
974
984
|
e.operate.onReset({
|
|
975
|
-
form:
|
|
985
|
+
form: M.value
|
|
976
986
|
});
|
|
977
987
|
return;
|
|
978
988
|
}
|
|
979
|
-
(
|
|
980
|
-
},
|
|
981
|
-
var
|
|
982
|
-
if ((
|
|
989
|
+
(K = M.value) == null || K.resetFields();
|
|
990
|
+
}, B = () => {
|
|
991
|
+
var O, K;
|
|
992
|
+
if ((O = e.operate) != null && O.onSubmit) {
|
|
983
993
|
e.operate.onSubmit({
|
|
984
|
-
form:
|
|
994
|
+
form: M.value
|
|
985
995
|
});
|
|
986
996
|
return;
|
|
987
997
|
}
|
|
988
|
-
(
|
|
989
|
-
},
|
|
990
|
-
var
|
|
991
|
-
(
|
|
992
|
-
form:
|
|
998
|
+
(K = M.value) == null || K.submit();
|
|
999
|
+
}, G = () => {
|
|
1000
|
+
var O, K;
|
|
1001
|
+
(K = (O = e.operate) == null ? void 0 : O.onContinue) == null || K.call(O, {
|
|
1002
|
+
form: M.value
|
|
993
1003
|
});
|
|
994
|
-
},
|
|
995
|
-
[
|
|
996
|
-
[
|
|
997
|
-
[
|
|
998
|
-
},
|
|
999
|
-
const
|
|
1000
|
-
return
|
|
1001
|
-
...
|
|
1002
|
-
onClick:
|
|
1003
|
-
} :
|
|
1004
|
-
}),
|
|
1005
|
-
var
|
|
1004
|
+
}, J = {
|
|
1005
|
+
[re.RESET]: L,
|
|
1006
|
+
[re.SUBMIT]: B,
|
|
1007
|
+
[re.CONTINUE]: G
|
|
1008
|
+
}, v = A(() => {
|
|
1009
|
+
const O = e.operate, K = (O == null ? void 0 : O.items) || R;
|
|
1010
|
+
return D(K, (ee) => !ee.onClick && !m(O == null ? void 0 : O.itemState, [ee.value, "onClick"]) ? {
|
|
1011
|
+
...ee,
|
|
1012
|
+
onClick: m(J, ee.value)
|
|
1013
|
+
} : ee);
|
|
1014
|
+
}), P = A(() => {
|
|
1015
|
+
var O;
|
|
1006
1016
|
return {
|
|
1007
|
-
[
|
|
1008
|
-
value:
|
|
1017
|
+
[re.SUBMIT]: {
|
|
1018
|
+
value: re.SUBMIT,
|
|
1009
1019
|
loading: e.submitLoading
|
|
1010
1020
|
},
|
|
1011
|
-
...(
|
|
1021
|
+
...(O = e.operate) == null ? void 0 : O.itemState
|
|
1012
1022
|
};
|
|
1013
|
-
}),
|
|
1014
|
-
const
|
|
1015
|
-
return
|
|
1016
|
-
},
|
|
1017
|
-
const
|
|
1018
|
-
const
|
|
1019
|
-
return !!
|
|
1023
|
+
}), C = (O) => {
|
|
1024
|
+
const K = le(O);
|
|
1025
|
+
return K && t[K] ? t[K](O, i) : kt(c, l, O);
|
|
1026
|
+
}, j = A(() => {
|
|
1027
|
+
const O = Y(p.value, (K) => {
|
|
1028
|
+
const ee = le(K);
|
|
1029
|
+
return !!m(b, ee, !0);
|
|
1020
1030
|
});
|
|
1021
|
-
return e.row ?
|
|
1022
|
-
rowKey:
|
|
1023
|
-
vNode:
|
|
1024
|
-
col:
|
|
1025
|
-
})) :
|
|
1026
|
-
}),
|
|
1027
|
-
return () =>
|
|
1028
|
-
ref:
|
|
1031
|
+
return e.row ? D(O, (K) => ({
|
|
1032
|
+
rowKey: le(K),
|
|
1033
|
+
vNode: C(K),
|
|
1034
|
+
col: m(K, ["extra", "col"])
|
|
1035
|
+
})) : D(O, (K) => C(K));
|
|
1036
|
+
}), Z = [...W(lt()), ...W(be)], q = W($(Pe.props, "items")), fe = m(n, U.FormKey);
|
|
1037
|
+
return () => fe ? d(fe, x({
|
|
1038
|
+
ref: M,
|
|
1029
1039
|
class: e.clsName
|
|
1030
|
-
},
|
|
1031
|
-
model:
|
|
1032
|
-
onFinish:
|
|
1040
|
+
}, $(a, "onFinish"), $(e, ...Z, ...q, "onFinish", "operate"), {
|
|
1041
|
+
model: i,
|
|
1042
|
+
onFinish: I
|
|
1033
1043
|
}), {
|
|
1034
1044
|
default: () => {
|
|
1035
|
-
var
|
|
1036
|
-
return [(
|
|
1045
|
+
var O, K, ee;
|
|
1046
|
+
return [(O = t.start) == null ? void 0 : O.call(t), l && X(p.value) > 0 && d(de, null, [e.row ? d(Pe, {
|
|
1037
1047
|
row: e.row,
|
|
1038
1048
|
col: e.col,
|
|
1039
|
-
items:
|
|
1040
|
-
}, null) :
|
|
1049
|
+
items: j.value
|
|
1050
|
+
}, null) : j.value]), (K = t.default) == null ? void 0 : K.call(t), e.operate && d(Jt, x({
|
|
1041
1051
|
class: `${e.clsName}-operate`
|
|
1042
|
-
},
|
|
1043
|
-
items:
|
|
1044
|
-
itemState:
|
|
1045
|
-
}), null), (
|
|
1052
|
+
}, $(e.operate, "items", "itemState", "onReset", "onSubmit", "onContinue"), {
|
|
1053
|
+
items: v.value,
|
|
1054
|
+
itemState: P.value
|
|
1055
|
+
}), null), (ee = t.end) == null ? void 0 : ee.call(t)];
|
|
1046
1056
|
}
|
|
1047
1057
|
}) : null;
|
|
1048
1058
|
}
|
|
1049
|
-
}),
|
|
1059
|
+
}), ua = {
|
|
1050
1060
|
text: "\u8BF7\u8F93\u5165",
|
|
1051
1061
|
digit: "\u8BF7\u8F93\u5165",
|
|
1052
1062
|
select: "\u8BF7\u9009\u62E9",
|
|
@@ -1058,18 +1068,18 @@ const ct = () => ({
|
|
|
1058
1068
|
date: "\u8BF7\u9009\u62E9",
|
|
1059
1069
|
time: "\u8BF7\u9009\u62E9"
|
|
1060
1070
|
};
|
|
1061
|
-
let
|
|
1071
|
+
let je;
|
|
1062
1072
|
(function(e) {
|
|
1063
1073
|
e.AUTO = "AUTO", e.MANUAL = "MANUAL";
|
|
1064
|
-
})(
|
|
1065
|
-
const
|
|
1074
|
+
})(je || (je = {}));
|
|
1075
|
+
const it = () => ({
|
|
1066
1076
|
initEmit: {
|
|
1067
1077
|
type: Boolean,
|
|
1068
1078
|
default: !0
|
|
1069
1079
|
},
|
|
1070
1080
|
searchMode: {
|
|
1071
1081
|
type: String,
|
|
1072
|
-
default:
|
|
1082
|
+
default: je.AUTO
|
|
1073
1083
|
},
|
|
1074
1084
|
debounceKeys: {
|
|
1075
1085
|
type: Array
|
|
@@ -1082,9 +1092,9 @@ const st = () => ({
|
|
|
1082
1092
|
type: Number,
|
|
1083
1093
|
default: 800
|
|
1084
1094
|
}
|
|
1085
|
-
}),
|
|
1095
|
+
}), ca = w({
|
|
1086
1096
|
props: {
|
|
1087
|
-
...
|
|
1097
|
+
...it(),
|
|
1088
1098
|
needRules: {
|
|
1089
1099
|
type: Boolean,
|
|
1090
1100
|
default: !1
|
|
@@ -1094,44 +1104,44 @@ const st = () => ({
|
|
|
1094
1104
|
slots: t,
|
|
1095
1105
|
expose: r
|
|
1096
1106
|
}) => {
|
|
1097
|
-
const a =
|
|
1098
|
-
const
|
|
1099
|
-
return u.has(
|
|
1100
|
-
}), (
|
|
1101
|
-
...
|
|
1102
|
-
formItemProps:
|
|
1103
|
-
}))),
|
|
1104
|
-
r(
|
|
1107
|
+
const a = Q()(U.ProFormKey), n = e.model || Oe({}), u = new Set(e.debounceTypes), c = D(Y(e.columns, (y) => {
|
|
1108
|
+
const T = jt(y);
|
|
1109
|
+
return u.has(T);
|
|
1110
|
+
}), (y) => le(y)), l = A(() => D(e.columns, (y) => ({
|
|
1111
|
+
...y,
|
|
1112
|
+
formItemProps: $(y.formItemProps, "required")
|
|
1113
|
+
}))), i = V(), b = e.formMethods || [];
|
|
1114
|
+
r(Se(b, i));
|
|
1105
1115
|
const g = () => {
|
|
1106
|
-
var
|
|
1107
|
-
(
|
|
1108
|
-
},
|
|
1116
|
+
var y;
|
|
1117
|
+
(y = i.value) == null || y.submit();
|
|
1118
|
+
}, f = Pt(() => {
|
|
1109
1119
|
g();
|
|
1110
1120
|
}, e.debounceTime);
|
|
1111
|
-
|
|
1121
|
+
ce(() => {
|
|
1112
1122
|
e.initEmit && g();
|
|
1113
1123
|
}, []);
|
|
1114
|
-
const
|
|
1115
|
-
|
|
1116
|
-
if (e.searchMode !==
|
|
1124
|
+
const S = (y, T, N) => ye(N, (s) => m(y, s) !== m(T, s));
|
|
1125
|
+
Ot((y, T) => {
|
|
1126
|
+
if (e.searchMode !== je.AUTO)
|
|
1117
1127
|
return;
|
|
1118
|
-
const
|
|
1119
|
-
if (
|
|
1120
|
-
|
|
1128
|
+
const N = X(e.debounceKeys) > 0 ? e.debounceKeys : c;
|
|
1129
|
+
if (X(N) > 0 && S(y, T, N)) {
|
|
1130
|
+
f();
|
|
1121
1131
|
return;
|
|
1122
1132
|
}
|
|
1123
1133
|
g();
|
|
1124
|
-
}, () =>
|
|
1125
|
-
const
|
|
1126
|
-
return () => a ?
|
|
1127
|
-
ref:
|
|
1134
|
+
}, () => mn(n));
|
|
1135
|
+
const p = W(it());
|
|
1136
|
+
return () => a ? d(a, x({
|
|
1137
|
+
ref: i,
|
|
1128
1138
|
class: "pro-search-form"
|
|
1129
|
-
},
|
|
1130
|
-
columns:
|
|
1139
|
+
}, $(e, p, "columns"), {
|
|
1140
|
+
columns: l.value,
|
|
1131
1141
|
model: n
|
|
1132
1142
|
}), t) : null;
|
|
1133
1143
|
}
|
|
1134
|
-
}),
|
|
1144
|
+
}), dt = () => ({
|
|
1135
1145
|
readonly: {
|
|
1136
1146
|
type: Boolean,
|
|
1137
1147
|
default: void 0
|
|
@@ -1145,130 +1155,131 @@ const st = () => ({
|
|
|
1145
1155
|
slots: {
|
|
1146
1156
|
type: Object
|
|
1147
1157
|
}
|
|
1148
|
-
}),
|
|
1158
|
+
}), sa = (e, t) => ({
|
|
1149
1159
|
InputComp: r,
|
|
1150
1160
|
valueType: o,
|
|
1151
1161
|
name: a
|
|
1152
|
-
}) =>
|
|
1162
|
+
}) => w({
|
|
1153
1163
|
name: a,
|
|
1154
1164
|
props: {
|
|
1155
1165
|
...e.props,
|
|
1156
|
-
...
|
|
1166
|
+
...dt()
|
|
1157
1167
|
},
|
|
1158
1168
|
setup: (n, {
|
|
1159
1169
|
slots: u
|
|
1160
1170
|
}) => {
|
|
1161
1171
|
const {
|
|
1162
1172
|
formExtraMap: c,
|
|
1163
|
-
elementMap:
|
|
1164
|
-
} =
|
|
1165
|
-
formState:
|
|
1173
|
+
elementMap: l
|
|
1174
|
+
} = ne(), {
|
|
1175
|
+
formState: i,
|
|
1166
1176
|
readonlyState: b,
|
|
1167
1177
|
disableState: g,
|
|
1168
|
-
readonly:
|
|
1169
|
-
|
|
1178
|
+
readonly: f,
|
|
1179
|
+
userOpe: S
|
|
1180
|
+
} = Gt(), p = zt(), y = A(() => Te(n.readonly) ? n.readonly : Te(b[n.name]) ? b[n.name] : f.value), T = () => `${m(c == null ? void 0 : c.rulePrefixMap, o) || "\u8BF7\u8F93\u5165"}${n.label || ""}`, N = A(() => c != null && c.rulePrefixMap ? n.required === !0 && !n.rules ? [{
|
|
1170
1181
|
required: !0,
|
|
1171
|
-
message:
|
|
1172
|
-
}] : n.rules ?
|
|
1173
|
-
|
|
1174
|
-
},
|
|
1175
|
-
const
|
|
1182
|
+
message: T()
|
|
1183
|
+
}] : n.rules ? D(n.rules, (L) => (L.required && !L.message && (L.message = T()), L)) : n.rules : n.rules), s = qt(n.name), h = p != null && p.pathList ? [...p.pathList, ...s] : s, E = (L) => {
|
|
1184
|
+
S.value = !0, se(i, h, L);
|
|
1185
|
+
}, I = W(dt()), M = () => {
|
|
1186
|
+
const L = m(i, h);
|
|
1176
1187
|
if (u.renderShow)
|
|
1177
1188
|
return u.renderShow({
|
|
1178
|
-
value:
|
|
1179
|
-
record:
|
|
1180
|
-
path:
|
|
1189
|
+
value: L,
|
|
1190
|
+
record: i,
|
|
1191
|
+
path: h
|
|
1181
1192
|
});
|
|
1182
|
-
const
|
|
1183
|
-
return
|
|
1184
|
-
value:
|
|
1193
|
+
const B = m(l, o);
|
|
1194
|
+
return B ? d(B, x({
|
|
1195
|
+
value: L
|
|
1185
1196
|
}, n.fieldProps, {
|
|
1186
1197
|
showProps: n.showProps
|
|
1187
|
-
}), u) :
|
|
1188
|
-
},
|
|
1189
|
-
const
|
|
1198
|
+
}), u) : d("span", null, [L]);
|
|
1199
|
+
}, R = () => {
|
|
1200
|
+
const L = m(i, h), B = m(g, h);
|
|
1190
1201
|
return u.renderInput ? u.renderInput({
|
|
1191
|
-
value:
|
|
1192
|
-
setValue:
|
|
1193
|
-
disabled:
|
|
1194
|
-
record:
|
|
1195
|
-
path:
|
|
1196
|
-
}) :
|
|
1202
|
+
value: L,
|
|
1203
|
+
setValue: E,
|
|
1204
|
+
disabled: B,
|
|
1205
|
+
record: i,
|
|
1206
|
+
path: h
|
|
1207
|
+
}) : d(r, x(t(L, E, B), n.fieldProps), u);
|
|
1197
1208
|
};
|
|
1198
|
-
return () =>
|
|
1209
|
+
return () => d(e, x({
|
|
1199
1210
|
class: "pro-form-item"
|
|
1200
|
-
},
|
|
1201
|
-
name:
|
|
1202
|
-
rules:
|
|
1211
|
+
}, $(n, ...I, "name", "rules"), {
|
|
1212
|
+
name: h,
|
|
1213
|
+
rules: N.value
|
|
1203
1214
|
}), {
|
|
1204
|
-
default: () => [
|
|
1215
|
+
default: () => [y.value ? M() : R()],
|
|
1205
1216
|
...n.slots
|
|
1206
1217
|
});
|
|
1207
1218
|
}
|
|
1208
|
-
}),
|
|
1209
|
-
const [e, t] =
|
|
1219
|
+
}), Xt = Dn("access", void 0, !0), cr = () => {
|
|
1220
|
+
const [e, t] = Xt();
|
|
1210
1221
|
return { access: e, setAccess: t, delAccess: () => {
|
|
1211
1222
|
t(void 0);
|
|
1212
1223
|
} };
|
|
1213
|
-
},
|
|
1214
|
-
const [e, t] =
|
|
1224
|
+
}, la = () => {
|
|
1225
|
+
const [e, t] = Xt();
|
|
1215
1226
|
return [e, t, () => {
|
|
1216
1227
|
t(void 0);
|
|
1217
1228
|
}];
|
|
1218
|
-
},
|
|
1219
|
-
const [r, o] =
|
|
1220
|
-
return
|
|
1229
|
+
}, _t = Symbol("logon-user"), sr = () => he(_t), ia = w((e, { slots: t }) => {
|
|
1230
|
+
const [r, o] = rt(), [a, n] = rt();
|
|
1231
|
+
return ve(_t, { user: r, setUser: o, per: a, setPer: n, opts: {} }), () => {
|
|
1221
1232
|
var c;
|
|
1222
1233
|
return (c = t.default) == null ? void 0 : c.call(t);
|
|
1223
1234
|
};
|
|
1224
|
-
}),
|
|
1225
|
-
const { access: o } =
|
|
1226
|
-
return
|
|
1235
|
+
}), da = w((e, { slots: t, emit: r }) => {
|
|
1236
|
+
const { access: o } = cr(), a = A(() => o && o.token);
|
|
1237
|
+
return ce(() => {
|
|
1227
1238
|
a.value || r("toLogin");
|
|
1228
1239
|
}, a), () => {
|
|
1229
1240
|
var n;
|
|
1230
1241
|
return a.value ? (n = t.default) == null ? void 0 : n.call(t) : null;
|
|
1231
1242
|
};
|
|
1232
|
-
}),
|
|
1243
|
+
}), fa = {
|
|
1233
1244
|
Add: "add",
|
|
1234
1245
|
Edit: "edit",
|
|
1235
1246
|
Delete: "delete"
|
|
1236
|
-
},
|
|
1237
|
-
const { per: e } =
|
|
1247
|
+
}, lr = (e, t) => !e || !t ? !1 : _(t) ? ye(t, (r) => e[r]) : e[t], Yt = () => {
|
|
1248
|
+
const { per: e } = sr() || { per: { menus: [], buttonMap: {} } }, t = Ye();
|
|
1238
1249
|
return (r, o) => {
|
|
1239
1250
|
if (!r)
|
|
1240
1251
|
return !1;
|
|
1241
1252
|
let a = r;
|
|
1242
1253
|
if (o != null && o.suffix) {
|
|
1243
1254
|
const n = t.name ? t.name.toString() : "", u = (o == null ? void 0 : o.splitStr) || "_";
|
|
1244
|
-
a =
|
|
1255
|
+
a = _(a) ? D(a, (c) => `${n}${u}${c}`) : `${n}${u}${a}`;
|
|
1245
1256
|
}
|
|
1246
|
-
return
|
|
1257
|
+
return lr(e.buttonMap, a);
|
|
1247
1258
|
};
|
|
1248
|
-
},
|
|
1249
|
-
const e =
|
|
1259
|
+
}, Qt = () => {
|
|
1260
|
+
const e = Yt();
|
|
1250
1261
|
return (t, r, o) => t ? e(t) : r ? e(r, { suffix: !0, splitStr: o }) : !0;
|
|
1251
|
-
},
|
|
1262
|
+
}, ir = () => ({
|
|
1252
1263
|
suffix: { type: [String, Array] },
|
|
1253
1264
|
value: { type: [String, Array] },
|
|
1254
1265
|
splitStr: { type: String }
|
|
1255
|
-
}),
|
|
1266
|
+
}), ma = w({
|
|
1256
1267
|
inheritAttrs: !1,
|
|
1257
1268
|
props: {
|
|
1258
|
-
...
|
|
1269
|
+
...ir()
|
|
1259
1270
|
},
|
|
1260
1271
|
setup: (e, { slots: t }) => {
|
|
1261
|
-
const r =
|
|
1272
|
+
const r = Yt(), o = A(() => e.value ? r(e.value) : e.suffix ? r(e.suffix, { suffix: !0, splitStr: e.splitStr }) : !1);
|
|
1262
1273
|
return () => {
|
|
1263
1274
|
var a;
|
|
1264
1275
|
return o.value ? (a = t.default) == null ? void 0 : a.call(t) : null;
|
|
1265
1276
|
};
|
|
1266
1277
|
}
|
|
1267
1278
|
});
|
|
1268
|
-
function
|
|
1269
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1279
|
+
function dr(e) {
|
|
1280
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ee(e);
|
|
1270
1281
|
}
|
|
1271
|
-
const
|
|
1282
|
+
const fr = () => ({
|
|
1272
1283
|
clsName: {
|
|
1273
1284
|
type: String,
|
|
1274
1285
|
default: "pro-operate"
|
|
@@ -1281,48 +1292,48 @@ const ir = () => ({
|
|
|
1281
1292
|
},
|
|
1282
1293
|
elementKey: {
|
|
1283
1294
|
type: String,
|
|
1284
|
-
default:
|
|
1295
|
+
default: U.ButtonKey
|
|
1285
1296
|
},
|
|
1286
1297
|
splitStr: {
|
|
1287
1298
|
type: String
|
|
1288
1299
|
}
|
|
1289
|
-
}),
|
|
1300
|
+
}), Jt = w({
|
|
1290
1301
|
props: {
|
|
1291
|
-
...
|
|
1302
|
+
...fr()
|
|
1292
1303
|
},
|
|
1293
1304
|
setup: (e, {
|
|
1294
1305
|
slots: t
|
|
1295
1306
|
}) => {
|
|
1296
|
-
const r =
|
|
1297
|
-
const c = Y(e.items, (
|
|
1298
|
-
...
|
|
1299
|
-
...
|
|
1300
|
-
} :
|
|
1301
|
-
return
|
|
1307
|
+
const r = Qt(), o = A(() => {
|
|
1308
|
+
const c = Y(e.items, (i) => r(i.per, i.perSuffix, e.splitStr) ? z(i.show) ? i.show() : Te(i.show) ? i.show : !0 : !1), l = D(c, (i) => We(e.itemState, i.value) ? {
|
|
1309
|
+
...i,
|
|
1310
|
+
...m(e.itemState, i.value)
|
|
1311
|
+
} : i);
|
|
1312
|
+
return pt(l, (i) => i.sort);
|
|
1302
1313
|
}), a = (c) => {
|
|
1303
|
-
var
|
|
1304
|
-
(
|
|
1305
|
-
}, n =
|
|
1306
|
-
return () =>
|
|
1314
|
+
var l;
|
|
1315
|
+
(l = c.onClick) == null || l.call(c, c.value);
|
|
1316
|
+
}, n = Q(), u = e.elementKey ? n(e.elementKey) : void 0;
|
|
1317
|
+
return () => d("div", {
|
|
1307
1318
|
class: e.clsName
|
|
1308
|
-
}, [
|
|
1309
|
-
const
|
|
1310
|
-
|
|
1311
|
-
disabled:
|
|
1319
|
+
}, [D(o.value, (c) => {
|
|
1320
|
+
const l = z(c.disabled) ? c.disabled() : c.disabled, i = z(c.loading) ? c.loading() : c.loading, b = z(c.label) ? c.label() : c.label, g = z(c.extraProps) ? c.extraProps() : c.extraProps, f = {
|
|
1321
|
+
...$(c, "show", "disabled", "element"),
|
|
1322
|
+
disabled: l
|
|
1312
1323
|
};
|
|
1313
|
-
return c.element && z(c.element) ? c.element(
|
|
1314
|
-
disabled:
|
|
1315
|
-
loading:
|
|
1324
|
+
return c.element && z(c.element) ? c.element(f) : t[c.value] ? t[c.value](f) : u ? d(u, x({
|
|
1325
|
+
disabled: l,
|
|
1326
|
+
loading: i,
|
|
1316
1327
|
onClick: () => a(c)
|
|
1317
|
-
}, g),
|
|
1328
|
+
}, g), dr(b) ? b : {
|
|
1318
1329
|
default: () => [b]
|
|
1319
|
-
}) :
|
|
1330
|
+
}) : d("div", {
|
|
1320
1331
|
class: `${e.clsName}-item`,
|
|
1321
1332
|
onClick: () => a(c)
|
|
1322
1333
|
}, [b]);
|
|
1323
1334
|
})]);
|
|
1324
1335
|
}
|
|
1325
|
-
}),
|
|
1336
|
+
}), mr = () => ({
|
|
1326
1337
|
clsName: {
|
|
1327
1338
|
type: String,
|
|
1328
1339
|
default: "pro-table-toolbar-column"
|
|
@@ -1343,105 +1354,105 @@ const ir = () => ({
|
|
|
1343
1354
|
type: Function,
|
|
1344
1355
|
default: () => "\u5217\u8BBE\u7F6E"
|
|
1345
1356
|
}
|
|
1346
|
-
}),
|
|
1357
|
+
}), yr = w({
|
|
1347
1358
|
props: {
|
|
1348
|
-
...
|
|
1359
|
+
...mr()
|
|
1349
1360
|
},
|
|
1350
1361
|
setup: (e, {
|
|
1351
1362
|
slots: t
|
|
1352
1363
|
}) => {
|
|
1353
|
-
const r =
|
|
1364
|
+
const r = Q(), o = r(U.PopoverKey), a = r(U.CheckboxKey), {
|
|
1354
1365
|
originColumns: n,
|
|
1355
1366
|
selectIdsRef: u
|
|
1356
|
-
} =
|
|
1357
|
-
let
|
|
1358
|
-
const b = (
|
|
1359
|
-
|
|
1367
|
+
} = vr(), [c, l] = Nt();
|
|
1368
|
+
let i = {};
|
|
1369
|
+
const b = (s) => {
|
|
1370
|
+
i[s] = !1;
|
|
1360
1371
|
}, g = () => {
|
|
1361
|
-
|
|
1362
|
-
|
|
1372
|
+
te(u.value, (s) => {
|
|
1373
|
+
i[s] = !0;
|
|
1363
1374
|
});
|
|
1364
|
-
},
|
|
1365
|
-
...
|
|
1366
|
-
[
|
|
1367
|
-
}), {})),
|
|
1368
|
-
|
|
1369
|
-
u.value =
|
|
1370
|
-
var
|
|
1371
|
-
return e.useSelectedStatus &&
|
|
1372
|
-
}), (
|
|
1373
|
-
}, n),
|
|
1374
|
-
var
|
|
1375
|
-
|
|
1375
|
+
}, f = A(() => ae(u.value, (s, h) => ({
|
|
1376
|
+
...s,
|
|
1377
|
+
[h]: !0
|
|
1378
|
+
}), {})), S = (s) => rr(s, e.signName);
|
|
1379
|
+
ce(() => {
|
|
1380
|
+
u.value = D(Y(n.value, (s) => {
|
|
1381
|
+
var h;
|
|
1382
|
+
return e.useSelectedStatus && We(i, s.dataIndex) ? i[s.dataIndex] : ((h = S(s)) == null ? void 0 : h.initShow) !== !1;
|
|
1383
|
+
}), (s) => s.dataIndex);
|
|
1384
|
+
}, n), Ot(() => {
|
|
1385
|
+
var s;
|
|
1386
|
+
l(), g(), (s = e.onColumnSelectChange) == null || s.call(e, u.value);
|
|
1376
1387
|
}, u);
|
|
1377
|
-
const
|
|
1378
|
-
const
|
|
1379
|
-
var
|
|
1380
|
-
return (
|
|
1381
|
-
}),
|
|
1382
|
-
var
|
|
1383
|
-
return (
|
|
1388
|
+
const p = A(() => {
|
|
1389
|
+
const s = yn(n.value, (E) => {
|
|
1390
|
+
var I;
|
|
1391
|
+
return (I = S(E)) != null && I.disabled ? !0 : m(f.value, E.dataIndex);
|
|
1392
|
+
}), h = ye(n.value, (E) => {
|
|
1393
|
+
var I;
|
|
1394
|
+
return (I = S(E)) != null && I.disabled ? !0 : m(f.value, E.dataIndex);
|
|
1384
1395
|
});
|
|
1385
1396
|
return {
|
|
1386
|
-
checked:
|
|
1387
|
-
indeterminate:
|
|
1397
|
+
checked: s,
|
|
1398
|
+
indeterminate: s ? !1 : h
|
|
1388
1399
|
};
|
|
1389
|
-
}),
|
|
1390
|
-
var
|
|
1391
|
-
(
|
|
1392
|
-
var
|
|
1393
|
-
return (
|
|
1394
|
-
}), (
|
|
1395
|
-
},
|
|
1396
|
-
u.value =
|
|
1397
|
-
var
|
|
1398
|
-
return ((
|
|
1399
|
-
}), (
|
|
1400
|
-
},
|
|
1401
|
-
var
|
|
1402
|
-
(
|
|
1400
|
+
}), y = (s) => {
|
|
1401
|
+
var E;
|
|
1402
|
+
(Me(s) ? (E = s.target) == null ? void 0 : E.checked : s) ? u.value = D(n.value, (I) => I.dataIndex) : u.value = D(Y(n.value, (I) => {
|
|
1403
|
+
var M;
|
|
1404
|
+
return (M = S(I)) != null && M.disabled ? !0 : (b(I.dataIndex), !1);
|
|
1405
|
+
}), (I) => I.dataIndex);
|
|
1406
|
+
}, T = () => {
|
|
1407
|
+
u.value = D(Y(n.value, (s) => {
|
|
1408
|
+
var h;
|
|
1409
|
+
return ((h = S(s)) == null ? void 0 : h.initShow) === !1 ? (b(s.dataIndex), !1) : !0;
|
|
1410
|
+
}), (s) => s.dataIndex);
|
|
1411
|
+
}, N = (s, h) => {
|
|
1412
|
+
var I;
|
|
1413
|
+
(Me(h) ? (I = h.target) == null ? void 0 : I.checked : h) ? u.value = [...u.value, s.dataIndex] : u.value = Y(u.value, (M) => s.dataIndex === M ? (b(s.dataIndex), !1) : !0);
|
|
1403
1414
|
};
|
|
1404
|
-
return () => o ?
|
|
1415
|
+
return () => o ? d(o, x({
|
|
1405
1416
|
trigger: "click"
|
|
1406
1417
|
}, e.popoverProps), {
|
|
1407
1418
|
default: () => {
|
|
1408
|
-
var
|
|
1409
|
-
return [((
|
|
1419
|
+
var s, h;
|
|
1420
|
+
return [((s = t.default) == null ? void 0 : s.call(t)) || ((h = e.renderDom) == null ? void 0 : h.call(e))];
|
|
1410
1421
|
},
|
|
1411
|
-
content: () =>
|
|
1422
|
+
content: () => d("div", {
|
|
1412
1423
|
class: `${e.clsName}`
|
|
1413
|
-
}, [
|
|
1424
|
+
}, [d("div", {
|
|
1414
1425
|
class: `${e.clsName}-header`
|
|
1415
|
-
}, [
|
|
1426
|
+
}, [d(a, {
|
|
1416
1427
|
key: c.value,
|
|
1417
|
-
checked:
|
|
1418
|
-
indeterminate:
|
|
1419
|
-
onChange:
|
|
1428
|
+
checked: p.value.checked,
|
|
1429
|
+
indeterminate: p.value.indeterminate,
|
|
1430
|
+
onChange: y
|
|
1420
1431
|
}, {
|
|
1421
|
-
default: () => [
|
|
1422
|
-
}),
|
|
1423
|
-
onClick:
|
|
1424
|
-
}, [
|
|
1432
|
+
default: () => [nt("\u5217\u5C55\u793A")]
|
|
1433
|
+
}), d("a", {
|
|
1434
|
+
onClick: T
|
|
1435
|
+
}, [nt("\u91CD\u7F6E")])]), d("div", {
|
|
1425
1436
|
key: c.value,
|
|
1426
1437
|
class: `${e.clsName}-list`
|
|
1427
|
-
}, [
|
|
1428
|
-
const
|
|
1429
|
-
return
|
|
1430
|
-
checked:
|
|
1431
|
-
disabled:
|
|
1432
|
-
onChange: (
|
|
1433
|
-
|
|
1438
|
+
}, [D(n.value, (s) => {
|
|
1439
|
+
const h = S(s), E = m(f.value, s.dataIndex, !1);
|
|
1440
|
+
return d(a, {
|
|
1441
|
+
checked: E,
|
|
1442
|
+
disabled: h == null ? void 0 : h.disabled,
|
|
1443
|
+
onChange: (I) => {
|
|
1444
|
+
N(s, I);
|
|
1434
1445
|
}
|
|
1435
1446
|
}, {
|
|
1436
|
-
default: () => [
|
|
1447
|
+
default: () => [s.title]
|
|
1437
1448
|
});
|
|
1438
1449
|
})])]),
|
|
1439
|
-
|
|
1450
|
+
...$(t, "default")
|
|
1440
1451
|
}) : null;
|
|
1441
1452
|
}
|
|
1442
|
-
}),
|
|
1443
|
-
|
|
1444
|
-
},
|
|
1453
|
+
}), Zt = Symbol("pro-table"), vr = () => he(Zt), hr = (e) => {
|
|
1454
|
+
ve(Zt, e);
|
|
1455
|
+
}, ft = () => ({
|
|
1445
1456
|
clsName: {
|
|
1446
1457
|
type: String,
|
|
1447
1458
|
default: "pro-table"
|
|
@@ -1482,11 +1493,11 @@ const ir = () => ({
|
|
|
1482
1493
|
dataSource: {
|
|
1483
1494
|
type: Array
|
|
1484
1495
|
}
|
|
1485
|
-
}),
|
|
1496
|
+
}), ya = w({
|
|
1486
1497
|
inheritAttrs: !1,
|
|
1487
1498
|
props: {
|
|
1488
|
-
...
|
|
1489
|
-
...
|
|
1499
|
+
...be,
|
|
1500
|
+
...ft()
|
|
1490
1501
|
},
|
|
1491
1502
|
setup: (e, {
|
|
1492
1503
|
slots: t,
|
|
@@ -1495,133 +1506,141 @@ const ir = () => ({
|
|
|
1495
1506
|
}) => {
|
|
1496
1507
|
const {
|
|
1497
1508
|
elementMap: a
|
|
1498
|
-
} =
|
|
1509
|
+
} = ne(), n = e.elementMap || a, u = m(a, U.TableKey), c = () => ({
|
|
1499
1510
|
title: "\u5E8F\u53F7",
|
|
1500
1511
|
dataIndex: "serialNumber",
|
|
1501
1512
|
width: 80,
|
|
1502
1513
|
...e.column,
|
|
1503
|
-
...
|
|
1514
|
+
...Te(e.serialNumber) ? void 0 : e.serialNumber,
|
|
1504
1515
|
customRender: ({
|
|
1505
|
-
index:
|
|
1516
|
+
index: v
|
|
1506
1517
|
}) => {
|
|
1507
|
-
var
|
|
1508
|
-
return ((
|
|
1518
|
+
var P, C;
|
|
1519
|
+
return ((P = e.paginationState) == null ? void 0 : P.page) && ((C = e.paginationState) == null ? void 0 : C.pageSize) ? e.paginationState.pageSize * (e.paginationState.page - 1) + v + 1 : v + 1;
|
|
1509
1520
|
}
|
|
1510
|
-
}),
|
|
1511
|
-
var
|
|
1512
|
-
if (e.operateItemClickMap && e.operateItemClickMap[
|
|
1513
|
-
e.operateItemClickMap[
|
|
1521
|
+
}), l = (v, P) => {
|
|
1522
|
+
var C;
|
|
1523
|
+
if (e.operateItemClickMap && e.operateItemClickMap[P.value]) {
|
|
1524
|
+
e.operateItemClickMap[P.value](v, P);
|
|
1514
1525
|
return;
|
|
1515
1526
|
}
|
|
1516
|
-
(
|
|
1517
|
-
},
|
|
1518
|
-
const
|
|
1519
|
-
...
|
|
1520
|
-
...
|
|
1521
|
-
...
|
|
1527
|
+
(C = P.onClick) == null || C.call(P, v);
|
|
1528
|
+
}, i = ie(t, "operate"), b = () => {
|
|
1529
|
+
const v = e.operate, P = D(v.items, (C) => ({
|
|
1530
|
+
...m(e.operateItemState, C.value),
|
|
1531
|
+
...C,
|
|
1532
|
+
...m(v.itemState, C.value)
|
|
1522
1533
|
}));
|
|
1523
1534
|
return {
|
|
1524
1535
|
...e.column,
|
|
1525
1536
|
title: "\u64CD\u4F5C",
|
|
1526
1537
|
dataIndex: "operate",
|
|
1527
1538
|
fixed: "right",
|
|
1528
|
-
|
|
1539
|
+
...v.column,
|
|
1529
1540
|
customRender: ({
|
|
1530
|
-
record:
|
|
1541
|
+
record: C
|
|
1531
1542
|
}) => {
|
|
1532
|
-
const
|
|
1533
|
-
...
|
|
1534
|
-
show: z(
|
|
1535
|
-
disabled: z(
|
|
1536
|
-
loading: z(
|
|
1537
|
-
extraProps: z(
|
|
1538
|
-
element: z(
|
|
1539
|
-
onClick: () =>
|
|
1540
|
-
})),
|
|
1541
|
-
...
|
|
1542
|
-
[
|
|
1543
|
-
var
|
|
1544
|
-
return (
|
|
1543
|
+
const j = D(P, (q) => ({
|
|
1544
|
+
...q,
|
|
1545
|
+
show: z(q.show) ? q.show(C) : q.show,
|
|
1546
|
+
disabled: z(q.disabled) ? q.disabled(C) : q.disabled,
|
|
1547
|
+
loading: z(q.loading) ? q.loading(C) : q.loading,
|
|
1548
|
+
extraProps: z(q.extraProps) ? q.extraProps(C) : q.extraProps,
|
|
1549
|
+
element: z(q.element) ? () => q.element(C, q) : q.element,
|
|
1550
|
+
onClick: () => l(C, q)
|
|
1551
|
+
})), Z = ae(W(i), (q, fe) => ({
|
|
1552
|
+
...q,
|
|
1553
|
+
[fe]: (O) => {
|
|
1554
|
+
var K;
|
|
1555
|
+
return (K = i[fe]) == null ? void 0 : K.call(i, C, O);
|
|
1545
1556
|
}
|
|
1546
1557
|
}), {});
|
|
1547
|
-
return
|
|
1558
|
+
return d(Jt, {
|
|
1548
1559
|
class: `${e.clsName}-operate`,
|
|
1549
|
-
items:
|
|
1550
|
-
elementKey:
|
|
1551
|
-
},
|
|
1560
|
+
items: j,
|
|
1561
|
+
elementKey: v.elementKey || U.TableOperateKey
|
|
1562
|
+
}, Z);
|
|
1552
1563
|
}
|
|
1553
1564
|
};
|
|
1554
|
-
}, g =
|
|
1555
|
-
var
|
|
1556
|
-
return !!((
|
|
1557
|
-
}),
|
|
1558
|
-
if (!
|
|
1565
|
+
}, g = V([]), f = A(() => {
|
|
1566
|
+
var v;
|
|
1567
|
+
return !!((v = e.toolbar) != null && v.columnSetting);
|
|
1568
|
+
}), S = an(e, "columns"), p = A(() => {
|
|
1569
|
+
if (!f.value)
|
|
1559
1570
|
return e.columns;
|
|
1560
|
-
const
|
|
1561
|
-
...
|
|
1562
|
-
[
|
|
1571
|
+
const v = ae(g.value, (P, C) => ({
|
|
1572
|
+
...P,
|
|
1573
|
+
[C]: !0
|
|
1563
1574
|
}), {});
|
|
1564
|
-
return Y(e.columns, (
|
|
1565
|
-
}),
|
|
1566
|
-
const
|
|
1575
|
+
return Y(e.columns, (P) => m(v, P.dataIndex));
|
|
1576
|
+
}), y = (v) => D(v, (P) => {
|
|
1577
|
+
const C = {
|
|
1567
1578
|
...e.column,
|
|
1568
|
-
...
|
|
1569
|
-
},
|
|
1570
|
-
return
|
|
1571
|
-
value:
|
|
1572
|
-
}) => typeof
|
|
1573
|
-
value:
|
|
1579
|
+
...P
|
|
1580
|
+
}, j = e.convertColumn ? e.convertColumn(C) : C;
|
|
1581
|
+
return P.children && X(P.children) > 0 ? (j.children = y(P.children), j) : (P.customRender || (j.customRender = ({
|
|
1582
|
+
value: Z
|
|
1583
|
+
}) => typeof Z > "u" || Z === null || Z === "" ? e.columnEmptyText : Ze(n, P, {
|
|
1584
|
+
value: Z
|
|
1574
1585
|
}, {
|
|
1575
1586
|
render: "tableRender"
|
|
1576
|
-
}) ||
|
|
1577
|
-
}),
|
|
1578
|
-
const
|
|
1579
|
-
return e.serialNumber &&
|
|
1580
|
-
}),
|
|
1581
|
-
var
|
|
1582
|
-
const
|
|
1583
|
-
return
|
|
1584
|
-
}),
|
|
1585
|
-
|
|
1586
|
-
columns:
|
|
1587
|
-
originColumns:
|
|
1587
|
+
}) || Z), j);
|
|
1588
|
+
}), T = A(() => {
|
|
1589
|
+
const v = ke(p.value, e.columnState, e.columnState2), P = y(v);
|
|
1590
|
+
return e.serialNumber && P.unshift(c()), e.operate && e.operate.items && ye(e.operate.items, (C) => C.show) && P.push(b()), P;
|
|
1591
|
+
}), N = A(() => {
|
|
1592
|
+
var P, C;
|
|
1593
|
+
const v = e.dataSource;
|
|
1594
|
+
return v && (((P = e.mergeOpts) == null ? void 0 : P.rowNames) || ((C = e.mergeOpts) == null ? void 0 : C.colNames)) && En(v, e.mergeOpts), v;
|
|
1595
|
+
}), s = V();
|
|
1596
|
+
hr({
|
|
1597
|
+
columns: T,
|
|
1598
|
+
originColumns: S,
|
|
1588
1599
|
selectIdsRef: g,
|
|
1589
|
-
tableRef:
|
|
1600
|
+
tableRef: s,
|
|
1590
1601
|
toolbar: e.toolbar,
|
|
1591
1602
|
...e.provideExtra
|
|
1592
|
-
}), r(
|
|
1593
|
-
const
|
|
1594
|
-
|
|
1595
|
-
C
|
|
1596
|
-
|
|
1597
|
-
|
|
1603
|
+
}), r(Se(e.tableMethods || [], s));
|
|
1604
|
+
const h = V(), E = V(0), I = V(), M = V(!1), R = V(), L = V(!1);
|
|
1605
|
+
Fe(h, (v) => {
|
|
1606
|
+
const P = m(v, [0, "contentRect"]), C = window.getComputedStyle(h.value);
|
|
1607
|
+
if (P.height && C) {
|
|
1608
|
+
const j = C.getPropertyValue("margin-bottom"), Z = parseInt(j.replace("px", ""));
|
|
1609
|
+
E.value = P.height + Z;
|
|
1610
|
+
}
|
|
1611
|
+
}), Fe(I, () => {
|
|
1612
|
+
M.value = !!I.value.innerText;
|
|
1613
|
+
}), Fe(R, () => {
|
|
1614
|
+
L.value = !!R.value.innerText;
|
|
1598
1615
|
});
|
|
1599
|
-
const
|
|
1616
|
+
const B = A(() => L.value || M.value ? `${e.clsName}-toolbar-valid` : ""), G = W(ft()), J = ie(t, "columnSetting");
|
|
1600
1617
|
return () => {
|
|
1601
|
-
var
|
|
1618
|
+
var P, C;
|
|
1602
1619
|
if (!u)
|
|
1603
1620
|
return null;
|
|
1604
|
-
const
|
|
1605
|
-
return
|
|
1606
|
-
class: e.clsName
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1621
|
+
const v = f.value ? d(yr, (P = e.toolbar) == null ? void 0 : P.columnSetting, J) : null;
|
|
1622
|
+
return d("div", x({
|
|
1623
|
+
class: e.clsName,
|
|
1624
|
+
style: `--pro-table-toolbar-hei: ${E.value}px`
|
|
1625
|
+
}, H(o, "class")), [d("div", {
|
|
1626
|
+
ref: h,
|
|
1627
|
+
class: `${e.clsName}-toolbar ${B.value}`
|
|
1628
|
+
}, [d("div", {
|
|
1629
|
+
ref: I,
|
|
1611
1630
|
class: `${e.clsName}-toolbar-start`
|
|
1612
|
-
}, [(
|
|
1613
|
-
ref:
|
|
1631
|
+
}, [(C = t.toolbar) == null ? void 0 : C.call(t)]), d("div", {
|
|
1632
|
+
ref: R,
|
|
1614
1633
|
class: `${e.clsName}-toolbar-extra`
|
|
1615
|
-
}, [t.toolbarExtra ? t.toolbarExtra([
|
|
1616
|
-
ref:
|
|
1617
|
-
},
|
|
1634
|
+
}, [t.toolbarExtra ? t.toolbarExtra([v]) : d(de, null, [v])])]), d(u, x({
|
|
1635
|
+
ref: s
|
|
1636
|
+
}, $(o, "class"), $(e, G), {
|
|
1618
1637
|
mergeOpts: e.mergeOpts,
|
|
1619
|
-
dataSource:
|
|
1620
|
-
columns:
|
|
1638
|
+
dataSource: N.value,
|
|
1639
|
+
columns: T.value
|
|
1621
1640
|
}), t)]);
|
|
1622
1641
|
};
|
|
1623
1642
|
}
|
|
1624
|
-
}),
|
|
1643
|
+
}), br = () => ({
|
|
1625
1644
|
title: {
|
|
1626
1645
|
type: String
|
|
1627
1646
|
},
|
|
@@ -1640,14 +1659,14 @@ const ir = () => ({
|
|
|
1640
1659
|
type: Function,
|
|
1641
1660
|
default: () => "\u8FD4\u56DE"
|
|
1642
1661
|
}
|
|
1643
|
-
}),
|
|
1662
|
+
}), qe = w({
|
|
1644
1663
|
props: {
|
|
1645
|
-
...
|
|
1664
|
+
...br()
|
|
1646
1665
|
},
|
|
1647
1666
|
setup: (e, {
|
|
1648
1667
|
slots: t
|
|
1649
1668
|
}) => {
|
|
1650
|
-
const r =
|
|
1669
|
+
const r = _e(), o = () => {
|
|
1651
1670
|
var a;
|
|
1652
1671
|
if (e.onBackClick) {
|
|
1653
1672
|
(a = e.onBackClick) == null || a.call(e);
|
|
@@ -1656,25 +1675,25 @@ const ir = () => ({
|
|
|
1656
1675
|
r.back();
|
|
1657
1676
|
};
|
|
1658
1677
|
return () => {
|
|
1659
|
-
var n, u, c,
|
|
1678
|
+
var n, u, c, l, i;
|
|
1660
1679
|
const a = e.hideWhileNoHistory && ((u = (n = window.history) == null ? void 0 : n.state) == null ? void 0 : u.back) || e.hideWhileNoHistory === !1;
|
|
1661
|
-
return
|
|
1680
|
+
return d("div", {
|
|
1662
1681
|
class: "pro-page-header"
|
|
1663
|
-
}, [e.showBack && a &&
|
|
1682
|
+
}, [e.showBack && a && d("div", {
|
|
1664
1683
|
class: "pro-page-header-back",
|
|
1665
1684
|
onClick: o
|
|
1666
|
-
}, [t.backIcon ? t.backIcon() : (c = e.renderBackIcon) == null ? void 0 : c.call(e)]),
|
|
1685
|
+
}, [t.backIcon ? t.backIcon() : (c = e.renderBackIcon) == null ? void 0 : c.call(e)]), d("div", {
|
|
1667
1686
|
class: "pro-page-header-title"
|
|
1668
|
-
}, [t.title ? t.title() : e.title]),
|
|
1687
|
+
}, [t.title ? t.title() : e.title]), d("div", {
|
|
1669
1688
|
class: "pro-page-header-sub-title"
|
|
1670
|
-
}, [t.subTitle ? t.subTitle() : e.subTitle]),
|
|
1689
|
+
}, [t.subTitle ? t.subTitle() : e.subTitle]), d("div", {
|
|
1671
1690
|
class: "pro-page-header-space"
|
|
1672
|
-
}, [(
|
|
1691
|
+
}, [(l = t.space) == null ? void 0 : l.call(t)]), d("div", {
|
|
1673
1692
|
class: "pro-page-header-extra"
|
|
1674
|
-
}, [(
|
|
1693
|
+
}, [(i = t.extra) == null ? void 0 : i.call(t)])]);
|
|
1675
1694
|
};
|
|
1676
1695
|
}
|
|
1677
|
-
}),
|
|
1696
|
+
}), gr = () => ({
|
|
1678
1697
|
loading: {
|
|
1679
1698
|
type: Boolean,
|
|
1680
1699
|
default: !1
|
|
@@ -1683,38 +1702,46 @@ const ir = () => ({
|
|
|
1683
1702
|
fillMode: {
|
|
1684
1703
|
type: Boolean,
|
|
1685
1704
|
default: !0
|
|
1705
|
+
},
|
|
1706
|
+
as: {
|
|
1707
|
+
type: String
|
|
1686
1708
|
}
|
|
1687
|
-
}),
|
|
1709
|
+
}), va = w({
|
|
1688
1710
|
props: {
|
|
1689
|
-
...
|
|
1690
|
-
...
|
|
1711
|
+
...qe.props,
|
|
1712
|
+
...gr()
|
|
1691
1713
|
},
|
|
1692
1714
|
setup: (e, {
|
|
1693
1715
|
slots: t
|
|
1694
1716
|
}) => {
|
|
1695
|
-
const
|
|
1717
|
+
const r = Q(), o = r(U.LoadingKey), a = e.as || r(U.ScrollKey) || "div", n = () => o ? d(o, x({
|
|
1718
|
+
loading: !0
|
|
1719
|
+
}, e.loadingOpts), {
|
|
1720
|
+
default: () => [d("div", {
|
|
1721
|
+
class: "pro-loading-dom"
|
|
1722
|
+
}, null)]
|
|
1723
|
+
}) : null, u = W(qe.props);
|
|
1696
1724
|
return () => {
|
|
1697
|
-
var
|
|
1698
|
-
const
|
|
1699
|
-
return
|
|
1700
|
-
class:
|
|
1701
|
-
},
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
}, [(d = t.footer) == null ? void 0 : d.call(t)])]);
|
|
1725
|
+
var g;
|
|
1726
|
+
const c = e.title || t.title || e.subTitle || t.subTitle || t.extra, l = (g = t.footer) == null ? void 0 : g.call(t), i = !e.loading && _n(l), b = ["pro-page"];
|
|
1727
|
+
return e.fillMode && b.push("pro-page-fill"), c && b.push("has-header"), i && b.push("has-footer"), d(a, {
|
|
1728
|
+
class: b
|
|
1729
|
+
}, {
|
|
1730
|
+
default: () => {
|
|
1731
|
+
var f, S;
|
|
1732
|
+
return [(f = t.start) == null ? void 0 : f.call(t), c && d(qe, H(e, u), $(t, "start", "default", "footer")), d("div", {
|
|
1733
|
+
class: "pro-page-content"
|
|
1734
|
+
}, [e.loading ? n() : (S = t.default) == null ? void 0 : S.call(t)]), i && d("div", {
|
|
1735
|
+
class: "pro-page-footer"
|
|
1736
|
+
}, [l])];
|
|
1737
|
+
}
|
|
1738
|
+
});
|
|
1712
1739
|
};
|
|
1713
1740
|
}
|
|
1714
|
-
}),
|
|
1741
|
+
}), Sr = Object.freeze({
|
|
1715
1742
|
page: 1,
|
|
1716
1743
|
pageSize: 10
|
|
1717
|
-
}),
|
|
1744
|
+
}), Pr = () => ({
|
|
1718
1745
|
clsName: {
|
|
1719
1746
|
type: String,
|
|
1720
1747
|
default: "pro-list"
|
|
@@ -1748,43 +1775,43 @@ const ir = () => ({
|
|
|
1748
1775
|
end: {
|
|
1749
1776
|
type: Function
|
|
1750
1777
|
}
|
|
1751
|
-
}),
|
|
1778
|
+
}), pr = w({
|
|
1752
1779
|
props: {
|
|
1753
|
-
...
|
|
1780
|
+
...Pr()
|
|
1754
1781
|
},
|
|
1755
1782
|
setup: (e, {
|
|
1756
1783
|
slots: t,
|
|
1757
1784
|
emit: r
|
|
1758
1785
|
}) => {
|
|
1759
|
-
const o =
|
|
1760
|
-
...
|
|
1786
|
+
const o = Q(), a = o(U.ProSearchFormKey), n = o(U.ProTableKey), u = o(U.PaginationKey), c = e.pageState || Oe({
|
|
1787
|
+
...Sr
|
|
1761
1788
|
});
|
|
1762
|
-
let
|
|
1763
|
-
const
|
|
1789
|
+
let l;
|
|
1790
|
+
const i = () => {
|
|
1764
1791
|
r("search", {
|
|
1765
|
-
...
|
|
1792
|
+
...l,
|
|
1766
1793
|
...c
|
|
1767
1794
|
});
|
|
1768
|
-
}, b = (
|
|
1769
|
-
|
|
1770
|
-
}, g = (
|
|
1771
|
-
c.page =
|
|
1772
|
-
},
|
|
1795
|
+
}, b = (y, T) => {
|
|
1796
|
+
l = y, c.page = T || 1, i();
|
|
1797
|
+
}, g = (y, T) => {
|
|
1798
|
+
c.page = y, c.pageSize = T, i();
|
|
1799
|
+
}, f = ie(t, "search"), S = ie(t, "table"), p = ie(t, "pagination");
|
|
1773
1800
|
return () => {
|
|
1774
|
-
var
|
|
1775
|
-
const
|
|
1801
|
+
var T, N, s, h, E, I, M, R;
|
|
1802
|
+
const y = t.search ? t.search({
|
|
1776
1803
|
executeSearchWithResetPage: b,
|
|
1777
1804
|
pageState: c
|
|
1778
|
-
}) :
|
|
1805
|
+
}) : d(de, null, [a && d(a, x({
|
|
1779
1806
|
class: `${e.clsName}-search`
|
|
1780
|
-
},
|
|
1781
|
-
onFinish: (
|
|
1782
|
-
}),
|
|
1783
|
-
return
|
|
1807
|
+
}, $(e.searchProps, "onFinish"), {
|
|
1808
|
+
onFinish: (L) => b(L)
|
|
1809
|
+
}), f)]);
|
|
1810
|
+
return d("div", {
|
|
1784
1811
|
class: e.clsName
|
|
1785
|
-
}, [((
|
|
1812
|
+
}, [((T = t.start) == null ? void 0 : T.call(t)) || ((N = e.start) == null ? void 0 : N.call(e)), !e.searchInTable && y, ((s = t.divide) == null ? void 0 : s.call(t)) || ((h = e.divide) == null ? void 0 : h.call(e)), t.table ? t.table({
|
|
1786
1813
|
pageState: c
|
|
1787
|
-
}) :
|
|
1814
|
+
}) : d(de, null, [n && d(n, x({
|
|
1788
1815
|
class: `${e.clsName}-table`,
|
|
1789
1816
|
paginationState: {
|
|
1790
1817
|
page: c.page,
|
|
@@ -1792,21 +1819,21 @@ const ir = () => ({
|
|
|
1792
1819
|
},
|
|
1793
1820
|
pagination: !1
|
|
1794
1821
|
}, e.tableProps), {
|
|
1795
|
-
...
|
|
1796
|
-
toolbar: e.searchInTable ? () =>
|
|
1797
|
-
})]), ((
|
|
1822
|
+
...S,
|
|
1823
|
+
toolbar: e.searchInTable ? () => S.toolbar ? S.toolbar(y) : y : S.toolbar
|
|
1824
|
+
})]), ((E = t.divide2) == null ? void 0 : E.call(t)) || ((I = e.divide2) == null ? void 0 : I.call(e)), t.pagination ? t.pagination({
|
|
1798
1825
|
executePageChange: g,
|
|
1799
1826
|
pageState: c
|
|
1800
|
-
}) :
|
|
1827
|
+
}) : d(de, null, [e.paginationProps !== !1 && u && d("div", {
|
|
1801
1828
|
class: `${e.clsName}-pagination`
|
|
1802
|
-
}, [
|
|
1829
|
+
}, [d(u, x($(Te(e.paginationProps) ? {} : e.paginationProps, "onChange"), {
|
|
1803
1830
|
page: c.page,
|
|
1804
1831
|
pageSize: c.pageSize,
|
|
1805
1832
|
onComposeChange: g
|
|
1806
|
-
}),
|
|
1833
|
+
}), p)])]), ((M = t.end) == null ? void 0 : M.call(t)) || ((R = e.end) == null ? void 0 : R.call(e))]);
|
|
1807
1834
|
};
|
|
1808
1835
|
}
|
|
1809
|
-
}),
|
|
1836
|
+
}), mt = () => ({
|
|
1810
1837
|
clsName: {
|
|
1811
1838
|
type: String,
|
|
1812
1839
|
default: "pro-desc"
|
|
@@ -1814,38 +1841,38 @@ const ir = () => ({
|
|
|
1814
1841
|
model: {
|
|
1815
1842
|
type: Object
|
|
1816
1843
|
}
|
|
1817
|
-
}),
|
|
1844
|
+
}), Cr = w({
|
|
1818
1845
|
props: {
|
|
1819
|
-
...
|
|
1820
|
-
...
|
|
1846
|
+
...be,
|
|
1847
|
+
...mt()
|
|
1821
1848
|
},
|
|
1822
1849
|
setup: (e, {
|
|
1823
1850
|
slots: t
|
|
1824
1851
|
}) => {
|
|
1825
1852
|
const {
|
|
1826
1853
|
elementMap: r
|
|
1827
|
-
} =
|
|
1828
|
-
return () => !n || !u ? null :
|
|
1854
|
+
} = ne(), o = e.elementMap || r, a = Q(), n = a(U.DescriptionsKey), u = a(U.DescriptionsItemKey), c = A(() => ke(e.columns, e.columnState, e.columnState2)), l = W(be), i = W(mt());
|
|
1855
|
+
return () => !n || !u ? null : d(n, x({
|
|
1829
1856
|
class: e.clsName
|
|
1830
|
-
},
|
|
1857
|
+
}, $(e, ...l, ...i, "model")), {
|
|
1831
1858
|
default: () => {
|
|
1832
1859
|
var b, g;
|
|
1833
|
-
return [(b = t.start) == null ? void 0 : b.call(t),
|
|
1834
|
-
const
|
|
1835
|
-
return
|
|
1860
|
+
return [(b = t.start) == null ? void 0 : b.call(t), D(c.value, (f) => {
|
|
1861
|
+
const S = f.dataIndex, p = m(e.model, S);
|
|
1862
|
+
return d(u, x({
|
|
1836
1863
|
class: `${e.clsName}-item`
|
|
1837
|
-
},
|
|
1864
|
+
}, m(f.extra, "desc")), {
|
|
1838
1865
|
default: () => {
|
|
1839
|
-
var
|
|
1840
|
-
return [((
|
|
1841
|
-
value:
|
|
1866
|
+
var y, T;
|
|
1867
|
+
return [((y = t[S]) == null ? void 0 : y.call(t, p, f)) || ((T = t.value) == null ? void 0 : T.call(t, p, f)) || Ze(o, f, {
|
|
1868
|
+
value: p
|
|
1842
1869
|
}, {
|
|
1843
1870
|
render: "descRender"
|
|
1844
1871
|
})];
|
|
1845
1872
|
},
|
|
1846
1873
|
label: () => {
|
|
1847
|
-
var
|
|
1848
|
-
return ((
|
|
1874
|
+
var y;
|
|
1875
|
+
return ((y = t.label) == null ? void 0 : y.call(t, f)) || f.title;
|
|
1849
1876
|
}
|
|
1850
1877
|
});
|
|
1851
1878
|
}), (g = t.default) == null ? void 0 : g.call(t)];
|
|
@@ -1853,38 +1880,53 @@ const ir = () => ({
|
|
|
1853
1880
|
...t
|
|
1854
1881
|
});
|
|
1855
1882
|
}
|
|
1856
|
-
}),
|
|
1883
|
+
}), en = (e, t) => Ge(e) ? e : e || t, Er = () => ({
|
|
1884
|
+
value: {
|
|
1885
|
+
type: [String, Number]
|
|
1886
|
+
},
|
|
1887
|
+
emptyText: {
|
|
1888
|
+
type: String
|
|
1889
|
+
}
|
|
1890
|
+
}), ha = w({
|
|
1891
|
+
props: {
|
|
1892
|
+
...Er()
|
|
1893
|
+
},
|
|
1894
|
+
setup: (e) => () => en(e.value, e.emptyText)
|
|
1895
|
+
}), Mr = () => ({
|
|
1857
1896
|
content: {
|
|
1858
1897
|
type: [String, Number]
|
|
1859
1898
|
},
|
|
1860
1899
|
ellipsis: {
|
|
1861
1900
|
type: [Object, Boolean]
|
|
1862
1901
|
},
|
|
1863
|
-
popoverProps: Object
|
|
1864
|
-
|
|
1902
|
+
popoverProps: Object,
|
|
1903
|
+
emptyText: {
|
|
1904
|
+
type: String
|
|
1905
|
+
}
|
|
1906
|
+
}), Tr = w({
|
|
1865
1907
|
inheritAttrs: !1,
|
|
1866
1908
|
props: {
|
|
1867
|
-
...
|
|
1909
|
+
...Mr()
|
|
1868
1910
|
},
|
|
1869
1911
|
setup: (e, {
|
|
1870
1912
|
attrs: t
|
|
1871
1913
|
}) => {
|
|
1872
|
-
const o =
|
|
1914
|
+
const o = Q()(U.PopoverKey), a = () => {
|
|
1873
1915
|
var n, u;
|
|
1874
1916
|
return e.ellipsis ? e.ellipsis === !0 ? 1 : ((n = e.ellipsis) == null ? void 0 : n.rows) || ((u = e.ellipsis) == null ? void 0 : u.num) || 1 : "unset";
|
|
1875
1917
|
};
|
|
1876
1918
|
return () => {
|
|
1877
|
-
const n =
|
|
1919
|
+
const n = d("span", x({
|
|
1878
1920
|
class: `pro-typography ${e.ellipsis ? "pro-typography-ellipsis" : ""}`,
|
|
1879
1921
|
style: `-webkit-line-clamp:${a()}`
|
|
1880
|
-
}, t), [e.content]);
|
|
1881
|
-
return !e.popoverProps || !o ? n :
|
|
1922
|
+
}, t), [en(e.content, e.emptyText)]);
|
|
1923
|
+
return !e.popoverProps || !o ? n : d(o, e.popoverProps, {
|
|
1882
1924
|
default: () => [n],
|
|
1883
1925
|
content: () => e.content
|
|
1884
1926
|
});
|
|
1885
1927
|
};
|
|
1886
1928
|
}
|
|
1887
|
-
}),
|
|
1929
|
+
}), we = {
|
|
1888
1930
|
value: {
|
|
1889
1931
|
type: [String, Number]
|
|
1890
1932
|
},
|
|
@@ -1894,27 +1936,27 @@ const ir = () => ({
|
|
|
1894
1936
|
convert: {
|
|
1895
1937
|
type: Function
|
|
1896
1938
|
}
|
|
1897
|
-
},
|
|
1939
|
+
}, Ue = w({
|
|
1898
1940
|
inheritAttrs: !1,
|
|
1899
1941
|
props: {
|
|
1900
|
-
...
|
|
1942
|
+
...we
|
|
1901
1943
|
},
|
|
1902
1944
|
setup: (e, {
|
|
1903
1945
|
attrs: t
|
|
1904
1946
|
}) => {
|
|
1905
|
-
const r =
|
|
1947
|
+
const r = A(() => {
|
|
1906
1948
|
var n;
|
|
1907
|
-
const o = (n = e.showProps) == null ? void 0 : n.content, a = e.value ||
|
|
1949
|
+
const o = (n = e.showProps) == null ? void 0 : n.content, a = e.value || Ge(e.value) ? e.value : o;
|
|
1908
1950
|
return e.convert ? e.convert(a, e) : a;
|
|
1909
1951
|
});
|
|
1910
|
-
return () =>
|
|
1952
|
+
return () => d(Tr, x(H(t, "style", "class"), $(e.showProps, "content"), {
|
|
1911
1953
|
content: r.value
|
|
1912
1954
|
}), null);
|
|
1913
1955
|
}
|
|
1914
|
-
}),
|
|
1956
|
+
}), ba = w({
|
|
1915
1957
|
inheritAttrs: !1,
|
|
1916
1958
|
props: {
|
|
1917
|
-
...
|
|
1959
|
+
...we,
|
|
1918
1960
|
decimalFixed: {
|
|
1919
1961
|
type: Number,
|
|
1920
1962
|
default: 0
|
|
@@ -1927,19 +1969,19 @@ const ir = () => ({
|
|
|
1927
1969
|
setup: (e, {
|
|
1928
1970
|
attrs: t
|
|
1929
1971
|
}) => {
|
|
1930
|
-
const r =
|
|
1972
|
+
const r = A(() => {
|
|
1931
1973
|
let o = e.value;
|
|
1932
|
-
return o && e.decimalFixed && (o =
|
|
1974
|
+
return o && e.decimalFixed && (o = Mn(o, e.decimalFixed || 2)), o && e.thousandDivision && (o = Tn(o)), e.convert ? e.convert(o, e) : o;
|
|
1933
1975
|
});
|
|
1934
|
-
return () =>
|
|
1976
|
+
return () => d(Ue, x(H(t, "style", "class"), {
|
|
1935
1977
|
value: r.value,
|
|
1936
1978
|
showProps: e.showProps
|
|
1937
1979
|
}), null);
|
|
1938
1980
|
}
|
|
1939
|
-
}),
|
|
1981
|
+
}), ga = w({
|
|
1940
1982
|
inheritAttrs: !1,
|
|
1941
1983
|
props: {
|
|
1942
|
-
...
|
|
1984
|
+
...we,
|
|
1943
1985
|
value: {
|
|
1944
1986
|
type: [String, Number, Array]
|
|
1945
1987
|
},
|
|
@@ -1955,21 +1997,21 @@ const ir = () => ({
|
|
|
1955
1997
|
setup: (e, {
|
|
1956
1998
|
attrs: t
|
|
1957
1999
|
}) => {
|
|
1958
|
-
const r =
|
|
2000
|
+
const r = A(() => In(e.options, (n) => n.label), void 0), o = A(() => {
|
|
1959
2001
|
const n = e.value;
|
|
1960
2002
|
let u = e.value;
|
|
1961
|
-
return
|
|
1962
|
-
}), a =
|
|
1963
|
-
return () =>
|
|
2003
|
+
return _(n) ? u = Xe(D(n, (c) => m(r.value, c, c)), e.splitStr) : u = m(r.value, n, e.value), e.convert ? e.convert(u, e) : u;
|
|
2004
|
+
}), a = A(() => m(e.colorMap, e.value));
|
|
2005
|
+
return () => d(Ue, x(H(t, "style", "class"), {
|
|
1964
2006
|
style: `color:${a.value || ""}`,
|
|
1965
2007
|
value: o.value,
|
|
1966
2008
|
showProps: e.showProps
|
|
1967
2009
|
}), null);
|
|
1968
2010
|
}
|
|
1969
|
-
}),
|
|
2011
|
+
}), Sa = w({
|
|
1970
2012
|
inheritAttrs: !1,
|
|
1971
2013
|
props: {
|
|
1972
|
-
...
|
|
2014
|
+
...we,
|
|
1973
2015
|
value: {
|
|
1974
2016
|
type: [String, Number, Array]
|
|
1975
2017
|
},
|
|
@@ -1986,25 +2028,25 @@ const ir = () => ({
|
|
|
1986
2028
|
setup: (e, {
|
|
1987
2029
|
attrs: t
|
|
1988
2030
|
}) => {
|
|
1989
|
-
const r =
|
|
2031
|
+
const r = A(() => {
|
|
1990
2032
|
const a = e.treeData || e.data || e.options, n = e.fieldNames || e.props;
|
|
1991
|
-
return
|
|
2033
|
+
return Nn(a, (u) => m(u, (n == null ? void 0 : n.label) || "label"), {
|
|
1992
2034
|
value: "value",
|
|
1993
2035
|
children: "children",
|
|
1994
2036
|
...n
|
|
1995
2037
|
});
|
|
1996
|
-
}), o =
|
|
2038
|
+
}), o = A(() => {
|
|
1997
2039
|
let a = e.value;
|
|
1998
|
-
return
|
|
2040
|
+
return _(e.value) ? a = Xe(D(e.value, (n) => m(r.value, n, n)), e.splitStr) : a = m(r.value, e.value, e.value), e.convert ? e.convert(a, e) : a;
|
|
1999
2041
|
});
|
|
2000
|
-
return () =>
|
|
2042
|
+
return () => d(Ue, x(H(t, "style", "class"), {
|
|
2001
2043
|
value: o.value,
|
|
2002
2044
|
showProps: e.showProps
|
|
2003
2045
|
}), null);
|
|
2004
2046
|
}
|
|
2005
|
-
}),
|
|
2047
|
+
}), Pa = w({
|
|
2006
2048
|
props: {
|
|
2007
|
-
...
|
|
2049
|
+
...we,
|
|
2008
2050
|
value: {
|
|
2009
2051
|
type: [String, Number, Array]
|
|
2010
2052
|
},
|
|
@@ -2024,31 +2066,31 @@ const ir = () => ({
|
|
|
2024
2066
|
setup: (e, {
|
|
2025
2067
|
attrs: t
|
|
2026
2068
|
}) => {
|
|
2027
|
-
const r = (a) => a && (e.isUnix ?
|
|
2069
|
+
const r = (a) => a && (e.isUnix ? ct.unix(a).format(e.format) : ct(a).format(e.format)), o = A(() => {
|
|
2028
2070
|
let a = e.value;
|
|
2029
|
-
return
|
|
2071
|
+
return _(e.value) ? a = Xe(D(e.value, (n) => r(n) || ""), e.splitStr) : a = r(e.value) || "", e.convert ? e.convert(a, e) : a;
|
|
2030
2072
|
});
|
|
2031
|
-
return () =>
|
|
2073
|
+
return () => d(Ue, x(H(t, "style", "class"), {
|
|
2032
2074
|
value: o.value,
|
|
2033
2075
|
showProps: e.showProps
|
|
2034
2076
|
}), null);
|
|
2035
2077
|
}
|
|
2036
|
-
}),
|
|
2078
|
+
}), xe = w((e, {
|
|
2037
2079
|
slots: t
|
|
2038
2080
|
}) => {
|
|
2039
|
-
const r =
|
|
2040
|
-
return
|
|
2081
|
+
const r = V(), o = V(0);
|
|
2082
|
+
return Fe(r, (a) => {
|
|
2041
2083
|
var u;
|
|
2042
2084
|
const n = (u = a[0]) == null ? void 0 : u.contentRect;
|
|
2043
2085
|
o.value = n == null ? void 0 : n.width;
|
|
2044
2086
|
}), () => {
|
|
2045
2087
|
var a, n, u;
|
|
2046
|
-
return
|
|
2088
|
+
return d("header", null, [(a = t.start) == null ? void 0 : a.call(t), t.menus && d("div", {
|
|
2047
2089
|
ref: r,
|
|
2048
2090
|
class: "pro-header-menus-wrapper"
|
|
2049
2091
|
}, [t.menus(o.value)]), (n = t.default) == null ? void 0 : n.call(t), (u = t.end) == null ? void 0 : u.call(t)]);
|
|
2050
2092
|
};
|
|
2051
|
-
}),
|
|
2093
|
+
}), Ir = () => ({
|
|
2052
2094
|
clsName: {
|
|
2053
2095
|
type: String,
|
|
2054
2096
|
default: "pro-layout"
|
|
@@ -2086,120 +2128,118 @@ const ir = () => ({
|
|
|
2086
2128
|
menuProps: {
|
|
2087
2129
|
type: Object
|
|
2088
2130
|
}
|
|
2089
|
-
}),
|
|
2131
|
+
}), pa = w({
|
|
2090
2132
|
inheritAttrs: !1,
|
|
2091
2133
|
props: {
|
|
2092
|
-
...
|
|
2134
|
+
...Ir()
|
|
2093
2135
|
},
|
|
2094
2136
|
setup: (e, {
|
|
2095
2137
|
slots: t,
|
|
2096
2138
|
attrs: r
|
|
2097
2139
|
}) => {
|
|
2098
|
-
const
|
|
2099
|
-
router:
|
|
2100
|
-
route:
|
|
2101
|
-
} =
|
|
2102
|
-
var
|
|
2103
|
-
return
|
|
2104
|
-
var
|
|
2105
|
-
const
|
|
2140
|
+
const o = Q(), a = o(U.MenusKey), n = o(U.ScrollKey) || "div", {
|
|
2141
|
+
router: u,
|
|
2142
|
+
route: c
|
|
2143
|
+
} = Rt(), l = A(() => {
|
|
2144
|
+
var s;
|
|
2145
|
+
return At(e.menus, (h) => {
|
|
2146
|
+
var M, R;
|
|
2147
|
+
const E = ((M = e.fieldNames) == null ? void 0 : M.value) || "value", I = ((R = e.fieldNames) == null ? void 0 : R.label) || "label";
|
|
2106
2148
|
return {
|
|
2107
|
-
|
|
2108
|
-
value:
|
|
2109
|
-
label:
|
|
2149
|
+
...$(h, E, I),
|
|
2150
|
+
value: m(h, E),
|
|
2151
|
+
label: m(h, I)
|
|
2110
2152
|
};
|
|
2111
2153
|
}, {
|
|
2112
|
-
children: ((
|
|
2154
|
+
children: ((s = e.fieldNames) == null ? void 0 : s.children) || "children",
|
|
2113
2155
|
childrenName: "children"
|
|
2114
2156
|
});
|
|
2115
|
-
}), i =
|
|
2157
|
+
}), i = A(() => An(l.value)), b = A(() => {
|
|
2116
2158
|
if (e.findCurrentTopName)
|
|
2117
|
-
return e.findCurrentTopName(
|
|
2118
|
-
const
|
|
2119
|
-
if (
|
|
2120
|
-
return
|
|
2121
|
-
}),
|
|
2159
|
+
return e.findCurrentTopName(c, i.value);
|
|
2160
|
+
const s = vn(c.matched, (h) => !!m(i.value, h.name));
|
|
2161
|
+
if (s)
|
|
2162
|
+
return m(i.value, s.name);
|
|
2163
|
+
}), g = A(() => b.value ? at(l.value, (s) => s.value === b.value).target : null), f = A(() => {
|
|
2122
2164
|
if (e.findActiveKey)
|
|
2123
|
-
return e.findActiveKey(
|
|
2124
|
-
if (
|
|
2125
|
-
return
|
|
2126
|
-
}),
|
|
2127
|
-
e.onMenuItemClick ? e.onMenuItemClick(
|
|
2128
|
-
},
|
|
2129
|
-
const
|
|
2130
|
-
|
|
2131
|
-
},
|
|
2165
|
+
return e.findActiveKey(c, i.value);
|
|
2166
|
+
if (c.name && m(i.value, c.name))
|
|
2167
|
+
return c.name;
|
|
2168
|
+
}), S = (s) => {
|
|
2169
|
+
e.onMenuItemClick ? e.onMenuItemClick(s) : u.openMenu(s);
|
|
2170
|
+
}, p = (s) => {
|
|
2171
|
+
const h = at(l.value, (E) => E.value === s.value).target;
|
|
2172
|
+
S(h);
|
|
2173
|
+
}, y = ie(t, "header"), T = ie(t, "menu"), N = (s) => {
|
|
2174
|
+
var h, E;
|
|
2175
|
+
return d("div", {
|
|
2176
|
+
class: `${e.clsName}-menus-wrapper`
|
|
2177
|
+
}, [(h = T.start) == null ? void 0 : h.call(T), d(n, {
|
|
2178
|
+
class: `${e.clsName}-menus-scroll`
|
|
2179
|
+
}, {
|
|
2180
|
+
default: () => [d(a, s, T)]
|
|
2181
|
+
}), (E = T.end) == null ? void 0 : E.call(T)]);
|
|
2182
|
+
};
|
|
2132
2183
|
return () => {
|
|
2133
|
-
var
|
|
2184
|
+
var I;
|
|
2134
2185
|
if (!a)
|
|
2135
2186
|
return null;
|
|
2136
|
-
const
|
|
2187
|
+
const s = H(r, "class"), h = {
|
|
2137
2188
|
class: `${e.clsName}-menus`,
|
|
2138
|
-
options:
|
|
2139
|
-
activeKey:
|
|
2189
|
+
options: l.value,
|
|
2190
|
+
activeKey: f.value,
|
|
2140
2191
|
...H(e, "convertSubMenuProps", "convertMenuItemProps"),
|
|
2141
|
-
onMenuItemClick:
|
|
2192
|
+
onMenuItemClick: S,
|
|
2142
2193
|
...e.menuProps
|
|
2143
|
-
}
|
|
2144
|
-
|
|
2194
|
+
}, E = d("div", {
|
|
2195
|
+
class: `${e.clsName}-section`
|
|
2196
|
+
}, [(I = t.default) == null ? void 0 : I.call(t)]);
|
|
2197
|
+
return e.layout === "vertical" ? d("main", x(s, {
|
|
2145
2198
|
class: `${e.clsName} ${e.clsName}-${e.layout}`
|
|
2146
|
-
}), [
|
|
2199
|
+
}), [d(xe, {
|
|
2147
2200
|
class: `${e.clsName}-header`
|
|
2148
2201
|
}, {
|
|
2149
|
-
menus: (
|
|
2150
|
-
style: `width:${
|
|
2202
|
+
menus: (M) => M ? d(a, x({
|
|
2203
|
+
style: `width:${M}px`,
|
|
2151
2204
|
mode: "horizontal"
|
|
2152
|
-
},
|
|
2153
|
-
...
|
|
2154
|
-
}),
|
|
2155
|
-
class: `${e.clsName}-section`
|
|
2156
|
-
}, [(l = t.default) == null ? void 0 : l.call(t)])]) : e.layout === "horizontal" ? s("main", D(p, {
|
|
2205
|
+
}, h), T) : null,
|
|
2206
|
+
...y
|
|
2207
|
+
}), E]) : e.layout === "horizontal" ? d("main", x(s, {
|
|
2157
2208
|
class: `${e.clsName} ${e.clsName}-${e.layout}`
|
|
2158
|
-
}), [
|
|
2159
|
-
class: `${e.clsName}-menus-wrapper`
|
|
2160
|
-
}, [(S = f.start) == null ? void 0 : S.call(f), s(a, E, f), (C = f.end) == null ? void 0 : C.call(f)]), s("div", {
|
|
2209
|
+
}), [N(h), d("div", {
|
|
2161
2210
|
class: `${e.clsName}-structure`
|
|
2162
|
-
}, [
|
|
2211
|
+
}, [d(xe, {
|
|
2163
2212
|
class: `${e.clsName}-header`
|
|
2164
|
-
},
|
|
2165
|
-
class: `${e.clsName}-section`
|
|
2166
|
-
}, [(T = t.default) == null ? void 0 : T.call(t)])])]) : e.layout === "horizontal-v" ? s("main", D(p, {
|
|
2213
|
+
}, y), E])]) : e.layout === "horizontal-v" ? d("main", x(s, {
|
|
2167
2214
|
class: `${e.clsName} ${e.clsName}-${e.layout}`
|
|
2168
|
-
}), [
|
|
2215
|
+
}), [d(xe, {
|
|
2169
2216
|
class: `${e.clsName}-header`
|
|
2170
|
-
},
|
|
2217
|
+
}, y), d("div", {
|
|
2171
2218
|
class: `${e.clsName}-structure`
|
|
2172
|
-
}, [
|
|
2173
|
-
class: `${e.clsName}-menus-wrapper`
|
|
2174
|
-
}, [(I = f.start) == null ? void 0 : I.call(f), s(a, E, f), (K = f.end) == null ? void 0 : K.call(f)]), s("div", {
|
|
2175
|
-
class: `${e.clsName}-section`
|
|
2176
|
-
}, [(V = t.default) == null ? void 0 : V.call(t)])])]) : s("main", D(p, {
|
|
2219
|
+
}, [N(h), E])]) : d("main", x(s, {
|
|
2177
2220
|
class: `${e.clsName} ${e.clsName}-${e.layout}`
|
|
2178
|
-
}), [
|
|
2221
|
+
}), [d(xe, {
|
|
2179
2222
|
class: `${e.clsName}-header`
|
|
2180
2223
|
}, {
|
|
2181
|
-
menus: (
|
|
2182
|
-
style: `width:${
|
|
2224
|
+
menus: (M) => M ? d(a, x({
|
|
2225
|
+
style: `width:${M}px`,
|
|
2183
2226
|
class: `${e.clsName}-menus`,
|
|
2184
2227
|
mode: "horizontal",
|
|
2185
|
-
options:
|
|
2186
|
-
activeKey:
|
|
2228
|
+
options: D(l.value, (R) => $(R, "children")),
|
|
2229
|
+
activeKey: b.value
|
|
2187
2230
|
}, H(e, "convertSubMenuProps", "convertMenuItemProps"), {
|
|
2188
|
-
onMenuItemClick:
|
|
2189
|
-
}),
|
|
2190
|
-
...
|
|
2191
|
-
}),
|
|
2231
|
+
onMenuItemClick: p
|
|
2232
|
+
}), T) : null,
|
|
2233
|
+
...y
|
|
2234
|
+
}), d("div", {
|
|
2192
2235
|
class: `${e.clsName}-structure`
|
|
2193
|
-
}, [
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
}, O(E, "options")), f), ($ = f.end) == null ? void 0 : $.call(f)]), s("div", {
|
|
2198
|
-
class: `${e.clsName}-section`
|
|
2199
|
-
}, [(A = t.default) == null ? void 0 : A.call(t)])])]);
|
|
2236
|
+
}, [g.value && X(g.value.children) > 0 && N({
|
|
2237
|
+
...h,
|
|
2238
|
+
options: g.value.children
|
|
2239
|
+
}), E])]);
|
|
2200
2240
|
};
|
|
2201
2241
|
}
|
|
2202
|
-
}),
|
|
2242
|
+
}), Ca = w({
|
|
2203
2243
|
props: {
|
|
2204
2244
|
fieldNames: {
|
|
2205
2245
|
type: Object,
|
|
@@ -2217,39 +2257,39 @@ const ir = () => ({
|
|
|
2217
2257
|
slots: t,
|
|
2218
2258
|
emit: r
|
|
2219
2259
|
}) => {
|
|
2220
|
-
const a =
|
|
2221
|
-
const b =
|
|
2222
|
-
if (
|
|
2260
|
+
const a = Q()(U.UploaderKey), n = (i) => {
|
|
2261
|
+
const b = $t(i);
|
|
2262
|
+
if (_(b)) {
|
|
2223
2263
|
const g = e.fieldNames;
|
|
2224
|
-
return
|
|
2225
|
-
|
|
2226
|
-
id:
|
|
2227
|
-
name:
|
|
2228
|
-
size:
|
|
2264
|
+
return D(b, (f) => ({
|
|
2265
|
+
...$(f, g.id, g.name, g.size),
|
|
2266
|
+
id: m(f, g.id),
|
|
2267
|
+
name: m(f, g.name),
|
|
2268
|
+
size: m(f, g.size)
|
|
2229
2269
|
}));
|
|
2230
2270
|
}
|
|
2231
2271
|
return [];
|
|
2232
|
-
}, u =
|
|
2272
|
+
}, u = A(() => n(e.value)), c = A(() => n(e.modelValue)), l = (i, b) => {
|
|
2233
2273
|
let g = "";
|
|
2234
|
-
|
|
2235
|
-
var
|
|
2236
|
-
const
|
|
2237
|
-
[
|
|
2238
|
-
[
|
|
2239
|
-
[
|
|
2274
|
+
i && X(i) > 0 && (g = On(D(i, (f) => {
|
|
2275
|
+
var y;
|
|
2276
|
+
const S = e.fieldNames, p = {
|
|
2277
|
+
[S.id]: f.id,
|
|
2278
|
+
[S.name]: f.name,
|
|
2279
|
+
[S.size || "size"]: f.size
|
|
2240
2280
|
};
|
|
2241
|
-
return ((
|
|
2281
|
+
return ((y = e.convertItem) == null ? void 0 : y.call(e, f)) || p;
|
|
2242
2282
|
}))), r(b, g);
|
|
2243
2283
|
};
|
|
2244
|
-
return () => a ?
|
|
2284
|
+
return () => a ? d(a, x({
|
|
2245
2285
|
class: "pro-uploader-text",
|
|
2246
2286
|
value: u.value,
|
|
2247
|
-
"onUpdate:value": (
|
|
2287
|
+
"onUpdate:value": (i) => l(i, "update:value"),
|
|
2248
2288
|
modelValue: c.value,
|
|
2249
|
-
"onUpdate:modelValue": (
|
|
2250
|
-
},
|
|
2289
|
+
"onUpdate:modelValue": (i) => l(i, "update:modelValue")
|
|
2290
|
+
}, $(e, "value", "modelValue", "fieldNames")), t) : null;
|
|
2251
2291
|
}
|
|
2252
|
-
}),
|
|
2292
|
+
}), Ea = w({
|
|
2253
2293
|
props: {
|
|
2254
2294
|
value: [String, Array],
|
|
2255
2295
|
fieldNames: {
|
|
@@ -2267,17 +2307,17 @@ const ir = () => ({
|
|
|
2267
2307
|
}) => {
|
|
2268
2308
|
const o = (u) => {
|
|
2269
2309
|
var c;
|
|
2270
|
-
return !!
|
|
2271
|
-
}, a =
|
|
2310
|
+
return !!m(u, ((c = e.fieldNames) == null ? void 0 : c.id) || "id");
|
|
2311
|
+
}, a = A(() => {
|
|
2272
2312
|
let u = e.value;
|
|
2273
|
-
return u &&
|
|
2274
|
-
var g,
|
|
2275
|
-
const
|
|
2313
|
+
return u && ue(u) && (u = $t(u)), u && !_(u) && Me(u) && o(u) && (u = [u]), _(u) ? D(Y(u, (c) => o(c)), (c) => {
|
|
2314
|
+
var g, f, S;
|
|
2315
|
+
const l = m(c, ((g = e.fieldNames) == null ? void 0 : g.id) || "id"), i = m(c, ((f = e.fieldNames) == null ? void 0 : f.name) || "name"), b = m(c, ((S = e.fieldNames) == null ? void 0 : S.name) || "size");
|
|
2276
2316
|
return {
|
|
2277
2317
|
...c,
|
|
2278
|
-
id:
|
|
2318
|
+
id: l,
|
|
2279
2319
|
size: b,
|
|
2280
|
-
name:
|
|
2320
|
+
name: i || l
|
|
2281
2321
|
};
|
|
2282
2322
|
}) : [];
|
|
2283
2323
|
}), n = (u) => {
|
|
@@ -2285,44 +2325,44 @@ const ir = () => ({
|
|
|
2285
2325
|
};
|
|
2286
2326
|
return () => {
|
|
2287
2327
|
var u, c;
|
|
2288
|
-
return
|
|
2328
|
+
return d("div", {
|
|
2289
2329
|
class: "pro-upload-list"
|
|
2290
|
-
}, [(u = t.start) == null ? void 0 : u.call(t),
|
|
2291
|
-
var
|
|
2292
|
-
return
|
|
2330
|
+
}, [(u = t.start) == null ? void 0 : u.call(t), D(a.value, (l) => {
|
|
2331
|
+
var i;
|
|
2332
|
+
return d("div", {
|
|
2293
2333
|
class: "pro-upload-list-item"
|
|
2294
|
-
}, [
|
|
2334
|
+
}, [d("span", {
|
|
2295
2335
|
class: "pro-upload-list-item-title",
|
|
2296
|
-
onClick: () => n(
|
|
2297
|
-
}, [
|
|
2336
|
+
onClick: () => n(l)
|
|
2337
|
+
}, [l.name]), (i = t.extra) == null ? void 0 : i.call(t, l)]);
|
|
2298
2338
|
}), (c = t.default) == null ? void 0 : c.call(t)]);
|
|
2299
2339
|
};
|
|
2300
2340
|
}
|
|
2301
|
-
}),
|
|
2302
|
-
!e || !t ||
|
|
2303
|
-
const a =
|
|
2304
|
-
if (!
|
|
2341
|
+
}), Nr = (e, t) => {
|
|
2342
|
+
!e || !t || St(t) || Ee(e) || te(t, (r, o) => {
|
|
2343
|
+
const a = Mt(o, e);
|
|
2344
|
+
if (!Tt(a)) {
|
|
2305
2345
|
console.log("ConfigExtra\uFF1A\u8865\u5145\u5BF9\u8C61key\u8F6C\u6362\u5931\u8D25", e.elementId, o);
|
|
2306
2346
|
return;
|
|
2307
2347
|
}
|
|
2308
|
-
if (!
|
|
2348
|
+
if (!It(a, e)) {
|
|
2309
2349
|
console.log("ConfigExtra\uFF1A\u8865\u5145\u5BF9\u8C61key\u672A\u627E\u5230\u7236\u7EA7", e.elementId, o, "->", a);
|
|
2310
2350
|
return;
|
|
2311
2351
|
}
|
|
2312
|
-
|
|
2352
|
+
se(e, a, r);
|
|
2313
2353
|
});
|
|
2314
|
-
},
|
|
2315
|
-
|
|
2316
|
-
const r =
|
|
2317
|
-
r &&
|
|
2318
|
-
const a =
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
}) :
|
|
2322
|
-
}), e.children &&
|
|
2323
|
-
|
|
2354
|
+
}, pe = (e, t) => {
|
|
2355
|
+
Nr(e, m(t, e.elementId));
|
|
2356
|
+
const r = m(e, ["highConfig$", "registerPropsTrans"]);
|
|
2357
|
+
r && X(r) > 0 && te(r, (o) => {
|
|
2358
|
+
const a = m(e.elementProps, o.name);
|
|
2359
|
+
_(a) ? te(a, (n) => {
|
|
2360
|
+
pe(n, t);
|
|
2361
|
+
}) : pe(a, t);
|
|
2362
|
+
}), e.children && X(e.children) > 0 && te(e.children, (o) => {
|
|
2363
|
+
pe(o, t);
|
|
2324
2364
|
});
|
|
2325
|
-
},
|
|
2365
|
+
}, Ar = w({
|
|
2326
2366
|
props: {
|
|
2327
2367
|
initExecuteList: {
|
|
2328
2368
|
type: Array
|
|
@@ -2331,43 +2371,43 @@ const ir = () => ({
|
|
|
2331
2371
|
setup: (e) => {
|
|
2332
2372
|
const {
|
|
2333
2373
|
execute: t
|
|
2334
|
-
} =
|
|
2335
|
-
return
|
|
2374
|
+
} = ge();
|
|
2375
|
+
return ce(() => {
|
|
2336
2376
|
e.initExecuteList && t(e.initExecuteList, []);
|
|
2337
2377
|
}, []), () => null;
|
|
2338
2378
|
}
|
|
2339
|
-
}),
|
|
2379
|
+
}), Ma = ({
|
|
2340
2380
|
actors: e,
|
|
2341
2381
|
configData: t,
|
|
2342
2382
|
configDataExtra: r,
|
|
2343
2383
|
Logic: o
|
|
2344
|
-
}) =>
|
|
2345
|
-
const a =
|
|
2346
|
-
const
|
|
2347
|
-
return r && (
|
|
2384
|
+
}) => w(() => {
|
|
2385
|
+
const a = V(), n = (l) => {
|
|
2386
|
+
const i = Ct(l);
|
|
2387
|
+
return r && (_(i) ? te(i, (b) => pe(b, r)) : pe(i, r)), i;
|
|
2348
2388
|
};
|
|
2349
|
-
|
|
2389
|
+
ce(() => {
|
|
2350
2390
|
t && t.elementConfigs && (a.value = n(t.elementConfigs)), t != null && t.elementConfigs;
|
|
2351
2391
|
}, []);
|
|
2352
|
-
const c =
|
|
2353
|
-
return () => a.value ?
|
|
2392
|
+
const c = Q()(U.LoadingKey);
|
|
2393
|
+
return () => a.value ? d(De, {
|
|
2354
2394
|
initState: t == null ? void 0 : t.initState,
|
|
2355
2395
|
storeKeys: t == null ? void 0 : t.storeKeys,
|
|
2356
2396
|
actors: e,
|
|
2357
2397
|
requests: t == null ? void 0 : t.requests,
|
|
2358
2398
|
elementConfigs: a.value
|
|
2359
2399
|
}, {
|
|
2360
|
-
default: () => [
|
|
2361
|
-
}) : c ?
|
|
2400
|
+
default: () => [d(Ar, null, null), o && d(o, null, null)]
|
|
2401
|
+
}) : c ? d(c, {
|
|
2362
2402
|
loading: !0
|
|
2363
2403
|
}, {
|
|
2364
|
-
default: () => [
|
|
2404
|
+
default: () => [d("div", {
|
|
2365
2405
|
class: "pro-module-loading-dom"
|
|
2366
2406
|
}, null)]
|
|
2367
2407
|
}) : null;
|
|
2368
|
-
}),
|
|
2369
|
-
var
|
|
2370
|
-
const
|
|
2408
|
+
}), tn = Symbol("pro-curd"), oe = () => he(tn), Or = (e) => ve(tn, e);
|
|
2409
|
+
var F = /* @__PURE__ */ ((e) => (e.LIST = "LIST", e.DETAIL = "DETAIL", e.ADD = "ADD", e.EDIT = "EDIT", e.DELETE = "DELETE", e))(F || {}), k = /* @__PURE__ */ ((e) => (e.EMIT = "EMIT", e.EXECUTE = "EXECUTE", e.PAGE = "PAGE", e.SUCCESS = "SUCCESS", e.FAIL = "FAIL", e))(k || {}), me = /* @__PURE__ */ ((e) => (e.ADD = "ADD", e.EDIT = "EDIT", e.DETAIL = "DETAIL", e))(me || {}), Ae = /* @__PURE__ */ ((e) => (e.NORMAL = "NORMAL", e.CONTINUE = "CONTINUE", e))(Ae || {});
|
|
2410
|
+
const $r = () => ({
|
|
2371
2411
|
rowKey: {
|
|
2372
2412
|
type: String,
|
|
2373
2413
|
default: "id"
|
|
@@ -2390,10 +2430,10 @@ const Nr = () => ({
|
|
|
2390
2430
|
modalProps: {
|
|
2391
2431
|
type: Object
|
|
2392
2432
|
}
|
|
2393
|
-
}),
|
|
2433
|
+
}), nn = ["sendCurdEvent", "refreshList", "sendEvent", "sendRequest"], yt = w({
|
|
2394
2434
|
props: {
|
|
2395
|
-
...
|
|
2396
|
-
|
|
2435
|
+
...be,
|
|
2436
|
+
...$r()
|
|
2397
2437
|
},
|
|
2398
2438
|
setup: (e, {
|
|
2399
2439
|
slots: t,
|
|
@@ -2404,90 +2444,90 @@ const Nr = () => ({
|
|
|
2404
2444
|
state: a,
|
|
2405
2445
|
sendEvent: n,
|
|
2406
2446
|
sendRequest: u
|
|
2407
|
-
} =
|
|
2408
|
-
const
|
|
2409
|
-
const
|
|
2410
|
-
return
|
|
2447
|
+
} = ge(), c = A(() => ke(e.columns, e.columnState, e.columnState2)), l = (M, R) => {
|
|
2448
|
+
const L = Y(c.value, (B) => {
|
|
2449
|
+
const G = m(B, ["extra", M]) || m(B, M);
|
|
2450
|
+
return R ? G !== !1 : G;
|
|
2411
2451
|
});
|
|
2412
|
-
return
|
|
2413
|
-
},
|
|
2414
|
-
let
|
|
2415
|
-
const
|
|
2416
|
-
u(
|
|
2417
|
-
...
|
|
2418
|
-
...
|
|
2452
|
+
return pt(L, (B) => m(B, ["extra", `${M}Sort`]) || m(B, `${M}Sort`));
|
|
2453
|
+
}, i = A(() => l("form", !0)), b = A(() => l("detail", !0)), g = A(() => l("table", !0)), f = A(() => l("search"));
|
|
2454
|
+
let S;
|
|
2455
|
+
const p = (M) => {
|
|
2456
|
+
u(F.LIST, {
|
|
2457
|
+
...S,
|
|
2458
|
+
...M
|
|
2419
2459
|
});
|
|
2420
|
-
},
|
|
2460
|
+
}, y = (M) => {
|
|
2421
2461
|
n({
|
|
2422
|
-
type:
|
|
2423
|
-
payload:
|
|
2424
|
-
source:
|
|
2462
|
+
type: M.action,
|
|
2463
|
+
payload: $(M, "action", "source"),
|
|
2464
|
+
source: M.source
|
|
2425
2465
|
});
|
|
2426
2466
|
};
|
|
2427
|
-
|
|
2428
|
-
type:
|
|
2429
|
-
payload:
|
|
2430
|
-
source:
|
|
2467
|
+
Je(({
|
|
2468
|
+
type: M,
|
|
2469
|
+
payload: R,
|
|
2470
|
+
source: L
|
|
2431
2471
|
}) => {
|
|
2432
|
-
if (
|
|
2472
|
+
if (L)
|
|
2433
2473
|
return;
|
|
2434
|
-
let
|
|
2435
|
-
|
|
2474
|
+
let B = M, G = R == null ? void 0 : R.type;
|
|
2475
|
+
B === Ie.Success && (B = m(R, ["requestOpts", "action"]), G = k.SUCCESS);
|
|
2436
2476
|
const {
|
|
2437
|
-
values:
|
|
2477
|
+
values: J,
|
|
2438
2478
|
record: v
|
|
2439
|
-
} =
|
|
2440
|
-
switch (
|
|
2441
|
-
case
|
|
2442
|
-
|
|
2479
|
+
} = R;
|
|
2480
|
+
switch (B) {
|
|
2481
|
+
case F.LIST:
|
|
2482
|
+
G === k.EMIT && (S = J, p());
|
|
2443
2483
|
return;
|
|
2444
|
-
case
|
|
2445
|
-
|
|
2484
|
+
case F.ADD:
|
|
2485
|
+
G === k.EXECUTE && u(F.ADD, J, a.detailData);
|
|
2446
2486
|
return;
|
|
2447
|
-
case
|
|
2448
|
-
|
|
2487
|
+
case F.EDIT:
|
|
2488
|
+
G === k.EXECUTE && u(F.EDIT, J, a.detailData);
|
|
2449
2489
|
return;
|
|
2450
|
-
case
|
|
2451
|
-
|
|
2490
|
+
case F.DELETE:
|
|
2491
|
+
G === k.EMIT ? u(F.DELETE, v, e.rowKey) : G === k.SUCCESS && p();
|
|
2452
2492
|
return;
|
|
2453
2493
|
}
|
|
2454
|
-
|
|
2494
|
+
B && M === k.EXECUTE && u(B, J);
|
|
2455
2495
|
});
|
|
2456
|
-
const
|
|
2457
|
-
...
|
|
2458
|
-
[
|
|
2459
|
-
}), {}),
|
|
2460
|
-
return
|
|
2496
|
+
const T = ae(e.operates, (M, R) => ({
|
|
2497
|
+
...M,
|
|
2498
|
+
[R.action]: R
|
|
2499
|
+
}), {}), N = (M) => m(T, M), s = A(() => e.listProps), h = A(() => e.formProps), E = A(() => e.descProps), I = A(() => e.modalProps);
|
|
2500
|
+
return Or({
|
|
2461
2501
|
columns: c,
|
|
2462
|
-
getSignColumns:
|
|
2502
|
+
getSignColumns: l,
|
|
2463
2503
|
elementMap: o,
|
|
2464
2504
|
formElementMap: e.formElementMap,
|
|
2465
2505
|
rowKey: e.rowKey,
|
|
2466
2506
|
curdState: a,
|
|
2467
|
-
formColumns:
|
|
2507
|
+
formColumns: i,
|
|
2468
2508
|
descColumns: b,
|
|
2469
2509
|
tableColumns: g,
|
|
2470
|
-
searchColumns:
|
|
2471
|
-
sendCurdEvent:
|
|
2510
|
+
searchColumns: f,
|
|
2511
|
+
sendCurdEvent: y,
|
|
2472
2512
|
operates: e.operates,
|
|
2473
|
-
getOperate:
|
|
2474
|
-
refreshList:
|
|
2475
|
-
listProps:
|
|
2476
|
-
formProps:
|
|
2477
|
-
descProps:
|
|
2478
|
-
modalProps:
|
|
2513
|
+
getOperate: N,
|
|
2514
|
+
refreshList: p,
|
|
2515
|
+
listProps: s,
|
|
2516
|
+
formProps: h,
|
|
2517
|
+
descProps: E,
|
|
2518
|
+
modalProps: I
|
|
2479
2519
|
}), r({
|
|
2480
|
-
sendCurdEvent:
|
|
2481
|
-
refreshList:
|
|
2520
|
+
sendCurdEvent: y,
|
|
2521
|
+
refreshList: p
|
|
2482
2522
|
}), () => {
|
|
2483
|
-
var
|
|
2484
|
-
return (
|
|
2523
|
+
var M;
|
|
2524
|
+
return (M = t.default) == null ? void 0 : M.call(t);
|
|
2485
2525
|
};
|
|
2486
2526
|
}
|
|
2487
|
-
}),
|
|
2527
|
+
}), He = w({
|
|
2488
2528
|
props: {
|
|
2489
|
-
|
|
2490
|
-
...
|
|
2529
|
+
...$(De.props, "state", "requests"),
|
|
2530
|
+
...yt.props,
|
|
2491
2531
|
curdState: {
|
|
2492
2532
|
type: Object
|
|
2493
2533
|
}
|
|
@@ -2499,216 +2539,216 @@ const Nr = () => ({
|
|
|
2499
2539
|
const {
|
|
2500
2540
|
elementMap: o,
|
|
2501
2541
|
formElementMap: a
|
|
2502
|
-
} =
|
|
2542
|
+
} = ne(), n = V(), u = V(), c = e.curdState || Oe({
|
|
2503
2543
|
detailData: {}
|
|
2504
|
-
}),
|
|
2505
|
-
[
|
|
2506
|
-
convertParams: (
|
|
2507
|
-
convertData: (
|
|
2508
|
-
var
|
|
2509
|
-
return (
|
|
2544
|
+
}), l = {
|
|
2545
|
+
[F.LIST]: {
|
|
2546
|
+
convertParams: (f) => f,
|
|
2547
|
+
convertData: (f) => {
|
|
2548
|
+
var S;
|
|
2549
|
+
return (S = f.res) == null ? void 0 : S.data;
|
|
2510
2550
|
},
|
|
2511
2551
|
loadingName: "listLoading",
|
|
2512
2552
|
stateName: "listData"
|
|
2513
2553
|
},
|
|
2514
|
-
[
|
|
2515
|
-
convertParams: (
|
|
2516
|
-
convertData: (
|
|
2517
|
-
var
|
|
2518
|
-
return (
|
|
2554
|
+
[F.DETAIL]: {
|
|
2555
|
+
convertParams: (f, S) => H(f, S),
|
|
2556
|
+
convertData: (f) => {
|
|
2557
|
+
var S;
|
|
2558
|
+
return (S = f.res) == null ? void 0 : S.data;
|
|
2519
2559
|
},
|
|
2520
2560
|
loadingName: "detailLoading",
|
|
2521
2561
|
stateName: "detailData",
|
|
2522
2562
|
label: "\u8BE6\u60C5"
|
|
2523
2563
|
},
|
|
2524
|
-
[
|
|
2525
|
-
convertParams: (
|
|
2564
|
+
[F.ADD]: {
|
|
2565
|
+
convertParams: (f, S) => ({
|
|
2526
2566
|
body: {
|
|
2527
|
-
...
|
|
2528
|
-
...
|
|
2567
|
+
...S,
|
|
2568
|
+
...f
|
|
2529
2569
|
}
|
|
2530
2570
|
}),
|
|
2531
2571
|
loadingName: "operateLoading",
|
|
2532
2572
|
label: "\u6DFB\u52A0"
|
|
2533
2573
|
},
|
|
2534
|
-
[
|
|
2535
|
-
convertParams: (
|
|
2574
|
+
[F.EDIT]: {
|
|
2575
|
+
convertParams: (f, S) => ({
|
|
2536
2576
|
body: {
|
|
2537
|
-
...
|
|
2538
|
-
...
|
|
2577
|
+
...S,
|
|
2578
|
+
...f
|
|
2539
2579
|
}
|
|
2540
2580
|
}),
|
|
2541
2581
|
loadingName: "operateLoading",
|
|
2542
2582
|
label: "\u7F16\u8F91"
|
|
2543
2583
|
},
|
|
2544
|
-
[
|
|
2545
|
-
convertParams: (
|
|
2584
|
+
[F.DELETE]: {
|
|
2585
|
+
convertParams: (f, S) => H(f, S),
|
|
2546
2586
|
label: "\u5220\u9664"
|
|
2547
2587
|
}
|
|
2548
|
-
},
|
|
2549
|
-
var
|
|
2550
|
-
const
|
|
2588
|
+
}, i = D(e.operates, (f) => {
|
|
2589
|
+
var y;
|
|
2590
|
+
const S = m(l, f.action), p = ((y = e.convertOperate) == null ? void 0 : y.call(e, f, S)) || f;
|
|
2551
2591
|
return {
|
|
2552
|
-
...
|
|
2553
|
-
...
|
|
2592
|
+
...S,
|
|
2593
|
+
...p
|
|
2554
2594
|
};
|
|
2555
|
-
}), b = Y(
|
|
2595
|
+
}), b = Y(i, (f) => f.actor), g = W($(De.props, "state", "requests"));
|
|
2556
2596
|
return r({
|
|
2557
|
-
sendCurdEvent: (
|
|
2558
|
-
var
|
|
2559
|
-
(
|
|
2597
|
+
sendCurdEvent: (f) => {
|
|
2598
|
+
var S;
|
|
2599
|
+
(S = u.value) == null || S.sendCurdEvent(f);
|
|
2560
2600
|
},
|
|
2561
|
-
refreshList: (
|
|
2562
|
-
var
|
|
2563
|
-
(
|
|
2601
|
+
refreshList: (f) => {
|
|
2602
|
+
var S;
|
|
2603
|
+
(S = u.value) == null || S.refreshList(f);
|
|
2564
2604
|
},
|
|
2565
|
-
sendEvent: (
|
|
2566
|
-
var
|
|
2567
|
-
(
|
|
2605
|
+
sendEvent: (f) => {
|
|
2606
|
+
var S;
|
|
2607
|
+
(S = n.value) == null || S.sendEvent(f);
|
|
2568
2608
|
},
|
|
2569
|
-
sendRequest: (
|
|
2570
|
-
var
|
|
2571
|
-
(
|
|
2609
|
+
sendRequest: (f, ...S) => {
|
|
2610
|
+
var p;
|
|
2611
|
+
(p = n.value) == null || p.sendRequest(f, ...S);
|
|
2572
2612
|
}
|
|
2573
|
-
}), () =>
|
|
2613
|
+
}), () => d(De, x({
|
|
2574
2614
|
ref: n
|
|
2575
2615
|
}, H(e, g), {
|
|
2576
2616
|
elementMap: e.elementMap || o,
|
|
2577
2617
|
state: c,
|
|
2578
2618
|
requests: b
|
|
2579
2619
|
}), {
|
|
2580
|
-
default: () => [
|
|
2620
|
+
default: () => [d(yt, x({
|
|
2581
2621
|
ref: u
|
|
2582
|
-
},
|
|
2622
|
+
}, $(e, ...g, "curdState", "operates", "convertOperate"), {
|
|
2583
2623
|
formElementMap: e.formElementMap || a,
|
|
2584
|
-
operates:
|
|
2624
|
+
operates: i
|
|
2585
2625
|
}), t)]
|
|
2586
2626
|
});
|
|
2587
2627
|
}
|
|
2588
|
-
}),
|
|
2628
|
+
}), wr = () => ({
|
|
2589
2629
|
defaultAddRecord: {
|
|
2590
2630
|
type: Object
|
|
2591
2631
|
}
|
|
2592
|
-
}),
|
|
2632
|
+
}), Ve = w({
|
|
2593
2633
|
props: {
|
|
2594
|
-
...
|
|
2634
|
+
...wr()
|
|
2595
2635
|
},
|
|
2596
2636
|
setup: (e) => {
|
|
2597
|
-
var
|
|
2637
|
+
var S;
|
|
2598
2638
|
const {
|
|
2599
2639
|
dispatch: t,
|
|
2600
2640
|
sendRequest: r
|
|
2601
|
-
} =
|
|
2641
|
+
} = ge(), {
|
|
2602
2642
|
rowKey: o,
|
|
2603
2643
|
curdState: a,
|
|
2604
2644
|
listProps: n,
|
|
2605
2645
|
getOperate: u,
|
|
2606
2646
|
refreshList: c
|
|
2607
|
-
} =
|
|
2608
|
-
const
|
|
2609
|
-
|
|
2647
|
+
} = oe(), l = (S = n == null ? void 0 : n.value) == null ? void 0 : S.pageState, i = (p) => {
|
|
2648
|
+
const y = u(F.DETAIL);
|
|
2649
|
+
y != null && y.actor ? r(F.DETAIL, p, o) : t({
|
|
2610
2650
|
type: "detailData",
|
|
2611
|
-
payload:
|
|
2651
|
+
payload: Ct(p)
|
|
2612
2652
|
});
|
|
2613
|
-
}, b = (
|
|
2614
|
-
record:
|
|
2653
|
+
}, b = (p, {
|
|
2654
|
+
record: y
|
|
2615
2655
|
}) => {
|
|
2616
|
-
|
|
2656
|
+
p === k.EMIT && (t({
|
|
2617
2657
|
type: "mode",
|
|
2618
|
-
payload:
|
|
2619
|
-
}),
|
|
2620
|
-
}, g = (
|
|
2621
|
-
|
|
2658
|
+
payload: me.DETAIL
|
|
2659
|
+
}), i(y));
|
|
2660
|
+
}, g = (p) => {
|
|
2661
|
+
p === k.EMIT ? (t({
|
|
2622
2662
|
type: "mode",
|
|
2623
|
-
payload:
|
|
2663
|
+
payload: me.ADD
|
|
2624
2664
|
}), t({
|
|
2625
2665
|
type: "detailData",
|
|
2626
2666
|
payload: e.defaultAddRecord || {}
|
|
2627
|
-
})) :
|
|
2667
|
+
})) : p === k.SUCCESS && (l && (l.page = 1), c(), a.addAction === Ae.CONTINUE ? t({
|
|
2628
2668
|
type: "detailData",
|
|
2629
2669
|
payload: e.defaultAddRecord || {}
|
|
2630
2670
|
}) : t({
|
|
2631
2671
|
type: "mode",
|
|
2632
2672
|
payload: void 0
|
|
2633
2673
|
}));
|
|
2634
|
-
},
|
|
2635
|
-
record:
|
|
2674
|
+
}, f = (p, {
|
|
2675
|
+
record: y
|
|
2636
2676
|
}) => {
|
|
2637
|
-
|
|
2677
|
+
p === k.EMIT ? (t({
|
|
2638
2678
|
type: "mode",
|
|
2639
|
-
payload:
|
|
2640
|
-
}),
|
|
2679
|
+
payload: me.EDIT
|
|
2680
|
+
}), i(y)) : p === k.SUCCESS && (t({
|
|
2641
2681
|
type: "mode",
|
|
2642
2682
|
payload: void 0
|
|
2643
2683
|
}), c());
|
|
2644
2684
|
};
|
|
2645
|
-
return
|
|
2646
|
-
type:
|
|
2647
|
-
payload:
|
|
2648
|
-
source:
|
|
2685
|
+
return Je(({
|
|
2686
|
+
type: p,
|
|
2687
|
+
payload: y,
|
|
2688
|
+
source: T
|
|
2649
2689
|
}) => {
|
|
2650
|
-
if (
|
|
2690
|
+
if (T)
|
|
2651
2691
|
return;
|
|
2652
|
-
let
|
|
2653
|
-
const
|
|
2654
|
-
switch (
|
|
2655
|
-
case
|
|
2656
|
-
b(
|
|
2657
|
-
record:
|
|
2692
|
+
let N = p, s = y == null ? void 0 : y.type;
|
|
2693
|
+
const h = y == null ? void 0 : y.record;
|
|
2694
|
+
switch (N === Ie.Success && (N = m(y, ["requestOpts", "action"]), s = k.SUCCESS), N) {
|
|
2695
|
+
case F.DETAIL:
|
|
2696
|
+
b(s, {
|
|
2697
|
+
record: h
|
|
2658
2698
|
});
|
|
2659
2699
|
break;
|
|
2660
|
-
case
|
|
2661
|
-
g(
|
|
2700
|
+
case F.ADD:
|
|
2701
|
+
g(s);
|
|
2662
2702
|
break;
|
|
2663
|
-
case
|
|
2664
|
-
|
|
2665
|
-
record:
|
|
2703
|
+
case F.EDIT:
|
|
2704
|
+
f(s, {
|
|
2705
|
+
record: h
|
|
2666
2706
|
});
|
|
2667
2707
|
break;
|
|
2668
2708
|
}
|
|
2669
2709
|
}), () => null;
|
|
2670
2710
|
}
|
|
2671
|
-
}),
|
|
2711
|
+
}), Ta = w({
|
|
2672
2712
|
props: {
|
|
2673
|
-
...
|
|
2674
|
-
...
|
|
2713
|
+
...He.props,
|
|
2714
|
+
...Ve.props
|
|
2675
2715
|
},
|
|
2676
2716
|
setup: (e, {
|
|
2677
2717
|
slots: t,
|
|
2678
2718
|
expose: r
|
|
2679
2719
|
}) => {
|
|
2680
|
-
const o =
|
|
2681
|
-
r(
|
|
2682
|
-
const a = W(
|
|
2683
|
-
return () => u ?
|
|
2720
|
+
const o = V();
|
|
2721
|
+
r(Se(nn, o));
|
|
2722
|
+
const a = W(Ve.props), u = Q()(U.ProCurdKey);
|
|
2723
|
+
return () => u ? d(u, x({
|
|
2684
2724
|
ref: o
|
|
2685
|
-
},
|
|
2725
|
+
}, $(e, a)), {
|
|
2686
2726
|
default: () => {
|
|
2687
2727
|
var c;
|
|
2688
|
-
return [
|
|
2728
|
+
return [d(Ve, H(e, a), null), (c = t.default) == null ? void 0 : c.call(t)];
|
|
2689
2729
|
}
|
|
2690
2730
|
}) : null;
|
|
2691
2731
|
}
|
|
2692
|
-
}),
|
|
2732
|
+
}), xr = () => ({
|
|
2693
2733
|
defaultAddRecord: {
|
|
2694
2734
|
type: Object
|
|
2695
2735
|
},
|
|
2696
2736
|
routeBack: {
|
|
2697
2737
|
type: Function
|
|
2698
2738
|
}
|
|
2699
|
-
}),
|
|
2739
|
+
}), ze = w({
|
|
2700
2740
|
props: {
|
|
2701
|
-
...
|
|
2741
|
+
...xr()
|
|
2702
2742
|
},
|
|
2703
2743
|
setup: (e) => {
|
|
2704
|
-
const t =
|
|
2744
|
+
const t = _e(), r = Ye(), {
|
|
2705
2745
|
dispatch: o,
|
|
2706
2746
|
sendRequest: a
|
|
2707
|
-
} =
|
|
2747
|
+
} = ge(), {
|
|
2708
2748
|
rowKey: n,
|
|
2709
2749
|
curdState: u
|
|
2710
|
-
} =
|
|
2711
|
-
g ===
|
|
2750
|
+
} = oe(), c = (g) => {
|
|
2751
|
+
g === k.PAGE && (o({
|
|
2712
2752
|
type: "mode",
|
|
2713
2753
|
payload: void 0
|
|
2714
2754
|
}), o({
|
|
@@ -2721,111 +2761,111 @@ const Nr = () => ({
|
|
|
2721
2761
|
type: "addAction",
|
|
2722
2762
|
payload: void 0
|
|
2723
2763
|
}));
|
|
2724
|
-
},
|
|
2725
|
-
record:
|
|
2764
|
+
}, l = (g, {
|
|
2765
|
+
record: f
|
|
2726
2766
|
}) => {
|
|
2727
|
-
g ===
|
|
2767
|
+
g === k.EMIT ? t.push({
|
|
2728
2768
|
path: `${r.path}/detail`,
|
|
2729
|
-
query: H(
|
|
2730
|
-
}) : g ===
|
|
2769
|
+
query: H(f, n)
|
|
2770
|
+
}) : g === k.PAGE && (o({
|
|
2731
2771
|
type: "mode",
|
|
2732
|
-
payload:
|
|
2733
|
-
}), a(
|
|
2734
|
-
},
|
|
2735
|
-
g ===
|
|
2772
|
+
payload: me.DETAIL
|
|
2773
|
+
}), a(F.DETAIL, r.query, n));
|
|
2774
|
+
}, i = (g) => {
|
|
2775
|
+
g === k.EMIT ? t.push({
|
|
2736
2776
|
path: `${r.path}/add`
|
|
2737
|
-
}) : g ===
|
|
2777
|
+
}) : g === k.PAGE ? (o({
|
|
2738
2778
|
type: "mode",
|
|
2739
|
-
payload:
|
|
2779
|
+
payload: me.ADD
|
|
2740
2780
|
}), o({
|
|
2741
2781
|
type: "detailData",
|
|
2742
2782
|
payload: e.defaultAddRecord || {}
|
|
2743
|
-
})) : g ===
|
|
2783
|
+
})) : g === k.SUCCESS && (u.addAction === Ae.CONTINUE ? o({
|
|
2744
2784
|
type: "detailData",
|
|
2745
2785
|
payload: e.defaultAddRecord || {}
|
|
2746
|
-
}) : e.routeBack ? e.routeBack(
|
|
2786
|
+
}) : e.routeBack ? e.routeBack(F.ADD) : t.go(-1));
|
|
2747
2787
|
}, b = (g, {
|
|
2748
|
-
record:
|
|
2788
|
+
record: f
|
|
2749
2789
|
}) => {
|
|
2750
|
-
g ===
|
|
2790
|
+
g === k.EMIT ? t.push({
|
|
2751
2791
|
path: `${r.path}/edit`,
|
|
2752
|
-
query: H(
|
|
2753
|
-
}) : g ===
|
|
2792
|
+
query: H(f, n)
|
|
2793
|
+
}) : g === k.PAGE ? (o({
|
|
2754
2794
|
type: "mode",
|
|
2755
|
-
payload:
|
|
2756
|
-
}), a(
|
|
2795
|
+
payload: me.EDIT
|
|
2796
|
+
}), a(F.DETAIL, r.query, n)) : g === k.SUCCESS && (e.routeBack ? e.routeBack(F.EDIT) : t.go(-1));
|
|
2757
2797
|
};
|
|
2758
|
-
return
|
|
2798
|
+
return Je(({
|
|
2759
2799
|
type: g,
|
|
2760
|
-
payload:
|
|
2761
|
-
source:
|
|
2800
|
+
payload: f,
|
|
2801
|
+
source: S
|
|
2762
2802
|
}) => {
|
|
2763
|
-
if (
|
|
2803
|
+
if (S)
|
|
2764
2804
|
return;
|
|
2765
|
-
let
|
|
2766
|
-
const
|
|
2767
|
-
switch (
|
|
2768
|
-
case
|
|
2769
|
-
c(
|
|
2805
|
+
let p = g, y = f == null ? void 0 : f.type;
|
|
2806
|
+
const T = f == null ? void 0 : f.record;
|
|
2807
|
+
switch (p === Ie.Success && (p = m(f, ["requestOpts", "action"]), y = k.SUCCESS), p) {
|
|
2808
|
+
case F.LIST:
|
|
2809
|
+
c(y);
|
|
2770
2810
|
break;
|
|
2771
|
-
case
|
|
2772
|
-
|
|
2773
|
-
record:
|
|
2811
|
+
case F.DETAIL:
|
|
2812
|
+
l(y, {
|
|
2813
|
+
record: T
|
|
2774
2814
|
});
|
|
2775
2815
|
break;
|
|
2776
|
-
case
|
|
2777
|
-
|
|
2816
|
+
case F.ADD:
|
|
2817
|
+
i(y);
|
|
2778
2818
|
break;
|
|
2779
|
-
case
|
|
2780
|
-
b(
|
|
2781
|
-
record:
|
|
2819
|
+
case F.EDIT:
|
|
2820
|
+
b(y, {
|
|
2821
|
+
record: T
|
|
2782
2822
|
});
|
|
2783
2823
|
break;
|
|
2784
2824
|
}
|
|
2785
2825
|
}), () => null;
|
|
2786
2826
|
}
|
|
2787
|
-
}),
|
|
2827
|
+
}), Ia = w({
|
|
2788
2828
|
props: {
|
|
2789
|
-
...
|
|
2790
|
-
...
|
|
2829
|
+
...He.props,
|
|
2830
|
+
...ze.props
|
|
2791
2831
|
},
|
|
2792
2832
|
setup: (e, {
|
|
2793
2833
|
slots: t,
|
|
2794
2834
|
expose: r
|
|
2795
2835
|
}) => {
|
|
2796
|
-
const o =
|
|
2797
|
-
r(
|
|
2798
|
-
const a = W(
|
|
2799
|
-
return () =>
|
|
2836
|
+
const o = V();
|
|
2837
|
+
r(Se(nn, o));
|
|
2838
|
+
const a = W(ze.props);
|
|
2839
|
+
return () => d(He, x({
|
|
2800
2840
|
ref: o
|
|
2801
|
-
},
|
|
2841
|
+
}, $(e, a)), {
|
|
2802
2842
|
default: () => {
|
|
2803
2843
|
var n;
|
|
2804
|
-
return [
|
|
2844
|
+
return [d(ze, H(e, a), null), (n = t.default) == null ? void 0 : n.call(t)];
|
|
2805
2845
|
}
|
|
2806
2846
|
});
|
|
2807
2847
|
}
|
|
2808
|
-
}),
|
|
2848
|
+
}), vt = w({
|
|
2809
2849
|
props: {
|
|
2810
2850
|
buttonProps: Object
|
|
2811
2851
|
},
|
|
2812
2852
|
setup: (e, {
|
|
2813
2853
|
slots: t
|
|
2814
2854
|
}) => {
|
|
2815
|
-
const r =
|
|
2855
|
+
const r = Qt(), {
|
|
2816
2856
|
getOperate: o,
|
|
2817
2857
|
sendCurdEvent: a
|
|
2818
|
-
} =
|
|
2858
|
+
} = oe(), n = o(F.ADD), u = () => {
|
|
2819
2859
|
if (n != null && n.onClick) {
|
|
2820
2860
|
n.onClick();
|
|
2821
2861
|
return;
|
|
2822
2862
|
}
|
|
2823
2863
|
a({
|
|
2824
|
-
action:
|
|
2825
|
-
type:
|
|
2864
|
+
action: F.ADD,
|
|
2865
|
+
type: k.EMIT
|
|
2826
2866
|
});
|
|
2827
|
-
},
|
|
2828
|
-
return () => !n || !r(n.per, n.perSuffix) || !(z(n.show) ? n.show({}) : n.show) ? null : n.element ? n.element({}, n) : t.default ? t.default(n, u) :
|
|
2867
|
+
}, l = Q()(U.ButtonKey);
|
|
2868
|
+
return () => !n || !r(n.per, n.perSuffix) || !(z(n.show) ? n.show({}) : n.show) ? null : n.element ? n.element({}, n) : t.default ? t.default(n, u) : l ? d(l, x({
|
|
2829
2869
|
class: "pro-curd-add-button",
|
|
2830
2870
|
disabled: z(n.disabled) ? n.disabled() : n.disabled
|
|
2831
2871
|
}, e.buttonProps, {
|
|
@@ -2834,7 +2874,7 @@ const Nr = () => ({
|
|
|
2834
2874
|
default: () => [n.label]
|
|
2835
2875
|
}) : null;
|
|
2836
2876
|
}
|
|
2837
|
-
}),
|
|
2877
|
+
}), ht = () => ({
|
|
2838
2878
|
addConfig: {
|
|
2839
2879
|
type: Object,
|
|
2840
2880
|
default: {
|
|
@@ -2845,10 +2885,10 @@ const Nr = () => ({
|
|
|
2845
2885
|
type: Boolean,
|
|
2846
2886
|
default: !0
|
|
2847
2887
|
}
|
|
2848
|
-
}),
|
|
2888
|
+
}), Fr = w({
|
|
2849
2889
|
props: {
|
|
2850
|
-
...
|
|
2851
|
-
...
|
|
2890
|
+
...pr.props,
|
|
2891
|
+
...ht()
|
|
2852
2892
|
},
|
|
2853
2893
|
setup: (e, {
|
|
2854
2894
|
slots: t
|
|
@@ -2860,99 +2900,99 @@ const Nr = () => ({
|
|
|
2860
2900
|
searchColumns: n,
|
|
2861
2901
|
tableColumns: u,
|
|
2862
2902
|
sendCurdEvent: c,
|
|
2863
|
-
operates:
|
|
2864
|
-
refreshList:
|
|
2865
|
-
} =
|
|
2866
|
-
Y(
|
|
2867
|
-
const
|
|
2868
|
-
return
|
|
2903
|
+
operates: l,
|
|
2904
|
+
refreshList: i
|
|
2905
|
+
} = oe(), b = D(
|
|
2906
|
+
Y(l, (s) => {
|
|
2907
|
+
const h = s.action;
|
|
2908
|
+
return h === F.DETAIL || h === F.EDIT || h === F.DELETE || s.tableOperate;
|
|
2869
2909
|
}),
|
|
2870
|
-
(
|
|
2871
|
-
const
|
|
2872
|
-
...H(
|
|
2873
|
-
value:
|
|
2910
|
+
(s) => {
|
|
2911
|
+
const h = {
|
|
2912
|
+
...H(s, "label", "show", "disabled", "loading", "extraProps", "onClick", "element", "sort", "per", "perSuffix"),
|
|
2913
|
+
value: s.action
|
|
2874
2914
|
};
|
|
2875
|
-
return
|
|
2915
|
+
return h.onClick || (h.onClick = (E) => {
|
|
2876
2916
|
c({
|
|
2877
|
-
action:
|
|
2878
|
-
type:
|
|
2879
|
-
record:
|
|
2917
|
+
action: s.action,
|
|
2918
|
+
type: k.EMIT,
|
|
2919
|
+
record: E
|
|
2880
2920
|
});
|
|
2881
|
-
}),
|
|
2921
|
+
}), h;
|
|
2882
2922
|
}
|
|
2883
|
-
), g = (
|
|
2923
|
+
), g = (s) => {
|
|
2884
2924
|
c({
|
|
2885
|
-
action:
|
|
2886
|
-
type:
|
|
2887
|
-
values:
|
|
2925
|
+
action: F.LIST,
|
|
2926
|
+
type: k.EMIT,
|
|
2927
|
+
values: s
|
|
2888
2928
|
});
|
|
2889
2929
|
};
|
|
2890
|
-
|
|
2891
|
-
e.activatedRefresh &&
|
|
2930
|
+
$n(() => {
|
|
2931
|
+
e.activatedRefresh && i();
|
|
2892
2932
|
});
|
|
2893
|
-
const
|
|
2933
|
+
const f = A(() => ({
|
|
2894
2934
|
formElementMap: o,
|
|
2895
2935
|
columns: n.value,
|
|
2896
2936
|
...e.searchProps
|
|
2897
|
-
})),
|
|
2898
|
-
var
|
|
2937
|
+
})), S = A(() => {
|
|
2938
|
+
var s, h;
|
|
2899
2939
|
return {
|
|
2900
2940
|
elementMap: r,
|
|
2901
2941
|
columns: u.value,
|
|
2902
2942
|
loading: a.listLoading,
|
|
2903
|
-
dataSource: (
|
|
2904
|
-
|
|
2943
|
+
dataSource: (s = a.listData) == null ? void 0 : s.dataSource,
|
|
2944
|
+
...$(e.tableProps, "operate"),
|
|
2905
2945
|
operate: {
|
|
2906
2946
|
items: b,
|
|
2907
|
-
...(
|
|
2947
|
+
...(h = e.tableProps) == null ? void 0 : h.operate
|
|
2908
2948
|
}
|
|
2909
2949
|
};
|
|
2910
|
-
}),
|
|
2911
|
-
var
|
|
2950
|
+
}), p = A(() => {
|
|
2951
|
+
var s;
|
|
2912
2952
|
return e.paginationProps === !1 ? !1 : {
|
|
2913
|
-
total: (
|
|
2953
|
+
total: (s = a.listData) == null ? void 0 : s.total,
|
|
2914
2954
|
...e.paginationProps
|
|
2915
2955
|
};
|
|
2916
|
-
}),
|
|
2956
|
+
}), y = W(ht()), N = Q()(U.ProListKey);
|
|
2917
2957
|
return () => {
|
|
2918
|
-
var
|
|
2919
|
-
return
|
|
2958
|
+
var s, h;
|
|
2959
|
+
return N ? d(N, x({
|
|
2920
2960
|
class: "pro-curd-list"
|
|
2921
|
-
},
|
|
2922
|
-
searchProps:
|
|
2923
|
-
tableProps:
|
|
2924
|
-
paginationProps:
|
|
2961
|
+
}, $(e, ...y, "searchProps", "tableProps", "paginationProps"), {
|
|
2962
|
+
searchProps: f.value,
|
|
2963
|
+
tableProps: S.value,
|
|
2964
|
+
paginationProps: p.value,
|
|
2925
2965
|
onSearch: g
|
|
2926
2966
|
}), {
|
|
2927
|
-
"search-end": (
|
|
2928
|
-
var
|
|
2929
|
-
return
|
|
2967
|
+
"search-end": (s = e.addConfig) != null && s.inSearch ? () => {
|
|
2968
|
+
var E;
|
|
2969
|
+
return d("div", {
|
|
2930
2970
|
class: "pro-curd-list-search-end"
|
|
2931
|
-
}, [
|
|
2971
|
+
}, [d(vt, (E = e.addConfig) == null ? void 0 : E.buttonProps, null)]);
|
|
2932
2972
|
} : void 0,
|
|
2933
|
-
"table-toolbarExtra": (
|
|
2934
|
-
var
|
|
2935
|
-
return
|
|
2973
|
+
"table-toolbarExtra": (h = e.addConfig) != null && h.inTable ? (E) => {
|
|
2974
|
+
var I;
|
|
2975
|
+
return d(de, null, [d(vt, (I = e.addConfig) == null ? void 0 : I.buttonProps, null), E]);
|
|
2936
2976
|
} : void 0,
|
|
2937
2977
|
...t,
|
|
2938
|
-
search: t.search ? (
|
|
2939
|
-
table: t.table ? (
|
|
2940
|
-
pagination: t.pagination ? (
|
|
2978
|
+
search: t.search ? (E) => t.search(E, f.value) : void 0,
|
|
2979
|
+
table: t.table ? (E) => t.table(E, S.value) : void 0,
|
|
2980
|
+
pagination: t.pagination ? (E) => t.pagination(E, p.value) : void 0
|
|
2941
2981
|
}) : null;
|
|
2942
2982
|
};
|
|
2943
2983
|
}
|
|
2944
|
-
}),
|
|
2984
|
+
}), Na = w(() => {
|
|
2945
2985
|
const {
|
|
2946
2986
|
listProps: e
|
|
2947
|
-
} =
|
|
2948
|
-
return () =>
|
|
2949
|
-
}),
|
|
2987
|
+
} = oe();
|
|
2988
|
+
return () => d(Fr, $(e == null ? void 0 : e.value, "slots"), m(e == null ? void 0 : e.value, "slots"));
|
|
2989
|
+
}), Dr = () => ({
|
|
2950
2990
|
signName: {
|
|
2951
2991
|
type: String
|
|
2952
2992
|
}
|
|
2953
|
-
}),
|
|
2993
|
+
}), tt = w({
|
|
2954
2994
|
props: {
|
|
2955
|
-
...
|
|
2995
|
+
...Dr()
|
|
2956
2996
|
},
|
|
2957
2997
|
setup: (e, {
|
|
2958
2998
|
slots: t,
|
|
@@ -2964,78 +3004,78 @@ const Nr = () => ({
|
|
|
2964
3004
|
formElementMap: n,
|
|
2965
3005
|
curdState: u,
|
|
2966
3006
|
formColumns: c,
|
|
2967
|
-
getSignColumns:
|
|
2968
|
-
sendCurdEvent:
|
|
2969
|
-
} =
|
|
2970
|
-
r(
|
|
2971
|
-
const g =
|
|
2972
|
-
var
|
|
2973
|
-
u.addAction =
|
|
2974
|
-
},
|
|
2975
|
-
var
|
|
2976
|
-
u.addAction =
|
|
2977
|
-
},
|
|
3007
|
+
getSignColumns: l,
|
|
3008
|
+
sendCurdEvent: i
|
|
3009
|
+
} = oe(), b = V();
|
|
3010
|
+
r(Se(e.formMethods || [], b));
|
|
3011
|
+
const g = A(() => e.signName ? l(e.signName) : c.value), f = () => {
|
|
3012
|
+
var s;
|
|
3013
|
+
u.addAction = Ae.NORMAL, (s = b.value) == null || s.submit();
|
|
3014
|
+
}, S = () => {
|
|
3015
|
+
var s;
|
|
3016
|
+
u.addAction = Ae.CONTINUE, (s = b.value) == null || s.submit();
|
|
3017
|
+
}, p = [
|
|
2978
3018
|
{
|
|
2979
|
-
value:
|
|
3019
|
+
value: re.RESET,
|
|
2980
3020
|
label: "\u91CD\u7F6E"
|
|
2981
3021
|
},
|
|
2982
3022
|
{
|
|
2983
|
-
value:
|
|
3023
|
+
value: re.SUBMIT,
|
|
2984
3024
|
label: "\u63D0\u4EA4",
|
|
2985
3025
|
extraProps: {
|
|
2986
3026
|
type: "primary"
|
|
2987
3027
|
}
|
|
2988
3028
|
},
|
|
2989
3029
|
{
|
|
2990
|
-
value:
|
|
3030
|
+
value: re.CONTINUE,
|
|
2991
3031
|
label: "\u786E\u5B9A\u5E76\u7EE7\u7EED",
|
|
2992
3032
|
extraProps: {
|
|
2993
3033
|
type: "primary"
|
|
2994
3034
|
},
|
|
2995
3035
|
show: !1
|
|
2996
3036
|
}
|
|
2997
|
-
],
|
|
2998
|
-
o.onFinish || (u.mode ===
|
|
2999
|
-
action:
|
|
3000
|
-
type:
|
|
3001
|
-
values:
|
|
3002
|
-
}) :
|
|
3003
|
-
action:
|
|
3004
|
-
type:
|
|
3005
|
-
values:
|
|
3037
|
+
], y = (s) => {
|
|
3038
|
+
o.onFinish || (u.mode === F.EDIT ? i({
|
|
3039
|
+
action: F.EDIT,
|
|
3040
|
+
type: k.EXECUTE,
|
|
3041
|
+
values: s
|
|
3042
|
+
}) : i({
|
|
3043
|
+
action: F.ADD,
|
|
3044
|
+
type: k.EXECUTE,
|
|
3045
|
+
values: s
|
|
3006
3046
|
}));
|
|
3007
|
-
},
|
|
3008
|
-
return () =>
|
|
3047
|
+
}, N = Q()(U.ProFormKey);
|
|
3048
|
+
return () => N ? d(N, x({
|
|
3009
3049
|
ref: b,
|
|
3010
3050
|
class: "pro-curd-form"
|
|
3011
|
-
},
|
|
3051
|
+
}, $(e, "operate"), {
|
|
3012
3052
|
elementMap: e.elementMap || a,
|
|
3013
3053
|
formElementMap: e.formElementMap || n,
|
|
3014
3054
|
columns: e.columns || g.value,
|
|
3015
|
-
readonly: u.mode ===
|
|
3055
|
+
readonly: u.mode === F.DETAIL,
|
|
3016
3056
|
model: e.model || u.detailData,
|
|
3017
|
-
hideRequiredMark: u.mode ===
|
|
3057
|
+
hideRequiredMark: u.mode === F.DETAIL,
|
|
3018
3058
|
operate: e.operate ? {
|
|
3019
|
-
items:
|
|
3020
|
-
onSubmit:
|
|
3021
|
-
onContinue:
|
|
3059
|
+
items: p,
|
|
3060
|
+
onSubmit: f,
|
|
3061
|
+
onContinue: S,
|
|
3022
3062
|
...e.operate
|
|
3023
3063
|
} : void 0,
|
|
3024
|
-
onFinish:
|
|
3064
|
+
onFinish: y
|
|
3025
3065
|
}), t) : null;
|
|
3026
3066
|
}
|
|
3027
|
-
}),
|
|
3067
|
+
}), Aa = w(() => {
|
|
3028
3068
|
const {
|
|
3029
3069
|
formProps: e
|
|
3030
|
-
} =
|
|
3031
|
-
return () =>
|
|
3032
|
-
}),
|
|
3070
|
+
} = oe();
|
|
3071
|
+
return () => d(tt, $(e == null ? void 0 : e.value, "slots"), m(e == null ? void 0 : e.value, "slots"));
|
|
3072
|
+
}), Kr = () => ({
|
|
3033
3073
|
signName: {
|
|
3034
3074
|
type: String
|
|
3035
3075
|
}
|
|
3036
|
-
}),
|
|
3076
|
+
}), Rr = w({
|
|
3037
3077
|
props: {
|
|
3038
|
-
...
|
|
3078
|
+
...Kr()
|
|
3039
3079
|
},
|
|
3040
3080
|
setup: (e, {
|
|
3041
3081
|
slots: t
|
|
@@ -3044,23 +3084,23 @@ const Nr = () => ({
|
|
|
3044
3084
|
curdState: r,
|
|
3045
3085
|
descColumns: o,
|
|
3046
3086
|
getSignColumns: a
|
|
3047
|
-
} =
|
|
3048
|
-
return () =>
|
|
3087
|
+
} = oe(), n = A(() => e.signName ? a(e.signName) : o.value);
|
|
3088
|
+
return () => d(Cr, x($(e, "signName", "model", "columns"), {
|
|
3049
3089
|
model: e.model || r.detailData,
|
|
3050
3090
|
columns: n.value
|
|
3051
3091
|
}), t);
|
|
3052
3092
|
}
|
|
3053
|
-
}),
|
|
3093
|
+
}), Oa = w(() => {
|
|
3054
3094
|
const {
|
|
3055
3095
|
descProps: e
|
|
3056
|
-
} =
|
|
3057
|
-
return () =>
|
|
3096
|
+
} = oe();
|
|
3097
|
+
return () => d(Rr, x({
|
|
3058
3098
|
class: "pro-curd-desc"
|
|
3059
|
-
},
|
|
3060
|
-
}),
|
|
3099
|
+
}, $(e == null ? void 0 : e.value, "slots")), m(e == null ? void 0 : e.value, "slots"));
|
|
3100
|
+
}), bt = () => ({
|
|
3061
3101
|
validMode: {
|
|
3062
3102
|
type: Array,
|
|
3063
|
-
default: [
|
|
3103
|
+
default: [F.ADD, F.DETAIL, F.EDIT]
|
|
3064
3104
|
},
|
|
3065
3105
|
loadingOpts: {
|
|
3066
3106
|
type: Object
|
|
@@ -3068,48 +3108,48 @@ const Nr = () => ({
|
|
|
3068
3108
|
overrideProps: {
|
|
3069
3109
|
type: Object
|
|
3070
3110
|
}
|
|
3071
|
-
}),
|
|
3111
|
+
}), rn = w({
|
|
3072
3112
|
props: {
|
|
3073
|
-
...
|
|
3113
|
+
...bt()
|
|
3074
3114
|
},
|
|
3075
3115
|
setup: (e, {
|
|
3076
3116
|
slots: t
|
|
3077
3117
|
}) => {
|
|
3078
|
-
const r =
|
|
3118
|
+
const r = Q(), o = r(U.ModalKey), a = r(U.LoadingKey), {
|
|
3079
3119
|
curdState: n,
|
|
3080
3120
|
getOperate: u
|
|
3081
|
-
} =
|
|
3082
|
-
n.mode = void 0,
|
|
3083
|
-
},
|
|
3121
|
+
} = oe(), c = () => {
|
|
3122
|
+
n.mode = void 0, Et(n.detailData, {}), n.detailLoading = !1, n.addAction = void 0;
|
|
3123
|
+
}, l = W(bt());
|
|
3084
3124
|
return () => {
|
|
3085
3125
|
var b;
|
|
3086
|
-
const
|
|
3087
|
-
return !
|
|
3126
|
+
const i = n.mode;
|
|
3127
|
+
return !ye(e.validMode, (g) => g === i) || !o ? null : d(o, x({
|
|
3088
3128
|
class: "pro-curd-modal"
|
|
3089
|
-
},
|
|
3090
|
-
visible:
|
|
3129
|
+
}, $(e, l), {
|
|
3130
|
+
visible: ye(e.validMode, (g) => g === i),
|
|
3091
3131
|
title: e.title || ((b = u(n.mode)) == null ? void 0 : b.label),
|
|
3092
3132
|
confirmLoading: n.operateLoading,
|
|
3093
|
-
maskClosable: n.mode ===
|
|
3094
|
-
footer: n.mode ===
|
|
3133
|
+
maskClosable: n.mode === F.DETAIL,
|
|
3134
|
+
footer: n.detailLoading || n.mode === F.DETAIL ? !1 : void 0
|
|
3095
3135
|
}, e.overrideProps, {
|
|
3096
3136
|
onCancel: c
|
|
3097
3137
|
}), {
|
|
3098
3138
|
default: () => {
|
|
3099
3139
|
var g;
|
|
3100
|
-
return [n.detailLoading && a ?
|
|
3140
|
+
return [n.detailLoading && a ? d(a, x({
|
|
3101
3141
|
loading: !0
|
|
3102
3142
|
}, e.loadingOpts), {
|
|
3103
|
-
default: () => [
|
|
3143
|
+
default: () => [d("div", {
|
|
3104
3144
|
class: "pro-curd-modal-loading-dom"
|
|
3105
3145
|
}, null)]
|
|
3106
3146
|
}) : (g = t.default) == null ? void 0 : g.call(t)];
|
|
3107
3147
|
},
|
|
3108
|
-
|
|
3148
|
+
...$(t, "default")
|
|
3109
3149
|
});
|
|
3110
3150
|
};
|
|
3111
3151
|
}
|
|
3112
|
-
}),
|
|
3152
|
+
}), $a = w({
|
|
3113
3153
|
props: {
|
|
3114
3154
|
modalProps: Object,
|
|
3115
3155
|
formProps: Object
|
|
@@ -3117,137 +3157,142 @@ const Nr = () => ({
|
|
|
3117
3157
|
setup: (e, {
|
|
3118
3158
|
slots: t
|
|
3119
3159
|
}) => {
|
|
3120
|
-
const r =
|
|
3121
|
-
return () =>
|
|
3160
|
+
const r = V(), o = ie(t, "modal"), a = ie(t, "form");
|
|
3161
|
+
return () => d(rn, x(e.modalProps, {
|
|
3122
3162
|
onOk: () => {
|
|
3123
3163
|
var n;
|
|
3124
3164
|
(n = r.value) == null || n.submit();
|
|
3125
3165
|
}
|
|
3126
3166
|
}), {
|
|
3127
|
-
default: () => [
|
|
3167
|
+
default: () => [d(tt, x({
|
|
3128
3168
|
ref: r
|
|
3129
3169
|
}, e.formProps), a)],
|
|
3130
3170
|
...o
|
|
3131
3171
|
});
|
|
3132
3172
|
}
|
|
3133
|
-
}),
|
|
3173
|
+
}), wa = w(() => {
|
|
3134
3174
|
const {
|
|
3135
3175
|
modalProps: e,
|
|
3136
3176
|
formProps: t
|
|
3137
|
-
} =
|
|
3138
|
-
return () =>
|
|
3177
|
+
} = oe(), r = V();
|
|
3178
|
+
return () => d(rn, x($(e == null ? void 0 : e.value, "slots"), {
|
|
3139
3179
|
onOk: () => {
|
|
3140
3180
|
var o;
|
|
3141
3181
|
(o = r.value) == null || o.submit();
|
|
3142
3182
|
}
|
|
3143
3183
|
}), {
|
|
3144
|
-
default: () => [
|
|
3184
|
+
default: () => [d(tt, x({
|
|
3145
3185
|
ref: r
|
|
3146
|
-
},
|
|
3147
|
-
...
|
|
3186
|
+
}, $(t == null ? void 0 : t.value, "slots")), m(t == null ? void 0 : t.value, "slots"))],
|
|
3187
|
+
...m(e == null ? void 0 : e.value, "slots")
|
|
3148
3188
|
});
|
|
3149
3189
|
});
|
|
3150
3190
|
export {
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
pa as
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3191
|
+
vt as AddButton,
|
|
3192
|
+
yr as ColumnSetting,
|
|
3193
|
+
F as CurdAction,
|
|
3194
|
+
Ae as CurdAddAction,
|
|
3195
|
+
me as CurdCurrentMode,
|
|
3196
|
+
nn as CurdMethods,
|
|
3197
|
+
k as CurdSubAction,
|
|
3198
|
+
U as ElementKeys,
|
|
3199
|
+
re as FormAction,
|
|
3200
|
+
ua as FormRulePrefixMap,
|
|
3201
|
+
ia as LogonUser,
|
|
3202
|
+
_t as LogonUserKey,
|
|
3203
|
+
Ve as ModalCurdOpe,
|
|
3204
|
+
da as MustLogon,
|
|
3205
|
+
qe as PageHeader,
|
|
3206
|
+
fa as PerSuffix,
|
|
3207
|
+
ma as Permission,
|
|
3208
|
+
Yr as ProConfig,
|
|
3209
|
+
He as ProCurd,
|
|
3210
|
+
Rr as ProCurdDesc,
|
|
3211
|
+
Oa as ProCurdDescConnect,
|
|
3212
|
+
tt as ProCurdForm,
|
|
3213
|
+
Aa as ProCurdFormConnect,
|
|
3214
|
+
Fr as ProCurdList,
|
|
3215
|
+
Na as ProCurdListConnect,
|
|
3216
|
+
rn as ProCurdModal,
|
|
3217
|
+
$a as ProCurdModalForm,
|
|
3218
|
+
wa as ProCurdModalFormConnect,
|
|
3219
|
+
Cr as ProDesc,
|
|
3220
|
+
oa as ProForm,
|
|
3221
|
+
aa as ProFormList,
|
|
3222
|
+
Pe as ProGrid,
|
|
3223
|
+
pa as ProLayout,
|
|
3224
|
+
pr as ProList,
|
|
3225
|
+
Ta as ProModalCurd,
|
|
3226
|
+
De as ProModule,
|
|
3227
|
+
Jt as ProOperate,
|
|
3228
|
+
va as ProPage,
|
|
3229
|
+
Ia as ProPageCurd,
|
|
3230
|
+
ca as ProSearchForm,
|
|
3231
|
+
Pa as ProShowDate,
|
|
3232
|
+
ba as ProShowDigit,
|
|
3233
|
+
ga as ProShowOptions,
|
|
3234
|
+
Ue as ProShowText,
|
|
3235
|
+
Sa as ProShowTree,
|
|
3236
|
+
ya as ProTable,
|
|
3237
|
+
Tr as ProTypography,
|
|
3238
|
+
Ea as ProUploadList,
|
|
3239
|
+
Ca as ProUploaderText,
|
|
3240
|
+
ha as ProValue,
|
|
3241
|
+
Ie as RequestAction,
|
|
3242
|
+
Bn as RouterMethods,
|
|
3243
|
+
je as SearchMode,
|
|
3244
|
+
Zn as Wrapper,
|
|
3245
|
+
qt as convertPathToList,
|
|
3246
|
+
kn as convertResData,
|
|
3247
|
+
Se as createExpose,
|
|
3248
|
+
ra as createExposeObj,
|
|
3249
|
+
sa as createFormItemCompFn,
|
|
3250
|
+
Ma as createModule,
|
|
3251
|
+
Qr as createProConfig,
|
|
3252
|
+
Sr as defaultPage,
|
|
3253
|
+
ie as filterSlotsByPrefix,
|
|
3254
|
+
le as getColumnFormItemName,
|
|
3255
|
+
jt as getColumnValueType,
|
|
3256
|
+
Jn as getFirstPropName,
|
|
3257
|
+
Yn as getRealRender,
|
|
3258
|
+
rr as getSignValue,
|
|
3259
|
+
nr as getValidValues,
|
|
3260
|
+
Qn as isValidConfig,
|
|
3261
|
+
_n as isValidNode,
|
|
3262
|
+
ke as mergeState,
|
|
3263
|
+
na as mergeStateToList,
|
|
3264
|
+
be as proBaseProps,
|
|
3265
|
+
Or as provideProCurd,
|
|
3266
|
+
Ht as provideProFormList,
|
|
3267
|
+
Gn as provideProModule,
|
|
3268
|
+
Ze as renderColumn,
|
|
3269
|
+
Ne as renderElement,
|
|
3270
|
+
et as renderElements,
|
|
3271
|
+
kt as renderInputColumn,
|
|
3272
|
+
en as showValue,
|
|
3273
|
+
cr as useAccess,
|
|
3274
|
+
la as useAccessMgr,
|
|
3275
|
+
jn as useComposeRequestActor,
|
|
3276
|
+
ea as useDispatchMeta,
|
|
3277
|
+
Wn as useDispatchStore,
|
|
3278
|
+
Jr as useDoneRequestActor,
|
|
3279
|
+
Zr as useFailedRequestActor,
|
|
3280
|
+
or as useFormSubmit,
|
|
3281
|
+
Q as useGetCompByKey,
|
|
3282
|
+
Yt as useHasPer,
|
|
3283
|
+
Qt as useHasPer2,
|
|
3284
|
+
sr as useLogonUser,
|
|
3285
|
+
Un as useMetaRegister,
|
|
3286
|
+
Je as useModuleEvent,
|
|
3287
|
+
ne as useProConfig,
|
|
3288
|
+
oe as useProCurd,
|
|
3289
|
+
Gt as useProForm,
|
|
3290
|
+
zt as useProFormList,
|
|
3291
|
+
Xr as useProModal,
|
|
3292
|
+
ge as useProModule,
|
|
3293
|
+
Gr as useProMsg,
|
|
3294
|
+
_r as useProNotify,
|
|
3295
|
+
Rt as useProRouter,
|
|
3296
|
+
vr as useProTable,
|
|
3297
|
+
ta as useReadStore
|
|
3253
3298
|
};
|