erp-plus 1.0.6 → 1.0.8

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,5 +1,6 @@
1
- import { defineComponent as r, useSlots as i, resolveComponent as d, createBlock as y, openBlock as B, mergeProps as m, createSlots as g, renderList as b, unref as S, withCtx as k, renderSlot as _, normalizeProps as v, guardReactiveProps as C } from "vue";
2
- const l = /* @__PURE__ */ r({
1
+ import { defineComponent as V, useSlots as U, resolveComponent as F, createBlock as B, openBlock as g, mergeProps as C, createSlots as k, renderList as w, unref as P, withCtx as _, renderSlot as O, normalizeProps as I, guardReactiveProps as N, computed as h, createElementBlock as M, normalizeClass as H, createElementVNode as J, h as x, createVNode as $, isRef as Q, Fragment as W, resolveDynamicComponent as X, createTextVNode as Z, toDisplayString as ee } from "vue";
2
+ import { ElOption as K, ElSelect as te } from "element-plus";
3
+ const j = /* @__PURE__ */ V({
3
4
  __name: "Button",
4
5
  props: {
5
6
  // 基础属性
@@ -78,36 +79,972 @@ const l = /* @__PURE__ */ r({
78
79
  }
79
80
  },
80
81
  emits: ["click"],
81
- setup(e, { emit: t }) {
82
- const a = i(), s = e, u = t, f = (o) => {
83
- u("click", o);
82
+ setup(e, { emit: i }) {
83
+ const r = U(), t = e, o = i, c = (d) => {
84
+ o("click", d);
84
85
  };
85
- return (o, w) => {
86
- const c = d("el-button");
87
- return B(), y(c, m(s, {
86
+ return (d, y) => {
87
+ const m = F("el-button");
88
+ return g(), B(m, C(t, {
88
89
  class: ["yw-button-" + e.type, "yw-button"],
89
- onClick: f
90
- }), g({ _: 2 }, [
91
- b(S(a), (j, n) => ({
92
- name: n,
93
- fn: k((p) => [
94
- _(o.$slots, n, v(C(p || {})))
90
+ onClick: c
91
+ }), k({ _: 2 }, [
92
+ w(P(r), (s, a) => ({
93
+ name: a,
94
+ fn: _((p) => [
95
+ O(d.$slots, a, I(N(p || {})))
95
96
  ])
96
97
  }))
97
98
  ]), 1040, ["class"]);
98
99
  };
99
100
  }
100
101
  });
101
- l.install = (e) => {
102
- e.component("YwButton", l);
102
+ j.install = (e) => {
103
+ e.component("YwButton", j);
103
104
  };
104
- const h = [l], O = {
105
+ const le = ["xlink:href", "fill"], v = /* @__PURE__ */ V({
106
+ __name: "index",
107
+ props: {
108
+ iconClass: {
109
+ type: String,
110
+ required: !0
111
+ },
112
+ className: {
113
+ type: String,
114
+ default: ""
115
+ },
116
+ color: {
117
+ type: String,
118
+ default: ""
119
+ }
120
+ },
121
+ setup(e) {
122
+ const i = e, r = h(() => i.className ? (console.log(i.className), `svg-icon ${i.className}`) : "svg-icon"), t = h(() => `#icon-${i.iconClass}`);
123
+ return (o, c) => (g(), M("svg", {
124
+ class: H(r.value),
125
+ "aria-hidden": "true"
126
+ }, [
127
+ J("use", {
128
+ "xlink:href": t.value,
129
+ fill: e.color
130
+ }, null, 8, le)
131
+ ], 2));
132
+ }
133
+ }), ae = /* @__PURE__ */ V({
134
+ __name: "DatePicker",
135
+ props: {
136
+ modelValue: {
137
+ type: [String, Number, Object],
138
+ default: ""
139
+ },
140
+ readonly: {
141
+ type: Boolean,
142
+ default: !1
143
+ },
144
+ disabled: {
145
+ type: Boolean,
146
+ default: !1
147
+ },
148
+ size: {
149
+ type: String,
150
+ default: ""
151
+ },
152
+ editable: {
153
+ type: Boolean,
154
+ default: !0
155
+ },
156
+ clearable: {
157
+ type: Boolean,
158
+ default: !0
159
+ },
160
+ placeholder: {
161
+ type: String,
162
+ default: ""
163
+ },
164
+ startPlaceholder: {
165
+ type: String,
166
+ default: ""
167
+ },
168
+ endPlaceholder: {
169
+ type: String,
170
+ default: ""
171
+ },
172
+ type: {
173
+ type: String,
174
+ default: "date"
175
+ },
176
+ format: {
177
+ type: String,
178
+ default: "yyyy-MM-dd"
179
+ },
180
+ popperClass: {
181
+ type: String,
182
+ default: ""
183
+ },
184
+ popperOptions: {
185
+ type: Object,
186
+ default: () => ({})
187
+ },
188
+ rangeSeparator: {
189
+ type: String,
190
+ default: " - "
191
+ },
192
+ defaultTime: [Date, [Date, Date]],
193
+ defaultValue: {
194
+ type: [Date, [Date, Date]],
195
+ default: () => ""
196
+ },
197
+ id: {
198
+ type: String,
199
+ default: ""
200
+ },
201
+ name: {
202
+ type: String,
203
+ default: ""
204
+ },
205
+ unlinkPanels: {
206
+ type: Boolean,
207
+ default: !1
208
+ },
209
+ prefixIcon: {
210
+ type: String,
211
+ default: () => x(v, { iconClass: "16_16_calendar", color: "#838599" })
212
+ // 设置默认参数
213
+ },
214
+ clearIcon: {
215
+ type: String,
216
+ default: () => x(v, { iconClass: "12_12_fill_delete", color: "#b2b4c6" })
217
+ // 设置默认参数
218
+ },
219
+ validateEvent: {
220
+ type: Boolean,
221
+ default: !0
222
+ },
223
+ disabledDate: {
224
+ type: Function,
225
+ default: () => !1
226
+ },
227
+ shortcuts: {
228
+ type: Array,
229
+ default: () => []
230
+ },
231
+ cellClassName: {
232
+ type: Function,
233
+ default: () => ""
234
+ },
235
+ teleported: {
236
+ type: Boolean,
237
+ default: !0
238
+ },
239
+ emptyValues: {
240
+ type: Array,
241
+ default: () => []
242
+ },
243
+ valueOnClear: {
244
+ type: [String, Number, Boolean, Function],
245
+ default: () => ""
246
+ },
247
+ placement: {
248
+ type: String,
249
+ default: "bottom"
250
+ },
251
+ showFooter: {
252
+ type: Boolean,
253
+ default: !0
254
+ },
255
+ showWeekNumber: {
256
+ type: Boolean,
257
+ default: !1
258
+ }
259
+ },
260
+ emits: ["update:modelValue", "change", "clear", "blur", "focus", "calendar-change", "visible-change", "panel-change"],
261
+ setup(e, { emit: i }) {
262
+ const r = e, t = h(() => r.type === "daterange" || r.type === "datetimerange" ? `yw-daterange-picker ${r.popperClass}` : `yw-date-picker ${r.popperClass}`), o = i, c = h({
263
+ get() {
264
+ return r.modelValue;
265
+ },
266
+ set(u) {
267
+ o("update:modelValue", u);
268
+ }
269
+ }), d = (u) => {
270
+ o("change", u);
271
+ }, y = (u) => {
272
+ o("clear", u);
273
+ }, m = (u) => {
274
+ o("blur", u);
275
+ }, s = (u) => {
276
+ o("focus", u);
277
+ }, a = (u) => {
278
+ o("calendar-change", u);
279
+ }, p = (u) => {
280
+ o("visible-change", u);
281
+ }, b = (u) => {
282
+ o("panel-change", u);
283
+ };
284
+ return (u, S) => {
285
+ const n = F("el-date-picker");
286
+ return g(), B(n, C(r, {
287
+ modelValue: c.value,
288
+ "onUpdate:modelValue": S[0] || (S[0] = (l) => c.value = l),
289
+ popperClass: t.value,
290
+ onChange: d,
291
+ onClear: y,
292
+ onBlur: m,
293
+ onFocus: s,
294
+ onCalendarChange: a,
295
+ onVisibleChange: p,
296
+ onPanelChange: b
297
+ }), {
298
+ "prev-month": _(() => [
299
+ $(v, {
300
+ iconClass: "16_16_arrow_left",
301
+ color: "#1a1a1a",
302
+ style: { width: "16px", height: "16px" }
303
+ })
304
+ ]),
305
+ "next-month": _(() => [
306
+ $(v, {
307
+ iconClass: "16_16_arrow_right",
308
+ color: "#1a1a1a",
309
+ style: { width: "16px", height: "16px" }
310
+ })
311
+ ]),
312
+ "prev-year": _(() => [
313
+ $(v, {
314
+ iconClass: "16_16_arrow_2left",
315
+ color: "#1a1a1a",
316
+ style: { width: "16px", height: "16px" }
317
+ })
318
+ ]),
319
+ "next-year": _(() => [
320
+ $(v, {
321
+ iconClass: "16_16_arrow_2right",
322
+ color: "#1a1a1a",
323
+ style: { width: "16px", height: "16px" }
324
+ })
325
+ ]),
326
+ _: 1
327
+ }, 16, ["modelValue", "popperClass"]);
328
+ };
329
+ }
330
+ }), oe = (e, i) => {
331
+ const r = e.__vccOpts || e;
332
+ for (const [t, o] of i)
333
+ r[t] = o;
334
+ return r;
335
+ }, z = /* @__PURE__ */ oe(ae, [["__scopeId", "data-v-3083e764"]]);
336
+ z.install = (e) => {
337
+ e.component("YwInput", z);
338
+ };
339
+ const D = /* @__PURE__ */ V({
340
+ __name: "Avatar",
341
+ props: {
342
+ size: {
343
+ type: Number,
344
+ default: 40
345
+ },
346
+ shape: {
347
+ type: String,
348
+ default: "circle"
349
+ },
350
+ icon: {
351
+ type: String,
352
+ default: ""
353
+ },
354
+ src: {
355
+ type: String,
356
+ default: ""
357
+ },
358
+ alt: {
359
+ type: String,
360
+ default: ""
361
+ },
362
+ srcSet: {
363
+ type: String,
364
+ default: ""
365
+ },
366
+ fit: {
367
+ type: String,
368
+ default: "cover"
369
+ }
370
+ },
371
+ emits: ["error"],
372
+ setup(e, { emit: i }) {
373
+ const r = e, t = i, o = (c) => {
374
+ t("error", c);
375
+ };
376
+ return (c, d) => {
377
+ const y = F("el-avatar");
378
+ return g(), B(y, C(r, { onError: o }), k({ _: 2 }, [
379
+ w(c.$slots, (m, s) => ({
380
+ name: s,
381
+ fn: _((a) => [
382
+ O(c.$slots, s, I(N(a || {})))
383
+ ])
384
+ }))
385
+ ]), 1040);
386
+ };
387
+ }
388
+ });
389
+ D.install = (e) => {
390
+ e.component("YwAvatar", D);
391
+ };
392
+ const E = /* @__PURE__ */ V({
393
+ __name: "Form",
394
+ props: {
395
+ modelValue: {
396
+ type: Object,
397
+ default: {}
398
+ },
399
+ rules: {
400
+ type: Object,
401
+ default: {}
402
+ },
403
+ inline: {
404
+ type: Boolean,
405
+ default: !1
406
+ },
407
+ labelPosition: {
408
+ type: String,
409
+ default: "right"
410
+ },
411
+ labelWidth: {
412
+ type: String,
413
+ default: ""
414
+ },
415
+ labelSuffix: {
416
+ type: String,
417
+ default: ""
418
+ },
419
+ hideRequiredAsterisk: {
420
+ type: Boolean,
421
+ default: !1
422
+ },
423
+ requireAsteriskPosition: {
424
+ type: String,
425
+ default: "left"
426
+ },
427
+ showMessage: {
428
+ type: Boolean,
429
+ default: !0
430
+ },
431
+ inlineMessage: {
432
+ type: Boolean,
433
+ default: !1
434
+ },
435
+ statusIcon: {
436
+ type: Boolean,
437
+ default: !1
438
+ },
439
+ validateOnRuleChange: {
440
+ type: Boolean,
441
+ default: !0
442
+ },
443
+ size: {
444
+ type: String,
445
+ default: ""
446
+ },
447
+ disabled: {
448
+ type: Boolean,
449
+ default: !1
450
+ },
451
+ scrollToError: {
452
+ type: Boolean,
453
+ default: !1
454
+ }
455
+ },
456
+ emits: ["validate", "validateField", "resetFields", "scrollToField", "clearValidate", "fields", "getField"],
457
+ setup(e, { emit: i }) {
458
+ const r = e, t = i, o = (a, p, b) => {
459
+ t("validate", a, p, b);
460
+ }, c = (a, p) => {
461
+ t("validateField", a, p);
462
+ }, d = (a) => {
463
+ t("resetFields", a);
464
+ }, y = (a) => {
465
+ t("scrollToField", a);
466
+ }, m = (a) => {
467
+ t("clearValidate", a);
468
+ }, s = (a) => {
469
+ t("getField", a);
470
+ };
471
+ return (a, p) => {
472
+ const b = F("el-form");
473
+ return g(), B(b, C(r, {
474
+ onValidate: o,
475
+ onValidateField: c,
476
+ onResetFields: d,
477
+ onScrollToField: y,
478
+ onClearValidate: m,
479
+ onGetField: s
480
+ }), k({ _: 2 }, [
481
+ w(a.$slots, (u, S) => ({
482
+ name: S,
483
+ fn: _((n) => [
484
+ O(a.$slots, S, I(N(n || {})))
485
+ ])
486
+ }))
487
+ ]), 1040);
488
+ };
489
+ }
490
+ });
491
+ E.install = (e) => {
492
+ e.component("YwForm", E);
493
+ };
494
+ const R = /* @__PURE__ */ V({
495
+ __name: "FormItem",
496
+ props: {
497
+ prop: {
498
+ type: String,
499
+ default: ""
500
+ },
501
+ label: {
502
+ type: String,
503
+ default: ""
504
+ },
505
+ labelPosition: {
506
+ type: String,
507
+ default: ""
508
+ },
509
+ labelWidth: {
510
+ type: [String, Number],
511
+ default: ""
512
+ },
513
+ required: {
514
+ type: Boolean,
515
+ default: !1
516
+ },
517
+ rules: {
518
+ type: [Object, Array],
519
+ default: void 0
520
+ },
521
+ error: {
522
+ type: String,
523
+ default: ""
524
+ },
525
+ showMessage: {
526
+ type: Boolean,
527
+ default: !0
528
+ },
529
+ inlineMessage: {
530
+ type: Boolean,
531
+ default: !1
532
+ },
533
+ size: {
534
+ type: String,
535
+ default: ""
536
+ },
537
+ for: {
538
+ type: String,
539
+ default: ""
540
+ },
541
+ validateStatus: {
542
+ type: String,
543
+ default: ""
544
+ }
545
+ },
546
+ emits: ["validate", "resetFields", "clearValidate"],
547
+ setup(e, { expose: i, emit: r }) {
548
+ const t = e, o = r, c = h(() => {
549
+ const { ...s } = t;
550
+ return Object.fromEntries(
551
+ Object.entries(s).filter(([a, p]) => p !== void 0 && p !== "")
552
+ );
553
+ }), d = (s, a, p) => {
554
+ o("validate", s, a, p);
555
+ }, y = (s) => {
556
+ o("resetFields", s);
557
+ }, m = (s) => {
558
+ o("clearValidate", s);
559
+ };
560
+ return i({
561
+ size: h(() => document.querySelector(".el-form-item")?.className.includes("size-") || ""),
562
+ validateMessage: h(() => document.querySelector(".el-form-item__error")?.textContent || ""),
563
+ validateState: h(() => {
564
+ const s = document.querySelector(".el-form-item");
565
+ return s?.classList.contains("is-error") ? "error" : s?.classList.contains("is-success") ? "success" : s?.classList.contains("is-validating") ? "validating" : "";
566
+ })
567
+ }), (s, a) => {
568
+ const p = F("el-form-item");
569
+ return g(), B(p, C(c.value, {
570
+ onValidate: d,
571
+ onResetFields: y,
572
+ onClearValidate: m
573
+ }), k({ _: 2 }, [
574
+ w(s.$slots, (b, u) => ({
575
+ name: u,
576
+ fn: _((S) => [
577
+ O(s.$slots, u, I(N(S || {})))
578
+ ])
579
+ }))
580
+ ]), 1040);
581
+ };
582
+ }
583
+ });
584
+ R.install = (e) => {
585
+ e.component("YwFormItem", R);
586
+ };
587
+ const A = /* @__PURE__ */ V({
588
+ __name: "Input",
589
+ props: {
590
+ modelValue: {
591
+ type: [String, Number],
592
+ default: ""
593
+ },
594
+ type: {
595
+ type: String,
596
+ default: "text"
597
+ },
598
+ showWordLimit: {
599
+ type: Boolean,
600
+ default: !1
601
+ },
602
+ placeholder: {
603
+ type: String,
604
+ default: ""
605
+ },
606
+ clearable: {
607
+ type: Boolean,
608
+ default: !0
609
+ },
610
+ clearIcon: {
611
+ type: String,
612
+ default: () => x(v, { iconClass: "12_12_fill_delete", color: "#b2b4c6" })
613
+ // 设置默认参数
614
+ },
615
+ formatter: {
616
+ type: Function,
617
+ default: (e) => e
618
+ },
619
+ parser: {
620
+ type: Function,
621
+ default: (e) => e
622
+ },
623
+ maxlength: {
624
+ type: Number,
625
+ default: null
626
+ },
627
+ minlength: {
628
+ type: Number,
629
+ default: null
630
+ },
631
+ showPassword: {
632
+ type: Boolean,
633
+ default: !1
634
+ },
635
+ disabled: {
636
+ type: Boolean,
637
+ default: !1
638
+ },
639
+ size: {
640
+ type: String,
641
+ default: ""
642
+ },
643
+ prefixIcon: {
644
+ type: [String, Object],
645
+ default: ""
646
+ },
647
+ suffixIcon: {
648
+ type: [String, Object],
649
+ default: ""
650
+ },
651
+ rows: {
652
+ type: Number,
653
+ default: 2
654
+ },
655
+ autosize: {
656
+ type: [Boolean, Object],
657
+ default: !1
658
+ },
659
+ // autocomplete: {
660
+ // type: String,
661
+ // default: 'off'
662
+ // },
663
+ name: {
664
+ type: String,
665
+ default: ""
666
+ },
667
+ readonly: {
668
+ type: Boolean,
669
+ default: !1
670
+ },
671
+ max: {
672
+ type: [String, Number],
673
+ default: ""
674
+ },
675
+ min: {
676
+ type: [String, Number],
677
+ default: ""
678
+ },
679
+ step: {
680
+ type: [String, Number],
681
+ default: ""
682
+ },
683
+ resize: {
684
+ type: String,
685
+ default: ""
686
+ },
687
+ autofocus: {
688
+ type: Boolean,
689
+ default: !1
690
+ },
691
+ form: {
692
+ type: String,
693
+ default: ""
694
+ },
695
+ ariaLabel: {
696
+ type: String,
697
+ default: ""
698
+ },
699
+ tabindex: {
700
+ type: String,
701
+ default: ""
702
+ },
703
+ validateEvent: {
704
+ type: Boolean,
705
+ default: !0
706
+ },
707
+ inputStyle: {
708
+ type: Object,
709
+ default: () => ({})
710
+ },
711
+ label: {
712
+ type: String,
713
+ default: ""
714
+ },
715
+ inputMode: {
716
+ type: String,
717
+ default: ""
718
+ }
719
+ },
720
+ emits: ["update:modelValue", "change", "blur", "focus", "input", "clear", "keydown", "mouseleave", "mouseenter", "compositionstart", "compositionupdate", "compositionend"],
721
+ setup(e, { emit: i }) {
722
+ const r = e, t = i, o = h({
723
+ get() {
724
+ return r.modelValue;
725
+ },
726
+ set(l) {
727
+ t("update:modelValue", l);
728
+ }
729
+ }), c = (l) => {
730
+ t("input", l);
731
+ }, d = (l) => {
732
+ t("change", l);
733
+ }, y = (l) => {
734
+ t("blur", l);
735
+ }, m = (l) => {
736
+ t("focus", l);
737
+ }, s = () => {
738
+ t("clear");
739
+ }, a = (l) => {
740
+ t("keydown", l);
741
+ }, p = (l) => {
742
+ t("mouseleave", l);
743
+ }, b = (l) => {
744
+ t("mouseenter", l);
745
+ }, u = (l) => {
746
+ t("compositionstart", l);
747
+ }, S = (l) => {
748
+ t("compositionupdate", l);
749
+ }, n = (l) => {
750
+ t("compositionend", l);
751
+ };
752
+ return (l, f) => {
753
+ const T = F("el-input");
754
+ return g(), B(T, C(r, {
755
+ modelValue: P(o),
756
+ "onUpdate:modelValue": f[0] || (f[0] = (q) => Q(o) ? o.value = q : null),
757
+ class: "yw-input",
758
+ onInput: c,
759
+ onChange: d,
760
+ onBlur: y,
761
+ onFocus: m,
762
+ onClear: s,
763
+ onKeydown: a,
764
+ onMouseleave: p,
765
+ onMouseenter: b,
766
+ onCompositionstart: u,
767
+ onCompositionupdate: S,
768
+ onCompositionend: n
769
+ }), k({ _: 2 }, [
770
+ w(l.$slots, (q, Y) => ({
771
+ name: Y,
772
+ fn: _((G) => [
773
+ O(l.$slots, Y, I(N(G || {})))
774
+ ])
775
+ }))
776
+ ]), 1040, ["modelValue"]);
777
+ };
778
+ }
779
+ });
780
+ A.install = (e) => {
781
+ e.component("YwInput", A);
782
+ };
783
+ const L = /* @__PURE__ */ V({
784
+ __name: "Select",
785
+ props: {
786
+ modelValue: {
787
+ type: [String, Number],
788
+ default: ""
789
+ },
790
+ multiple: {
791
+ type: Boolean,
792
+ default: !1
793
+ },
794
+ options: {
795
+ type: Array,
796
+ default: () => []
797
+ },
798
+ props: {
799
+ type: Object,
800
+ default: () => ({
801
+ label: "label",
802
+ value: "value"
803
+ })
804
+ },
805
+ disabled: {
806
+ type: Boolean,
807
+ default: !1
808
+ },
809
+ valueKey: {
810
+ type: String,
811
+ default: "value"
812
+ },
813
+ size: {
814
+ type: String,
815
+ default: ""
816
+ },
817
+ clearable: {
818
+ type: Boolean,
819
+ default: !0
820
+ },
821
+ collapseTags: {
822
+ type: Boolean,
823
+ default: !1
824
+ },
825
+ collapseTagsTooltip: {
826
+ type: Boolean,
827
+ default: !1
828
+ },
829
+ multipleLimit: {
830
+ type: Number,
831
+ default: 0
832
+ },
833
+ id: {
834
+ type: String,
835
+ default: ""
836
+ },
837
+ name: {
838
+ type: String,
839
+ default: ""
840
+ },
841
+ effect: {
842
+ type: String,
843
+ default: "light"
844
+ },
845
+ autocomplete: {
846
+ type: String,
847
+ default: "off"
848
+ },
849
+ placeholder: {
850
+ type: String,
851
+ default: ""
852
+ },
853
+ filterable: {
854
+ type: Boolean,
855
+ default: !0
856
+ },
857
+ allowCreate: {
858
+ type: Boolean,
859
+ default: !1
860
+ },
861
+ filterMethod: {
862
+ type: Function,
863
+ default: () => {
864
+ }
865
+ },
866
+ remote: {
867
+ type: Boolean,
868
+ default: !1
869
+ },
870
+ remoteMethod: {
871
+ type: Function,
872
+ default: () => {
873
+ }
874
+ },
875
+ remoteShowSuffix: {
876
+ type: Boolean,
877
+ default: !1
878
+ },
879
+ loading: {
880
+ type: Boolean,
881
+ default: !1
882
+ },
883
+ loadingText: {
884
+ type: String,
885
+ default: ""
886
+ },
887
+ noMatchText: {
888
+ type: String,
889
+ default: ""
890
+ },
891
+ noDataText: {
892
+ type: String,
893
+ default: ""
894
+ },
895
+ popperClass: {
896
+ type: String,
897
+ default: ""
898
+ },
899
+ reserveKeyword: {
900
+ type: Boolean,
901
+ default: !1
902
+ },
903
+ defaultFirstOption: {
904
+ type: Boolean,
905
+ default: !1
906
+ },
907
+ teleported: {
908
+ type: Boolean,
909
+ default: !0
910
+ },
911
+ persistent: {
912
+ type: Boolean,
913
+ default: !0
914
+ },
915
+ automaticDropdown: {
916
+ type: Boolean,
917
+ default: !1
918
+ },
919
+ clearIcon: {
920
+ type: String,
921
+ default: () => x(v, { iconClass: "12_12_fill_delete", color: "#b2b4c6" })
922
+ // 设置默认参数
923
+ },
924
+ fitInputWidth: {
925
+ type: Boolean,
926
+ default: !1
927
+ },
928
+ suffixIcon: {
929
+ type: String,
930
+ default: () => x(v, { iconClass: "12_12_arrow_bottom", color: "#1a1a1a" })
931
+ // 设置默认参数
932
+ },
933
+ tagType: {
934
+ type: String,
935
+ default: "info"
936
+ },
937
+ tagEffect: {
938
+ type: String,
939
+ default: "light"
940
+ },
941
+ validateEvent: {
942
+ type: Boolean,
943
+ default: !0
944
+ },
945
+ offset: {
946
+ type: Number,
947
+ default: 12
948
+ },
949
+ showArrow: {
950
+ type: Boolean,
951
+ default: !0
952
+ },
953
+ placement: {
954
+ type: String,
955
+ default: "bottom-start"
956
+ },
957
+ // fallbackPlacements: {
958
+ // type: Array as PropType<placementType[]>,
959
+ // default: () => ['bottom-start', 'bottom-end', 'top-start', 'top-end']
960
+ // },
961
+ maxCollapseTags: {
962
+ type: Number,
963
+ default: 1
964
+ },
965
+ ariaLabel: {
966
+ type: String,
967
+ default: ""
968
+ }
969
+ },
970
+ emits: ["update:modelValue", "change", "visible-change", "remove-tag", "clear", "focus", "blur", "popup-scroll"],
971
+ setup(e, { emit: i }) {
972
+ const r = e, t = h(() => r.props), o = U(), c = h(() => o.default?.().length === 0 ? [] : o.default?.().flatMap((n) => {
973
+ const l = String(n.type);
974
+ if (l.includes("yw-option") || l.includes("ywOption")) {
975
+ const f = n.children;
976
+ return {
977
+ type: K,
978
+ props: n.props || {},
979
+ children: f && f[0].children,
980
+ key: n.key
981
+ };
982
+ }
983
+ return n;
984
+ })), d = i, y = h({
985
+ get() {
986
+ return r.modelValue;
987
+ },
988
+ set(n) {
989
+ d("update:modelValue", n);
990
+ }
991
+ }), m = (n) => {
992
+ d("change", n);
993
+ }, s = (n) => {
994
+ d("visible-change", n);
995
+ }, a = (n) => {
996
+ d("remove-tag", n);
997
+ }, p = () => {
998
+ d("clear");
999
+ }, b = (n) => {
1000
+ d("focus", n);
1001
+ }, u = (n) => {
1002
+ d("blur", n);
1003
+ }, S = (n) => {
1004
+ d("popup-scroll", n);
1005
+ };
1006
+ return (n, l) => (g(), B(P(te), C(r, {
1007
+ modelValue: y.value,
1008
+ "onUpdate:modelValue": l[0] || (l[0] = (f) => y.value = f),
1009
+ class: "yw-select",
1010
+ "popper-class": "yw-select-popper",
1011
+ onChange: m,
1012
+ onVisibleChange: s,
1013
+ onRemoveTag: a,
1014
+ onClear: p,
1015
+ onBlur: u,
1016
+ onFocus: b,
1017
+ onPopupScroll: S
1018
+ }), {
1019
+ default: _(() => [
1020
+ n.$slots.default ? (g(!0), M(W, { key: 0 }, w(c.value, (f, T) => (g(), B(X(f.type), C({ ref_for: !0 }, f.props, {
1021
+ key: f.key || T
1022
+ }), {
1023
+ default: _(() => [
1024
+ Z(ee(f.children), 1)
1025
+ ]),
1026
+ _: 2
1027
+ }, 1040))), 128)) : (g(!0), M(W, { key: 1 }, w(e.options, (f) => (g(), B(P(K), {
1028
+ key: f[t.value.value],
1029
+ label: f[t.value.label],
1030
+ value: f[t.value.value],
1031
+ disabled: f[t.value.disabled]
1032
+ }, null, 8, ["label", "value", "disabled"]))), 128))
1033
+ ]),
1034
+ _: 1
1035
+ }, 16, ["modelValue"]));
1036
+ }
1037
+ });
1038
+ L.install = (e) => {
1039
+ e.component("YwSelect", L);
1040
+ };
1041
+ const ne = [j, z, D, E, R, A, L], ue = {
105
1042
  install(e) {
106
- h.forEach((t) => {
107
- e.use(t);
1043
+ ne.forEach((i) => {
1044
+ e.use(i);
108
1045
  });
109
1046
  }
110
1047
  };
111
1048
  export {
112
- O as default
1049
+ ue as default
113
1050
  };