@gct-paas/v-ben 0.1.4-dev.12 → 0.1.4-dev.13

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.
@@ -0,0 +1,693 @@
1
+ import { cssLoader as e, permission as t, t as n } from "@gct-paas/core";
2
+ import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createTextVNode as u, createVNode as d, defineComponent as f, guardReactiveProps as p, h as m, mergeProps as h, normalizeClass as g, normalizeProps as _, openBlock as v, ref as y, renderList as b, renderSlot as x, resolveComponent as S, toDisplayString as C, toRaw as w, unref as T, useAttrs as E, vShow as ee, withCtx as D, withDirectives as te, withModifiers as O } from "vue";
3
+ import { omit as k } from "lodash-es";
4
+ import { MoreOutlined as A } from "@ant-design/icons-vue";
5
+ import { Button as j, Divider as M, Dropdown as ne, Menu as N, Popconfirm as P, Tooltip as F } from "ant-design-vue";
6
+ //#region src/utils/is.ts
7
+ var re = Object.prototype.toString;
8
+ function I(e, t) {
9
+ return re.call(e) === `[object ${t}]`;
10
+ }
11
+ function L(e) {
12
+ return e !== void 0;
13
+ }
14
+ function R(e) {
15
+ return !L(e);
16
+ }
17
+ function z(e) {
18
+ return e !== null && I(e, "Object");
19
+ }
20
+ function ie(e) {
21
+ return G(e) || V(e) ? e.length === 0 : e instanceof Map || e instanceof Set ? e.size === 0 : z(e) ? Object.keys(e).length === 0 : !1;
22
+ }
23
+ function ae(e) {
24
+ return I(e, "Date");
25
+ }
26
+ function B(e) {
27
+ return e === null;
28
+ }
29
+ function oe(e) {
30
+ return R(e) && B(e);
31
+ }
32
+ function se(e) {
33
+ return R(e) || B(e);
34
+ }
35
+ function ce(e) {
36
+ return I(e, "Number");
37
+ }
38
+ function le(e) {
39
+ return I(e, "Promise") && z(e) && H(e.then) && H(e.then);
40
+ }
41
+ function V(e) {
42
+ return I(e, "String");
43
+ }
44
+ function H(e) {
45
+ return typeof e == "function";
46
+ }
47
+ function U(e) {
48
+ return I(e, "Boolean");
49
+ }
50
+ function W(e) {
51
+ return I(e, "RegExp");
52
+ }
53
+ function G(e) {
54
+ return !!e && Array.isArray(e);
55
+ }
56
+ function ue(e) {
57
+ return typeof window < "u" && I(e, "Window");
58
+ }
59
+ function de(e) {
60
+ return z(e) && !!e.tagName;
61
+ }
62
+ function fe(e) {
63
+ return I(e, "Map");
64
+ }
65
+ var K = typeof window > "u", pe = !K;
66
+ function me(e) {
67
+ return /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?/.test(e);
68
+ }
69
+ function he(e) {
70
+ return e === void 0 || !e && e !== 0 && e !== "0" || !/[^\s]/.test(e + "");
71
+ }
72
+ //#endregion
73
+ //#region src/components/v-ben-table/src/components/HeaderCell.vue?vue&type=script&lang.ts
74
+ var ge = f({
75
+ name: "TableHeaderCell",
76
+ components: {},
77
+ props: { column: {
78
+ type: Object,
79
+ default: () => ({})
80
+ } },
81
+ setup(e) {
82
+ return { getTitle: i(() => e.column?.customTitle || e.column?.title) };
83
+ }
84
+ }), q = (e, t) => {
85
+ let n = e.__vccOpts || e;
86
+ for (let [e, r] of t) n[e] = r;
87
+ return n;
88
+ };
89
+ //#endregion
90
+ //#region src/components/v-ben-table/src/components/HeaderCell.vue
91
+ function _e(e, t, n, r, i, a) {
92
+ return v(), s("span", null, C(e.getTitle), 1);
93
+ }
94
+ var ve = /* @__PURE__ */ q(ge, [["render", _e]]), ye = {
95
+ clickToRowSelect: {
96
+ type: Boolean,
97
+ default: !0
98
+ },
99
+ isTreeTable: Boolean,
100
+ tableSetting: {
101
+ type: Object,
102
+ default: {}
103
+ },
104
+ inset: Boolean,
105
+ showTableSetting: Boolean,
106
+ autoCreateKey: {
107
+ type: Boolean,
108
+ default: !0
109
+ },
110
+ striped: {
111
+ type: Boolean,
112
+ default: !0
113
+ },
114
+ showSummary: Boolean,
115
+ summaryFunc: {
116
+ type: [Function, Array],
117
+ default: null
118
+ },
119
+ summaryData: {
120
+ type: Array,
121
+ default: null
122
+ },
123
+ indentSize: {
124
+ type: Number,
125
+ default: 24
126
+ },
127
+ canColDrag: {
128
+ type: Boolean,
129
+ default: !0
130
+ },
131
+ api: {
132
+ type: Function,
133
+ default: null
134
+ },
135
+ beforeFetch: {
136
+ type: Function,
137
+ default: null
138
+ },
139
+ afterFetch: {
140
+ type: Function,
141
+ default: null
142
+ },
143
+ handleSearchInfoFn: {
144
+ type: Function,
145
+ default: null
146
+ },
147
+ immediate: {
148
+ type: Boolean,
149
+ default: !0
150
+ },
151
+ emptyDataIsShowTable: {
152
+ type: Boolean,
153
+ default: !0
154
+ },
155
+ searchInfo: {
156
+ type: Object,
157
+ default: null
158
+ },
159
+ defSort: {
160
+ type: Object,
161
+ default: null
162
+ },
163
+ useSearchForm: Boolean,
164
+ columns: {
165
+ type: Array,
166
+ default: () => []
167
+ },
168
+ showIndexColumn: {
169
+ type: Boolean,
170
+ default: !0
171
+ },
172
+ indexColumnProps: {
173
+ type: Object,
174
+ default: null
175
+ },
176
+ actionColumn: {
177
+ type: Object,
178
+ default: null
179
+ },
180
+ ellipsis: {
181
+ type: Boolean,
182
+ default: !0
183
+ },
184
+ isCanResizeParent: {
185
+ type: Boolean,
186
+ default: !1
187
+ },
188
+ canResize: {
189
+ type: Boolean,
190
+ default: !0
191
+ },
192
+ clearSelectOnPageChange: Boolean,
193
+ resizeHeightOffset: {
194
+ type: Number,
195
+ default: 0
196
+ },
197
+ rowSelection: {
198
+ type: Object,
199
+ default: null
200
+ },
201
+ title: {
202
+ type: [String, Function],
203
+ default: null
204
+ },
205
+ titleHelpMessage: { type: [String, Array] },
206
+ maxHeight: Number,
207
+ dataSource: {
208
+ type: Array,
209
+ default: null
210
+ },
211
+ rowKey: {
212
+ type: [String, Function],
213
+ default: ""
214
+ },
215
+ bordered: Boolean,
216
+ pagination: {
217
+ type: [Object, Boolean],
218
+ default: null
219
+ },
220
+ loading: Boolean,
221
+ rowClassName: { type: Function },
222
+ scroll: {
223
+ type: Object,
224
+ default: null
225
+ },
226
+ beforeEditSubmit: { type: Function },
227
+ rowDraggable: {
228
+ type: Boolean,
229
+ default: !1
230
+ },
231
+ supportSameLevel: {
232
+ type: Boolean,
233
+ default: !1
234
+ },
235
+ rowDragApi: {
236
+ type: Function,
237
+ default: null
238
+ },
239
+ expandedRowKeys: {
240
+ type: Array,
241
+ default: () => []
242
+ },
243
+ emptyFull: {
244
+ type: Boolean,
245
+ default: !1
246
+ }
247
+ }, be = f({
248
+ name: "BasicTable",
249
+ components: { HeaderCell: ve },
250
+ props: ye,
251
+ emits: ["change"],
252
+ setup(e, { attrs: t, emit: n, slots: r, expose: a }) {
253
+ let o = y(null), s = y([]), c = y(null), l = i(() => {
254
+ let e = { ...t };
255
+ return e = k(e, ["class", "onChange"]), e;
256
+ });
257
+ function u(...e) {
258
+ n("change", ...e);
259
+ }
260
+ return {
261
+ formRef: c,
262
+ tableElRef: o,
263
+ getBindValues: l,
264
+ handleTableChange: u,
265
+ expandKeysList: s,
266
+ getEmptyDataIsShowTable: i(() => {
267
+ let { emptyDataIsShowTable: t, useSearchForm: n, dataSource: r } = e;
268
+ return t || !n ? !0 : !!r.length;
269
+ })
270
+ };
271
+ },
272
+ mounted() {
273
+ this.expandKeysList = this.getBindValues.expandedRowKeys;
274
+ }
275
+ }), xe = { ref: "wrapRef" }, Se = {
276
+ key: 0,
277
+ class: "pr26px"
278
+ }, Ce = {
279
+ key: 1,
280
+ class: "pr8px"
281
+ };
282
+ function we(e, t, n, i, o, c) {
283
+ let u = S("HeaderCell"), f = S("a-table");
284
+ return v(), s("div", xe, [x(e.$slots, "beforeTable"), te(d(f, h({ ref: "tableElRef" }, e.getBindValues, {
285
+ "expanded-row-keys": e.expandKeysList,
286
+ "onUpdate:expandedRowKeys": t[0] ||= (t) => e.expandKeysList = t,
287
+ onChange: e.handleTableChange
288
+ }), l({
289
+ headerCell: D(({ column: t }) => [e.rowDraggable && t?.dataIndex === e.getBindValues.columns[0].dataIndex ? (v(), s(r, { key: 0 }, [e.isTreeTable ? (v(), s("span", Se)) : (v(), s("span", Ce)), d(u, { column: t }, null, 8, ["column"])], 64)) : (v(), a(u, {
290
+ key: 1,
291
+ column: t
292
+ }, null, 8, ["column"]))]),
293
+ bodyCell: D((t) => [x(e.$slots, "bodyCell", _(p(t || {})))]),
294
+ _: 2
295
+ }, [b(Object.keys(e.$slots), (t) => ({
296
+ name: t,
297
+ fn: D((n) => [x(e.$slots, t, _(p(n || {})))])
298
+ }))]), 1040, ["expanded-row-keys", "onChange"]), [[ee, e.getEmptyDataIsShowTable]])], 512);
299
+ }
300
+ var Te = /* @__PURE__ */ q(be, [["render", we]]), J = "vben";
301
+ function Y(e) {
302
+ return {
303
+ prefixCls: `${J}-${e}`,
304
+ prefixVar: J
305
+ };
306
+ }
307
+ //#endregion
308
+ //#region src/components/v-ben-table/src/components/TableAction.vue?vue&type=script&setup=true&lang.ts
309
+ var Ee = {
310
+ key: 0,
311
+ class: "text-14px"
312
+ }, De = {
313
+ key: 0,
314
+ class: "text-14px"
315
+ }, Oe = /* @__PURE__ */ f({
316
+ __name: "TableAction",
317
+ props: {
318
+ actions: {
319
+ type: Array,
320
+ default: null
321
+ },
322
+ dropDownActions: {
323
+ type: Array,
324
+ default: null
325
+ },
326
+ divider: {
327
+ type: Boolean,
328
+ default: !0
329
+ },
330
+ outside: Boolean,
331
+ stopButtonPropagation: {
332
+ type: Boolean,
333
+ default: !1
334
+ }
335
+ },
336
+ setup(e) {
337
+ let n = e, { prefixCls: c } = Y("basic-table-action"), l = t.has;
338
+ function u(e) {
339
+ let t = e.ifShow, n = !0;
340
+ return U(t) && (n = t), H(t) && (n = t(e)), n;
341
+ }
342
+ let f = i(() => (w(n.actions) || []).filter((e) => l(e.auth) && u(e)).map((e) => {
343
+ let { popConfirm: t } = e;
344
+ return {
345
+ getPopupContainer: () => document.body,
346
+ type: "link",
347
+ size: "small",
348
+ ...e,
349
+ ...t || {},
350
+ onConfirm: t?.confirm,
351
+ onCancel: t?.cancel,
352
+ enable: !!t
353
+ };
354
+ })), p = i(() => {
355
+ let e = (w(n.dropDownActions) || []).filter((e) => l(e.auth) && u(e));
356
+ return e.map((t, r) => {
357
+ let { label: i, popConfirm: a } = t;
358
+ return {
359
+ ...t,
360
+ ...a,
361
+ onConfirm: a?.confirm,
362
+ onCancel: a?.cancel,
363
+ text: i,
364
+ divider: r < e.length - 1 ? n.divider : !1
365
+ };
366
+ });
367
+ }), m = i(() => "left");
368
+ function _(e) {
369
+ return {
370
+ getPopupContainer: () => document.body,
371
+ ...V(e) ? { title: e } : e
372
+ };
373
+ }
374
+ function y(e) {
375
+ n.stopButtonPropagation && e.composedPath().find((e) => e.tagName?.toUpperCase() === "BUTTON") && e.stopPropagation();
376
+ }
377
+ return (t, n) => {
378
+ let i = S("a-button");
379
+ return v(), s("div", {
380
+ class: g([T(c), m.value]),
381
+ onClick: y
382
+ }, [(v(!0), s(r, null, b(f.value, (t, n) => (v(), s(r, { key: `${n}-${t.label}` }, [t.tooltip ? (v(), a(T(F), h({
383
+ key: 0,
384
+ placement: "bottom"
385
+ }, { ref_for: !0 }, _(t.tooltip)), {
386
+ default: D(() => [d(T(Q), h({ ref_for: !0 }, t), {
387
+ default: D(() => [t.label ? (v(), s("span", Ee, C(t.label), 1)) : o("", !0)]),
388
+ _: 2
389
+ }, 1040)]),
390
+ _: 2
391
+ }, 1040)) : (v(), a(T(Q), h({
392
+ key: 1,
393
+ ref_for: !0
394
+ }, t), {
395
+ default: D(() => [t.label ? (v(), s("span", De, C(t.label), 1)) : o("", !0)]),
396
+ _: 2
397
+ }, 1040)), e.divider && n < f.value.length - 1 ? (v(), a(T(M), {
398
+ key: 2,
399
+ type: "vertical",
400
+ class: "action-divider"
401
+ })) : o("", !0)], 64))), 128)), e.dropDownActions && p.value.length > 0 ? (v(), a(T($), {
402
+ key: 0,
403
+ trigger: ["hover"],
404
+ "drop-menu-list": p.value,
405
+ popconfirm: ""
406
+ }, {
407
+ default: D(() => [x(t.$slots, "more"), t.$slots.more ? o("", !0) : (v(), a(i, {
408
+ key: 0,
409
+ type: "link",
410
+ size: "small"
411
+ }, {
412
+ default: D(() => [d(T(A), { class: "icon-more" })]),
413
+ _: 1
414
+ }))]),
415
+ _: 3
416
+ }, 8, ["drop-menu-list"])) : o("", !0)], 2);
417
+ };
418
+ }
419
+ }), ke = {
420
+ key: 0,
421
+ class: "text-14px"
422
+ }, Ae = {
423
+ key: 0,
424
+ class: "text-14px"
425
+ }, X = /* @__PURE__ */ f({
426
+ __name: "TableActionAuto",
427
+ props: {
428
+ actions: {
429
+ type: Array,
430
+ default: null
431
+ },
432
+ divider: {
433
+ type: Boolean,
434
+ default: !0
435
+ },
436
+ outside: Boolean,
437
+ stopButtonPropagation: {
438
+ type: Boolean,
439
+ default: !1
440
+ },
441
+ maxDispalyCount: {
442
+ type: Number,
443
+ default: 4
444
+ }
445
+ },
446
+ setup(e) {
447
+ let n = e, { prefixCls: c } = Y("basic-table-action"), l = t.has;
448
+ function u(e) {
449
+ let t = e.ifShow ?? !0;
450
+ return H(t) ? t(e) : !!t;
451
+ }
452
+ let f = i(() => [...w(n.actions) || []].filter((e) => l(e.auth) && u(e))), p = i(() => {
453
+ let e = [];
454
+ return e = n.maxDispalyCount >= f.value.length ? [...f.value] : f.value.slice(0, n.maxDispalyCount), e.map((e) => {
455
+ let { popConfirm: t } = e;
456
+ return {
457
+ getPopupContainer: () => document.body,
458
+ type: "link",
459
+ size: "small",
460
+ ...e,
461
+ ...t || {},
462
+ onConfirm: t?.confirm,
463
+ onCancel: t?.cancel,
464
+ enable: !!t
465
+ };
466
+ });
467
+ }), m = i(() => {
468
+ let e = [];
469
+ return n.maxDispalyCount >= f.value.length ? [] : (e = f.value.slice(n.maxDispalyCount), e.map((t, r) => {
470
+ let { label: i, popConfirm: a } = t;
471
+ return {
472
+ ...t,
473
+ ...a,
474
+ onConfirm: a?.confirm,
475
+ onCancel: a?.cancel,
476
+ text: i,
477
+ divider: r < e.length - 1 ? n.divider : !1
478
+ };
479
+ }));
480
+ }), _ = i(() => "left");
481
+ function y(e) {
482
+ return {
483
+ getPopupContainer: () => document.body,
484
+ placement: "bottom",
485
+ ...V(e) ? { title: e } : e
486
+ };
487
+ }
488
+ function E(e) {
489
+ n.stopButtonPropagation && e.composedPath().find((e) => e.tagName?.toUpperCase() === "BUTTON") && e.stopPropagation();
490
+ }
491
+ return (t, n) => {
492
+ let i = S("a-button");
493
+ return v(), s("div", {
494
+ class: g([T(c), _.value]),
495
+ onClick: O(E, ["stop"])
496
+ }, [(v(!0), s(r, null, b(p.value, (t, n) => (v(), s(r, { key: `${n}-${t.label}` }, [t.tooltip ? (v(), a(T(F), h({
497
+ key: 0,
498
+ ref_for: !0
499
+ }, y(t.tooltip)), {
500
+ default: D(() => [d(T(Q), h({ ref_for: !0 }, t), {
501
+ default: D(() => [t.label ? (v(), s("span", ke, C(t.label), 1)) : o("", !0)]),
502
+ _: 2
503
+ }, 1040)]),
504
+ _: 2
505
+ }, 1040)) : (v(), a(T(Q), h({
506
+ key: 1,
507
+ ref_for: !0
508
+ }, t), {
509
+ default: D(() => [t.label ? (v(), s("span", Ae, C(t.label), 1)) : o("", !0)]),
510
+ _: 2
511
+ }, 1040)), e.divider && n < p.value.length - 1 ? (v(), a(T(M), {
512
+ key: 2,
513
+ type: "vertical",
514
+ class: "action-divider"
515
+ })) : o("", !0)], 64))), 128)), m.value.length > 0 ? (v(), a(T($), {
516
+ key: 0,
517
+ trigger: ["hover"],
518
+ "drop-menu-list": m.value,
519
+ popconfirm: ""
520
+ }, {
521
+ default: D(() => [x(t.$slots, "more"), t.$slots.more ? o("", !0) : (v(), a(i, {
522
+ key: 0,
523
+ type: "link",
524
+ size: "small"
525
+ }, {
526
+ default: D(() => [d(T(A), { class: "icon-more" })]),
527
+ _: 1
528
+ }))]),
529
+ _: 3
530
+ }, 8, ["drop-menu-list"])) : o("", !0)], 2);
531
+ };
532
+ }
533
+ }), je = [
534
+ "primary",
535
+ "error",
536
+ "warning",
537
+ "success",
538
+ ""
539
+ ], Z = /* @__PURE__ */ f({
540
+ name: "AButton",
541
+ extends: j,
542
+ inheritAttrs: !1,
543
+ __name: "BasicButton",
544
+ props: {
545
+ color: {
546
+ type: String,
547
+ validator: (e) => je.includes(e),
548
+ default: ""
549
+ },
550
+ loading: { type: Boolean },
551
+ disabled: { type: Boolean },
552
+ preIcon: { type: String },
553
+ postIcon: { type: String },
554
+ iconSize: {
555
+ type: Number,
556
+ default: 14
557
+ },
558
+ onClick: {
559
+ type: Function,
560
+ default: null
561
+ }
562
+ },
563
+ setup(e) {
564
+ let t = e, n = E(), r = i(() => {
565
+ let { color: e, disabled: n } = t;
566
+ return [{
567
+ [`ant-btn-${e}`]: !!e,
568
+ "is-disabled": n
569
+ }];
570
+ }), o = i(() => ({
571
+ ...T(n),
572
+ ...t
573
+ }));
574
+ return (e, t) => (v(), a(T(j), h(o.value, {
575
+ class: r.value,
576
+ onClick: e.onClick
577
+ }), {
578
+ default: D((t) => [x(e.$slots, "default", _(p(t || {})))]),
579
+ _: 3
580
+ }, 16, ["class", "onClick"]));
581
+ }
582
+ }), Me = f({
583
+ name: "PopButton",
584
+ inheritAttrs: !1,
585
+ props: { enable: {
586
+ type: Boolean,
587
+ default: !0
588
+ } },
589
+ setup(e, { slots: t }) {
590
+ let r = E(), a = i(() => Object.assign({
591
+ okText: n("sys.okText"),
592
+ cancelText: n("sys.cancelText"),
593
+ overlayStyle: {}
594
+ }, {
595
+ ...e,
596
+ ...T(r)
597
+ }));
598
+ return () => {
599
+ let n = k(T(a), "icon"), r = k(n, "title");
600
+ r.disabled && (r.color = "");
601
+ let i = m(Z, r, t);
602
+ return e.enable ? m(P, n, { default: () => i }) : i;
603
+ };
604
+ }
605
+ }), Ne = { class: "custom-btn-container" }, Pe = { class: "btn-left-title" }, Fe = /* @__PURE__ */ q(/* @__PURE__ */ f({
606
+ __name: "custom-button",
607
+ props: { title: {} },
608
+ emits: ["btn-left-click", "btn-right-click"],
609
+ setup(e) {
610
+ return (t, n) => (v(), s("div", Ne, [c("div", {
611
+ class: "btn-left",
612
+ onClick: n[0] ||= O((e) => t.$emit("btn-left-click"), ["stop"])
613
+ }, [x(t.$slots, "left-icon", {}, void 0, !0), c("div", Pe, C(e.title), 1)]), c("div", {
614
+ class: "btn-right",
615
+ onClick: n[1] ||= O((e) => t.$emit("btn-right-click"), ["stop"])
616
+ }, [x(t.$slots, "right-icon", {}, void 0, !0)])]));
617
+ }
618
+ }), [["__scopeId", "data-v-305f4090"]]), Ie = Z, Q = Me, Le = { class: "ml-1" }, Re = {
619
+ key: 1,
620
+ class: "ml-1"
621
+ }, $ = /* @__PURE__ */ f({
622
+ name: "VDropdown",
623
+ __name: "Dropdown",
624
+ props: {
625
+ popconfirm: Boolean,
626
+ trigger: {
627
+ type: Array,
628
+ default: () => ["contextmenu"]
629
+ },
630
+ dropMenuList: {
631
+ type: Array,
632
+ default: () => []
633
+ },
634
+ selectedKeys: {
635
+ type: Array,
636
+ default: () => []
637
+ }
638
+ },
639
+ emits: ["menuEvent"],
640
+ setup(e, { emit: t }) {
641
+ let n = ne, i = N, l = N.Item, f = N.Divider, p = P, m = e, g = t;
642
+ function _(e) {
643
+ let { event: t } = e;
644
+ g("menuEvent", m.dropMenuList.find((e) => `${e.event}` == `${t}`)), e.onClick?.();
645
+ }
646
+ function y(e) {
647
+ let t = k(e, [
648
+ "confirm",
649
+ "cancel",
650
+ "icon"
651
+ ]);
652
+ return !e.onConfirm && e.confirm && H(e.confirm) && (t.onConfirm = e.confirm), !e.onCancel && e.cancel && H(e.cancel) && (t.onCancel = e.cancel), t;
653
+ }
654
+ let S = (e) => ({ key: e });
655
+ return (t, m) => (v(), a(T(n), h({ trigger: e.trigger }, t.$attrs), {
656
+ overlay: D(() => [d(T(i), { "selected-keys": e.selectedKeys }, {
657
+ default: D(() => [(v(!0), s(r, null, b(e.dropMenuList, (t) => (v(), s(r, { key: `${t.event}` }, [d(T(l), h({ class: t.class }, { ref_for: !0 }, S(t.event), {
658
+ disabled: t.disabled,
659
+ onClick: (e) => _(t)
660
+ }), {
661
+ default: D(() => [e.popconfirm && t.popConfirm ? (v(), a(T(p), h({
662
+ key: 0,
663
+ ref_for: !0
664
+ }, y(t.popConfirm)), {
665
+ default: D(() => [c("div", null, [c("span", Le, C(t.text), 1)])]),
666
+ _: 2
667
+ }, 1040)) : (v(), s("span", Re, C(t.text), 1))]),
668
+ _: 2
669
+ }, 1040, [
670
+ "class",
671
+ "disabled",
672
+ "onClick"
673
+ ]), t.divider ? (v(), a(T(f), { key: `d-${t.event}` })) : o("", !0)], 64))), 128))]),
674
+ _: 1
675
+ }, 8, ["selected-keys"])]),
676
+ default: D(() => [c("span", null, [x(t.$slots, "default")]), u(" " + C(e.dropMenuList) + " ", 1)]),
677
+ _: 3
678
+ }, 16, ["trigger"]));
679
+ }
680
+ });
681
+ //#endregion
682
+ //#region src/index.ts
683
+ function ze() {}
684
+ //#endregion
685
+ //#region src/loader.ts
686
+ var Be = new URL(
687
+ /* @vite-ignore */
688
+ "./index.min.css",
689
+ import.meta.url
690
+ );
691
+ e.load(Be.href);
692
+ //#endregion
693
+ export { Te as BasicTable, Ie as Button, Fe as CustomButton, $ as Dropdown, Q as PopConfirmButton, Oe as TableAction, X as TableActionAuto, I as is, G as isArray, U as isBoolean, pe as isClient, ae as isDate, L as isDef, de as isElement, ie as isEmpty, he as isEmptyStr, H as isFunction, fe as isMap, B as isNull, oe as isNullAndUnDef, se as isNullOrUnDef, ce as isNumber, z as isObject, le as isPromise, W as isRegExp, K as isServer, V as isString, R as isUnDef, me as isUrl, ue as isWindow, ze as run };
package/es/loader.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './index';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/v-ben",
3
- "version": "0.1.4-dev.12",
3
+ "version": "0.1.4-dev.13",
4
4
  "type": "module",
5
5
  "description": "paas 平台历史 v-ben 内容",
6
6
  "main": "dist/index.min.cjs",
@@ -50,23 +50,23 @@
50
50
  "dependencies": {
51
51
  "@ant-design/icons-vue": "^6.1.0",
52
52
  "@gct-paas/api": "^0.1.1",
53
- "@gct-paas/core": "0.1.4-dev.12",
53
+ "@gct-paas/core": "0.1.4-dev.13",
54
54
  "@gct-paas/platform-icons": "^0.0.2",
55
- "@gct-paas/scss": "0.1.4-dev.12",
55
+ "@gct-paas/scss": "0.1.4-dev.13",
56
56
  "@icon-park/vue-next": "^1.4.2",
57
57
  "@vueuse/core": "^14.1.0",
58
58
  "ant-design-vue": "3.2.20",
59
59
  "lodash-es": "^4.17.23",
60
60
  "sortablejs": "^1.15.7",
61
- "vue": "^3.5.29",
61
+ "vue": "^3.5.30",
62
62
  "vue-types": "^6.0.0"
63
63
  },
64
64
  "devDependencies": {
65
- "@gct-paas/build": "^0.1.6-dev.1",
65
+ "@gct-paas/build": "^0.1.6-dev.4",
66
66
  "vue-tsc": "^3.2.5"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "vue": "^3.x"
70
70
  },
71
- "gitHead": "0a7f1a0388cb21eb1c3a4868b14d664a5a3152ed"
71
+ "gitHead": "730343d424ac98e1cd00b6f4cddf8a9823a48357"
72
72
  }
@@ -1,685 +0,0 @@
1
- import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createTextVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, h as d, mergeProps as f, normalizeClass as p, normalizeProps as m, openBlock as h, ref as g, renderList as _, renderSlot as v, resolveComponent as y, toDisplayString as b, toRaw as x, unref as S, useAttrs as C, vShow as w, withCtx as T, withDirectives as E, withModifiers as D } from "vue";
2
- import { omit as O } from "lodash-es";
3
- import { MoreOutlined as k } from "@ant-design/icons-vue";
4
- import { Button as A, Divider as j, Dropdown as ee, Menu as M, Popconfirm as N, Tooltip as P } from "ant-design-vue";
5
- import { permission as F, t as I } from "@gct-paas/core";
6
- //#region src/utils/is.ts
7
- var te = Object.prototype.toString;
8
- function L(e, t) {
9
- return te.call(e) === `[object ${t}]`;
10
- }
11
- function R(e) {
12
- return e !== void 0;
13
- }
14
- function z(e) {
15
- return !R(e);
16
- }
17
- function B(e) {
18
- return e !== null && L(e, "Object");
19
- }
20
- function ne(e) {
21
- return G(e) || H(e) ? e.length === 0 : e instanceof Map || e instanceof Set ? e.size === 0 : B(e) ? Object.keys(e).length === 0 : !1;
22
- }
23
- function re(e) {
24
- return L(e, "Date");
25
- }
26
- function V(e) {
27
- return e === null;
28
- }
29
- function ie(e) {
30
- return z(e) && V(e);
31
- }
32
- function ae(e) {
33
- return z(e) || V(e);
34
- }
35
- function oe(e) {
36
- return L(e, "Number");
37
- }
38
- function se(e) {
39
- return L(e, "Promise") && B(e) && U(e.then) && U(e.then);
40
- }
41
- function H(e) {
42
- return L(e, "String");
43
- }
44
- function U(e) {
45
- return typeof e == "function";
46
- }
47
- function W(e) {
48
- return L(e, "Boolean");
49
- }
50
- function ce(e) {
51
- return L(e, "RegExp");
52
- }
53
- function G(e) {
54
- return !!e && Array.isArray(e);
55
- }
56
- function le(e) {
57
- return typeof window < "u" && L(e, "Window");
58
- }
59
- function ue(e) {
60
- return B(e) && !!e.tagName;
61
- }
62
- function de(e) {
63
- return L(e, "Map");
64
- }
65
- var K = typeof window > "u", fe = !K;
66
- function pe(e) {
67
- return /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?/.test(e);
68
- }
69
- function me(e) {
70
- return e === void 0 || !e && e !== 0 && e !== "0" || !/[^\s]/.test(e + "");
71
- }
72
- //#endregion
73
- //#region src/components/v-ben-table/src/components/HeaderCell.vue?vue&type=script&lang.ts
74
- var he = l({
75
- name: "TableHeaderCell",
76
- components: {},
77
- props: { column: {
78
- type: Object,
79
- default: () => ({})
80
- } },
81
- setup(e) {
82
- return { getTitle: t(() => e.column?.customTitle || e.column?.title) };
83
- }
84
- }), q = (e, t) => {
85
- let n = e.__vccOpts || e;
86
- for (let [e, r] of t) n[e] = r;
87
- return n;
88
- };
89
- //#endregion
90
- //#region src/components/v-ben-table/src/components/HeaderCell.vue
91
- function ge(e, t, n, r, a, o) {
92
- return h(), i("span", null, b(e.getTitle), 1);
93
- }
94
- var _e = /* @__PURE__ */ q(he, [["render", ge]]), ve = {
95
- clickToRowSelect: {
96
- type: Boolean,
97
- default: !0
98
- },
99
- isTreeTable: Boolean,
100
- tableSetting: {
101
- type: Object,
102
- default: {}
103
- },
104
- inset: Boolean,
105
- showTableSetting: Boolean,
106
- autoCreateKey: {
107
- type: Boolean,
108
- default: !0
109
- },
110
- striped: {
111
- type: Boolean,
112
- default: !0
113
- },
114
- showSummary: Boolean,
115
- summaryFunc: {
116
- type: [Function, Array],
117
- default: null
118
- },
119
- summaryData: {
120
- type: Array,
121
- default: null
122
- },
123
- indentSize: {
124
- type: Number,
125
- default: 24
126
- },
127
- canColDrag: {
128
- type: Boolean,
129
- default: !0
130
- },
131
- api: {
132
- type: Function,
133
- default: null
134
- },
135
- beforeFetch: {
136
- type: Function,
137
- default: null
138
- },
139
- afterFetch: {
140
- type: Function,
141
- default: null
142
- },
143
- handleSearchInfoFn: {
144
- type: Function,
145
- default: null
146
- },
147
- immediate: {
148
- type: Boolean,
149
- default: !0
150
- },
151
- emptyDataIsShowTable: {
152
- type: Boolean,
153
- default: !0
154
- },
155
- searchInfo: {
156
- type: Object,
157
- default: null
158
- },
159
- defSort: {
160
- type: Object,
161
- default: null
162
- },
163
- useSearchForm: Boolean,
164
- columns: {
165
- type: Array,
166
- default: () => []
167
- },
168
- showIndexColumn: {
169
- type: Boolean,
170
- default: !0
171
- },
172
- indexColumnProps: {
173
- type: Object,
174
- default: null
175
- },
176
- actionColumn: {
177
- type: Object,
178
- default: null
179
- },
180
- ellipsis: {
181
- type: Boolean,
182
- default: !0
183
- },
184
- isCanResizeParent: {
185
- type: Boolean,
186
- default: !1
187
- },
188
- canResize: {
189
- type: Boolean,
190
- default: !0
191
- },
192
- clearSelectOnPageChange: Boolean,
193
- resizeHeightOffset: {
194
- type: Number,
195
- default: 0
196
- },
197
- rowSelection: {
198
- type: Object,
199
- default: null
200
- },
201
- title: {
202
- type: [String, Function],
203
- default: null
204
- },
205
- titleHelpMessage: { type: [String, Array] },
206
- maxHeight: Number,
207
- dataSource: {
208
- type: Array,
209
- default: null
210
- },
211
- rowKey: {
212
- type: [String, Function],
213
- default: ""
214
- },
215
- bordered: Boolean,
216
- pagination: {
217
- type: [Object, Boolean],
218
- default: null
219
- },
220
- loading: Boolean,
221
- rowClassName: { type: Function },
222
- scroll: {
223
- type: Object,
224
- default: null
225
- },
226
- beforeEditSubmit: { type: Function },
227
- rowDraggable: {
228
- type: Boolean,
229
- default: !1
230
- },
231
- supportSameLevel: {
232
- type: Boolean,
233
- default: !1
234
- },
235
- rowDragApi: {
236
- type: Function,
237
- default: null
238
- },
239
- expandedRowKeys: {
240
- type: Array,
241
- default: () => []
242
- },
243
- emptyFull: {
244
- type: Boolean,
245
- default: !1
246
- }
247
- }, ye = l({
248
- name: "BasicTable",
249
- components: { HeaderCell: _e },
250
- props: ve,
251
- emits: ["change"],
252
- setup(e, { attrs: n, emit: r, slots: i, expose: a }) {
253
- let o = g(null), s = g([]), c = g(null), l = t(() => {
254
- let e = { ...n };
255
- return e = O(e, ["class", "onChange"]), e;
256
- });
257
- function u(...e) {
258
- r("change", ...e);
259
- }
260
- return {
261
- formRef: c,
262
- tableElRef: o,
263
- getBindValues: l,
264
- handleTableChange: u,
265
- expandKeysList: s,
266
- getEmptyDataIsShowTable: t(() => {
267
- let { emptyDataIsShowTable: t, useSearchForm: n, dataSource: r } = e;
268
- return t || !n ? !0 : !!r.length;
269
- })
270
- };
271
- },
272
- mounted() {
273
- this.expandKeysList = this.getBindValues.expandedRowKeys;
274
- }
275
- }), be = { ref: "wrapRef" }, xe = {
276
- key: 0,
277
- class: "pr26px"
278
- }, Se = {
279
- key: 1,
280
- class: "pr8px"
281
- };
282
- function Ce(t, r, a, s, l, d) {
283
- let p = y("HeaderCell"), g = y("a-table");
284
- return h(), i("div", be, [v(t.$slots, "beforeTable"), E(c(g, f({ ref: "tableElRef" }, t.getBindValues, {
285
- "expanded-row-keys": t.expandKeysList,
286
- "onUpdate:expandedRowKeys": r[0] ||= (e) => t.expandKeysList = e,
287
- onChange: t.handleTableChange
288
- }), o({
289
- headerCell: T(({ column: r }) => [t.rowDraggable && r?.dataIndex === t.getBindValues.columns[0].dataIndex ? (h(), i(e, { key: 0 }, [t.isTreeTable ? (h(), i("span", xe)) : (h(), i("span", Se)), c(p, { column: r }, null, 8, ["column"])], 64)) : (h(), n(p, {
290
- key: 1,
291
- column: r
292
- }, null, 8, ["column"]))]),
293
- bodyCell: T((e) => [v(t.$slots, "bodyCell", m(u(e || {})))]),
294
- _: 2
295
- }, [_(Object.keys(t.$slots), (e) => ({
296
- name: e,
297
- fn: T((n) => [v(t.$slots, e, m(u(n || {})))])
298
- }))]), 1040, ["expanded-row-keys", "onChange"]), [[w, t.getEmptyDataIsShowTable]])], 512);
299
- }
300
- var we = /* @__PURE__ */ q(ye, [["render", Ce]]), J = "vben";
301
- function Y(e) {
302
- return {
303
- prefixCls: `${J}-${e}`,
304
- prefixVar: J
305
- };
306
- }
307
- //#endregion
308
- //#region src/components/v-ben-table/src/components/TableAction.vue?vue&type=script&setup=true&lang.ts
309
- var Te = {
310
- key: 0,
311
- class: "text-14px"
312
- }, Ee = {
313
- key: 0,
314
- class: "text-14px"
315
- }, De = /* @__PURE__ */ l({
316
- __name: "TableAction",
317
- props: {
318
- actions: {
319
- type: Array,
320
- default: null
321
- },
322
- dropDownActions: {
323
- type: Array,
324
- default: null
325
- },
326
- divider: {
327
- type: Boolean,
328
- default: !0
329
- },
330
- outside: Boolean,
331
- stopButtonPropagation: {
332
- type: Boolean,
333
- default: !1
334
- }
335
- },
336
- setup(a) {
337
- let o = a, { prefixCls: s } = Y("basic-table-action"), l = F.has;
338
- function u(e) {
339
- let t = e.ifShow, n = !0;
340
- return W(t) && (n = t), U(t) && (n = t(e)), n;
341
- }
342
- let d = t(() => (x(o.actions) || []).filter((e) => l(e.auth) && u(e)).map((e) => {
343
- let { popConfirm: t } = e;
344
- return {
345
- getPopupContainer: () => document.body,
346
- type: "link",
347
- size: "small",
348
- ...e,
349
- ...t || {},
350
- onConfirm: t?.confirm,
351
- onCancel: t?.cancel,
352
- enable: !!t
353
- };
354
- })), m = t(() => {
355
- let e = (x(o.dropDownActions) || []).filter((e) => l(e.auth) && u(e));
356
- return e.map((t, n) => {
357
- let { label: r, popConfirm: i } = t;
358
- return {
359
- ...t,
360
- ...i,
361
- onConfirm: i?.confirm,
362
- onCancel: i?.cancel,
363
- text: r,
364
- divider: n < e.length - 1 ? o.divider : !1
365
- };
366
- });
367
- }), g = t(() => "left");
368
- function C(e) {
369
- return {
370
- getPopupContainer: () => document.body,
371
- ...H(e) ? { title: e } : e
372
- };
373
- }
374
- function w(e) {
375
- o.stopButtonPropagation && e.composedPath().find((e) => e.tagName?.toUpperCase() === "BUTTON") && e.stopPropagation();
376
- }
377
- return (t, o) => {
378
- let l = y("a-button");
379
- return h(), i("div", {
380
- class: p([S(s), g.value]),
381
- onClick: w
382
- }, [(h(!0), i(e, null, _(d.value, (t, o) => (h(), i(e, { key: `${o}-${t.label}` }, [t.tooltip ? (h(), n(S(P), f({
383
- key: 0,
384
- placement: "bottom"
385
- }, { ref_for: !0 }, C(t.tooltip)), {
386
- default: T(() => [c(S(Q), f({ ref_for: !0 }, t), {
387
- default: T(() => [t.label ? (h(), i("span", Te, b(t.label), 1)) : r("", !0)]),
388
- _: 2
389
- }, 1040)]),
390
- _: 2
391
- }, 1040)) : (h(), n(S(Q), f({
392
- key: 1,
393
- ref_for: !0
394
- }, t), {
395
- default: T(() => [t.label ? (h(), i("span", Ee, b(t.label), 1)) : r("", !0)]),
396
- _: 2
397
- }, 1040)), a.divider && o < d.value.length - 1 ? (h(), n(S(j), {
398
- key: 2,
399
- type: "vertical",
400
- class: "action-divider"
401
- })) : r("", !0)], 64))), 128)), a.dropDownActions && m.value.length > 0 ? (h(), n(S($), {
402
- key: 0,
403
- trigger: ["hover"],
404
- "drop-menu-list": m.value,
405
- popconfirm: ""
406
- }, {
407
- default: T(() => [v(t.$slots, "more"), t.$slots.more ? r("", !0) : (h(), n(l, {
408
- key: 0,
409
- type: "link",
410
- size: "small"
411
- }, {
412
- default: T(() => [c(S(k), { class: "icon-more" })]),
413
- _: 1
414
- }))]),
415
- _: 3
416
- }, 8, ["drop-menu-list"])) : r("", !0)], 2);
417
- };
418
- }
419
- }), Oe = {
420
- key: 0,
421
- class: "text-14px"
422
- }, ke = {
423
- key: 0,
424
- class: "text-14px"
425
- }, Ae = /* @__PURE__ */ l({
426
- __name: "TableActionAuto",
427
- props: {
428
- actions: {
429
- type: Array,
430
- default: null
431
- },
432
- divider: {
433
- type: Boolean,
434
- default: !0
435
- },
436
- outside: Boolean,
437
- stopButtonPropagation: {
438
- type: Boolean,
439
- default: !1
440
- },
441
- maxDispalyCount: {
442
- type: Number,
443
- default: 4
444
- }
445
- },
446
- setup(a) {
447
- let o = a, { prefixCls: s } = Y("basic-table-action"), l = F.has;
448
- function u(e) {
449
- let t = e.ifShow ?? !0;
450
- return U(t) ? t(e) : !!t;
451
- }
452
- let d = t(() => [...x(o.actions) || []].filter((e) => l(e.auth) && u(e))), m = t(() => {
453
- let e = [];
454
- return e = o.maxDispalyCount >= d.value.length ? [...d.value] : d.value.slice(0, o.maxDispalyCount), e.map((e) => {
455
- let { popConfirm: t } = e;
456
- return {
457
- getPopupContainer: () => document.body,
458
- type: "link",
459
- size: "small",
460
- ...e,
461
- ...t || {},
462
- onConfirm: t?.confirm,
463
- onCancel: t?.cancel,
464
- enable: !!t
465
- };
466
- });
467
- }), g = t(() => {
468
- let e = [];
469
- return o.maxDispalyCount >= d.value.length ? [] : (e = d.value.slice(o.maxDispalyCount), e.map((t, n) => {
470
- let { label: r, popConfirm: i } = t;
471
- return {
472
- ...t,
473
- ...i,
474
- onConfirm: i?.confirm,
475
- onCancel: i?.cancel,
476
- text: r,
477
- divider: n < e.length - 1 ? o.divider : !1
478
- };
479
- }));
480
- }), C = t(() => "left");
481
- function w(e) {
482
- return {
483
- getPopupContainer: () => document.body,
484
- placement: "bottom",
485
- ...H(e) ? { title: e } : e
486
- };
487
- }
488
- function E(e) {
489
- o.stopButtonPropagation && e.composedPath().find((e) => e.tagName?.toUpperCase() === "BUTTON") && e.stopPropagation();
490
- }
491
- return (t, o) => {
492
- let l = y("a-button");
493
- return h(), i("div", {
494
- class: p([S(s), C.value]),
495
- onClick: D(E, ["stop"])
496
- }, [(h(!0), i(e, null, _(m.value, (t, o) => (h(), i(e, { key: `${o}-${t.label}` }, [t.tooltip ? (h(), n(S(P), f({
497
- key: 0,
498
- ref_for: !0
499
- }, w(t.tooltip)), {
500
- default: T(() => [c(S(Q), f({ ref_for: !0 }, t), {
501
- default: T(() => [t.label ? (h(), i("span", Oe, b(t.label), 1)) : r("", !0)]),
502
- _: 2
503
- }, 1040)]),
504
- _: 2
505
- }, 1040)) : (h(), n(S(Q), f({
506
- key: 1,
507
- ref_for: !0
508
- }, t), {
509
- default: T(() => [t.label ? (h(), i("span", ke, b(t.label), 1)) : r("", !0)]),
510
- _: 2
511
- }, 1040)), a.divider && o < m.value.length - 1 ? (h(), n(S(j), {
512
- key: 2,
513
- type: "vertical",
514
- class: "action-divider"
515
- })) : r("", !0)], 64))), 128)), g.value.length > 0 ? (h(), n(S($), {
516
- key: 0,
517
- trigger: ["hover"],
518
- "drop-menu-list": g.value,
519
- popconfirm: ""
520
- }, {
521
- default: T(() => [v(t.$slots, "more"), t.$slots.more ? r("", !0) : (h(), n(l, {
522
- key: 0,
523
- type: "link",
524
- size: "small"
525
- }, {
526
- default: T(() => [c(S(k), { class: "icon-more" })]),
527
- _: 1
528
- }))]),
529
- _: 3
530
- }, 8, ["drop-menu-list"])) : r("", !0)], 2);
531
- };
532
- }
533
- }), X = [
534
- "primary",
535
- "error",
536
- "warning",
537
- "success",
538
- ""
539
- ], Z = /* @__PURE__ */ l({
540
- name: "AButton",
541
- extends: A,
542
- inheritAttrs: !1,
543
- __name: "BasicButton",
544
- props: {
545
- color: {
546
- type: String,
547
- validator: (e) => X.includes(e),
548
- default: ""
549
- },
550
- loading: { type: Boolean },
551
- disabled: { type: Boolean },
552
- preIcon: { type: String },
553
- postIcon: { type: String },
554
- iconSize: {
555
- type: Number,
556
- default: 14
557
- },
558
- onClick: {
559
- type: Function,
560
- default: null
561
- }
562
- },
563
- setup(e) {
564
- let r = e, i = C(), a = t(() => {
565
- let { color: e, disabled: t } = r;
566
- return [{
567
- [`ant-btn-${e}`]: !!e,
568
- "is-disabled": t
569
- }];
570
- }), o = t(() => ({
571
- ...S(i),
572
- ...r
573
- }));
574
- return (e, t) => (h(), n(S(A), f(o.value, {
575
- class: a.value,
576
- onClick: e.onClick
577
- }), {
578
- default: T((t) => [v(e.$slots, "default", m(u(t || {})))]),
579
- _: 3
580
- }, 16, ["class", "onClick"]));
581
- }
582
- }), je = l({
583
- name: "PopButton",
584
- inheritAttrs: !1,
585
- props: { enable: {
586
- type: Boolean,
587
- default: !0
588
- } },
589
- setup(e, { slots: n }) {
590
- let r = C(), i = t(() => Object.assign({
591
- okText: I("sys.okText"),
592
- cancelText: I("sys.cancelText"),
593
- overlayStyle: {}
594
- }, {
595
- ...e,
596
- ...S(r)
597
- }));
598
- return () => {
599
- let t = O(S(i), "icon"), r = O(t, "title");
600
- r.disabled && (r.color = "");
601
- let a = d(Z, r, n);
602
- return e.enable ? d(N, t, { default: () => a }) : a;
603
- };
604
- }
605
- }), Me = { class: "custom-btn-container" }, Ne = { class: "btn-left-title" }, Pe = /* @__PURE__ */ q(/* @__PURE__ */ l({
606
- __name: "custom-button",
607
- props: { title: {} },
608
- emits: ["btn-left-click", "btn-right-click"],
609
- setup(e) {
610
- return (t, n) => (h(), i("div", Me, [a("div", {
611
- class: "btn-left",
612
- onClick: n[0] ||= D((e) => t.$emit("btn-left-click"), ["stop"])
613
- }, [v(t.$slots, "left-icon", {}, void 0, !0), a("div", Ne, b(e.title), 1)]), a("div", {
614
- class: "btn-right",
615
- onClick: n[1] ||= D((e) => t.$emit("btn-right-click"), ["stop"])
616
- }, [v(t.$slots, "right-icon", {}, void 0, !0)])]));
617
- }
618
- }), [["__scopeId", "data-v-305f4090"]]), Fe = Z, Q = je, Ie = { class: "ml-1" }, Le = {
619
- key: 1,
620
- class: "ml-1"
621
- }, $ = /* @__PURE__ */ l({
622
- name: "VDropdown",
623
- __name: "Dropdown",
624
- props: {
625
- popconfirm: Boolean,
626
- trigger: {
627
- type: Array,
628
- default: () => ["contextmenu"]
629
- },
630
- dropMenuList: {
631
- type: Array,
632
- default: () => []
633
- },
634
- selectedKeys: {
635
- type: Array,
636
- default: () => []
637
- }
638
- },
639
- emits: ["menuEvent"],
640
- setup(t, { emit: o }) {
641
- let l = ee, u = M, d = M.Item, p = M.Divider, m = N, g = t, y = o;
642
- function x(e) {
643
- let { event: t } = e;
644
- y("menuEvent", g.dropMenuList.find((e) => `${e.event}` == `${t}`)), e.onClick?.();
645
- }
646
- function C(e) {
647
- let t = O(e, [
648
- "confirm",
649
- "cancel",
650
- "icon"
651
- ]);
652
- return !e.onConfirm && e.confirm && U(e.confirm) && (t.onConfirm = e.confirm), !e.onCancel && e.cancel && U(e.cancel) && (t.onCancel = e.cancel), t;
653
- }
654
- let w = (e) => ({ key: e });
655
- return (o, g) => (h(), n(S(l), f({ trigger: t.trigger }, o.$attrs), {
656
- overlay: T(() => [c(S(u), { "selected-keys": t.selectedKeys }, {
657
- default: T(() => [(h(!0), i(e, null, _(t.dropMenuList, (o) => (h(), i(e, { key: `${o.event}` }, [c(S(d), f({ class: o.class }, { ref_for: !0 }, w(o.event), {
658
- disabled: o.disabled,
659
- onClick: (e) => x(o)
660
- }), {
661
- default: T(() => [t.popconfirm && o.popConfirm ? (h(), n(S(m), f({
662
- key: 0,
663
- ref_for: !0
664
- }, C(o.popConfirm)), {
665
- default: T(() => [a("div", null, [a("span", Ie, b(o.text), 1)])]),
666
- _: 2
667
- }, 1040)) : (h(), i("span", Le, b(o.text), 1))]),
668
- _: 2
669
- }, 1040, [
670
- "class",
671
- "disabled",
672
- "onClick"
673
- ]), o.divider ? (h(), n(S(p), { key: `d-${o.event}` })) : r("", !0)], 64))), 128))]),
674
- _: 1
675
- }, 8, ["selected-keys"])]),
676
- default: T(() => [a("span", null, [v(o.$slots, "default")]), s(" " + b(t.dropMenuList) + " ", 1)]),
677
- _: 3
678
- }, 16, ["trigger"]));
679
- }
680
- });
681
- //#endregion
682
- //#region src/index.ts
683
- function Re() {}
684
- //#endregion
685
- export { we as BasicTable, Fe as Button, Pe as CustomButton, $ as Dropdown, Q as PopConfirmButton, De as TableAction, Ae as TableActionAuto, L as is, G as isArray, W as isBoolean, fe as isClient, re as isDate, R as isDef, ue as isElement, ne as isEmpty, me as isEmptyStr, U as isFunction, de as isMap, V as isNull, ie as isNullAndUnDef, ae as isNullOrUnDef, oe as isNumber, B as isObject, se as isPromise, ce as isRegExp, K as isServer, H as isString, z as isUnDef, pe as isUrl, le as isWindow, Re as run };