@vue-start/element-pro 0.2.21 → 0.2.23

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,8 +1,8 @@
1
- import { createExpose as pe, createFormItemCompFn as ze, createExposeObj as U, ProForm as V, ProSearchForm as w, ProFormList as Z, ProTable as D, ProDesc as O, ProCurdDesc as H, ProCurdForm as J, ProCurdModal as Q, ProUploaderText as X, ElementKeys as y, ProCurd as Ae, ProList as Ue, ProShowText as Y, ProShowDigit as Le, ProShowDate as we, ProShowOptions as L, ProShowTree as _ } from "@vue-start/pro";
2
- import { ElFormItem as j, ElForm as q, ElLoading as De, ElDialog as ee, ElButton as M, ElPagination as te, ElPopover as ae, ElCheckboxGroup as ne, ElCheckboxButton as Oe, ElCheckbox as Ce, ElRadioGroup as le, ElRadioButton as je, ElRadio as qe, ElSelect as re, ElOption as $e, ElTabs as oe, ElTabPane as Ge, ElMenu as N, ElUpload as ue, useFormItem as We, ElInputNumber as B, ElTree as ce, ElInput as Ze, ElDatePicker as He, ElTimePicker as Je, ElTreeSelect as Qe, ElSwitch as Xe, ElCascader as Ye, ElTableColumn as de, 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 s, toRaw as nt, computed as z, Fragment as lt } from "vue";
4
- import { keys as F, omit as i, isBoolean as $, isString as rt, debounce as ot, map as k, size as A, pick as G, get as T, isNumber as K, filter as me, isArray as ut } from "lodash";
5
- import { useEffect as Fe, generateId as ct, useWatch as I, convertCollection as dt, isValidFileType as it, convertFileSize as mt } from "@vue-start/hooks";
1
+ import { createExpose as Ce, createFormItemCompFn as ze, createExposeObj as U, ProForm as V, ProSearchForm as w, ProFormList as Z, ProTable as D, ProDesc as O, ProCurdDesc as H, ProCurdForm as J, ProCurdModal as Q, ProUploaderText as X, ElementKeys as y, ProCurd as Ae, ProList as Ue, ProShowText as Y, ProShowDigit as Le, ProShowDate as we, ProShowOptions as L, ProShowTree as _ } from "@vue-start/pro";
2
+ import { ElFormItem as j, ElForm as q, ElLoading as De, ElDialog as ee, ElButton as M, ElPagination as te, ElPopover as ae, ElCheckboxGroup as ne, ElCheckboxButton as Oe, ElCheckbox as se, ElRadioGroup as le, ElRadioButton as je, ElRadio as qe, ElSelect as re, ElOption as $e, ElTabs as ue, ElTabPane as Ge, ElMenu as N, ElUpload as oe, useFormItem as We, ElInputNumber as B, 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 d, mergeProps as m, reactive as at, ref as p, toRaw as nt, computed as z, 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 I, convertCollection as ct, isValidFileType as it, convertFileSize as mt } from "@vue-start/hooks";
6
6
  const fe = () => ({
7
7
  name: {
8
8
  type: [String, Array]
@@ -15,10 +15,13 @@ const fe = () => ({
15
15
  setup: (e, {
16
16
  slots: t
17
17
  }) => {
18
- const u = F(fe());
19
- return () => c(j, m(i(e, ...u, "name", "prop"), {
18
+ const o = F(fe());
19
+ return () => d(j, m(i(e, ...o, "name", "prop"), {
20
20
  prop: e.prop || e.name
21
- }), t);
21
+ }), {
22
+ label: e.label ? () => e.label : void 0,
23
+ ...t
24
+ });
22
25
  }
23
26
  }), Ee = ["clearValidate", "resetFields", "scrollToField", "validate", "validateField", "submit"], ft = S({
24
27
  props: {
@@ -30,30 +33,30 @@ const fe = () => ({
30
33
  },
31
34
  setup: (e, {
32
35
  slots: t,
33
- emit: u,
36
+ emit: o,
34
37
  expose: a
35
38
  }) => {
36
- const r = e.model || at({}), n = s();
39
+ const u = e.model || at({}), n = p();
37
40
  return Fe(() => {
38
41
  !n.value || (n.value.submit = () => {
39
- var o;
40
- (o = n.value) == null || o.validate((d, l) => {
41
- d ? u("finish", nt(r)) : u("finishFailed", l);
42
+ var l;
43
+ (l = n.value) == null || l.validate((c, r) => {
44
+ c ? o("finish", nt(u)) : o("finishFailed", r);
42
45
  });
43
46
  });
44
- }, []), a(pe(Ee, n)), () => c(q, m({
47
+ }, []), a(Ce(Ee, n)), () => d(q, m({
45
48
  ref: n
46
49
  }, i(e, "model"), {
47
50
  hideRequiredAsterisk: $(e.hideRequiredMark) ? e.hideRequiredMark : e.hideRequiredAsterisk,
48
- model: r
51
+ model: u
49
52
  }), t);
50
53
  }
51
- }), C = ze(xe, (e, t, u) => ({
54
+ }), s = ze(xe, (e, t, o) => ({
52
55
  modelValue: e,
53
56
  "onUpdate:modelValue": t,
54
57
  clearable: !0,
55
- disabled: u
56
- })), Te = (e = "comp") => e + "-" + ct(), yt = () => ({
58
+ disabled: o
59
+ })), Te = (e = "comp") => e + "-" + dt(), yt = () => ({
57
60
  loading: {
58
61
  type: Boolean
59
62
  },
@@ -88,14 +91,14 @@ const fe = () => ({
88
91
  setup: (e, {
89
92
  slots: t
90
93
  }) => {
91
- const u = Te();
94
+ const o = Te();
92
95
  return Fe(() => {
93
96
  if (!e.loading)
94
97
  return;
95
98
  let a = e.target;
96
- if (t.default ? a = document.getElementById(u) : e.target && rt(e.target) && (a = document.querySelector("#" + e.target)), !a)
99
+ if (t.default ? a = document.getElementById(o) : e.target && rt(e.target) && (a = document.querySelector("#" + e.target)), !a)
97
100
  return;
98
- const r = De.service({
101
+ const u = De.service({
99
102
  target: a,
100
103
  body: e.body,
101
104
  fullscreen: e.fullscreen,
@@ -106,10 +109,10 @@ const fe = () => ({
106
109
  customClass: e.customClass
107
110
  });
108
111
  return () => {
109
- r && r.close();
112
+ u && u.close();
110
113
  };
111
- }, () => e.loading), () => t.default ? c("div", {
112
- id: u
114
+ }, () => e.loading), () => t.default ? d("div", {
115
+ id: o
113
116
  }, [t.default()]) : null;
114
117
  }
115
118
  }), ye = () => ({
@@ -156,51 +159,51 @@ const fe = () => ({
156
159
  },
157
160
  setup: (e, {
158
161
  slots: t,
159
- emit: u,
162
+ emit: o,
160
163
  attrs: a
161
164
  }) => {
162
- const r = s(e.visible);
165
+ const u = p(e.visible);
163
166
  I(() => {
164
- r.value !== e.visible && (r.value = e.visible);
167
+ u.value !== e.visible && (u.value = e.visible);
165
168
  }, () => e.visible);
166
169
  const n = () => {
167
- var l;
168
- if ((l = e.cancelButtonProps) != null && l.onClick) {
170
+ var r;
171
+ if ((r = e.cancelButtonProps) != null && r.onClick) {
169
172
  e.cancelButtonProps.onClick();
170
173
  return;
171
174
  }
172
- r.value = !1, u("update:visible", !1);
173
- }, o = () => {
174
- var l;
175
- if ((l = e.okButtonProps) != null && l.onClick) {
175
+ u.value = !1, o("update:visible", !1);
176
+ }, l = () => {
177
+ var r;
178
+ if ((r = e.okButtonProps) != null && r.onClick) {
176
179
  e.okButtonProps.onClick();
177
180
  return;
178
181
  }
179
- u("ok");
180
- }, d = F(ye());
181
- return () => c(ee, m({
182
+ o("ok");
183
+ }, c = F(ye());
184
+ return () => d(ee, m({
182
185
  class: e.clsName
183
- }, i(a, "onCancel"), i(e, ...d, "modelValue"), {
186
+ }, i(a, "onCancel"), i(e, ...c, "modelValue"), {
184
187
  closeOnClickModal: $(e.maskClosable) ? e.maskClosable : e.closeOnClickModal,
185
- modelValue: r.value,
186
- "onUpdate:modelValue": [(l) => r.value = l, (l) => {
187
- u("update:visible", l);
188
+ modelValue: u.value,
189
+ "onUpdate:modelValue": [(r) => u.value = r, (r) => {
190
+ o("update:visible", r);
188
191
  }],
189
192
  onClose: () => {
190
- u("cancel");
193
+ o("cancel");
191
194
  }
192
195
  }), {
193
- footer: e.footer === !1 ? void 0 : () => c("div", {
196
+ footer: e.footer === !1 ? void 0 : () => d("div", {
194
197
  class: `${e.clsName}-operate`
195
- }, [c(M, m(i(e.cancelButtonProps, "onClick"), {
198
+ }, [d(M, m(i(e.cancelButtonProps, "onClick"), {
196
199
  onClick: n
197
200
  }), {
198
201
  default: () => [e.cancelText]
199
- }), c(M, m({
202
+ }), d(M, m({
200
203
  type: "primary",
201
204
  loading: e.confirmLoading
202
205
  }, i(e.okButtonProps, "onClick"), {
203
- onClick: o
206
+ onClick: l
204
207
  }), {
205
208
  default: () => [e.okText]
206
209
  })]),
@@ -217,28 +220,28 @@ const fe = () => ({
217
220
  },
218
221
  setup: (e, {
219
222
  slots: t,
220
- emit: u
223
+ emit: o
221
224
  }) => {
222
- const a = s(e.page), r = s(e.pageSize);
225
+ const a = p(e.page), u = p(e.pageSize);
223
226
  I(() => {
224
227
  a.value !== e.page && (a.value = e.page);
225
228
  }, () => e.page), I(() => {
226
- r.value !== e.pageSize && (r.value = e.pageSize);
229
+ u.value !== e.pageSize && (u.value = e.pageSize);
227
230
  }, () => e.pageSize);
228
- const n = ot(() => {
229
- u("composeChange", a.value, r.value);
230
- }, 300), o = () => {
231
- n(), u("update:page", a.value);
232
- }, d = () => {
233
- n(), u("update:pageSize", r.value);
231
+ const n = ut(() => {
232
+ o("composeChange", a.value, u.value);
233
+ }, 300), l = () => {
234
+ n(), o("update:page", a.value);
235
+ }, c = () => {
236
+ n(), o("update:pageSize", u.value);
234
237
  };
235
- return () => c(te, m({
238
+ return () => d(te, m({
236
239
  currentPage: a.value,
237
- "onUpdate:currentPage": (l) => a.value = l,
238
- pageSize: r.value,
239
- "onUpdate:pageSize": (l) => r.value = l,
240
- onCurrentChange: o,
241
- onSizeChange: d
240
+ "onUpdate:currentPage": (r) => a.value = r,
241
+ pageSize: u.value,
242
+ "onUpdate:pageSize": (r) => u.value = r,
243
+ onCurrentChange: l,
244
+ onSizeChange: c
242
245
  }, i(e, "currentPage", "pageSize")), t);
243
246
  }
244
247
  }), bt = S({
@@ -247,7 +250,7 @@ const fe = () => ({
247
250
  },
248
251
  setup: (e, {
249
252
  slots: t
250
- }) => () => c(ae, e, {
253
+ }) => () => d(ae, e, {
251
254
  reference: t.default,
252
255
  default: t.content
253
256
  })
@@ -268,38 +271,38 @@ const fe = () => ({
268
271
  },
269
272
  setup: (e, {
270
273
  slots: t,
271
- emit: u,
274
+ emit: o,
272
275
  expose: a
273
276
  }) => {
274
- const r = s();
275
- a(U(r));
277
+ const u = p();
278
+ a(U(u));
276
279
  const n = F(ve());
277
- return () => c(ne, m({
278
- ref: r
280
+ return () => d(ne, m({
281
+ ref: u
279
282
  }, i(e, n), {
280
- "onUpdate:modelValue": (o) => {
281
- u("update:modelValue", o || void 0);
283
+ "onUpdate:modelValue": (l) => {
284
+ o("update:modelValue", l || void 0);
282
285
  }
283
286
  }), {
284
287
  default: () => {
285
- var o, d;
286
- return [(o = t.start) == null ? void 0 : o.call(t), k(e.options, (l) => {
288
+ var l, c;
289
+ return [(l = t.start) == null ? void 0 : l.call(t), k(e.options, (r) => {
287
290
  var g;
288
- const b = (g = t.label) == null ? void 0 : g.call(t, l);
289
- return e.optionType === "button" || e.buttonStyle === "button" ? c(Oe, m({
290
- key: l.value
291
- }, i(l, "value"), {
292
- label: l.value
291
+ const b = (g = t.label) == null ? void 0 : g.call(t, r);
292
+ return e.optionType === "button" || e.buttonStyle === "button" ? d(Oe, m({
293
+ key: r.value
294
+ }, i(r, "value"), {
295
+ label: r.value
293
296
  }), {
294
- default: () => [b || l.label]
295
- }) : c(Ce, m({
296
- key: l.value
297
- }, l, {
298
- label: l.value
297
+ default: () => [b || r.label]
298
+ }) : d(se, m({
299
+ key: r.value
300
+ }, r, {
301
+ label: r.value
299
302
  }), {
300
- default: () => [b || l.label]
303
+ default: () => [b || r.label]
301
304
  });
302
- }), (d = t.default) == null ? void 0 : d.call(t)];
305
+ }), (c = t.default) == null ? void 0 : c.call(t)];
303
306
  }
304
307
  });
305
308
  }
@@ -322,38 +325,38 @@ const fe = () => ({
322
325
  },
323
326
  setup: (e, {
324
327
  slots: t,
325
- emit: u,
328
+ emit: o,
326
329
  expose: a
327
330
  }) => {
328
- const r = s();
329
- a(U(r));
331
+ const u = p();
332
+ a(U(u));
330
333
  const n = F(be());
331
- return () => c(le, m({
332
- ref: r
334
+ return () => d(le, m({
335
+ ref: u
333
336
  }, i(e, n), {
334
- "onUpdate:modelValue": (o) => {
335
- u("update:modelValue", o);
337
+ "onUpdate:modelValue": (l) => {
338
+ o("update:modelValue", l);
336
339
  }
337
340
  }), {
338
341
  default: () => {
339
- var o, d;
340
- return [(o = t.start) == null ? void 0 : o.call(t), k(e.options, (l) => {
342
+ var l, c;
343
+ return [(l = t.start) == null ? void 0 : l.call(t), k(e.options, (r) => {
341
344
  var g;
342
- const b = (g = t.label) == null ? void 0 : g.call(t, l);
343
- return e.optionType === "button" || e.buttonStyle === "button" ? c(je, m({
344
- key: l.value
345
- }, i(l, "value"), {
346
- label: l.value
345
+ const b = (g = t.label) == null ? void 0 : g.call(t, r);
346
+ return e.optionType === "button" || e.buttonStyle === "button" ? d(je, m({
347
+ key: r.value
348
+ }, i(r, "value"), {
349
+ label: r.value
347
350
  }), {
348
- default: () => [b || l.label]
349
- }) : c(qe, m({
350
- key: l.value
351
- }, i(l, "value"), {
352
- label: l.value
351
+ default: () => [b || r.label]
352
+ }) : d(qe, m({
353
+ key: r.value
354
+ }, i(r, "value"), {
355
+ label: r.value
353
356
  }), {
354
- default: () => [b || l.label]
357
+ default: () => [b || r.label]
355
358
  });
356
- }), (d = t.default) == null ? void 0 : d.call(t)];
359
+ }), (c = t.default) == null ? void 0 : c.call(t)];
357
360
  }
358
361
  });
359
362
  }
@@ -366,61 +369,61 @@ const fe = () => ({
366
369
  },
367
370
  setup: (e, {
368
371
  slots: t,
369
- emit: u,
372
+ emit: o,
370
373
  expose: a
371
374
  }) => {
372
- const r = s();
373
- a(U(r));
375
+ const u = p();
376
+ a(U(u));
374
377
  const n = F(ge());
375
- return () => c(re, m({
376
- ref: r
378
+ return () => d(re, m({
379
+ ref: u
377
380
  }, i(e, n), {
378
- "onUpdate:modelValue": (o) => {
379
- u("update:modelValue", o || void 0);
381
+ "onUpdate:modelValue": (l) => {
382
+ o("update:modelValue", l || void 0);
380
383
  }
381
384
  }), {
382
385
  default: () => {
383
- var o, d;
384
- return [(o = t.start) == null ? void 0 : o.call(t), k(e.options, (l) => {
386
+ var l, c;
387
+ return [(l = t.start) == null ? void 0 : l.call(t), k(e.options, (r) => {
385
388
  var g;
386
- const b = (g = t.label) == null ? void 0 : g.call(t, l);
387
- return c($e, m({
388
- key: l.value
389
- }, l), {
390
- default: () => [b || l.label]
389
+ const b = (g = t.label) == null ? void 0 : g.call(t, r);
390
+ return d($e, m({
391
+ key: r.value
392
+ }, r), {
393
+ default: () => [b || r.label]
391
394
  });
392
- }), (d = t.default) == null ? void 0 : d.call(t)];
395
+ }), (c = t.default) == null ? void 0 : c.call(t)];
393
396
  },
394
397
  ...i(t, "default")
395
398
  });
396
399
  }
397
400
  }), Dt = S({
398
401
  props: {
399
- ...oe.props,
402
+ ...ue.props,
400
403
  options: {
401
404
  type: Array
402
405
  }
403
406
  },
404
407
  setup: (e, {
405
408
  slots: t,
406
- emit: u
407
- }) => () => c(oe, m(i(e, "options"), {
409
+ emit: o
410
+ }) => () => d(ue, m(i(e, "options"), {
408
411
  "onUpdate:modelValue": (a) => {
409
- u("update:modelValue", a);
412
+ o("update:modelValue", a);
410
413
  }
411
414
  }), {
412
415
  default: () => {
413
- var a, r;
414
- return [(a = t.start) == null ? void 0 : a.call(t), k(e.options, (n) => c(Ge, m({
416
+ var a, u;
417
+ return [(a = t.start) == null ? void 0 : a.call(t), k(e.options, (n) => d(Ge, m({
415
418
  key: n.value
416
419
  }, i(n, "value"), {
417
420
  name: n.value
418
421
  }), {
419
422
  label: () => {
420
- var o;
421
- return ((o = t.label) == null ? void 0 : o.call(t, n)) || n.label;
423
+ var l;
424
+ return ((l = t.label) == null ? void 0 : l.call(t, n)) || n.label;
422
425
  }
423
- })), (r = t.default) == null ? void 0 : r.call(t)];
426
+ })), (u = t.default) == null ? void 0 : u.call(t)];
424
427
  }
425
428
  })
426
429
  }), W = {
@@ -444,32 +447,36 @@ const fe = () => ({
444
447
  setup: (e, {
445
448
  slots: t
446
449
  }) => {
447
- const u = () => {
450
+ const o = () => {
448
451
  var a;
449
452
  (a = e.onMenuItemClick) == null || a.call(e, e.menu);
450
453
  };
451
454
  return () => {
452
- var r, n;
455
+ var u, n;
453
456
  const a = e.menu;
454
- return (a == null ? void 0 : a.children) && A(a.children) > 0 ? c(N.SubMenu, m({
457
+ return (a == null ? void 0 : a.children) && A(a.children) > 0 ? d(N.SubMenu, m({
455
458
  index: a == null ? void 0 : a.value
456
- }, (r = e.convertSubMenuProps) == null ? void 0 : r.call(e, a)), {
457
- default: () => [k(a.children, (o) => c(Ve, m({
458
- menu: o
459
+ }, (u = e.convertSubMenuProps) == null ? void 0 : u.call(e, a)), {
460
+ default: () => [k(a.children, (l) => d(Ve, m({
461
+ menu: l
459
462
  }, G(e, Re)), t))],
460
463
  title: () => {
461
- var o;
462
- return ((o = t.title) == null ? void 0 : o.call(t, a)) || (a == null ? void 0 : a.label);
464
+ var l;
465
+ return ((l = t.title) == null ? void 0 : l.call(t, a)) || (a == null ? void 0 : a.label);
463
466
  }
464
- }) : c(N.MenuItem, m({
467
+ }) : d(N.MenuItem, m({
465
468
  index: a == null ? void 0 : a.value
466
469
  }, (n = e.convertMenuItemProps) == null ? void 0 : n.call(e, a), {
467
- onClick: u
470
+ onClick: o
468
471
  }), {
469
472
  title: () => {
470
- var o;
471
- return ((o = t.title) == null ? void 0 : o.call(t, a)) || (a == null ? void 0 : a.label);
472
- }
473
+ var l;
474
+ return ((l = t.title) == null ? void 0 : l.call(t, a)) || (a == null ? void 0 : a.label);
475
+ },
476
+ default: t.default ? () => {
477
+ var l;
478
+ return (l = t.default) == null ? void 0 : l.call(t, a);
479
+ } : void 0
473
480
  });
474
481
  };
475
482
  }
@@ -497,29 +504,29 @@ const fe = () => ({
497
504
  setup: (e, {
498
505
  slots: t
499
506
  }) => {
500
- const u = s(e.activeKey);
507
+ const o = p(e.activeKey);
501
508
  I(() => {
502
- e.activeKey !== u.value && (u.value = e.activeKey);
509
+ e.activeKey !== o.value && (o.value = e.activeKey);
503
510
  }, () => e.activeKey);
504
511
  const a = z(() => {
505
512
  var n;
506
- return dt(e.options, (o) => {
513
+ return ct(e.options, (l) => {
507
514
  var b, g;
508
- const d = ((b = e.fieldNames) == null ? void 0 : b.value) || "value", l = ((g = e.fieldNames) == null ? void 0 : g.label) || "label";
515
+ const c = ((b = e.fieldNames) == null ? void 0 : b.value) || "value", r = ((g = e.fieldNames) == null ? void 0 : g.label) || "label";
509
516
  return {
510
- ...i(o, d, l),
511
- value: T(o, d),
512
- label: T(o, l)
517
+ ...i(l, c, r),
518
+ value: T(l, c),
519
+ label: T(l, r)
513
520
  };
514
521
  }, {
515
522
  children: ((n = e.fieldNames) == null ? void 0 : n.children) || "children",
516
523
  childrenName: "children"
517
524
  });
518
- }), r = F(Pe());
519
- return () => c(N, m({
520
- defaultActive: u.value
521
- }, i(e, r)), {
522
- default: () => c(lt, null, [k(a.value, (n) => c(Ve, m({
525
+ }), u = F(Pe());
526
+ return () => d(N, m({
527
+ defaultActive: o.value
528
+ }, i(e, u)), {
529
+ default: () => d(lt, null, [k(a.value, (n) => d(Ve, m({
523
530
  menu: n
524
531
  }, G(e, Re)), t))])
525
532
  });
@@ -547,36 +554,36 @@ const fe = () => ({
547
554
  beforeUpload: {
548
555
  type: Function
549
556
  }
550
- }), st = ["abort", "submit", "clearFiles", "handleStart", "handleRemove"], Me = S({
557
+ }), pt = ["abort", "submit", "clearFiles", "handleStart", "handleRemove"], Me = S({
551
558
  props: {
552
- ...i(ue.props, "fileList"),
559
+ ...i(oe.props, "fileList"),
553
560
  ...he()
554
561
  },
555
562
  setup: (e, {
556
563
  slots: t,
557
- expose: u,
564
+ expose: o,
558
565
  emit: a
559
566
  }) => {
560
- const r = s();
561
- u(U(r, st));
567
+ const u = p();
568
+ o(U(u, pt));
562
569
  const {
563
570
  formItem: n
564
- } = We(), o = () => ut(e.modelValue) ? k(e.modelValue, (v) => {
571
+ } = We(), l = () => ot(e.modelValue) ? k(e.modelValue, (v) => {
565
572
  var P;
566
573
  return ((P = e.convertItemData) == null ? void 0 : P.call(e, v)) || v;
567
- }) : [], d = s(o());
568
- let l = !1;
574
+ }) : [], c = p(l());
575
+ let r = !1;
569
576
  const b = () => {
570
577
  var P;
571
- l = !0;
572
- const v = me(d.value, (h) => h.status === "success");
578
+ r = !0;
579
+ const v = me(c.value, (h) => h.status === "success");
573
580
  a("update:modelValue", k(v, (h) => {
574
581
  var x;
575
582
  return ((x = e.convertResponseData) == null ? void 0 : x.call(e, h)) || h;
576
583
  })), (P = n == null ? void 0 : n.validate) == null || P.call(n, "change");
577
584
  };
578
585
  I(() => {
579
- l || (d.value = o(), l = !1);
586
+ r || (c.value = l(), r = !1);
580
587
  }, () => e.modelValue);
581
588
  const g = (v) => {
582
589
  var P, h, x, E;
@@ -591,16 +598,16 @@ const fe = () => ({
591
598
  return (x = e.onErrorMsg) == null || x.call(e, "FileSizeError-MaxSize", `\u8BF7\u4E0A\u4F20\u5C0F\u4E8E${mt(e.maxSize)}\u7684\u6587\u4EF6`), !1;
592
599
  }
593
600
  return (E = e.onStart) == null || E.call(e, v), !0;
594
- }, f = z(() => K(e.limit) ? e.limit > A(d.value) : !0), p = F(he());
601
+ }, f = z(() => K(e.limit) ? e.limit > A(c.value) : !0), C = F(he());
595
602
  return () => {
596
603
  var v, P;
597
- return c("div", {
604
+ return d("div", {
598
605
  class: `pro-uploader ${f.value ? "" : "pro-uploader-limit"}`
599
- }, [(v = t.start) == null ? void 0 : v.call(t), c(ue, m({
600
- ref: r,
601
- fileList: d.value,
602
- "onUpdate:fileList": (h) => d.value = h
603
- }, i(e, "fileList", "onSuccess", "onRemove", "beforeUpload", ...p), {
606
+ }, [(v = t.start) == null ? void 0 : v.call(t), d(oe, m({
607
+ ref: u,
608
+ fileList: c.value,
609
+ "onUpdate:fileList": (h) => c.value = h
610
+ }, i(e, "fileList", "onSuccess", "onRemove", "beforeUpload", ...C), {
604
611
  beforeUpload: g,
605
612
  onSuccess: (h, x, E) => {
606
613
  var R;
@@ -608,7 +615,7 @@ const fe = () => ({
608
615
  },
609
616
  onRemove: (h, x) => {
610
617
  var E;
611
- d.value = me(d.value, (R) => !(h.uid === R.uid && h.name === R.name)), (E = e.onRemove) == null || E.call(e, h, x), b();
618
+ c.value = me(c.value, (R) => !(h.uid === R.uid && h.name === R.name)), (E = e.onRemove) == null || E.call(e, h, x), b();
612
619
  }
613
620
  }), {
614
621
  default: () => {
@@ -636,7 +643,7 @@ const fe = () => ({
636
643
  divider: {
637
644
  type: Function
638
645
  }
639
- }), pt = S({
646
+ }), Ct = S({
640
647
  props: {
641
648
  ...i(B.props, "modelValue"),
642
649
  controlsPosition: {
@@ -647,43 +654,43 @@ const fe = () => ({
647
654
  },
648
655
  setup: (e, {
649
656
  slots: t,
650
- emit: u
657
+ emit: o
651
658
  }) => {
652
- const a = s(T(e.modelValue, 0)), r = s(T(e.modelValue, 1));
659
+ const a = p(T(e.modelValue, 0)), u = p(T(e.modelValue, 1));
653
660
  let n = !1;
654
661
  I(() => {
655
- n || (a.value = T(e.modelValue, 0), r.value = T(e.modelValue, 1)), n = !1;
662
+ n || (a.value = T(e.modelValue, 0), u.value = T(e.modelValue, 1)), n = !1;
656
663
  }, [e.modelValue, () => e.modelValue]);
657
- const o = () => {
658
- n = !0, e.singleEmit ? u("update:modelValue", [a.value, r.value]) : K(a.value) && K(r.value) ? u("update:modelValue", [a.value, r.value]) : u("update:modelValue", null);
659
- }, d = (f) => {
660
- for (let p = 0; p < f.length; p++)
661
- if (K(f[p]))
662
- return f[p];
663
- }, l = z(() => {
664
+ const l = () => {
665
+ 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);
666
+ }, c = (f) => {
667
+ for (let C = 0; C < f.length; C++)
668
+ if (K(f[C]))
669
+ return f[C];
670
+ }, r = z(() => {
664
671
  var f;
665
- return d([r.value, (f = e.start) == null ? void 0 : f.max, e.max]);
672
+ return c([u.value, (f = e.start) == null ? void 0 : f.max, e.max]);
666
673
  }), b = z(() => {
667
674
  var f;
668
- return d([a.value, (f = e.end) == null ? void 0 : f.min, e.min]);
675
+ return c([a.value, (f = e.end) == null ? void 0 : f.min, e.min]);
669
676
  }), g = F(Se());
670
677
  return () => {
671
- var p, v;
678
+ var C, v;
672
679
  const f = i(e, ...g, "min", "max");
673
- return c("span", {
680
+ return d("span", {
674
681
  class: "pro-number-range"
675
- }, [c(B, m(f, i(e.start, "max"), {
676
- max: l.value,
682
+ }, [d(B, m(f, i(e.start, "max"), {
683
+ max: r.value,
677
684
  modelValue: a.value,
678
- "onUpdate:modelValue": [(P) => a.value = P, o]
679
- }), null), c("span", null, [((p = t.divider) == null ? void 0 : p.call(t)) || ((v = e.divider) == null ? void 0 : v.call(e)) || " - "]), c(B, m(f, i(e.start, "min"), {
685
+ "onUpdate:modelValue": [(P) => a.value = P, l]
686
+ }), null), d("span", null, [((C = t.divider) == null ? void 0 : C.call(t)) || ((v = e.divider) == null ? void 0 : v.call(e)) || " - "]), d(B, m(f, i(e.start, "min"), {
680
687
  min: b.value,
681
- modelValue: r.value,
682
- "onUpdate:modelValue": [(P) => r.value = P, o]
688
+ modelValue: u.value,
689
+ "onUpdate:modelValue": [(P) => u.value = P, l]
683
690
  }), null)]);
684
691
  };
685
692
  }
686
- }), se = () => ({
693
+ }), pe = () => ({
687
694
  treeData: {
688
695
  type: Array
689
696
  },
@@ -702,13 +709,13 @@ const fe = () => ({
702
709
  }
703
710
  }), Ot = S({
704
711
  props: {
705
- ...ce.props,
706
- ...se()
712
+ ...de.props,
713
+ ...pe()
707
714
  },
708
715
  setup: (e, {
709
716
  slots: t
710
717
  }) => {
711
- const u = F(se()), r = (() => {
718
+ const o = F(pe()), u = (() => {
712
719
  const n = e.fieldNames;
713
720
  if (!!n)
714
721
  return {
@@ -721,9 +728,9 @@ const fe = () => ({
721
728
  })();
722
729
  return () => {
723
730
  var n;
724
- return c(ce, m(i(e, u), {
731
+ return d(de, m(i(e, o), {
725
732
  data: e.treeData || e.data,
726
- props: r || e.props,
733
+ props: u || e.props,
727
734
  nodeKey: ((n = e.fieldNames) == null ? void 0 : n.key) || e.nodeKey,
728
735
  showCheckbox: $(e.selectable) ? e.selectable : e.showCheckbox,
729
736
  defaultExpandedKeys: e.expandedKeys || e.defaultExpandedKeys,
@@ -731,53 +738,53 @@ const fe = () => ({
731
738
  }), t);
732
739
  };
733
740
  }
734
- }), Ct = C({
741
+ }), st = s({
735
742
  InputComp: Ze,
736
743
  valueType: "text",
737
744
  name: "PFromText"
738
- }), kt = C({
745
+ }), kt = s({
739
746
  InputComp: B,
740
747
  valueType: "digit",
741
748
  name: "PFormNumber"
742
- }), Ft = C({
743
- InputComp: pt,
749
+ }), Ft = s({
750
+ InputComp: Ct,
744
751
  valueType: "digitRange",
745
752
  name: "PFormNumberRange"
746
- }), xt = C({
753
+ }), xt = s({
747
754
  InputComp: He,
748
755
  valueType: "date",
749
756
  name: "PFormDate"
750
- }), Et = C({
757
+ }), Et = s({
751
758
  InputComp: Je,
752
759
  valueType: "time",
753
760
  name: "PFormTime"
754
- }), Tt = C({
761
+ }), Tt = s({
755
762
  InputComp: ht,
756
763
  valueType: "select",
757
764
  name: "PFormSelect"
758
- }), Kt = C({
765
+ }), Kt = s({
759
766
  InputComp: Qe,
760
767
  valueType: "treeSelect",
761
768
  name: "PFormTreeSelect"
762
- }), It = C({
769
+ }), It = s({
763
770
  InputComp: gt,
764
771
  valueType: "checkbox",
765
772
  name: "PFromCheckbox"
766
- }), Rt = C({
773
+ }), Rt = s({
767
774
  InputComp: Pt,
768
775
  valueType: "radio",
769
776
  name: "PFromRadio"
770
- }), Vt = C({
777
+ }), Vt = s({
771
778
  InputComp: Xe,
772
779
  valueType: "switch",
773
780
  name: "PFromSwitch"
774
- }), Mt = C({
781
+ }), Mt = s({
775
782
  InputComp: Ye,
776
783
  valueType: "cascader",
777
784
  name: "PFormCascader"
778
785
  }), Be = S({
779
786
  props: {
780
- ...i(de.props, "label", "prop"),
787
+ ...i(ce.props, "label", "prop"),
781
788
  title: {
782
789
  type: String
783
790
  },
@@ -794,50 +801,50 @@ const fe = () => ({
794
801
  setup: (e, {
795
802
  slots: t
796
803
  }) => {
797
- const u = ({
804
+ const o = ({
798
805
  row: n,
799
- column: o,
800
- $index: d
806
+ column: l,
807
+ $index: c
801
808
  }) => {
802
809
  var P;
803
- const l = n, b = d, g = {
804
- ...o,
805
- title: o.label,
806
- dataIndex: o.property
807
- }, f = T(n, g.dataIndex), p = {
810
+ const r = n, b = c, g = {
811
+ ...l,
812
+ title: l.label,
813
+ dataIndex: l.property
814
+ }, f = T(n, g.dataIndex), C = {
808
815
  value: f,
809
816
  text: f,
810
- record: l,
817
+ record: r,
811
818
  column: g,
812
819
  index: b
813
- }, v = (P = t.bodyCell) == null ? void 0 : P.call(t, p);
814
- return v || (e.customRender ? e.customRender(p) : f);
815
- }, r = {
820
+ }, v = (P = t.bodyCell) == null ? void 0 : P.call(t, C);
821
+ return v || (e.customRender ? e.customRender(C) : f);
822
+ }, u = {
816
823
  header: ({
817
824
  column: n,
818
- $index: o
825
+ $index: l
819
826
  }) => {
820
827
  var f;
821
- const d = o, l = n.label, b = {
828
+ const c = l, r = n.label, b = {
822
829
  ...n,
823
- title: l,
830
+ title: r,
824
831
  dataIndex: n.property
825
832
  };
826
833
  return ((f = t.headerCell) == null ? void 0 : f.call(t, {
827
- title: l,
834
+ title: r,
828
835
  column: b,
829
- index: d
830
- })) || l;
836
+ index: c
837
+ })) || r;
831
838
  }
832
839
  };
833
- return (!e.children || A(e.children) <= 0) && (r.default = u), () => c(de, m(i(e, "title", "dataIndex", "prop", "customRender", "children"), {
840
+ return (!e.children || A(e.children) <= 0) && (u.default = o), () => d(ce, m(i(e, "title", "dataIndex", "prop", "customRender", "children"), {
834
841
  prop: e.dataIndex,
835
842
  label: e.title
836
843
  }), {
837
- default: () => [A(e.children) > 0 && k(e.children, (n) => c(Be, m({
844
+ default: () => [A(e.children) > 0 && k(e.children, (n) => d(Be, m({
838
845
  key: n.dataIndex
839
846
  }, n), t))],
840
- ...r
847
+ ...u
841
848
  });
842
849
  }
843
850
  }), Bt = ["clearSelection", "getSelectionRows", "toggleRowSelection", "toggleAllSelection", "toggleRowExpansion", "setCurrentRow", "clearSort", "clearFilter", "doLayout", "sort", "scrollTo", "setScrollTop", "setScrollLeft"], Ne = S({
@@ -855,21 +862,21 @@ const fe = () => ({
855
862
  },
856
863
  setup: (e, {
857
864
  slots: t,
858
- expose: u
865
+ expose: o
859
866
  }) => {
860
- const a = s(), r = Te("table");
861
- return u(pe(Bt, a)), () => c(ie, m({
867
+ const a = p(), u = Te("table");
868
+ return o(Ce(Bt, a)), () => d(ie, m({
862
869
  ref: a,
863
- id: r
870
+ id: u
864
871
  }, i(e, "columns", "dataSource", "loading"), {
865
872
  data: e.dataSource || e.data
866
873
  }), {
867
874
  default: () => {
868
- var n, o;
869
- return [(n = t.start) == null ? void 0 : n.call(t), k(e.columns, (d) => c(Be, m({
870
- key: d.dataIndex
871
- }, d), t)), (o = t.default) == null ? void 0 : o.call(t), e.loading && c(Ke, {
872
- target: r,
875
+ var n, l;
876
+ return [(n = t.start) == null ? void 0 : n.call(t), k(e.columns, (c) => d(Be, m({
877
+ key: c.dataIndex
878
+ }, c), t)), (l = t.default) == null ? void 0 : l.call(t), e.loading && d(Ke, {
879
+ target: u,
873
880
  loading: !0
874
881
  }, null)];
875
882
  },
@@ -890,7 +897,7 @@ const fe = () => ({
890
897
  },
891
898
  setup: (e, {
892
899
  slots: t
893
- }) => () => c(M, e, t)
900
+ }) => () => d(M, e, t)
894
901
  });
895
902
  V.props = {
896
903
  ...q.props,
@@ -942,7 +949,7 @@ const jt = {
942
949
  [y.ModalKey]: Ie,
943
950
  [y.PaginationKey]: vt,
944
951
  [y.PopoverKey]: bt,
945
- [y.CheckboxKey]: Ce,
952
+ [y.CheckboxKey]: se,
946
953
  [y.FormKey]: ft,
947
954
  [y.FormItemKey]: xe,
948
955
  [y.TableKey]: Ne,
@@ -963,7 +970,7 @@ const jt = {
963
970
  treeSelect: _,
964
971
  cascader: _
965
972
  }, qt = {
966
- text: Ct,
973
+ text: st,
967
974
  digit: kt,
968
975
  digitRange: Ft,
969
976
  date: xt,
@@ -977,7 +984,7 @@ const jt = {
977
984
  };
978
985
  export {
979
986
  Ee as FormMethods,
980
- pt as InputNumberRange,
987
+ Ct as InputNumberRange,
981
988
  gt as ProCheckbox,
982
989
  ft as ProForm,
983
990
  Mt as ProFormCascader,
@@ -988,7 +995,7 @@ export {
988
995
  Rt as ProFormRadio,
989
996
  Tt as ProFormSelect,
990
997
  Vt as ProFormSwitch,
991
- Ct as ProFormText,
998
+ st as ProFormText,
992
999
  kt as ProFormTextNumber,
993
1000
  Et as ProFormTimePicker,
994
1001
  Kt as ProFormTreeSelect,
@@ -1006,8 +1013,8 @@ export {
1006
1013
  Ot as ProTree,
1007
1014
  Me as ProUploader,
1008
1015
  Bt as TableMethods,
1009
- st as UploadMethods,
1010
- C as createFormItemComponent,
1016
+ pt as UploadMethods,
1017
+ s as createFormItemComponent,
1011
1018
  Te as createLoadingId,
1012
1019
  jt as elementMap,
1013
1020
  qt as formElementMap