@vue-start/element-pro 0.2.26 → 0.2.27

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,31 +1,31 @@
1
- import { createExpose as pe, createFormItemCompFn as ze, createExposeObj as U, ProForm as R, ProSearchForm as L, ProFormList as Z, ProTable as O, ProDesc as D, ProCurdDesc as H, ProCurdForm as J, ProCurdModal as Q, ProUploaderText as X, ElementKeys as P, ProCurd as Ae, ProList as Ue, ProShowText as Y, ProShowDigit as we, ProShowDate as Le, ProShowOptions as w, ProShowTree as _ } from "@vue-start/pro";
2
- import { ElFormItem as j, ElForm as q, ElLoading as Oe, ElDialog as ee, ElButton as V, ElPagination as te, ElPopover as ae, ElCheckboxGroup as ne, ElCheckboxButton as De, ElCheckbox as Ce, ElRadioGroup as le, ElRadioButton as je, ElRadio as qe, ElSelect as re, ElOption as $e, ElTabs as ue, ElTabPane as Ge, ElMenu as z, ElUpload as oe, useFormItem as We, ElInputNumber as N, ElTree as de, ElInput as Ze, ElDatePicker as He, ElTimePicker as Je, ElTreeSelect as Qe, ElSwitch as Xe, ElCascader as Ye, ElTableColumn as ce, ElTable as ie, ElDescriptions as ke, ElRow as _e, ElCol as et, ElDescriptionsItem as tt } from "element-plus";
3
- import { defineComponent as S, createVNode as c, mergeProps as m, reactive as at, ref as p, toRaw as nt, computed as B, Fragment as lt } from "vue";
4
- import { keys as F, omit as i, isBoolean as $, isString as rt, debounce as ut, map as k, size as A, pick as G, get as T, isNumber as K, filter as me, isArray as ot } from "lodash";
5
- import { useEffect as Fe, generateId as dt, useWatch as M, convertCollection as ct, isValidFileType as it, convertFileSize as mt, getNameMapByMergeOpts as ft } from "@vue-start/hooks";
6
- const fe = () => ({
1
+ import { createExpose as we, createFormItemCompFn as We, createExposeObj as q, useProConfig as Ze, ProForm as O, ProSearchForm as Z, ProFormList as te, ProTable as H, ProDesc as J, ProCurdDesc as ne, ProCurdForm as ae, ProCurdModal as le, ProUploaderText as re, ElementKeys as P, ProCurd as He, ProList as Je, ProShowText as oe, ProShowDigit as Qe, ProShowDate as Xe, ProShowOptions as W, ProShowTree as ue } from "@vue-start/pro";
2
+ import { ElFormItem as Q, ElForm as X, ElLoading as Ie, ElDialog as ce, ElButton as U, ElPagination as de, ElPopover as ie, ElCheckboxGroup as fe, ElCheckboxButton as Ye, ElCheckbox as Ve, ElRadioGroup as me, ElRadioButton as _e, ElRadio as et, ElSelect as ye, ElOption as tt, ElTabs as ve, ElTabPane as nt, ElMenu as j, ElUpload as ge, useFormItem as at, ElInputNumber as D, ElTree as se, ElInput as lt, ElDatePicker as rt, ElTimePicker as ot, ElTreeSelect as ut, ElSwitch as ct, ElCascader as dt, ElTableColumn as Y, ElTable as be, ElDescriptions as Be, ElRow as it, ElCol as ft, ElDescriptionsItem as mt } from "element-plus";
3
+ import { defineComponent as k, createVNode as c, mergeProps as g, reactive as yt, ref as R, toRaw as vt, computed as N, Fragment as Ne, nextTick as he } from "vue";
4
+ import { keys as w, omit as y, isBoolean as $, isString as gt, debounce as st, map as T, size as L, pick as _, get as B, isNumber as A, isArray as bt, filter as Se, reduce as Pe, forEach as ht, find as St, isFunction as Pt } from "lodash";
5
+ import { useEffect as G, generateId as Ct, useWatch as z, convertCollection as kt, isValidFileType as pt, convertFileSize as Ft, isSame as Ce, getNameMapByMergeOpts as xt } from "@vue-start/hooks";
6
+ const ke = () => ({
7
7
  name: {
8
8
  type: [String, Array]
9
9
  }
10
- }), xe = S({
10
+ }), Le = k({
11
11
  props: {
12
- ...j.props,
13
- ...fe()
12
+ ...Q.props,
13
+ ...ke()
14
14
  },
15
15
  setup: (e, {
16
16
  slots: t
17
17
  }) => {
18
- const o = F(fe());
19
- return () => c(j, m(i(e, ...o, "name", "prop"), {
18
+ const u = w(ke());
19
+ return () => c(Q, g(y(e, ...u, "name", "prop"), {
20
20
  prop: e.prop || e.name
21
21
  }), {
22
22
  label: e.label ? () => e.label : void 0,
23
23
  ...t
24
24
  });
25
25
  }
26
- }), Ee = ["clearValidate", "resetFields", "scrollToField", "validate", "validateField", "submit"], yt = S({
26
+ }), Ae = ["clearValidate", "resetFields", "scrollToField", "validate", "validateField", "submit"], Kt = k({
27
27
  props: {
28
- ...q.props,
28
+ ...X.props,
29
29
  hideRequiredMark: {
30
30
  type: [Boolean, Object],
31
31
  default: void 0
@@ -33,30 +33,30 @@ const fe = () => ({
33
33
  },
34
34
  setup: (e, {
35
35
  slots: t,
36
- emit: o,
37
- expose: a
36
+ emit: u,
37
+ expose: n
38
38
  }) => {
39
- const u = e.model || at({}), n = p();
40
- return Fe(() => {
41
- !n.value || (n.value.submit = () => {
42
- var r;
43
- (r = n.value) == null || r.validate((d, l) => {
44
- d ? o("finish", nt(u)) : o("finishFailed", l);
39
+ const o = e.model || yt({}), r = R();
40
+ return G(() => {
41
+ !r.value || (r.value.submit = () => {
42
+ var a;
43
+ (a = r.value) == null || a.validate((m, l) => {
44
+ m ? u("finish", vt(o)) : u("finishFailed", l);
45
45
  });
46
46
  });
47
- }, []), a(pe(Ee, n)), () => c(q, m({
48
- ref: n
49
- }, i(e, "model"), {
47
+ }, []), n(we(Ae, r)), () => c(X, g({
48
+ ref: r
49
+ }, y(e, "model"), {
50
50
  hideRequiredAsterisk: $(e.hideRequiredMark) ? e.hideRequiredMark : e.hideRequiredAsterisk,
51
- model: u
51
+ model: o
52
52
  }), t);
53
53
  }
54
- }), C = ze(xe, (e, t, o) => ({
54
+ }), M = We(Le, (e, t, u) => ({
55
55
  modelValue: e,
56
56
  "onUpdate:modelValue": t,
57
57
  clearable: !0,
58
- disabled: o
59
- })), Te = (e = "comp") => e + "-" + dt(), vt = () => ({
58
+ disabled: u
59
+ })), ze = (e = "comp") => e + "-" + Ct(), Et = () => ({
60
60
  loading: {
61
61
  type: Boolean
62
62
  },
@@ -84,22 +84,22 @@ const fe = () => ({
84
84
  customClass: {
85
85
  type: String
86
86
  }
87
- }), Ke = S({
87
+ }), Oe = k({
88
88
  props: {
89
- ...vt()
89
+ ...Et()
90
90
  },
91
91
  setup: (e, {
92
92
  slots: t
93
93
  }) => {
94
- const o = Te();
95
- return Fe(() => {
94
+ const u = ze();
95
+ return G(() => {
96
96
  if (!e.loading)
97
97
  return;
98
- let a = e.target;
99
- if (t.default ? a = document.getElementById(o) : e.target && rt(e.target) && (a = document.querySelector("#" + e.target)), !a)
98
+ let n = e.target;
99
+ if (t.default ? n = document.getElementById(u) : e.target && gt(e.target) && (n = document.querySelector("#" + e.target)), !n)
100
100
  return;
101
- const u = Oe.service({
102
- target: a,
101
+ const o = Ie.service({
102
+ target: n,
103
103
  body: e.body,
104
104
  fullscreen: e.fullscreen,
105
105
  lock: e.lock,
@@ -109,13 +109,13 @@ const fe = () => ({
109
109
  customClass: e.customClass
110
110
  });
111
111
  return () => {
112
- u && u.close();
112
+ o && o.close();
113
113
  };
114
114
  }, () => e.loading), () => t.default ? c("div", {
115
- id: o
115
+ id: u
116
116
  }, [t.default()]) : null;
117
117
  }
118
- }), ye = () => ({
118
+ }), pe = () => ({
119
119
  clsName: {
120
120
  type: String,
121
121
  default: "pro-modal"
@@ -147,72 +147,72 @@ const fe = () => ({
147
147
  type: [Object, Boolean],
148
148
  default: void 0
149
149
  }
150
- }), Me = S({
150
+ }), Ue = k({
151
151
  inheritAttrs: !1,
152
152
  props: {
153
- ...ee.props,
153
+ ...ce.props,
154
154
  appendToBody: {
155
155
  type: Boolean,
156
156
  default: !0
157
157
  },
158
- ...ye()
158
+ ...pe()
159
159
  },
160
160
  setup: (e, {
161
161
  slots: t,
162
- emit: o,
163
- attrs: a
162
+ emit: u,
163
+ attrs: n
164
164
  }) => {
165
- const u = p(e.visible);
166
- M(() => {
167
- u.value !== e.visible && (u.value = e.visible);
165
+ const o = R(e.visible);
166
+ z(() => {
167
+ o.value !== e.visible && (o.value = e.visible);
168
168
  }, () => e.visible);
169
- const n = () => {
169
+ const r = () => {
170
170
  var l;
171
171
  if ((l = e.cancelButtonProps) != null && l.onClick) {
172
172
  e.cancelButtonProps.onClick();
173
173
  return;
174
174
  }
175
- u.value = !1, o("update:visible", !1);
176
- }, r = () => {
175
+ o.value = !1, u("update:visible", !1);
176
+ }, a = () => {
177
177
  var l;
178
178
  if ((l = e.okButtonProps) != null && l.onClick) {
179
179
  e.okButtonProps.onClick();
180
180
  return;
181
181
  }
182
- o("ok");
183
- }, d = F(ye());
184
- return () => c(ee, m({
182
+ u("ok");
183
+ }, m = w(pe());
184
+ return () => c(ce, g({
185
185
  class: e.clsName
186
- }, i(a, "onCancel"), i(e, ...d, "modelValue"), {
186
+ }, y(n, "onCancel"), y(e, ...m, "modelValue"), {
187
187
  closeOnClickModal: $(e.maskClosable) ? e.maskClosable : e.closeOnClickModal,
188
- modelValue: u.value,
189
- "onUpdate:modelValue": [(l) => u.value = l, (l) => {
190
- o("update:visible", l);
188
+ modelValue: o.value,
189
+ "onUpdate:modelValue": [(l) => o.value = l, (l) => {
190
+ u("update:visible", l);
191
191
  }],
192
192
  onClose: () => {
193
- o("cancel");
193
+ u("cancel");
194
194
  }
195
195
  }), {
196
196
  footer: e.footer === !1 ? void 0 : () => c("div", {
197
197
  class: `${e.clsName}-operate`
198
- }, [c(V, m(i(e.cancelButtonProps, "onClick"), {
199
- onClick: n
198
+ }, [c(U, g(y(e.cancelButtonProps, "onClick"), {
199
+ onClick: r
200
200
  }), {
201
201
  default: () => [e.cancelText]
202
- }), c(V, m({
202
+ }), c(U, g({
203
203
  type: "primary",
204
204
  loading: e.confirmLoading
205
- }, i(e.okButtonProps, "onClick"), {
206
- onClick: r
205
+ }, y(e.okButtonProps, "onClick"), {
206
+ onClick: a
207
207
  }), {
208
208
  default: () => [e.okText]
209
209
  })]),
210
210
  ...t
211
211
  });
212
212
  }
213
- }), bt = S({
213
+ }), Rt = k({
214
214
  props: {
215
- ...te.props,
215
+ ...de.props,
216
216
  page: {
217
217
  type: Number,
218
218
  default: 1
@@ -220,41 +220,41 @@ const fe = () => ({
220
220
  },
221
221
  setup: (e, {
222
222
  slots: t,
223
- emit: o
223
+ emit: u
224
224
  }) => {
225
- const a = p(e.page), u = p(e.pageSize);
226
- M(() => {
227
- a.value !== e.page && (a.value = e.page);
228
- }, () => e.page), M(() => {
229
- u.value !== e.pageSize && (u.value = e.pageSize);
225
+ const n = R(e.page), o = R(e.pageSize);
226
+ z(() => {
227
+ n.value !== e.page && (n.value = e.page);
228
+ }, () => e.page), z(() => {
229
+ o.value !== e.pageSize && (o.value = e.pageSize);
230
230
  }, () => e.pageSize);
231
- const n = ut(() => {
232
- o("composeChange", a.value, u.value);
233
- }, 300), r = () => {
234
- n(), o("update:page", a.value);
235
- }, d = () => {
236
- n(), o("update:pageSize", u.value);
231
+ const r = st(() => {
232
+ u("composeChange", n.value, o.value);
233
+ }, 300), a = () => {
234
+ r(), u("update:page", n.value);
235
+ }, m = () => {
236
+ r(), u("update:pageSize", o.value);
237
237
  };
238
- return () => c(te, m({
239
- currentPage: a.value,
240
- "onUpdate:currentPage": (l) => a.value = l,
241
- pageSize: u.value,
242
- "onUpdate:pageSize": (l) => u.value = l,
243
- onCurrentChange: r,
244
- onSizeChange: d
245
- }, i(e, "currentPage", "pageSize")), t);
238
+ return () => c(de, g({
239
+ currentPage: n.value,
240
+ "onUpdate:currentPage": (l) => n.value = l,
241
+ pageSize: o.value,
242
+ "onUpdate:pageSize": (l) => o.value = l,
243
+ onCurrentChange: a,
244
+ onSizeChange: m
245
+ }, y(e, "currentPage", "pageSize")), t);
246
246
  }
247
- }), gt = S({
247
+ }), Tt = k({
248
248
  props: {
249
- ...ae.props
249
+ ...ie.props
250
250
  },
251
251
  setup: (e, {
252
252
  slots: t
253
- }) => () => c(ae, e, {
253
+ }) => () => c(ie, e, {
254
254
  reference: t.default,
255
255
  default: t.content
256
256
  })
257
- }), ve = () => ({
257
+ }), Fe = () => ({
258
258
  options: Array,
259
259
  buttonStyle: {
260
260
  type: String,
@@ -264,49 +264,49 @@ const fe = () => ({
264
264
  type: String,
265
265
  default: "default"
266
266
  }
267
- }), Pt = S({
267
+ }), Mt = k({
268
268
  props: {
269
- ...ne.props,
270
- ...ve()
269
+ ...fe.props,
270
+ ...Fe()
271
271
  },
272
272
  setup: (e, {
273
273
  slots: t,
274
- emit: o,
275
- expose: a
274
+ emit: u,
275
+ expose: n
276
276
  }) => {
277
- const u = p();
278
- a(U(u));
279
- const n = F(ve());
280
- return () => c(ne, m({
281
- ref: u
282
- }, i(e, n), {
283
- "onUpdate:modelValue": (r) => {
284
- o("update:modelValue", r || void 0);
277
+ const o = R();
278
+ n(q(o));
279
+ const r = w(Fe());
280
+ return () => c(fe, g({
281
+ ref: o
282
+ }, y(e, r), {
283
+ "onUpdate:modelValue": (a) => {
284
+ u("update:modelValue", a || void 0);
285
285
  }
286
286
  }), {
287
287
  default: () => {
288
- var r, d;
289
- return [(r = t.start) == null ? void 0 : r.call(t), k(e.options, (l) => {
290
- var b;
291
- const f = (b = t.label) == null ? void 0 : b.call(t, l);
292
- return e.optionType === "button" || e.buttonStyle === "button" ? c(De, m({
288
+ var a, m;
289
+ return [(a = t.start) == null ? void 0 : a.call(t), T(e.options, (l) => {
290
+ var h;
291
+ const b = (h = t.label) == null ? void 0 : h.call(t, l);
292
+ return e.optionType === "button" || e.buttonStyle === "button" ? c(Ye, g({
293
293
  key: l.value
294
- }, i(l, "value"), {
294
+ }, y(l, "value"), {
295
295
  label: l.value
296
296
  }), {
297
- default: () => [f || l.label]
298
- }) : c(Ce, m({
297
+ default: () => [b || l.label]
298
+ }) : c(Ve, g({
299
299
  key: l.value
300
300
  }, l, {
301
301
  label: l.value
302
302
  }), {
303
- default: () => [f || l.label]
303
+ default: () => [b || l.label]
304
304
  });
305
- }), (d = t.default) == null ? void 0 : d.call(t)];
305
+ }), (m = t.default) == null ? void 0 : m.call(t)];
306
306
  }
307
307
  });
308
308
  }
309
- }), be = () => ({
309
+ }), xe = () => ({
310
310
  options: {
311
311
  type: Array
312
312
  },
@@ -318,116 +318,116 @@ const fe = () => ({
318
318
  type: String,
319
319
  default: "default"
320
320
  }
321
- }), ht = S({
321
+ }), wt = k({
322
322
  props: {
323
- ...le.props,
324
- ...be()
323
+ ...me.props,
324
+ ...xe()
325
325
  },
326
326
  setup: (e, {
327
327
  slots: t,
328
- emit: o,
329
- expose: a
328
+ emit: u,
329
+ expose: n
330
330
  }) => {
331
- const u = p();
332
- a(U(u));
333
- const n = F(be());
334
- return () => c(le, m({
335
- ref: u
336
- }, i(e, n), {
337
- "onUpdate:modelValue": (r) => {
338
- o("update:modelValue", r);
331
+ const o = R();
332
+ n(q(o));
333
+ const r = w(xe());
334
+ return () => c(me, g({
335
+ ref: o
336
+ }, y(e, r), {
337
+ "onUpdate:modelValue": (a) => {
338
+ u("update:modelValue", a);
339
339
  }
340
340
  }), {
341
341
  default: () => {
342
- var r, d;
343
- return [(r = t.start) == null ? void 0 : r.call(t), k(e.options, (l) => {
344
- var b;
345
- const f = (b = t.label) == null ? void 0 : b.call(t, l);
346
- return e.optionType === "button" || e.buttonStyle === "button" ? c(je, m({
342
+ var a, m;
343
+ return [(a = t.start) == null ? void 0 : a.call(t), T(e.options, (l) => {
344
+ var h;
345
+ const b = (h = t.label) == null ? void 0 : h.call(t, l);
346
+ return e.optionType === "button" || e.buttonStyle === "button" ? c(_e, g({
347
347
  key: l.value
348
- }, i(l, "value"), {
348
+ }, y(l, "value"), {
349
349
  label: l.value
350
350
  }), {
351
- default: () => [f || l.label]
352
- }) : c(qe, m({
351
+ default: () => [b || l.label]
352
+ }) : c(et, g({
353
353
  key: l.value
354
- }, i(l, "value"), {
354
+ }, y(l, "value"), {
355
355
  label: l.value
356
356
  }), {
357
- default: () => [f || l.label]
357
+ default: () => [b || l.label]
358
358
  });
359
- }), (d = t.default) == null ? void 0 : d.call(t)];
359
+ }), (m = t.default) == null ? void 0 : m.call(t)];
360
360
  }
361
361
  });
362
362
  }
363
- }), ge = () => ({
363
+ }), Ke = () => ({
364
364
  options: Array
365
- }), St = S({
365
+ }), It = k({
366
366
  props: {
367
- ...re.props,
368
- ...ge()
367
+ ...ye.props,
368
+ ...Ke()
369
369
  },
370
370
  setup: (e, {
371
371
  slots: t,
372
- emit: o,
373
- expose: a
372
+ emit: u,
373
+ expose: n
374
374
  }) => {
375
- const u = p();
376
- a(U(u));
377
- const n = F(ge());
378
- return () => c(re, m({
379
- ref: u
380
- }, i(e, n), {
381
- "onUpdate:modelValue": (r) => {
382
- o("update:modelValue", r || void 0);
375
+ const o = R();
376
+ n(q(o));
377
+ const r = w(Ke());
378
+ return () => c(ye, g({
379
+ ref: o
380
+ }, y(e, r), {
381
+ "onUpdate:modelValue": (a) => {
382
+ u("update:modelValue", a || void 0);
383
383
  }
384
384
  }), {
385
385
  default: () => {
386
- var r, d;
387
- return [(r = t.start) == null ? void 0 : r.call(t), k(e.options, (l) => {
388
- var b;
389
- const f = (b = t.label) == null ? void 0 : b.call(t, l);
390
- return c($e, m({
386
+ var a, m;
387
+ return [(a = t.start) == null ? void 0 : a.call(t), T(e.options, (l) => {
388
+ var h;
389
+ const b = (h = t.label) == null ? void 0 : h.call(t, l);
390
+ return c(tt, g({
391
391
  key: l.value
392
392
  }, l), {
393
- default: () => [f || l.label]
393
+ default: () => [b || l.label]
394
394
  });
395
- }), (d = t.default) == null ? void 0 : d.call(t)];
395
+ }), (m = t.default) == null ? void 0 : m.call(t)];
396
396
  },
397
- ...i(t, "default")
397
+ ...y(t, "default")
398
398
  });
399
399
  }
400
- }), Dt = S({
400
+ }), tn = k({
401
401
  props: {
402
- ...ue.props,
402
+ ...ve.props,
403
403
  options: {
404
404
  type: Array
405
405
  }
406
406
  },
407
407
  setup: (e, {
408
408
  slots: t,
409
- emit: o
410
- }) => () => c(ue, m(i(e, "options"), {
411
- "onUpdate:modelValue": (a) => {
412
- o("update:modelValue", a);
409
+ emit: u
410
+ }) => () => c(ve, g(y(e, "options"), {
411
+ "onUpdate:modelValue": (n) => {
412
+ u("update:modelValue", n);
413
413
  }
414
414
  }), {
415
415
  default: () => {
416
- var a, u;
417
- return [(a = t.start) == null ? void 0 : a.call(t), k(e.options, (n) => c(Ge, m({
418
- key: n.value
419
- }, i(n, "value"), {
420
- name: n.value
416
+ var n, o;
417
+ return [(n = t.start) == null ? void 0 : n.call(t), T(e.options, (r) => c(nt, g({
418
+ key: r.value
419
+ }, y(r, "value"), {
420
+ name: r.value
421
421
  }), {
422
422
  label: () => {
423
- var r;
424
- return ((r = t.label) == null ? void 0 : r.call(t, n)) || n.label;
423
+ var a;
424
+ return ((a = t.label) == null ? void 0 : a.call(t, r)) || r.label;
425
425
  }
426
- })), (u = t.end) == null ? void 0 : u.call(t)];
426
+ })), (o = t.end) == null ? void 0 : o.call(t)];
427
427
  },
428
428
  ...t
429
429
  })
430
- }), W = {
430
+ }), ee = {
431
431
  convertSubMenuProps: {
432
432
  type: Function
433
433
  },
@@ -437,51 +437,51 @@ const fe = () => ({
437
437
  onMenuItemClick: {
438
438
  type: Function
439
439
  }
440
- }, Ie = F(W), Re = S({
440
+ }, De = w(ee), je = k({
441
441
  inheritAttrs: !1,
442
442
  props: {
443
443
  menu: {
444
444
  type: Object
445
445
  },
446
- ...W
446
+ ...ee
447
447
  },
448
448
  setup: (e, {
449
449
  slots: t
450
450
  }) => {
451
- const o = () => {
452
- var a;
453
- (a = e.onMenuItemClick) == null || a.call(e, e.menu);
451
+ const u = () => {
452
+ var n;
453
+ (n = e.onMenuItemClick) == null || n.call(e, e.menu);
454
454
  };
455
455
  return () => {
456
- var u, n;
457
- const a = e.menu;
458
- return (a == null ? void 0 : a.children) && A(a.children) > 0 ? c(z.SubMenu, m({
459
- index: a == null ? void 0 : a.value
460
- }, (u = e.convertSubMenuProps) == null ? void 0 : u.call(e, a)), {
461
- default: () => [k(a.children, (r) => c(Re, m({
462
- menu: r
463
- }, G(e, Ie)), t))],
456
+ var o, r;
457
+ const n = e.menu;
458
+ return (n == null ? void 0 : n.children) && L(n.children) > 0 ? c(j.SubMenu, g({
459
+ index: n == null ? void 0 : n.value
460
+ }, (o = e.convertSubMenuProps) == null ? void 0 : o.call(e, n)), {
461
+ default: () => [T(n.children, (a) => c(je, g({
462
+ menu: a
463
+ }, _(e, De)), t))],
464
464
  title: () => {
465
- var r;
466
- return ((r = t.title) == null ? void 0 : r.call(t, a)) || (a == null ? void 0 : a.label);
465
+ var a;
466
+ return ((a = t.title) == null ? void 0 : a.call(t, n)) || (n == null ? void 0 : n.label);
467
467
  }
468
- }) : c(z.MenuItem, m({
469
- index: a == null ? void 0 : a.value
470
- }, (n = e.convertMenuItemProps) == null ? void 0 : n.call(e, a), {
471
- onClick: o
468
+ }) : c(j.MenuItem, g({
469
+ index: n == null ? void 0 : n.value
470
+ }, (r = e.convertMenuItemProps) == null ? void 0 : r.call(e, n), {
471
+ onClick: u
472
472
  }), {
473
473
  title: () => {
474
- var r;
475
- return ((r = t.title) == null ? void 0 : r.call(t, a)) || (a == null ? void 0 : a.label);
474
+ var a;
475
+ return ((a = t.title) == null ? void 0 : a.call(t, n)) || (n == null ? void 0 : n.label);
476
476
  },
477
477
  default: t.default ? () => {
478
- var r;
479
- return (r = t.default) == null ? void 0 : r.call(t, a);
478
+ var a;
479
+ return (a = t.default) == null ? void 0 : a.call(t, n);
480
480
  } : void 0
481
481
  });
482
482
  };
483
483
  }
484
- }), Pe = () => ({
484
+ }), Ee = () => ({
485
485
  activeKey: {
486
486
  type: String
487
487
  },
@@ -496,43 +496,43 @@ const fe = () => ({
496
496
  label: "label"
497
497
  }
498
498
  },
499
- ...W
500
- }), st = S({
499
+ ...ee
500
+ }), Vt = k({
501
501
  props: {
502
- ...i(z.props, "defaultActive"),
503
- ...Pe()
502
+ ...y(j.props, "defaultActive"),
503
+ ...Ee()
504
504
  },
505
505
  setup: (e, {
506
506
  slots: t
507
507
  }) => {
508
- const o = p(e.activeKey);
509
- M(() => {
510
- e.activeKey !== o.value && (o.value = e.activeKey);
508
+ const u = R(e.activeKey);
509
+ z(() => {
510
+ e.activeKey !== u.value && (u.value = e.activeKey);
511
511
  }, () => e.activeKey);
512
- const a = B(() => {
513
- var n;
514
- return ct(e.options, (r) => {
515
- var f, b;
516
- const d = ((f = e.fieldNames) == null ? void 0 : f.value) || "value", l = ((b = e.fieldNames) == null ? void 0 : b.label) || "label";
512
+ const n = N(() => {
513
+ var r;
514
+ return kt(e.options, (a) => {
515
+ var b, h;
516
+ const m = ((b = e.fieldNames) == null ? void 0 : b.value) || "value", l = ((h = e.fieldNames) == null ? void 0 : h.label) || "label";
517
517
  return {
518
- ...i(r, d, l),
519
- value: T(r, d),
520
- label: T(r, l)
518
+ ...y(a, m, l),
519
+ value: B(a, m),
520
+ label: B(a, l)
521
521
  };
522
522
  }, {
523
- children: ((n = e.fieldNames) == null ? void 0 : n.children) || "children",
523
+ children: ((r = e.fieldNames) == null ? void 0 : r.children) || "children",
524
524
  childrenName: "children"
525
525
  });
526
- }), u = F(Pe());
527
- return () => c(z, m({
528
- defaultActive: o.value
529
- }, i(e, u)), {
530
- default: () => c(lt, null, [k(a.value, (n) => c(Re, m({
531
- menu: n
532
- }, G(e, Ie)), t))])
526
+ }), o = w(Ee());
527
+ return () => c(j, g({
528
+ defaultActive: u.value
529
+ }, y(e, o)), {
530
+ default: () => c(Ne, null, [T(n.value, (r) => c(je, g({
531
+ menu: r
532
+ }, _(e, De)), t))])
533
533
  });
534
534
  }
535
- }), he = () => ({
535
+ }), Re = () => ({
536
536
  modelValue: {
537
537
  type: Array,
538
538
  default: void 0
@@ -554,80 +554,116 @@ const fe = () => ({
554
554
  onStart: Function,
555
555
  beforeUpload: {
556
556
  type: Function
557
+ },
558
+ globalLoading: {
559
+ type: [Boolean, Object],
560
+ default: void 0
561
+ },
562
+ renderDom: {
563
+ type: Function,
564
+ default: void 0
557
565
  }
558
- }), pt = ["abort", "submit", "clearFiles", "handleStart", "handleRemove"], Ve = S({
566
+ }), Bt = ["abort", "submit", "clearFiles", "handleStart", "handleRemove"], qe = k({
559
567
  props: {
560
- ...i(oe.props, "fileList"),
561
- ...he()
568
+ ...y(ge.props, "fileList"),
569
+ ...Re()
562
570
  },
563
571
  setup: (e, {
564
572
  slots: t,
565
- expose: o,
566
- emit: a
573
+ expose: u,
574
+ emit: n
567
575
  }) => {
568
- const u = p();
569
- o(U(u, pt));
570
576
  const {
571
- formItem: n
572
- } = We(), r = () => ot(e.modelValue) ? k(e.modelValue, (v) => {
573
- var g;
574
- return ((g = e.convertItemData) == null ? void 0 : g.call(e, v)) || v;
575
- }) : [], d = p(r());
576
- let l = !1;
577
- const f = () => {
578
- var g;
579
- l = !0;
580
- const v = me(d.value, (h) => h.status === "success");
581
- a("update:modelValue", k(v, (h) => {
582
- var x;
583
- return ((x = e.convertResponseData) == null ? void 0 : x.call(e, h)) || h;
584
- })), (g = n == null ? void 0 : n.validate) == null || g.call(n, "change");
577
+ showMsg: o
578
+ } = Ze(), r = R();
579
+ u(q(r, Bt));
580
+ const {
581
+ formItem: a
582
+ } = at(), m = () => bt(e.modelValue) ? T(e.modelValue, (i) => {
583
+ var v;
584
+ return ((v = e.convertItemData) == null ? void 0 : v.call(e, i)) || i;
585
+ }) : [], l = R(m());
586
+ let b = !1;
587
+ const h = () => {
588
+ var v;
589
+ b = !0;
590
+ const i = Se(l.value, (C) => C.status === "success");
591
+ n("update:modelValue", T(i, (C) => {
592
+ var E;
593
+ return ((E = e.convertResponseData) == null ? void 0 : E.call(e, C)) || C;
594
+ })), (v = a == null ? void 0 : a.validate) == null || v.call(a, "change");
585
595
  };
586
- M(() => {
587
- l || (d.value = r(), l = !1);
596
+ z(() => {
597
+ b || (l.value = m(), b = !1);
588
598
  }, () => e.modelValue);
589
- const b = (v) => {
590
- var g, h, x, E;
599
+ let s;
600
+ const x = () => {
601
+ e.globalLoading && (s = Ie.service({
602
+ lock: !0,
603
+ text: "\u6B63\u5728\u4E0A\u4F20\u6587\u4EF6\uFF0C\u8BF7\u7A0D\u540E...",
604
+ ...$(e.globalLoading) ? {} : e.globalLoading
605
+ }));
606
+ }, d = () => {
607
+ e.globalLoading && (s == null || s.close());
608
+ };
609
+ G(() => () => {
610
+ d();
611
+ }, []);
612
+ const f = (i, v) => {
613
+ if (e.onErrorMsg) {
614
+ e.onErrorMsg(i, v);
615
+ return;
616
+ }
617
+ o({
618
+ type: "error",
619
+ message: v
620
+ });
621
+ }, p = (i) => {
622
+ var v;
591
623
  if (e.beforeUpload)
592
- return e.beforeUpload(v);
593
- if (e.accept && !it(e.accept, v.name))
594
- return (g = e.onErrorMsg) == null || g.call(e, "FileTypeError", `\u8BF7\u4E0A\u4F20\u6B63\u786E\u683C\u5F0F\uFF08${e.accept.replace(/,/g, "\uFF0C")}\uFF09\u7684\u6587\u4EF6`), !1;
595
- if (K(v.size)) {
596
- if (v.size <= 0)
597
- return (h = e.onErrorMsg) == null || h.call(e, "FileSizeError-Zero", "\u4E0A\u4F20\u6587\u4EF6\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"), !1;
598
- if (K(e.maxSize) && v.size > e.maxSize)
599
- return (x = e.onErrorMsg) == null || x.call(e, "FileSizeError-MaxSize", `\u8BF7\u4E0A\u4F20\u5C0F\u4E8E${mt(e.maxSize)}\u7684\u6587\u4EF6`), !1;
624
+ return e.beforeUpload(i);
625
+ if (e.accept && !pt(e.accept, i.name))
626
+ return f("FileTypeError", `\u8BF7\u4E0A\u4F20\u6B63\u786E\u683C\u5F0F\uFF08${e.accept.replace(/,/g, "\uFF0C")}\uFF09\u7684\u6587\u4EF6`), !1;
627
+ if (A(i.size)) {
628
+ if (i.size <= 0)
629
+ return f("FileSizeError-Zero", "\u4E0A\u4F20\u6587\u4EF6\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"), !1;
630
+ if (A(e.maxSize) && i.size > e.maxSize)
631
+ return f("FileSizeError-MaxSize", `\u8BF7\u4E0A\u4F20\u5C0F\u4E8E${Ft(e.maxSize)}\u7684\u6587\u4EF6`), !1;
600
632
  }
601
- return (E = e.onStart) == null || E.call(e, v), !0;
602
- }, y = B(() => K(e.limit) ? e.limit > A(d.value) : !0), s = F(he());
633
+ return (v = e.onStart) == null || v.call(e, i), x(), !0;
634
+ }, S = (i, v, C) => {
635
+ var E;
636
+ (E = e.onSuccess) == null || E.call(e, i, v, C), h(), d();
637
+ }, K = (i, v, C) => {
638
+ var E;
639
+ (E = e.onError) == null || E.call(e, i, v, C), d(), f("UploadError", "\u4E0A\u4F20\u5931\u8D25");
640
+ }, F = (i, v) => {
641
+ var C;
642
+ l.value = Se(l.value, (E) => !(i.uid === E.uid && i.name === E.name)), (C = e.onRemove) == null || C.call(e, i, v), h();
643
+ }, I = N(() => A(e.limit) ? e.limit > L(l.value) : !0), V = w(Re());
603
644
  return () => {
604
- var v, g;
645
+ var i, v;
605
646
  return c("div", {
606
- class: `pro-uploader ${y.value ? "" : "pro-uploader-limit"}`
607
- }, [(v = t.start) == null ? void 0 : v.call(t), c(oe, m({
608
- ref: u,
609
- fileList: d.value,
610
- "onUpdate:fileList": (h) => d.value = h
611
- }, i(e, "fileList", "onSuccess", "onRemove", "beforeUpload", ...s), {
612
- beforeUpload: b,
613
- onSuccess: (h, x, E) => {
614
- var I;
615
- (I = e.onSuccess) == null || I.call(e, h, x, E), f();
616
- },
617
- onRemove: (h, x) => {
618
- var E;
619
- d.value = me(d.value, (I) => !(h.uid === I.uid && h.name === I.name)), (E = e.onRemove) == null || E.call(e, h, x), f();
620
- }
647
+ class: `pro-uploader ${I.value ? "" : "pro-uploader-limit"}`
648
+ }, [(i = t.start) == null ? void 0 : i.call(t), c(ge, g({
649
+ ref: r,
650
+ fileList: l.value,
651
+ "onUpdate:fileList": (C) => l.value = C
652
+ }, y(e, "fileList", "onSuccess", "onError", "onRemove", "beforeUpload", ...V), {
653
+ beforeUpload: p,
654
+ onSuccess: S,
655
+ onError: K,
656
+ onRemove: F
621
657
  }), {
622
658
  default: () => {
623
- var h;
624
- return [y.value && ((h = t.default) == null ? void 0 : h.call(t))];
659
+ var C, E;
660
+ return [I.value && c(Ne, null, [((C = t.default) == null ? void 0 : C.call(t)) || ((E = e.renderDom) == null ? void 0 : E.call(e))])];
625
661
  },
626
- ...i(t, "default")
627
- }), (g = t.end) == null ? void 0 : g.call(t)]);
662
+ ...y(t, "default")
663
+ }), (v = t.end) == null ? void 0 : v.call(t)]);
628
664
  };
629
665
  }
630
- }), Se = () => ({
666
+ }), Te = () => ({
631
667
  modelValue: {
632
668
  type: Array
633
669
  },
@@ -644,54 +680,54 @@ const fe = () => ({
644
680
  divider: {
645
681
  type: Function
646
682
  }
647
- }), Ct = S({
683
+ }), Nt = k({
648
684
  props: {
649
- ...i(N.props, "modelValue"),
685
+ ...y(D.props, "modelValue"),
650
686
  controlsPosition: {
651
687
  type: String,
652
688
  default: "right"
653
689
  },
654
- ...Se()
690
+ ...Te()
655
691
  },
656
692
  setup: (e, {
657
693
  slots: t,
658
- emit: o
694
+ emit: u
659
695
  }) => {
660
- const a = p(T(e.modelValue, 0)), u = p(T(e.modelValue, 1));
661
- let n = !1;
662
- M(() => {
663
- n || (a.value = T(e.modelValue, 0), u.value = T(e.modelValue, 1)), n = !1;
696
+ const n = R(B(e.modelValue, 0)), o = R(B(e.modelValue, 1));
697
+ let r = !1;
698
+ z(() => {
699
+ r || (n.value = B(e.modelValue, 0), o.value = B(e.modelValue, 1)), r = !1;
664
700
  }, [e.modelValue, () => e.modelValue]);
665
- const r = () => {
666
- n = !0, e.singleEmit ? o("update:modelValue", [a.value, u.value]) : K(a.value) && K(u.value) ? o("update:modelValue", [a.value, u.value]) : o("update:modelValue", null);
667
- }, d = (y) => {
668
- for (let s = 0; s < y.length; s++)
669
- if (K(y[s]))
670
- return y[s];
671
- }, l = B(() => {
672
- var y;
673
- return d([u.value, (y = e.start) == null ? void 0 : y.max, e.max]);
674
- }), f = B(() => {
675
- var y;
676
- return d([a.value, (y = e.end) == null ? void 0 : y.min, e.min]);
677
- }), b = F(Se());
701
+ const a = () => {
702
+ r = !0, e.singleEmit ? u("update:modelValue", [n.value, o.value]) : A(n.value) && A(o.value) ? u("update:modelValue", [n.value, o.value]) : u("update:modelValue", null);
703
+ }, m = (s) => {
704
+ for (let x = 0; x < s.length; x++)
705
+ if (A(s[x]))
706
+ return s[x];
707
+ }, l = N(() => {
708
+ var s;
709
+ return m([o.value, (s = e.start) == null ? void 0 : s.max, e.max]);
710
+ }), b = N(() => {
711
+ var s;
712
+ return m([n.value, (s = e.end) == null ? void 0 : s.min, e.min]);
713
+ }), h = w(Te());
678
714
  return () => {
679
- var s, v;
680
- const y = i(e, ...b, "min", "max");
715
+ var x, d;
716
+ const s = y(e, ...h, "min", "max");
681
717
  return c("span", {
682
718
  class: "pro-number-range"
683
- }, [c(N, m(y, i(e.start, "max"), {
719
+ }, [c(D, g(s, y(e.start, "max"), {
684
720
  max: l.value,
685
- modelValue: a.value,
686
- "onUpdate:modelValue": [(g) => a.value = g, r]
687
- }), null), c("span", null, [((s = t.divider) == null ? void 0 : s.call(t)) || ((v = e.divider) == null ? void 0 : v.call(e)) || " - "]), c(N, m(y, i(e.start, "min"), {
688
- min: f.value,
689
- modelValue: u.value,
690
- "onUpdate:modelValue": [(g) => u.value = g, r]
721
+ modelValue: n.value,
722
+ "onUpdate:modelValue": [(f) => n.value = f, a]
723
+ }), null), c("span", null, [((x = t.divider) == null ? void 0 : x.call(t)) || ((d = e.divider) == null ? void 0 : d.call(e)) || " - "]), c(D, g(s, y(e.start, "min"), {
724
+ min: b.value,
725
+ modelValue: o.value,
726
+ "onUpdate:modelValue": [(f) => o.value = f, a]
691
727
  }), null)]);
692
728
  };
693
729
  }
694
- }), se = () => ({
730
+ }), Me = () => ({
695
731
  treeData: {
696
732
  type: Array
697
733
  },
@@ -708,84 +744,84 @@ const fe = () => ({
708
744
  checkedKeys: {
709
745
  type: Array
710
746
  }
711
- }), jt = S({
747
+ }), nn = k({
712
748
  props: {
713
- ...de.props,
714
- ...se()
749
+ ...se.props,
750
+ ...Me()
715
751
  },
716
752
  setup: (e, {
717
753
  slots: t
718
754
  }) => {
719
- const o = F(se()), u = (() => {
720
- const n = e.fieldNames;
721
- if (!!n)
755
+ const u = w(Me()), o = (() => {
756
+ const r = e.fieldNames;
757
+ if (!!r)
722
758
  return {
723
- label: n.title,
724
- children: n.children,
725
- disabled: n.disabled,
726
- isLeaf: n.isLeaf,
727
- class: n.class
759
+ label: r.title,
760
+ children: r.children,
761
+ disabled: r.disabled,
762
+ isLeaf: r.isLeaf,
763
+ class: r.class
728
764
  };
729
765
  })();
730
766
  return () => {
731
- var n;
732
- return c(de, m(i(e, o), {
767
+ var r;
768
+ return c(se, g(y(e, u), {
733
769
  data: e.treeData || e.data,
734
- props: u || e.props,
735
- nodeKey: ((n = e.fieldNames) == null ? void 0 : n.key) || e.nodeKey,
770
+ props: o || e.props,
771
+ nodeKey: ((r = e.fieldNames) == null ? void 0 : r.key) || e.nodeKey,
736
772
  showCheckbox: $(e.selectable) ? e.selectable : e.showCheckbox,
737
773
  defaultExpandedKeys: e.expandedKeys || e.defaultExpandedKeys,
738
774
  defaultCheckedKeys: e.checkedKeys || e.checkedKeys
739
775
  }), t);
740
776
  };
741
777
  }
742
- }), kt = C({
743
- InputComp: Ze,
778
+ }), Lt = M({
779
+ InputComp: lt,
744
780
  valueType: "text",
745
781
  name: "PFromText"
746
- }), Ft = C({
747
- InputComp: N,
782
+ }), At = M({
783
+ InputComp: D,
748
784
  valueType: "digit",
749
785
  name: "PFormNumber"
750
- }), xt = C({
751
- InputComp: Ct,
786
+ }), zt = M({
787
+ InputComp: Nt,
752
788
  valueType: "digitRange",
753
789
  name: "PFormNumberRange"
754
- }), Et = C({
755
- InputComp: He,
790
+ }), Ot = M({
791
+ InputComp: rt,
756
792
  valueType: "date",
757
793
  name: "PFormDate"
758
- }), Tt = C({
759
- InputComp: Je,
794
+ }), Ut = M({
795
+ InputComp: ot,
760
796
  valueType: "time",
761
797
  name: "PFormTime"
762
- }), Kt = C({
763
- InputComp: St,
798
+ }), Dt = M({
799
+ InputComp: It,
764
800
  valueType: "select",
765
801
  name: "PFormSelect"
766
- }), Mt = C({
767
- InputComp: Qe,
802
+ }), jt = M({
803
+ InputComp: ut,
768
804
  valueType: "treeSelect",
769
805
  name: "PFormTreeSelect"
770
- }), It = C({
771
- InputComp: Pt,
806
+ }), qt = M({
807
+ InputComp: Mt,
772
808
  valueType: "checkbox",
773
809
  name: "PFromCheckbox"
774
- }), Rt = C({
775
- InputComp: ht,
810
+ }), $t = M({
811
+ InputComp: wt,
776
812
  valueType: "radio",
777
813
  name: "PFromRadio"
778
- }), Vt = C({
779
- InputComp: Xe,
814
+ }), Gt = M({
815
+ InputComp: ct,
780
816
  valueType: "switch",
781
817
  name: "PFromSwitch"
782
- }), Bt = C({
783
- InputComp: Ye,
818
+ }), Wt = M({
819
+ InputComp: dt,
784
820
  valueType: "cascader",
785
821
  name: "PFormCascader"
786
- }), Be = S({
822
+ }), $e = k({
787
823
  props: {
788
- ...i(ce.props, "label", "prop"),
824
+ ...y(Y.props, "label", "prop"),
789
825
  title: {
790
826
  type: String
791
827
  },
@@ -802,118 +838,195 @@ const fe = () => ({
802
838
  setup: (e, {
803
839
  slots: t
804
840
  }) => {
805
- const o = ({
806
- row: n,
807
- column: r,
808
- $index: d
841
+ const u = ({
842
+ row: r,
843
+ column: a,
844
+ $index: m
809
845
  }) => {
810
- var g;
811
- const l = n, f = d, b = {
812
- ...r,
813
- title: r.label,
814
- dataIndex: r.property
815
- }, y = T(n, b.dataIndex), s = {
816
- value: y,
817
- text: y,
846
+ var f;
847
+ const l = r, b = m, h = {
848
+ ...a,
849
+ title: a.label,
850
+ dataIndex: a.property
851
+ }, s = B(r, h.dataIndex), x = {
852
+ value: s,
853
+ text: s,
818
854
  record: l,
819
- column: b,
820
- index: f
821
- }, v = (g = t.bodyCell) == null ? void 0 : g.call(t, s);
822
- return v || (e.customRender ? e.customRender(s) : y);
823
- }, u = {
855
+ column: h,
856
+ index: b
857
+ }, d = (f = t.bodyCell) == null ? void 0 : f.call(t, x);
858
+ return d || (e.customRender ? e.customRender(x) : s);
859
+ }, o = {
824
860
  header: ({
825
- column: n,
826
- $index: r
861
+ column: r,
862
+ $index: a
827
863
  }) => {
828
- var y;
829
- const d = r, l = n.label, f = {
830
- ...n,
864
+ var s;
865
+ const m = a, l = r.label, b = {
866
+ ...r,
831
867
  title: l,
832
- dataIndex: n.property
868
+ dataIndex: r.property
833
869
  };
834
- return ((y = t.headerCell) == null ? void 0 : y.call(t, {
870
+ return ((s = t.headerCell) == null ? void 0 : s.call(t, {
835
871
  title: l,
836
- column: f,
837
- index: d
872
+ column: b,
873
+ index: m
838
874
  })) || l;
839
875
  }
840
876
  };
841
- return (!e.children || A(e.children) <= 0) && (u.default = o), () => c(ce, m(i(e, "title", "dataIndex", "prop", "customRender", "children"), {
877
+ return (!e.children || L(e.children) <= 0) && (o.default = u), () => c(Y, g(y(e, "title", "dataIndex", "prop", "customRender", "children"), {
842
878
  prop: e.dataIndex,
843
879
  label: e.title
844
880
  }), {
845
- default: () => [A(e.children) > 0 && k(e.children, (n) => c(Be, m({
846
- key: n.dataIndex
847
- }, n), t))],
848
- ...u
881
+ default: () => [L(e.children) > 0 && T(e.children, (r) => c($e, g({
882
+ key: r.dataIndex
883
+ }, r), t))],
884
+ ...o
849
885
  });
850
886
  }
851
- }), Nt = ["clearSelection", "getSelectionRows", "toggleRowSelection", "toggleAllSelection", "toggleRowExpansion", "setCurrentRow", "clearSort", "clearFilter", "doLayout", "sort", "scrollTo", "setScrollTop", "setScrollLeft"], Ne = S({
887
+ }), Zt = ["clearSelection", "getSelectionRows", "toggleRowSelection", "toggleAllSelection", "toggleRowExpansion", "setCurrentRow", "clearSort", "clearFilter", "doLayout", "sort", "scrollTo", "setScrollTop", "setScrollLeft"], Ht = () => ({
888
+ columns: {
889
+ type: Array
890
+ },
891
+ dataSource: {
892
+ type: Array
893
+ },
894
+ loading: {
895
+ type: Boolean
896
+ },
897
+ mergeOpts: {
898
+ type: Object
899
+ },
900
+ selectedRowKeys: {
901
+ type: Array
902
+ },
903
+ rowSelection: {
904
+ type: Object,
905
+ default: void 0
906
+ }
907
+ }), Ge = k({
852
908
  props: {
853
- ...ie.props,
854
- columns: {
855
- type: Array
856
- },
857
- dataSource: {
858
- type: Array
859
- },
860
- loading: {
861
- type: Boolean
862
- },
863
- mergeOpts: {
864
- type: Object
865
- }
909
+ ...be.props,
910
+ ...Ht()
866
911
  },
867
912
  setup: (e, {
868
913
  slots: t,
869
- expose: o
914
+ expose: u,
915
+ emit: n
870
916
  }) => {
871
- const a = p(), u = Te("table");
872
- o(pe(Nt, a));
873
- const n = () => {
874
- var d, l;
917
+ const o = R(), r = ze("table");
918
+ u(we(Zt, o));
919
+ const a = (d) => {
920
+ const f = e.rowKey;
921
+ return Pt(f) ? f(d) : f ? d[f] : d.id;
922
+ }, m = N(() => {
923
+ const d = e.rowSelection;
924
+ return d ? !d.type || d.type === "multi" : !1;
925
+ }), l = (d) => {
926
+ var p, S;
927
+ const f = d ? [a(d)] : [];
928
+ Ce(e.selectedRowKeys, f, {
929
+ sort: !0
930
+ }) || ((S = (p = e.rowSelection).onChange) == null || S.call(p, f, d ? [d] : []), n("update:selectedRowKeys", f));
931
+ }, b = (d) => {
932
+ var p, S;
933
+ const f = T(d, (K) => a(K));
934
+ Ce(e.selectedRowKeys, f, {
935
+ sort: !0
936
+ }) || ((S = (p = e.rowSelection).onChange) == null || S.call(p, f, d), n("update:selectedRowKeys", f));
937
+ }, h = N(() => {
938
+ if (!!e.rowSelection)
939
+ return m.value ? {
940
+ onSelectionChange: b
941
+ } : {
942
+ highlightCurrentRow: !0,
943
+ onCurrentChange: l
944
+ };
945
+ });
946
+ G(() => {
947
+ var f, p;
948
+ const d = e.dataSource || e.data;
949
+ if (m.value) {
950
+ const S = e.selectedRowKeys, K = Pe(S, (i, v) => ({
951
+ ...i,
952
+ [v]: !0
953
+ }), {}), F = (f = o.value) == null ? void 0 : f.getSelectionRows(), I = Pe(F, (i, v) => ({
954
+ ...i,
955
+ [a(v)]: !0
956
+ }), {});
957
+ let V = !1;
958
+ if (L(S) !== L(F))
959
+ V = !0;
960
+ else if (L(S) !== 0)
961
+ for (let i = 0; i < S.length; i++) {
962
+ const v = S[i];
963
+ if (!I[v]) {
964
+ V = !0;
965
+ break;
966
+ }
967
+ }
968
+ V && he(() => {
969
+ ht(d, (i) => {
970
+ var C;
971
+ const v = a(i);
972
+ K[v] !== I[v] && ((C = o.value) == null || C.toggleRowSelection(i, !!K[v]));
973
+ });
974
+ });
975
+ } else {
976
+ const S = (p = e.selectedRowKeys) == null ? void 0 : p[0];
977
+ let K = null;
978
+ S && (K = St(d, (F) => a(F) === S)), he(() => {
979
+ var F;
980
+ (F = o.value) == null || F.setCurrentRow(K);
981
+ });
982
+ }
983
+ }, [() => e.selectedRowKeys, () => e.dataSource, () => e.data]);
984
+ const s = () => {
985
+ var d, f;
875
986
  if (e.spanMethod)
876
987
  return e.spanMethod;
877
- if (((d = e.mergeOpts) == null ? void 0 : d.rowNames) || ((l = e.mergeOpts) == null ? void 0 : l.colNames)) {
878
- const f = ft(e.mergeOpts);
988
+ if (((d = e.mergeOpts) == null ? void 0 : d.rowNames) || ((f = e.mergeOpts) == null ? void 0 : f.colNames)) {
989
+ const p = xt(e.mergeOpts);
879
990
  return ({
880
- row: b,
881
- column: y
991
+ row: S,
992
+ column: K
882
993
  }) => {
883
- const s = y.property;
884
- if (f[s]) {
885
- const v = b[f[s]], g = b[s + "-colspan"];
994
+ const F = K.property;
995
+ if (p[F]) {
996
+ const I = S[p[F]], V = S[F + "-colspan"];
886
997
  return {
887
- rowspan: v !== void 0 ? v : 1,
888
- colspan: g !== void 0 ? g : 1
998
+ rowspan: I !== void 0 ? I : 1,
999
+ colspan: V !== void 0 ? V : 1
889
1000
  };
890
1001
  }
891
1002
  };
892
1003
  }
893
1004
  return e.spanMethod;
894
- }, r = B(() => n());
895
- return () => c(ie, m({
896
- ref: a,
897
- id: u
898
- }, i(e, "columns", "dataSource", "data", "loading", "spanMethod"), {
1005
+ }, x = N(() => s());
1006
+ return () => c(be, g({
1007
+ ref: o,
1008
+ id: r
1009
+ }, y(e, "columns", "dataSource", "data", "loading", "spanMethod"), {
899
1010
  data: e.dataSource || e.data,
900
- spanMethod: r.value
901
- }), {
1011
+ spanMethod: x.value
1012
+ }, h.value), {
902
1013
  default: () => {
903
- var d, l;
904
- return [(d = t.start) == null ? void 0 : d.call(t), k(e.columns, (f) => c(Be, m({
905
- key: f.dataIndex
906
- }, f), t)), (l = t.default) == null ? void 0 : l.call(t), e.loading && c(Ke, {
907
- target: u,
1014
+ var d, f, p, S, K;
1015
+ return [(d = t.start) == null ? void 0 : d.call(t), m.value && c(Y, g({
1016
+ type: "selection"
1017
+ }, y((f = e.rowSelection) == null ? void 0 : f.column, "slots")), (S = (p = e.rowSelection) == null ? void 0 : p.column) == null ? void 0 : S.slots), T(e.columns, (F) => c($e, g({
1018
+ key: F.dataIndex
1019
+ }, F), t)), (K = t.default) == null ? void 0 : K.call(t), e.loading && c(Oe, {
1020
+ target: r,
908
1021
  loading: !0
909
1022
  }, null)];
910
1023
  },
911
- ...G(t, "append", "empty")
1024
+ ..._(t, "append", "empty")
912
1025
  });
913
1026
  }
914
- }), zt = S({
1027
+ }), Jt = k({
915
1028
  props: {
916
- ...V.props,
1029
+ ...U.props,
917
1030
  type: {
918
1031
  type: String,
919
1032
  default: "primary"
@@ -925,125 +1038,125 @@ const fe = () => ({
925
1038
  },
926
1039
  setup: (e, {
927
1040
  slots: t
928
- }) => () => c(V, e, t)
1041
+ }) => () => c(U, e, t)
929
1042
  });
930
- R.props = {
931
- ...q.props,
932
- ...R.props,
933
- formMethods: { type: Array, default: Ee }
934
- };
935
- L.props = {
936
- ...R.props,
937
- ...L.props,
938
- inline: { type: Boolean, default: !0 }
1043
+ O.props = {
1044
+ ...X.props,
1045
+ ...O.props,
1046
+ formMethods: { type: Array, default: Ae }
939
1047
  };
940
1048
  Z.props = {
941
- ...j.props,
942
- ...Z.props
943
- };
944
- O.props = {
945
- ...Ne.props,
946
- ...O.props
1049
+ ...O.props,
1050
+ ...Z.props,
1051
+ inline: { type: Boolean, default: !0 }
947
1052
  };
948
- D.props = {
949
- ...ke.props,
950
- ...D.props
1053
+ te.props = {
1054
+ ...Q.props,
1055
+ ...te.props
951
1056
  };
952
1057
  H.props = {
953
- ...D.props,
1058
+ ...Ge.props,
954
1059
  ...H.props
955
1060
  };
956
1061
  J.props = {
957
- ...R.props,
1062
+ ...Be.props,
958
1063
  ...J.props
959
1064
  };
960
- Q.props = {
961
- ...Me.props,
962
- ...Q.props
1065
+ ne.props = {
1066
+ ...J.props,
1067
+ ...ne.props
963
1068
  };
964
- X.props = {
965
- ...Ve.props,
966
- ...X.props,
1069
+ ae.props = {
1070
+ ...O.props,
1071
+ ...ae.props
1072
+ };
1073
+ le.props = {
1074
+ ...Ue.props,
1075
+ ...le.props
1076
+ };
1077
+ re.props = {
1078
+ ...qe.props,
1079
+ ...re.props,
967
1080
  modelValue: String
968
1081
  };
969
- const qt = {
970
- [P.LoadingKey]: Ke,
971
- [P.RowKey]: _e,
972
- [P.ColKey]: et,
973
- [P.ButtonKey]: V,
974
- [P.DescriptionsKey]: ke,
975
- [P.DescriptionsItemKey]: tt,
976
- [P.MenusKey]: st,
977
- [P.ModalKey]: Me,
978
- [P.PaginationKey]: bt,
979
- [P.PopoverKey]: gt,
980
- [P.CheckboxKey]: Ce,
981
- [P.FormKey]: yt,
982
- [P.FormItemKey]: xe,
983
- [P.TableKey]: Ne,
984
- [P.TableOperateKey]: zt,
985
- [P.UploaderKey]: Ve,
986
- [P.ProFormKey]: R,
987
- [P.ProSearchFormKey]: L,
988
- [P.ProTableKey]: O,
989
- [P.ProCurdKey]: Ae,
990
- [P.ProListKey]: Ue,
991
- text: Y,
992
- digit: we,
993
- date: Le,
994
- time: Y,
995
- select: w,
996
- radio: w,
997
- checkbox: w,
998
- treeSelect: _,
999
- cascader: _
1000
- }, $t = {
1001
- text: kt,
1002
- digit: Ft,
1003
- digitRange: xt,
1004
- date: Et,
1005
- time: Tt,
1006
- select: Kt,
1007
- treeSelect: Mt,
1008
- checkbox: It,
1009
- radio: Rt,
1010
- switch: Vt,
1011
- cascader: Bt
1082
+ const an = {
1083
+ [P.LoadingKey]: Oe,
1084
+ [P.RowKey]: it,
1085
+ [P.ColKey]: ft,
1086
+ [P.ButtonKey]: U,
1087
+ [P.DescriptionsKey]: Be,
1088
+ [P.DescriptionsItemKey]: mt,
1089
+ [P.MenusKey]: Vt,
1090
+ [P.ModalKey]: Ue,
1091
+ [P.PaginationKey]: Rt,
1092
+ [P.PopoverKey]: Tt,
1093
+ [P.CheckboxKey]: Ve,
1094
+ [P.FormKey]: Kt,
1095
+ [P.FormItemKey]: Le,
1096
+ [P.TableKey]: Ge,
1097
+ [P.TableOperateKey]: Jt,
1098
+ [P.UploaderKey]: qe,
1099
+ [P.ProFormKey]: O,
1100
+ [P.ProSearchFormKey]: Z,
1101
+ [P.ProTableKey]: H,
1102
+ [P.ProCurdKey]: He,
1103
+ [P.ProListKey]: Je,
1104
+ text: oe,
1105
+ digit: Qe,
1106
+ date: Xe,
1107
+ time: oe,
1108
+ select: W,
1109
+ radio: W,
1110
+ checkbox: W,
1111
+ treeSelect: ue,
1112
+ cascader: ue
1113
+ }, ln = {
1114
+ text: Lt,
1115
+ digit: At,
1116
+ digitRange: zt,
1117
+ date: Ot,
1118
+ time: Ut,
1119
+ select: Dt,
1120
+ treeSelect: jt,
1121
+ checkbox: qt,
1122
+ radio: $t,
1123
+ switch: Gt,
1124
+ cascader: Wt
1012
1125
  };
1013
1126
  export {
1014
- Ee as FormMethods,
1015
- Ct as InputNumberRange,
1016
- Pt as ProCheckbox,
1017
- yt as ProForm,
1018
- Bt as ProFormCascader,
1019
- It as ProFormCheckbox,
1020
- Et as ProFormDatePicker,
1021
- xt as ProFormInputNumberRange,
1022
- xe as ProFormItem,
1023
- Rt as ProFormRadio,
1024
- Kt as ProFormSelect,
1025
- Vt as ProFormSwitch,
1026
- kt as ProFormText,
1027
- Ft as ProFormTextNumber,
1028
- Tt as ProFormTimePicker,
1029
- Mt as ProFormTreeSelect,
1030
- Ke as ProLoading,
1031
- st as ProMenus,
1032
- Me as ProModal,
1033
- bt as ProPagination,
1034
- gt as ProPopover,
1035
- ht as ProRadio,
1036
- St as ProSelect,
1037
- Ne as ProTable,
1038
- Be as ProTableColumn,
1039
- zt as ProTableOperateItem,
1040
- Dt as ProTabs,
1041
- jt as ProTree,
1042
- Ve as ProUploader,
1043
- Nt as TableMethods,
1044
- pt as UploadMethods,
1045
- C as createFormItemComponent,
1046
- Te as createLoadingId,
1047
- qt as elementMap,
1048
- $t as formElementMap
1127
+ Ae as FormMethods,
1128
+ Nt as InputNumberRange,
1129
+ Mt as ProCheckbox,
1130
+ Kt as ProForm,
1131
+ Wt as ProFormCascader,
1132
+ qt as ProFormCheckbox,
1133
+ Ot as ProFormDatePicker,
1134
+ zt as ProFormInputNumberRange,
1135
+ Le as ProFormItem,
1136
+ $t as ProFormRadio,
1137
+ Dt as ProFormSelect,
1138
+ Gt as ProFormSwitch,
1139
+ Lt as ProFormText,
1140
+ At as ProFormTextNumber,
1141
+ Ut as ProFormTimePicker,
1142
+ jt as ProFormTreeSelect,
1143
+ Oe as ProLoading,
1144
+ Vt as ProMenus,
1145
+ Ue as ProModal,
1146
+ Rt as ProPagination,
1147
+ Tt as ProPopover,
1148
+ wt as ProRadio,
1149
+ It as ProSelect,
1150
+ Ge as ProTable,
1151
+ $e as ProTableColumn,
1152
+ Jt as ProTableOperateItem,
1153
+ tn as ProTabs,
1154
+ nn as ProTree,
1155
+ qe as ProUploader,
1156
+ Zt as TableMethods,
1157
+ Bt as UploadMethods,
1158
+ M as createFormItemComponent,
1159
+ ze as createLoadingId,
1160
+ an as elementMap,
1161
+ ln as formElementMap
1049
1162
  };