@vue-start/pro 0.5.5 → 0.5.7

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