erp-plus 1.0.13 → 1.0.15

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.
@@ -1,7 +1,6 @@
1
- import pe, { ElOption as ce, ElSelect as fe } from "element-plus";
2
- import { default as Ae } from "element-plus";
3
- import { defineComponent as A, useSlots as ue, resolveComponent as F, createBlock as v, openBlock as h, mergeProps as D, createSlots as P, renderList as O, unref as U, withCtx as k, renderSlot as T, normalizeProps as Y, guardReactiveProps as H, computed as M, createElementBlock as $, normalizeClass as ne, createElementVNode as R, h as x, createVNode as L, isRef as ye, Fragment as j, resolveDynamicComponent as he, createTextVNode as W, toDisplayString as K, ref as me } from "vue";
4
- const q = /* @__PURE__ */ A({
1
+ import _e, { ElOption as ie, ElSelect as ve } from "element-plus";
2
+ import { defineComponent as A, useSlots as pe, resolveComponent as $, createBlock as B, openBlock as h, mergeProps as D, createSlots as q, renderList as M, unref as W, withCtx as k, renderSlot as R, normalizeProps as J, guardReactiveProps as Q, computed as z, createElementBlock as O, normalizeClass as X, createElementVNode as P, h as w, createVNode as L, isRef as Se, Fragment as I, resolveDynamicComponent as ke, createTextVNode as ee, toDisplayString as K, ref as te } from "vue";
3
+ const G = /* @__PURE__ */ A({
5
4
  __name: "Button",
6
5
  props: {
7
6
  // 基础属性
@@ -80,30 +79,30 @@ const q = /* @__PURE__ */ A({
80
79
  }
81
80
  },
82
81
  emits: ["click"],
83
- setup(t, { emit: p }) {
84
- const e = ue(), n = t, a = p, f = (l) => {
85
- a("click", l);
82
+ setup(e, { emit: y }) {
83
+ const n = pe(), l = e, t = y, i = (o) => {
84
+ t("click", o);
86
85
  };
87
- return (l, b) => {
88
- const c = F("el-button");
89
- return h(), v(c, D(n, {
90
- class: ["yw-button-" + t.type, "yw-button"],
91
- onClick: f
92
- }), P({ _: 2 }, [
93
- O(U(e), (s, m) => ({
94
- name: m,
95
- fn: k((w) => [
96
- T(l.$slots, m, Y(H(w || {})))
86
+ return (o, C) => {
87
+ const d = $("el-button");
88
+ return h(), B(d, D(l, {
89
+ class: ["yw-button-" + e.type, "yw-button"],
90
+ onClick: i
91
+ }), q({ _: 2 }, [
92
+ M(W(n), (s, _) => ({
93
+ name: _,
94
+ fn: k((x) => [
95
+ R(o.$slots, _, J(Q(x || {})))
97
96
  ])
98
97
  }))
99
98
  ]), 1040, ["class"]);
100
99
  };
101
100
  }
102
101
  });
103
- q.install = (t) => {
104
- t.component("YwButton", q);
102
+ G.install = (e) => {
103
+ e.component("YwButton", G);
105
104
  };
106
- const ge = ["xlink:href", "fill"], E = /* @__PURE__ */ A({
105
+ const Be = ["xlink:href", "fill"], E = /* @__PURE__ */ A({
107
106
  __name: "index",
108
107
  props: {
109
108
  iconClass: {
@@ -119,19 +118,19 @@ const ge = ["xlink:href", "fill"], E = /* @__PURE__ */ A({
119
118
  default: ""
120
119
  }
121
120
  },
122
- setup(t) {
123
- const p = t, e = M(() => p.className ? (console.log(p.className), `svg-icon ${p.className}`) : "svg-icon"), n = M(() => `#icon-${p.iconClass}`);
124
- return (a, f) => (h(), $("svg", {
125
- class: ne(e.value),
121
+ setup(e) {
122
+ const y = e, n = z(() => y.className ? (console.log(y.className), `svg-icon ${y.className}`) : "svg-icon"), l = z(() => `#icon-${y.iconClass}`);
123
+ return (t, i) => (h(), O("svg", {
124
+ class: X(n.value),
126
125
  "aria-hidden": "true"
127
126
  }, [
128
- R("use", {
129
- "xlink:href": n.value,
130
- fill: t.color
131
- }, null, 8, ge)
127
+ P("use", {
128
+ "xlink:href": l.value,
129
+ fill: e.color
130
+ }, null, 8, Be)
132
131
  ], 2));
133
132
  }
134
- }), J = /* @__PURE__ */ A({
133
+ }), le = /* @__PURE__ */ A({
135
134
  __name: "DatePicker",
136
135
  props: {
137
136
  modelValue: {
@@ -209,7 +208,7 @@ const ge = ["xlink:href", "fill"], E = /* @__PURE__ */ A({
209
208
  },
210
209
  prefixIcon: {
211
210
  type: [String, Object],
212
- default: () => x("svg", {
211
+ default: () => w("svg", {
213
212
  viewBox: "0 0 1024 1024",
214
213
  width: "16",
215
214
  height: "16",
@@ -218,20 +217,20 @@ const ge = ["xlink:href", "fill"], E = /* @__PURE__ */ A({
218
217
  "aria-hidden": "true",
219
218
  style: { color: "#838599" }
220
219
  }, [
221
- x("path", {
220
+ w("path", {
222
221
  d: "M640 53.312a32 32 0 0 1 32 32V256a32 32 0 0 1-64 0v-53.312H448a32 32 0 0 1 0-64h160v-53.312a32 32 0 0 1 32-32zM96 426.688a32 32 0 0 1 32-32h768a32 32 0 0 1 32 32v384c0 64.768-52.48 117.312-117.312 117.312H213.312A117.312 117.312 0 0 1 96 810.688v-384z m64 32v352c0 29.44 23.872 53.312 53.312 53.312h597.376c29.44 0 53.312-23.872 53.312-53.312v-352h-704z"
223
222
  }),
224
- x("path", {
223
+ w("path", {
225
224
  d: "M213.312 202.688A53.312 53.312 0 0 0 160 256v170.688a32 32 0 0 1-64 0V256c0-64.768 52.48-117.312 117.312-117.312h85.376a32 32 0 0 1 0 64H213.312z"
226
225
  }),
227
- x("path", {
226
+ w("path", {
228
227
  d: "M298.688 53.312a32 32 0 0 1 32 32V256a32 32 0 1 1-64 0V85.312a32 32 0 0 1 32-32zM757.312 170.688a32 32 0 0 1 32-32h21.376c64.768 0 117.312 52.48 117.312 117.312v170.688a32 32 0 0 1-64 0V256a53.312 53.312 0 0 0-53.312-53.312h-21.376a32 32 0 0 1-32-32z"
229
228
  })
230
229
  ])
231
230
  },
232
231
  clearIcon: {
233
232
  type: [String, Object],
234
- default: () => x("svg", {
233
+ default: () => w("svg", {
235
234
  viewBox: "0 0 1024 1024",
236
235
  width: "12",
237
236
  height: "12",
@@ -239,7 +238,7 @@ const ge = ["xlink:href", "fill"], E = /* @__PURE__ */ A({
239
238
  class: "your-prefix-clear-icon",
240
239
  style: { color: "#b2b4c6" }
241
240
  }, [
242
- x("path", {
241
+ w("path", {
243
242
  d: "M0 512a512 512 0 1 0 1024 0A512 512 0 0 0 0 512z m631.210667-179.541333a42.666667 42.666667 0 0 1 60.330666 60.416L572.330667 512l119.210666 119.125333a42.666667 42.666667 0 0 1-60.330666 60.416L512 572.330667 392.874667 691.541333a42.666667 42.666667 0 0 1-60.330667-60.416L451.669333 512 332.544 392.874667a42.666667 42.666667 0 1 1 60.330667-60.416L512 451.669333l119.210667-119.210666z"
244
243
  })
245
244
  ])
@@ -290,42 +289,42 @@ const ge = ["xlink:href", "fill"], E = /* @__PURE__ */ A({
290
289
  }
291
290
  },
292
291
  emits: ["update:modelValue", "change", "clear", "blur", "focus", "calendar-change", "visible-change", "panel-change"],
293
- setup(t, { emit: p }) {
294
- const e = t, n = M(() => e.type === "daterange" || e.type === "datetimerange" ? `yw-daterange-picker ${e.popperClass}` : `yw-date-picker ${e.popperClass}`), a = p, f = M({
292
+ setup(e, { emit: y }) {
293
+ const n = e, l = z(() => n.type === "daterange" || n.type === "datetimerange" ? `yw-daterange-picker ${n.popperClass}` : `yw-date-picker ${n.popperClass}`), t = y, i = z({
295
294
  get() {
296
- return e.modelValue;
295
+ return n.modelValue;
297
296
  },
298
- set(y) {
299
- a("update:modelValue", y);
297
+ set(m) {
298
+ t("update:modelValue", m);
300
299
  }
301
- }), l = (y) => {
302
- a("change", y);
303
- }, b = (y) => {
304
- a("clear", y);
305
- }, c = (y) => {
306
- a("blur", y);
307
- }, s = (y) => {
308
- a("focus", y);
309
- }, m = (y) => {
310
- a("calendar-change", y);
311
- }, w = (y) => {
312
- a("visible-change", y);
313
- }, V = (y) => {
314
- a("panel-change", y);
300
+ }), o = (m) => {
301
+ t("change", m);
302
+ }, C = (m) => {
303
+ t("clear", m);
304
+ }, d = (m) => {
305
+ t("blur", m);
306
+ }, s = (m) => {
307
+ t("focus", m);
308
+ }, _ = (m) => {
309
+ t("calendar-change", m);
310
+ }, x = (m) => {
311
+ t("visible-change", m);
312
+ }, N = (m) => {
313
+ t("panel-change", m);
315
314
  };
316
- return (y, N) => {
317
- const u = F("el-date-picker");
318
- return h(), v(u, D(e, {
319
- modelValue: f.value,
320
- "onUpdate:modelValue": N[0] || (N[0] = (r) => f.value = r),
321
- popperClass: n.value,
322
- onChange: l,
323
- onClear: b,
324
- onBlur: c,
315
+ return (m, V) => {
316
+ const p = $("el-date-picker");
317
+ return h(), B(p, D(n, {
318
+ modelValue: i.value,
319
+ "onUpdate:modelValue": V[0] || (V[0] = (c) => i.value = c),
320
+ popperClass: l.value,
321
+ onChange: o,
322
+ onClear: C,
323
+ onBlur: d,
325
324
  onFocus: s,
326
- onCalendarChange: m,
327
- onVisibleChange: w,
328
- onPanelChange: V
325
+ onCalendarChange: _,
326
+ onVisibleChange: x,
327
+ onPanelChange: N
329
328
  }), {
330
329
  "prev-month": k(() => [
331
330
  L(E, {
@@ -360,10 +359,10 @@ const ge = ["xlink:href", "fill"], E = /* @__PURE__ */ A({
360
359
  };
361
360
  }
362
361
  });
363
- J.install = (t) => {
364
- t.component("YwDatePicker", J);
362
+ le.install = (e) => {
363
+ e.component("YwDatePicker", le);
365
364
  };
366
- const Q = /* @__PURE__ */ A({
365
+ const ae = /* @__PURE__ */ A({
367
366
  __name: "Avatar",
368
367
  props: {
369
368
  size: {
@@ -396,27 +395,27 @@ const Q = /* @__PURE__ */ A({
396
395
  }
397
396
  },
398
397
  emits: ["error"],
399
- setup(t, { emit: p }) {
400
- const e = t, n = p, a = (f) => {
401
- n("error", f);
398
+ setup(e, { emit: y }) {
399
+ const n = e, l = y, t = (i) => {
400
+ l("error", i);
402
401
  };
403
- return (f, l) => {
404
- const b = F("el-avatar");
405
- return h(), v(b, D(e, { onError: a }), P({ _: 2 }, [
406
- O(f.$slots, (c, s) => ({
402
+ return (i, o) => {
403
+ const C = $("el-avatar");
404
+ return h(), B(C, D(n, { onError: t }), q({ _: 2 }, [
405
+ M(i.$slots, (d, s) => ({
407
406
  name: s,
408
- fn: k((m) => [
409
- T(f.$slots, s, Y(H(m || {})))
407
+ fn: k((_) => [
408
+ R(i.$slots, s, J(Q(_ || {})))
410
409
  ])
411
410
  }))
412
411
  ]), 1040);
413
412
  };
414
413
  }
415
414
  });
416
- Q.install = (t) => {
417
- t.component("YwAvatar", Q);
415
+ ae.install = (e) => {
416
+ e.component("YwAvatar", ae);
418
417
  };
419
- const X = /* @__PURE__ */ A({
418
+ const oe = /* @__PURE__ */ A({
420
419
  __name: "Input",
421
420
  props: {
422
421
  modelValue: {
@@ -441,7 +440,7 @@ const X = /* @__PURE__ */ A({
441
440
  },
442
441
  clearIcon: {
443
442
  type: [String, Object],
444
- default: () => x("svg", {
443
+ default: () => w("svg", {
445
444
  viewBox: "0 0 1024 1024",
446
445
  width: "12",
447
446
  height: "12",
@@ -449,18 +448,18 @@ const X = /* @__PURE__ */ A({
449
448
  class: "your-prefix-clear-icon",
450
449
  style: { color: "#b2b4c6" }
451
450
  }, [
452
- x("path", {
451
+ w("path", {
453
452
  d: "M0 512a512 512 0 1 0 1024 0A512 512 0 0 0 0 512z m631.210667-179.541333a42.666667 42.666667 0 0 1 60.330666 60.416L572.330667 512l119.210666 119.125333a42.666667 42.666667 0 0 1-60.330666 60.416L512 572.330667 392.874667 691.541333a42.666667 42.666667 0 0 1-60.330667-60.416L451.669333 512 332.544 392.874667a42.666667 42.666667 0 1 1 60.330667-60.416L512 451.669333l119.210667-119.210666z"
454
453
  })
455
454
  ])
456
455
  },
457
456
  formatter: {
458
457
  type: Function,
459
- default: (t) => t
458
+ default: (e) => e
460
459
  },
461
460
  parser: {
462
461
  type: Function,
463
- default: (t) => t
462
+ default: (e) => e
464
463
  },
465
464
  maxlength: {
466
465
  type: Number,
@@ -560,69 +559,69 @@ const X = /* @__PURE__ */ A({
560
559
  }
561
560
  },
562
561
  emits: ["update:modelValue", "change", "blur", "focus", "input", "clear", "keydown", "mouseleave", "mouseenter", "compositionstart", "compositionupdate", "compositionend"],
563
- setup(t, { emit: p }) {
564
- const e = t, n = p, a = M({
562
+ setup(e, { emit: y }) {
563
+ const n = e, l = y, t = z({
565
564
  get() {
566
- return e.modelValue;
565
+ return n.modelValue;
567
566
  },
568
- set(r) {
569
- n("update:modelValue", r);
567
+ set(c) {
568
+ l("update:modelValue", c);
570
569
  }
571
- }), f = (r) => {
572
- n("input", r);
573
- }, l = (r) => {
574
- n("change", r);
575
- }, b = (r) => {
576
- n("blur", r);
577
- }, c = (r) => {
578
- n("focus", r);
570
+ }), i = (c) => {
571
+ l("input", c);
572
+ }, o = (c) => {
573
+ l("change", c);
574
+ }, C = (c) => {
575
+ l("blur", c);
576
+ }, d = (c) => {
577
+ l("focus", c);
579
578
  }, s = () => {
580
- n("clear");
581
- }, m = (r) => {
582
- n("keydown", r);
583
- }, w = (r) => {
584
- n("mouseleave", r);
585
- }, V = (r) => {
586
- n("mouseenter", r);
587
- }, y = (r) => {
588
- n("compositionstart", r);
589
- }, N = (r) => {
590
- n("compositionupdate", r);
591
- }, u = (r) => {
592
- n("compositionend", r);
579
+ l("clear");
580
+ }, _ = (c) => {
581
+ l("keydown", c);
582
+ }, x = (c) => {
583
+ l("mouseleave", c);
584
+ }, N = (c) => {
585
+ l("mouseenter", c);
586
+ }, m = (c) => {
587
+ l("compositionstart", c);
588
+ }, V = (c) => {
589
+ l("compositionupdate", c);
590
+ }, p = (c) => {
591
+ l("compositionend", c);
593
592
  };
594
- return (r, C) => {
595
- const z = F("el-input");
596
- return h(), v(z, D(e, {
597
- modelValue: U(a),
598
- "onUpdate:modelValue": C[0] || (C[0] = (I) => ye(a) ? a.value = I : null),
593
+ return (c, v) => {
594
+ const T = $("el-input");
595
+ return h(), B(T, D(n, {
596
+ modelValue: W(t),
597
+ "onUpdate:modelValue": v[0] || (v[0] = (Y) => Se(t) ? t.value = Y : null),
599
598
  class: "yw-input",
600
- onInput: f,
601
- onChange: l,
602
- onBlur: b,
603
- onFocus: c,
599
+ onInput: i,
600
+ onChange: o,
601
+ onBlur: C,
602
+ onFocus: d,
604
603
  onClear: s,
605
- onKeydown: m,
606
- onMouseleave: w,
607
- onMouseenter: V,
608
- onCompositionstart: y,
609
- onCompositionupdate: N,
610
- onCompositionend: u
611
- }), P({ _: 2 }, [
612
- O(r.$slots, (I, d) => ({
613
- name: d,
614
- fn: k((g) => [
615
- T(r.$slots, d, Y(H(g || {})))
604
+ onKeydown: _,
605
+ onMouseleave: x,
606
+ onMouseenter: N,
607
+ onCompositionstart: m,
608
+ onCompositionupdate: V,
609
+ onCompositionend: p
610
+ }), q({ _: 2 }, [
611
+ M(c.$slots, (Y, u) => ({
612
+ name: u,
613
+ fn: k((b) => [
614
+ R(c.$slots, u, J(Q(b || {})))
616
615
  ])
617
616
  }))
618
617
  ]), 1040, ["modelValue"]);
619
618
  };
620
619
  }
621
620
  });
622
- X.install = (t) => {
623
- t.component("YwInput", X);
621
+ oe.install = (e) => {
622
+ e.component("YwInput", oe);
624
623
  };
625
- const Z = /* @__PURE__ */ A({
624
+ const ne = /* @__PURE__ */ A({
626
625
  __name: "Select",
627
626
  props: {
628
627
  modelValue: {
@@ -760,7 +759,7 @@ const Z = /* @__PURE__ */ A({
760
759
  },
761
760
  clearIcon: {
762
761
  type: [String, Object],
763
- default: () => x("svg", {
762
+ default: () => w("svg", {
764
763
  viewBox: "0 0 1024 1024",
765
764
  width: "12",
766
765
  height: "12",
@@ -768,7 +767,7 @@ const Z = /* @__PURE__ */ A({
768
767
  class: "your-prefix-clear-icon",
769
768
  style: { color: "#b2b4c6" }
770
769
  }, [
771
- x("path", {
770
+ w("path", {
772
771
  d: "M0 512a512 512 0 1 0 1024 0A512 512 0 0 0 0 512z m631.210667-179.541333a42.666667 42.666667 0 0 1 60.330666 60.416L572.330667 512l119.210666 119.125333a42.666667 42.666667 0 0 1-60.330666 60.416L512 572.330667 392.874667 691.541333a42.666667 42.666667 0 0 1-60.330667-60.416L451.669333 512 332.544 392.874667a42.666667 42.666667 0 1 1 60.330667-60.416L512 451.669333l119.210667-119.210666z"
773
772
  })
774
773
  ])
@@ -779,7 +778,7 @@ const Z = /* @__PURE__ */ A({
779
778
  },
780
779
  suffixIcon: {
781
780
  type: [String, Object],
782
- default: () => x("svg", {
781
+ default: () => w("svg", {
783
782
  viewBox: "0 0 1024 1024",
784
783
  width: "12",
785
784
  height: "12",
@@ -788,7 +787,7 @@ const Z = /* @__PURE__ */ A({
788
787
  "aria-hidden": "true",
789
788
  style: { color: "#1a1a1a" }
790
789
  }, [
791
- x("path", {
790
+ w("path", {
792
791
  d: "M396.458667 396.458667a42.666667 42.666667 0 0 1 60.416 0L682.666667 622.336l225.792-225.877333a42.666667 42.666667 0 0 1 60.416 60.416l-256 256a42.666667 42.666667 0 0 1-60.416 0l-256-256a42.666667 42.666667 0 0 1 0-60.416z"
793
792
  })
794
793
  ])
@@ -831,80 +830,80 @@ const Z = /* @__PURE__ */ A({
831
830
  }
832
831
  },
833
832
  emits: ["update:modelValue", "change", "visible-change", "remove-tag", "clear", "focus", "blur", "popup-scroll"],
834
- setup(t, { emit: p }) {
835
- const e = t, n = M(() => e.props), a = ue(), f = M(() => a.default?.().length === 0 ? [] : a.default?.().flatMap((u) => {
836
- const r = String(u.type);
837
- if (r.includes("yw-option") || r.includes("ywOption")) {
838
- const C = u.children;
833
+ setup(e, { emit: y }) {
834
+ const n = e, l = z(() => n.props), t = pe(), i = z(() => t.default?.().length === 0 ? [] : t.default?.().flatMap((p) => {
835
+ const c = String(p.type);
836
+ if (c.includes("yw-option") || c.includes("ywOption")) {
837
+ const v = p.children;
839
838
  return {
840
- type: ce,
841
- props: u.props || {},
842
- children: C && C[0].children,
843
- key: u.key
839
+ type: ie,
840
+ props: p.props || {},
841
+ children: v && v[0].children,
842
+ key: p.key
844
843
  };
845
844
  }
846
- return u;
847
- })), l = p, b = M({
845
+ return p;
846
+ })), o = y, C = z({
848
847
  get() {
849
- return e.modelValue;
848
+ return n.modelValue;
850
849
  },
851
- set(u) {
852
- l("update:modelValue", u);
850
+ set(p) {
851
+ o("update:modelValue", p);
853
852
  }
854
- }), c = (u) => {
855
- l("change", u);
856
- }, s = (u) => {
857
- l("visible-change", u);
858
- }, m = (u) => {
859
- l("remove-tag", u);
860
- }, w = () => {
861
- l("clear");
862
- }, V = (u) => {
863
- l("focus", u);
864
- }, y = (u) => {
865
- l("blur", u);
866
- }, N = (u) => {
867
- l("popup-scroll", u);
853
+ }), d = (p) => {
854
+ o("change", p);
855
+ }, s = (p) => {
856
+ o("visible-change", p);
857
+ }, _ = (p) => {
858
+ o("remove-tag", p);
859
+ }, x = () => {
860
+ o("clear");
861
+ }, N = (p) => {
862
+ o("focus", p);
863
+ }, m = (p) => {
864
+ o("blur", p);
865
+ }, V = (p) => {
866
+ o("popup-scroll", p);
868
867
  };
869
- return (u, r) => (h(), v(U(fe), D(e, {
870
- modelValue: b.value,
871
- "onUpdate:modelValue": r[0] || (r[0] = (C) => b.value = C),
868
+ return (p, c) => (h(), B(W(ve), D(n, {
869
+ modelValue: C.value,
870
+ "onUpdate:modelValue": c[0] || (c[0] = (v) => C.value = v),
872
871
  class: "yw-select",
873
872
  "popper-class": "yw-select-popper",
874
- onChange: c,
873
+ onChange: d,
875
874
  onVisibleChange: s,
876
- onRemoveTag: m,
877
- onClear: w,
878
- onBlur: y,
879
- onFocus: V,
880
- onPopupScroll: N
875
+ onRemoveTag: _,
876
+ onClear: x,
877
+ onBlur: m,
878
+ onFocus: N,
879
+ onPopupScroll: V
881
880
  }), {
882
881
  default: k(() => [
883
- u.$slots.default ? (h(!0), $(j, { key: 0 }, O(f.value, (C, z) => (h(), v(he(C.type), D({ ref_for: !0 }, C.props, {
884
- key: C.key || z
882
+ p.$slots.default ? (h(!0), O(I, { key: 0 }, M(i.value, (v, T) => (h(), B(ke(v.type), D({ ref_for: !0 }, v.props, {
883
+ key: v.key || T
885
884
  }), {
886
885
  default: k(() => [
887
- W(K(C.children), 1)
886
+ ee(K(v.children), 1)
888
887
  ]),
889
888
  _: 2
890
- }, 1040))), 128)) : (h(!0), $(j, { key: 1 }, O(t.options, (C) => (h(), v(U(ce), {
891
- key: C[n.value.value],
892
- label: C[n.value.label],
893
- value: C[n.value.value],
894
- disabled: C[n.value.disabled]
889
+ }, 1040))), 128)) : (h(!0), O(I, { key: 1 }, M(e.options, (v) => (h(), B(W(ie), {
890
+ key: v[l.value.value],
891
+ label: v[l.value.label],
892
+ value: v[l.value.value],
893
+ disabled: v[l.value.disabled]
895
894
  }, null, 8, ["label", "value", "disabled"]))), 128))
896
895
  ]),
897
896
  _: 1
898
897
  }, 16, ["modelValue"]));
899
898
  }
900
899
  });
901
- Z.install = (t) => {
902
- t.component("YwSelect", Z);
900
+ ne.install = (e) => {
901
+ e.component("YwSelect", ne);
903
902
  };
904
- E.install = (t) => {
905
- t.component("YwSvgIcon", E);
903
+ E.install = (e) => {
904
+ e.component("YwSvgIcon", E);
906
905
  };
907
- const be = { class: "custom-checkbox-group" }, Ce = ["onClick"], _e = { class: "custom-checkbox" }, Se = { class: "checkbox-label" }, ee = /* @__PURE__ */ A({
906
+ const we = { class: "custom-checkbox-group" }, xe = ["onClick"], Ve = { class: "custom-checkbox" }, Ne = { class: "checkbox-label" }, re = /* @__PURE__ */ A({
908
907
  __name: "CheckboxGroup",
909
908
  props: {
910
909
  modelValue: { type: [Array, String, Number, Boolean] },
@@ -912,44 +911,44 @@ const be = { class: "custom-checkbox-group" }, Ce = ["onClick"], _e = { class: "
912
911
  options: {}
913
912
  },
914
913
  emits: ["update:modelValue", "change"],
915
- setup(t, { emit: p }) {
916
- const e = t, n = p, a = (l) => Array.isArray(e.modelValue) ? e.modelValue.includes(l) : e.modelValue === l, f = (l, b) => {
917
- if (b || e.disabled) return;
918
- let c;
919
- Array.isArray(e.modelValue) ? a(l) ? c = e.modelValue.filter((s) => s !== l) : c = [...e.modelValue, l] : a(l) ? c = "" : c = l, n("update:modelValue", c), n("change", c);
914
+ setup(e, { emit: y }) {
915
+ const n = e, l = y, t = (o) => Array.isArray(n.modelValue) ? n.modelValue.includes(o) : n.modelValue === o, i = (o, C) => {
916
+ if (C || n.disabled) return;
917
+ let d;
918
+ Array.isArray(n.modelValue) ? t(o) ? d = n.modelValue.filter((s) => s !== o) : d = [...n.modelValue, o] : t(o) ? d = "" : d = o, l("update:modelValue", d), l("change", d);
920
919
  };
921
- return (l, b) => {
922
- const c = F("svg-icon");
923
- return h(), $("div", be, [
924
- (h(!0), $(j, null, O(l.options, (s, m) => (h(), $("div", {
925
- key: m,
926
- class: ne(["custom-checkbox-wrapper", {
927
- "is-checked": a(s.value),
928
- "is-disabled": s.disabled || l.disabled
920
+ return (o, C) => {
921
+ const d = $("svg-icon");
922
+ return h(), O("div", we, [
923
+ (h(!0), O(I, null, M(o.options, (s, _) => (h(), O("div", {
924
+ key: _,
925
+ class: X(["custom-checkbox-wrapper", {
926
+ "is-checked": t(s.value),
927
+ "is-disabled": s.disabled || o.disabled
929
928
  }]),
930
- onClick: (w) => f(s.value, s.disabled)
929
+ onClick: (x) => i(s.value, s.disabled)
931
930
  }, [
932
- R("span", _e, [
933
- a(s.value) ? (h(), v(c, {
931
+ P("span", Ve, [
932
+ t(s.value) ? (h(), B(d, {
934
933
  key: 0,
935
934
  style: { width: "16px", height: "16px" },
936
- "icon-class": s.disabled || l.disabled ? "checked_disabled_fill" : "checked_fill"
937
- }, null, 8, ["icon-class"])) : (h(), v(c, {
935
+ "icon-class": s.disabled || o.disabled ? "checked_disabled_fill" : "checked_fill"
936
+ }, null, 8, ["icon-class"])) : (h(), B(d, {
938
937
  key: 1,
939
938
  style: { width: "16px", height: "16px" },
940
- "icon-class": s.disabled || l.disabled ? "unchecked_disabled" : "unchecked"
939
+ "icon-class": s.disabled || o.disabled ? "unchecked_disabled" : "unchecked"
941
940
  }, null, 8, ["icon-class"])),
942
- R("span", Se, K(s.label), 1)
941
+ P("span", Ne, K(s.label), 1)
943
942
  ])
944
- ], 10, Ce))), 128))
943
+ ], 10, xe))), 128))
945
944
  ]);
946
945
  };
947
946
  }
948
947
  });
949
- ee.install = (t) => {
950
- t.component("YwCheckboxGroup", ee);
948
+ re.install = (e) => {
949
+ e.component("YwCheckboxGroup", re);
951
950
  };
952
- const Be = { class: "custom-checkbox-group" }, ke = ["onClick"], ve = { class: "custom-checkbox" }, we = { class: "checkbox-label" }, te = /* @__PURE__ */ A({
951
+ const $e = { class: "custom-checkbox-group" }, De = ["onClick"], Oe = { class: "custom-checkbox" }, Ae = { class: "checkbox-label" }, se = /* @__PURE__ */ A({
953
952
  __name: "RadioGroup",
954
953
  props: {
955
954
  modelValue: { type: [Array, String, Number, Boolean] },
@@ -957,47 +956,47 @@ const Be = { class: "custom-checkbox-group" }, ke = ["onClick"], ve = { class: "
957
956
  options: {}
958
957
  },
959
958
  emits: ["update:modelValue", "change"],
960
- setup(t, { emit: p }) {
961
- const e = t, n = p, a = (l) => Array.isArray(e.modelValue) ? e.modelValue.includes(l) : e.modelValue === l, f = (l, b) => {
962
- if (b || e.disabled) return;
963
- let c;
964
- Array.isArray(e.modelValue) ? a(l) ? c = e.modelValue.filter((s) => s !== l) : c = [...e.modelValue, l] : a(l) ? c = "" : c = l, n("update:modelValue", c), n("change", c);
959
+ setup(e, { emit: y }) {
960
+ const n = e, l = y, t = (o) => Array.isArray(n.modelValue) ? n.modelValue.includes(o) : n.modelValue === o, i = (o, C) => {
961
+ if (C || n.disabled) return;
962
+ let d;
963
+ Array.isArray(n.modelValue) ? t(o) ? d = n.modelValue.filter((s) => s !== o) : d = [...n.modelValue, o] : t(o) ? d = "" : d = o, l("update:modelValue", d), l("change", d);
965
964
  };
966
- return (l, b) => {
967
- const c = F("svg-icon");
968
- return h(), $("div", Be, [
969
- (h(!0), $(j, null, O(l.options, (s, m) => (h(), $("div", {
970
- key: m,
971
- class: ne(["custom-checkbox-wrapper", {
972
- "is-checked": a(s.value),
973
- "is-disabled": s.disabled || l.disabled
965
+ return (o, C) => {
966
+ const d = $("svg-icon");
967
+ return h(), O("div", $e, [
968
+ (h(!0), O(I, null, M(o.options, (s, _) => (h(), O("div", {
969
+ key: _,
970
+ class: X(["custom-checkbox-wrapper", {
971
+ "is-checked": t(s.value),
972
+ "is-disabled": s.disabled || o.disabled
974
973
  }]),
975
- onClick: (w) => f(s.value, s.disabled)
974
+ onClick: (x) => i(s.value, s.disabled)
976
975
  }, [
977
- R("span", ve, [
978
- a(s.value) ? (h(), v(c, {
976
+ P("span", Oe, [
977
+ t(s.value) ? (h(), B(d, {
979
978
  key: 0,
980
979
  style: { width: "16px", height: "16px" },
981
- "icon-class": s.disabled || l.disabled ? "checked_disabled_fill" : "checked_fill"
982
- }, null, 8, ["icon-class"])) : (h(), v(c, {
980
+ "icon-class": s.disabled || o.disabled ? "checked_disabled_fill" : "checked_fill"
981
+ }, null, 8, ["icon-class"])) : (h(), B(d, {
983
982
  key: 1,
984
983
  style: { width: "16px", height: "16px" },
985
- "icon-class": s.disabled || l.disabled ? "unchecked_disabled" : "unchecked"
984
+ "icon-class": s.disabled || o.disabled ? "unchecked_disabled" : "unchecked"
986
985
  }, null, 8, ["icon-class"])),
987
- R("span", we, K(s.label), 1)
986
+ P("span", Ae, K(s.label), 1)
988
987
  ])
989
- ], 10, ke))), 128))
988
+ ], 10, De))), 128))
990
989
  ]);
991
990
  };
992
991
  }
993
992
  });
994
- te.install = (t) => {
995
- t.component("YwRadioGroup", te);
993
+ se.install = (e) => {
994
+ e.component("YwRadioGroup", se);
996
995
  };
997
- const xe = {
996
+ const Ee = {
998
997
  key: 1,
999
998
  class: "dialog-footer"
1000
- }, le = /* @__PURE__ */ A({
999
+ }, de = /* @__PURE__ */ A({
1001
1000
  __name: "Dialog",
1002
1001
  props: {
1003
1002
  modelValue: {
@@ -1022,7 +1021,7 @@ const xe = {
1022
1021
  },
1023
1022
  modal: {
1024
1023
  type: Boolean,
1025
- default: !0
1024
+ default: !1
1026
1025
  },
1027
1026
  modalPenetrable: {
1028
1027
  type: Boolean,
@@ -1078,7 +1077,7 @@ const xe = {
1078
1077
  },
1079
1078
  beforeClose: {
1080
1079
  type: Function,
1081
- default: (t) => t
1080
+ default: (e) => e
1082
1081
  },
1083
1082
  draggable: {
1084
1083
  type: Boolean,
@@ -1102,7 +1101,7 @@ const xe = {
1102
1101
  },
1103
1102
  closeIcon: {
1104
1103
  type: Function,
1105
- default: () => x(E, { iconClass: "16_16_close", color: "#1a1a1a" })
1104
+ default: () => w(E, { iconClass: "16_16_close", color: "#1a1a1a" })
1106
1105
  // 设置默认参数
1107
1106
  },
1108
1107
  zIndex: {
@@ -1119,50 +1118,46 @@ const xe = {
1119
1118
  }
1120
1119
  },
1121
1120
  emits: ["open", "opened", "close", "closed", "open-auto-focus", "close-auto-focus", "submit"],
1122
- setup(t, { emit: p }) {
1123
- const e = p, n = () => {
1124
- e("open");
1125
- }, a = () => {
1126
- e("opened");
1127
- }, f = () => {
1128
- e("close");
1129
- }, l = () => {
1130
- e("closed");
1131
- }, b = () => {
1132
- e("open-auto-focus");
1133
- }, c = () => {
1134
- e("close-auto-focus");
1121
+ setup(e, { emit: y }) {
1122
+ const n = y, l = () => {
1123
+ n("open");
1124
+ }, t = () => {
1125
+ n("opened");
1126
+ }, i = () => {
1127
+ n("close");
1128
+ }, o = () => {
1129
+ n("closed");
1130
+ }, C = () => {
1131
+ n("open-auto-focus");
1132
+ }, d = () => {
1133
+ n("close-auto-focus");
1135
1134
  }, s = () => {
1136
- e("submit");
1135
+ n("submit");
1137
1136
  };
1138
- return (m, w) => {
1139
- const V = F("CustomButton"), y = F("el-dialog");
1140
- return h(), v(y, D(m.$props, {
1141
- onOpen: n,
1142
- onOpened: a,
1143
- onClose: f,
1144
- onClosed: l,
1145
- onOpenAutoFocus: b,
1146
- onCloseAutoFocus: c
1147
- }), P({
1137
+ return (_, x) => {
1138
+ const N = $("el-dialog");
1139
+ return h(), B(N, D({ class: "yw-dialog" }, _.$props, {
1140
+ onOpen: l,
1141
+ onOpened: t,
1142
+ onClose: i,
1143
+ onClosed: o,
1144
+ onOpenAutoFocus: C,
1145
+ onCloseAutoFocus: d
1146
+ }), q({
1148
1147
  footer: k(() => [
1149
- m.$slots.footer ? T(m.$slots, "footer", { key: 0 }) : (h(), $("div", xe, [
1150
- L(V, {
1151
- type: "secondary",
1152
- plain: "",
1153
- onClick: f
1154
- }, {
1148
+ _.$slots.footer ? R(_.$slots, "footer", { key: 0 }) : (h(), O("div", Ee, [
1149
+ L(G, { onClick: i }, {
1155
1150
  default: k(() => [
1156
- W(K(t.cancelText), 1)
1151
+ ee(K(e.cancelText), 1)
1157
1152
  ]),
1158
1153
  _: 1
1159
1154
  }),
1160
- L(V, {
1155
+ L(G, {
1161
1156
  type: "primary",
1162
1157
  onClick: s
1163
1158
  }, {
1164
1159
  default: k(() => [
1165
- W(K(t.confirmText), 1)
1160
+ ee(K(e.confirmText), 1)
1166
1161
  ]),
1167
1162
  _: 1
1168
1163
  })
@@ -1170,20 +1165,20 @@ const xe = {
1170
1165
  ]),
1171
1166
  _: 2
1172
1167
  }, [
1173
- O(m.$slots, (N, u) => ({
1174
- name: u,
1175
- fn: k((r) => [
1176
- T(m.$slots, u, Y(H(r || {})))
1168
+ M(_.$slots, (m, V) => ({
1169
+ name: V,
1170
+ fn: k((p) => [
1171
+ R(_.$slots, V, J(Q(p || {})))
1177
1172
  ])
1178
1173
  }))
1179
1174
  ]), 1040);
1180
1175
  };
1181
1176
  }
1182
1177
  });
1183
- le.install = (t) => {
1184
- t.component("YwDialog", le);
1178
+ de.install = (e) => {
1179
+ e.component("YwDialog", de);
1185
1180
  };
1186
- const ae = /* @__PURE__ */ A({
1181
+ const ce = /* @__PURE__ */ A({
1187
1182
  __name: "Tree",
1188
1183
  props: {
1189
1184
  data: {
@@ -1268,7 +1263,7 @@ const ae = /* @__PURE__ */ A({
1268
1263
  },
1269
1264
  icon: {
1270
1265
  type: Object,
1271
- default: () => x(E, { iconClass: "12_12_fill_arrow_right" })
1266
+ default: () => w(E, { iconClass: "12_12_fill_arrow_right" })
1272
1267
  // 设置默认参数
1273
1268
  },
1274
1269
  lazy: {
@@ -1287,64 +1282,64 @@ const ae = /* @__PURE__ */ A({
1287
1282
  }
1288
1283
  },
1289
1284
  emits: ["node-click", "node-contextmenu", "check-change", "check", "current-change", "node-expand", "node-collapse", "node-drag-start", "node-drag-enter", "node-drag-leave", "node-drag-over", "node-drag-end", "node-drop"],
1290
- setup(t, { expose: p, emit: e }) {
1291
- const n = t, a = e, f = me(), l = (d, g, S) => {
1292
- a("node-click", d, g, S);
1293
- }, b = (d, g, S) => {
1294
- a("node-contextmenu", d, g, S);
1295
- }, c = (d, g, S) => {
1296
- a("check-change", d, g, S);
1297
- }, s = (d, g) => {
1298
- a("check", d, g);
1299
- }, m = (d) => {
1300
- a("current-change", d);
1301
- }, w = (d) => {
1302
- a("node-expand", d);
1303
- }, V = (d) => {
1304
- a("node-collapse", d);
1305
- }, y = (d, g) => {
1306
- a("node-drag-start", d, g);
1307
- }, N = (d, g, S) => {
1308
- a("node-drag-enter", d, g, S);
1309
- }, u = (d, g, S) => {
1310
- a("node-drag-leave", d, g, S);
1311
- }, r = (d, g, S) => {
1312
- a("node-drag-over", d, g, S);
1313
- }, C = (d, g, S) => {
1314
- a("node-drag-end", d, g, S);
1315
- }, z = (d, g, S, o) => {
1316
- a("node-drop", d, g, S, o);
1285
+ setup(e, { expose: y, emit: n }) {
1286
+ const l = e, t = n, i = te(), o = (u, b, S) => {
1287
+ t("node-click", u, b, S);
1288
+ }, C = (u, b, S) => {
1289
+ t("node-contextmenu", u, b, S);
1290
+ }, d = (u, b, S) => {
1291
+ t("check-change", u, b, S);
1292
+ }, s = (u, b) => {
1293
+ t("check", u, b);
1294
+ }, _ = (u) => {
1295
+ t("current-change", u);
1296
+ }, x = (u) => {
1297
+ t("node-expand", u);
1298
+ }, N = (u) => {
1299
+ t("node-collapse", u);
1300
+ }, m = (u, b) => {
1301
+ t("node-drag-start", u, b);
1302
+ }, V = (u, b, S) => {
1303
+ t("node-drag-enter", u, b, S);
1304
+ }, p = (u, b, S) => {
1305
+ t("node-drag-leave", u, b, S);
1306
+ }, c = (u, b, S) => {
1307
+ t("node-drag-over", u, b, S);
1308
+ }, v = (u, b, S) => {
1309
+ t("node-drag-end", u, b, S);
1310
+ }, T = (u, b, S, H) => {
1311
+ t("node-drop", u, b, S, H);
1317
1312
  };
1318
- return p({
1313
+ return y({
1319
1314
  clearSelection: () => {
1320
- const d = f.value;
1321
- d && d.setCurrentKey(null);
1315
+ const u = i.value;
1316
+ u && u.setCurrentKey(null);
1322
1317
  }
1323
- }), (d, g) => {
1324
- const S = F("el-tree");
1325
- return h(), v(S, D({
1318
+ }), (u, b) => {
1319
+ const S = $("el-tree");
1320
+ return h(), B(S, D({
1326
1321
  ref_key: "treeRef",
1327
- ref: f,
1322
+ ref: i,
1328
1323
  class: "custom-tree"
1329
- }, n, {
1330
- onNodeClick: l,
1331
- onNodeContextmenu: b,
1332
- onCheckChange: c,
1324
+ }, l, {
1325
+ onNodeClick: o,
1326
+ onNodeContextmenu: C,
1327
+ onCheckChange: d,
1333
1328
  onCheck: s,
1334
- onCurrentChange: m,
1335
- onNodeExpand: w,
1336
- onNodeCollapse: V,
1337
- onNodeDragStart: y,
1338
- onNodeDragEnter: N,
1339
- onNodeDragLeave: u,
1340
- onNodeDragOver: r,
1341
- onNodeDragEnd: C,
1342
- onNodeDrop: z
1329
+ onCurrentChange: _,
1330
+ onNodeExpand: x,
1331
+ onNodeCollapse: N,
1332
+ onNodeDragStart: m,
1333
+ onNodeDragEnter: V,
1334
+ onNodeDragLeave: p,
1335
+ onNodeDragOver: c,
1336
+ onNodeDragEnd: v,
1337
+ onNodeDrop: T
1343
1338
  }), {
1344
- default: k(({ node: o, data: i }) => [
1345
- T(d.$slots, "default", {
1346
- node: o,
1347
- data: i
1339
+ default: k(({ node: H, data: Z }) => [
1340
+ R(u.$slots, "default", {
1341
+ node: H,
1342
+ data: Z
1348
1343
  })
1349
1344
  ]),
1350
1345
  _: 3
@@ -1352,22 +1347,21 @@ const ae = /* @__PURE__ */ A({
1352
1347
  };
1353
1348
  }
1354
1349
  });
1355
- ae.install = (t) => {
1356
- t.component("YwTree", ae);
1350
+ ce.install = (e) => {
1351
+ e.component("YwTree", ce);
1357
1352
  };
1358
- const oe = /* @__PURE__ */ A({
1353
+ const Me = /* @__PURE__ */ A({
1359
1354
  __name: "Table",
1360
1355
  props: {
1361
- data: {},
1356
+ data: { default: () => [] },
1362
1357
  columns: {},
1363
1358
  height: { default: "auto" },
1364
1359
  maxHeight: { default: "auto" },
1365
1360
  stripe: { type: Boolean, default: !1 },
1366
1361
  border: { type: Boolean, default: !1 },
1367
- size: { default: "" },
1362
+ size: {},
1368
1363
  showHeader: { type: Boolean, default: !0 },
1369
- highlightCurrentRow: { type: Boolean, default: !1 },
1370
- currentRowKey: { default: "" },
1364
+ highlightCurrentRow: { type: Boolean },
1371
1365
  rowClassName: {},
1372
1366
  rowStyle: {},
1373
1367
  cellClassName: {},
@@ -1375,128 +1369,171 @@ const oe = /* @__PURE__ */ A({
1375
1369
  headerRowClassName: {},
1376
1370
  headerRowStyle: {},
1377
1371
  headerCellClassName: {},
1378
- headerCellStyle: {},
1379
- rowKey: { type: [String, Function], default: "" },
1380
- emptyText: { default: "暂无数据" },
1381
- defaultExpandAll: { type: Boolean, default: !1 },
1382
- expandRowKeys: { default: () => [] },
1383
- defaultSort: { default: () => ({}) },
1384
- tooltipEffect: { default: "dark" },
1385
- appendFilterPanelTo: { default: "body" },
1386
- showSummary: { type: Boolean, default: !1 },
1387
- sumText: { default: "合计" },
1388
- summaryMethod: { type: Function, default: (t) => t },
1389
- selectOnIndeterminate: { type: Boolean, default: !1 },
1390
- indent: { default: 16 },
1391
- lazy: { type: Boolean, default: !1 },
1392
- load: {},
1393
- treeProps: { default: () => ({}) },
1394
- tableLayout: { default: "fixed" },
1395
- showOverflowTooltip: { type: [Boolean, Object] },
1396
- flexible: { type: Boolean, default: !1 },
1397
- scrollbarTabindex: { default: 0 },
1398
- allowDragLastColumn: { type: Boolean, default: !1 },
1399
- tooltipFormatter: { type: Function, default: (t) => "" },
1400
- preserveExpandedContent: { type: Boolean, default: !1 },
1401
- nativeScrollbar: { type: Boolean, default: !1 }
1372
+ headerCellStyle: {}
1402
1373
  },
1403
- emits: ["select", "select-all", "selection-change", "cell-mouse-enter", "cell-mouse-leave", "cell-click", "cell-dblclick", "cell-contextmenu", "row-click", "row-contextmenu", "row-dblclick", "header-click", "header-contextmenu", "sort-change", "filter-change", "current-change", "header-dragend", "expand-change", "scroll"],
1404
- setup(t, { emit: p }) {
1405
- const e = p, n = t, a = (o, i) => {
1406
- e("select", o, i);
1407
- }, f = (o) => {
1408
- e("select-all", o);
1409
- }, l = (o) => {
1410
- e("selection-change", o);
1411
- }, b = (o, i, _, B) => {
1412
- e("cell-mouse-enter", o, i, _, B);
1413
- }, c = (o, i, _, B) => {
1414
- e("cell-mouse-leave", o, i, _, B);
1415
- }, s = (o, i, _, B) => {
1416
- e("cell-click", o, i, _, B);
1417
- }, m = (o, i, _, B) => {
1418
- e("cell-dblclick", o, i, _, B);
1419
- }, w = (o, i, _, B) => {
1420
- e("cell-contextmenu", o, i, _, B);
1421
- }, V = (o, i, _, B) => {
1422
- e("row-click", o, i, _, B);
1423
- }, y = (o, i, _, B) => {
1424
- e("row-dblclick", o, i, _, B);
1425
- }, N = (o, i, _, B) => {
1426
- e("row-contextmenu", o, i, _, B);
1427
- }, u = (o, i) => {
1428
- e("header-click", o, i);
1429
- }, r = (o, i) => {
1430
- e("header-contextmenu", o, i);
1431
- }, C = (o, i, _) => {
1432
- e("sort-change", o, i, _);
1433
- }, z = (o) => {
1434
- e("filter-change", o);
1435
- }, I = (o, i) => {
1436
- e("current-change", o, i);
1437
- }, d = (o, i, _) => {
1438
- e("header-dragend", o, i, _);
1439
- }, g = (o, i) => {
1440
- e("expand-change", o, i);
1441
- }, S = (o) => {
1442
- e("scroll", o);
1374
+ emits: [
1375
+ "select",
1376
+ "select-all",
1377
+ "selection-change",
1378
+ "cell-mouse-enter",
1379
+ "cell-mouse-leave",
1380
+ "cell-click",
1381
+ "cell-dblclick",
1382
+ "cell-contextmenu",
1383
+ "row-click",
1384
+ "row-contextmenu",
1385
+ "row-dblclick",
1386
+ "header-click",
1387
+ "header-contextmenu",
1388
+ "sort-change",
1389
+ "filter-change",
1390
+ "current-change",
1391
+ "header-dragend",
1392
+ "expand-change",
1393
+ "scroll"
1394
+ ],
1395
+ setup(e, { expose: y, emit: n }) {
1396
+ const l = n, t = e, i = te({}), o = te(), C = (a, r) => i.value[a]?.[r], d = (a, r, f) => {
1397
+ i.value[a] || (i.value[a] = {}), f ? i.value[a][r] = f : (delete i.value[a][r], Object.keys(i.value[a]).length === 0 && delete i.value[a]);
1398
+ }, s = (a, r) => {
1399
+ const f = t.columns?.find((F) => F.prop === r), g = t.data?.[a];
1400
+ if (!f || !f.required || !r || !g)
1401
+ return d(a, r, null), !0;
1402
+ const j = g[r];
1403
+ return j == null || j === "" ? (d(a, r, `${f.label || f.prop} 为必填项`), !1) : (d(a, r, null), !0);
1443
1404
  };
1444
- return (o, i) => {
1445
- const _ = F("el-table-Column"), B = F("el-table");
1446
- return h(), v(B, D(n, {
1447
- onSelect: a,
1448
- onSelectAll: f,
1449
- onSelectionChange: l,
1450
- onCellMouseEnter: b,
1405
+ y({
1406
+ validate: async () => {
1407
+ if (!t.columns || !t.data) return !0;
1408
+ let a = !0;
1409
+ return t.data.forEach((r, f) => {
1410
+ t.columns.forEach((g) => {
1411
+ g.required && g.prop && g.slotName && (s(f, g.prop) || (a = !1));
1412
+ });
1413
+ }), a;
1414
+ },
1415
+ clearValidate: () => {
1416
+ i.value = {};
1417
+ },
1418
+ validateCell: s,
1419
+ // 暴露给父组件,以便在插槽组件的事件中手动触发单项校验
1420
+ tableRef: o
1421
+ // 暴露 el-table 实例
1422
+ });
1423
+ const N = (a, r) => {
1424
+ l("select", a, r);
1425
+ }, m = (a) => {
1426
+ l("select-all", a);
1427
+ }, V = (a) => {
1428
+ l("selection-change", a);
1429
+ }, p = (a, r, f, g) => {
1430
+ l("cell-mouse-enter", a, r, f, g);
1431
+ }, c = (a, r, f, g) => {
1432
+ l("cell-mouse-leave", a, r, f, g);
1433
+ }, v = (a, r, f, g) => {
1434
+ l("cell-click", a, r, f, g);
1435
+ }, T = (a, r, f, g) => {
1436
+ l("cell-dblclick", a, r, f, g);
1437
+ }, Y = (a, r, f, g) => {
1438
+ l("cell-contextmenu", a, r, f, g);
1439
+ }, u = (a, r, f, g) => {
1440
+ l("row-click", a, r, f, g);
1441
+ }, b = (a, r, f, g) => {
1442
+ l("row-dblclick", a, r, f, g);
1443
+ }, S = (a, r, f, g) => {
1444
+ l("row-contextmenu", a, r, f, g);
1445
+ }, H = (a, r) => {
1446
+ l("header-click", a, r);
1447
+ }, Z = (a, r) => {
1448
+ l("header-contextmenu", a, r);
1449
+ }, fe = (a) => {
1450
+ l("sort-change", a);
1451
+ }, ye = (a) => {
1452
+ l("filter-change", a);
1453
+ }, he = (a, r) => {
1454
+ l("current-change", a, r);
1455
+ }, me = (a, r, f) => {
1456
+ l("header-dragend", a, r, f);
1457
+ }, ge = (a, r) => {
1458
+ l("expand-change", a, r);
1459
+ }, be = (a) => {
1460
+ l("scroll", a);
1461
+ };
1462
+ return (a, r) => {
1463
+ const f = $("el-tooltip"), g = $("el-table-column"), j = $("el-table");
1464
+ return h(), B(j, D({
1465
+ ref_key: "tableRef",
1466
+ ref: o
1467
+ }, t, {
1468
+ data: t.data,
1469
+ onSelect: N,
1470
+ onSelectAll: m,
1471
+ onSelectionChange: V,
1472
+ onCellMouseEnter: p,
1451
1473
  onCellMouseLeave: c,
1452
- onCellClick: s,
1453
- onCellDblclick: m,
1454
- onCellContextmenu: w,
1455
- onRowClick: V,
1456
- onRowContextmenu: N,
1457
- onRowDblclick: y,
1458
- onHeaderClick: u,
1459
- onHeaderContextmenu: r,
1460
- onSortChange: C,
1461
- onFilterChange: z,
1462
- onCurrentChange: I,
1463
- onHeaderDragend: d,
1464
- onExpandChange: g,
1465
- onScroll: S
1466
- }), P({
1474
+ onCellClick: v,
1475
+ onCellDblclick: T,
1476
+ onCellContextmenu: Y,
1477
+ onRowClick: u,
1478
+ onRowContextmenu: S,
1479
+ onRowDblclick: b,
1480
+ onHeaderClick: H,
1481
+ onHeaderContextmenu: Z,
1482
+ onSortChange: fe,
1483
+ onFilterChange: ye,
1484
+ onCurrentChange: he,
1485
+ onHeaderDragend: me,
1486
+ onExpandChange: ge,
1487
+ onScroll: be
1488
+ }), {
1467
1489
  default: k(() => [
1468
- (h(!0), $(j, null, O(n.columns, (re, G) => (h(), v(_, D({ key: G }, { ref_for: !0 }, re), P({ _: 2 }, [
1469
- O(o.$slots, (se, de) => ({
1470
- name: de,
1471
- fn: k((ie) => [
1472
- T(o.$slots, de, D({ ref_for: !0 }, ie || {}))
1473
- ])
1474
- }))
1490
+ (h(!0), O(I, null, M(t.columns, (F, Ce) => (h(), B(g, D({ key: Ce }, { ref_for: !0 }, F), q({ _: 2 }, [
1491
+ F.slotName ? {
1492
+ name: "default",
1493
+ fn: k((U) => [
1494
+ L(f, {
1495
+ visible: !!C(U.$index, F.prop),
1496
+ "show-arrow": !1,
1497
+ content: C(U.$index, F.prop),
1498
+ placement: "bottom-start",
1499
+ manual: "",
1500
+ effect: "light",
1501
+ "popper-class": "yw-table-error-tip"
1502
+ }, {
1503
+ default: k(() => [
1504
+ P("div", {
1505
+ class: X(["yw-table-cell-content", { "is-error": C(U.$index, F.prop) }])
1506
+ }, [
1507
+ R(a.$slots, F.slotName, D({ ref_for: !0 }, U || {}), void 0, !0)
1508
+ ], 2)
1509
+ ]),
1510
+ _: 2
1511
+ }, 1032, ["visible", "content"])
1512
+ ]),
1513
+ key: "0"
1514
+ } : void 0
1475
1515
  ]), 1040))), 128))
1476
1516
  ]),
1477
- _: 2
1478
- }, [
1479
- O(o.$slots, (re, G) => ({
1480
- name: G,
1481
- fn: k((se) => [
1482
- T(o.$slots, G, Y(H(se || {})))
1483
- ])
1484
- }))
1485
- ]), 1040);
1517
+ _: 3
1518
+ }, 16, ["data"]);
1486
1519
  };
1487
1520
  }
1488
- });
1489
- oe.install = (t) => {
1490
- t.component("YwInput", oe);
1521
+ }), Fe = (e, y) => {
1522
+ const n = e.__vccOpts || e;
1523
+ for (const [l, t] of y)
1524
+ n[l] = t;
1525
+ return n;
1526
+ }, ue = /* @__PURE__ */ Fe(Me, [["__scopeId", "data-v-509678e0"]]);
1527
+ ue.install = (e) => {
1528
+ e.component("YwTable", ue);
1491
1529
  };
1492
- const Ve = [q, J, Q, X, Z, E, ee, te, le, ae, oe], Oe = {
1493
- install(t) {
1494
- t.use(pe), Ve.forEach((p) => {
1495
- t.use(p);
1530
+ const ze = [G, le, ae, oe, ne, E, re, se, de, ce, ue], Re = {
1531
+ install(e) {
1532
+ e.use(_e), ze.forEach((y) => {
1533
+ e.use(y);
1496
1534
  });
1497
1535
  }
1498
1536
  };
1499
1537
  export {
1500
- Ae as ElementPlus,
1501
- Oe as default
1538
+ Re as default
1502
1539
  };