@vue-start/pro 0.5.5 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,91 +1,94 @@
1
- var Dt = Object.defineProperty;
2
- var Mt = (e, t, n) => t in e ? Dt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var J = (e, t, n) => (Mt(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { defineComponent as N, provide as ae, inject as Q, ref as B, computed as w, h as ie, isVNode as be, reactive as ue, createVNode as y, Fragment as W, mergeProps as O, createTextVNode as Ue, toRef as Nt } from "vue";
5
- import { reduce as _, get as S, isFunction as k, map as R, isString as Te, forEach as Ie, size as H, set as oe, pick as q, omit as E, isArray as re, some as ce, keys as $, head as Ot, isObject as Se, filter as U, split as Lt, isEmpty as At, mergeWith as Kt, startsWith as Rt, mapKeys as wt, has as Qe, debounce as kt, clone as $t, isBoolean as ee, every as Ft, sortBy as Ye, cloneDeep as xt } from "lodash";
6
- import { Observable as jt, filter as ve, tap as Pe, merge as qt, Subject as Ut } from "rxjs";
7
- import { useEffect as Y, useState as ke, setReactiveValue as Ze, useRuleState as Oe, useWatch as et, useUpdateKey as Bt, useResizeObserver as Vt } from "@vue-start/hooks";
8
- import { useRequestProvide as ye, isDoneRequestActor as tt, isFailedRequestActor as nt } from "@vue-start/request";
9
- import { map as _t, distinctUntilChanged as Gt } from "rxjs/operators";
10
- import { useRouter as zt, useRoute as Wt } from "vue-router";
11
- const Ht = () => ({
1
+ var kt = Object.defineProperty;
2
+ var Ft = (e, t, r) => t in e ? kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var Z = (e, t, r) => (Ft(e, typeof t != "symbol" ? t + "" : t, r), r);
4
+ import { defineComponent as M, provide as oe, inject as te, ref as q, computed as A, h as ie, isVNode as de, reactive as he, createVNode as i, Fragment as Y, mergeProps as C, createTextVNode as Ye, toRef as jt } from "vue";
5
+ import { reduce as V, get as g, isFunction as j, map as K, isString as Ne, forEach as ge, size as W, set as ue, pick as R, omit as I, isArray as z, some as ae, keys as F, head as qt, isObject as Ee, filter as B, split as Ut, isEmpty as Bt, mergeWith as Vt, startsWith as _t, mapKeys as zt, has as Ue, debounce as Gt, clone as Ht, isBoolean as ne, every as Wt, sortBy as lt, isNumber as Xt, join as Be, findLast as Je, cloneDeep as Yt } from "lodash";
6
+ import { Observable as Jt, filter as Ce, tap as Me, merge as Qt, Subject as Zt } from "rxjs";
7
+ import { useEffect as J, useState as qe, setReactiveValue as it, useRuleState as we, useWatch as dt, useUpdateKey as en, useResizeObserver as tn, decimalFixed as nn, thousandDivision as rn, listToMap as an, treeToMap as on, getMenuTopNameMap as un, findTreeItem as Qe } from "@vue-start/hooks";
8
+ import { useRequestProvide as be, isDoneRequestActor as mt, isFailedRequestActor as ft } from "@vue-start/request";
9
+ import { map as sn, distinctUntilChanged as cn } from "rxjs/operators";
10
+ import { useRoute as Ve, useRouter as ln } from "vue-router";
11
+ import Ze from "dayjs";
12
+ const dn = () => ({
12
13
  elementMap: { type: Object },
13
14
  formElementMap: { type: Object },
14
15
  columns: { type: Array },
15
16
  columnState: { type: Object }
16
- }), de = Ht(), Xt = () => ({
17
+ }), me = dn(), mn = () => ({
17
18
  elementMap: { type: Object },
18
19
  formElementMap: { type: Object },
20
+ formExtraMap: { type: Object },
19
21
  registerStores: { type: Array },
20
22
  registerActors: { type: Array },
21
23
  registerMetas: { type: Array }
22
- }), $e = Symbol("pro-config"), Z = () => Q($e) || {}, Qn = N({
24
+ }), _e = Symbol("pro-config"), Q = () => te(_e) || {}, Mr = M({
23
25
  props: {
24
- ...Xt()
26
+ ...mn()
25
27
  },
26
28
  setup: (e, { slots: t }) => {
27
- const n = _(e.registerStores, (c, d) => ({ ...c, [d.key]: d }), {}), s = _(e.registerActors, (c, d) => ({ ...c, [d.actor.name]: d }), {}), o = _(e.registerMetas, (c, d) => ({ ...c, [d.actorName]: d }), {});
28
- dn(o, s);
29
- const { dispatchRequest: a } = ye(), r = (c, d, p) => {
30
- const h = S(s, c);
31
- if (!!h)
32
- return a(h.actor, d, p);
29
+ const r = V(e.registerStores, (s, d) => ({ ...s, [d.key]: d }), {}), o = V(e.registerActors, (s, d) => ({ ...s, [d.actor.name]: d }), {}), a = V(e.registerMetas, (s, d) => ({ ...s, [d.actorName]: d }), {});
30
+ Nn(a, o);
31
+ const { dispatchRequest: n } = be(), u = (s, d, f) => {
32
+ const v = g(o, s);
33
+ if (!!v)
34
+ return n(v.actor, d, f);
33
35
  };
34
- return ae($e, {
36
+ return oe(_e, {
35
37
  elementMap: e.elementMap,
36
38
  formElementMap: e.formElementMap,
37
- registerStoreMap: n,
38
- registerActorMap: s,
39
- registerMetaMap: o,
40
- dispatchRequest: r
39
+ formExtraMap: e.formExtraMap,
40
+ registerStoreMap: r,
41
+ registerActorMap: o,
42
+ registerMetaMap: a,
43
+ dispatchRequest: u
41
44
  }), () => {
42
- var c;
43
- return (c = t.default) == null ? void 0 : c.call(t);
45
+ var s;
46
+ return (s = t.default) == null ? void 0 : s.call(t);
44
47
  };
45
48
  }
46
- }), Yn = (e = {}) => (t) => {
47
- t.provide($e, e);
48
- }, Jt = Object.prototype.hasOwnProperty, Be = (e, t) => e === t ? e !== 0 || t !== 0 || 1 / e === 1 / t : e !== e && t !== t, Qt = (e, t) => {
49
- if (Be(e, t))
49
+ }), Tr = (e = {}) => (t) => {
50
+ t.provide(_e, e);
51
+ }, fn = Object.prototype.hasOwnProperty, et = (e, t) => e === t ? e !== 0 || t !== 0 || 1 / e === 1 / t : e !== e && t !== t, yn = (e, t) => {
52
+ if (et(e, t))
50
53
  return !0;
51
54
  if (typeof e != "object" || e === null || typeof t != "object" || t === null)
52
55
  return !1;
53
- const n = Object.keys(e), s = Object.keys(t);
54
- if (n.length !== s.length)
56
+ const r = Object.keys(e), o = Object.keys(t);
57
+ if (r.length !== o.length)
55
58
  return !1;
56
- for (let o = 0; o < n.length; o++)
57
- if (!Jt.call(t, n[o]) || !Be(e[n[o]], t[n[o]]))
59
+ for (let a = 0; a < r.length; a++)
60
+ if (!fn.call(t, r[a]) || !et(e[r[a]], t[r[a]]))
58
61
  return !1;
59
62
  return !0;
60
- }, Yt = "$store", De = () => Q(Yt), Zt = (e, t) => (n = {}, s) => {
61
- const o = typeof e == "function" ? e(s) : e;
62
- if (o === "")
63
- return n;
64
- const a = t(n[o], s), r = {};
65
- for (const c in n)
66
- c !== o && (r[c] = n[c]);
67
- return typeof a < "u" && (r[o] = a), r;
63
+ }, vn = "$store", De = () => te(vn), hn = (e, t) => (r = {}, o) => {
64
+ const a = typeof e == "function" ? e(o) : e;
65
+ if (a === "")
66
+ return r;
67
+ const n = t(r[a], o), u = {};
68
+ for (const s in r)
69
+ s !== a && (u[s] = r[s]);
70
+ return typeof n < "u" && (u[a] = n), u;
68
71
  };
69
- class en {
72
+ class gn {
70
73
  constructor(t) {
71
- J(this, "group");
72
- J(this, "name");
73
- J(this, "stage");
74
- J(this, "effect");
75
- J(this, "arg");
76
- J(this, "opts");
74
+ Z(this, "group");
75
+ Z(this, "name");
76
+ Z(this, "stage");
77
+ Z(this, "effect");
78
+ Z(this, "arg");
79
+ Z(this, "opts");
77
80
  this.group = t.group || "UN_GROUPED", this.name = t.name || "UN_NAMED", this.stage = t.stage, this.effect = t.effect, this.arg = t.arg || {}, this.opts = t.opts || {};
78
81
  }
79
82
  static of(t) {
80
83
  return new this({ group: t });
81
84
  }
82
- named(t, n) {
85
+ named(t, r) {
83
86
  return new this.constructor({
84
87
  ...this,
85
88
  name: t,
86
89
  opts: {
87
90
  ...this.opts,
88
- ...n
91
+ ...r
89
92
  }
90
93
  });
91
94
  }
@@ -101,16 +104,16 @@ class en {
101
104
  effect: t
102
105
  });
103
106
  }
104
- effectOn(t, n) {
105
- return this.effectWith(Zt(t, n));
107
+ effectOn(t, r) {
108
+ return this.effectWith(hn(t, r));
106
109
  }
107
- with(t, n) {
110
+ with(t, r) {
108
111
  return new this.constructor({
109
112
  ...this,
110
113
  arg: t,
111
114
  opts: {
112
115
  ...this.opts,
113
- ...n
116
+ ...r
114
117
  }
115
118
  });
116
119
  }
@@ -119,232 +122,232 @@ class en {
119
122
  }
120
123
  get type() {
121
124
  let t = !1;
122
- for (const n in this.opts)
123
- n !== "parentActor" && (this.opts[n], t = !0);
125
+ for (const r in this.opts)
126
+ r !== "parentActor" && (this.opts[r], t = !0);
124
127
  return `@@${this.group}/${this.name}${this.stage ? `::${this.stage}` : ""}${t ? `${JSON.stringify(this.opts)}` : ""}`;
125
128
  }
126
129
  is(t) {
127
- const n = this.isSameGroup(t) && t.name === this.name;
128
- return this.stage ? n && t.stage === this.stage : n;
130
+ const r = this.isSameGroup(t) && t.name === this.name;
131
+ return this.stage ? r && t.stage === this.stage : r;
129
132
  }
130
133
  isSameGroup(t) {
131
134
  return t.group === this.group;
132
135
  }
133
136
  }
134
- class Me extends jt {
135
- constructor(n, s, o = Qt) {
136
- super((a) => this.state$.pipe(
137
- _t((r) => {
138
- const c = this.mapper(r);
139
- return o(c, this._value) || (this._value = c), this._value;
137
+ class Ae extends Jt {
138
+ constructor(r, o, a = yn) {
139
+ super((n) => this.state$.pipe(
140
+ sn((u) => {
141
+ const s = this.mapper(u);
142
+ return a(s, this._value) || (this._value = s), this._value;
140
143
  }),
141
- Gt()
142
- ).subscribe(a));
143
- J(this, "_value");
144
- this.state$ = n, this.mapper = s;
144
+ cn()
145
+ ).subscribe(n));
146
+ Z(this, "_value");
147
+ this.state$ = r, this.mapper = o;
145
148
  }
146
- static from(n, s) {
147
- return new Me(n, s, s.equalFn);
149
+ static from(r, o) {
150
+ return new Ae(r, o, o.equalFn);
148
151
  }
149
152
  get value() {
150
153
  return typeof this._value > "u" && (this._value = this.mapper(this.state$.value)), this._value;
151
154
  }
152
155
  }
153
- const tn = (e, t) => {
154
- const [n, s] = ke(t || e.value);
155
- return Y(() => {
156
- const o = e.subscribe((a) => {
157
- s(a);
156
+ const bn = (e, t) => {
157
+ const [r, o] = qe(t || e.value);
158
+ return J(() => {
159
+ const a = e.subscribe((n) => {
160
+ o(n);
158
161
  });
159
162
  return () => {
160
- o && o.unsubscribe();
163
+ a && a.unsubscribe();
161
164
  };
162
- }, void 0), n;
163
- }, nn = (e, t) => {
164
- const n = B(t || e.value);
165
- return Y(() => {
166
- const s = e.subscribe((o) => {
167
- n.value = o;
165
+ }, void 0), r;
166
+ }, Sn = (e, t) => {
167
+ const r = q(t || e.value);
168
+ return J(() => {
169
+ const o = e.subscribe((a) => {
170
+ r.value = a;
168
171
  });
169
172
  return () => {
170
- s && s.unsubscribe();
173
+ o && o.unsubscribe();
171
174
  };
172
- }, []), n;
173
- }, rn = (e, t) => Me.from(e, t), an = (e) => rn(De(), e || ((t) => t)), on = en.of("state"), rt = on.named("update").effectOn(
175
+ }, []), r;
176
+ }, pn = (e, t) => Ae.from(e, t), Pn = (e) => pn(De(), e || ((t) => t)), En = gn.of("state"), yt = En.named("update").effectOn(
174
177
  (e) => e.opts.key,
175
178
  (e, t) => t.arg(e)
176
- ), at = () => {
179
+ ), vt = () => {
177
180
  const e = De();
178
- return (t, n, s, o) => {
179
- const a = `${s ? "$" : ""}${t}`, r = k(o) ? o() : o;
180
- rt.with(
181
- (c = r) => k(n) ? n(c) : n,
182
- { key: a }
181
+ return (t, r, o, a) => {
182
+ const n = `${o ? "$" : ""}${t}`, u = j(a) ? a() : a;
183
+ yt.with(
184
+ (s = u) => j(r) ? r(s) : r,
185
+ { key: n }
183
186
  ).invoke(e);
184
187
  };
185
- }, sn = (e, t, n) => {
186
- const s = `${n ? "$" : ""}${e}`, o = k(t) ? t() : t, a = De(), r = (p) => rt.with(
187
- (h = o) => k(p) ? p(h) : p,
188
- { key: s }
189
- ).invoke(a), c = Me.from(a, (p) => S(p, [s], o));
190
- return [tn(c), r];
191
- }, cn = (e, t, n = !1) => () => {
192
- const [s, o] = sn(e, t, n);
193
- return [s, o];
194
- }, ot = (e) => (t, n) => {
195
- const { requestSubject$: s } = ye(), o = new Set(R(t, (a) => Te(a) ? a : a.name));
196
- Y(() => {
197
- const a = s.pipe(
198
- ve(e),
199
- Pe((r) => {
200
- o.has(r.name) && n(r);
188
+ }, Cn = (e, t, r) => {
189
+ const o = `${r ? "$" : ""}${e}`, a = j(t) ? t() : t, n = De(), u = (f) => yt.with(
190
+ (v = a) => j(f) ? f(v) : f,
191
+ { key: o }
192
+ ).invoke(n), s = Ae.from(n, (f) => g(f, [o], a));
193
+ return [bn(s), u];
194
+ }, Mn = (e, t, r = !1) => () => {
195
+ const [o, a] = Cn(e, t, r);
196
+ return [o, a];
197
+ }, ht = (e) => (t, r) => {
198
+ const { requestSubject$: o } = be(), a = new Set(K(t, (n) => Ne(n) ? n : n.name));
199
+ J(() => {
200
+ const n = o.pipe(
201
+ Ce(e),
202
+ Me((u) => {
203
+ a.has(u.name) && r(u);
201
204
  })
202
205
  ).subscribe();
203
206
  return () => {
204
- a.unsubscribe();
207
+ n.unsubscribe();
205
208
  };
206
209
  }, []);
207
- }, Zn = ot(tt), er = ot(nt), un = (e, t, n) => {
208
- const { requestSubject$: s, dispatchRequest: o } = ye(), a = new Set(R(e, (c) => Te(c) ? c : c.name)), r = {};
209
- Y(() => {
210
- const c = qt(
211
- s.pipe(
212
- ve(tt),
213
- Pe((d) => {
214
- var p, h;
215
- a.has(d.name) && ((p = t.onSuccess) == null || p.call(t, d), (h = t.onFinish) == null || h.call(t, d), r[d.name] = void 0);
210
+ }, Ir = ht(mt), Nr = ht(ft), Tn = (e, t, r) => {
211
+ const { requestSubject$: o, dispatchRequest: a } = be(), n = new Set(K(e, (s) => Ne(s) ? s : s.name)), u = {};
212
+ J(() => {
213
+ const s = Qt(
214
+ o.pipe(
215
+ Ce(mt),
216
+ Me((d) => {
217
+ var f, v;
218
+ n.has(d.name) && ((f = t.onSuccess) == null || f.call(t, d), (v = t.onFinish) == null || v.call(t, d), u[d.name] = void 0);
216
219
  })
217
220
  ),
218
- s.pipe(
219
- ve(nt),
220
- Pe((d) => {
221
- var p, h;
222
- a.has(d.name) && ((p = t.onFailed) == null || p.call(t, d), (h = t.onFinish) == null || h.call(t, d), r[d.name] = void 0);
221
+ o.pipe(
222
+ Ce(ft),
223
+ Me((d) => {
224
+ var f, v;
225
+ n.has(d.name) && ((f = t.onFailed) == null || f.call(t, d), (v = t.onFinish) == null || v.call(t, d), u[d.name] = void 0);
223
226
  })
224
227
  )
225
228
  ).subscribe();
226
229
  return () => {
227
- c.unsubscribe(), n && Ie(r, (d) => {
228
- d && o({ ...d, stage: "CANCEL" });
230
+ s.unsubscribe(), r && ge(u, (d) => {
231
+ d && a({ ...d, stage: "CANCEL" });
229
232
  });
230
233
  };
231
234
  }, []);
232
- }, ln = (e, t, n) => {
233
- var o;
234
- const s = (o = e.res) == null ? void 0 : o.data;
235
- return t ? t(s, e) : n ? S(s, n) : s;
236
- }, tr = () => {
237
- const e = De(), { registerMetaMap: t, dispatchRequest: n } = Z();
238
- return (s) => {
239
- const o = S(t, s);
240
- if (!o)
235
+ }, In = (e, t, r) => {
236
+ var a;
237
+ const o = (a = e.res) == null ? void 0 : a.data;
238
+ return t ? t(o, e) : r ? g(o, r) : o;
239
+ }, Dr = () => {
240
+ const e = De(), { registerMetaMap: t, dispatchRequest: r } = Q();
241
+ return (o) => {
242
+ const a = g(t, o);
243
+ if (!a)
241
244
  return;
242
- const a = o.storeName || s;
243
- S(e.value, a) || n(s, o.initParams || {});
245
+ const n = a.storeName || o;
246
+ g(e.value, n) || r(o, a.initParams || {});
244
247
  };
245
- }, dn = (e, t) => {
246
- const { requestSubject$: n } = ye(), s = at(), o = (a) => {
247
- const r = S(e, a.name), c = S(t, a.name);
248
- return !!(r && c && c.actor);
248
+ }, Nn = (e, t) => {
249
+ const { requestSubject$: r } = be(), o = vt(), a = (n) => {
250
+ const u = g(e, n.name), s = g(t, n.name);
251
+ return !!(u && s && s.actor);
249
252
  };
250
- Y(() => {
251
- const a = n.pipe(
252
- ve(o),
253
- Pe((r) => {
254
- const c = S(e, r.name);
255
- if (!c)
253
+ J(() => {
254
+ const n = r.pipe(
255
+ Ce(a),
256
+ Me((u) => {
257
+ const s = g(e, u.name);
258
+ if (!s)
256
259
  return;
257
- const d = c.storeName || r.name, p = ln(r, c.convertData, c.convertPath);
258
- s(d, p, !1, void 0);
260
+ const d = s.storeName || u.name, f = In(u, s.convertData, s.convertPath);
261
+ o(d, f, !1, void 0);
259
262
  })
260
263
  ).subscribe();
261
264
  return () => {
262
- a.unsubscribe();
265
+ n.unsubscribe();
263
266
  };
264
267
  }, []);
265
- }, st = (e) => e.formValueType || e.valueType || "text", se = (e) => {
268
+ }, gt = (e) => e.formValueType || e.valueType || "text", se = (e) => {
266
269
  var t;
267
270
  return ((t = e.formItemProps) == null ? void 0 : t.name) || e.dataIndex;
268
- }, ct = (e, t, n = !0) => {
269
- var c;
270
- const s = st(t), o = S(e, s);
271
- if (!o)
271
+ }, bt = (e, t, r = !0) => {
272
+ var s;
273
+ const o = gt(t), a = g(e, o);
274
+ if (!a)
272
275
  return null;
273
- const a = se(t), r = n ? t.formItemProps : E(t.formItemProps, "rules");
274
- return ie(o, {
275
- key: a,
276
- name: a,
276
+ const n = se(t), u = r ? t.formItemProps : I(t.formItemProps, "rules");
277
+ return ie(a, {
278
+ key: n,
279
+ name: n,
277
280
  label: t.title,
278
- ...r,
279
- fieldProps: E(t.formFieldProps, "slots"),
281
+ ...u,
282
+ fieldProps: I(t.formFieldProps, "slots"),
280
283
  showProps: t.showProps
281
- }, (c = t.formFieldProps) == null ? void 0 : c.slots);
282
- }, Fe = (e, t, n) => {
283
- var a;
284
- const s = t.valueType || "text", o = S(e, s);
285
- return o ? ie(o, {
286
- ...E(t.formFieldProps, "slots"),
284
+ }, (s = t.formFieldProps) == null ? void 0 : s.slots);
285
+ }, ze = (e, t, r) => {
286
+ var n;
287
+ const o = t.valueType || "text", a = g(e, o);
288
+ return a ? ie(a, {
289
+ ...I(t.formFieldProps, "slots"),
287
290
  showProps: t.showProps,
288
- value: n
289
- }, (a = t.formFieldProps) == null ? void 0 : a.slots) : null;
290
- }, xe = (e, t) => R(t, (n) => me(e, n)), ut = (e, t) => {
291
- var o;
292
- const n = t.elementProps, s = {
291
+ value: r
292
+ }, (n = t.formFieldProps) == null ? void 0 : n.slots) : null;
293
+ }, Ge = (e, t) => K(t, (r) => fe(e, r)), St = (e, t) => {
294
+ var a;
295
+ const r = t.elementProps, o = {
293
296
  ...t.elementProps
294
297
  };
295
- return Ie((o = t.highConfig$) == null ? void 0 : o.registerPropsTrans, (a) => {
296
- const r = S(n, a.name);
297
- if (!(!r || be(r))) {
298
- if (re(r)) {
299
- if (ce(r, (c) => be(c)))
298
+ return ge((a = t.highConfig$) == null ? void 0 : a.registerPropsTrans, (n) => {
299
+ const u = g(r, n.name);
300
+ if (!(!u || de(u))) {
301
+ if (z(u)) {
302
+ if (ae(u, (s) => de(s)))
300
303
  return;
301
- oe(s, a.name, xe(e, r));
304
+ ue(o, n.name, Ge(e, u));
302
305
  return;
303
306
  }
304
- !r.elementType || (a.isFun ? oe(s, a.name, (...c) => {
305
- const d = a.needParams ? {
306
- ...r.elementProps,
307
- params$: c
308
- } : r.elementProps;
309
- return me(e, {
310
- ...r,
307
+ !u.elementType || (n.isFun ? ue(o, n.name, (...s) => {
308
+ const d = n.needParams ? {
309
+ ...u.elementProps,
310
+ params$: s
311
+ } : u.elementProps;
312
+ return fe(e, {
313
+ ...u,
311
314
  elementProps: d
312
315
  });
313
- }) : oe(s, a.name, me(e, r)));
316
+ }) : ue(o, n.name, fe(e, u)));
314
317
  }
315
- }), s;
316
- }, lt = (e, t) => {
317
- const n = H(t.children) > 0 ? xe(e, t.children) : void 0, s = t.childrenSlotName || "default", o = E(t.slots, n ? s : "");
318
- return Ie($(o), (a) => {
319
- const r = o[a];
320
- r && !k(r) && r.elementType && (o[a] = (...c) => {
321
- const d = r.needParams ? {
322
- ...r.elementProps,
323
- params$: c
324
- } : r.elementProps;
325
- return me(e, {
326
- ...r,
318
+ }), o;
319
+ }, pt = (e, t) => {
320
+ const r = W(t.children) > 0 ? Ge(e, t.children) : void 0, o = t.childrenSlotName || "default", a = I(t.slots, r ? o : "");
321
+ return ge(F(a), (n) => {
322
+ const u = a[n];
323
+ u && !j(u) && u.elementType && (a[n] = (...s) => {
324
+ const d = u.needParams ? {
325
+ ...u.elementProps,
326
+ params$: s
327
+ } : u.elementProps;
328
+ return fe(e, {
329
+ ...u,
327
330
  elementProps: d
328
331
  });
329
332
  });
330
333
  }), {
331
- [s]: n ? () => n : void 0,
332
- ...o
334
+ [o]: r ? () => r : void 0,
335
+ ...a
333
336
  };
334
- }, me = (e, t) => {
335
- const n = S(e, t.elementType) || t.elementType;
337
+ }, fe = (e, t) => {
338
+ const r = g(e, t.elementType) || t.elementType;
336
339
  if (t.highConfig$)
337
- return ie(fn, {
340
+ return ie(An, {
338
341
  key: t.elementId,
339
342
  elementMap: e,
340
343
  elementConfig: t
341
344
  });
342
- const s = lt(e, t), o = ut(e, t);
343
- return ie(n, {
345
+ const o = pt(e, t), a = St(e, t);
346
+ return ie(r, {
344
347
  key: t.elementId,
345
- ...o
346
- }, s);
347
- }, mn = (e) => re(e) ? Ot(e) : Te(e) && e.indexOf(".") > 0 ? e.substring(0, e.indexOf(".")) : e, fn = N({
348
+ ...a
349
+ }, o);
350
+ }, Dn = (e) => z(e) ? qt(e) : Ne(e) && e.indexOf(".") > 0 ? e.substring(0, e.indexOf(".")) : e, An = M({
348
351
  props: {
349
352
  elementMap: {
350
353
  type: Object
@@ -356,54 +359,54 @@ const tn = (e, t) => {
356
359
  setup: (e) => {
357
360
  const {
358
361
  state: t,
359
- sendEvent: n
360
- } = ge(), {
361
- elementMap: s,
362
- elementConfig: o
363
- } = e, a = o.highConfig$, r = ut(s, o), c = _(a.registerEventList, (m, u) => ({
364
- ...m,
365
- [u.name]: (...l) => {
366
- n({
367
- type: u.sendEventName || o.elementId,
362
+ sendEvent: r
363
+ } = Se(), {
364
+ elementMap: o,
365
+ elementConfig: a
366
+ } = e, n = a.highConfig$, u = St(o, a), s = V(n.registerEventList, (y, c) => ({
367
+ ...y,
368
+ [c.name]: (...l) => {
369
+ r({
370
+ type: c.sendEventName || a.elementId,
368
371
  payload: l
369
372
  });
370
373
  }
371
- }), {}), d = w(() => {
372
- if (!a.registerStateList || H(a.registerStateList) <= 0)
374
+ }), {}), d = A(() => {
375
+ if (!n.registerStateList || W(n.registerStateList) <= 0)
373
376
  return;
374
- const m = {
375
- ...r
376
- }, u = R(a.registerStateList, (l) => {
377
- const f = l.mapName || l.name, i = S(t, l.name);
378
- return oe(m, f, i), mn(f);
377
+ const y = {
378
+ ...u
379
+ }, c = K(n.registerStateList, (l) => {
380
+ const m = l.mapName || l.name, h = g(t, l.name);
381
+ return ue(y, m, h), Dn(m);
379
382
  });
380
- return q(m, u);
381
- }), p = S(s, o.elementType) || o.elementType, h = lt(s, o);
382
- return () => S(d.value, "show$") === !1 ? null : ie(p, {
383
- key: o.elementId,
384
- ...r,
385
- ...E(d.value, "show$"),
386
- ...c
387
- }, h);
383
+ return R(y, c);
384
+ }), f = g(o, a.elementType) || a.elementType, v = pt(o, a);
385
+ return () => g(d.value, "show$") === !1 ? null : ie(f, {
386
+ key: a.elementId,
387
+ ...u,
388
+ ...I(d.value, "show$"),
389
+ ...s
390
+ }, v);
388
391
  }
389
- }), it = Symbol("pro-module"), ge = () => Q(it), pn = (e) => {
390
- ae(it, e);
391
- }, je = (e) => {
392
+ }), Pt = Symbol("pro-module"), Se = () => te(Pt), On = (e) => {
393
+ oe(Pt, e);
394
+ }, He = (e) => {
392
395
  const {
393
396
  subject$: t
394
- } = ge();
395
- Y(() => {
396
- const n = t.subscribe({
397
- next: (s) => {
398
- e(s);
397
+ } = Se();
398
+ J(() => {
399
+ const r = t.subscribe({
400
+ next: (o) => {
401
+ e(o);
399
402
  }
400
403
  });
401
- return () => n.unsubscribe();
404
+ return () => r.unsubscribe();
402
405
  }, []);
403
- }, fe = {
406
+ }, ye = {
404
407
  Success: "request-success$",
405
408
  Fail: "request-fail$"
406
- }, yn = () => ({
409
+ }, $n = () => ({
407
410
  state: {
408
411
  type: Object
409
412
  },
@@ -416,132 +419,166 @@ const tn = (e, t) => {
416
419
  requests: {
417
420
  type: Array
418
421
  }
419
- }), Le = N({
422
+ }), Le = M({
420
423
  props: {
421
- ...yn()
424
+ ...$n()
422
425
  },
423
426
  setup: (e, {
424
427
  slots: t,
425
- expose: n
428
+ expose: r
426
429
  }) => {
427
- const s = (u) => re(u) ? xe(e.elementMap, u) : me(e.elementMap, u), o = new Ut(), a = (u) => {
428
- o.next(u);
429
- }, r = e.state || ue({}), c = (u) => {
430
- const l = r[u.type], f = k(u.payload) ? u.payload(l) : u.payload;
431
- if (Se(l)) {
432
- Ze(r[u.type], f);
430
+ const o = (c) => z(c) ? Ge(e.elementMap, c) : fe(e.elementMap, c), a = new Zt(), n = (c) => {
431
+ a.next(c);
432
+ }, u = e.state || he({}), s = (c) => {
433
+ const l = u[c.type], m = j(c.payload) ? c.payload(l) : c.payload;
434
+ if (Ee(l)) {
435
+ it(u[c.type], m);
433
436
  return;
434
437
  }
435
- r[u.type] = f;
438
+ u[c.type] = m;
436
439
  }, {
437
440
  dispatchRequest: d
438
- } = ye(), p = _(e.requests, (u, l) => {
439
- var f;
441
+ } = be(), f = V(e.requests, (c, l) => {
442
+ var m;
440
443
  return {
441
- ...u,
442
- [(f = l.actor) == null ? void 0 : f.name]: l
444
+ ...c,
445
+ [(m = l.actor) == null ? void 0 : m.name]: l
443
446
  };
444
- }, {}), h = _(e.requests, (u, l) => ({
445
- ...u,
447
+ }, {}), v = V(e.requests, (c, l) => ({
448
+ ...c,
446
449
  [l.action]: l
447
- }), {}), m = (u, ...l) => {
448
- const f = S(p, u) || S(h, u);
449
- if (!f)
450
+ }), {}), y = (c, ...l) => {
451
+ const m = g(f, c) || g(v, c);
452
+ if (!m)
450
453
  return;
451
- let i;
452
- f.convertParams ? i = f.convertParams(...l) : i = S(l, 0), f.loadingName && c({
453
- type: f.loadingName,
454
+ let h;
455
+ m.convertParams ? h = m.convertParams(...l) : h = g(l, 0), m.loadingName && s({
456
+ type: m.loadingName,
454
457
  payload: !0
455
- }), d(f.actor, i);
458
+ }), d(m.actor, h);
456
459
  };
457
- return un($(p), {
458
- onSuccess: (u) => {
459
- var f, i;
460
- const l = S(p, u.name);
460
+ return Tn(F(f), {
461
+ onSuccess: (c) => {
462
+ var m, h;
463
+ const l = g(f, c.name);
461
464
  if (l != null && l.stateName) {
462
- const g = l.convertData ? l.convertData(u) : (f = u.res) == null ? void 0 : f.data;
463
- c({
465
+ const S = l.convertData ? l.convertData(c) : (m = c.res) == null ? void 0 : m.data;
466
+ s({
464
467
  type: l.stateName,
465
- payload: g
468
+ payload: S
466
469
  });
467
470
  }
468
- a({
469
- type: fe.Success,
471
+ n({
472
+ type: ye.Success,
470
473
  payload: {
471
- actor: u,
474
+ actor: c,
472
475
  requestOpts: l
473
476
  }
474
- }), (i = l.onSuccess) == null || i.call(l, u);
477
+ }), (h = l.onSuccess) == null || h.call(l, c);
475
478
  },
476
- onFailed: (u) => {
477
- var f;
478
- const l = S(p, u.name);
479
- a({
480
- type: fe.Fail,
479
+ onFailed: (c) => {
480
+ var m;
481
+ const l = g(f, c.name);
482
+ n({
483
+ type: ye.Fail,
481
484
  payload: {
482
- actor: u,
485
+ actor: c,
483
486
  requestOpts: l
484
487
  }
485
- }), (f = l.onFailed) == null || f.call(l, u);
488
+ }), (m = l.onFailed) == null || m.call(l, c);
486
489
  },
487
- onFinish: (u) => {
488
- const l = S(p, [u.name, "loadingName"]);
489
- l && c({
490
+ onFinish: (c) => {
491
+ const l = g(f, [c.name, "loadingName"]);
492
+ l && s({
490
493
  type: l,
491
494
  payload: !1
492
495
  });
493
496
  }
494
- }, !0), pn({
497
+ }, !0), On({
495
498
  elementMap: e.elementMap,
496
- subject$: o,
497
- sendEvent: a,
498
- state: r,
499
- dispatch: c,
499
+ subject$: a,
500
+ sendEvent: n,
501
+ state: u,
502
+ dispatch: s,
500
503
  requests: e.requests,
501
- sendRequest: m
502
- }), n({
503
- sendEvent: a,
504
- sendRequest: m
504
+ sendRequest: y
505
+ }), r({
506
+ sendEvent: n,
507
+ sendRequest: y
505
508
  }), () => {
506
- var u;
507
- return y(W, null, [H(e.elementConfigs) > 0 && s(e.elementConfigs), (u = t.default) == null ? void 0 : u.call(t)]);
509
+ var c;
510
+ return i(Y, null, [W(e.elementConfigs) > 0 && o(e.elementConfigs), (c = t.default) == null ? void 0 : c.call(t)]);
508
511
  };
509
512
  }
510
- }), nr = () => {
511
- const e = at(), { registerStoreMap: t } = Z();
512
- return (n, s) => {
513
- const o = S(t, n);
514
- !o || e(n, s, !!o.persist, o.initialState);
513
+ }), Ar = () => {
514
+ const e = vt(), { registerStoreMap: t } = Q();
515
+ return (r, o) => {
516
+ const a = g(t, r);
517
+ !a || e(r, o, !!a.persist, a.initialState);
515
518
  };
516
- }, rr = (e) => {
517
- const { registerStoreMap: t } = Z(), n = S(t, e), s = `${n != null && n.persist ? "$" : ""}${n == null ? void 0 : n.key}`;
518
- return nn(an((a) => {
519
- const r = S(a, s);
520
- return r || (k(n == null ? void 0 : n.initialState) ? n == null ? void 0 : n.initialState() : n == null ? void 0 : n.initialState);
519
+ }, Or = (e) => {
520
+ const { registerStoreMap: t } = Q(), r = g(t, e), o = `${r != null && r.persist ? "$" : ""}${r == null ? void 0 : r.key}`;
521
+ return Sn(Pn((n) => {
522
+ const u = g(n, o);
523
+ return u || (j(r == null ? void 0 : r.initialState) ? r == null ? void 0 : r.initialState() : r == null ? void 0 : r.initialState);
521
524
  }));
522
- }, dt = cn("access", void 0, !0), gn = () => {
523
- const [e] = dt();
524
- return e;
525
- }, ar = () => {
526
- const [e, t] = dt();
525
+ }, Et = Mn("access", void 0, !0), Kn = () => {
526
+ const [e, t] = Et();
527
+ return { access: e, setAccess: t, delAccess: () => {
528
+ t(void 0);
529
+ } };
530
+ }, $r = () => {
531
+ const [e, t] = Et();
527
532
  return [e, t, () => {
528
533
  t(void 0);
529
534
  }];
530
- }, or = N((e, { slots: t, emit: n }) => {
531
- const s = gn(), o = w(() => s && s.token);
532
- return Y(() => {
533
- o.value || n("toLogin");
534
- }, o), () => {
535
- var a;
536
- return o.value ? (a = t.default) == null ? void 0 : a.call(t) : null;
535
+ }, Ct = Symbol("logon-user"), wn = () => te(Ct), Kr = M((e, { slots: t }) => {
536
+ const [r, o] = qe(), [a, n] = qe();
537
+ return oe(Ct, { user: r, setUser: o, per: a, setPer: n, opts: {} }), () => {
538
+ var s;
539
+ return (s = t.default) == null ? void 0 : s.call(t);
537
540
  };
538
- }), mt = Symbol("logon-user"), sr = () => Q(mt), cr = N((e, { slots: t }) => {
539
- const [n, s] = ke(), [o, a] = ke();
540
- return ae(mt, { user: n, setUser: s, per: o, setPer: a, opts: {} }), () => {
541
- var c;
542
- return (c = t.default) == null ? void 0 : c.call(t);
541
+ }), wr = M((e, { slots: t, emit: r }) => {
542
+ const { access: o } = Kn(), a = A(() => o && o.token);
543
+ return J(() => {
544
+ a.value || r("toLogin");
545
+ }, a), () => {
546
+ var n;
547
+ return a.value ? (n = t.default) == null ? void 0 : n.call(t) : null;
543
548
  };
544
- }), x = {
549
+ }), Lr = {
550
+ Add: "add",
551
+ Edit: "edit",
552
+ Delete: "delete"
553
+ }, Ln = (e, t) => !e || !t ? !1 : z(t) ? ae(t, (r) => e[r]) : e[t], Rn = () => {
554
+ const { per: e } = wn(), t = Ve();
555
+ return (r, o) => {
556
+ if (!r)
557
+ return !1;
558
+ let a = r;
559
+ if (o != null && o.suffix) {
560
+ const n = t.name ? t.name.toString() : "";
561
+ a = z(a) ? K(a, (u) => `${n}:${u}`) : `${n}:${a}`;
562
+ }
563
+ return Ln(e.buttonMap, a);
564
+ };
565
+ }, xn = () => ({
566
+ suffix: { type: [String, Array] },
567
+ value: { type: [String, Array] }
568
+ }), Rr = M({
569
+ inheritAttrs: !1,
570
+ props: {
571
+ ...xn()
572
+ },
573
+ setup: (e, { slots: t }) => {
574
+ const r = Rn(), o = A(() => e.value ? r(e.value) : e.suffix ? r(e.suffix, { suffix: !0 }) : !1);
575
+ return () => {
576
+ var a;
577
+ return o.value ? (a = t.default) == null ? void 0 : a.call(t) : null;
578
+ };
579
+ }
580
+ }), k = {
581
+ TypographyKey: "Typography$",
545
582
  LoadingKey: "Loading$",
546
583
  RowKey: "Row$",
547
584
  ColKey: "Col$",
@@ -551,6 +588,9 @@ const tn = (e, t) => {
551
588
  PaginationKey: "Pagination$",
552
589
  PopoverKey: "Popover$",
553
590
  CheckboxKey: "Checkbox$",
591
+ MenuKey: "Menu$",
592
+ MenuSubKey: "MenuSub$",
593
+ MenuItemKey: "MenuItem$",
554
594
  ModalKey: "Modal$",
555
595
  FormKey: "Form$",
556
596
  FormItemKey: "FormItem$",
@@ -558,14 +598,14 @@ const tn = (e, t) => {
558
598
  ProFormKey: "ProForm$",
559
599
  ProSearchFormKey: "ProSearchForm$",
560
600
  ProTableKey: "ProTable$"
561
- }, X = () => {
562
- const { elementMap: e } = Z();
563
- return (t) => S(e, t);
601
+ }, G = () => {
602
+ const { elementMap: e } = Q();
603
+ return (t) => g(e, t);
564
604
  };
565
- function hn(e) {
566
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
605
+ function kn(e) {
606
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !de(e);
567
607
  }
568
- const bn = () => ({
608
+ const Fn = () => ({
569
609
  row: {
570
610
  type: Object,
571
611
  default: void 0
@@ -576,69 +616,69 @@ const bn = () => ({
576
616
  items: {
577
617
  type: Array
578
618
  }
579
- }), Ae = N({
619
+ }), Re = M({
580
620
  props: {
581
- ...bn()
621
+ ...Fn()
582
622
  },
583
623
  setup: (e) => {
584
- const t = X(), n = t(x.RowKey), s = t(x.ColKey);
624
+ const t = G(), r = t(k.RowKey), o = t(k.ColKey);
585
625
  return () => {
586
- let o;
587
- return !n || !s ? null : y(n, e.row, hn(o = R(e.items, (a) => y(s, O({
588
- key: a.rowKey
589
- }, e.col, a.col), {
590
- default: () => [a.vNode]
591
- }))) ? o : {
592
- default: () => [o]
626
+ let a;
627
+ return !r || !o ? null : i(r, e.row, kn(a = K(e.items, (n) => i(o, C({
628
+ key: n.rowKey
629
+ }, e.col, n.col), {
630
+ default: () => [n.vNode]
631
+ }))) ? a : {
632
+ default: () => [a]
593
633
  });
594
634
  };
595
635
  }
596
- }), Sn = (e, t, n) => {
636
+ }), jn = (e, t, r) => {
597
637
  if (t) {
598
- const s = U($(t), (o) => !t[o]);
599
- return E(e, s);
638
+ const o = B(F(t), (a) => !t[a]);
639
+ return I(e, o);
600
640
  }
601
- if (n) {
602
- const s = U($(n), (o) => !n[o](e));
603
- return E(e, s);
641
+ if (r) {
642
+ const o = B(F(r), (a) => !r[a](e));
643
+ return I(e, o);
604
644
  }
605
645
  return e;
606
- }, ft = (e) => {
646
+ }, Mt = (e) => {
607
647
  if (!!e)
608
- return re(e) ? e : e && Te(e) && e.indexOf(".") > 0 ? Lt(e, ".") : [e];
609
- }, Ne = (e, t, n) => !t || !n ? e : R(e, (s) => {
610
- const o = k(n) ? n(s) : S(s, n), a = S(t, o);
611
- return !a || At(a) || k(a) || !Se(a) ? s : Kt(s, a, (r, c) => {
612
- if (re(r) || re(c))
613
- return c;
648
+ return z(e) ? e : e && Ne(e) && e.indexOf(".") > 0 ? Ut(e, ".") : [e];
649
+ }, Oe = (e, t, r) => !t || !r ? e : K(e, (o) => {
650
+ const a = j(r) ? r(o) : g(o, r), n = g(t, a);
651
+ return !n || Bt(n) || j(n) || !Ee(n) ? o : Vt(o, n, (u, s) => {
652
+ if (z(u) || z(s))
653
+ return s;
614
654
  });
615
- }), le = (e, t) => {
616
- const n = _(
655
+ }), ce = (e, t) => {
656
+ const r = V(
617
657
  e,
618
- (s, o) => ({
619
- ...s,
620
- [o]: (...a) => {
621
- var r, c;
622
- return (c = (r = t.value) == null ? void 0 : r[o]) == null ? void 0 : c.call(r, ...a);
658
+ (o, a) => ({
659
+ ...o,
660
+ [a]: (...n) => {
661
+ var u, s;
662
+ return (s = (u = t.value) == null ? void 0 : u[a]) == null ? void 0 : s.call(u, ...n);
623
663
  }
624
664
  }),
625
665
  {}
626
666
  );
627
- return n.originRef = t, n;
628
- }, ur = (e, t, n) => {
629
- const s = { originRef: e, ...n };
630
- return t && H(t) > 0 && Ie(t, (o) => {
631
- s[o] = (...a) => {
632
- var r, c;
633
- return (c = (r = e.value) == null ? void 0 : r[o]) == null ? void 0 : c.call(r, ...a);
667
+ return r.originRef = t, r;
668
+ }, xr = (e, t, r) => {
669
+ const o = { originRef: e, ...r };
670
+ return t && W(t) > 0 && ge(t, (a) => {
671
+ o[a] = (...n) => {
672
+ var u, s;
673
+ return (s = (u = e.value) == null ? void 0 : u[a]) == null ? void 0 : s.call(u, ...n);
634
674
  };
635
- }), s;
636
- }, pt = (e, t) => S(e, ["extra", t]) || S(e, t), te = (e, t) => {
637
- const n = $(e), s = `${t}-`, o = U(n, (r) => Rt(r, s)), a = q(e, o);
638
- return wt(a, (r, c) => c.replace(s, ""));
639
- }, yt = Symbol("pro-form-list"), gt = () => Q(yt), ht = (e) => {
640
- ae(yt, e);
641
- }, vn = N({
675
+ }), o;
676
+ }, qn = (e, t) => g(e, ["extra", t]) || g(e, t), ee = (e, t) => {
677
+ const r = F(e), o = `${t}-`, a = B(r, (u) => _t(u, o)), n = R(e, a);
678
+ return zt(n, (u, s) => s.replace(o, ""));
679
+ }, Tt = Symbol("pro-form-list"), It = () => te(Tt), Nt = (e) => {
680
+ oe(Tt, e);
681
+ }, Un = M({
642
682
  props: {
643
683
  pathList: {
644
684
  type: Array
@@ -646,13 +686,13 @@ const bn = () => ({
646
686
  },
647
687
  setup: (e, {
648
688
  slots: t
649
- }) => (ht({
689
+ }) => (Nt({
650
690
  pathList: e.pathList
651
691
  }), () => {
652
- var n;
653
- return (n = t.default) == null ? void 0 : n.call(t);
692
+ var r;
693
+ return (r = t.default) == null ? void 0 : r.call(t);
654
694
  })
655
- }), Pn = () => ({
695
+ }), Bn = () => ({
656
696
  rowKey: {
657
697
  type: String,
658
698
  default: "id"
@@ -661,59 +701,59 @@ const bn = () => ({
661
701
  type: [String, Number, Array],
662
702
  required: !0
663
703
  }
664
- }), lr = N({
704
+ }), kr = M({
665
705
  props: {
666
- ...Pn()
706
+ ...Bn()
667
707
  },
668
708
  setup: (e, {
669
709
  slots: t
670
710
  }) => {
671
- const s = X()(x.FormItemKey), {
672
- formState: o,
673
- readonly: a
674
- } = St(), r = gt(), c = ft(e.name), d = r != null && r.pathList ? [...r.pathList, ...c] : c, p = () => {
675
- let m = S(o, d);
676
- re(m) || (m = []), m.push({
711
+ const o = G()(k.FormItemKey), {
712
+ formState: a,
713
+ readonly: n
714
+ } = At(), u = It(), s = Mt(e.name), d = u != null && u.pathList ? [...u.pathList, ...s] : s, f = () => {
715
+ let y = g(a, d);
716
+ z(y) || (y = []), y.push({
677
717
  [e.rowKey]: new Date().valueOf()
678
- }), oe(o, d, m);
679
- }, h = (m) => {
680
- const u = S(o, d);
681
- H(u) <= 0 || u.splice(m, 1);
718
+ }), ue(a, d, y);
719
+ }, v = (y) => {
720
+ const c = g(a, d);
721
+ W(c) <= 0 || c.splice(y, 1);
682
722
  };
683
- return () => s ? y(s, E(e, "rowKey"), {
723
+ return () => o ? i(o, I(e, "rowKey"), {
684
724
  default: () => {
685
- var m;
686
- return [R(S(o, d), (u, l) => y(vn, {
687
- key: u[e.rowKey] || l,
725
+ var y;
726
+ return [K(g(a, d), (c, l) => i(Un, {
727
+ key: c[e.rowKey] || l,
688
728
  pathList: [...d, l]
689
729
  }, {
690
730
  default: () => {
691
- var f, i, g;
692
- return [y("div", {
731
+ var m, h, S;
732
+ return [i("div", {
693
733
  class: "pro-form-list-item"
694
- }, [(f = t.default) == null ? void 0 : f.call(t), !a.value && y(W, null, [y("div", {
734
+ }, [(m = t.default) == null ? void 0 : m.call(t), !n.value && i(Y, null, [i("div", {
695
735
  class: "pro-form-list-item-add",
696
- onClick: p
697
- }, [(i = t.itemAdd) == null ? void 0 : i.call(t)]), y("div", {
736
+ onClick: f
737
+ }, [(h = t.itemAdd) == null ? void 0 : h.call(t)]), i("div", {
698
738
  class: "pro-form-list-item-minus",
699
- onClick: () => h(l)
700
- }, [(g = t.itemMinus) == null ? void 0 : g.call(t)])])])];
739
+ onClick: () => v(l)
740
+ }, [(S = t.itemMinus) == null ? void 0 : S.call(t)])])])];
701
741
  }
702
- })), !a.value && y("div", {
742
+ })), !n.value && i("div", {
703
743
  class: "pro-form-list-add",
704
- onClick: p
705
- }, [(m = t.add) == null ? void 0 : m.call(t)])];
744
+ onClick: f
745
+ }, [(y = t.add) == null ? void 0 : y.call(t)])];
706
746
  }
707
747
  }) : null;
708
748
  }
709
- }), bt = Symbol("pro-form"), St = () => Q(bt), En = (e) => {
710
- ae(bt, e);
749
+ }), Dt = Symbol("pro-form"), At = () => te(Dt), Vn = (e) => {
750
+ oe(Dt, e);
711
751
  };
712
- let V;
752
+ let H;
713
753
  (function(e) {
714
754
  e.RESET = "RESET", e.SUBMIT = "SUBMIT", e.CONTINUE = "CONTINUE";
715
- })(V || (V = {}));
716
- const Ve = () => ({
755
+ })(H || (H = {}));
756
+ const tt = () => ({
717
757
  clsName: {
718
758
  type: String,
719
759
  default: "pro-form"
@@ -759,102 +799,113 @@ const Ve = () => ({
759
799
  formMethods: {
760
800
  type: Array
761
801
  }
762
- }), Cn = N({
802
+ }), _n = M({
763
803
  inheritAttrs: !1,
764
804
  props: {
765
- ...de,
766
- ...Ve(),
767
- ...E(Ae.props, "items")
805
+ ...me,
806
+ ...tt(),
807
+ ...I(Re.props, "items")
768
808
  },
769
809
  setup: (e, {
770
810
  slots: t,
771
- emit: n,
772
- expose: s,
773
- attrs: o
811
+ emit: r,
812
+ expose: o,
813
+ attrs: a
774
814
  }) => {
775
815
  const {
776
- elementMap: a,
777
- formElementMap: r
778
- } = Z(), c = e.elementMap || a, d = e.formElementMap || r, p = e.model || ue({}), h = Oe(p, e.showStateRules, e.showState), m = Oe(p, e.readonlyStateRules, e.readonlyState), u = Oe(p, e.disableStateRules, e.disableState), l = w(() => e.readonly), f = w(() => Ne(e.columns, e.columnState, (C) => se(C))), i = (C) => {
779
- const b = Sn(C, h, e.showStateRules);
780
- n("finish", b, C);
781
- }, g = B();
782
- s(le(e.formMethods || [], g)), En({
783
- formState: p,
784
- showState: h,
785
- readonlyState: m,
786
- disableState: u,
787
- elementMap: c,
816
+ elementMap: n,
817
+ formElementMap: u
818
+ } = Q(), s = e.elementMap || n, d = e.formElementMap || u, f = e.model || he({}), v = we(f, e.showStateRules, e.showState), y = we(f, e.readonlyStateRules, e.readonlyState), c = we(f, e.disableStateRules, e.disableState), l = A(() => e.readonly), m = A(() => Oe(e.columns, e.columnState, (P) => se(P))), h = (P) => {
819
+ const T = jn(P, v, e.showStateRules);
820
+ r("finish", T, P);
821
+ }, S = q();
822
+ o(ce(e.formMethods || [], S)), Vn({
823
+ formState: f,
824
+ showState: v,
825
+ readonlyState: y,
826
+ disableState: c,
827
+ elementMap: s,
788
828
  formElementMap: d,
789
829
  readonly: l,
790
- columns: f,
791
- formRef: g,
830
+ columns: m,
831
+ formRef: S,
792
832
  ...e.provideExtra
793
833
  });
794
- const M = [{
795
- value: V.RESET,
834
+ const L = [{
835
+ value: H.RESET,
796
836
  label: "\u91CD\u7F6E"
797
837
  }, {
798
- value: V.SUBMIT,
838
+ value: H.SUBMIT,
799
839
  label: "\u63D0\u4EA4",
800
840
  extraProps: {
801
841
  type: "primary"
802
842
  }
803
- }], I = w(() => {
804
- const C = e.operate, b = (C == null ? void 0 : C.items) || M;
805
- return R(b, (T) => (!T.onClick && !S(C == null ? void 0 : C.itemState, [T.value, "onClick"]) && (T.value === V.RESET ? T.onClick = () => {
806
- var F;
807
- if (C != null && C.onReset) {
808
- C.onReset();
843
+ }], b = A(() => {
844
+ const P = e.operate, T = (P == null ? void 0 : P.items) || L;
845
+ return K(T, (p) => (!p.onClick && !g(P == null ? void 0 : P.itemState, [p.value, "onClick"]) && (p.value === H.RESET ? p.onClick = () => {
846
+ var x;
847
+ if (P != null && P.onReset) {
848
+ P.onReset();
809
849
  return;
810
850
  }
811
- (F = g.value) == null || F.resetFields();
812
- } : T.value === V.SUBMIT ? T.onClick = () => {
813
- var F;
814
- if (C != null && C.onSubmit) {
815
- C.onSubmit();
851
+ (x = S.value) == null || x.resetFields();
852
+ } : p.value === H.SUBMIT ? p.onClick = () => {
853
+ var x;
854
+ if (P != null && P.onSubmit) {
855
+ P.onSubmit();
816
856
  return;
817
857
  }
818
- (F = g.value) == null || F.submit();
819
- } : T.value === V.CONTINUE && (C == null ? void 0 : C.onContinue) && (T.onClick = () => {
820
- C.onContinue();
821
- })), T.value === V.SUBMIT && !Qe(T, "loading") && (T.loading = e.submitLoading), T));
822
- }), v = (C) => {
823
- const b = se(C);
824
- return b && t[b] ? t[b](C, p) : ct(d, C, e.needRules);
858
+ (x = S.value) == null || x.submit();
859
+ } : p.value === H.CONTINUE && (P == null ? void 0 : P.onContinue) && (p.onClick = () => {
860
+ P.onContinue();
861
+ })), p.value === H.SUBMIT && !Ue(p, "loading") && (p.loading = e.submitLoading), p));
862
+ }), N = (P) => {
863
+ const T = se(P);
864
+ return T && t[T] ? t[T](P, f) : bt(d, P, e.needRules);
825
865
  };
826
- ht({});
827
- const D = $(Ve()), L = $(E(Ae.props, "items")), K = S(a, x.FormKey);
828
- return () => K ? y(K, O({
829
- ref: g,
866
+ Nt({});
867
+ const O = F(tt()), E = F(I(Re.props, "items")), $ = g(n, k.FormKey);
868
+ return () => $ ? i($, C({
869
+ ref: S,
830
870
  class: e.clsName
831
- }, E(o, "onFinish"), E(e, ...D, ...L, "onFinish", "operate"), {
832
- model: p,
833
- onFinish: i
871
+ }, I(a, "onFinish"), I(e, ...O, ...E, "onFinish", "operate"), {
872
+ model: f,
873
+ onFinish: h
834
874
  }), {
835
875
  default: () => {
836
- var C, b, T;
837
- return [(C = t.start) == null ? void 0 : C.call(t), d && H(f.value) > 0 && y(W, null, [e.row ? y(Ae, {
876
+ var P, T, p;
877
+ return [(P = t.start) == null ? void 0 : P.call(t), d && W(m.value) > 0 && i(Y, null, [e.row ? i(Re, {
838
878
  row: e.row,
839
879
  col: e.col,
840
- items: R(f.value, (F) => ({
841
- rowKey: se(F),
842
- vNode: v(F),
843
- col: S(F, ["extra", "col"])
880
+ items: K(m.value, (x) => ({
881
+ rowKey: se(x),
882
+ vNode: N(x),
883
+ col: g(x, ["extra", "col"])
844
884
  }))
845
- }, null) : R(f.value, (F) => v(F))]), (b = t.default) == null ? void 0 : b.call(t), e.operate && y(vt, O({
885
+ }, null) : K(m.value, (x) => N(x))]), (T = t.default) == null ? void 0 : T.call(t), e.operate && i(Ot, C({
846
886
  clsName: `${e.clsName}-operate`,
847
- items: I.value
848
- }, E(e.operate, "items", "onReset", "onSubmit", "onContinue")), null), (T = t.end) == null ? void 0 : T.call(t)];
887
+ items: b.value
888
+ }, I(e.operate, "items", "onReset", "onSubmit", "onContinue")), null), (p = t.end) == null ? void 0 : p.call(t)];
849
889
  }
850
890
  }) : null;
851
891
  }
852
- });
853
- let Ee;
892
+ }), Fr = {
893
+ text: "\u8BF7\u8F93\u5165",
894
+ digit: "\u8BF7\u8F93\u5165",
895
+ select: "\u8BF7\u9009\u62E9",
896
+ treeSelect: "\u8BF7\u9009\u62E9",
897
+ cascader: "\u8BF7\u9009\u62E9",
898
+ checkbox: "\u8BF7\u9009\u62E9",
899
+ radio: "\u8BF7\u9009\u62E9",
900
+ switch: "\u8BF7\u9009\u62E9",
901
+ date: "\u8BF7\u9009\u62E9",
902
+ time: "\u8BF7\u9009\u62E9"
903
+ };
904
+ let Te;
854
905
  (function(e) {
855
906
  e.AUTO = "AUTO", e.MANUAL = "MANUAL";
856
- })(Ee || (Ee = {}));
857
- const _e = () => ({
907
+ })(Te || (Te = {}));
908
+ const nt = () => ({
858
909
  clsName: {
859
910
  type: String,
860
911
  default: "pro-search-form"
@@ -865,7 +916,7 @@ const _e = () => ({
865
916
  },
866
917
  searchMode: {
867
918
  type: String,
868
- default: Ee.AUTO
919
+ default: Te.AUTO
869
920
  },
870
921
  debounceKeys: {
871
922
  type: Array
@@ -878,9 +929,9 @@ const _e = () => ({
878
929
  type: Number,
879
930
  default: 800
880
931
  }
881
- }), ir = N({
932
+ }), jr = M({
882
933
  props: {
883
- ..._e(),
934
+ ...nt(),
884
935
  needRules: {
885
936
  type: Boolean,
886
937
  default: !1
@@ -888,41 +939,41 @@ const _e = () => ({
888
939
  },
889
940
  setup: (e, {
890
941
  slots: t,
891
- expose: n
942
+ expose: r
892
943
  }) => {
893
- const o = X()(x.ProFormKey), a = e.model || ue({}), r = new Set(e.debounceTypes), c = R(U(e.columns, (f) => {
894
- const i = st(f);
895
- return r.has(i);
896
- }), (f) => se(f)), d = B(), p = e.formMethods || [];
897
- n(le(p, d));
898
- const h = () => {
899
- var f;
900
- (f = d.value) == null || f.submit();
901
- }, m = kt(() => {
902
- h();
944
+ const a = G()(k.ProFormKey), n = e.model || he({}), u = new Set(e.debounceTypes), s = K(B(e.columns, (m) => {
945
+ const h = gt(m);
946
+ return u.has(h);
947
+ }), (m) => se(m)), d = q(), f = e.formMethods || [];
948
+ r(ce(f, d));
949
+ const v = () => {
950
+ var m;
951
+ (m = d.value) == null || m.submit();
952
+ }, y = Gt(() => {
953
+ v();
903
954
  }, e.debounceTime);
904
- Y(() => {
905
- e.initEmit && h();
955
+ J(() => {
956
+ e.initEmit && v();
906
957
  }, []);
907
- const u = (f, i, g) => ce(g, (M) => S(f, M) !== S(i, M));
908
- et((f, i) => {
909
- if (e.searchMode !== Ee.AUTO)
958
+ const c = (m, h, S) => ae(S, (L) => g(m, L) !== g(h, L));
959
+ dt((m, h) => {
960
+ if (e.searchMode !== Te.AUTO)
910
961
  return;
911
- const g = H(e.debounceKeys) > 0 ? e.debounceKeys : c;
912
- if (H(g) > 0 && u(f, i, g)) {
913
- m();
962
+ const S = W(e.debounceKeys) > 0 ? e.debounceKeys : s;
963
+ if (W(S) > 0 && c(m, h, S)) {
964
+ y();
914
965
  return;
915
966
  }
916
- h();
917
- }, () => $t(a));
918
- const l = $(E(_e(), "clsName", "columns"));
919
- return () => o ? y(o, O({
967
+ v();
968
+ }, () => Ht(n));
969
+ const l = F(I(nt(), "clsName", "columns"));
970
+ return () => a ? i(a, C({
920
971
  ref: d
921
- }, E(e, l), {
922
- model: a
972
+ }, I(e, l), {
973
+ model: n
923
974
  }), t) : null;
924
975
  }
925
- }), Ge = () => ({
976
+ }), rt = () => ({
926
977
  readonly: {
927
978
  type: Boolean,
928
979
  default: void 0
@@ -936,51 +987,57 @@ const _e = () => ({
936
987
  slots: {
937
988
  type: Object
938
989
  }
939
- }), dr = (e, t) => ({
940
- InputComp: n,
941
- valueType: s,
942
- name: o
943
- }) => N({
944
- name: o,
990
+ }), qr = (e, t) => ({
991
+ InputComp: r,
992
+ valueType: o,
993
+ name: a
994
+ }) => M({
995
+ name: a,
945
996
  props: {
946
997
  ...e.props,
947
- ...Ge()
998
+ ...rt()
948
999
  },
949
- setup: (a, {
950
- slots: r
1000
+ setup: (n, {
1001
+ slots: u
951
1002
  }) => {
952
1003
  const {
953
- formState: c,
954
- showState: d,
955
- readonlyState: p,
956
- disableState: h,
957
- readonly: m,
958
- elementMap: u
959
- } = St(), l = gt(), f = w(() => ee(a.readonly) ? a.readonly : ee(p[a.name]) ? p[a.name] : m.value), i = ft(a.name), g = l != null && l.pathList ? [...l.pathList, ...i] : i, M = (v) => {
960
- oe(c, g, v);
961
- }, I = $(Ge());
1004
+ formExtraMap: s
1005
+ } = Q(), {
1006
+ formState: d,
1007
+ showState: f,
1008
+ readonlyState: v,
1009
+ disableState: y,
1010
+ readonly: c,
1011
+ elementMap: l
1012
+ } = At(), m = It(), h = A(() => ne(n.readonly) ? n.readonly : ne(v[n.name]) ? v[n.name] : c.value), S = () => `${g(s == null ? void 0 : s.rulePrefixMap, o) || "\u8BF7\u8F93\u5165"}${n.label || ""}`, L = A(() => s != null && s.rulePrefixMap ? n.required === !0 && !n.rules ? [{
1013
+ required: !0,
1014
+ message: S()
1015
+ }] : n.rules ? K(n.rules, ($) => ($.required && !$.message && ($.message = S()), $)) : n.rules : n.rules), b = Mt(n.name), N = m != null && m.pathList ? [...m.pathList, ...b] : b, O = ($) => {
1016
+ ue(d, N, $);
1017
+ }, E = F(rt());
962
1018
  return () => {
963
- const v = S(d, g);
964
- if (ee(v) && !v)
1019
+ const $ = g(f, N);
1020
+ if (ne($) && !$)
965
1021
  return null;
966
- const D = S(c, g), L = S(u, s);
967
- return y(e, O(E(a, ...I, "name", "slots"), {
968
- name: g
1022
+ const P = g(d, N), T = g(l, o);
1023
+ return i(e, C(I(n, ...E, "name", "rules", "slots"), {
1024
+ name: N,
1025
+ rules: L.value
969
1026
  }), {
970
- default: () => [f.value ? y(W, null, [L ? y(L, O({
971
- value: D
972
- }, a.fieldProps, {
973
- showProps: a.showProps
974
- }), r) : y("span", null, [D])]) : y(n, O(t(D, M, S(h, g)), a.fieldProps), r)],
975
- ...a.slots
1027
+ default: () => [h.value ? i(Y, null, [T ? i(T, C({
1028
+ value: P
1029
+ }, n.fieldProps, {
1030
+ showProps: n.showProps
1031
+ }), u) : i("span", null, [P])]) : i(r, C(t(P, O, g(y, N)), n.fieldProps), u)],
1032
+ ...n.slots
976
1033
  });
977
1034
  };
978
1035
  }
979
1036
  });
980
- function Tn(e) {
981
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
1037
+ function zn(e) {
1038
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !de(e);
982
1039
  }
983
- const In = () => ({
1040
+ const Gn = () => ({
984
1041
  clsName: {
985
1042
  type: String,
986
1043
  default: "pro-operate"
@@ -993,45 +1050,45 @@ const In = () => ({
993
1050
  },
994
1051
  elementKey: {
995
1052
  type: String,
996
- default: x.ButtonKey
1053
+ default: k.ButtonKey
997
1054
  }
998
- }), vt = N({
1055
+ }), Ot = M({
999
1056
  props: {
1000
- ...In()
1057
+ ...Gn()
1001
1058
  },
1002
1059
  setup: (e, {
1003
1060
  slots: t
1004
1061
  }) => {
1005
- const n = X(), s = e.elementKey ? n(e.elementKey) : void 0, o = w(() => {
1006
- const r = U(e.items, (c) => k(c.show) ? c.show() : ee(c.show) ? c.show : !0);
1007
- return R(r, (c) => Qe(e.itemState, c.value) ? {
1008
- ...c,
1009
- ...S(e.itemState, c.value)
1010
- } : c);
1011
- }), a = (r) => {
1012
- var c;
1013
- (c = r.onClick) == null || c.call(r, r.value);
1062
+ const r = G(), o = e.elementKey ? r(e.elementKey) : void 0, a = A(() => {
1063
+ const u = B(e.items, (s) => j(s.show) ? s.show() : ne(s.show) ? s.show : !0);
1064
+ return K(u, (s) => Ue(e.itemState, s.value) ? {
1065
+ ...s,
1066
+ ...g(e.itemState, s.value)
1067
+ } : s);
1068
+ }), n = (u) => {
1069
+ var s;
1070
+ (s = u.onClick) == null || s.call(u, u.value);
1014
1071
  };
1015
- return () => y("div", {
1072
+ return () => i("div", {
1016
1073
  class: e.clsName
1017
- }, [R(o.value, (r) => {
1018
- const c = k(r.disabled) ? r.disabled() : r.disabled, d = k(r.loading) ? r.loading() : r.loading, p = k(r.label) ? r.label() : r.label, h = k(r.extraProps) ? r.extraProps() : r.extraProps, m = {
1019
- ...E(r, "show", "disabled", "element"),
1020
- disabled: c
1074
+ }, [K(a.value, (u) => {
1075
+ const s = j(u.disabled) ? u.disabled() : u.disabled, d = j(u.loading) ? u.loading() : u.loading, f = j(u.label) ? u.label() : u.label, v = j(u.extraProps) ? u.extraProps() : u.extraProps, y = {
1076
+ ...I(u, "show", "disabled", "element"),
1077
+ disabled: s
1021
1078
  };
1022
- return r.element && k(r.element) ? r.element(m) : t[r.value] ? t[r.value](m) : s ? y(s, O({
1023
- disabled: c,
1079
+ return u.element && j(u.element) ? u.element(y) : t[u.value] ? t[u.value](y) : o ? i(o, C({
1080
+ disabled: s,
1024
1081
  loading: d,
1025
- onClick: () => a(r)
1026
- }, h), Tn(p) ? p : {
1027
- default: () => [p]
1028
- }) : y("div", {
1082
+ onClick: () => n(u)
1083
+ }, v), zn(f) ? f : {
1084
+ default: () => [f]
1085
+ }) : i("div", {
1029
1086
  class: `${e.clsName}-item`,
1030
- onClick: () => a(r)
1031
- }, [p]);
1087
+ onClick: () => n(u)
1088
+ }, [f]);
1032
1089
  })]);
1033
1090
  }
1034
- }), Dn = () => ({
1091
+ }), Hn = () => ({
1035
1092
  clsName: {
1036
1093
  type: String,
1037
1094
  default: "pro-table-toolbar-column"
@@ -1040,91 +1097,112 @@ const In = () => ({
1040
1097
  type: String,
1041
1098
  default: "columnSetting"
1042
1099
  },
1043
- popoverProps: Object
1044
- }), Mn = N({
1100
+ popoverProps: Object,
1101
+ useSelectedStatus: {
1102
+ type: Boolean,
1103
+ default: !0
1104
+ },
1105
+ onColumnSelectChange: {
1106
+ type: Function
1107
+ }
1108
+ }), Wn = M({
1045
1109
  props: {
1046
- ...Dn()
1110
+ ...Hn()
1047
1111
  },
1048
1112
  setup: (e, {
1049
1113
  slots: t
1050
1114
  }) => {
1051
- const n = X(), s = n(x.PopoverKey), o = n(x.CheckboxKey), {
1052
- originColumns: a,
1053
- state: r
1054
- } = Nn(), [c, d] = Bt();
1055
- et(() => {
1056
- d();
1057
- }, () => r.selectIds);
1058
- const p = w(() => _(r.selectIds, (i, g) => ({
1059
- ...i,
1060
- [g]: !0
1061
- }), {})), h = (i) => pt(i, e.signName), m = w(() => {
1062
- const i = Ft(a.value, (M) => {
1063
- const I = h(M);
1064
- return I != null && I.disabled ? !0 : S(p.value, M.dataIndex);
1065
- }), g = ce(a.value, (M) => {
1066
- const I = h(M);
1067
- return I != null && I.disabled ? !0 : S(p.value, M.dataIndex);
1115
+ const r = G(), o = r(k.PopoverKey), a = r(k.CheckboxKey), {
1116
+ originColumns: n,
1117
+ selectIdsRef: u
1118
+ } = Xn(), [s, d] = en();
1119
+ let f = {};
1120
+ const v = (b) => {
1121
+ f[b] = !1;
1122
+ }, y = () => {
1123
+ ge(u.value, (b) => {
1124
+ f[b] = !0;
1125
+ });
1126
+ }, c = A(() => V(u.value, (b, N) => ({
1127
+ ...b,
1128
+ [N]: !0
1129
+ }), {})), l = (b) => qn(b, e.signName);
1130
+ J(() => {
1131
+ u.value = K(B(n.value, (b) => {
1132
+ var N;
1133
+ return e.useSelectedStatus && Ue(f, b.dataIndex) ? f[b.dataIndex] : ((N = l(b)) == null ? void 0 : N.initShow) !== !1;
1134
+ }), (b) => b.dataIndex);
1135
+ }, n), dt(() => {
1136
+ var b;
1137
+ d(), y(), (b = e.onColumnSelectChange) == null || b.call(e, u.value);
1138
+ }, u);
1139
+ const m = A(() => {
1140
+ const b = Wt(n.value, (O) => {
1141
+ var E;
1142
+ return (E = l(O)) != null && E.disabled ? !0 : g(c.value, O.dataIndex);
1143
+ }), N = ae(n.value, (O) => {
1144
+ var E;
1145
+ return (E = l(O)) != null && E.disabled ? !0 : g(c.value, O.dataIndex);
1068
1146
  });
1069
1147
  return {
1070
- checked: i,
1071
- indeterminate: i ? !1 : g
1148
+ checked: b,
1149
+ indeterminate: b ? !1 : N
1072
1150
  };
1073
- }), u = (i) => {
1074
- var M;
1075
- (Se(i) ? (M = i.target) == null ? void 0 : M.checked : i) ? r.selectIds = R(a.value, (I) => I.dataIndex) : r.selectIds = R(U(a.value, (I) => {
1076
- var v;
1077
- return !!((v = h(I)) != null && v.disabled);
1078
- }), (I) => I.dataIndex);
1079
- }, l = () => {
1080
- r.selectIds = R(U(a.value, (i) => {
1081
- var g;
1082
- return ((g = h(i)) == null ? void 0 : g.initShow) !== !1;
1083
- }), (i) => i.dataIndex);
1084
- }, f = (i, g) => {
1085
- var I;
1086
- (Se(g) ? (I = g.target) == null ? void 0 : I.checked : g) ? r.selectIds = [...r.selectIds, i.dataIndex] : r.selectIds = U(r.selectIds, (v) => i.dataIndex !== v);
1151
+ }), h = (b) => {
1152
+ var O;
1153
+ (Ee(b) ? (O = b.target) == null ? void 0 : O.checked : b) ? u.value = K(n.value, (E) => E.dataIndex) : u.value = K(B(n.value, (E) => {
1154
+ var $;
1155
+ return ($ = l(E)) != null && $.disabled ? !0 : (v(E.dataIndex), !1);
1156
+ }), (E) => E.dataIndex);
1157
+ }, S = () => {
1158
+ u.value = K(B(n.value, (b) => {
1159
+ var N;
1160
+ return ((N = l(b)) == null ? void 0 : N.initShow) === !1 ? (v(b.dataIndex), !1) : !0;
1161
+ }), (b) => b.dataIndex);
1162
+ }, L = (b, N) => {
1163
+ var E;
1164
+ (Ee(N) ? (E = N.target) == null ? void 0 : E.checked : N) ? u.value = [...u.value, b.dataIndex] : u.value = B(u.value, ($) => b.dataIndex === $ ? (v(b.dataIndex), !1) : !0);
1087
1165
  };
1088
- return () => s ? y(s, O({
1166
+ return () => o ? i(o, C({
1089
1167
  trigger: "click"
1090
1168
  }, e.popoverProps), {
1091
1169
  default: () => {
1092
- var i;
1093
- return [((i = t.default) == null ? void 0 : i.call(t)) || "\u5217\u8BBE\u7F6E"];
1170
+ var b;
1171
+ return [((b = t.default) == null ? void 0 : b.call(t)) || "\u5217\u8BBE\u7F6E"];
1094
1172
  },
1095
- content: () => y("div", {
1173
+ content: () => i("div", {
1096
1174
  class: `${e.clsName}`
1097
- }, [y("div", {
1175
+ }, [i("div", {
1098
1176
  class: `${e.clsName}-header`
1099
- }, [y(o, {
1177
+ }, [i(a, {
1100
1178
  checked: m.value.checked,
1101
1179
  indeterminate: m.value.indeterminate,
1102
- onChange: u
1180
+ onChange: h
1103
1181
  }, {
1104
- default: () => [Ue("\u5217\u5C55\u793A")]
1105
- }), y("a", {
1106
- onClick: l
1107
- }, [Ue("\u91CD\u7F6E")])]), y("div", {
1108
- key: c.value,
1182
+ default: () => [Ye("\u5217\u5C55\u793A")]
1183
+ }), i("a", {
1184
+ onClick: S
1185
+ }, [Ye("\u91CD\u7F6E")])]), i("div", {
1186
+ key: s.value,
1109
1187
  class: `${e.clsName}-list`
1110
- }, [R(a.value, (i) => {
1111
- const g = h(i);
1112
- return y(o, {
1113
- checked: S(p.value, i.dataIndex, !1),
1114
- disabled: g == null ? void 0 : g.disabled,
1115
- onChange: (M) => {
1116
- f(i, M);
1188
+ }, [K(n.value, (b) => {
1189
+ const N = l(b), O = g(c.value, b.dataIndex, !1);
1190
+ return i(a, {
1191
+ checked: O,
1192
+ disabled: N == null ? void 0 : N.disabled,
1193
+ onChange: (E) => {
1194
+ L(b, E);
1117
1195
  }
1118
1196
  }, {
1119
- default: () => [i.title]
1197
+ default: () => [b.title]
1120
1198
  });
1121
1199
  })])]),
1122
- ...E(t, "default")
1200
+ ...I(t, "default")
1123
1201
  }) : null;
1124
1202
  }
1125
- }), Pt = Symbol("pro-table"), Nn = () => Q(Pt), On = (e) => {
1126
- ae(Pt, e);
1127
- }, ze = () => ({
1203
+ }), $t = Symbol("pro-table"), Xn = () => te($t), Yn = (e) => {
1204
+ oe($t, e);
1205
+ }, at = () => ({
1128
1206
  clsName: {
1129
1207
  type: String,
1130
1208
  default: "pro-table"
@@ -1153,133 +1231,131 @@ const In = () => ({
1153
1231
  tableMethods: {
1154
1232
  type: Array
1155
1233
  }
1156
- }), mr = N({
1234
+ }), Ur = M({
1157
1235
  inheritAttrs: !1,
1158
1236
  props: {
1159
- ...de,
1160
- ...ze()
1237
+ ...me,
1238
+ ...at()
1161
1239
  },
1162
1240
  setup: (e, {
1163
1241
  slots: t,
1164
- expose: n,
1165
- attrs: s
1242
+ expose: r,
1243
+ attrs: o,
1244
+ emit: a
1166
1245
  }) => {
1167
1246
  const {
1168
- elementMap: o
1169
- } = Z(), a = e.elementMap || o, r = S(o, x.TableKey), c = () => ({
1247
+ elementMap: n
1248
+ } = Q(), u = e.elementMap || n, s = g(n, k.TableKey), d = () => ({
1170
1249
  title: "\u5E8F\u53F7",
1171
1250
  dataIndex: "serialNumber",
1172
1251
  width: 80,
1173
1252
  ...e.column,
1174
- ...ee(e.serialNumber) ? void 0 : e.serialNumber,
1253
+ ...ne(e.serialNumber) ? void 0 : e.serialNumber,
1175
1254
  customRender: ({
1176
- index: v
1255
+ index: O
1177
1256
  }) => {
1178
- var D, L;
1179
- return ((D = e.paginationState) == null ? void 0 : D.page) && ((L = e.paginationState) == null ? void 0 : L.pageSize) ? e.paginationState.pageSize * (e.paginationState.page - 1) + v + 1 : v + 1;
1257
+ var E, $;
1258
+ return ((E = e.paginationState) == null ? void 0 : E.page) && (($ = e.paginationState) == null ? void 0 : $.pageSize) ? e.paginationState.pageSize * (e.paginationState.page - 1) + O + 1 : O + 1;
1180
1259
  }
1181
- }), d = te(t, "operate"), p = () => {
1182
- const v = e.operate, D = R(v.items, (K) => ({
1183
- ...K,
1184
- ...S(v.itemState, K.value)
1185
- })), L = Ye(D, (K) => K.sort);
1260
+ }), f = ee(t, "operate"), v = () => {
1261
+ const O = e.operate, E = K(O.items, (P) => ({
1262
+ ...P,
1263
+ ...g(O.itemState, P.value)
1264
+ })), $ = lt(E, (P) => P.sort);
1186
1265
  return {
1187
1266
  ...e.column,
1188
1267
  title: "\u64CD\u4F5C",
1189
1268
  dataIndex: "operate",
1190
1269
  fixed: "right",
1191
- ...v.column,
1270
+ ...O.column,
1192
1271
  customRender: ({
1193
- record: K
1272
+ record: P
1194
1273
  }) => {
1195
- const C = R(L, (b) => ({
1196
- value: b.value,
1197
- label: b.label,
1198
- show: k(b.show) ? b.show(K) : b.show,
1199
- disabled: k(b.disabled) ? b.disabled(K) : b.disabled,
1200
- loading: k(b.loading) ? b.loading(K) : b.loading,
1201
- extraProps: k(b.extraProps) ? b.extraProps(K) : b.extraProps,
1274
+ const T = K($, (p) => ({
1275
+ ...p,
1276
+ value: p.value,
1277
+ label: p.label,
1278
+ show: j(p.show) ? p.show(P) : p.show,
1279
+ disabled: j(p.disabled) ? p.disabled(P) : p.disabled,
1280
+ loading: j(p.loading) ? p.loading(P) : p.loading,
1281
+ extraProps: j(p.extraProps) ? p.extraProps(P) : p.extraProps,
1202
1282
  onClick: () => {
1203
- var T;
1204
- (T = b.onClick) == null || T.call(b, K);
1283
+ var x;
1284
+ (x = p.onClick) == null || x.call(p, P);
1205
1285
  },
1206
- element: k(b.element) ? () => b.element(K, b) : b.element
1286
+ element: j(p.element) ? () => p.element(P, p) : p.element
1207
1287
  }));
1208
- return y(vt, {
1209
- clsName: v.clsName || `${e.clsName}-operate`,
1210
- items: C,
1211
- elementKey: v.elementKey
1212
- }, _($(d), (b, T) => ({
1213
- ...b,
1214
- [T]: (F) => {
1215
- var j;
1216
- return (j = d[T]) == null ? void 0 : j.call(d, K, F);
1288
+ return i(Ot, {
1289
+ clsName: O.clsName || `${e.clsName}-operate`,
1290
+ items: T,
1291
+ elementKey: O.elementKey
1292
+ }, V(F(f), (p, x) => ({
1293
+ ...p,
1294
+ [x]: (U) => {
1295
+ var _;
1296
+ return (_ = f[x]) == null ? void 0 : _.call(f, P, U);
1217
1297
  }
1218
1298
  }), {}));
1219
1299
  }
1220
1300
  };
1221
- }, m = ue({
1222
- selectIds: (() => {
1223
- var L, K;
1224
- const v = ((K = (L = e.toolbar) == null ? void 0 : L.columnSetting) == null ? void 0 : K.signName) || "columnSetting", D = U(e.columns, (C) => {
1225
- var b;
1226
- return ((b = pt(C, v)) == null ? void 0 : b.initShow) !== !1;
1227
- });
1228
- return e.serialNumber && D.unshift(c()), R(D, (C) => C.dataIndex);
1229
- })()
1230
- }), u = Nt(e, "columns"), l = w(() => {
1231
- const v = _(m.selectIds, (D, L) => ({
1232
- ...D,
1233
- [L]: !0
1301
+ }, y = q([]), c = A(() => {
1302
+ var O;
1303
+ return !!((O = e.toolbar) != null && O.columnSetting);
1304
+ }), l = jt(e, "columns"), m = A(() => {
1305
+ if (!c.value)
1306
+ return e.columns;
1307
+ const O = V(y.value, (E, $) => ({
1308
+ ...E,
1309
+ [$]: !0
1234
1310
  }), {});
1235
- return U(e.columns, (D) => S(v, D.dataIndex));
1236
- }), f = (v) => R(v, (D) => {
1237
- const L = {
1311
+ return B(e.columns, (E) => g(O, E.dataIndex));
1312
+ }), h = (O) => K(O, (E) => {
1313
+ const $ = {
1238
1314
  ...e.column,
1239
- ...D
1315
+ ...E
1240
1316
  };
1241
- return D.children && H(D.children) > 0 ? (L.children = f(D.children), L) : (D.customRender || (L.customRender = ({
1242
- text: K
1317
+ return E.children && W(E.children) > 0 ? ($.children = h(E.children), $) : (E.customRender || ($.customRender = ({
1318
+ text: P
1243
1319
  }) => {
1244
- var b;
1245
- return Fe(a, {
1246
- ...D,
1320
+ var p;
1321
+ return ze(u, {
1322
+ ...E,
1247
1323
  showProps: {
1248
- ...D.showProps,
1249
- content: ((b = D.showProps) == null ? void 0 : b.content) || e.columnEmptyText
1324
+ ...E.showProps,
1325
+ content: ((p = E.showProps) == null ? void 0 : p.content) || e.columnEmptyText
1250
1326
  }
1251
- }, K) || K || e.columnEmptyText;
1252
- }), L);
1253
- }), i = w(() => {
1254
- const v = Ne(l.value, e.columnState, (L) => L.dataIndex), D = f(v);
1255
- return e.serialNumber && D.unshift(c()), e.operate && e.operate.items && ce(e.operate.items, (L) => L.show) && D.push(p()), D;
1256
- }), g = B();
1257
- On({
1258
- columns: i,
1259
- originColumns: u,
1260
- state: m,
1261
- tableRef: g,
1327
+ }, P) || P || e.columnEmptyText;
1328
+ }), $);
1329
+ }), S = A(() => {
1330
+ const O = Oe(m.value, e.columnState, ($) => $.dataIndex), E = h(O);
1331
+ return e.serialNumber && E.unshift(d()), e.operate && e.operate.items && ae(e.operate.items, ($) => $.show) && E.push(v()), E;
1332
+ }), L = q();
1333
+ Yn({
1334
+ columns: S,
1335
+ originColumns: l,
1336
+ selectIdsRef: y,
1337
+ tableRef: L,
1262
1338
  toolbar: e.toolbar,
1263
1339
  ...e.provideExtra
1264
- }), n(le(e.tableMethods || [], g));
1265
- const M = $(ze()), I = te(t, "columnSetting");
1340
+ }), r(ce(e.tableMethods || [], L));
1341
+ const b = F(at()), N = ee(t, "columnSetting");
1266
1342
  return () => {
1267
- var D, L, K;
1268
- if (!r)
1343
+ var E;
1344
+ if (!s)
1269
1345
  return null;
1270
- const v = t.toolbar ? t.toolbar() : void 0;
1271
- return y("div", O({
1346
+ const O = t.toolbar ? t.toolbar() : void 0;
1347
+ return i("div", C({
1272
1348
  class: e.clsName
1273
- }, q(s, "class")), [(v || ((D = e.toolbar) == null ? void 0 : D.columnSetting)) && y("div", {
1349
+ }, R(o, "class")), [(O || c.value) && i("div", {
1274
1350
  class: `${e.clsName}-toolbar`
1275
- }, [v, ((L = e.toolbar) == null ? void 0 : L.columnSetting) && y(Mn, (K = e.toolbar) == null ? void 0 : K.columnSetting, I)]), y(r, O({
1276
- ref: g
1277
- }, E(s, "class"), E(e, M), {
1278
- columns: i.value
1351
+ }, [O, c.value && i(Wn, (E = e.toolbar) == null ? void 0 : E.columnSetting, N)]), i(s, C({
1352
+ ref: L
1353
+ }, I(o, "class"), I(e, b), {
1354
+ columns: S.value
1279
1355
  }), t)]);
1280
1356
  };
1281
1357
  }
1282
- }), Ln = () => ({
1358
+ }), Jn = () => ({
1283
1359
  title: {
1284
1360
  type: String
1285
1361
  },
@@ -1291,34 +1367,34 @@ const In = () => ({
1291
1367
  type: Boolean,
1292
1368
  default: !0
1293
1369
  }
1294
- }), Ke = N({
1370
+ }), xe = M({
1295
1371
  props: {
1296
- ...Ln()
1372
+ ...Jn()
1297
1373
  },
1298
1374
  setup: (e, {
1299
1375
  slots: t,
1300
- emit: n
1376
+ emit: r
1301
1377
  }) => () => {
1302
- var o, a, r, c;
1303
- const s = e.hideWhileNoHistory && ((a = (o = window.history) == null ? void 0 : o.state) == null ? void 0 : a.back) || e.hideWhileNoHistory === !1;
1304
- return y("div", {
1378
+ var a, n, u, s;
1379
+ const o = e.hideWhileNoHistory && ((n = (a = window.history) == null ? void 0 : a.state) == null ? void 0 : n.back) || e.hideWhileNoHistory === !1;
1380
+ return i("div", {
1305
1381
  class: "pro-page-header"
1306
- }, [e.showBack && s && y("div", {
1382
+ }, [e.showBack && o && i("div", {
1307
1383
  class: "pro-page-header-back",
1308
1384
  onClick: () => {
1309
- n("back");
1385
+ r("back");
1310
1386
  }
1311
- }, [t.backIcon ? t.backIcon() : "\u8FD4\u56DE"]), y("div", {
1387
+ }, [t.backIcon ? t.backIcon() : "\u8FD4\u56DE"]), i("div", {
1312
1388
  class: "pro-page-header-title"
1313
- }, [t.title ? t.title() : e.title]), y("div", {
1389
+ }, [t.title ? t.title() : e.title]), i("div", {
1314
1390
  class: "pro-page-header-sub-title"
1315
- }, [t.subTitle ? t.subTitle() : e.subTitle]), y("div", {
1391
+ }, [t.subTitle ? t.subTitle() : e.subTitle]), i("div", {
1316
1392
  class: "pro-page-header-space"
1317
- }, [(r = t.space) == null ? void 0 : r.call(t)]), y("div", {
1393
+ }, [(u = t.space) == null ? void 0 : u.call(t)]), i("div", {
1318
1394
  class: "pro-page-header-extra"
1319
- }, [(c = t.extra) == null ? void 0 : c.call(t)])]);
1395
+ }, [(s = t.extra) == null ? void 0 : s.call(t)])]);
1320
1396
  }
1321
- }), An = () => ({
1397
+ }), Qn = () => ({
1322
1398
  loading: {
1323
1399
  type: Boolean,
1324
1400
  default: !1
@@ -1328,50 +1404,52 @@ const In = () => ({
1328
1404
  type: Boolean,
1329
1405
  default: !0
1330
1406
  }
1331
- }), fr = N({
1407
+ }), Br = M({
1332
1408
  props: {
1333
- ...Ke.props,
1334
- ...An()
1409
+ ...xe.props,
1410
+ ...Qn()
1335
1411
  },
1336
1412
  setup: (e, {
1337
1413
  slots: t,
1338
- emit: n
1414
+ emit: r
1339
1415
  }) => {
1340
- const o = X()(x.LoadingKey), a = B(), r = B(0);
1341
- Vt(a, (d) => {
1342
- var h;
1343
- const p = (h = d[0]) == null ? void 0 : h.contentRect;
1344
- r.value = p == null ? void 0 : p.height;
1416
+ const a = G()(k.LoadingKey), n = q(), u = q(0);
1417
+ tn(n, (d) => {
1418
+ var v;
1419
+ if (!e.fillMode)
1420
+ return;
1421
+ const f = (v = d[0]) == null ? void 0 : v.contentRect;
1422
+ u.value = f == null ? void 0 : f.height;
1345
1423
  });
1346
- const c = $(Ke.props);
1424
+ const s = F(xe.props);
1347
1425
  return () => {
1348
- var h, m, u;
1349
- const d = e.title || t.title || e.subTitle || t.subTitle || t.extra, p = !!t.footer;
1350
- return y("div", {
1426
+ var v, y, c, l;
1427
+ const d = e.title || t.title || e.subTitle || t.subTitle || t.extra, f = !!t.footer;
1428
+ return i("div", {
1351
1429
  class: "pro-page"
1352
- }, [d && y(Ke, O(q(e, c), {
1430
+ }, [(v = t.start) == null ? void 0 : v.call(t), d && i(xe, C(R(e, s), {
1353
1431
  onBack: () => {
1354
- n("back");
1432
+ r("back");
1355
1433
  }
1356
- }), q(t, "backIcon", "title", "subTitle", "space", "extra")), e.loading && o ? y(o, O({
1434
+ }), R(t, "backIcon", "title", "subTitle", "space", "extra")), e.loading && a ? i(a, C({
1357
1435
  loading: !0
1358
1436
  }, e.loadingOpts), {
1359
- default: () => [y("div", {
1437
+ default: () => [i("div", {
1360
1438
  class: "pro-loading-dom"
1361
1439
  }, null)]
1362
- }) : y("div", {
1363
- ref: a,
1364
- style: r.value > 0 ? `height:${r.value > 0}` : "",
1440
+ }) : i("div", {
1441
+ ref: n,
1442
+ style: e.fillMode && u.value > 0 ? `height:${u.value};overflow-y:auto` : "",
1365
1443
  class: "pro-page-content"
1366
- }, [e.fillMode ? y(W, null, [r.value > 0 && ((h = t.default) == null ? void 0 : h.call(t))]) : (m = t.default) == null ? void 0 : m.call(t)]), !e.loading && p && y("div", {
1444
+ }, [e.fillMode ? i(Y, null, [u.value > 0 && ((y = t.default) == null ? void 0 : y.call(t))]) : (c = t.default) == null ? void 0 : c.call(t)]), !e.loading && f && i("div", {
1367
1445
  class: "pro-page-footer"
1368
- }, [(u = t.footer) == null ? void 0 : u.call(t)])]);
1446
+ }, [(l = t.footer) == null ? void 0 : l.call(t)])]);
1369
1447
  };
1370
1448
  }
1371
- }), Kn = Object.freeze({
1449
+ }), Zn = Object.freeze({
1372
1450
  page: 1,
1373
1451
  pageSize: 10
1374
- }), Rn = () => ({
1452
+ }), er = () => ({
1375
1453
  clsName: {
1376
1454
  type: String,
1377
1455
  default: "pro-list"
@@ -1389,59 +1467,59 @@ const In = () => ({
1389
1467
  pageState: {
1390
1468
  type: Object
1391
1469
  }
1392
- }), We = N({
1470
+ }), ot = M({
1393
1471
  props: {
1394
- ...Rn()
1472
+ ...er()
1395
1473
  },
1396
1474
  setup: (e, {
1397
1475
  slots: t,
1398
- emit: n
1476
+ emit: r
1399
1477
  }) => {
1400
- const s = X(), o = s(x.ProSearchFormKey), a = s(x.ProTableKey), r = s(x.PaginationKey), c = e.pageState || ue({
1401
- ...Kn
1478
+ const o = G(), a = o(k.ProSearchFormKey), n = o(k.ProTableKey), u = o(k.PaginationKey), s = e.pageState || he({
1479
+ ...Zn
1402
1480
  });
1403
1481
  let d;
1404
- const p = () => {
1405
- n("search", {
1482
+ const f = () => {
1483
+ r("search", {
1406
1484
  ...d,
1407
- ...c
1485
+ ...s
1408
1486
  });
1409
- }, h = (i, g) => {
1410
- d = i, c.page = g || 1, p();
1411
- }, m = (i, g) => {
1412
- c.page = i, c.pageSize = g, p();
1413
- }, u = te(t, "search"), l = te(t, "table"), f = te(t, "pagination");
1487
+ }, v = (h, S) => {
1488
+ d = h, s.page = S || 1, f();
1489
+ }, y = (h, S) => {
1490
+ s.page = h, s.pageSize = S, f();
1491
+ }, c = ee(t, "search"), l = ee(t, "table"), m = ee(t, "pagination");
1414
1492
  return () => {
1415
- var i, g, M, I;
1416
- return y(W, null, [(i = t.start) == null ? void 0 : i.call(t), t.search ? t.search({
1417
- executeSearchWithResetPage: h,
1418
- pageState: c
1419
- }) : y(W, null, [o && y(o, O({
1493
+ var h, S, L, b;
1494
+ return i(Y, null, [(h = t.start) == null ? void 0 : h.call(t), t.search ? t.search({
1495
+ executeSearchWithResetPage: v,
1496
+ pageState: s
1497
+ }) : i(Y, null, [a && i(a, C({
1420
1498
  clsName: `${e.clsName}-search`
1421
- }, E(e.searchProps, "onFinish"), {
1422
- onFinish: (v) => h(v)
1423
- }), u)]), (g = t.divide) == null ? void 0 : g.call(t), t.table ? t.table({
1424
- pageState: c
1425
- }) : y(W, null, [a && y(a, O({
1499
+ }, I(e.searchProps, "onFinish"), {
1500
+ onFinish: (N) => v(N)
1501
+ }), c)]), (S = t.divide) == null ? void 0 : S.call(t), t.table ? t.table({
1502
+ pageState: s
1503
+ }) : i(Y, null, [n && i(n, C({
1426
1504
  clsName: `${e.clsName}-table`,
1427
1505
  paginationState: {
1428
- page: c.page,
1429
- pageSize: c.pageSize
1506
+ page: s.page,
1507
+ pageSize: s.pageSize
1430
1508
  },
1431
1509
  pagination: !1
1432
- }, e.tableProps), l)]), (M = t.divide2) == null ? void 0 : M.call(t), t.pagination ? t.pagination({
1433
- executePageChange: m,
1434
- pageState: c
1435
- }) : y(W, null, [e.paginationProps !== !1 && r && y("div", {
1510
+ }, e.tableProps), l)]), (L = t.divide2) == null ? void 0 : L.call(t), t.pagination ? t.pagination({
1511
+ executePageChange: y,
1512
+ pageState: s
1513
+ }) : i(Y, null, [e.paginationProps !== !1 && u && i("div", {
1436
1514
  class: `${e.clsName}-pagination`
1437
- }, [y(r, O(E(ee(e.paginationProps) ? {} : e.paginationProps, "onChange"), {
1438
- page: c.page,
1439
- pageSize: c.pageSize,
1440
- onComposeChange: m
1441
- }), f)])]), (I = t.end) == null ? void 0 : I.call(t)]);
1515
+ }, [i(u, C(I(ne(e.paginationProps) ? {} : e.paginationProps, "onChange"), {
1516
+ page: s.page,
1517
+ pageSize: s.pageSize,
1518
+ onComposeChange: y
1519
+ }), m)])]), (b = t.end) == null ? void 0 : b.call(t)]);
1442
1520
  };
1443
1521
  }
1444
- }), He = () => ({
1522
+ }), ut = () => ({
1445
1523
  clsName: {
1446
1524
  type: String,
1447
1525
  default: "pro-desc"
@@ -1449,44 +1527,434 @@ const In = () => ({
1449
1527
  model: {
1450
1528
  type: Object
1451
1529
  }
1452
- }), wn = N({
1530
+ }), tr = M({
1453
1531
  props: {
1454
- ...de,
1455
- ...He()
1532
+ ...me,
1533
+ ...ut()
1456
1534
  },
1457
1535
  setup: (e, {
1458
1536
  slots: t
1459
1537
  }) => {
1460
1538
  const {
1461
- elementMap: n
1462
- } = Z(), s = e.elementMap || n, o = X(), a = o(x.DescriptionsKey), r = o(x.DescriptionsItemKey), c = w(() => Ne(e.columns, e.columnState, "dataIndex")), d = $(de), p = $(He());
1463
- return () => !a || !r ? null : y(a, O({
1539
+ elementMap: r
1540
+ } = Q(), o = e.elementMap || r, a = G(), n = a(k.DescriptionsKey), u = a(k.DescriptionsItemKey), s = A(() => Oe(e.columns, e.columnState, "dataIndex")), d = F(me), f = F(ut());
1541
+ return () => !n || !u ? null : i(n, C({
1464
1542
  class: e.clsName
1465
- }, E(e, ...d, ...p, "model")), {
1543
+ }, I(e, ...d, ...f, "model")), {
1466
1544
  default: () => {
1467
- var h, m;
1468
- return [(h = t.start) == null ? void 0 : h.call(t), R(c.value, (u) => {
1469
- const l = u.dataIndex, f = S(e.model, l);
1470
- return y(r, O({
1545
+ var v, y;
1546
+ return [(v = t.start) == null ? void 0 : v.call(t), K(s.value, (c) => {
1547
+ const l = c.dataIndex, m = g(e.model, l);
1548
+ return i(u, C({
1471
1549
  class: `${e.clsName}-item`
1472
- }, S(u.extra, "desc")), {
1550
+ }, g(c.extra, "desc")), {
1473
1551
  default: () => {
1474
- var i;
1475
- return [((i = t.value) == null ? void 0 : i.call(t, f, u)) || Fe(s, u, f)];
1552
+ var h;
1553
+ return [((h = t.value) == null ? void 0 : h.call(t, m, c)) || ze(o, c, m)];
1476
1554
  },
1477
1555
  label: () => {
1478
- var i;
1479
- return ((i = t.label) == null ? void 0 : i.call(t, u)) || u.title;
1556
+ var h;
1557
+ return ((h = t.label) == null ? void 0 : h.call(t, c)) || c.title;
1480
1558
  }
1481
1559
  });
1482
- }), (m = t.default) == null ? void 0 : m.call(t)];
1560
+ }), (y = t.default) == null ? void 0 : y.call(t)];
1483
1561
  },
1484
1562
  ...t
1485
1563
  });
1486
1564
  }
1487
- }), Et = Symbol("pro-curd"), G = () => Q(Et), kn = (e) => ae(Et, e);
1488
- var P = /* @__PURE__ */ ((e) => (e.LIST = "LIST", e.DETAIL = "DETAIL", e.ADD = "ADD", e.EDIT = "EDIT", e.DELETE = "DELETE", e))(P || {}), A = /* @__PURE__ */ ((e) => (e.EMIT = "EMIT", e.EXECUTE = "EXECUTE", e.PAGE = "PAGE", e.SUCCESS = "SUCCESS", e.FAIL = "FAIL", e))(A || {}), ne = /* @__PURE__ */ ((e) => (e.ADD = "ADD", e.EDIT = "EDIT", e.DETAIL = "DETAIL", e))(ne || {}), pe = /* @__PURE__ */ ((e) => (e.NORMAL = "NORMAL", e.CONTINUE = "CONTINUE", e))(pe || {});
1489
- const $n = () => ({
1565
+ }), nr = () => ({
1566
+ content: {
1567
+ type: [String, Number]
1568
+ },
1569
+ ellipsis: {
1570
+ type: [Object, Boolean]
1571
+ },
1572
+ popoverProps: Object
1573
+ }), rr = M({
1574
+ inheritAttrs: !1,
1575
+ props: {
1576
+ ...nr()
1577
+ },
1578
+ setup: (e, {
1579
+ attrs: t
1580
+ }) => {
1581
+ const o = G()(k.PopoverKey), a = () => {
1582
+ var n, u;
1583
+ 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";
1584
+ };
1585
+ return () => {
1586
+ const n = i("span", C({
1587
+ class: `pro-typography ${e.ellipsis ? "pro-typography-ellipsis" : ""}`,
1588
+ style: `-webkit-line-clamp:${a()}`
1589
+ }, t), [e.content]);
1590
+ return !e.popoverProps || !o ? n : i(o, e.popoverProps, {
1591
+ default: () => [n],
1592
+ content: () => e.content
1593
+ });
1594
+ };
1595
+ }
1596
+ }), pe = {
1597
+ value: {
1598
+ type: [String, Number]
1599
+ },
1600
+ showProps: {
1601
+ type: Object
1602
+ },
1603
+ convert: {
1604
+ type: Function
1605
+ }
1606
+ }, $e = M({
1607
+ inheritAttrs: !1,
1608
+ props: {
1609
+ ...pe
1610
+ },
1611
+ setup: (e, {
1612
+ attrs: t
1613
+ }) => {
1614
+ const r = A(() => {
1615
+ var n;
1616
+ const o = (n = e.showProps) == null ? void 0 : n.content, a = e.value || Xt(e.value) ? e.value : o;
1617
+ return e.convert ? e.convert(a, e) : a;
1618
+ });
1619
+ return () => i(rr, C(R(t, "style", "class"), I(e.showProps, "content"), {
1620
+ content: r.value
1621
+ }), null);
1622
+ }
1623
+ }), Vr = M({
1624
+ inheritAttrs: !1,
1625
+ props: {
1626
+ ...pe,
1627
+ decimalFixed: {
1628
+ type: Number,
1629
+ default: 0
1630
+ },
1631
+ thousandDivision: {
1632
+ type: Boolean,
1633
+ default: !1
1634
+ }
1635
+ },
1636
+ setup: (e, {
1637
+ attrs: t
1638
+ }) => {
1639
+ const r = A(() => {
1640
+ let o = e.value;
1641
+ return o && e.decimalFixed && (o = nn(o, e.decimalFixed || 2)), o && e.thousandDivision && (o = rn(o)), e.convert ? e.convert(o, e) : o;
1642
+ });
1643
+ return () => i($e, C(R(t, "style", "class"), {
1644
+ value: r.value,
1645
+ showProps: e.showProps
1646
+ }), null);
1647
+ }
1648
+ }), _r = M({
1649
+ inheritAttrs: !1,
1650
+ props: {
1651
+ ...pe,
1652
+ value: {
1653
+ type: [String, Number, Array]
1654
+ },
1655
+ options: Array,
1656
+ splitStr: {
1657
+ type: String,
1658
+ default: ","
1659
+ },
1660
+ colorMap: {
1661
+ type: Object
1662
+ }
1663
+ },
1664
+ setup: (e, {
1665
+ attrs: t
1666
+ }) => {
1667
+ const r = A(() => an(e.options, (n) => n.label), void 0), o = A(() => {
1668
+ const n = e.value;
1669
+ let u = e.value;
1670
+ return z(n) ? u = Be(K(n, (s) => g(r.value, s, s)), e.splitStr) : u = g(r.value, n, e.value), e.convert ? e.convert(u, e) : u;
1671
+ }), a = A(() => g(e.colorMap, e.value));
1672
+ return () => i($e, C(R(t, "style", "class"), {
1673
+ style: `color:${a.value || ""}`,
1674
+ value: o.value,
1675
+ showProps: e.showProps
1676
+ }), null);
1677
+ }
1678
+ }), zr = M({
1679
+ inheritAttrs: !1,
1680
+ props: {
1681
+ ...pe,
1682
+ value: {
1683
+ type: [String, Number, Array]
1684
+ },
1685
+ splitStr: {
1686
+ type: String,
1687
+ default: "/"
1688
+ },
1689
+ treeData: Array,
1690
+ data: Array,
1691
+ options: Array,
1692
+ fieldNames: Object,
1693
+ props: Object
1694
+ },
1695
+ setup: (e, {
1696
+ attrs: t
1697
+ }) => {
1698
+ const r = A(() => {
1699
+ const a = e.treeData || e.data || e.options, n = e.fieldNames || e.props;
1700
+ return on(a, (u) => g(u, (n == null ? void 0 : n.label) || "label"), {
1701
+ value: "value",
1702
+ children: "children",
1703
+ ...n
1704
+ });
1705
+ }), o = A(() => {
1706
+ let a = e.value;
1707
+ return z(e.value) ? a = Be(K(e.value, (n) => g(r.value, n, n)), e.splitStr) : a = g(r.value, e.value, e.value), e.convert ? e.convert(a, e) : a;
1708
+ });
1709
+ return () => i($e, C(R(t, "style", "class"), {
1710
+ value: o.value,
1711
+ showProps: e.showProps
1712
+ }), null);
1713
+ }
1714
+ }), Gr = M({
1715
+ props: {
1716
+ ...pe,
1717
+ value: {
1718
+ type: [String, Number, Array]
1719
+ },
1720
+ splitStr: {
1721
+ type: String,
1722
+ default: "-"
1723
+ },
1724
+ format: {
1725
+ type: String,
1726
+ default: "YYYY-MM-DD"
1727
+ },
1728
+ isUnix: {
1729
+ type: Boolean,
1730
+ default: !1
1731
+ }
1732
+ },
1733
+ setup: (e, {
1734
+ attrs: t
1735
+ }) => {
1736
+ const r = (a) => a && (e.isUnix ? Ze.unix(a).format(e.format) : Ze(a).format(e.format)), o = A(() => {
1737
+ let a = e.value;
1738
+ return z(e.value) ? a = Be(K(e.value, (n) => r(n) || ""), e.splitStr) : a = r(e.value) || "", e.convert ? e.convert(a, e) : a;
1739
+ });
1740
+ return () => i($e, C(R(t, "style", "class"), {
1741
+ value: o.value,
1742
+ showProps: e.showProps
1743
+ }), null);
1744
+ }
1745
+ }), ke = M((e, {
1746
+ slots: t
1747
+ }) => () => {
1748
+ var r, o, a, n;
1749
+ return i("header", null, [(r = t.start) == null ? void 0 : r.call(t), (o = t.menus) == null ? void 0 : o.call(t), (a = t.default) == null ? void 0 : a.call(t), (n = t.end) == null ? void 0 : n.call(t)]);
1750
+ });
1751
+ function ar(e) {
1752
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !de(e);
1753
+ }
1754
+ const We = {
1755
+ convertSubMenuParams: {
1756
+ type: Function
1757
+ },
1758
+ convertMenuItemParams: {
1759
+ type: Function
1760
+ },
1761
+ subMenuSlots: {
1762
+ type: Object
1763
+ },
1764
+ menuItemSlots: {
1765
+ type: Object
1766
+ },
1767
+ onMenuItemClick: {
1768
+ type: Function
1769
+ }
1770
+ }, Ke = F(We), Kt = M({
1771
+ inheritAttrs: !1,
1772
+ props: {
1773
+ menu: Object,
1774
+ ...We
1775
+ },
1776
+ setup: (e) => {
1777
+ const t = G(), r = t(k.MenuSubKey), o = t(k.MenuItemKey), a = () => {
1778
+ var s;
1779
+ (s = e.onMenuItemClick) == null || s.call(e, e.menu);
1780
+ }, n = V(F(e.subMenuSlots), (s, d) => ({
1781
+ ...s,
1782
+ [d]: () => {
1783
+ var f, v;
1784
+ return (v = (f = e.subMenuSlots)[d]) == null ? void 0 : v.call(f, e.menu);
1785
+ }
1786
+ }), {}), u = V(F(e.menuItemSlots), (s, d) => ({
1787
+ ...s,
1788
+ [d]: () => {
1789
+ var f, v;
1790
+ return (v = (f = e.menuItemSlots)[d]) == null ? void 0 : v.call(f, e.menu);
1791
+ }
1792
+ }), {});
1793
+ return () => {
1794
+ var s, d, f;
1795
+ return ((s = e.menu) == null ? void 0 : s.children) && W(e.menu.children) > 0 ? r ? i(r, (d = e.convertSubMenuParams) == null ? void 0 : d.call(e, e.menu), {
1796
+ default: () => [K(e.menu.children, (v) => i(Kt, C({
1797
+ menu: v
1798
+ }, R(e, Ke)), null))],
1799
+ ...n
1800
+ }) : null : o ? i(o, C((f = e.convertMenuItemParams) == null ? void 0 : f.call(e, e.menu), {
1801
+ onClick: a
1802
+ }), u) : null;
1803
+ };
1804
+ }
1805
+ }), or = () => ({
1806
+ clsName: {
1807
+ type: String,
1808
+ default: "pro-layout-menus"
1809
+ },
1810
+ menus: {
1811
+ type: Array
1812
+ },
1813
+ mode: {
1814
+ type: String,
1815
+ default: "vertical"
1816
+ },
1817
+ activeKey: {
1818
+ type: String
1819
+ },
1820
+ openKeys: {
1821
+ type: Array
1822
+ },
1823
+ convertMenuParams: {
1824
+ type: Function
1825
+ },
1826
+ ...We
1827
+ }), le = M({
1828
+ inheritAttrs: !1,
1829
+ props: {
1830
+ ...or()
1831
+ },
1832
+ setup: (e) => {
1833
+ const r = G()(k.MenuKey);
1834
+ return () => {
1835
+ var a;
1836
+ let o;
1837
+ return r ? i(r, C({
1838
+ class: e.clsName
1839
+ }, (a = e.convertMenuParams) == null ? void 0 : a.call(e, R(e, "mode", "activeKey", "openKeys", "collapse"))), ar(o = K(e.menus, (n) => i(Kt, C({
1840
+ menu: n
1841
+ }, R(e, Ke)), null))) ? o : {
1842
+ default: () => [o]
1843
+ }) : null;
1844
+ };
1845
+ }
1846
+ }), ur = () => ({
1847
+ clsName: {
1848
+ type: String,
1849
+ default: "pro-layout"
1850
+ },
1851
+ layout: {
1852
+ type: String,
1853
+ default: "compose"
1854
+ },
1855
+ findCurrentTopName: {
1856
+ type: Function
1857
+ },
1858
+ findActiveKey: {
1859
+ type: Function
1860
+ },
1861
+ menus: {
1862
+ type: Array
1863
+ },
1864
+ fieldNames: {
1865
+ type: Object,
1866
+ default: {
1867
+ children: "children",
1868
+ value: "value",
1869
+ label: "label"
1870
+ }
1871
+ },
1872
+ ...R(le.props, ...Ke, "convertMenuParams")
1873
+ }), Hr = M({
1874
+ inheritAttrs: !1,
1875
+ props: {
1876
+ ...ur()
1877
+ },
1878
+ setup: (e, {
1879
+ slots: t,
1880
+ attrs: r
1881
+ }) => {
1882
+ const o = Ve(), a = (c) => K(c, (l) => {
1883
+ var m, h, S;
1884
+ return {
1885
+ value: g(l, ((m = e.fieldNames) == null ? void 0 : m.value) || "value"),
1886
+ label: g(l, ((h = e.fieldNames) == null ? void 0 : h.label) || "label"),
1887
+ children: a(g(l, ((S = e.fieldNames) == null ? void 0 : S.children) || "children"))
1888
+ };
1889
+ }), n = A(() => a(e.menus)), u = A(() => un(n.value)), s = A(() => {
1890
+ var l;
1891
+ const c = Je(o.matched, (m) => !!g(u.value, m.name));
1892
+ return c ? g(u.value, c.name) : (l = e.findCurrentTopName) == null ? void 0 : l.call(e, o, u.value);
1893
+ }), d = A(() => s.value ? Qe(n.value, (c) => c.value === s.value).target : null), f = A(() => {
1894
+ var l;
1895
+ const c = Je(o.matched, (m) => !!g(u.value, m.name));
1896
+ return c ? c.name : (l = e.findActiveKey) == null ? void 0 : l.call(e, o, u.value);
1897
+ }), v = (c) => {
1898
+ var m;
1899
+ const l = Qe(n.value, (h) => h.value === c.value).target;
1900
+ (m = e.onMenuItemClick) == null || m.call(e, l);
1901
+ }, y = ee(t, "header");
1902
+ return () => {
1903
+ var m, h, S;
1904
+ const c = R(r, "class"), l = {
1905
+ ...R(e, ...Ke, "convertMenuParams"),
1906
+ ...R(t, "title", "icon", "default")
1907
+ };
1908
+ return e.layout === "vertical" ? i("main", C(c, {
1909
+ class: `${e.clsName} ${e.clsName}-${e.layout}`
1910
+ }), [i(ke, {
1911
+ class: `${e.clsName}-header`
1912
+ }, {
1913
+ menus: () => i(le, C({
1914
+ mode: "horizontal",
1915
+ menus: n.value,
1916
+ activeKey: f.value
1917
+ }, l), null),
1918
+ ...y
1919
+ }), i("div", {
1920
+ class: `${e.clsName}-section`
1921
+ }, [(m = t.default) == null ? void 0 : m.call(t)])]) : e.layout === "horizontal" ? i("main", C(c, {
1922
+ class: `${e.clsName} ${e.clsName}-${e.layout}`
1923
+ }), [i(le, C({
1924
+ menus: n.value,
1925
+ activeKey: f.value
1926
+ }, l), null), i("div", {
1927
+ class: `${e.clsName}-structure`
1928
+ }, [i(ke, {
1929
+ class: `${e.clsName}-header`
1930
+ }, y), i("div", {
1931
+ class: `${e.clsName}-section`
1932
+ }, [(h = t.default) == null ? void 0 : h.call(t)])])]) : i("main", C(c, {
1933
+ class: `${e.clsName} ${e.clsName}-${e.layout}`
1934
+ }), [i(ke, {
1935
+ class: `${e.clsName}-header`
1936
+ }, {
1937
+ menus: () => i(le, C({
1938
+ mode: "horizontal",
1939
+ menus: K(n.value, (L) => I(L, "children")),
1940
+ activeKey: s.value
1941
+ }, I(l, "onMenuItemClick"), {
1942
+ onMenuItemClick: v
1943
+ }), null),
1944
+ ...y
1945
+ }), i("div", {
1946
+ class: `${e.clsName}-structure`
1947
+ }, [d.value && W(d.value.children) > 0 && i(le, C({
1948
+ menus: d.value.children,
1949
+ activeKey: f.value
1950
+ }, l), null), i("div", {
1951
+ class: `${e.clsName}-section`
1952
+ }, [(S = t.default) == null ? void 0 : S.call(t)])])]);
1953
+ };
1954
+ }
1955
+ }), wt = Symbol("pro-curd"), X = () => te(wt), sr = (e) => oe(wt, e);
1956
+ var D = /* @__PURE__ */ ((e) => (e.LIST = "LIST", e.DETAIL = "DETAIL", e.ADD = "ADD", e.EDIT = "EDIT", e.DELETE = "DELETE", e))(D || {}), w = /* @__PURE__ */ ((e) => (e.EMIT = "EMIT", e.EXECUTE = "EXECUTE", e.PAGE = "PAGE", e.SUCCESS = "SUCCESS", e.FAIL = "FAIL", e))(w || {}), re = /* @__PURE__ */ ((e) => (e.ADD = "ADD", e.EDIT = "EDIT", e.DETAIL = "DETAIL", e))(re || {}), ve = /* @__PURE__ */ ((e) => (e.NORMAL = "NORMAL", e.CONTINUE = "CONTINUE", e))(ve || {});
1957
+ const cr = () => ({
1490
1958
  rowKey: {
1491
1959
  type: String,
1492
1960
  default: "id"
@@ -1506,422 +1974,422 @@ const $n = () => ({
1506
1974
  modalProps: {
1507
1975
  type: Object
1508
1976
  }
1509
- }), Ct = ["sendCurdEvent", "refreshList", "sendEvent", "sendRequest"], Xe = N({
1977
+ }), Lt = ["sendCurdEvent", "refreshList", "sendEvent", "sendRequest"], st = M({
1510
1978
  props: {
1511
- ...de,
1512
- ...$n()
1979
+ ...me,
1980
+ ...cr()
1513
1981
  },
1514
1982
  setup: (e, {
1515
1983
  slots: t,
1516
- expose: n
1984
+ expose: r
1517
1985
  }) => {
1518
1986
  const {
1519
- elementMap: s,
1520
- state: o,
1521
- sendEvent: a,
1522
- sendRequest: r
1523
- } = ge(), c = w(() => Ne(e.columns, e.columnState, (b) => se(b))), d = (b, T = !0) => ct(e.formElementMap, b, T), p = (b, T) => Fe(s, b, T), h = (b, T) => {
1524
- const F = U(c.value, (j) => {
1525
- const z = S(j, ["extra", b]) || S(j, b);
1526
- return T ? z !== !1 : z;
1987
+ elementMap: o,
1988
+ state: a,
1989
+ sendEvent: n,
1990
+ sendRequest: u
1991
+ } = Se(), s = A(() => Oe(e.columns, e.columnState, (T) => se(T))), d = (T, p = !0) => bt(e.formElementMap, T, p), f = (T, p) => ze(o, T, p), v = (T, p) => {
1992
+ const x = B(s.value, (U) => {
1993
+ const _ = g(U, ["extra", T]) || g(U, T);
1994
+ return p ? _ !== !1 : _;
1527
1995
  });
1528
- return Ye(F, (j) => S(j, ["extra", `${b}Sort`]) || S(j, `${b}Sort`));
1529
- }, m = w(() => h("form", !0)), u = w(() => h("detail", !0)), l = w(() => h("table", !0)), f = w(() => h("search"));
1530
- let i;
1531
- const g = (b) => {
1532
- r(P.LIST, {
1533
- ...i,
1534
- ...b
1996
+ return lt(x, (U) => g(U, ["extra", `${T}Sort`]) || g(U, `${T}Sort`));
1997
+ }, y = A(() => v("form", !0)), c = A(() => v("detail", !0)), l = A(() => v("table", !0)), m = A(() => v("search"));
1998
+ let h;
1999
+ const S = (T) => {
2000
+ u(D.LIST, {
2001
+ ...h,
2002
+ ...T
1535
2003
  });
1536
- }, M = (b) => {
1537
- a({
1538
- type: b.action,
1539
- payload: E(b, "action", "source"),
1540
- source: b.source
2004
+ }, L = (T) => {
2005
+ n({
2006
+ type: T.action,
2007
+ payload: I(T, "action", "source"),
2008
+ source: T.source
1541
2009
  });
1542
2010
  };
1543
- je(({
1544
- type: b,
1545
- payload: T,
1546
- source: F
2011
+ He(({
2012
+ type: T,
2013
+ payload: p,
2014
+ source: x
1547
2015
  }) => {
1548
- if (F)
2016
+ if (x)
1549
2017
  return;
1550
- let j = b, z = T == null ? void 0 : T.type;
1551
- j === fe.Success && (j = S(T, ["requestOpts", "action"]), z = A.SUCCESS);
2018
+ let U = T, _ = p == null ? void 0 : p.type;
2019
+ U === ye.Success && (U = g(p, ["requestOpts", "action"]), _ = w.SUCCESS);
1552
2020
  const {
1553
- values: he,
1554
- record: It
1555
- } = T;
1556
- switch (j) {
1557
- case P.LIST:
1558
- z === A.EMIT && (i = he, g());
2021
+ values: Pe,
2022
+ record: xt
2023
+ } = p;
2024
+ switch (U) {
2025
+ case D.LIST:
2026
+ _ === w.EMIT && (h = Pe, S());
1559
2027
  return;
1560
- case P.ADD:
1561
- z === A.EXECUTE && r(P.ADD, he, o.detailData);
2028
+ case D.ADD:
2029
+ _ === w.EXECUTE && u(D.ADD, Pe, a.detailData);
1562
2030
  return;
1563
- case P.EDIT:
1564
- z === A.EXECUTE && r(P.EDIT, he, o.detailData);
2031
+ case D.EDIT:
2032
+ _ === w.EXECUTE && u(D.EDIT, Pe, a.detailData);
1565
2033
  return;
1566
- case P.DELETE:
1567
- z === A.EMIT ? r(P.DELETE, It, e.rowKey) : z === A.SUCCESS && g();
2034
+ case D.DELETE:
2035
+ _ === w.EMIT ? u(D.DELETE, xt, e.rowKey) : _ === w.SUCCESS && S();
1568
2036
  return;
1569
2037
  }
1570
- j && b === A.EXECUTE && r(j, he);
2038
+ U && T === w.EXECUTE && u(U, Pe);
1571
2039
  });
1572
- const I = _(e.operates, (b, T) => ({
1573
- ...b,
1574
- [T.action]: T
1575
- }), {}), v = (b) => S(I, b), D = w(() => e.listProps), L = w(() => e.formProps), K = w(() => e.descProps), C = w(() => e.modalProps);
1576
- return kn({
1577
- columns: c,
1578
- getSignColumns: h,
2040
+ const b = V(e.operates, (T, p) => ({
2041
+ ...T,
2042
+ [p.action]: p
2043
+ }), {}), N = (T) => g(b, T), O = A(() => e.listProps), E = A(() => e.formProps), $ = A(() => e.descProps), P = A(() => e.modalProps);
2044
+ return sr({
2045
+ columns: s,
2046
+ getSignColumns: v,
1579
2047
  getFormItemVNode: d,
1580
- getItemVNode: p,
1581
- elementMap: s,
2048
+ getItemVNode: f,
2049
+ elementMap: o,
1582
2050
  formElementMap: e.formElementMap,
1583
2051
  rowKey: e.rowKey,
1584
- curdState: o,
1585
- formColumns: m,
1586
- descColumns: u,
2052
+ curdState: a,
2053
+ formColumns: y,
2054
+ descColumns: c,
1587
2055
  tableColumns: l,
1588
- searchColumns: f,
1589
- sendCurdEvent: M,
2056
+ searchColumns: m,
2057
+ sendCurdEvent: L,
1590
2058
  operates: e.operates,
1591
- getOperate: v,
1592
- refreshList: g,
1593
- listProps: D,
1594
- formProps: L,
1595
- descProps: K,
1596
- modalProps: C
1597
- }), n({
1598
- sendCurdEvent: M,
1599
- refreshList: g
2059
+ getOperate: N,
2060
+ refreshList: S,
2061
+ listProps: O,
2062
+ formProps: E,
2063
+ descProps: $,
2064
+ modalProps: P
2065
+ }), r({
2066
+ sendCurdEvent: L,
2067
+ refreshList: S
1600
2068
  }), () => {
1601
- var b;
1602
- return (b = t.default) == null ? void 0 : b.call(t);
2069
+ var T;
2070
+ return (T = t.default) == null ? void 0 : T.call(t);
1603
2071
  };
1604
2072
  }
1605
- }), Ce = N({
2073
+ }), Ie = M({
1606
2074
  props: {
1607
- ...E(Le.props, "state", "requests"),
1608
- ...Xe.props,
2075
+ ...I(Le.props, "state", "requests"),
2076
+ ...st.props,
1609
2077
  curdState: {
1610
2078
  type: Object
1611
2079
  }
1612
2080
  },
1613
2081
  setup: (e, {
1614
2082
  slots: t,
1615
- expose: n
2083
+ expose: r
1616
2084
  }) => {
1617
2085
  const {
1618
- elementMap: s,
1619
- formElementMap: o
1620
- } = Z(), a = B(), r = B(), c = e.curdState || ue({
2086
+ elementMap: o,
2087
+ formElementMap: a
2088
+ } = Q(), n = q(), u = q(), s = e.curdState || he({
1621
2089
  detailData: {}
1622
2090
  }), d = {
1623
- [P.LIST]: {
1624
- convertParams: (u) => u,
1625
- convertData: (u) => {
2091
+ [D.LIST]: {
2092
+ convertParams: (c) => c,
2093
+ convertData: (c) => {
1626
2094
  var l;
1627
- return (l = u.res) == null ? void 0 : l.data;
2095
+ return (l = c.res) == null ? void 0 : l.data;
1628
2096
  },
1629
2097
  loadingName: "listLoading",
1630
2098
  stateName: "listData"
1631
2099
  },
1632
- [P.DETAIL]: {
1633
- convertParams: (u, l) => q(u, l),
1634
- convertData: (u) => {
2100
+ [D.DETAIL]: {
2101
+ convertParams: (c, l) => R(c, l),
2102
+ convertData: (c) => {
1635
2103
  var l;
1636
- return (l = u.res) == null ? void 0 : l.data;
2104
+ return (l = c.res) == null ? void 0 : l.data;
1637
2105
  },
1638
2106
  loadingName: "detailLoading",
1639
2107
  stateName: "detailData",
1640
2108
  label: "\u8BE6\u60C5"
1641
2109
  },
1642
- [P.ADD]: {
1643
- convertParams: (u, l) => ({
2110
+ [D.ADD]: {
2111
+ convertParams: (c, l) => ({
1644
2112
  body: {
1645
2113
  ...l,
1646
- ...u
2114
+ ...c
1647
2115
  }
1648
2116
  }),
1649
2117
  loadingName: "operateLoading",
1650
2118
  label: "\u6DFB\u52A0"
1651
2119
  },
1652
- [P.EDIT]: {
1653
- convertParams: (u, l) => ({
2120
+ [D.EDIT]: {
2121
+ convertParams: (c, l) => ({
1654
2122
  body: {
1655
2123
  ...l,
1656
- ...u
2124
+ ...c
1657
2125
  }
1658
2126
  }),
1659
2127
  loadingName: "operateLoading",
1660
2128
  label: "\u7F16\u8F91"
1661
2129
  },
1662
- [P.DELETE]: {
1663
- convertParams: (u, l) => q(u, l),
2130
+ [D.DELETE]: {
2131
+ convertParams: (c, l) => R(c, l),
1664
2132
  label: "\u5220\u9664"
1665
2133
  }
1666
- }, p = R(e.operates, (u) => ({
1667
- ...S(d, u.action),
1668
- ...u
1669
- })), h = U(p, (u) => u.actor), m = $(E(Le.props, "state", "requests"));
1670
- return n({
1671
- sendCurdEvent: (u) => {
2134
+ }, f = K(e.operates, (c) => ({
2135
+ ...g(d, c.action),
2136
+ ...c
2137
+ })), v = B(f, (c) => c.actor), y = F(I(Le.props, "state", "requests"));
2138
+ return r({
2139
+ sendCurdEvent: (c) => {
1672
2140
  var l;
1673
- (l = r.value) == null || l.sendCurdEvent(u);
2141
+ (l = u.value) == null || l.sendCurdEvent(c);
1674
2142
  },
1675
- refreshList: (u) => {
2143
+ refreshList: (c) => {
1676
2144
  var l;
1677
- (l = r.value) == null || l.refreshList(u);
2145
+ (l = u.value) == null || l.refreshList(c);
1678
2146
  },
1679
- sendEvent: (u) => {
2147
+ sendEvent: (c) => {
1680
2148
  var l;
1681
- (l = a.value) == null || l.sendEvent(u);
2149
+ (l = n.value) == null || l.sendEvent(c);
1682
2150
  },
1683
- sendRequest: (u, ...l) => {
1684
- var f;
1685
- (f = a.value) == null || f.sendRequest(u, ...l);
2151
+ sendRequest: (c, ...l) => {
2152
+ var m;
2153
+ (m = n.value) == null || m.sendRequest(c, ...l);
1686
2154
  }
1687
- }), () => y(Le, O({
1688
- ref: a
1689
- }, q(e, m), {
1690
- elementMap: e.elementMap || s,
1691
- state: c,
1692
- requests: h
2155
+ }), () => i(Le, C({
2156
+ ref: n
2157
+ }, R(e, y), {
2158
+ elementMap: e.elementMap || o,
2159
+ state: s,
2160
+ requests: v
1693
2161
  }), {
1694
- default: () => [y(Xe, O({
1695
- ref: r
1696
- }, E(e, ...m, "curdState", "operates"), {
1697
- formElementMap: e.formElementMap || o,
1698
- operates: p
2162
+ default: () => [i(st, C({
2163
+ ref: u
2164
+ }, I(e, ...y, "curdState", "operates"), {
2165
+ formElementMap: e.formElementMap || a,
2166
+ operates: f
1699
2167
  }), t)]
1700
2168
  });
1701
2169
  }
1702
- }), Fn = () => ({
2170
+ }), lr = () => ({
1703
2171
  defaultAddRecord: {
1704
2172
  type: Object
1705
2173
  }
1706
- }), Re = N({
2174
+ }), Fe = M({
1707
2175
  props: {
1708
- ...Fn()
2176
+ ...lr()
1709
2177
  },
1710
2178
  setup: (e) => {
1711
2179
  var l;
1712
2180
  const {
1713
2181
  dispatch: t,
1714
- sendRequest: n
1715
- } = ge(), {
1716
- rowKey: s,
1717
- curdState: o,
1718
- listProps: a,
1719
- getOperate: r,
1720
- refreshList: c
1721
- } = G(), d = (l = a == null ? void 0 : a.value) == null ? void 0 : l.pageState, p = (f) => {
1722
- const i = r(P.DETAIL);
1723
- i != null && i.actor ? n(P.DETAIL, f, s) : t({
2182
+ sendRequest: r
2183
+ } = Se(), {
2184
+ rowKey: o,
2185
+ curdState: a,
2186
+ listProps: n,
2187
+ getOperate: u,
2188
+ refreshList: s
2189
+ } = X(), d = (l = n == null ? void 0 : n.value) == null ? void 0 : l.pageState, f = (m) => {
2190
+ const h = u(D.DETAIL);
2191
+ h != null && h.actor ? r(D.DETAIL, m, o) : t({
1724
2192
  type: "detailData",
1725
- payload: xt(f)
2193
+ payload: Yt(m)
1726
2194
  });
1727
- }, h = (f, {
1728
- record: i
2195
+ }, v = (m, {
2196
+ record: h
1729
2197
  }) => {
1730
- f === A.EMIT && (t({
2198
+ m === w.EMIT && (t({
1731
2199
  type: "mode",
1732
- payload: ne.DETAIL
1733
- }), p(i));
1734
- }, m = (f) => {
1735
- f === A.EMIT ? (t({
2200
+ payload: re.DETAIL
2201
+ }), f(h));
2202
+ }, y = (m) => {
2203
+ m === w.EMIT ? (t({
1736
2204
  type: "mode",
1737
- payload: ne.ADD
2205
+ payload: re.ADD
1738
2206
  }), t({
1739
2207
  type: "detailData",
1740
2208
  payload: e.defaultAddRecord || {}
1741
- })) : f === A.SUCCESS && (d && (d.page = 1), c(), o.addAction === pe.CONTINUE ? t({
2209
+ })) : m === w.SUCCESS && (d && (d.page = 1), s(), a.addAction === ve.CONTINUE ? t({
1742
2210
  type: "detailData",
1743
2211
  payload: e.defaultAddRecord || {}
1744
2212
  }) : t({
1745
2213
  type: "mode",
1746
2214
  payload: void 0
1747
2215
  }));
1748
- }, u = (f, {
1749
- record: i
2216
+ }, c = (m, {
2217
+ record: h
1750
2218
  }) => {
1751
- f === A.EMIT ? (t({
2219
+ m === w.EMIT ? (t({
1752
2220
  type: "mode",
1753
- payload: ne.EDIT
1754
- }), p(i)) : f === A.SUCCESS && (t({
2221
+ payload: re.EDIT
2222
+ }), f(h)) : m === w.SUCCESS && (t({
1755
2223
  type: "mode",
1756
2224
  payload: void 0
1757
- }), c());
2225
+ }), s());
1758
2226
  };
1759
- return je(({
1760
- type: f,
1761
- payload: i,
1762
- source: g
2227
+ return He(({
2228
+ type: m,
2229
+ payload: h,
2230
+ source: S
1763
2231
  }) => {
1764
- if (g)
2232
+ if (S)
1765
2233
  return;
1766
- let M = f, I = i == null ? void 0 : i.type;
1767
- const v = i == null ? void 0 : i.record;
1768
- switch (M === fe.Success && (M = S(i, ["requestOpts", "action"]), I = A.SUCCESS), M) {
1769
- case P.DETAIL:
1770
- h(I, {
1771
- record: v
2234
+ let L = m, b = h == null ? void 0 : h.type;
2235
+ const N = h == null ? void 0 : h.record;
2236
+ switch (L === ye.Success && (L = g(h, ["requestOpts", "action"]), b = w.SUCCESS), L) {
2237
+ case D.DETAIL:
2238
+ v(b, {
2239
+ record: N
1772
2240
  });
1773
2241
  break;
1774
- case P.ADD:
1775
- m(I);
2242
+ case D.ADD:
2243
+ y(b);
1776
2244
  break;
1777
- case P.EDIT:
1778
- u(I, {
1779
- record: v
2245
+ case D.EDIT:
2246
+ c(b, {
2247
+ record: N
1780
2248
  });
1781
2249
  break;
1782
2250
  }
1783
2251
  }), () => null;
1784
2252
  }
1785
- }), pr = N({
2253
+ }), Wr = M({
1786
2254
  props: {
1787
- ...Ce.props,
1788
- ...Re.props
2255
+ ...Ie.props,
2256
+ ...Fe.props
1789
2257
  },
1790
2258
  setup: (e, {
1791
2259
  slots: t,
1792
- expose: n
2260
+ expose: r
1793
2261
  }) => {
1794
- const s = B();
1795
- n(le(Ct, s));
1796
- const o = $(Re.props);
1797
- return () => y(Ce, O({
1798
- ref: s
1799
- }, E(e, o)), {
2262
+ const o = q();
2263
+ r(ce(Lt, o));
2264
+ const a = F(Fe.props);
2265
+ return () => i(Ie, C({
2266
+ ref: o
2267
+ }, I(e, a)), {
1800
2268
  default: () => {
1801
- var a;
1802
- return [y(Re, q(e, o), null), (a = t.default) == null ? void 0 : a.call(t)];
2269
+ var n;
2270
+ return [i(Fe, R(e, a), null), (n = t.default) == null ? void 0 : n.call(t)];
1803
2271
  }
1804
2272
  });
1805
2273
  }
1806
- }), xn = () => ({
2274
+ }), ir = () => ({
1807
2275
  defaultAddRecord: {
1808
2276
  type: Object
1809
2277
  },
1810
2278
  routeBack: {
1811
2279
  type: Function
1812
2280
  }
1813
- }), we = N({
2281
+ }), je = M({
1814
2282
  props: {
1815
- ...xn()
2283
+ ...ir()
1816
2284
  },
1817
2285
  setup: (e) => {
1818
- const t = zt(), n = Wt(), {
1819
- dispatch: s,
1820
- sendRequest: o
1821
- } = ge(), {
1822
- rowKey: a,
1823
- curdState: r
1824
- } = G(), c = (m) => {
1825
- m === A.PAGE && (s({
2286
+ const t = ln(), r = Ve(), {
2287
+ dispatch: o,
2288
+ sendRequest: a
2289
+ } = Se(), {
2290
+ rowKey: n,
2291
+ curdState: u
2292
+ } = X(), s = (y) => {
2293
+ y === w.PAGE && (o({
1826
2294
  type: "mode",
1827
2295
  payload: void 0
1828
- }), s({
2296
+ }), o({
1829
2297
  type: "detailData",
1830
2298
  payload: {}
1831
- }), s({
2299
+ }), o({
1832
2300
  type: "detailLoading",
1833
2301
  payload: !1
1834
- }), s({
2302
+ }), o({
1835
2303
  type: "addAction",
1836
2304
  payload: void 0
1837
2305
  }));
1838
- }, d = (m, {
1839
- record: u
2306
+ }, d = (y, {
2307
+ record: c
1840
2308
  }) => {
1841
- m === A.EMIT ? t.push({
1842
- path: `${n.path}/detail`,
1843
- query: q(u, a)
1844
- }) : m === A.PAGE && (s({
2309
+ y === w.EMIT ? t.push({
2310
+ path: `${r.path}/detail`,
2311
+ query: R(c, n)
2312
+ }) : y === w.PAGE && (o({
1845
2313
  type: "mode",
1846
- payload: ne.DETAIL
1847
- }), o(P.DETAIL, n.query, a));
1848
- }, p = (m) => {
1849
- m === A.EMIT ? t.push({
1850
- path: `${n.path}/add`
1851
- }) : m === A.PAGE ? (s({
2314
+ payload: re.DETAIL
2315
+ }), a(D.DETAIL, r.query, n));
2316
+ }, f = (y) => {
2317
+ y === w.EMIT ? t.push({
2318
+ path: `${r.path}/add`
2319
+ }) : y === w.PAGE ? (o({
1852
2320
  type: "mode",
1853
- payload: ne.ADD
1854
- }), s({
2321
+ payload: re.ADD
2322
+ }), o({
1855
2323
  type: "detailData",
1856
2324
  payload: e.defaultAddRecord || {}
1857
- })) : m === A.SUCCESS && (r.addAction === pe.CONTINUE ? s({
2325
+ })) : y === w.SUCCESS && (u.addAction === ve.CONTINUE ? o({
1858
2326
  type: "detailData",
1859
2327
  payload: e.defaultAddRecord || {}
1860
- }) : e.routeBack ? e.routeBack(P.ADD) : t.go(-1));
1861
- }, h = (m, {
1862
- record: u
2328
+ }) : e.routeBack ? e.routeBack(D.ADD) : t.go(-1));
2329
+ }, v = (y, {
2330
+ record: c
1863
2331
  }) => {
1864
- m === A.EMIT ? t.push({
1865
- path: `${n.path}/edit`,
1866
- query: q(u, a)
1867
- }) : m === A.PAGE ? (s({
2332
+ y === w.EMIT ? t.push({
2333
+ path: `${r.path}/edit`,
2334
+ query: R(c, n)
2335
+ }) : y === w.PAGE ? (o({
1868
2336
  type: "mode",
1869
- payload: ne.EDIT
1870
- }), o(P.DETAIL, n.query, a)) : m === A.SUCCESS && (e.routeBack ? e.routeBack(P.EDIT) : t.go(-1));
2337
+ payload: re.EDIT
2338
+ }), a(D.DETAIL, r.query, n)) : y === w.SUCCESS && (e.routeBack ? e.routeBack(D.EDIT) : t.go(-1));
1871
2339
  };
1872
- return je(({
1873
- type: m,
1874
- payload: u,
2340
+ return He(({
2341
+ type: y,
2342
+ payload: c,
1875
2343
  source: l
1876
2344
  }) => {
1877
2345
  if (l)
1878
2346
  return;
1879
- let f = m, i = u == null ? void 0 : u.type;
1880
- const g = u == null ? void 0 : u.record;
1881
- switch (f === fe.Success && (f = S(u, ["requestOpts", "action"]), i = A.SUCCESS), f) {
1882
- case P.LIST:
1883
- c(i);
2347
+ let m = y, h = c == null ? void 0 : c.type;
2348
+ const S = c == null ? void 0 : c.record;
2349
+ switch (m === ye.Success && (m = g(c, ["requestOpts", "action"]), h = w.SUCCESS), m) {
2350
+ case D.LIST:
2351
+ s(h);
1884
2352
  break;
1885
- case P.DETAIL:
1886
- d(i, {
1887
- record: g
2353
+ case D.DETAIL:
2354
+ d(h, {
2355
+ record: S
1888
2356
  });
1889
2357
  break;
1890
- case P.ADD:
1891
- p(i);
2358
+ case D.ADD:
2359
+ f(h);
1892
2360
  break;
1893
- case P.EDIT:
1894
- h(i, {
1895
- record: g
2361
+ case D.EDIT:
2362
+ v(h, {
2363
+ record: S
1896
2364
  });
1897
2365
  break;
1898
2366
  }
1899
2367
  }), () => null;
1900
2368
  }
1901
- }), yr = N({
2369
+ }), Xr = M({
1902
2370
  props: {
1903
- ...Ce.props,
1904
- ...we.props
2371
+ ...Ie.props,
2372
+ ...je.props
1905
2373
  },
1906
2374
  setup: (e, {
1907
2375
  slots: t,
1908
- expose: n
2376
+ expose: r
1909
2377
  }) => {
1910
- const s = B();
1911
- n(le(Ct, s));
1912
- const o = $(we.props);
1913
- return () => y(Ce, O({
1914
- ref: s
1915
- }, E(e, o)), {
2378
+ const o = q();
2379
+ r(ce(Lt, o));
2380
+ const a = F(je.props);
2381
+ return () => i(Ie, C({
2382
+ ref: o
2383
+ }, I(e, a)), {
1916
2384
  default: () => {
1917
- var a;
1918
- return [y(we, q(e, o), null), (a = t.default) == null ? void 0 : a.call(t)];
2385
+ var n;
2386
+ return [i(je, R(e, a), null), (n = t.default) == null ? void 0 : n.call(t)];
1919
2387
  }
1920
2388
  });
1921
2389
  }
1922
- }), jn = N({
2390
+ }), dr = M({
1923
2391
  props: {
1924
- ...We.props,
2392
+ ...ot.props,
1925
2393
  clsName: {
1926
2394
  type: String,
1927
2395
  default: "pro-curd-list"
@@ -1931,77 +2399,77 @@ const $n = () => ({
1931
2399
  slots: t
1932
2400
  }) => {
1933
2401
  const {
1934
- elementMap: n,
1935
- formElementMap: s,
1936
- curdState: o,
1937
- searchColumns: a,
1938
- tableColumns: r,
1939
- sendCurdEvent: c,
2402
+ elementMap: r,
2403
+ formElementMap: o,
2404
+ curdState: a,
2405
+ searchColumns: n,
2406
+ tableColumns: u,
2407
+ sendCurdEvent: s,
1940
2408
  operates: d
1941
- } = G(), p = R(
1942
- U(d, (m) => {
1943
- const u = m.action;
1944
- return u === P.DETAIL || u === P.EDIT || u === P.DELETE || m.tableOperate;
2409
+ } = X(), f = K(
2410
+ B(d, (y) => {
2411
+ const c = y.action;
2412
+ return c === D.DETAIL || c === D.EDIT || c === D.DELETE || y.tableOperate;
1945
2413
  }),
1946
- (m) => {
1947
- const u = {
1948
- ...q(m, "label", "show", "disabled", "loading", "extraProps", "onClick", "element"),
1949
- value: m.action
2414
+ (y) => {
2415
+ const c = {
2416
+ ...R(y, "label", "show", "disabled", "loading", "extraProps", "onClick", "element"),
2417
+ value: y.action
1950
2418
  };
1951
- return u.onClick || (u.onClick = (l) => {
1952
- c({
1953
- action: m.action,
1954
- type: A.EMIT,
2419
+ return c.onClick || (c.onClick = (l) => {
2420
+ s({
2421
+ action: y.action,
2422
+ type: w.EMIT,
1955
2423
  record: l
1956
2424
  });
1957
- }), u;
2425
+ }), c;
1958
2426
  }
1959
- ), h = (m) => {
1960
- c({
1961
- action: P.LIST,
1962
- type: A.EMIT,
1963
- values: m
2427
+ ), v = (y) => {
2428
+ s({
2429
+ action: D.LIST,
2430
+ type: w.EMIT,
2431
+ values: y
1964
2432
  });
1965
2433
  };
1966
2434
  return () => {
1967
- var M, I;
1968
- const m = e.searchProps, u = {
1969
- formElementMap: s,
1970
- columns: a.value,
1971
- ...m
1972
- }, l = e.tableProps, f = {
1973
- elementMap: n,
1974
- columns: r.value,
1975
- loading: o.listLoading,
1976
- dataSource: (M = o.listData) == null ? void 0 : M.dataSource,
1977
- ...E(l, "operate"),
2435
+ var L, b;
2436
+ const y = e.searchProps, c = {
2437
+ formElementMap: o,
2438
+ columns: n.value,
2439
+ ...y
2440
+ }, l = e.tableProps, m = {
2441
+ elementMap: r,
2442
+ columns: u.value,
2443
+ loading: a.listLoading,
2444
+ dataSource: (L = a.listData) == null ? void 0 : L.dataSource,
2445
+ ...I(l, "operate"),
1978
2446
  operate: {
1979
- items: p,
2447
+ items: f,
1980
2448
  ...l == null ? void 0 : l.operate
1981
2449
  }
1982
- }, i = e.paginationProps, g = {
1983
- total: (I = o.listData) == null ? void 0 : I.total,
1984
- ...ee(i) ? {} : i
2450
+ }, h = e.paginationProps, S = {
2451
+ total: (b = a.listData) == null ? void 0 : b.total,
2452
+ ...ne(h) ? {} : h
1985
2453
  };
1986
- return y(We, O(E(e, "searchProps", "tableProps", "paginationProps"), {
1987
- searchProps: u,
1988
- tableProps: f,
1989
- paginationProps: i === !1 ? !1 : g,
1990
- onSearch: h
2454
+ return i(ot, C(I(e, "searchProps", "tableProps", "paginationProps"), {
2455
+ searchProps: c,
2456
+ tableProps: m,
2457
+ paginationProps: h === !1 ? !1 : S,
2458
+ onSearch: v
1991
2459
  }), {
1992
2460
  ...t,
1993
- search: t.search ? (v) => t.search(v, u) : void 0,
1994
- table: t.table ? (v) => t.table(v, f) : void 0,
1995
- pagination: t.pagination ? (v) => t.pagination(v, g) : void 0
2461
+ search: t.search ? (N) => t.search(N, c) : void 0,
2462
+ table: t.table ? (N) => t.table(N, m) : void 0,
2463
+ pagination: t.pagination ? (N) => t.pagination(N, S) : void 0
1996
2464
  });
1997
2465
  };
1998
2466
  }
1999
- }), gr = N(() => {
2467
+ }), Yr = M(() => {
2000
2468
  const {
2001
2469
  listProps: e
2002
- } = G();
2003
- return () => y(jn, E(e == null ? void 0 : e.value, "slots"), S(e == null ? void 0 : e.value, "slots"));
2004
- }), qn = () => ({
2470
+ } = X();
2471
+ return () => i(dr, I(e == null ? void 0 : e.value, "slots"), g(e == null ? void 0 : e.value, "slots"));
2472
+ }), mr = () => ({
2005
2473
  clsName: {
2006
2474
  type: String,
2007
2475
  default: "pro-curd-form"
@@ -2009,85 +2477,85 @@ const $n = () => ({
2009
2477
  signName: {
2010
2478
  type: String
2011
2479
  }
2012
- }), qe = N({
2480
+ }), Xe = M({
2013
2481
  props: {
2014
- ...qn()
2482
+ ...mr()
2015
2483
  },
2016
2484
  setup: (e, {
2017
2485
  slots: t,
2018
- expose: n,
2019
- attrs: s
2486
+ expose: r,
2487
+ attrs: o
2020
2488
  }) => {
2021
2489
  const {
2022
- elementMap: o,
2023
- formElementMap: a,
2024
- curdState: r,
2025
- formColumns: c,
2490
+ elementMap: a,
2491
+ formElementMap: n,
2492
+ curdState: u,
2493
+ formColumns: s,
2026
2494
  getSignColumns: d,
2027
- sendCurdEvent: p
2028
- } = G(), h = B();
2029
- n(le(e.formMethods || [], h));
2030
- const m = w(() => e.signName ? d(e.signName) : c.value), u = () => {
2031
- var g;
2032
- r.addAction = pe.NORMAL, (g = h.value) == null || g.submit();
2495
+ sendCurdEvent: f
2496
+ } = X(), v = q();
2497
+ r(ce(e.formMethods || [], v));
2498
+ const y = A(() => e.signName ? d(e.signName) : s.value), c = () => {
2499
+ var S;
2500
+ u.addAction = ve.NORMAL, (S = v.value) == null || S.submit();
2033
2501
  }, l = () => {
2034
- var g;
2035
- r.addAction = pe.CONTINUE, (g = h.value) == null || g.submit();
2036
- }, f = [
2502
+ var S;
2503
+ u.addAction = ve.CONTINUE, (S = v.value) == null || S.submit();
2504
+ }, m = [
2037
2505
  {
2038
- value: V.RESET,
2506
+ value: H.RESET,
2039
2507
  label: "\u91CD\u7F6E"
2040
2508
  },
2041
2509
  {
2042
- value: V.SUBMIT,
2510
+ value: H.SUBMIT,
2043
2511
  label: "\u63D0\u4EA4",
2044
2512
  extraProps: {
2045
2513
  type: "primary"
2046
2514
  }
2047
2515
  },
2048
2516
  {
2049
- value: V.CONTINUE,
2517
+ value: H.CONTINUE,
2050
2518
  label: "\u786E\u5B9A\u5E76\u7EE7\u7EED",
2051
2519
  extraProps: {
2052
2520
  type: "primary"
2053
2521
  },
2054
2522
  show: !1
2055
2523
  }
2056
- ], i = (g) => {
2057
- s.onFinish || (r.mode === P.EDIT ? p({
2058
- action: P.EDIT,
2059
- type: A.EXECUTE,
2060
- values: g
2061
- }) : p({
2062
- action: P.ADD,
2063
- type: A.EXECUTE,
2064
- values: g
2524
+ ], h = (S) => {
2525
+ o.onFinish || (u.mode === D.EDIT ? f({
2526
+ action: D.EDIT,
2527
+ type: w.EXECUTE,
2528
+ values: S
2529
+ }) : f({
2530
+ action: D.ADD,
2531
+ type: w.EXECUTE,
2532
+ values: S
2065
2533
  }));
2066
2534
  };
2067
- return () => y(Cn, O({
2068
- ref: h
2069
- }, E(e, "operate"), {
2070
- elementMap: e.elementMap || o,
2071
- formElementMap: e.formElementMap || a,
2072
- columns: e.columns || m.value,
2073
- readonly: r.mode === P.DETAIL,
2074
- model: e.model || r.detailData,
2075
- hideRequiredMark: r.mode === P.DETAIL,
2535
+ return () => i(_n, C({
2536
+ ref: v
2537
+ }, I(e, "operate"), {
2538
+ elementMap: e.elementMap || a,
2539
+ formElementMap: e.formElementMap || n,
2540
+ columns: e.columns || y.value,
2541
+ readonly: u.mode === D.DETAIL,
2542
+ model: e.model || u.detailData,
2543
+ hideRequiredMark: u.mode === D.DETAIL,
2076
2544
  operate: e.operate ? {
2077
- items: f,
2078
- onSubmit: u,
2545
+ items: m,
2546
+ onSubmit: c,
2079
2547
  onContinue: l,
2080
2548
  ...e.operate
2081
2549
  } : void 0,
2082
- onFinish: i
2550
+ onFinish: h
2083
2551
  }), t);
2084
2552
  }
2085
- }), hr = N(() => {
2553
+ }), Jr = M(() => {
2086
2554
  const {
2087
2555
  formProps: e
2088
- } = G();
2089
- return () => y(qe, E(e == null ? void 0 : e.value, "slots"), S(e == null ? void 0 : e.value, "slots"));
2090
- }), Un = () => ({
2556
+ } = X();
2557
+ return () => i(Xe, I(e == null ? void 0 : e.value, "slots"), g(e == null ? void 0 : e.value, "slots"));
2558
+ }), fr = () => ({
2091
2559
  clsName: {
2092
2560
  type: String,
2093
2561
  default: "pro-curd-desc"
@@ -2095,75 +2563,75 @@ const $n = () => ({
2095
2563
  signName: {
2096
2564
  type: String
2097
2565
  }
2098
- }), Bn = N({
2566
+ }), yr = M({
2099
2567
  props: {
2100
- ...Un()
2568
+ ...fr()
2101
2569
  },
2102
2570
  setup: (e, {
2103
2571
  slots: t
2104
2572
  }) => {
2105
2573
  const {
2106
- curdState: n,
2107
- descColumns: s,
2108
- getSignColumns: o
2109
- } = G(), a = w(() => e.signName ? o(e.signName) : s.value);
2110
- return () => y(wn, O(E(e, "signName", "model", "columns"), {
2111
- model: e.model || n.detailData,
2112
- columns: a.value
2574
+ curdState: r,
2575
+ descColumns: o,
2576
+ getSignColumns: a
2577
+ } = X(), n = A(() => e.signName ? a(e.signName) : o.value);
2578
+ return () => i(tr, C(I(e, "signName", "model", "columns"), {
2579
+ model: e.model || r.detailData,
2580
+ columns: n.value
2113
2581
  }), t);
2114
2582
  }
2115
- }), br = N(() => {
2583
+ }), Qr = M(() => {
2116
2584
  const {
2117
2585
  descProps: e
2118
- } = G();
2119
- return () => y(Bn, E(e == null ? void 0 : e.value, "slots"), S(e == null ? void 0 : e.value, "slots"));
2120
- }), Je = () => ({
2586
+ } = X();
2587
+ return () => i(yr, I(e == null ? void 0 : e.value, "slots"), g(e == null ? void 0 : e.value, "slots"));
2588
+ }), ct = () => ({
2121
2589
  clsName: {
2122
2590
  type: String,
2123
2591
  default: "pro-curd-modal"
2124
2592
  },
2125
2593
  validMode: {
2126
2594
  type: Array,
2127
- default: [P.ADD, P.DETAIL, P.EDIT]
2595
+ default: [D.ADD, D.DETAIL, D.EDIT]
2128
2596
  }
2129
- }), Tt = N({
2597
+ }), Rt = M({
2130
2598
  props: {
2131
- ...Je()
2599
+ ...ct()
2132
2600
  },
2133
2601
  setup: (e, {
2134
2602
  slots: t
2135
2603
  }) => {
2136
- const n = X(), s = n(x.ModalKey), o = n(x.LoadingKey), {
2137
- curdState: a,
2138
- getOperate: r
2139
- } = G(), c = () => {
2140
- a.mode = void 0, Ze(a.detailData, {}), a.detailLoading = !1, a.addAction = void 0;
2141
- }, d = $(Je());
2604
+ const r = G(), o = r(k.ModalKey), a = r(k.LoadingKey), {
2605
+ curdState: n,
2606
+ getOperate: u
2607
+ } = X(), s = () => {
2608
+ n.mode = void 0, it(n.detailData, {}), n.detailLoading = !1, n.addAction = void 0;
2609
+ }, d = F(ct());
2142
2610
  return () => {
2143
- var h;
2144
- const p = a.mode;
2145
- return !ce(e.validMode, (m) => m === p) || !s ? null : y(s, O(E(e, d), {
2146
- visible: ce(e.validMode, (m) => m === p),
2147
- title: e.title || ((h = r(a.mode)) == null ? void 0 : h.label),
2148
- confirmLoading: a.operateLoading,
2149
- maskClosable: a.mode === P.DETAIL,
2150
- onCancel: c
2611
+ var v;
2612
+ const f = n.mode;
2613
+ return !ae(e.validMode, (y) => y === f) || !o ? null : i(o, C(I(e, d), {
2614
+ visible: ae(e.validMode, (y) => y === f),
2615
+ title: e.title || ((v = u(n.mode)) == null ? void 0 : v.label),
2616
+ confirmLoading: n.operateLoading,
2617
+ maskClosable: n.mode === D.DETAIL,
2618
+ onCancel: s
2151
2619
  }), {
2152
2620
  default: () => {
2153
- var m;
2154
- return [a.detailLoading && o ? y(o, {
2621
+ var y;
2622
+ return [n.detailLoading && a ? i(a, {
2155
2623
  loading: !0
2156
2624
  }, {
2157
- default: () => [y("div", {
2625
+ default: () => [i("div", {
2158
2626
  class: `${e.clsName}-loading-dom`
2159
2627
  }, null)]
2160
- }) : (m = t.default) == null ? void 0 : m.call(t)];
2628
+ }) : (y = t.default) == null ? void 0 : y.call(t)];
2161
2629
  },
2162
- ...E(t, "default")
2630
+ ...I(t, "default")
2163
2631
  });
2164
2632
  };
2165
2633
  }
2166
- }), Sr = N({
2634
+ }), Zr = M({
2167
2635
  props: {
2168
2636
  modalProps: Object,
2169
2637
  formProps: Object
@@ -2171,112 +2639,123 @@ const $n = () => ({
2171
2639
  setup: (e, {
2172
2640
  slots: t
2173
2641
  }) => {
2174
- const n = B(), s = te(t, "modal"), o = te(t, "form");
2175
- return () => y(Tt, O(e.modalProps, {
2642
+ const r = q(), o = ee(t, "modal"), a = ee(t, "form");
2643
+ return () => i(Rt, C(e.modalProps, {
2176
2644
  onOk: () => {
2177
- var a;
2178
- (a = n.value) == null || a.submit();
2645
+ var n;
2646
+ (n = r.value) == null || n.submit();
2179
2647
  }
2180
2648
  }), {
2181
- default: () => [y(qe, O({
2182
- ref: n
2183
- }, e.formProps), o)],
2184
- ...s
2649
+ default: () => [i(Xe, C({
2650
+ ref: r
2651
+ }, e.formProps), a)],
2652
+ ...o
2185
2653
  });
2186
2654
  }
2187
- }), vr = N(() => {
2655
+ }), ea = M(() => {
2188
2656
  const {
2189
2657
  modalProps: e,
2190
2658
  formProps: t
2191
- } = G(), n = B();
2192
- return () => y(Tt, O(E(e == null ? void 0 : e.value, "slots"), {
2659
+ } = X(), r = q();
2660
+ return () => i(Rt, C(I(e == null ? void 0 : e.value, "slots"), {
2193
2661
  onOk: () => {
2194
- var s;
2195
- (s = n.value) == null || s.submit();
2662
+ var o;
2663
+ (o = r.value) == null || o.submit();
2196
2664
  }
2197
2665
  }), {
2198
- default: () => [y(qe, O({
2199
- ref: n
2200
- }, E(t == null ? void 0 : t.value, "slots")), S(t == null ? void 0 : t.value, "slots"))],
2201
- ...S(e == null ? void 0 : e.value, "slots")
2666
+ default: () => [i(Xe, C({
2667
+ ref: r
2668
+ }, I(t == null ? void 0 : t.value, "slots")), g(t == null ? void 0 : t.value, "slots"))],
2669
+ ...g(e == null ? void 0 : e.value, "slots")
2202
2670
  });
2203
2671
  });
2204
2672
  export {
2205
- P as CurdAction,
2206
- pe as CurdAddAction,
2207
- ne as CurdCurrentMode,
2208
- Ct as CurdMethods,
2209
- A as CurdSubAction,
2210
- x as ElementKeys,
2211
- V as FormAction,
2212
- cr as LogonUser,
2213
- mt as LogonUserKey,
2214
- or as MustLogon,
2215
- Ke as PageHeader,
2216
- Qn as ProConfig,
2217
- Ce as ProCurd,
2218
- Bn as ProCurdDesc,
2219
- br as ProCurdDescConnect,
2220
- qe as ProCurdForm,
2221
- hr as ProCurdFormConnect,
2222
- jn as ProCurdList,
2223
- gr as ProCurdListConnect,
2224
- Tt as ProCurdModal,
2225
- Sr as ProCurdModalForm,
2226
- vr as ProCurdModalFormConnect,
2227
- wn as ProDesc,
2228
- Cn as ProForm,
2229
- lr as ProFormList,
2230
- Ae as ProGrid,
2231
- We as ProList,
2232
- pr as ProModalCurd,
2673
+ D as CurdAction,
2674
+ ve as CurdAddAction,
2675
+ re as CurdCurrentMode,
2676
+ Lt as CurdMethods,
2677
+ w as CurdSubAction,
2678
+ k as ElementKeys,
2679
+ H as FormAction,
2680
+ Fr as FormRulePrefixMap,
2681
+ Kr as LogonUser,
2682
+ Ct as LogonUserKey,
2683
+ wr as MustLogon,
2684
+ xe as PageHeader,
2685
+ Lr as PerSuffix,
2686
+ Rr as Permission,
2687
+ Mr as ProConfig,
2688
+ Ie as ProCurd,
2689
+ yr as ProCurdDesc,
2690
+ Qr as ProCurdDescConnect,
2691
+ Xe as ProCurdForm,
2692
+ Jr as ProCurdFormConnect,
2693
+ dr as ProCurdList,
2694
+ Yr as ProCurdListConnect,
2695
+ Rt as ProCurdModal,
2696
+ Zr as ProCurdModalForm,
2697
+ ea as ProCurdModalFormConnect,
2698
+ tr as ProDesc,
2699
+ _n as ProForm,
2700
+ kr as ProFormList,
2701
+ Re as ProGrid,
2702
+ Hr as ProLayout,
2703
+ ot as ProList,
2704
+ Wr as ProModalCurd,
2233
2705
  Le as ProModule,
2234
- vt as ProOperate,
2235
- fr as ProPage,
2236
- yr as ProPageCurd,
2237
- ir as ProSearchForm,
2238
- mr as ProTable,
2239
- fe as RequestAction,
2240
- Ee as SearchMode,
2241
- fn as Wrapper,
2242
- ft as convertPathToList,
2243
- ln as convertResData,
2244
- le as createExpose,
2245
- ur as createExposeObj,
2246
- dr as createFormItemCompFn,
2247
- Yn as createProConfig,
2248
- Kn as defaultPage,
2249
- te as filterSlotsByPrefix,
2706
+ Ot as ProOperate,
2707
+ Br as ProPage,
2708
+ Xr as ProPageCurd,
2709
+ jr as ProSearchForm,
2710
+ Gr as ProShowDate,
2711
+ Vr as ProShowDigit,
2712
+ _r as ProShowOptions,
2713
+ $e as ProShowText,
2714
+ zr as ProShowTree,
2715
+ Ur as ProTable,
2716
+ rr as ProTypography,
2717
+ ye as RequestAction,
2718
+ Te as SearchMode,
2719
+ An as Wrapper,
2720
+ Mt as convertPathToList,
2721
+ In as convertResData,
2722
+ ce as createExpose,
2723
+ xr as createExposeObj,
2724
+ qr as createFormItemCompFn,
2725
+ Tr as createProConfig,
2726
+ Zn as defaultPage,
2727
+ ee as filterSlotsByPrefix,
2250
2728
  se as getColumnFormItemName,
2251
- st as getColumnValueType,
2252
- mn as getFirstPropName,
2253
- ct as getFormItemEl,
2254
- Fe as getItemEl,
2255
- pt as getSignValue,
2256
- Sn as getValidValues,
2257
- Ne as mergeStateToList,
2258
- de as proBaseProps,
2259
- kn as provideProCurd,
2260
- ht as provideProFormList,
2261
- pn as provideProModule,
2262
- me as renderElement,
2263
- xe as renderElements,
2264
- gn as useAccess,
2265
- ar as useAccessMgr,
2266
- un as useComposeRequestActor,
2267
- tr as useDispatchMeta,
2268
- nr as useDispatchStore,
2269
- Zn as useDoneRequestActor,
2270
- er as useFailedRequestActor,
2271
- X as useGetCompByKey,
2272
- sr as useLogonUser,
2273
- dn as useMetaRegister,
2274
- je as useModuleEvent,
2275
- Z as useProConfig,
2276
- G as useProCurd,
2277
- St as useProForm,
2278
- gt as useProFormList,
2279
- ge as useProModule,
2280
- Nn as useProTable,
2281
- rr as useReadStore
2729
+ gt as getColumnValueType,
2730
+ Dn as getFirstPropName,
2731
+ bt as getFormItemEl,
2732
+ ze as getItemEl,
2733
+ qn as getSignValue,
2734
+ jn as getValidValues,
2735
+ Oe as mergeStateToList,
2736
+ me as proBaseProps,
2737
+ sr as provideProCurd,
2738
+ Nt as provideProFormList,
2739
+ On as provideProModule,
2740
+ fe as renderElement,
2741
+ Ge as renderElements,
2742
+ Kn as useAccess,
2743
+ $r as useAccessMgr,
2744
+ Tn as useComposeRequestActor,
2745
+ Dr as useDispatchMeta,
2746
+ Ar as useDispatchStore,
2747
+ Ir as useDoneRequestActor,
2748
+ Nr as useFailedRequestActor,
2749
+ G as useGetCompByKey,
2750
+ Rn as useHasPer,
2751
+ wn as useLogonUser,
2752
+ Nn as useMetaRegister,
2753
+ He as useModuleEvent,
2754
+ Q as useProConfig,
2755
+ X as useProCurd,
2756
+ At as useProForm,
2757
+ It as useProFormList,
2758
+ Se as useProModule,
2759
+ Xn as useProTable,
2760
+ Or as useReadStore
2282
2761
  };