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
|
|
2
|
-
import {
|
|
3
|
-
|
|
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(
|
|
84
|
-
const
|
|
85
|
-
|
|
82
|
+
setup(e, { emit: y }) {
|
|
83
|
+
const n = pe(), l = e, t = y, i = (o) => {
|
|
84
|
+
t("click", o);
|
|
86
85
|
};
|
|
87
|
-
return (
|
|
88
|
-
const
|
|
89
|
-
return h(),
|
|
90
|
-
class: ["yw-button-" +
|
|
91
|
-
onClick:
|
|
92
|
-
}),
|
|
93
|
-
|
|
94
|
-
name:
|
|
95
|
-
fn: k((
|
|
96
|
-
|
|
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
|
-
|
|
104
|
-
|
|
102
|
+
G.install = (e) => {
|
|
103
|
+
e.component("YwButton", G);
|
|
105
104
|
};
|
|
106
|
-
const
|
|
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(
|
|
123
|
-
const
|
|
124
|
-
return (
|
|
125
|
-
class:
|
|
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
|
-
|
|
129
|
-
"xlink:href":
|
|
130
|
-
fill:
|
|
131
|
-
}, null, 8,
|
|
127
|
+
P("use", {
|
|
128
|
+
"xlink:href": l.value,
|
|
129
|
+
fill: e.color
|
|
130
|
+
}, null, 8, Be)
|
|
132
131
|
], 2));
|
|
133
132
|
}
|
|
134
|
-
}),
|
|
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: () =>
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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: () =>
|
|
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
|
-
|
|
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(
|
|
294
|
-
const
|
|
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
|
|
295
|
+
return n.modelValue;
|
|
297
296
|
},
|
|
298
|
-
set(
|
|
299
|
-
|
|
297
|
+
set(m) {
|
|
298
|
+
t("update:modelValue", m);
|
|
300
299
|
}
|
|
301
|
-
}),
|
|
302
|
-
|
|
303
|
-
},
|
|
304
|
-
|
|
305
|
-
},
|
|
306
|
-
|
|
307
|
-
}, s = (
|
|
308
|
-
|
|
309
|
-
},
|
|
310
|
-
|
|
311
|
-
},
|
|
312
|
-
|
|
313
|
-
},
|
|
314
|
-
|
|
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 (
|
|
317
|
-
const
|
|
318
|
-
return h(),
|
|
319
|
-
modelValue:
|
|
320
|
-
"onUpdate:modelValue":
|
|
321
|
-
popperClass:
|
|
322
|
-
onChange:
|
|
323
|
-
onClear:
|
|
324
|
-
onBlur:
|
|
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:
|
|
327
|
-
onVisibleChange:
|
|
328
|
-
onPanelChange:
|
|
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
|
-
|
|
364
|
-
|
|
362
|
+
le.install = (e) => {
|
|
363
|
+
e.component("YwDatePicker", le);
|
|
365
364
|
};
|
|
366
|
-
const
|
|
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(
|
|
400
|
-
const
|
|
401
|
-
|
|
398
|
+
setup(e, { emit: y }) {
|
|
399
|
+
const n = e, l = y, t = (i) => {
|
|
400
|
+
l("error", i);
|
|
402
401
|
};
|
|
403
|
-
return (
|
|
404
|
-
const
|
|
405
|
-
return h(),
|
|
406
|
-
|
|
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((
|
|
409
|
-
|
|
407
|
+
fn: k((_) => [
|
|
408
|
+
R(i.$slots, s, J(Q(_ || {})))
|
|
410
409
|
])
|
|
411
410
|
}))
|
|
412
411
|
]), 1040);
|
|
413
412
|
};
|
|
414
413
|
}
|
|
415
414
|
});
|
|
416
|
-
|
|
417
|
-
|
|
415
|
+
ae.install = (e) => {
|
|
416
|
+
e.component("YwAvatar", ae);
|
|
418
417
|
};
|
|
419
|
-
const
|
|
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: () =>
|
|
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
|
-
|
|
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: (
|
|
458
|
+
default: (e) => e
|
|
460
459
|
},
|
|
461
460
|
parser: {
|
|
462
461
|
type: Function,
|
|
463
|
-
default: (
|
|
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(
|
|
564
|
-
const
|
|
562
|
+
setup(e, { emit: y }) {
|
|
563
|
+
const n = e, l = y, t = z({
|
|
565
564
|
get() {
|
|
566
|
-
return
|
|
565
|
+
return n.modelValue;
|
|
567
566
|
},
|
|
568
|
-
set(
|
|
569
|
-
|
|
567
|
+
set(c) {
|
|
568
|
+
l("update:modelValue", c);
|
|
570
569
|
}
|
|
571
|
-
}),
|
|
572
|
-
|
|
573
|
-
},
|
|
574
|
-
|
|
575
|
-
},
|
|
576
|
-
|
|
577
|
-
},
|
|
578
|
-
|
|
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
|
-
|
|
581
|
-
},
|
|
582
|
-
|
|
583
|
-
},
|
|
584
|
-
|
|
585
|
-
},
|
|
586
|
-
|
|
587
|
-
},
|
|
588
|
-
|
|
589
|
-
},
|
|
590
|
-
|
|
591
|
-
},
|
|
592
|
-
|
|
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 (
|
|
595
|
-
const
|
|
596
|
-
return h(),
|
|
597
|
-
modelValue:
|
|
598
|
-
"onUpdate:modelValue":
|
|
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:
|
|
601
|
-
onChange:
|
|
602
|
-
onBlur:
|
|
603
|
-
onFocus:
|
|
599
|
+
onInput: i,
|
|
600
|
+
onChange: o,
|
|
601
|
+
onBlur: C,
|
|
602
|
+
onFocus: d,
|
|
604
603
|
onClear: s,
|
|
605
|
-
onKeydown:
|
|
606
|
-
onMouseleave:
|
|
607
|
-
onMouseenter:
|
|
608
|
-
onCompositionstart:
|
|
609
|
-
onCompositionupdate:
|
|
610
|
-
onCompositionend:
|
|
611
|
-
}),
|
|
612
|
-
|
|
613
|
-
name:
|
|
614
|
-
fn: k((
|
|
615
|
-
|
|
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
|
-
|
|
623
|
-
|
|
621
|
+
oe.install = (e) => {
|
|
622
|
+
e.component("YwInput", oe);
|
|
624
623
|
};
|
|
625
|
-
const
|
|
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: () =>
|
|
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
|
-
|
|
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: () =>
|
|
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
|
-
|
|
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(
|
|
835
|
-
const
|
|
836
|
-
const
|
|
837
|
-
if (
|
|
838
|
-
const
|
|
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:
|
|
841
|
-
props:
|
|
842
|
-
children:
|
|
843
|
-
key:
|
|
839
|
+
type: ie,
|
|
840
|
+
props: p.props || {},
|
|
841
|
+
children: v && v[0].children,
|
|
842
|
+
key: p.key
|
|
844
843
|
};
|
|
845
844
|
}
|
|
846
|
-
return
|
|
847
|
-
})),
|
|
845
|
+
return p;
|
|
846
|
+
})), o = y, C = z({
|
|
848
847
|
get() {
|
|
849
|
-
return
|
|
848
|
+
return n.modelValue;
|
|
850
849
|
},
|
|
851
|
-
set(
|
|
852
|
-
|
|
850
|
+
set(p) {
|
|
851
|
+
o("update:modelValue", p);
|
|
853
852
|
}
|
|
854
|
-
}),
|
|
855
|
-
|
|
856
|
-
}, s = (
|
|
857
|
-
|
|
858
|
-
},
|
|
859
|
-
|
|
860
|
-
},
|
|
861
|
-
|
|
862
|
-
},
|
|
863
|
-
|
|
864
|
-
},
|
|
865
|
-
|
|
866
|
-
},
|
|
867
|
-
|
|
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 (
|
|
870
|
-
modelValue:
|
|
871
|
-
"onUpdate:modelValue":
|
|
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:
|
|
873
|
+
onChange: d,
|
|
875
874
|
onVisibleChange: s,
|
|
876
|
-
onRemoveTag:
|
|
877
|
-
onClear:
|
|
878
|
-
onBlur:
|
|
879
|
-
onFocus:
|
|
880
|
-
onPopupScroll:
|
|
875
|
+
onRemoveTag: _,
|
|
876
|
+
onClear: x,
|
|
877
|
+
onBlur: m,
|
|
878
|
+
onFocus: N,
|
|
879
|
+
onPopupScroll: V
|
|
881
880
|
}), {
|
|
882
881
|
default: k(() => [
|
|
883
|
-
|
|
884
|
-
key:
|
|
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
|
-
|
|
886
|
+
ee(K(v.children), 1)
|
|
888
887
|
]),
|
|
889
888
|
_: 2
|
|
890
|
-
}, 1040))), 128)) : (h(!0),
|
|
891
|
-
key:
|
|
892
|
-
label:
|
|
893
|
-
value:
|
|
894
|
-
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
|
-
|
|
902
|
-
|
|
900
|
+
ne.install = (e) => {
|
|
901
|
+
e.component("YwSelect", ne);
|
|
903
902
|
};
|
|
904
|
-
E.install = (
|
|
905
|
-
|
|
903
|
+
E.install = (e) => {
|
|
904
|
+
e.component("YwSvgIcon", E);
|
|
906
905
|
};
|
|
907
|
-
const
|
|
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(
|
|
916
|
-
const
|
|
917
|
-
if (
|
|
918
|
-
let
|
|
919
|
-
Array.isArray(
|
|
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 (
|
|
922
|
-
const
|
|
923
|
-
return h(),
|
|
924
|
-
(h(!0),
|
|
925
|
-
key:
|
|
926
|
-
class:
|
|
927
|
-
"is-checked":
|
|
928
|
-
"is-disabled": s.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: (
|
|
929
|
+
onClick: (x) => i(s.value, s.disabled)
|
|
931
930
|
}, [
|
|
932
|
-
|
|
933
|
-
|
|
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 ||
|
|
937
|
-
}, null, 8, ["icon-class"])) : (h(),
|
|
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 ||
|
|
939
|
+
"icon-class": s.disabled || o.disabled ? "unchecked_disabled" : "unchecked"
|
|
941
940
|
}, null, 8, ["icon-class"])),
|
|
942
|
-
|
|
941
|
+
P("span", Ne, K(s.label), 1)
|
|
943
942
|
])
|
|
944
|
-
], 10,
|
|
943
|
+
], 10, xe))), 128))
|
|
945
944
|
]);
|
|
946
945
|
};
|
|
947
946
|
}
|
|
948
947
|
});
|
|
949
|
-
|
|
950
|
-
|
|
948
|
+
re.install = (e) => {
|
|
949
|
+
e.component("YwCheckboxGroup", re);
|
|
951
950
|
};
|
|
952
|
-
const
|
|
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(
|
|
961
|
-
const
|
|
962
|
-
if (
|
|
963
|
-
let
|
|
964
|
-
Array.isArray(
|
|
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 (
|
|
967
|
-
const
|
|
968
|
-
return h(),
|
|
969
|
-
(h(!0),
|
|
970
|
-
key:
|
|
971
|
-
class:
|
|
972
|
-
"is-checked":
|
|
973
|
-
"is-disabled": s.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: (
|
|
974
|
+
onClick: (x) => i(s.value, s.disabled)
|
|
976
975
|
}, [
|
|
977
|
-
|
|
978
|
-
|
|
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 ||
|
|
982
|
-
}, null, 8, ["icon-class"])) : (h(),
|
|
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 ||
|
|
984
|
+
"icon-class": s.disabled || o.disabled ? "unchecked_disabled" : "unchecked"
|
|
986
985
|
}, null, 8, ["icon-class"])),
|
|
987
|
-
|
|
986
|
+
P("span", Ae, K(s.label), 1)
|
|
988
987
|
])
|
|
989
|
-
], 10,
|
|
988
|
+
], 10, De))), 128))
|
|
990
989
|
]);
|
|
991
990
|
};
|
|
992
991
|
}
|
|
993
992
|
});
|
|
994
|
-
|
|
995
|
-
|
|
993
|
+
se.install = (e) => {
|
|
994
|
+
e.component("YwRadioGroup", se);
|
|
996
995
|
};
|
|
997
|
-
const
|
|
996
|
+
const Ee = {
|
|
998
997
|
key: 1,
|
|
999
998
|
class: "dialog-footer"
|
|
1000
|
-
},
|
|
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: !
|
|
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: (
|
|
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: () =>
|
|
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(
|
|
1123
|
-
const
|
|
1124
|
-
|
|
1125
|
-
},
|
|
1126
|
-
|
|
1127
|
-
},
|
|
1128
|
-
|
|
1129
|
-
},
|
|
1130
|
-
|
|
1131
|
-
},
|
|
1132
|
-
|
|
1133
|
-
},
|
|
1134
|
-
|
|
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
|
-
|
|
1135
|
+
n("submit");
|
|
1137
1136
|
};
|
|
1138
|
-
return (
|
|
1139
|
-
const
|
|
1140
|
-
return h(),
|
|
1141
|
-
onOpen:
|
|
1142
|
-
onOpened:
|
|
1143
|
-
onClose:
|
|
1144
|
-
onClosed:
|
|
1145
|
-
onOpenAutoFocus:
|
|
1146
|
-
onCloseAutoFocus:
|
|
1147
|
-
}),
|
|
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
|
-
|
|
1150
|
-
L(
|
|
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
|
-
|
|
1151
|
+
ee(K(e.cancelText), 1)
|
|
1157
1152
|
]),
|
|
1158
1153
|
_: 1
|
|
1159
1154
|
}),
|
|
1160
|
-
L(
|
|
1155
|
+
L(G, {
|
|
1161
1156
|
type: "primary",
|
|
1162
1157
|
onClick: s
|
|
1163
1158
|
}, {
|
|
1164
1159
|
default: k(() => [
|
|
1165
|
-
|
|
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
|
-
|
|
1174
|
-
name:
|
|
1175
|
-
fn: k((
|
|
1176
|
-
|
|
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
|
-
|
|
1184
|
-
|
|
1178
|
+
de.install = (e) => {
|
|
1179
|
+
e.component("YwDialog", de);
|
|
1185
1180
|
};
|
|
1186
|
-
const
|
|
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: () =>
|
|
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(
|
|
1291
|
-
const
|
|
1292
|
-
|
|
1293
|
-
},
|
|
1294
|
-
|
|
1295
|
-
},
|
|
1296
|
-
|
|
1297
|
-
}, s = (
|
|
1298
|
-
|
|
1299
|
-
},
|
|
1300
|
-
|
|
1301
|
-
},
|
|
1302
|
-
|
|
1303
|
-
},
|
|
1304
|
-
|
|
1305
|
-
},
|
|
1306
|
-
|
|
1307
|
-
},
|
|
1308
|
-
|
|
1309
|
-
},
|
|
1310
|
-
|
|
1311
|
-
},
|
|
1312
|
-
|
|
1313
|
-
},
|
|
1314
|
-
|
|
1315
|
-
},
|
|
1316
|
-
|
|
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
|
|
1313
|
+
return y({
|
|
1319
1314
|
clearSelection: () => {
|
|
1320
|
-
const
|
|
1321
|
-
|
|
1315
|
+
const u = i.value;
|
|
1316
|
+
u && u.setCurrentKey(null);
|
|
1322
1317
|
}
|
|
1323
|
-
}), (
|
|
1324
|
-
const S =
|
|
1325
|
-
return h(),
|
|
1318
|
+
}), (u, b) => {
|
|
1319
|
+
const S = $("el-tree");
|
|
1320
|
+
return h(), B(S, D({
|
|
1326
1321
|
ref_key: "treeRef",
|
|
1327
|
-
ref:
|
|
1322
|
+
ref: i,
|
|
1328
1323
|
class: "custom-tree"
|
|
1329
|
-
},
|
|
1330
|
-
onNodeClick:
|
|
1331
|
-
onNodeContextmenu:
|
|
1332
|
-
onCheckChange:
|
|
1324
|
+
}, l, {
|
|
1325
|
+
onNodeClick: o,
|
|
1326
|
+
onNodeContextmenu: C,
|
|
1327
|
+
onCheckChange: d,
|
|
1333
1328
|
onCheck: s,
|
|
1334
|
-
onCurrentChange:
|
|
1335
|
-
onNodeExpand:
|
|
1336
|
-
onNodeCollapse:
|
|
1337
|
-
onNodeDragStart:
|
|
1338
|
-
onNodeDragEnter:
|
|
1339
|
-
onNodeDragLeave:
|
|
1340
|
-
onNodeDragOver:
|
|
1341
|
-
onNodeDragEnd:
|
|
1342
|
-
onNodeDrop:
|
|
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:
|
|
1345
|
-
|
|
1346
|
-
node:
|
|
1347
|
-
data:
|
|
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
|
-
|
|
1356
|
-
|
|
1350
|
+
ce.install = (e) => {
|
|
1351
|
+
e.component("YwTree", ce);
|
|
1357
1352
|
};
|
|
1358
|
-
const
|
|
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: {
|
|
1362
|
+
size: {},
|
|
1368
1363
|
showHeader: { type: Boolean, default: !0 },
|
|
1369
|
-
highlightCurrentRow: { type: Boolean
|
|
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: [
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
},
|
|
1426
|
-
|
|
1427
|
-
},
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
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
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
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:
|
|
1453
|
-
onCellDblclick:
|
|
1454
|
-
onCellContextmenu:
|
|
1455
|
-
onRowClick:
|
|
1456
|
-
onRowContextmenu:
|
|
1457
|
-
onRowDblclick:
|
|
1458
|
-
onHeaderClick:
|
|
1459
|
-
onHeaderContextmenu:
|
|
1460
|
-
onSortChange:
|
|
1461
|
-
onFilterChange:
|
|
1462
|
-
onCurrentChange:
|
|
1463
|
-
onHeaderDragend:
|
|
1464
|
-
onExpandChange:
|
|
1465
|
-
onScroll:
|
|
1466
|
-
}),
|
|
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),
|
|
1469
|
-
|
|
1470
|
-
name:
|
|
1471
|
-
fn: k((
|
|
1472
|
-
|
|
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
|
-
_:
|
|
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
|
-
|
|
1490
|
-
|
|
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
|
|
1493
|
-
install(
|
|
1494
|
-
|
|
1495
|
-
|
|
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
|
-
|
|
1501
|
-
Oe as default
|
|
1538
|
+
Re as default
|
|
1502
1539
|
};
|