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

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.
Files changed (47) hide show
  1. package/dist/index.esm.min.js +685 -0
  2. package/dist/index.min.css +2 -1
  3. package/es/_virtual/_plugin-vue_export-helper.mjs +7 -8
  4. package/es/components/index.mjs +7 -0
  5. package/es/components/v-ben-button/index.mjs +7 -8
  6. package/es/components/v-ben-button/src/BasicButton.vue.mjs +5 -40
  7. package/es/components/v-ben-button/src/BasicButton.vue_vue_type_script_setup_true_lang.mjs +37 -0
  8. package/es/components/v-ben-button/src/PopConfirmButton.vue.mjs +5 -46
  9. package/es/components/v-ben-button/src/PopConfirmButton.vue_vue_type_script_lang.mjs +36 -0
  10. package/es/components/v-ben-button/src/custom-button.vue.mjs +7 -7
  11. package/es/components/v-ben-button/src/custom-button.vue_vue_type_script_setup_true_name_custom-button_lang.mjs +22 -0
  12. package/es/components/v-ben-button/src/props.mjs +27 -27
  13. package/es/components/v-ben-dropdown/index.mjs +4 -4
  14. package/es/components/v-ben-dropdown/src/Dropdown.vue.mjs +5 -113
  15. package/es/components/v-ben-dropdown/src/Dropdown.vue_vue_type_script_setup_true_lang.mjs +87 -0
  16. package/es/components/v-ben-table/index.mjs +3 -0
  17. package/es/components/v-ben-table/src/BasicTable.vue.d.ts +6 -6
  18. package/es/components/v-ben-table/src/BasicTable.vue.mjs +33 -49
  19. package/es/components/v-ben-table/src/BasicTable.vue_vue_type_script_lang.mjs +41 -0
  20. package/es/components/v-ben-table/src/components/HeaderCell.vue.mjs +8 -8
  21. package/es/components/v-ben-table/src/components/HeaderCell.vue_vue_type_script_lang.mjs +15 -0
  22. package/es/components/v-ben-table/src/components/TableAction.vue.mjs +6 -174
  23. package/es/components/v-ben-table/src/components/TableAction.vue_vue_type_script_setup_true_lang.mjs +145 -0
  24. package/es/components/v-ben-table/src/components/TableAction.vue_vue_type_style_index_0_lang.css +37 -0
  25. package/es/components/v-ben-table/src/components/TableActionAuto.vue.mjs +6 -181
  26. package/es/components/v-ben-table/src/components/TableActionAuto.vue_vue_type_script_setup_true_lang.mjs +159 -0
  27. package/es/components/v-ben-table/src/components/TableActionAuto.vue_vue_type_style_index_0_lang.css +37 -0
  28. package/es/components/v-ben-table/src/props.d.ts +2 -2
  29. package/es/components/v-ben-table/src/props.mjs +155 -134
  30. package/es/hooks/useDesign.mjs +8 -7
  31. package/es/index.mjs +12 -14
  32. package/es/utils/is.mjs +29 -35
  33. package/package.json +5 -5
  34. package/dist/index.esm.min.mjs +0 -796
  35. package/dist/index.min.cjs +0 -1
  36. package/dist/index.system.min.js +0 -1
  37. package/es/components/v-ben-button/src/BasicButton.vue2.mjs +0 -5
  38. package/es/components/v-ben-button/src/PopConfirmButton.vue2.mjs +0 -5
  39. package/es/components/v-ben-button/src/custom-button.vue3.mjs +0 -32
  40. package/es/components/v-ben-dropdown/src/Dropdown.vue2.mjs +0 -5
  41. package/es/components/v-ben-table/src/BasicTable.vue2.mjs +0 -48
  42. package/es/components/v-ben-table/src/components/HeaderCell.vue2.mjs +0 -20
  43. package/es/components/v-ben-table/src/components/TableAction.css +0 -37
  44. package/es/components/v-ben-table/src/components/TableAction.vue3.mjs +0 -6
  45. package/es/components/v-ben-table/src/components/TableActionAuto.css +0 -37
  46. package/es/components/v-ben-table/src/components/TableActionAuto.vue3.mjs +0 -6
  47. /package/es/components/v-ben-button/src/{custom-button.css → custom-button.vue_vue_type_style_index_0_scoped_305f4090_lang.css} +0 -0
@@ -0,0 +1,685 @@
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 };
@@ -1 +1,2 @@
1
- ."vben-basic-table-action" .ant-divider,."vben-basic-table-action" .ant-divider-vertical{margin:0 2px}."vben-basic-table-action"{display:flex;align-items:center}."vben-basic-table-action" .action-divider{display:table}."vben-basic-table-action".left{justify-content:flex-start}."vben-basic-table-action".center{justify-content:center}."vben-basic-table-action".right{justify-content:flex-end}."vben-basic-table-action" button{display:flex;align-items:center}."vben-basic-table-action" button span{margin-left:0!important}."vben-basic-table-action" button.ant-btn-circle span{margin:auto!important}."vben-basic-table-action" .ant-divider,."vben-basic-table-action" .ant-divider-vertical{margin:0 10px}."vben-basic-table-action" .icon-more{transform:rotate(90deg)}."vben-basic-table-action" .icon-more svg{font-size:1.1em;font-weight:700}.custom-btn-container[data-v-305f4090]{display:inline-flex;justify-content:center;align-items:center;line-height:1.5715;position:relative;font-weight:400;white-space:nowrap;text-align:center;background-image:none;border:1px solid transparent;cursor:pointer;transition:all .3s cubic-bezier(.645,.045,.355,1);-webkit-user-select:none;user-select:none;touch-action:manipulation;height:32px;font-size:14px;border-radius:4px;color:#fff;border-color:var(--ant-primary-color);background:var(--ant-primary-color);text-shadow:0 -1px 0 rgba(0,0,0,.12);box-shadow:0 2px #0000000b;vertical-align:top}.custom-btn-container .btn-left[data-v-305f4090]{display:flex;align-items:center;justify-content:center;height:32px;padding:4px 12px;margin-right:1px}.custom-btn-container .btn-left-title[data-v-305f4090]{margin-left:4px;line-height:22px}.custom-btn-container .btn-left[data-v-305f4090]:hover{color:#fff;border-color:var(--ant-primary-color-hover);background:var(--ant-primary-color-hover)}.custom-btn-container .btn-right[data-v-305f4090]{display:flex;align-items:center;justify-content:center;position:relative;height:32px;padding:4px 12px;margin-left:2px}.custom-btn-container .btn-right[data-v-305f4090]:before{content:"";position:absolute;width:1px;height:14px;background-color:#fff;left:-2px}.custom-btn-container .btn-right[data-v-305f4090]:hover{color:#fff;border-color:var(--ant-primary-color-hover);background:var(--ant-primary-color-hover)}
1
+ .vben-basic-table-action{align-items:center;display:flex}.vben-basic-table-action .action-divider{display:table}.vben-basic-table-action.left{justify-content:flex-start}.vben-basic-table-action.center{justify-content:center}.vben-basic-table-action.right{justify-content:flex-end}.vben-basic-table-action button{align-items:center;display:flex}.vben-basic-table-action button span{margin-left:0!important}.vben-basic-table-action button.ant-btn-circle span{margin:auto!important}.vben-basic-table-action .ant-divider,.vben-basic-table-action .ant-divider-vertical{margin:0 10px}.vben-basic-table-action .icon-more{transform:rotate(90deg)}.vben-basic-table-action .icon-more svg{font-size:1.1em;font-weight:700}.custom-btn-container[data-v-305f4090]{white-space:nowrap;text-align:center;cursor:pointer;-webkit-user-select:none;user-select:none;touch-action:manipulation;color:#fff;border:1px solid #0000;border-color:var(--ant-primary-color);background-image:none;background:var(--ant-primary-color);text-shadow:0 -1px #0000001f;vertical-align:top;border-radius:4px;justify-content:center;align-items:center;height:32px;font-size:14px;font-weight:400;line-height:1.5715;transition:all .3s cubic-bezier(.645,.045,.355,1);display:inline-flex;position:relative;box-shadow:0 2px #0000000b}.custom-btn-container .btn-left[data-v-305f4090]{justify-content:center;align-items:center;height:32px;margin-right:1px;padding:4px 12px;display:flex}.custom-btn-container .btn-left-title[data-v-305f4090]{margin-left:4px;line-height:22px}.custom-btn-container .btn-left[data-v-305f4090]:hover{color:#fff;border-color:var(--ant-primary-color-hover);background:var(--ant-primary-color-hover)}.custom-btn-container .btn-right[data-v-305f4090]{justify-content:center;align-items:center;height:32px;margin-left:2px;padding:4px 12px;display:flex;position:relative}.custom-btn-container .btn-right[data-v-305f4090]:before{content:"";background-color:#fff;width:1px;height:14px;position:absolute;left:-2px}.custom-btn-container .btn-right[data-v-305f4090]:hover{color:#fff;border-color:var(--ant-primary-color-hover);background:var(--ant-primary-color-hover)}
2
+ /*$vite$:1*/
@@ -1,9 +1,8 @@
1
- const _export_sfc = (sfc, props) => {
2
- const target = sfc.__vccOpts || sfc;
3
- for (const [key, val] of props) {
4
- target[key] = val;
5
- }
6
- return target;
1
+ //#region \0plugin-vue:export-helper
2
+ var _plugin_vue_export_helper_default = (sfc, props) => {
3
+ const target = sfc.__vccOpts || sfc;
4
+ for (const [key, val] of props) target[key] = val;
5
+ return target;
7
6
  };
8
-
9
- export { _export_sfc as default };
7
+ //#endregion
8
+ export { _plugin_vue_export_helper_default as default };