@gct-paas/v-ben 0.1.4-dev.11 → 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.
Files changed (48) hide show
  1. package/dist/index.min.css +2 -1
  2. package/dist/loader.esm.min.js +693 -0
  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/loader.d.ts +1 -0
  33. package/es/utils/is.mjs +29 -35
  34. package/package.json +6 -6
  35. package/dist/index.esm.min.mjs +0 -796
  36. package/dist/index.min.cjs +0 -1
  37. package/dist/index.system.min.js +0 -1
  38. package/es/components/v-ben-button/src/BasicButton.vue2.mjs +0 -5
  39. package/es/components/v-ben-button/src/PopConfirmButton.vue2.mjs +0 -5
  40. package/es/components/v-ben-button/src/custom-button.vue3.mjs +0 -32
  41. package/es/components/v-ben-dropdown/src/Dropdown.vue2.mjs +0 -5
  42. package/es/components/v-ben-table/src/BasicTable.vue2.mjs +0 -48
  43. package/es/components/v-ben-table/src/components/HeaderCell.vue2.mjs +0 -20
  44. package/es/components/v-ben-table/src/components/TableAction.css +0 -37
  45. package/es/components/v-ben-table/src/components/TableAction.vue3.mjs +0 -6
  46. package/es/components/v-ben-table/src/components/TableActionAuto.css +0 -37
  47. package/es/components/v-ben-table/src/components/TableActionAuto.vue3.mjs +0 -6
  48. /package/es/components/v-ben-button/src/{custom-button.css → custom-button.vue_vue_type_style_index_0_scoped_305f4090_lang.css} +0 -0
@@ -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*/
@@ -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 };