@vue-start/element-pro 0.2.37 → 0.2.39

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 $e, createFormItemCompFn as ut, useProConfig as ue, createExposeObj as L, useGetCompByKey as qe, ElementKeys as b, ProForm as A, ProSearchForm as X, ProFormList as ye, ProTable as Y, ProDesc as ee, ProCurdDesc as me, ProCurdForm as se, ProCurdModal as ge, ProUploaderText as ve, ProTip as be, ProCurd as ct, ProList as dt, ProPage as it, ProOperate as ft, ProShowText as pe, ProShowDigit as yt, ProShowDate as mt, ProShowOptions as J, ProShowTree as Se } from "@vue-start/pro";
2
- import { ElFormItem as te, ElForm as ae, ElLoading as Ge, ElDialog as Pe, ElDrawer as he, ElPagination as Ce, ElPopover as Ke, ElCheckboxGroup as Ee, ElCheckboxButton as st, ElCheckbox as We, ElRadioGroup as ke, ElRadioButton as gt, ElRadio as vt, ElSelect as Fe, ElOption as bt, ElTabs as xe, ElTabPane as pt, ElMenu as G, ElUpload as Te, useFormItem as St, ElInputNumber as q, ElTree as Re, ElDropdown as we, ElDropdownMenu as Pt, ElDropdownItem as ht, ElInput as Ct, ElDatePicker as Kt, ElTimePicker as Et, ElTreeSelect as kt, ElSwitch as Ft, ElCascader as xt, ElColorPicker as Tt, ElTableColumn as ne, ElTable as Me, ElButton as le, ElDescriptions as _e, ElTooltip as Ze, ElRow as Rt, ElCol as wt, ElDescriptionsItem as Mt, ElScrollbar as It, ElEmpty as Vt } from "element-plus";
3
- import { defineComponent as E, createVNode as c, mergeProps as s, reactive as Bt, ref as F, toRaw as Nt, computed as x, Fragment as He, isVNode as Ot, nextTick as Dt } from "vue";
4
- import { keys as I, omit as p, isBoolean as W, isString as Lt, debounce as Ut, map as M, size as D, pick as ce, get as N, isNumber as U, isArray as Je, filter as re, reduce as Q, isFunction as zt, forEach as Ie, find as At, last as jt } from "lodash";
5
- import { useEffect as _, generateId as $t, useWatch as j, convertCollection as qt, isValidFileType as Gt, convertFileSize as Ve, isSame as Wt, getNameMapByMergeOpts as _t } from "@vue-start/hooks";
6
- const Be = () => ({
1
+ import { createExpose as Ye, createFormItemCompFn as bt, useProConfig as fe, createExposeObj as L, useGetCompByKey as et, ElementKeys as C, ProForm as W, ProSearchForm as ae, ProFormList as he, ProTable as le, ProDesc as ne, ProCurdDesc as ve, ProCurdForm as be, ProCurdModal as Se, ProUploaderText as pe, ProTip as Pe, ProCurd as St, ProList as pt, ProPage as Pt, ProOperate as Ct, ProShowText as Ce, ProShowDigit as Vt, ProShowDate as xt, ProShowOptions as ee, ProShowTree as Ve } from "@vue-start/pro";
2
+ import { ElFormItem as re, ElForm as oe, ElLoading as tt, ElDialog as xe, ElDrawer as Ke, ElPagination as ke, ElPopover as we, ElCheckboxGroup as Fe, ElCheckboxButton as Kt, ElCheckbox as at, ElRadioGroup as Ee, ElRadioButton as kt, ElRadio as wt, ElSelect as Te, ElOption as Ft, ElTabs as Re, ElTabPane as Et, ElMenu as _, ElUpload as Me, useFormItem as Tt, ElInputNumber as G, ElTree as Ne, ElDropdown as $e, ElDropdownMenu as Rt, ElDropdownItem as Mt, ElTreeSelect as Ie, ElCascader as Be, ElInput as Nt, ElDatePicker as $t, ElTimePicker as It, ElSwitch as Bt, ElColorPicker as Ot, ElTableColumn as ue, ElTable as Oe, ElButton as de, ElTableV2 as Ae, ElDescriptions as lt, ElTooltip as nt, ElRow as At, ElCol as Dt, ElDescriptionsItem as Lt, ElScrollbar as Ut, ElEmpty as zt } from "element-plus";
3
+ import { defineComponent as w, createVNode as f, mergeProps as g, reactive as rt, ref as T, toRaw as jt, computed as x, Fragment as ot, isVNode as Wt, nextTick as Ht } from "vue";
4
+ import { keys as M, omit as b, isBoolean as Z, isString as qt, debounce as Gt, map as F, get as E, size as D, pick as J, isNumber as U, isArray as j, filter as ce, last as ie, reduce as te, isFunction as _t, forEach as De, find as Zt } from "lodash";
5
+ import { useEffect as Q, generateId as Jt, useWatch as H, parseValue as X, formatValue as Y, convertCollection as Qt, isValidFileType as Xt, convertFileSize as Le, createExposeObj as ut, findTreeItem as Ue, isSame as Yt, getNameMapByMergeOpts as ea, useUpdateKey as ta, useResizeObserver as aa } from "@vue-start/hooks";
6
+ const ze = () => ({
7
7
  name: {
8
8
  type: [String, Array]
9
9
  }
10
- }), Qe = E({
10
+ }), dt = w({
11
11
  props: {
12
- ...te.props,
13
- ...Be()
12
+ ...re.props,
13
+ ...ze()
14
14
  },
15
15
  setup: (e, {
16
16
  slots: t
17
17
  }) => {
18
- const u = I(Be());
19
- return () => c(te, s(p(e, ...u, "name", "prop"), {
18
+ const d = M(ze());
19
+ return () => f(re, g(b(e, ...d, "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
- }), Xe = ["clearValidate", "resetFields", "scrollToField", "validate", "validateField", "submit"], Zt = E({
26
+ }), ct = ["clearValidate", "resetFields", "scrollToField", "validate", "validateField", "submit"], la = w({
27
27
  props: {
28
- ...ae.props,
28
+ ...oe.props,
29
29
  hideRequiredMark: {
30
30
  type: [Boolean, Object],
31
31
  default: void 0
@@ -33,30 +33,30 @@ const Be = () => ({
33
33
  },
34
34
  setup: (e, {
35
35
  slots: t,
36
- emit: u,
37
- expose: a
36
+ emit: d,
37
+ expose: l
38
38
  }) => {
39
- const r = e.model || Bt({}), l = F();
40
- return _(() => {
41
- !l.value || (l.value.submit = () => {
42
- var n;
43
- (n = l.value) == null || n.validate((d, o) => {
44
- d ? u("finish", Nt(r)) : u("finishFailed", o);
39
+ const u = e.model || rt({}), a = T();
40
+ return Q(() => {
41
+ !a.value || (a.value.submit = () => {
42
+ var o;
43
+ (o = a.value) == null || o.validate((y, c) => {
44
+ y ? d("finish", jt(u)) : d("finishFailed", c);
45
45
  });
46
46
  });
47
- }, []), a($e(Xe, l)), () => c(ae, s({
48
- ref: l
49
- }, p(e, "model"), {
50
- hideRequiredAsterisk: W(e.hideRequiredMark) ? e.hideRequiredMark : e.hideRequiredAsterisk,
51
- model: r
47
+ }, []), l(Ye(ct, a)), () => f(oe, g({
48
+ ref: a
49
+ }, b(e, "model"), {
50
+ hideRequiredAsterisk: Z(e.hideRequiredMark) ? e.hideRequiredMark : e.hideRequiredAsterisk,
51
+ model: u
52
52
  }), t);
53
53
  }
54
- }), V = ut(Qe, (e, t, u) => ({
54
+ }), I = bt(dt, (e, t, d) => ({
55
55
  modelValue: e,
56
56
  "onUpdate:modelValue": t,
57
57
  clearable: !0,
58
- disabled: u
59
- })), Ye = (e = "comp") => e + "-" + $t(), Ht = () => ({
58
+ disabled: d
59
+ })), it = (e = "comp") => e + "-" + Jt(), na = () => ({
60
60
  loading: {
61
61
  type: Boolean
62
62
  },
@@ -84,22 +84,22 @@ const Be = () => ({
84
84
  customClass: {
85
85
  type: String
86
86
  }
87
- }), et = E({
87
+ }), mt = w({
88
88
  props: {
89
- ...Ht()
89
+ ...na()
90
90
  },
91
91
  setup: (e, {
92
92
  slots: t
93
93
  }) => {
94
- const u = Ye();
95
- return _(() => {
94
+ const d = it();
95
+ return Q(() => {
96
96
  if (!e.loading)
97
97
  return;
98
- let a = e.target;
99
- if (t.default ? a = document.getElementById(u) : e.target && Lt(e.target) && (a = document.querySelector("#" + e.target)), !a)
98
+ let l = e.target;
99
+ if (t.default ? l = document.getElementById(d) : e.target && qt(e.target) && (l = document.querySelector("#" + e.target)), !l)
100
100
  return;
101
- const r = Ge.service({
102
- target: a,
101
+ const u = tt.service({
102
+ target: l,
103
103
  body: e.body,
104
104
  fullscreen: e.fullscreen,
105
105
  lock: e.lock,
@@ -109,13 +109,13 @@ const Be = () => ({
109
109
  customClass: e.customClass
110
110
  });
111
111
  return () => {
112
- r && r.close();
112
+ u && u.close();
113
113
  };
114
- }, () => e.loading), () => t.default ? c("div", {
115
- id: u
114
+ }, () => e.loading), () => t.default ? f("div", {
115
+ id: d
116
116
  }, [t.default()]) : null;
117
117
  }
118
- }), oe = () => ({
118
+ }), me = () => ({
119
119
  clsName: {
120
120
  type: String,
121
121
  default: "pro-modal"
@@ -146,9 +146,9 @@ const Be = () => ({
146
146
  type: Boolean,
147
147
  default: !1
148
148
  }
149
- }), tt = E({
149
+ }), ft = w({
150
150
  props: {
151
- ...Pe.props,
151
+ ...xe.props,
152
152
  appendToBody: {
153
153
  type: Boolean,
154
154
  default: !0
@@ -157,65 +157,65 @@ const Be = () => ({
157
157
  type: Boolean,
158
158
  default: !0
159
159
  },
160
- ...oe()
160
+ ...me()
161
161
  },
162
162
  setup: (e, {
163
163
  slots: t,
164
- emit: u,
165
- expose: a
164
+ emit: d,
165
+ expose: l
166
166
  }) => {
167
167
  const {
168
- t: r
169
- } = ue(), l = F();
170
- a(L(l));
171
- const n = (P) => {
172
- u("update:modelValue", P), u("update:visible", P), P || (u("cancel"), u("closed"));
173
- }, d = () => {
174
- n(!1);
175
- }, o = () => {
176
- u("ok");
177
- }, f = qe(), S = f(b.ProOperateKey), g = f(b.ScrollKey), K = x(() => [{
168
+ t: u
169
+ } = fe(), a = T();
170
+ l(L(a));
171
+ const o = (s) => {
172
+ d("update:modelValue", s), d("update:visible", s), s || (d("cancel"), d("closed"));
173
+ }, y = () => {
174
+ o(!1);
175
+ }, c = () => {
176
+ d("ok");
177
+ }, n = et(), m = n(C.ProOperateKey), r = n(C.ScrollKey), i = x(() => [{
178
178
  value: "cancel",
179
- label: r.value("cancel"),
180
- onClick: d
179
+ label: u.value("cancel"),
180
+ onClick: y
181
181
  }, {
182
182
  value: "ok",
183
- label: r.value("confirm"),
183
+ label: u.value("confirm"),
184
184
  loading: e.confirmLoading,
185
185
  extraProps: {
186
186
  type: "primary"
187
187
  },
188
- onClick: o
189
- }]), k = I(oe());
188
+ onClick: c
189
+ }]), S = M(me());
190
190
  return () => {
191
- const P = [e.clsName];
192
- return e.useScroll && P.push("scroll"), c(Pe, s({
193
- class: P,
194
- ref: l
195
- }, p(e, ...k), {
196
- closeOnClickModal: W(e.maskClosable) ? e.maskClosable : e.closeOnClickModal,
191
+ const s = [e.clsName];
192
+ return e.useScroll && s.push("scroll"), f(xe, g({
193
+ class: s,
194
+ ref: a
195
+ }, b(e, ...S), {
196
+ closeOnClickModal: Z(e.maskClosable) ? e.maskClosable : e.closeOnClickModal,
197
197
  modelValue: e.visible || e.modelValue,
198
- "onUpdate:modelValue": n
198
+ "onUpdate:modelValue": o
199
199
  }), {
200
- footer: e.footer === !1 ? void 0 : () => c(S, {
201
- items: K.value
200
+ footer: e.footer === !1 ? void 0 : () => f(m, {
201
+ items: i.value
202
202
  }, null),
203
203
  ...t,
204
204
  default: () => {
205
- var T;
206
- return e.useScroll ? c(g, s({
205
+ var K;
206
+ return e.useScroll ? f(r, g({
207
207
  class: `${e.clsName}-scroll`
208
208
  }, e.scrollProps), {
209
209
  default: () => {
210
- var B;
211
- return [(B = t.default) == null ? void 0 : B.call(t)];
210
+ var R;
211
+ return [(R = t.default) == null ? void 0 : R.call(t)];
212
212
  }
213
- }) : (T = t.default) == null ? void 0 : T.call(t);
213
+ }) : (K = t.default) == null ? void 0 : K.call(t);
214
214
  }
215
215
  });
216
216
  };
217
217
  }
218
- }), Jt = () => ({
218
+ }), ra = () => ({
219
219
  clsName: {
220
220
  type: String,
221
221
  default: "pro-drawer"
@@ -242,10 +242,10 @@ const Be = () => ({
242
242
  type: Boolean,
243
243
  default: !1
244
244
  }
245
- }), Qt = E({
245
+ }), oa = w({
246
246
  props: {
247
- ...he.props,
248
- ...Jt(),
247
+ ...Ke.props,
248
+ ...ra(),
249
249
  appendToBody: {
250
250
  type: Boolean,
251
251
  default: !0
@@ -257,62 +257,62 @@ const Be = () => ({
257
257
  },
258
258
  setup: (e, {
259
259
  slots: t,
260
- emit: u,
261
- expose: a
260
+ emit: d,
261
+ expose: l
262
262
  }) => {
263
263
  const {
264
- t: r
265
- } = ue(), l = F();
266
- a(L(l));
267
- const n = (P) => {
268
- u("update:modelValue", P), u("update:visible", P), P || u("cancel");
269
- }, d = () => {
270
- n(!1);
271
- }, o = () => {
272
- u("ok");
273
- }, f = qe(), S = f(b.ProOperateKey), g = f(b.ScrollKey), K = x(() => [{
264
+ t: u
265
+ } = fe(), a = T();
266
+ l(L(a));
267
+ const o = (s) => {
268
+ d("update:modelValue", s), d("update:visible", s), s || d("cancel");
269
+ }, y = () => {
270
+ o(!1);
271
+ }, c = () => {
272
+ d("ok");
273
+ }, n = et(), m = n(C.ProOperateKey), r = n(C.ScrollKey), i = x(() => [{
274
274
  value: "cancel",
275
- label: r.value("cancel"),
276
- onClick: d
275
+ label: u.value("cancel"),
276
+ onClick: y
277
277
  }, {
278
278
  value: "ok",
279
- label: r.value("confirm"),
279
+ label: u.value("confirm"),
280
280
  loading: e.confirmLoading,
281
281
  extraProps: {
282
282
  type: "primary"
283
283
  },
284
- onClick: o
285
- }]), k = I(oe());
284
+ onClick: c
285
+ }]), S = M(me());
286
286
  return () => {
287
- const P = [e.clsName];
288
- return e.useScroll && P.push("scroll"), c(he, s({
289
- class: P,
290
- ref: l
291
- }, p(e, k), {
287
+ const s = [e.clsName];
288
+ return e.useScroll && s.push("scroll"), f(Ke, g({
289
+ class: s,
290
+ ref: a
291
+ }, b(e, S), {
292
292
  modelValue: e.visible || e.modelValue,
293
- "onUpdate:modelValue": n
293
+ "onUpdate:modelValue": o
294
294
  }), {
295
- footer: e.footer === !1 ? void 0 : () => c(S, {
296
- items: K.value
295
+ footer: e.footer === !1 ? void 0 : () => f(m, {
296
+ items: i.value
297
297
  }, null),
298
298
  ...t,
299
299
  default: () => {
300
- var T;
301
- return e.useScroll ? c(g, s({
300
+ var K;
301
+ return e.useScroll ? f(r, g({
302
302
  class: `${e.clsName}-scroll`
303
303
  }, e.scrollProps), {
304
304
  default: () => {
305
- var B;
306
- return [(B = t.default) == null ? void 0 : B.call(t)];
305
+ var R;
306
+ return [(R = t.default) == null ? void 0 : R.call(t)];
307
307
  }
308
- }) : (T = t.default) == null ? void 0 : T.call(t);
308
+ }) : (K = t.default) == null ? void 0 : K.call(t);
309
309
  }
310
310
  });
311
311
  };
312
312
  }
313
- }), Xt = E({
313
+ }), ua = w({
314
314
  props: {
315
- ...Ce.props,
315
+ ...ke.props,
316
316
  page: {
317
317
  type: Number,
318
318
  default: 1
@@ -320,42 +320,45 @@ const Be = () => ({
320
320
  },
321
321
  setup: (e, {
322
322
  slots: t,
323
- emit: u
323
+ emit: d
324
324
  }) => {
325
- const a = F(e.page), r = F(e.pageSize);
326
- j(() => {
327
- a.value !== e.page && (a.value = e.page);
328
- }, () => e.page), j(() => {
329
- r.value !== e.pageSize && (r.value = e.pageSize);
325
+ const l = T(e.page), u = T(e.pageSize);
326
+ H(() => {
327
+ l.value !== e.page && (l.value = e.page);
328
+ }, () => e.page), H(() => {
329
+ u.value !== e.pageSize && (u.value = e.pageSize);
330
330
  }, () => e.pageSize);
331
- const l = Ut(() => {
332
- u("composeChange", a.value, r.value);
333
- }, 300), n = () => {
334
- l(), u("update:page", a.value);
335
- }, d = () => {
336
- l(), u("update:pageSize", r.value);
331
+ const a = Gt(() => {
332
+ d("composeChange", l.value, u.value);
333
+ }, 300), o = () => {
334
+ a(), d("update:page", l.value);
335
+ }, y = () => {
336
+ a(), d("update:pageSize", u.value);
337
337
  };
338
- return () => c(Ce, s({
339
- currentPage: a.value,
340
- "onUpdate:currentPage": (o) => a.value = o,
341
- pageSize: r.value,
342
- "onUpdate:pageSize": (o) => r.value = o,
343
- onCurrentChange: n,
344
- onSizeChange: d
345
- }, p(e, "currentPage", "pageSize")), t);
338
+ return () => f(ke, g({
339
+ currentPage: l.value,
340
+ "onUpdate:currentPage": (c) => l.value = c,
341
+ pageSize: u.value,
342
+ "onUpdate:pageSize": (c) => u.value = c,
343
+ onCurrentChange: o,
344
+ onSizeChange: y
345
+ }, b(e, "currentPage", "pageSize")), t);
346
346
  }
347
- }), Yt = E({
347
+ }), da = w({
348
348
  props: {
349
- ...Ke.props
349
+ ...we.props
350
350
  },
351
351
  setup: (e, {
352
352
  slots: t
353
- }) => () => c(Ke, e, {
353
+ }) => () => f(we, e, {
354
354
  reference: t.default,
355
355
  default: t.content
356
356
  })
357
- }), Ne = () => ({
357
+ }), je = () => ({
358
358
  options: Array,
359
+ fieldNames: {
360
+ type: Object
361
+ },
359
362
  buttonStyle: {
360
363
  type: String,
361
364
  default: "default"
@@ -363,50 +366,89 @@ const Be = () => ({
363
366
  optionType: {
364
367
  type: String,
365
368
  default: "default"
369
+ },
370
+ expMethods: {
371
+ type: Array,
372
+ default: () => ["focus", "blur", "selectedLabel"]
373
+ },
374
+ separator$: {
375
+ type: String
376
+ },
377
+ parseValue$: {
378
+ type: Function
379
+ },
380
+ formatValue$: {
381
+ type: Function
366
382
  }
367
- }), ea = E({
383
+ }), ca = w({
368
384
  props: {
369
- ...Ee.props,
370
- ...Ne()
385
+ ...Fe.props,
386
+ ...je()
371
387
  },
372
388
  setup: (e, {
373
389
  slots: t,
374
- emit: u,
375
- expose: a
390
+ emit: d,
391
+ expose: l
376
392
  }) => {
377
- const r = F();
378
- a(L(r));
379
- const l = I(Ne());
380
- return () => c(Ee, s({
381
- ref: r
382
- }, p(e, l), {
383
- "onUpdate:modelValue": (n) => {
384
- u("update:modelValue", n || void 0);
393
+ const u = T();
394
+ l(L(u, e.expMethods));
395
+ const a = x(() => F(e.options, (n) => {
396
+ var m, r, i;
397
+ return {
398
+ ...n,
399
+ label: E(n, ((m = e.fieldNames) == null ? void 0 : m.label) || "label"),
400
+ value: E(n, ((r = e.fieldNames) == null ? void 0 : r.value) || "value"),
401
+ disabled: E(n, ((i = e.fieldNames) == null ? void 0 : i.label) || "disabled")
402
+ };
403
+ })), o = x(() => {
404
+ const n = e.modelValue;
405
+ return e.parseValue$ ? e.parseValue$(n, e) : X(n, {
406
+ multiple: !0,
407
+ separator: e.separator$
408
+ });
409
+ }), y = (n) => {
410
+ if (e.formatValue$) {
411
+ d("update:modelValue", e.formatValue$(n, e));
412
+ return;
413
+ }
414
+ if (e.separator$) {
415
+ d("update:modelValue", Y(n, {
416
+ multiple: !0,
417
+ separator: e.separator$
418
+ }));
419
+ return;
385
420
  }
421
+ d("update:modelValue", n);
422
+ }, c = [...M(je()), "modelValue"];
423
+ return () => f(Fe, g({
424
+ ref: u
425
+ }, b(e, c), {
426
+ modelValue: o.value,
427
+ "onUpdate:modelValue": (n) => y(n)
386
428
  }), {
387
429
  default: () => {
388
- var n, d;
389
- return [(n = t.start) == null ? void 0 : n.call(t), M(e.options, (o) => {
430
+ var n, m;
431
+ return [(n = t.start) == null ? void 0 : n.call(t), F(a.value, (r) => {
390
432
  var S;
391
- const f = (S = t.label) == null ? void 0 : S.call(t, o);
392
- return e.optionType === "button" || e.buttonStyle === "button" ? c(st, s({
393
- key: o.value
394
- }, p(o, "value"), {
395
- label: o.value
433
+ const i = (S = t.label) == null ? void 0 : S.call(t, r);
434
+ return e.optionType === "button" || e.buttonStyle === "button" ? f(Kt, g({
435
+ key: r.value
436
+ }, b(r, "value"), {
437
+ label: r.value
396
438
  }), {
397
- default: () => [f || o.label]
398
- }) : c(We, s({
399
- key: o.value
400
- }, o, {
401
- label: o.value
439
+ default: () => [i || r.label]
440
+ }) : f(at, g({
441
+ key: r.value
442
+ }, r, {
443
+ label: r.value
402
444
  }), {
403
- default: () => [f || o.label]
445
+ default: () => [i || r.label]
404
446
  });
405
- }), (d = t.default) == null ? void 0 : d.call(t)];
447
+ }), (m = t.default) == null ? void 0 : m.call(t)];
406
448
  }
407
449
  });
408
450
  }
409
- }), Oe = () => ({
451
+ }), We = () => ({
410
452
  options: {
411
453
  type: Array
412
454
  },
@@ -418,116 +460,158 @@ const Be = () => ({
418
460
  type: String,
419
461
  default: "default"
420
462
  }
421
- }), ta = E({
463
+ }), ia = w({
422
464
  props: {
423
- ...ke.props,
424
- ...Oe()
465
+ ...Ee.props,
466
+ ...We()
425
467
  },
426
468
  setup: (e, {
427
469
  slots: t,
428
- emit: u,
429
- expose: a
470
+ emit: d,
471
+ expose: l
430
472
  }) => {
431
- const r = F();
432
- a(L(r));
433
- const l = I(Oe());
434
- return () => c(ke, s({
435
- ref: r
436
- }, p(e, l), {
437
- "onUpdate:modelValue": (n) => {
438
- u("update:modelValue", n);
473
+ const u = T();
474
+ l(L(u));
475
+ const a = M(We());
476
+ return () => f(Ee, g({
477
+ ref: u
478
+ }, b(e, a), {
479
+ "onUpdate:modelValue": (o) => {
480
+ d("update:modelValue", o);
439
481
  }
440
482
  }), {
441
483
  default: () => {
442
- var n, d;
443
- return [(n = t.start) == null ? void 0 : n.call(t), M(e.options, (o) => {
444
- var S;
445
- const f = (S = t.label) == null ? void 0 : S.call(t, o);
446
- return e.optionType === "button" || e.buttonStyle === "button" ? c(gt, s({
447
- key: o.value
448
- }, p(o, "value"), {
449
- label: o.value
484
+ var o, y;
485
+ return [(o = t.start) == null ? void 0 : o.call(t), F(e.options, (c) => {
486
+ var m;
487
+ const n = (m = t.label) == null ? void 0 : m.call(t, c);
488
+ return e.optionType === "button" || e.buttonStyle === "button" ? f(kt, g({
489
+ key: c.value
490
+ }, b(c, "value"), {
491
+ label: c.value
450
492
  }), {
451
- default: () => [f || o.label]
452
- }) : c(vt, s({
453
- key: o.value
454
- }, p(o, "value"), {
455
- label: o.value
493
+ default: () => [n || c.label]
494
+ }) : f(wt, g({
495
+ key: c.value
496
+ }, b(c, "value"), {
497
+ label: c.value
456
498
  }), {
457
- default: () => [f || o.label]
499
+ default: () => [n || c.label]
458
500
  });
459
- }), (d = t.default) == null ? void 0 : d.call(t)];
501
+ }), (y = t.default) == null ? void 0 : y.call(t)];
460
502
  }
461
503
  });
462
504
  }
463
- }), De = () => ({
464
- options: Array
465
- }), aa = E({
505
+ }), He = () => ({
506
+ options: Array,
507
+ fieldNames: {
508
+ type: Object
509
+ },
510
+ expMethods: {
511
+ type: Array,
512
+ default: () => ["focus", "blur", "selectedLabel"]
513
+ },
514
+ separator$: {
515
+ type: String
516
+ },
517
+ parseValue$: {
518
+ type: Function
519
+ },
520
+ formatValue$: {
521
+ type: Function
522
+ }
523
+ }), ma = w({
466
524
  props: {
467
- ...Fe.props,
468
- ...De()
525
+ ...Te.props,
526
+ ...He()
469
527
  },
470
528
  setup: (e, {
471
529
  slots: t,
472
- emit: u,
473
- expose: a
530
+ emit: d,
531
+ expose: l
474
532
  }) => {
475
- const r = F();
476
- a(L(r));
477
- const l = I(De());
478
- return () => c(Fe, s({
479
- ref: r
480
- }, p(e, l), {
481
- "onUpdate:modelValue": (n) => {
482
- u("update:modelValue", n || void 0);
533
+ const u = T();
534
+ l(L(u, e.expMethods));
535
+ const a = x(() => F(e.options, (n) => {
536
+ var m, r, i;
537
+ return {
538
+ ...n,
539
+ label: E(n, ((m = e.fieldNames) == null ? void 0 : m.label) || "label"),
540
+ value: E(n, ((r = e.fieldNames) == null ? void 0 : r.value) || "value"),
541
+ disabled: E(n, ((i = e.fieldNames) == null ? void 0 : i.label) || "disabled")
542
+ };
543
+ })), o = x(() => {
544
+ const n = e.modelValue;
545
+ return e.parseValue$ ? e.parseValue$(n, e) : X(n, {
546
+ multiple: e.multiple,
547
+ separator: e.separator$
548
+ });
549
+ }), y = (n) => {
550
+ if (e.formatValue$) {
551
+ d("update:modelValue", e.formatValue$(n, e));
552
+ return;
553
+ }
554
+ if (e.separator$) {
555
+ d("update:modelValue", Y(n, {
556
+ multiple: e.multiple,
557
+ separator: e.separator$
558
+ }));
559
+ return;
483
560
  }
561
+ d("update:modelValue", n);
562
+ }, c = [...M(He()), "modelValue"];
563
+ return () => f(Te, g({
564
+ ref: u
565
+ }, b(e, c), {
566
+ modelValue: o.value,
567
+ "onUpdate:modelValue": (n) => y(n)
484
568
  }), {
485
569
  default: () => {
486
- var n, d;
487
- return [(n = t.start) == null ? void 0 : n.call(t), M(e.options, (o) => {
570
+ var n, m;
571
+ return [(n = t.start) == null ? void 0 : n.call(t), F(a.value, (r) => {
488
572
  var S;
489
- const f = (S = t.label) == null ? void 0 : S.call(t, o);
490
- return c(bt, s({
491
- key: o.value
492
- }, o), {
493
- default: () => [f || o.label]
573
+ const i = (S = t.label) == null ? void 0 : S.call(t, r);
574
+ return f(Ft, g({
575
+ key: r.value
576
+ }, r), {
577
+ default: () => [i || r.label]
494
578
  });
495
- }), (d = t.default) == null ? void 0 : d.call(t)];
579
+ }), (m = t.default) == null ? void 0 : m.call(t)];
496
580
  },
497
- ...p(t, "default")
581
+ ...b(t, "default")
498
582
  });
499
583
  }
500
- }), Ta = E({
584
+ }), za = w({
501
585
  props: {
502
- ...xe.props,
586
+ ...Re.props,
503
587
  options: {
504
588
  type: Array
505
589
  }
506
590
  },
507
591
  setup: (e, {
508
592
  slots: t,
509
- emit: u
510
- }) => () => c(xe, s(p(e, "options"), {
511
- "onUpdate:modelValue": (a) => {
512
- u("update:modelValue", a);
593
+ emit: d
594
+ }) => () => f(Re, g(b(e, "options"), {
595
+ "onUpdate:modelValue": (l) => {
596
+ d("update:modelValue", l);
513
597
  }
514
598
  }), {
515
599
  default: () => {
516
- var a, r;
517
- return [(a = t.start) == null ? void 0 : a.call(t), M(e.options, (l) => c(pt, s({
518
- key: l.value
519
- }, p(l, "value"), {
520
- name: l.value
600
+ var l, u;
601
+ return [(l = t.start) == null ? void 0 : l.call(t), F(e.options, (a) => f(Et, g({
602
+ key: a.value
603
+ }, b(a, "value"), {
604
+ name: a.value
521
605
  }), {
522
606
  label: () => {
523
- var n;
524
- return ((n = t.label) == null ? void 0 : n.call(t, l)) || l.label;
607
+ var o;
608
+ return ((o = t.label) == null ? void 0 : o.call(t, a)) || a.label;
525
609
  }
526
- })), (r = t.end) == null ? void 0 : r.call(t)];
610
+ })), (u = t.end) == null ? void 0 : u.call(t)];
527
611
  },
528
612
  ...t
529
613
  })
530
- }), de = {
614
+ }), ye = {
531
615
  convertSubMenuProps: {
532
616
  type: Function
533
617
  },
@@ -537,51 +621,51 @@ const Be = () => ({
537
621
  onMenuItemClick: {
538
622
  type: Function
539
623
  }
540
- }, at = I(de), nt = E({
624
+ }, yt = M(ye), st = w({
541
625
  inheritAttrs: !1,
542
626
  props: {
543
627
  menu: {
544
628
  type: Object
545
629
  },
546
- ...de
630
+ ...ye
547
631
  },
548
632
  setup: (e, {
549
633
  slots: t
550
634
  }) => {
551
- const u = () => {
552
- var a;
553
- (a = e.onMenuItemClick) == null || a.call(e, e.menu);
635
+ const d = () => {
636
+ var l;
637
+ (l = e.onMenuItemClick) == null || l.call(e, e.menu);
554
638
  };
555
639
  return () => {
556
- var r, l;
557
- const a = e.menu;
558
- return (a == null ? void 0 : a.children) && D(a.children) > 0 ? c(G.SubMenu, s({
559
- index: a == null ? void 0 : a.value
560
- }, (r = e.convertSubMenuProps) == null ? void 0 : r.call(e, a)), {
561
- default: () => [M(a.children, (n) => c(nt, s({
562
- menu: n
563
- }, ce(e, at)), t))],
640
+ var u, a;
641
+ const l = e.menu;
642
+ return (l == null ? void 0 : l.children) && D(l.children) > 0 ? f(_.SubMenu, g({
643
+ index: l == null ? void 0 : l.value
644
+ }, (u = e.convertSubMenuProps) == null ? void 0 : u.call(e, l)), {
645
+ default: () => [F(l.children, (o) => f(st, g({
646
+ menu: o
647
+ }, J(e, yt)), t))],
564
648
  title: () => {
565
- var n;
566
- return ((n = t.title) == null ? void 0 : n.call(t, a)) || (a == null ? void 0 : a.label);
649
+ var o;
650
+ return ((o = t.title) == null ? void 0 : o.call(t, l)) || (l == null ? void 0 : l.label);
567
651
  }
568
- }) : c(G.MenuItem, s({
569
- index: a == null ? void 0 : a.value
570
- }, (l = e.convertMenuItemProps) == null ? void 0 : l.call(e, a), {
571
- onClick: u
652
+ }) : f(_.MenuItem, g({
653
+ index: l == null ? void 0 : l.value
654
+ }, (a = e.convertMenuItemProps) == null ? void 0 : a.call(e, l), {
655
+ onClick: d
572
656
  }), {
573
657
  title: () => {
574
- var n;
575
- return ((n = t.title) == null ? void 0 : n.call(t, a)) || (a == null ? void 0 : a.label);
658
+ var o;
659
+ return ((o = t.title) == null ? void 0 : o.call(t, l)) || (l == null ? void 0 : l.label);
576
660
  },
577
661
  default: t.default ? () => {
578
- var n;
579
- return (n = t.default) == null ? void 0 : n.call(t, a);
662
+ var o;
663
+ return (o = t.default) == null ? void 0 : o.call(t, l);
580
664
  } : void 0
581
665
  });
582
666
  };
583
667
  }
584
- }), Le = () => ({
668
+ }), qe = () => ({
585
669
  activeKey: {
586
670
  type: String
587
671
  },
@@ -596,43 +680,43 @@ const Be = () => ({
596
680
  label: "label"
597
681
  }
598
682
  },
599
- ...de
600
- }), na = E({
683
+ ...ye
684
+ }), fa = w({
601
685
  props: {
602
- ...p(G.props, "defaultActive"),
603
- ...Le()
686
+ ...b(_.props, "defaultActive"),
687
+ ...qe()
604
688
  },
605
689
  setup: (e, {
606
690
  slots: t
607
691
  }) => {
608
- const u = F(e.activeKey);
609
- j(() => {
610
- e.activeKey !== u.value && (u.value = e.activeKey);
692
+ const d = T(e.activeKey);
693
+ H(() => {
694
+ e.activeKey !== d.value && (d.value = e.activeKey);
611
695
  }, () => e.activeKey);
612
- const a = x(() => {
613
- var l;
614
- return qt(e.options, (n) => {
615
- var f, S;
616
- const d = ((f = e.fieldNames) == null ? void 0 : f.value) || "value", o = ((S = e.fieldNames) == null ? void 0 : S.label) || "label";
696
+ const l = x(() => {
697
+ var a;
698
+ return Qt(e.options, (o) => {
699
+ var n, m;
700
+ const y = ((n = e.fieldNames) == null ? void 0 : n.value) || "value", c = ((m = e.fieldNames) == null ? void 0 : m.label) || "label";
617
701
  return {
618
- ...p(n, d, o),
619
- value: N(n, d),
620
- label: N(n, o)
702
+ ...b(o, y, c),
703
+ value: E(o, y),
704
+ label: E(o, c)
621
705
  };
622
706
  }, {
623
- children: ((l = e.fieldNames) == null ? void 0 : l.children) || "children",
707
+ children: ((a = e.fieldNames) == null ? void 0 : a.children) || "children",
624
708
  childrenName: "children"
625
709
  });
626
- }), r = I(Le());
627
- return () => c(G, s({
628
- defaultActive: u.value
629
- }, p(e, r)), {
630
- default: () => c(He, null, [M(a.value, (l) => c(nt, s({
631
- menu: l
632
- }, ce(e, at)), t))])
710
+ }), u = M(qe());
711
+ return () => f(_, g({
712
+ defaultActive: d.value
713
+ }, b(e, u)), {
714
+ default: () => f(ot, null, [F(l.value, (a) => f(st, g({
715
+ menu: a
716
+ }, J(e, yt)), t))])
633
717
  });
634
718
  }
635
- }), Ue = () => ({
719
+ }), Ge = () => ({
636
720
  modelValue: {
637
721
  type: Array,
638
722
  default: void 0
@@ -655,6 +739,9 @@ const Be = () => ({
655
739
  beforeUpload: {
656
740
  type: Function
657
741
  },
742
+ beforeUpload2: {
743
+ type: Function
744
+ },
658
745
  globalLoading: {
659
746
  type: [Boolean, Object],
660
747
  default: void 0
@@ -663,112 +750,114 @@ const Be = () => ({
663
750
  type: Function,
664
751
  default: void 0
665
752
  }
666
- }), la = ["abort", "submit", "clearFiles", "handleStart", "handleRemove"], lt = E({
753
+ }), ya = ["abort", "submit", "clearFiles", "handleStart", "handleRemove"], gt = w({
667
754
  props: {
668
- ...p(Te.props, "fileList"),
669
- ...Ue()
755
+ ...b(Me.props, "fileList"),
756
+ ...Ge()
670
757
  },
671
758
  setup: (e, {
672
759
  slots: t,
673
- expose: u,
674
- emit: a
760
+ expose: d,
761
+ emit: l
675
762
  }) => {
676
763
  const {
677
- showMsg: r,
678
- t: l
679
- } = ue(), n = F();
680
- u(L(n, la));
764
+ showMsg: u,
765
+ t: a
766
+ } = fe(), o = T();
767
+ d(L(o, ya));
681
768
  const {
682
- formItem: d
683
- } = St(), o = () => Je(e.modelValue) ? M(e.modelValue, (i) => {
684
- var y;
685
- return ((y = e.convertItemData) == null ? void 0 : y.call(e, i)) || i;
686
- }) : [], f = F(o());
687
- let S = !1;
688
- const g = () => {
689
- var y;
690
- S = !0;
691
- const i = re(f.value, (m) => m.status === "success");
692
- a("update:modelValue", M(i, (m) => {
693
- var C;
694
- return ((C = e.convertResponseData) == null ? void 0 : C.call(e, m)) || m;
695
- })), (y = d == null ? void 0 : d.validate) == null || y.call(d, "change");
769
+ formItem: y
770
+ } = Tt(), c = () => j(e.modelValue) ? F(e.modelValue, (v) => {
771
+ var p;
772
+ return ((p = e.convertItemData) == null ? void 0 : p.call(e, v)) || v;
773
+ }) : [], n = T(c());
774
+ let m = !1;
775
+ const r = () => {
776
+ var p;
777
+ m = !0;
778
+ const v = ce(n.value, (P) => P.status === "success");
779
+ l("update:modelValue", F(v, (P) => {
780
+ var k;
781
+ return ((k = e.convertResponseData) == null ? void 0 : k.call(e, P)) || P;
782
+ })), (p = y == null ? void 0 : y.validate) == null || p.call(y, "change");
696
783
  };
697
- j(() => {
698
- S || (f.value = o(), S = !1);
784
+ H(() => {
785
+ m || (n.value = c(), m = !1);
699
786
  }, () => e.modelValue);
700
- let K;
701
- const k = () => {
702
- e.globalLoading && (K = Ge.service({
787
+ let i;
788
+ const S = () => {
789
+ e.globalLoading && (i = tt.service({
703
790
  lock: !0,
704
- text: l.value("uploadingWatting"),
705
- ...W(e.globalLoading) ? {} : e.globalLoading
791
+ text: a.value("uploadingWatting"),
792
+ ...Z(e.globalLoading) ? {} : e.globalLoading
706
793
  }));
707
- }, P = () => {
708
- e.globalLoading && (K == null || K.close());
794
+ }, s = () => {
795
+ e.globalLoading && (i == null || i.close());
709
796
  };
710
- _(() => () => {
711
- P();
797
+ Q(() => () => {
798
+ s();
712
799
  }, []);
713
- const T = (i, y, m) => {
800
+ const K = (v, p, P) => {
714
801
  if (e.onErrorMsg) {
715
- e.onErrorMsg(i, y);
802
+ e.onErrorMsg(v, p);
716
803
  return;
717
804
  }
718
- r({
805
+ u({
719
806
  type: "error",
720
- message: y
807
+ message: p
721
808
  });
722
- }, B = (i) => {
723
- var y;
809
+ }, R = (v) => {
810
+ var p;
724
811
  if (e.beforeUpload)
725
- return e.beforeUpload(i);
726
- if (e.accept && !Gt(e.accept, i.name))
727
- return T("FileTypeError", `\u8BF7\u4E0A\u4F20\u6B63\u786E\u683C\u5F0F\uFF08${e.accept.replace(/,/g, "\uFF0C")}\uFF09\u7684\u6587\u4EF6`, {
812
+ return e.beforeUpload(v);
813
+ if (e.beforeUpload2 && !e.beforeUpload2(v))
814
+ return !1;
815
+ if (e.accept && !Xt(e.accept, v.name))
816
+ return K("FileTypeError", `\u8BF7\u4E0A\u4F20\u6B63\u786E\u683C\u5F0F\uFF08${e.accept.replace(/,/g, "\uFF0C")}\uFF09\u7684\u6587\u4EF6`, {
728
817
  accept: e.accept.replace(/,/g, "\uFF0C")
729
818
  }), !1;
730
- if (U(i.size)) {
731
- if (i.size <= 0)
732
- return T("FileSizeError-Zero", "\u4E0A\u4F20\u6587\u4EF6\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"), !1;
733
- if (U(e.maxSize) && i.size > e.maxSize)
734
- return T("FileSizeError-MaxSize", `\u8BF7\u4E0A\u4F20\u5C0F\u4E8E${Ve(e.maxSize)}\u7684\u6587\u4EF6`, {
735
- maxSize: Ve(e.maxSize)
819
+ if (U(v.size)) {
820
+ if (v.size <= 0)
821
+ return K("FileSizeError-Zero", "\u4E0A\u4F20\u6587\u4EF6\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"), !1;
822
+ if (U(e.maxSize) && v.size > e.maxSize)
823
+ return K("FileSizeError-MaxSize", `\u8BF7\u4E0A\u4F20\u5C0F\u4E8E${Le(e.maxSize)}\u7684\u6587\u4EF6`, {
824
+ maxSize: Le(e.maxSize)
736
825
  }), !1;
737
826
  }
738
- return (y = e.onStart) == null || y.call(e, i), k(), !0;
739
- }, Z = (i, y, m) => {
740
- var C;
741
- (C = e.onSuccess) == null || C.call(e, i, y, m), g(), P();
742
- }, H = (i, y, m) => {
743
- var C;
744
- (C = e.onError) == null || C.call(e, i, y, m), P(), T("UploadError", "\u4E0A\u4F20\u5931\u8D25");
745
- }, v = (i, y) => {
746
- var m;
747
- f.value = re(f.value, (C) => !(i.uid === C.uid && i.name === C.name)), (m = e.onRemove) == null || m.call(e, i, y), g();
748
- }, h = x(() => U(e.limit) ? e.limit > D(f.value) : !0), R = I(Ue());
827
+ return (p = e.onStart) == null || p.call(e, v), S(), !0;
828
+ }, O = (v, p, P) => {
829
+ var k;
830
+ (k = e.onSuccess) == null || k.call(e, v, p, P), r(), s();
831
+ }, B = (v, p, P) => {
832
+ var k;
833
+ (k = e.onError) == null || k.call(e, v, p, P), s(), K("UploadError", "\u4E0A\u4F20\u5931\u8D25");
834
+ }, h = (v, p) => {
835
+ var P;
836
+ n.value = ce(n.value, (k) => !(v.uid === k.uid && v.name === k.name)), (P = e.onRemove) == null || P.call(e, v, p), r();
837
+ }, V = x(() => U(e.limit) ? e.limit > D(n.value) : !0), N = M(Ge());
749
838
  return () => {
750
- var i, y;
751
- return c("div", {
752
- class: `pro-uploader ${h.value ? "" : "pro-uploader-limit"}`
753
- }, [(i = t.start) == null ? void 0 : i.call(t), c(Te, s({
754
- ref: n,
755
- fileList: f.value,
756
- "onUpdate:fileList": (m) => f.value = m
757
- }, p(e, "fileList", "onSuccess", "onError", "onRemove", "beforeUpload", ...R), {
758
- beforeUpload: B,
759
- onSuccess: Z,
760
- onError: H,
761
- onRemove: v
839
+ var v, p;
840
+ return f("div", {
841
+ class: `pro-uploader ${V.value ? "" : "pro-uploader-limit"}`
842
+ }, [(v = t.start) == null ? void 0 : v.call(t), f(Me, g({
843
+ ref: o,
844
+ fileList: n.value,
845
+ "onUpdate:fileList": (P) => n.value = P
846
+ }, b(e, "fileList", "onSuccess", "onError", "onRemove", "beforeUpload", ...N), {
847
+ beforeUpload: R,
848
+ onSuccess: O,
849
+ onError: B,
850
+ onRemove: h
762
851
  }), {
763
852
  default: () => {
764
- var m, C;
765
- return [h.value && c(He, null, [((m = t.default) == null ? void 0 : m.call(t)) || ((C = e.renderDom) == null ? void 0 : C.call(e))])];
853
+ var P, k;
854
+ return [V.value && f(ot, null, [((P = t.default) == null ? void 0 : P.call(t)) || ((k = e.renderDom) == null ? void 0 : k.call(e))])];
766
855
  },
767
- ...p(t, "default")
768
- }), (y = t.end) == null ? void 0 : y.call(t)]);
856
+ ...b(t, "default")
857
+ }), (p = t.end) == null ? void 0 : p.call(t)]);
769
858
  };
770
859
  }
771
- }), ze = () => ({
860
+ }), _e = () => ({
772
861
  modelValue: {
773
862
  type: Array
774
863
  },
@@ -785,54 +874,54 @@ const Be = () => ({
785
874
  divider: {
786
875
  type: Function
787
876
  }
788
- }), ra = E({
877
+ }), sa = w({
789
878
  props: {
790
- ...p(q.props, "modelValue"),
879
+ ...b(G.props, "modelValue"),
791
880
  controlsPosition: {
792
881
  type: String,
793
882
  default: "right"
794
883
  },
795
- ...ze()
884
+ ..._e()
796
885
  },
797
886
  setup: (e, {
798
887
  slots: t,
799
- emit: u
888
+ emit: d
800
889
  }) => {
801
- const a = F(N(e.modelValue, 0)), r = F(N(e.modelValue, 1));
802
- let l = !1;
803
- j(() => {
804
- l || (a.value = N(e.modelValue, 0), r.value = N(e.modelValue, 1)), l = !1;
890
+ const l = T(E(e.modelValue, 0)), u = T(E(e.modelValue, 1));
891
+ let a = !1;
892
+ H(() => {
893
+ a || (l.value = E(e.modelValue, 0), u.value = E(e.modelValue, 1)), a = !1;
805
894
  }, [e.modelValue, () => e.modelValue]);
806
- const n = () => {
807
- l = !0, e.singleEmit ? u("update:modelValue", [a.value, r.value]) : U(a.value) && U(r.value) ? u("update:modelValue", [a.value, r.value]) : u("update:modelValue", null);
808
- }, d = (g) => {
809
- for (let K = 0; K < g.length; K++)
810
- if (U(g[K]))
811
- return g[K];
812
- }, o = x(() => {
813
- var g;
814
- return d([r.value, (g = e.start) == null ? void 0 : g.max, e.max]);
815
- }), f = x(() => {
816
- var g;
817
- return d([a.value, (g = e.end) == null ? void 0 : g.min, e.min]);
818
- }), S = I(ze());
895
+ const o = () => {
896
+ a = !0, e.singleEmit ? d("update:modelValue", [l.value, u.value]) : U(l.value) && U(u.value) ? d("update:modelValue", [l.value, u.value]) : d("update:modelValue", null);
897
+ }, y = (r) => {
898
+ for (let i = 0; i < r.length; i++)
899
+ if (U(r[i]))
900
+ return r[i];
901
+ }, c = x(() => {
902
+ var r;
903
+ return y([u.value, (r = e.start) == null ? void 0 : r.max, e.max]);
904
+ }), n = x(() => {
905
+ var r;
906
+ return y([l.value, (r = e.end) == null ? void 0 : r.min, e.min]);
907
+ }), m = M(_e());
819
908
  return () => {
820
- var K, k;
821
- const g = p(e, ...S, "min", "max");
822
- return c("span", {
909
+ var i, S;
910
+ const r = b(e, ...m, "min", "max");
911
+ return f("span", {
823
912
  class: "pro-number-range"
824
- }, [c(q, s(g, p(e.start, "max"), {
825
- max: o.value,
826
- modelValue: a.value,
827
- "onUpdate:modelValue": [(P) => a.value = P, n]
828
- }), null), c("span", null, [((K = t.divider) == null ? void 0 : K.call(t)) || ((k = e.divider) == null ? void 0 : k.call(e)) || " - "]), c(q, s(g, p(e.start, "min"), {
829
- min: f.value,
830
- modelValue: r.value,
831
- "onUpdate:modelValue": [(P) => r.value = P, n]
913
+ }, [f(G, g(r, b(e.start, "max"), {
914
+ max: c.value,
915
+ modelValue: l.value,
916
+ "onUpdate:modelValue": [(s) => l.value = s, o]
917
+ }), null), f("span", null, [((i = t.divider) == null ? void 0 : i.call(t)) || ((S = e.divider) == null ? void 0 : S.call(e)) || " - "]), f(G, g(r, b(e.start, "min"), {
918
+ min: n.value,
919
+ modelValue: u.value,
920
+ "onUpdate:modelValue": [(s) => u.value = s, o]
832
921
  }), null)]);
833
922
  };
834
923
  }
835
- }), Ae = () => ({
924
+ }), ga = ["filter", "updateKeyChildren", "getCheckedNodes", "setCheckedNodes", "getCheckedKeys", "setCheckedKeys", "setChecked", "getHalfCheckedNodes", "getHalfCheckedKeys", "getCurrentKey", "getCurrentNode", "setCurrentKey", "setCurrentNode", "getNode", "remove", "append", "insertBefore", "insertAfter"], Ze = () => ({
836
925
  treeData: {
837
926
  type: Array
838
927
  },
@@ -849,126 +938,303 @@ const Be = () => ({
849
938
  checkedKeys: {
850
939
  type: Array
851
940
  }
852
- }), Ra = E({
941
+ }), ja = w({
853
942
  props: {
854
- ...Re.props,
855
- ...Ae()
943
+ ...Ne.props,
944
+ ...Ze()
856
945
  },
857
946
  setup: (e, {
858
947
  slots: t
859
948
  }) => {
860
- const u = I(Ae()), r = (() => {
861
- const l = e.fieldNames;
862
- if (!!l)
949
+ const d = M(Ze()), u = (() => {
950
+ const a = e.fieldNames;
951
+ if (!!a)
863
952
  return {
864
- label: l.title,
865
- children: l.children,
866
- disabled: l.disabled,
867
- isLeaf: l.isLeaf,
868
- class: l.class
953
+ label: a.title,
954
+ children: a.children,
955
+ disabled: a.disabled,
956
+ isLeaf: a.isLeaf,
957
+ class: a.class
869
958
  };
870
959
  })();
871
960
  return () => {
872
- var l;
873
- return c(Re, s(p(e, u), {
961
+ var a;
962
+ return f(Ne, g(b(e, d), {
874
963
  data: e.treeData || e.data,
875
- props: r || e.props,
876
- nodeKey: ((l = e.fieldNames) == null ? void 0 : l.key) || e.nodeKey,
877
- showCheckbox: W(e.selectable) ? e.selectable : e.showCheckbox,
964
+ props: u || e.props,
965
+ nodeKey: ((a = e.fieldNames) == null ? void 0 : a.key) || e.nodeKey,
966
+ showCheckbox: Z(e.selectable) ? e.selectable : e.showCheckbox,
878
967
  defaultExpandedKeys: e.expandedKeys || e.defaultExpandedKeys,
879
968
  defaultCheckedKeys: e.checkedKeys || e.checkedKeys
880
969
  }), t);
881
970
  };
882
971
  }
883
972
  });
884
- function oa(e) {
885
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ot(e);
973
+ function ha(e) {
974
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Wt(e);
886
975
  }
887
- const je = () => ({
976
+ const Je = () => ({
888
977
  options: Array
889
- }), ua = E({
978
+ }), va = w({
890
979
  props: {
891
- ...we.props,
892
- ...je()
980
+ ...$e.props,
981
+ ...Je()
893
982
  },
894
983
  setup: (e, {
895
984
  slots: t,
896
- expose: u
985
+ expose: d
897
986
  }) => {
898
- const a = F();
899
- u(L(a));
900
- const r = I(je());
901
- return () => c(we, s({
902
- ref: a
903
- }, p(e, r)), {
987
+ const l = T();
988
+ d(L(l));
989
+ const u = M(Je());
990
+ return () => f($e, g({
991
+ ref: l
992
+ }, b(e, u)), {
904
993
  dropdown: () => {
905
- let l;
906
- return c(Pt, null, oa(l = M(e.options, (n) => {
907
- var o;
908
- const d = (o = t.label) == null ? void 0 : o.call(t, n);
909
- return c(ht, s({
910
- command: n.value
911
- }, p(n, "value", "label")), {
912
- default: () => [d || n.label]
994
+ let a;
995
+ return f(Rt, null, ha(a = F(e.options, (o) => {
996
+ var c;
997
+ const y = (c = t.label) == null ? void 0 : c.call(t, o);
998
+ return f(Mt, g({
999
+ command: o.value
1000
+ }, b(o, "value", "label")), {
1001
+ default: () => [y || o.label]
913
1002
  });
914
- })) ? l : {
915
- default: () => [l]
1003
+ })) ? a : {
1004
+ default: () => [a]
916
1005
  });
917
1006
  },
918
1007
  ...t
919
1008
  });
920
1009
  }
921
- }), ca = V({
922
- InputComp: Ct,
1010
+ }), Qe = () => ({
1011
+ options: Array,
1012
+ fieldNames: {
1013
+ type: Object
1014
+ },
1015
+ emitPath: {
1016
+ type: Boolean,
1017
+ default: !1
1018
+ },
1019
+ expMethods: {
1020
+ type: Array,
1021
+ default: () => [...ga]
1022
+ },
1023
+ separator$: {
1024
+ type: String
1025
+ },
1026
+ itemSeparator$: {
1027
+ type: String
1028
+ },
1029
+ parseValue$: {
1030
+ type: Function
1031
+ },
1032
+ formatValue$: {
1033
+ type: Function
1034
+ }
1035
+ }), ba = w({
1036
+ props: {
1037
+ ...Ie.props,
1038
+ ...Qe()
1039
+ },
1040
+ setup: (e, {
1041
+ slots: t,
1042
+ emit: d,
1043
+ expose: l
1044
+ }) => {
1045
+ const u = T();
1046
+ l(ut(u, e.expMethods));
1047
+ const a = x(() => e.options || e.data), o = x(() => e.fieldNames || e.props), y = x(() => {
1048
+ const r = e.modelValue;
1049
+ if (e.parseValue$)
1050
+ return e.parseValue$(r, e);
1051
+ const i = X(r, {
1052
+ multiple: e.multiple,
1053
+ allPath: e.emitPath,
1054
+ separator: e.separator$,
1055
+ itemSeparator: e.itemSeparator$
1056
+ });
1057
+ return j(i) ? e.multiple ? F(i, (S) => j(S) ? ie(S) : S) : ie(i) : i;
1058
+ }), c = (r) => {
1059
+ var S, s;
1060
+ let i = r;
1061
+ if (e.emitPath && r) {
1062
+ const K = ((S = o.value) == null ? void 0 : S.value) || "value", R = ((s = o.value) == null ? void 0 : s.children) || "children";
1063
+ if (j(r))
1064
+ i = F(r, (O) => {
1065
+ const B = Ue(a.value, (h) => E(h, K) === O, {
1066
+ children: R
1067
+ }, []);
1068
+ return F(B.parentList, (h) => E(h, K));
1069
+ });
1070
+ else {
1071
+ const O = Ue(a.value, (B) => E(B, K) === r, {
1072
+ children: R
1073
+ }, []);
1074
+ i = F(O.parentList, (B) => E(B, K));
1075
+ }
1076
+ }
1077
+ return e.separator$ || e.itemSeparator$ ? Y(i, {
1078
+ multiple: e.multiple,
1079
+ allPath: e.emitPath,
1080
+ separator: e.separator$,
1081
+ itemSeparator: e.itemSeparator$
1082
+ }) : i;
1083
+ }, n = (r) => {
1084
+ if (e.formatValue$) {
1085
+ d("update:modelValue", e.formatValue$(r, e));
1086
+ return;
1087
+ }
1088
+ const i = c(r);
1089
+ d("update:modelValue", i);
1090
+ }, m = [...M(Qe()), "modelValue", "data", "props"];
1091
+ return () => f(Ie, g({
1092
+ ref: u
1093
+ }, b(e, m), {
1094
+ modelValue: y.value,
1095
+ "onUpdate:modelValue": (r) => n(r),
1096
+ data: a.value,
1097
+ props: o.value
1098
+ }), t);
1099
+ }
1100
+ }), Xe = () => ({
1101
+ expandTrigger: {
1102
+ type: String,
1103
+ default: "click"
1104
+ },
1105
+ multiple: {
1106
+ type: Boolean,
1107
+ default: !1
1108
+ },
1109
+ checkStrictly: {
1110
+ type: Boolean,
1111
+ default: !1
1112
+ },
1113
+ emitPath: {
1114
+ type: Boolean,
1115
+ default: !0
1116
+ },
1117
+ fieldNames: {
1118
+ type: Object
1119
+ },
1120
+ expMethods: {
1121
+ type: Array,
1122
+ default: () => ["getCheckedNodes", "togglePopperVisible", "focus", "blur"]
1123
+ },
1124
+ separator$: {
1125
+ type: String
1126
+ },
1127
+ itemSeparator$: {
1128
+ type: String
1129
+ },
1130
+ parseValue$: {
1131
+ type: Function
1132
+ },
1133
+ formatValue$: {
1134
+ type: Function
1135
+ }
1136
+ }), Sa = w({
1137
+ props: {
1138
+ ...Be.props,
1139
+ ...Xe()
1140
+ },
1141
+ setup: (e, {
1142
+ slots: t,
1143
+ emit: d,
1144
+ expose: l
1145
+ }) => {
1146
+ const u = T();
1147
+ l(ut(u, e.expMethods));
1148
+ const a = x(() => ({
1149
+ ...e.fieldNames,
1150
+ expandTrigger: e.expandTrigger,
1151
+ multiple: e.multiple,
1152
+ checkStrictly: e.checkStrictly,
1153
+ emitPath: e.emitPath,
1154
+ ...e.props
1155
+ })), o = x(() => {
1156
+ const n = e.modelValue;
1157
+ return e.parseValue$ ? e.parseValue$(n, e) : X(n, {
1158
+ multiple: a.value.multiple,
1159
+ allPath: a.value.emitPath,
1160
+ separator: e.separator$,
1161
+ itemSeparator: e.itemSeparator$
1162
+ });
1163
+ }), y = (n) => {
1164
+ if (e.formatValue$) {
1165
+ d("update:modelValue", e.formatValue$(n, e));
1166
+ return;
1167
+ }
1168
+ if (e.separator$ || e.itemSeparator$) {
1169
+ d("update:modelValue", Y(n, {
1170
+ multiple: a.value.multiple,
1171
+ allPath: a.value.emitPath,
1172
+ separator: e.separator$,
1173
+ itemSeparator: e.itemSeparator$
1174
+ }));
1175
+ return;
1176
+ }
1177
+ d("update:modelValue", n);
1178
+ }, c = [...M(Xe()), "modelValue", "props"];
1179
+ return () => f(Be, g({
1180
+ ref: u
1181
+ }, b(e, c), {
1182
+ modelValue: o.value,
1183
+ "onUpdate:modelValue": (n) => y(n),
1184
+ props: a.value
1185
+ }), t);
1186
+ }
1187
+ }), pa = I({
1188
+ InputComp: Nt,
923
1189
  valueType: "text",
924
1190
  name: "PFromText"
925
- }), da = V({
926
- InputComp: q,
1191
+ }), Pa = I({
1192
+ InputComp: G,
927
1193
  valueType: "digit",
928
1194
  name: "PFormNumber"
929
- }), ia = V({
930
- InputComp: ra,
1195
+ }), Ca = I({
1196
+ InputComp: sa,
931
1197
  valueType: "digitRange",
932
1198
  name: "PFormNumberRange"
933
- }), fa = V({
934
- InputComp: Kt,
1199
+ }), Va = I({
1200
+ InputComp: $t,
935
1201
  valueType: "date",
936
1202
  name: "PFormDate"
937
- }), ya = V({
938
- InputComp: Et,
1203
+ }), xa = I({
1204
+ InputComp: It,
939
1205
  valueType: "time",
940
1206
  name: "PFormTime"
941
- }), ma = V({
942
- InputComp: aa,
1207
+ }), Ka = I({
1208
+ InputComp: ma,
943
1209
  valueType: "select",
944
1210
  name: "PFormSelect"
945
- }), sa = V({
946
- InputComp: kt,
1211
+ }), ka = I({
1212
+ InputComp: ba,
947
1213
  valueType: "treeSelect",
948
1214
  name: "PFormTreeSelect"
949
- }), ga = V({
950
- InputComp: ea,
1215
+ }), wa = I({
1216
+ InputComp: ca,
951
1217
  valueType: "checkbox",
952
1218
  name: "PFromCheckbox"
953
- }), va = V({
954
- InputComp: ta,
1219
+ }), Fa = I({
1220
+ InputComp: ia,
955
1221
  valueType: "radio",
956
1222
  name: "PFromRadio"
957
- }), ba = V({
958
- InputComp: Ft,
1223
+ }), Ea = I({
1224
+ InputComp: Bt,
959
1225
  valueType: "switch",
960
1226
  name: "PFromSwitch"
961
- }), pa = V({
962
- InputComp: xt,
1227
+ }), Ta = I({
1228
+ InputComp: Sa,
963
1229
  valueType: "cascader",
964
1230
  name: "PFormCascader"
965
- }), Sa = V({
966
- InputComp: Tt,
1231
+ }), Ra = I({
1232
+ InputComp: Ot,
967
1233
  valueType: "color",
968
1234
  name: "PFormColor"
969
- }), rt = E({
1235
+ }), ht = w({
970
1236
  props: {
971
- ...p(ne.props, "label", "prop"),
1237
+ ...b(ue.props, "label", "prop"),
972
1238
  title: {
973
1239
  type: String
974
1240
  },
@@ -985,53 +1251,53 @@ const je = () => ({
985
1251
  setup: (e, {
986
1252
  slots: t
987
1253
  }) => {
988
- const u = ({
989
- row: l,
990
- column: n,
991
- $index: d
1254
+ const d = ({
1255
+ row: a,
1256
+ column: o,
1257
+ $index: y
992
1258
  }) => {
993
- var P;
994
- const o = l, f = d, S = {
995
- ...n,
996
- title: n.label,
997
- dataIndex: n.property
998
- }, g = N(l, S.dataIndex), K = {
999
- value: g,
1000
- text: g,
1001
- record: o,
1002
- column: S,
1003
- index: f
1004
- }, k = (P = t.bodyCell) == null ? void 0 : P.call(t, K);
1005
- return k || (e.customRender ? e.customRender(K) : g);
1006
- }, r = {
1259
+ var s;
1260
+ const c = a, n = y, m = {
1261
+ ...o,
1262
+ title: o.label,
1263
+ dataIndex: o.property
1264
+ }, r = E(a, m.dataIndex), i = {
1265
+ value: r,
1266
+ text: r,
1267
+ record: c,
1268
+ column: m,
1269
+ index: n
1270
+ }, S = (s = t.bodyCell) == null ? void 0 : s.call(t, i);
1271
+ return S || (e.customRender ? e.customRender(i) : r);
1272
+ }, u = {
1007
1273
  header: ({
1008
- column: l,
1009
- $index: n
1274
+ column: a,
1275
+ $index: o
1010
1276
  }) => {
1011
- var g;
1012
- const d = n, o = l.label, f = {
1013
- ...l,
1014
- title: o,
1015
- dataIndex: l.property
1277
+ var r;
1278
+ const y = o, c = a.label, n = {
1279
+ ...a,
1280
+ title: c,
1281
+ dataIndex: a.property
1016
1282
  };
1017
- return ((g = t.headerCell) == null ? void 0 : g.call(t, {
1018
- title: o,
1019
- column: f,
1020
- index: d
1021
- })) || o;
1283
+ return ((r = t.headerCell) == null ? void 0 : r.call(t, {
1284
+ title: c,
1285
+ column: n,
1286
+ index: y
1287
+ })) || c;
1022
1288
  }
1023
1289
  };
1024
- return (!e.children || D(e.children) <= 0) && (r.default = u), () => c(ne, s(p(e, "title", "dataIndex", "prop", "customRender", "children"), {
1290
+ return (!e.children || D(e.children) <= 0) && (u.default = d), () => f(ue, g(b(e, "title", "dataIndex", "prop", "customRender", "children"), {
1025
1291
  prop: e.dataIndex,
1026
1292
  label: e.title
1027
1293
  }), {
1028
- default: () => [D(e.children) > 0 && M(e.children, (l) => c(rt, s({
1029
- key: l.dataIndex
1030
- }, l), t))],
1031
- ...r
1294
+ default: () => [D(e.children) > 0 && F(e.children, (a) => f(ht, g({
1295
+ key: a.dataIndex
1296
+ }, a), t))],
1297
+ ...u
1032
1298
  });
1033
1299
  }
1034
- }), Pa = ["clearSelection", "getSelectionRows", "toggleRowSelection", "toggleAllSelection", "toggleRowExpansion", "setCurrentRow", "clearSort", "clearFilter", "doLayout", "sort", "scrollTo", "setScrollTop", "setScrollLeft"], ha = () => ({
1300
+ }), Ma = ["clearSelection", "getSelectionRows", "toggleRowSelection", "toggleAllSelection", "toggleRowExpansion", "setCurrentRow", "clearSort", "clearFilter", "doLayout", "sort", "scrollTo", "setScrollTop", "setScrollLeft"], Na = () => ({
1035
1301
  columns: {
1036
1302
  type: Array
1037
1303
  },
@@ -1051,141 +1317,141 @@ const je = () => ({
1051
1317
  type: Object,
1052
1318
  default: void 0
1053
1319
  }
1054
- }), ot = E({
1320
+ }), vt = w({
1055
1321
  props: {
1056
- ...Me.props,
1057
- ...ha()
1322
+ ...Oe.props,
1323
+ ...Na()
1058
1324
  },
1059
1325
  setup: (e, {
1060
1326
  slots: t,
1061
- expose: u,
1062
- emit: a
1327
+ expose: d,
1328
+ emit: l
1063
1329
  }) => {
1064
- const r = F(), l = Ye("table");
1065
- u($e(Pa, r));
1066
- const n = x(() => e.dataSource || e.data || []), d = x(() => Q(n.value, (v, h) => ({
1067
- ...v,
1068
- [o(h)]: !0
1069
- }), {})), o = (v) => {
1070
- const h = e.rowKey;
1071
- return zt(h) ? h(v) : h ? v[h] : v.id;
1072
- }, f = x(() => !!e.rowSelection), S = x(() => {
1073
- const v = e.rowSelection;
1074
- return v ? !v.type || v.type === "multi" : !1;
1075
- }), g = x(() => {
1076
- const v = e.selectedRowKeys;
1077
- return Je(v) ? v : v ? [v] : [];
1078
- }), K = x(() => Q(g.value, (v, h) => ({
1079
- ...v,
1080
- [h]: !0
1330
+ const u = T(), a = it("table");
1331
+ d(Ye(Ma, u));
1332
+ const o = x(() => e.dataSource || e.data || []), y = x(() => te(o.value, (h, V) => ({
1333
+ ...h,
1334
+ [c(V)]: !0
1335
+ }), {})), c = (h) => {
1336
+ const V = e.rowKey;
1337
+ return _t(V) ? V(h) : V ? h[V] : h.id;
1338
+ }, n = x(() => !!e.rowSelection), m = x(() => {
1339
+ const h = e.rowSelection;
1340
+ return h ? !h.type || h.type === "multi" : !1;
1341
+ }), r = x(() => {
1342
+ const h = e.selectedRowKeys;
1343
+ return j(h) ? h : h ? [h] : [];
1344
+ }), i = x(() => te(r.value, (h, V) => ({
1345
+ ...h,
1346
+ [V]: !0
1081
1347
  }), {}));
1082
- let k = [], P = !1;
1083
- const T = (v) => {
1084
- var R, i, y, m, C, z, ie, fe;
1085
- if (!P)
1348
+ let S = [], s = !1;
1349
+ const K = (h) => {
1350
+ var N, v, p, P, k, z, se, ge;
1351
+ if (!s)
1086
1352
  return;
1087
- const h = M(v, (w) => o(w));
1088
- if (f.value && !S.value) {
1089
- if (D(h) <= 0 && D(k) > 0) {
1090
- const w = n.value, O = At(w, ($) => o($) === k[0]);
1091
- O && ((R = r.value) == null || R.toggleRowSelection(O, !0));
1353
+ const V = F(h, ($) => c($));
1354
+ if (n.value && !m.value) {
1355
+ if (D(V) <= 0 && D(S) > 0) {
1356
+ const $ = o.value, A = Zt($, (q) => c(q) === S[0]);
1357
+ A && ((N = u.value) == null || N.toggleRowSelection(A, !0));
1092
1358
  return;
1093
- } else if (D(h) > 1) {
1094
- const w = jt(h);
1095
- Ie(v, (O) => {
1096
- var $;
1097
- ($ = r.value) == null || $.toggleRowSelection(O, o(O) === w);
1359
+ } else if (D(V) > 1) {
1360
+ const $ = ie(V);
1361
+ De(h, (A) => {
1362
+ var q;
1363
+ (q = u.value) == null || q.toggleRowSelection(A, c(A) === $);
1098
1364
  });
1099
1365
  return;
1100
1366
  }
1101
1367
  }
1102
- if (!Wt(g.value, h, {
1368
+ if (!Yt(r.value, V, {
1103
1369
  sort: !0
1104
1370
  })) {
1105
- if (!S.value) {
1106
- const w = N(h, 0);
1107
- (y = (i = e.rowSelection).onChange) == null || y.call(i, w, N(v, 0)), a("update:selectedRowKeys", w);
1371
+ if (!m.value) {
1372
+ const $ = E(V, 0);
1373
+ (p = (v = e.rowSelection).onChange) == null || p.call(v, $, E(h, 0)), l("update:selectedRowKeys", $);
1108
1374
  return;
1109
1375
  }
1110
- if ((m = e.rowSelection) != null && m.pagination) {
1111
- const w = re(g.value, (O) => !d.value[O]);
1112
- w.push(...h), (z = (C = e.rowSelection).onChange) == null || z.call(C, w, []), a("update:selectedRowKeys", w);
1376
+ if ((P = e.rowSelection) != null && P.pagination) {
1377
+ const $ = ce(r.value, (A) => !y.value[A]);
1378
+ $.push(...V), (z = (k = e.rowSelection).onChange) == null || z.call(k, $, []), l("update:selectedRowKeys", $);
1113
1379
  return;
1114
1380
  }
1115
- (fe = (ie = e.rowSelection).onChange) == null || fe.call(ie, h, v), a("update:selectedRowKeys", h);
1381
+ (ge = (se = e.rowSelection).onChange) == null || ge.call(se, V, h), l("update:selectedRowKeys", V);
1116
1382
  }
1117
- }, B = x(() => {
1383
+ }, R = x(() => {
1118
1384
  if (!!e.rowSelection)
1119
1385
  return {
1120
- onSelectionChange: T
1386
+ onSelectionChange: K
1121
1387
  };
1122
1388
  });
1123
- _(() => {
1124
- var h;
1125
- P = !1, k = g.value;
1126
- const v = n.value;
1127
- if (f.value) {
1128
- const R = (h = r.value) == null ? void 0 : h.getSelectionRows(), i = Q(R, (y, m) => ({
1129
- ...y,
1130
- [o(m)]: !0
1389
+ Q(() => {
1390
+ var V;
1391
+ s = !1, S = r.value;
1392
+ const h = o.value;
1393
+ if (n.value) {
1394
+ const N = (V = u.value) == null ? void 0 : V.getSelectionRows(), v = te(N, (p, P) => ({
1395
+ ...p,
1396
+ [c(P)]: !0
1131
1397
  }), {});
1132
- Dt(() => {
1133
- Ie(v, (y) => {
1134
- var C;
1135
- const m = o(y);
1136
- K.value[m] !== i[m] && ((C = r.value) == null || C.toggleRowSelection(y, !!K.value[m]));
1137
- }), P = !0;
1398
+ Ht(() => {
1399
+ De(h, (p) => {
1400
+ var k;
1401
+ const P = c(p);
1402
+ i.value[P] !== v[P] && ((k = u.value) == null || k.toggleRowSelection(p, !!i.value[P]));
1403
+ }), s = !0;
1138
1404
  });
1139
1405
  } else
1140
- P = !0;
1141
- }, [g, n]);
1142
- const Z = () => {
1143
- var v, h;
1406
+ s = !0;
1407
+ }, [r, o]);
1408
+ const O = () => {
1409
+ var h, V;
1144
1410
  if (e.spanMethod)
1145
1411
  return e.spanMethod;
1146
- if (((v = e.mergeOpts) == null ? void 0 : v.rowNames) || ((h = e.mergeOpts) == null ? void 0 : h.colNames)) {
1147
- const R = _t(e.mergeOpts);
1412
+ if (((h = e.mergeOpts) == null ? void 0 : h.rowNames) || ((V = e.mergeOpts) == null ? void 0 : V.colNames)) {
1413
+ const N = ea(e.mergeOpts);
1148
1414
  return ({
1149
- row: i,
1150
- column: y
1415
+ row: v,
1416
+ column: p
1151
1417
  }) => {
1152
- const m = y.property;
1153
- if (R[m]) {
1154
- const C = i[R[m]], z = i[m + "-colspan"];
1418
+ const P = p.property;
1419
+ if (N[P]) {
1420
+ const k = v[N[P]], z = v[P + "-colspan"];
1155
1421
  return {
1156
- rowspan: C !== void 0 ? C : 1,
1422
+ rowspan: k !== void 0 ? k : 1,
1157
1423
  colspan: z !== void 0 ? z : 1
1158
1424
  };
1159
1425
  }
1160
1426
  };
1161
1427
  }
1162
1428
  return e.spanMethod;
1163
- }, H = x(() => Z());
1164
- return () => c(Me, s({
1165
- ref: r,
1166
- id: l
1167
- }, p(e, "columns", "dataSource", "data", "loading", "spanMethod"), {
1168
- data: n.value,
1169
- spanMethod: H.value
1170
- }, B.value), {
1429
+ }, B = x(() => O());
1430
+ return () => f(Oe, g({
1431
+ ref: u,
1432
+ id: a
1433
+ }, b(e, "columns", "dataSource", "data", "loading", "spanMethod"), {
1434
+ data: o.value,
1435
+ spanMethod: B.value
1436
+ }, R.value), {
1171
1437
  default: () => {
1172
- var v, h, R, i, y;
1173
- return [(v = t.start) == null ? void 0 : v.call(t), f.value && c(ne, s({
1438
+ var h, V, N, v, p;
1439
+ return [(h = t.start) == null ? void 0 : h.call(t), n.value && f(ue, g({
1174
1440
  type: "selection",
1175
- className: S.value ? "pro-multi" : "pro-single"
1176
- }, p((h = e.rowSelection) == null ? void 0 : h.column, "slots")), (i = (R = e.rowSelection) == null ? void 0 : R.column) == null ? void 0 : i.slots), M(e.columns, (m) => c(rt, s({
1177
- key: m.dataIndex
1178
- }, m), t)), (y = t.default) == null ? void 0 : y.call(t), e.loading && c(et, {
1179
- target: l,
1441
+ className: m.value ? "pro-multi" : "pro-single"
1442
+ }, b((V = e.rowSelection) == null ? void 0 : V.column, "slots")), (v = (N = e.rowSelection) == null ? void 0 : N.column) == null ? void 0 : v.slots), F(e.columns, (P) => f(ht, g({
1443
+ key: P.dataIndex
1444
+ }, P), t)), (p = t.default) == null ? void 0 : p.call(t), e.loading && f(mt, {
1445
+ target: a,
1180
1446
  loading: !0
1181
1447
  }, null)];
1182
1448
  },
1183
- ...ce(t, "append", "empty")
1449
+ ...J(t, "append", "empty")
1184
1450
  });
1185
1451
  }
1186
- }), Ca = E({
1452
+ }), $a = w({
1187
1453
  props: {
1188
- ...le.props,
1454
+ ...de.props,
1189
1455
  type: {
1190
1456
  type: String,
1191
1457
  default: "primary"
@@ -1197,141 +1463,225 @@ const je = () => ({
1197
1463
  },
1198
1464
  setup: (e, {
1199
1465
  slots: t
1200
- }) => () => c(le, e, t)
1466
+ }) => () => f(de, e, t)
1467
+ }), Ia = () => ({
1468
+ fixed: {
1469
+ type: Boolean,
1470
+ default: !0
1471
+ },
1472
+ dataSource: Array,
1473
+ columns: {
1474
+ type: Array
1475
+ },
1476
+ dynamicHei: {
1477
+ type: Boolean,
1478
+ default: !0
1479
+ },
1480
+ minWidth: {
1481
+ type: Number,
1482
+ default: 100
1483
+ }
1484
+ }), Ba = w({
1485
+ inheritAttrs: !1,
1486
+ props: {
1487
+ ...b(Ae.props, ["class"]),
1488
+ ...Ia()
1489
+ },
1490
+ setup: (e, {
1491
+ attrs: t
1492
+ }) => {
1493
+ const d = T(), [l, u] = ta(), a = rt({
1494
+ width: 0,
1495
+ height: 0
1496
+ });
1497
+ aa(d, (m) => {
1498
+ var i;
1499
+ const r = (i = m[0]) == null ? void 0 : i.contentRect;
1500
+ a.width = r.width, a.height = r.height, u();
1501
+ });
1502
+ const o = x(() => {
1503
+ var S, s;
1504
+ const m = ((S = e.columns) == null ? void 0 : S.filter((K) => K.width || K.minWidth)) || [], r = m.reduce((K, R) => K + (R.width || R.minWidth || 0), 0), i = (((s = e.columns) == null ? void 0 : s.length) || 0) - m.length;
1505
+ return i > 0 && a.width > 0 ? Math.max((a.width - r - (e.vScrollbarSize || 0)) / i, e.minWidth || 0) : e.minWidth;
1506
+ }), y = x(() => F(e.columns, (m) => {
1507
+ const r = m.dataIndex || m.key, i = {
1508
+ ...m,
1509
+ width: m.width || m.minWidth || o.value,
1510
+ key: r,
1511
+ dataKey: r
1512
+ };
1513
+ return m.customRender && (i.cellRenderer = ({
1514
+ cellData: S,
1515
+ rowData: s,
1516
+ rowIndex: K,
1517
+ column: R
1518
+ }) => m.customRender({
1519
+ value: S,
1520
+ text: S,
1521
+ record: s,
1522
+ column: R,
1523
+ index: K
1524
+ })), i;
1525
+ })), c = x(() => !e.estimatedRowHeight && e.dynamicHei ? 50 : e.estimatedRowHeight), n = x(() => {
1526
+ const m = ["el-table"];
1527
+ return c.value && m.push("dynamic-hei"), m;
1528
+ });
1529
+ return () => f("div", g({
1530
+ class: "pro-table-v2-wrapper",
1531
+ style: {
1532
+ "--estimated-hei": `${c.value || 0}px`
1533
+ },
1534
+ ref: d
1535
+ }, J(t, ["class"])), [a.width > 0 && a.height > 0 && f(Ae, g({
1536
+ key: l.value,
1537
+ class: n.value
1538
+ }, b(t, ["class", "className"]), b(e, "dataSource", "data", "columns", "estimatedRowHeight", "width", "height"), {
1539
+ estimatedRowHeight: c.value,
1540
+ columns: y.value,
1541
+ data: e.dataSource || e.data || [],
1542
+ width: a.width,
1543
+ height: a.height
1544
+ }), null)]);
1545
+ }
1201
1546
  });
1202
- A.props = {
1203
- ...ae.props,
1204
- ...A.props,
1205
- formMethods: { type: Array, default: Xe }
1547
+ W.props = {
1548
+ ...oe.props,
1549
+ ...W.props,
1550
+ formMethods: { type: Array, default: ct }
1206
1551
  };
1207
- X.props = {
1208
- ...A.props,
1209
- ...X.props,
1552
+ ae.props = {
1553
+ ...W.props,
1554
+ ...ae.props,
1210
1555
  inline: { type: Boolean, default: !0 }
1211
1556
  };
1212
- ye.props = {
1213
- ...te.props,
1214
- ...ye.props
1557
+ he.props = {
1558
+ ...re.props,
1559
+ ...he.props
1215
1560
  };
1216
- Y.props = {
1217
- ...ot.props,
1218
- ...Y.props
1561
+ le.props = {
1562
+ ...vt.props,
1563
+ ...le.props
1219
1564
  };
1220
- ee.props = {
1221
- ..._e.props,
1222
- ...ee.props
1565
+ ne.props = {
1566
+ ...lt.props,
1567
+ ...ne.props
1223
1568
  };
1224
- me.props = {
1225
- ...ee.props,
1226
- ...me.props
1569
+ ve.props = {
1570
+ ...ne.props,
1571
+ ...ve.props
1227
1572
  };
1228
- se.props = {
1229
- ...A.props,
1230
- ...se.props
1573
+ be.props = {
1574
+ ...W.props,
1575
+ ...be.props
1231
1576
  };
1232
- ge.props = {
1233
- ...tt.props,
1234
- ...ge.props
1577
+ Se.props = {
1578
+ ...ft.props,
1579
+ ...Se.props
1235
1580
  };
1236
- ve.props = {
1237
- ...lt.props,
1238
- ...ve.props,
1581
+ pe.props = {
1582
+ ...gt.props,
1583
+ ...pe.props,
1239
1584
  modelValue: String
1240
1585
  };
1241
- be.props = {
1242
- ...Ze.props,
1243
- ...be.props,
1586
+ Pe.props = {
1587
+ ...nt.props,
1588
+ ...Pe.props,
1244
1589
  placement: { type: String, default: "top-start" }
1245
1590
  };
1246
- const wa = {
1247
- [b.LoadingKey]: et,
1248
- [b.RowKey]: Rt,
1249
- [b.ColKey]: wt,
1250
- [b.ButtonKey]: le,
1251
- [b.DescriptionsKey]: _e,
1252
- [b.DescriptionsItemKey]: Mt,
1253
- [b.MenusKey]: na,
1254
- [b.ModalKey]: tt,
1255
- [b.DrawerKey]: Qt,
1256
- [b.PaginationKey]: Xt,
1257
- [b.PopoverKey]: Yt,
1258
- [b.TooltipKey]: Ze,
1259
- [b.CheckboxKey]: We,
1260
- [b.FormKey]: Zt,
1261
- [b.FormItemKey]: Qe,
1262
- [b.TableKey]: ot,
1263
- [b.TableOperateKey]: Ca,
1264
- [b.UploaderKey]: lt,
1265
- [b.DropdownKey]: ua,
1266
- [b.ScrollKey]: It,
1267
- [b.EmptyKey]: Vt,
1268
- [b.ProFormKey]: A,
1269
- [b.ProSearchFormKey]: X,
1270
- [b.ProTableKey]: Y,
1271
- [b.ProCurdKey]: ct,
1272
- [b.ProListKey]: dt,
1273
- [b.ProPageKey]: it,
1274
- [b.ProOperateKey]: ft,
1275
- text: pe,
1276
- digit: yt,
1277
- date: mt,
1278
- time: pe,
1279
- select: J,
1280
- radio: J,
1281
- checkbox: J,
1282
- treeSelect: Se,
1283
- cascader: Se
1284
- }, Ma = {
1285
- text: ca,
1286
- digit: da,
1287
- digitRange: ia,
1288
- date: fa,
1289
- time: ya,
1290
- select: ma,
1291
- treeSelect: sa,
1292
- checkbox: ga,
1293
- radio: va,
1294
- switch: ba,
1295
- cascader: pa,
1296
- color: Sa
1591
+ const Wa = {
1592
+ [C.LoadingKey]: mt,
1593
+ [C.RowKey]: At,
1594
+ [C.ColKey]: Dt,
1595
+ [C.ButtonKey]: de,
1596
+ [C.DescriptionsKey]: lt,
1597
+ [C.DescriptionsItemKey]: Lt,
1598
+ [C.MenusKey]: fa,
1599
+ [C.ModalKey]: ft,
1600
+ [C.DrawerKey]: oa,
1601
+ [C.PaginationKey]: ua,
1602
+ [C.PopoverKey]: da,
1603
+ [C.TooltipKey]: nt,
1604
+ [C.CheckboxKey]: at,
1605
+ [C.FormKey]: la,
1606
+ [C.FormItemKey]: dt,
1607
+ [C.TableKey]: vt,
1608
+ [C.TableV2Key]: Ba,
1609
+ [C.TableOperateKey]: $a,
1610
+ [C.UploaderKey]: gt,
1611
+ [C.DropdownKey]: va,
1612
+ [C.ScrollKey]: Ut,
1613
+ [C.EmptyKey]: zt,
1614
+ [C.ProFormKey]: W,
1615
+ [C.ProSearchFormKey]: ae,
1616
+ [C.ProTableKey]: le,
1617
+ [C.ProCurdKey]: St,
1618
+ [C.ProListKey]: pt,
1619
+ [C.ProPageKey]: Pt,
1620
+ [C.ProOperateKey]: Ct,
1621
+ text: Ce,
1622
+ digit: Vt,
1623
+ date: xt,
1624
+ time: Ce,
1625
+ select: ee,
1626
+ radio: ee,
1627
+ checkbox: ee,
1628
+ treeSelect: Ve,
1629
+ cascader: Ve
1630
+ }, Ha = {
1631
+ text: pa,
1632
+ digit: Pa,
1633
+ digitRange: Ca,
1634
+ date: Va,
1635
+ time: xa,
1636
+ select: Ka,
1637
+ treeSelect: ka,
1638
+ checkbox: wa,
1639
+ radio: Fa,
1640
+ switch: Ea,
1641
+ cascader: Ta,
1642
+ color: Ra
1297
1643
  };
1298
1644
  export {
1299
- Xe as FormMethods,
1300
- ra as InputNumberRange,
1301
- ea as ProCheckbox,
1302
- Qt as ProDrawer,
1303
- ua as ProDropdown,
1304
- Zt as ProForm,
1305
- pa as ProFormCascader,
1306
- ga as ProFormCheckbox,
1307
- Sa as ProFormColor,
1308
- fa as ProFormDatePicker,
1309
- ia as ProFormInputNumberRange,
1310
- Qe as ProFormItem,
1311
- va as ProFormRadio,
1312
- ma as ProFormSelect,
1313
- ba as ProFormSwitch,
1314
- ca as ProFormText,
1315
- da as ProFormTextNumber,
1316
- ya as ProFormTimePicker,
1317
- sa as ProFormTreeSelect,
1318
- et as ProLoading,
1319
- na as ProMenus,
1320
- tt as ProModal,
1321
- Xt as ProPagination,
1322
- Yt as ProPopover,
1323
- ta as ProRadio,
1324
- aa as ProSelect,
1325
- ot as ProTable,
1326
- rt as ProTableColumn,
1327
- Ca as ProTableOperateItem,
1328
- Ta as ProTabs,
1329
- Ra as ProTree,
1330
- lt as ProUploader,
1331
- Pa as TableMethods,
1332
- la as UploadMethods,
1333
- V as createFormItemComponent,
1334
- Ye as createLoadingId,
1335
- wa as elementMap,
1336
- Ma as formElementMap
1645
+ ct as FormMethods,
1646
+ sa as InputNumberRange,
1647
+ Sa as ProCascader,
1648
+ ca as ProCheckbox,
1649
+ oa as ProDrawer,
1650
+ va as ProDropdown,
1651
+ la as ProForm,
1652
+ Ta as ProFormCascader,
1653
+ wa as ProFormCheckbox,
1654
+ Ra as ProFormColor,
1655
+ Va as ProFormDatePicker,
1656
+ Ca as ProFormInputNumberRange,
1657
+ dt as ProFormItem,
1658
+ Fa as ProFormRadio,
1659
+ Ka as ProFormSelect,
1660
+ Ea as ProFormSwitch,
1661
+ pa as ProFormText,
1662
+ Pa as ProFormTextNumber,
1663
+ xa as ProFormTimePicker,
1664
+ ka as ProFormTreeSelect,
1665
+ mt as ProLoading,
1666
+ fa as ProMenus,
1667
+ ft as ProModal,
1668
+ ua as ProPagination,
1669
+ da as ProPopover,
1670
+ ia as ProRadio,
1671
+ ma as ProSelect,
1672
+ vt as ProTable,
1673
+ ht as ProTableColumn,
1674
+ $a as ProTableOperateItem,
1675
+ Ba as ProTableV2,
1676
+ za as ProTabs,
1677
+ ja as ProTree,
1678
+ ba as ProTreeSelect,
1679
+ gt as ProUploader,
1680
+ Ma as TableMethods,
1681
+ ga as TreeMethods,
1682
+ ya as UploadMethods,
1683
+ I as createFormItemComponent,
1684
+ it as createLoadingId,
1685
+ Wa as elementMap,
1686
+ Ha as formElementMap
1337
1687
  };