ss-component-new 1.3.727 → 1.3.728

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,795 +0,0 @@
1
- import { defineComponent as _, createBlock as v, openBlock as f, resolveDynamicComponent as j, normalizeProps as y, guardReactiveProps as k, withCtx as n, renderSlot as a, resolveComponent as $, createSlots as g, computed as O, mergeProps as h, ref as E, watch as A, createElementBlock as C, createCommentVNode as T, createVNode as N, Fragment as P, renderList as R } from "vue";
2
- import { _ as D } from "./index.vue_vue_type_script_setup_true_lang-BrnE_n0l.js";
3
- import { _ as L } from "./index.vue_vue_type_script_setup_true_lang-CuwhbWHH.js";
4
- import { g as S } from "./index-Cq5FO9eE.js";
5
- const B = /* @__PURE__ */ _({
6
- __name: "index",
7
- props: {
8
- componentName: {
9
- type: String,
10
- default: ""
11
- },
12
- extra: {
13
- type: Object,
14
- default: () => ({})
15
- }
16
- },
17
- setup(l) {
18
- const d = l;
19
- return (t, s) => (f(), v(j(d.componentName), y(k(d.extra)), {
20
- default: n(() => [
21
- a(t.$slots, "default")
22
- ]),
23
- _: 3
24
- }, 16));
25
- }
26
- }), I = /* @__PURE__ */ _({
27
- __name: "index",
28
- props: {
29
- extra: {
30
- type: Object,
31
- default: () => ({})
32
- }
33
- },
34
- setup(l) {
35
- const d = l;
36
- return (t, s) => {
37
- const o = $("n-menu");
38
- return f(), v(o, y(k(d.extra)), {
39
- default: n(() => [
40
- a(t.$slots, "default")
41
- ]),
42
- _: 3
43
- }, 16);
44
- };
45
- }
46
- }), X = /* @__PURE__ */ _({
47
- __name: "index",
48
- props: {
49
- extra: {
50
- type: Object,
51
- default: () => ({})
52
- }
53
- },
54
- setup(l) {
55
- const d = l;
56
- return (t, s) => {
57
- const o = $("n-pagination");
58
- return f(), v(o, y(k(d.extra)), g({ _: 2 }, [
59
- t.$slots.default ? {
60
- name: "default",
61
- fn: n(() => [
62
- a(t.$slots, "default")
63
- ]),
64
- key: "0"
65
- } : void 0,
66
- t.$slots.goto ? {
67
- name: "goto",
68
- fn: n(() => [
69
- a(t.$slots, "goto")
70
- ]),
71
- key: "1"
72
- } : void 0,
73
- t.$slots.label ? {
74
- name: "label",
75
- fn: n((e) => [
76
- a(t.$slots, "label", y(k(e)))
77
- ]),
78
- key: "2"
79
- } : void 0,
80
- t.$slots.next ? {
81
- name: "next",
82
- fn: n((e) => [
83
- a(t.$slots, "next", y(k(e)))
84
- ]),
85
- key: "3"
86
- } : void 0,
87
- t.$slots.prev ? {
88
- name: "prev",
89
- fn: n((e) => [
90
- a(t.$slots, "prev", y(k(e)))
91
- ]),
92
- key: "4"
93
- } : void 0,
94
- t.$slots.prefix ? {
95
- name: "prefix",
96
- fn: n((e) => [
97
- a(t.$slots, "prefix", y(k(e)))
98
- ]),
99
- key: "5"
100
- } : void 0,
101
- t.$slots.suffix ? {
102
- name: "suffix",
103
- fn: n((e) => [
104
- a(t.$slots, "suffix", y(k(e)))
105
- ]),
106
- key: "6"
107
- } : void 0
108
- ]), 1040);
109
- };
110
- }
111
- }), G = /* @__PURE__ */ _({
112
- __name: "index",
113
- props: {
114
- extra: {
115
- type: Object,
116
- default: () => ({})
117
- },
118
- modelValue: {
119
- default: void 0
120
- }
121
- },
122
- emits: ["update:modelValue", "change"],
123
- setup(l, { emit: d }) {
124
- const t = l, s = d, o = O({
125
- get: () => t.modelValue,
126
- set: (e) => {
127
- s("update:modelValue", e), s("change", e);
128
- }
129
- });
130
- return (e, u) => {
131
- const m = $("n-cascader");
132
- return f(), v(m, h(t.extra, {
133
- value: o.value,
134
- "onUpdate:value": u[0] || (u[0] = (r) => o.value = r)
135
- }), g({ _: 2 }, [
136
- e.$slots.default ? {
137
- name: "default",
138
- fn: n(() => [
139
- a(e.$slots, "default")
140
- ]),
141
- key: "0"
142
- } : void 0,
143
- e.$slots.action ? {
144
- name: "action",
145
- fn: n(() => [
146
- a(e.$slots, "action")
147
- ]),
148
- key: "1"
149
- } : void 0,
150
- e.$slots.arrow ? {
151
- name: "arrow",
152
- fn: n(() => [
153
- a(e.$slots, "arrow")
154
- ]),
155
- key: "2"
156
- } : void 0,
157
- e.$slots.empty ? {
158
- name: "empty",
159
- fn: n(() => [
160
- a(e.$slots, "empty")
161
- ]),
162
- key: "3"
163
- } : void 0,
164
- e.$slots["not-found"] ? {
165
- name: "not-found",
166
- fn: n(() => [
167
- a(e.$slots, "not-found")
168
- ]),
169
- key: "4"
170
- } : void 0
171
- ]), 1040, ["value"]);
172
- };
173
- }
174
- }), H = /* @__PURE__ */ _({
175
- __name: "index",
176
- props: {
177
- extra: {
178
- type: Object,
179
- default: () => ({})
180
- },
181
- modelValue: {
182
- default: void 0
183
- }
184
- },
185
- emits: ["update:modelValue", "change"],
186
- setup(l, { emit: d }) {
187
- const t = l, s = d, o = O({
188
- get: () => t.modelValue,
189
- set: (e) => {
190
- s("update:modelValue", e), s("change", e);
191
- }
192
- });
193
- return (e, u) => {
194
- const m = $("n-checkbox");
195
- return f(), v(m, h(t.extra, {
196
- checked: o.value,
197
- "onUpdate:checked": u[0] || (u[0] = (r) => o.value = r)
198
- }), g({ _: 2 }, [
199
- e.$slots.default ? {
200
- name: "default",
201
- fn: n(() => [
202
- a(e.$slots, "default")
203
- ]),
204
- key: "0"
205
- } : void 0
206
- ]), 1040, ["checked"]);
207
- };
208
- }
209
- }), F = /* @__PURE__ */ _({
210
- __name: "index",
211
- props: {
212
- extra: {
213
- type: Object,
214
- default: () => ({})
215
- },
216
- modelValue: {
217
- default: void 0
218
- }
219
- },
220
- emits: ["update:modelValue", "change"],
221
- setup(l, { emit: d }) {
222
- const t = l, s = d, o = O({
223
- get: () => t.modelValue,
224
- set: (e) => {
225
- s("update:modelValue", e), s("change", e);
226
- }
227
- });
228
- return (e, u) => {
229
- const m = $("n-checkbox-group");
230
- return f(), v(m, h(t.extra, {
231
- value: o.value,
232
- "onUpdate:value": u[0] || (u[0] = (r) => o.value = r)
233
- }), {
234
- default: n(() => [
235
- a(e.$slots, "default")
236
- ]),
237
- _: 3
238
- }, 16, ["value"]);
239
- };
240
- }
241
- }), K = /* @__PURE__ */ _({
242
- __name: "index",
243
- props: {
244
- extra: {
245
- type: Object,
246
- default: () => ({})
247
- }
248
- },
249
- setup(l) {
250
- const d = l;
251
- return (t, s) => {
252
- const o = $("n-dropdown");
253
- return f(), v(o, y(k(d.extra)), g({ _: 2 }, [
254
- t.$slots.default ? {
255
- name: "default",
256
- fn: n(() => [
257
- a(t.$slots, "default")
258
- ]),
259
- key: "0"
260
- } : void 0
261
- ]), 1040);
262
- };
263
- }
264
- }), M = /* @__PURE__ */ _({
265
- __name: "index",
266
- props: {
267
- extra: {
268
- type: Object,
269
- default: () => ({})
270
- },
271
- modelValue: {
272
- default: void 0
273
- }
274
- },
275
- emits: ["update:modelValue", "change"],
276
- setup(l, { emit: d }) {
277
- const t = l, s = d, o = O({
278
- get: () => t.modelValue,
279
- set: (e) => {
280
- s("update:modelValue", e), s("change", e);
281
- }
282
- });
283
- return (e, u) => {
284
- var r, c;
285
- const m = $("n-input");
286
- return f(), v(m, h(t == null ? void 0 : t.extra, {
287
- value: o.value,
288
- "onUpdate:value": u[0] || (u[0] = (p) => o.value = p)
289
- }), g({ _: 2 }, [
290
- e.$slots.prefix && !((r = t == null ? void 0 : t.extra) != null && r.type) ? {
291
- name: "prefix",
292
- fn: n(() => [
293
- a(e.$slots, "prefix")
294
- ]),
295
- key: "0"
296
- } : void 0,
297
- e.$slots.suffix && !((c = t == null ? void 0 : t.extra) != null && c.type) ? {
298
- name: "suffix",
299
- fn: n(() => [
300
- a(e.$slots, "suffix")
301
- ]),
302
- key: "1"
303
- } : void 0
304
- ]), 1040, ["value"]);
305
- };
306
- }
307
- }), W = /* @__PURE__ */ _({
308
- __name: "index",
309
- props: {
310
- extra: {
311
- type: Object,
312
- default: () => ({})
313
- },
314
- modelValue: {
315
- default: void 0
316
- }
317
- },
318
- emits: ["update:modelValue", "change"],
319
- setup(l, { emit: d }) {
320
- const t = l, s = d, o = O({
321
- get: () => t.modelValue,
322
- set: (e) => {
323
- s("update:modelValue", e), s("change", e);
324
- }
325
- });
326
- return (e, u) => {
327
- const m = $("n-radio");
328
- return f(), v(m, h(t.extra, {
329
- checked: o.value,
330
- "onUpdate:checked": u[0] || (u[0] = (r) => o.value = r)
331
- }), g({ _: 2 }, [
332
- e.$slots.default ? {
333
- name: "default",
334
- fn: n(() => [
335
- a(e.$slots, "default")
336
- ]),
337
- key: "0"
338
- } : void 0
339
- ]), 1040, ["checked"]);
340
- };
341
- }
342
- }), z = /* @__PURE__ */ _({
343
- __name: "index",
344
- props: {
345
- extra: {
346
- type: Object,
347
- default: () => ({})
348
- },
349
- modelValue: {
350
- default: void 0
351
- }
352
- },
353
- emits: ["update:modelValue", "change"],
354
- setup(l, { emit: d }) {
355
- const t = l, s = d, o = O({
356
- get: () => t.modelValue,
357
- set: (e) => {
358
- s("update:modelValue", e), s("change", e);
359
- }
360
- });
361
- return (e, u) => {
362
- const m = $("n-radio-group");
363
- return f(), v(m, h(t.extra, {
364
- value: o.value,
365
- "onUpdate:value": u[0] || (u[0] = (r) => o.value = r)
366
- }), {
367
- default: n(() => [
368
- a(e.$slots, "default")
369
- ]),
370
- _: 3
371
- }, 16, ["value"]);
372
- };
373
- }
374
- }), Y = /* @__PURE__ */ _({
375
- __name: "index",
376
- props: {
377
- extra: {
378
- type: Object,
379
- default: () => ({})
380
- },
381
- modelValue: {
382
- default: void 0
383
- }
384
- },
385
- emits: ["update:modelValue", "change"],
386
- setup(l, { emit: d }) {
387
- const t = l, s = d, o = O({
388
- get: () => t.modelValue,
389
- set: (e) => {
390
- s("update:modelValue", e), s("change", e);
391
- }
392
- });
393
- return (e, u) => {
394
- const m = $("n-select");
395
- return f(), v(m, h(t.extra, {
396
- value: o.value,
397
- "onUpdate:value": u[0] || (u[0] = (r) => o.value = r)
398
- }), g({ _: 2 }, [
399
- e.$slots.default ? {
400
- name: "default",
401
- fn: n(() => [
402
- a(e.$slots, "default")
403
- ]),
404
- key: "0"
405
- } : void 0,
406
- e.$slots.action ? {
407
- name: "action",
408
- fn: n(() => [
409
- a(e.$slots, "action")
410
- ]),
411
- key: "1"
412
- } : void 0,
413
- e.$slots.arrow ? {
414
- name: "arrow",
415
- fn: n(() => [
416
- a(e.$slots, "arrow")
417
- ]),
418
- key: "2"
419
- } : void 0,
420
- e.$slots.empty ? {
421
- name: "empty",
422
- fn: n(() => [
423
- a(e.$slots, "empty")
424
- ]),
425
- key: "3"
426
- } : void 0,
427
- e.$slots.header ? {
428
- name: "header",
429
- fn: n(() => [
430
- a(e.$slots, "header")
431
- ]),
432
- key: "4"
433
- } : void 0
434
- ]), 1040, ["value"]);
435
- };
436
- }
437
- }), q = /* @__PURE__ */ _({
438
- __name: "index",
439
- props: {
440
- extra: {
441
- type: Object,
442
- default: () => ({})
443
- },
444
- modelValue: {
445
- default: void 0
446
- }
447
- },
448
- emits: ["update:modelValue", "change"],
449
- setup(l, { emit: d }) {
450
- const t = l, s = d, o = O({
451
- get: () => t.modelValue,
452
- set: (e) => {
453
- s("update:modelValue", e), s("change", e);
454
- }
455
- });
456
- return (e, u) => {
457
- const m = $("n-switch");
458
- return f(), v(m, h(t.extra, {
459
- value: o.value,
460
- "onUpdate:value": u[0] || (u[0] = (r) => o.value = r)
461
- }), g({ _: 2 }, [
462
- e.$slots.checked ? {
463
- name: "checked",
464
- fn: n(() => [
465
- a(e.$slots, "checked")
466
- ]),
467
- key: "0"
468
- } : void 0,
469
- e.$slots["checked-icon"] ? {
470
- name: "checked-icon",
471
- fn: n(() => [
472
- a(e.$slots, "checked-icon")
473
- ]),
474
- key: "1"
475
- } : void 0,
476
- e.$slots.icon ? {
477
- name: "icon",
478
- fn: n(() => [
479
- a(e.$slots, "icon")
480
- ]),
481
- key: "2"
482
- } : void 0,
483
- e.$slots.unchecked ? {
484
- name: "unchecked",
485
- fn: n(() => [
486
- a(e.$slots, "unchecked")
487
- ]),
488
- key: "3"
489
- } : void 0,
490
- e.$slots["unchecked-icon"] ? {
491
- name: "unchecked-icon",
492
- fn: n(() => [
493
- a(e.$slots, "unchecked-icon")
494
- ]),
495
- key: "4"
496
- } : void 0
497
- ]), 1040, ["value"]);
498
- };
499
- }
500
- }), J = /* @__PURE__ */ _({
501
- __name: "index",
502
- props: {
503
- extra: {
504
- type: Object,
505
- default: () => ({})
506
- }
507
- },
508
- setup(l) {
509
- const d = l;
510
- return (t, s) => {
511
- const o = $("n-tag");
512
- return f(), v(o, y(k(d.extra)), g({ _: 2 }, [
513
- t.$slots.default ? {
514
- name: "default",
515
- fn: n(() => [
516
- a(t.$slots, "default")
517
- ]),
518
- key: "0"
519
- } : void 0,
520
- t.$slots.avatar ? {
521
- name: "avatar",
522
- fn: n(() => [
523
- a(t.$slots, "avatar")
524
- ]),
525
- key: "1"
526
- } : void 0,
527
- t.$slots.icon ? {
528
- name: "icon",
529
- fn: n(() => [
530
- a(t.$slots, "icon")
531
- ]),
532
- key: "2"
533
- } : void 0
534
- ]), 1040);
535
- };
536
- }
537
- }), Q = /* @__PURE__ */ _({
538
- __name: "index",
539
- props: {
540
- extra: {
541
- type: Object,
542
- default: () => ({})
543
- }
544
- },
545
- setup(l) {
546
- const d = l;
547
- return (t, s) => {
548
- const o = $("n-text");
549
- return f(), v(o, y(k(d.extra)), {
550
- default: n(() => [
551
- a(t.$slots, "default")
552
- ]),
553
- _: 3
554
- }, 16);
555
- };
556
- }
557
- }), Z = /* @__PURE__ */ _({
558
- __name: "index",
559
- props: {
560
- extra: {
561
- type: Object,
562
- default: () => ({})
563
- },
564
- modelValue: {
565
- default: void 0
566
- }
567
- },
568
- emits: ["update:modelValue", "change"],
569
- setup(l, { emit: d }) {
570
- const t = l, s = d, o = O({
571
- get: () => t.modelValue,
572
- set: (e) => {
573
- s("update:modelValue", e), s("change", e);
574
- }
575
- });
576
- return (e, u) => {
577
- const m = $("n-input");
578
- return f(), v(m, h(t.extra, {
579
- value: o.value,
580
- "onUpdate:value": u[0] || (u[0] = (r) => o.value = r),
581
- type: "textarea"
582
- }), g({ _: 2 }, [
583
- e.$slots.prefix ? {
584
- name: "prefix",
585
- fn: n(() => [
586
- a(e.$slots, "prefix")
587
- ]),
588
- key: "0"
589
- } : void 0,
590
- e.$slots.suffix ? {
591
- name: "suffix",
592
- fn: n(() => [
593
- a(e.$slots, "suffix")
594
- ]),
595
- key: "1"
596
- } : void 0
597
- ]), 1040, ["value"]);
598
- };
599
- }
600
- }), ee = /* @__PURE__ */ _({
601
- __name: "index",
602
- props: {
603
- extra: {
604
- type: Object,
605
- default: () => ({})
606
- },
607
- modelValue: {
608
- default: void 0
609
- }
610
- },
611
- emits: ["update:modelValue", "change"],
612
- setup(l, { emit: d }) {
613
- const t = l, s = d, o = O({
614
- get: () => t.modelValue,
615
- set: (e) => {
616
- s("update:modelValue", e), s("change", e);
617
- }
618
- });
619
- return (e, u) => {
620
- const m = $("n-tree-select");
621
- return f(), v(m, h(t.extra, {
622
- value: o.value,
623
- "onUpdate:value": u[0] || (u[0] = (r) => o.value = r)
624
- }), g({ _: 2 }, [
625
- e.$slots.action ? {
626
- name: "action",
627
- fn: n(() => [
628
- a(e.$slots, "action")
629
- ]),
630
- key: "0"
631
- } : void 0,
632
- e.$slots.arrow ? {
633
- name: "arrow",
634
- fn: n(() => [
635
- a(e.$slots, "arrow")
636
- ]),
637
- key: "1"
638
- } : void 0,
639
- e.$slots.empty ? {
640
- name: "empty",
641
- fn: n(() => [
642
- a(e.$slots, "empty")
643
- ]),
644
- key: "2"
645
- } : void 0,
646
- e.$slots.header ? {
647
- name: "header",
648
- fn: n(() => [
649
- a(e.$slots, "header")
650
- ]),
651
- key: "3"
652
- } : void 0
653
- ]), 1040, ["value"]);
654
- };
655
- }
656
- }), te = /* @__PURE__ */ _({
657
- __name: "index",
658
- props: {
659
- extra: {
660
- type: Object,
661
- default: () => ({})
662
- },
663
- modelValue: {
664
- default: void 0
665
- }
666
- },
667
- emits: ["update:modelValue", "change"],
668
- setup(l, { emit: d }) {
669
- const t = l, s = d, o = O({
670
- get: () => t.modelValue,
671
- set: (e) => {
672
- s("update:modelValue", e), s("change", e);
673
- }
674
- });
675
- return (e, u) => {
676
- const m = $("n-upload");
677
- return f(), v(m, h(t.extra, {
678
- "file-list": o.value,
679
- "onUpdate:fileList": u[0] || (u[0] = (r) => o.value = r)
680
- }), g({ _: 2 }, [
681
- e.$slots.default ? {
682
- name: "default",
683
- fn: n((r) => [
684
- a(e.$slots, "default", y(k(r)))
685
- ]),
686
- key: "0"
687
- } : void 0
688
- ]), 1040, ["file-list"]);
689
- };
690
- }
691
- }), oe = {
692
- BUTTON: L,
693
- CASCADER: G,
694
- CHECKBOX: H,
695
- CHECKBOXGROUP: F,
696
- DROPDOWN: K,
697
- FLEX: D,
698
- INPUT: M,
699
- LAYOUT: B,
700
- MENU: I,
701
- PAGINATION: X,
702
- RADIO: W,
703
- RADIOGROUP: z,
704
- SELECT: Y,
705
- SWITCH: q,
706
- TAG: J,
707
- TEXT: Q,
708
- TEXTAREA: Z,
709
- TREESELECT: ee,
710
- UPLOAD: te
711
- };
712
- function ne(l) {
713
- return oe[l == null ? void 0 : l.toUpperCase()] || null;
714
- }
715
- const ae = { key: 0 }, re = /* @__PURE__ */ _({
716
- __name: "index",
717
- props: {
718
- extra: {
719
- type: Object,
720
- default: () => ({})
721
- },
722
- formElements: {
723
- type: Object,
724
- default: () => ({})
725
- },
726
- componentElement: {
727
- type: Object,
728
- default: () => ({})
729
- }
730
- },
731
- setup(l) {
732
- const d = (c) => {
733
- if (Array.isArray(c))
734
- return c.flatMap((p) => Array.isArray(p == null ? void 0 : p.filter) ? p.filter : p).find((p) => {
735
- var V;
736
- return ((V = p == null ? void 0 : p.lib) == null ? void 0 : V.trim().toLowerCase()) === "naive";
737
- });
738
- }, t = (c) => {
739
- var p;
740
- return ((p = d(c)) == null ? void 0 : p.elementProp) ?? {};
741
- }, s = (c, p) => {
742
- var b;
743
- const V = ((b = d(c)) == null ? void 0 : b.elementComponent) || p;
744
- return V == null ? void 0 : V.replace(/^n-/i, "");
745
- }, o = l, e = E([]), u = E({}), m = (c) => ne(c), r = (c) => {
746
- var p;
747
- return {
748
- ...(p = c == null ? void 0 : c.options) != null && p.length ? { options: c.options } : {},
749
- ...t(c == null ? void 0 : c.extraProps)
750
- };
751
- };
752
- return A(
753
- () => [o == null ? void 0 : o.formElements, o == null ? void 0 : o.componentElement],
754
- () => {
755
- var V, b;
756
- let c = {};
757
- const p = Array.isArray((V = o == null ? void 0 : o.formElements) == null ? void 0 : V.rowElements) ? o.formElements : S(o == null ? void 0 : o.componentElement);
758
- e.value = (p == null ? void 0 : p.rowElements) ?? [], (b = e.value) == null || b.forEach((x) => {
759
- c[x.prop] = x.value;
760
- }), u.value = c;
761
- },
762
- { immediate: !0 }
763
- ), (c, p) => {
764
- var x;
765
- const V = $("n-form-item"), b = $("n-form");
766
- return ((x = e.value) == null ? void 0 : x.length) > 0 ? (f(), C("div", ae, [
767
- N(b, h({
768
- ref: "formRef",
769
- model: u.value
770
- }, o.extra), {
771
- default: n(() => [
772
- (f(!0), C(P, null, R(e.value, (i, U) => (f(), v(V, {
773
- key: U,
774
- label: i == null ? void 0 : i.prop,
775
- span: 24 / (i == null ? void 0 : i.width)
776
- }, {
777
- default: n(() => [
778
- (f(), v(j(m(s(i == null ? void 0 : i.extraProps, i == null ? void 0 : i.type))), {
779
- modelValue: u.value[i == null ? void 0 : i.prop],
780
- "onUpdate:modelValue": (w) => u.value[i == null ? void 0 : i.prop] = w,
781
- extra: r(i)
782
- }, null, 8, ["modelValue", "onUpdate:modelValue", "extra"]))
783
- ]),
784
- _: 2
785
- }, 1032, ["label", "span"]))), 128))
786
- ]),
787
- _: 1
788
- }, 16, ["model"])
789
- ])) : T("", !0);
790
- };
791
- }
792
- });
793
- export {
794
- re as default
795
- };