asiaint-lowcode 3.1.56 → 3.1.57

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/README.md +31 -31
  2. package/dist/asiaint-lowcode.js +1 -1
  3. package/dist/asiaint-lowcode.umd.cjs +191 -190
  4. package/dist/index.d.ts +376 -7
  5. package/dist/lazy/{Card-BlakHGF_.js → Card-DdWp3Dz9.js} +2 -2
  6. package/dist/lazy/{Cascader-BOwEQkqr.js → Cascader-BxsxfWZi.js} +1 -1
  7. package/dist/lazy/{Checkbox-1qYzxvx3.js → Checkbox-BPJjRDut.js} +2 -2
  8. package/dist/lazy/{Collapse-DFhQjGTg.js → Collapse-DMpWXH2D.js} +1 -1
  9. package/dist/lazy/{Component-uvnooS14.js → Component-BAb8Glyu.js} +2 -2
  10. package/dist/lazy/{Component-BybPseK_.js → Component-Bvb11i1A.js} +2 -2
  11. package/dist/lazy/{Component-BOC_tZaw.js → Component-Cq9v0YT0.js} +1 -1
  12. package/dist/lazy/{Component-D6OIJgBS.js → Component-DhRio0qv.js} +1 -1
  13. package/dist/lazy/{Component-DqTP-dqG.js → Component-haJrwEDP.js} +2 -2
  14. package/dist/lazy/Component-xrpa5QWJ.js +143 -0
  15. package/dist/lazy/{CurdCard-7elTeYSM.js → CurdCard-BqzAFbA5.js} +21 -20
  16. package/dist/lazy/Custom-EmbK57YY.js +26 -0
  17. package/dist/lazy/{DatePicker-vabWbXWk.js → DatePicker-BXnfk1Zr.js} +22 -20
  18. package/dist/lazy/{DragList-ptXtINib.js → DragList-DG75zaHa.js} +13 -13
  19. package/dist/lazy/{FilterSearch-DX7lyU5K.js → FilterSearch-BMF9jCxH.js} +8 -8
  20. package/dist/lazy/FloatCurd-D_OPcxR6.js +148 -0
  21. package/dist/lazy/{FormList-CQafRlf1.js → FormList-_S8br6_H.js} +1 -1
  22. package/dist/lazy/{Grid-BHXnN5tG.js → Grid-kruDCFf5.js} +1 -1
  23. package/dist/lazy/{InfiniteScroll-B9A8fTzl.js → InfiniteScroll-CtsW_oYO.js} +4 -4
  24. package/dist/lazy/{Inline-CLeU2_yh.js → Inline-5o19mIFm.js} +3 -3
  25. package/dist/lazy/{JsonEdit-CR8pc1r0.js → JsonEdit-DzAF4EKV.js} +3 -3
  26. package/dist/lazy/{LogList-C0n583jZ.js → LogList-DA4nYLDd.js} +7 -7
  27. package/dist/lazy/{ObjGroup-CWyMW8ok.js → ObjGroup-6YLhqnv5.js} +1 -1
  28. package/dist/lazy/{OfferDetails-Bk2fm7if.js → OfferDetails-BjMnexIs.js} +10 -8
  29. package/dist/lazy/{Pagination-BTgJMuH1.js → Pagination-DiXJ2GWc.js} +4 -4
  30. package/dist/lazy/{Progress-DbQWJ6ZF.js → Progress-DPzECwdm.js} +15 -15
  31. package/dist/lazy/{Radio-BFsZCzNl.js → Radio-D3XvuscY.js} +3 -3
  32. package/dist/lazy/{SearchSelect-CTNUhnXg.js → SearchSelect-D0-zUts-.js} +6 -6
  33. package/dist/lazy/{Select-CImoPfB1.js → Select-B1XcN6fN.js} +2 -2
  34. package/dist/lazy/Table-x-_aoAyQ.js +566 -0
  35. package/dist/lazy/Tabs-Bdc3ze7v.js +127 -0
  36. package/dist/lazy/TextArea-Crwzr10r.js +34 -0
  37. package/dist/lazy/{Wrapper-B4mdrBTT.js → Wrapper-DH0CbkLZ.js} +2 -2
  38. package/dist/lazy/{index-BMlHLc-c.js → index-DY31m1LD.js} +17331 -17110
  39. package/dist/lazy/{useSelect-DWF-2iPr.js → useSelect-Mr_5r7kL.js} +1 -1
  40. package/dist/style.css +2 -2
  41. package/global.d.ts +10 -10
  42. package/package.json +36 -36
  43. package/dist/lazy/Component-TyczCMR3.js +0 -120
  44. package/dist/lazy/Custom-CFg-E0l1.js +0 -26
  45. package/dist/lazy/Table-CQKjjRQt.js +0 -527
  46. package/dist/lazy/Tabs-Qh5RoptW.js +0 -72
  47. package/dist/lazy/TextArea-CHd9bsw8.js +0 -34
@@ -0,0 +1,566 @@
1
+ import { defineComponent as We, computed as H, inject as F, ref as P, useTemplateRef as xe, onMounted as Ge, onActivated as Ke, onBeforeUnmount as qe, readonly as Je, toRefs as Oe, onUnmounted as Qe, resolveComponent as E, openBlock as r, createElementBlock as d, normalizeClass as T, createVNode as y, withCtx as g, createElementVNode as b, toDisplayString as B, unref as h, createCommentVNode as v, withDirectives as le, createBlock as f, Fragment as N, renderList as re, normalizeStyle as x, withModifiers as ie, vShow as se, mergeProps as Xe, nextTick as Ye } from "vue";
2
+ import { $ as Ze, h as _, j as et, a as tt, I as $, b as W, C as at, _ as nt } from "./index-DY31m1LD.js";
3
+ import { ElTable as ot, ElLoading as ue } from "element-plus";
4
+ const lt = ["id"], rt = { class: "custom-total-text" }, it = { class: "empty-content" }, st = ["title"], ut = ["title", "onClick"], ct = {
5
+ key: 1,
6
+ class: "icon-text-wrapper"
7
+ }, pt = ["title", "onClick"], dt = { key: 2 }, gt = ["title"], ht = { class: "row-btn-wrapper" }, vt = /* @__PURE__ */ We({
8
+ __name: "Table",
9
+ props: {
10
+ title: {},
11
+ key: {},
12
+ rulePath: {},
13
+ rowKey: {},
14
+ showDynamicSearch: { type: Boolean },
15
+ multipleSelection: { type: Boolean },
16
+ highlightCurrentRow: { type: Boolean },
17
+ "highlight-current-row": { type: Boolean },
18
+ stripe: { type: Boolean },
19
+ rowClick: {},
20
+ rowDbClick: {},
21
+ sizeChange: {},
22
+ pageChange: {},
23
+ topBtns: {},
24
+ rowBtns: {},
25
+ rowBtnsLabel: {},
26
+ rowBtnsWidth: {},
27
+ columns: {},
28
+ hidden: { type: Boolean },
29
+ hiddenPagination: { type: Boolean },
30
+ handleCurrentChange: {},
31
+ selectable: {},
32
+ pageSizes: {},
33
+ pagerCount: {},
34
+ paginationLayout: {},
35
+ defaultPageSize: {},
36
+ typeSwitch: { type: Boolean },
37
+ displayType: { default: "table" },
38
+ onMounted: {},
39
+ onActivated: {},
40
+ height: {},
41
+ collapsible: { type: Boolean },
42
+ sortable: { type: Boolean, default: !0 },
43
+ paginationPosition: {},
44
+ totalText: {},
45
+ name: {},
46
+ gridColumns: {}
47
+ },
48
+ setup(ce, { expose: pe }) {
49
+ const n = ce, M = H(() => n.displayType ? n.displayType : n.typeSwitch ? "card" : "table"), de = F("ruleModule", void 0), G = F("ruleMap", void 0), c = H(() => n.rulePath && G[n.rulePath] ? G[n.rulePath] : de), m = F("pageMethodMap", {}), D = F("getGlobalParams", () => {
50
+ }), K = F(Ze), q = K ? K.translateFn : null, L = P(), ge = (e, t, o) => {
51
+ p.value[e] && (p.value[e][t] = o);
52
+ }, he = (e, t) => {
53
+ const o = n.columns.find((u) => u.key === e);
54
+ o && (o.hidden = !t);
55
+ }, U = (e, t, o, u) => {
56
+ try {
57
+ c.value[e.onClick](m, t, o, u), u == null || u.stopPropagation();
58
+ } catch (C) {
59
+ console.error(C);
60
+ }
61
+ }, ve = (e) => {
62
+ if (n.rowClick)
63
+ try {
64
+ c.value[n.rowClick](m, e);
65
+ } catch (t) {
66
+ console.error(t);
67
+ }
68
+ }, me = (e) => {
69
+ if (n.rowDbClick)
70
+ try {
71
+ c.value[n.rowDbClick](m, e);
72
+ } catch (t) {
73
+ console.error(t);
74
+ }
75
+ }, ye = P([]), fe = (e) => {
76
+ ye.value = e;
77
+ }, Ce = (e, t) => {
78
+ if (!n.selectable)
79
+ return !0;
80
+ try {
81
+ return c.value[n.selectable](m, e, t);
82
+ } catch (o) {
83
+ console.error(o);
84
+ }
85
+ return !0;
86
+ }, ke = () => {
87
+ var e;
88
+ (e = L.value) == null || e.clearSelection();
89
+ }, ze = () => p.value, J = P(), Se = (e) => {
90
+ if (J.value = e, !!n.handleCurrentChange)
91
+ try {
92
+ c.value[n.handleCurrentChange](m, e);
93
+ } catch (t) {
94
+ console.error(t);
95
+ }
96
+ }, Pe = () => J.value, be = () => {
97
+ var e;
98
+ return (e = L.value) == null ? void 0 : e.getSelectionRows();
99
+ }, we = async () => !0, Be = (e, t) => {
100
+ var u;
101
+ const o = (u = n.topBtns) == null ? void 0 : u.find((C) => C.key === e);
102
+ o && (o.hidden = t);
103
+ }, Ne = (e, t) => {
104
+ var u;
105
+ const o = (u = n.rowBtns) == null ? void 0 : u.find((C) => C.key === e);
106
+ o && (o.condition = !t);
107
+ }, V = P(0), Re = (e) => {
108
+ V.value = e;
109
+ }, i = P({ pageNum: 1, pageSize: n.defaultPageSize || 5 }), z = P({ pageNum: 1, pageSize: n.defaultPageSize || 5 }), Te = () => i.value, _e = (e) => {
110
+ let t = !1;
111
+ return e.pageNum !== void 0 && e.pageNum > -1 && (i.value.pageNum !== e.pageNum && (t = !0), i.value.pageNum = e.pageNum), e.pageSize !== void 0 && e.pageSize > -1 && (i.value.pageSize !== e.pageSize && (t = !0), i.value.pageSize = e.pageSize), { pagination: i.value, isChange: t };
112
+ }, O = async () => {
113
+ if (i.value.pageNum = 1, !n.sizeChange)
114
+ return;
115
+ const e = ue.service({
116
+ target: `#${n.name}`,
117
+ text: "Loading..."
118
+ });
119
+ try {
120
+ await c.value[n.sizeChange](m, i.value), z.value.pageNum = i.value.pageNum, z.value.pageSize = i.value.pageSize;
121
+ } catch (t) {
122
+ console.error(t), i.value.pageNum = z.value.pageNum, i.value.pageSize = z.value.pageSize;
123
+ } finally {
124
+ e.close();
125
+ }
126
+ }, Q = async () => {
127
+ if (!n.pageChange)
128
+ return;
129
+ const e = ue.service({
130
+ target: `#${n.name}`,
131
+ text: "Loading..."
132
+ });
133
+ try {
134
+ await c.value[n.pageChange](m, i.value), z.value.pageNum = i.value.pageNum, z.value.pageSize = i.value.pageSize;
135
+ } catch (t) {
136
+ console.error(t), i.value.pageNum = z.value.pageNum, i.value.pageSize = z.value.pageSize;
137
+ } finally {
138
+ e.close();
139
+ }
140
+ }, $e = (e) => {
141
+ var t;
142
+ (t = L.value) == null || t.setCurrentRow(e);
143
+ }, Me = (e) => {
144
+ var t;
145
+ (t = L.value) == null || t.setCurrentRow(p.value[e]);
146
+ }, De = (e, t, o) => {
147
+ n.columns.forEach((u) => {
148
+ u.key === e && u[t] && (u[t] = o);
149
+ });
150
+ }, p = P([]), Le = (e) => {
151
+ p.value = e || [];
152
+ }, Ae = (e = {}) => {
153
+ p.value.push(e);
154
+ }, Ie = (e) => {
155
+ e >= 0 && e < p.value.length && p.value.splice(e, 1);
156
+ }, Fe = async () => {
157
+ p.value = [...p.value];
158
+ }, X = xe("rootRef"), w = (e, t) => {
159
+ const o = q ? q(e, t) : t[e.key];
160
+ if (!e.encrypted || !o)
161
+ return o;
162
+ const u = `${o}`;
163
+ return u.length <= 4 ? "*".repeat(u.length) : u.slice(0, -4) + "****";
164
+ }, Ee = (e, t) => {
165
+ if (!e.getTextStyle || !c.value)
166
+ return {};
167
+ try {
168
+ return c.value[e.getTextStyle](m, t, e);
169
+ } catch (o) {
170
+ console.error(o);
171
+ }
172
+ }, S = (e, t) => {
173
+ if (!(!e.getIconInfo || !c.value))
174
+ try {
175
+ return c.value[e.getIconInfo](m, t, e);
176
+ } catch (o) {
177
+ console.error(o);
178
+ }
179
+ }, j = (e, t) => {
180
+ if (!(!e.getIconPopoverContent || !c.value))
181
+ try {
182
+ return c.value[e.getIconPopoverContent](m, t, e);
183
+ } catch (o) {
184
+ console.error(o);
185
+ }
186
+ }, Ue = (e, t) => {
187
+ if (!(!e.getCustomContent || !c.value))
188
+ try {
189
+ return c.value[e.getCustomContent](m, t, e);
190
+ } catch (o) {
191
+ console.error(o);
192
+ }
193
+ }, Ve = H(() => !n.rowBtns || n.rowBtns.length === 0 || !p.value || p.value.length === 0 ? !1 : p.value.some(
194
+ (e) => {
195
+ var t;
196
+ return (t = n.rowBtns) == null ? void 0 : t.some((o) => o.condition === void 0 || o.condition === null ? !0 : _(o.condition, {
197
+ $row: e,
198
+ $globalParams: D()
199
+ }));
200
+ }
201
+ )), je = P(void 0), He = H(() => je.value || n.height), Y = async () => {
202
+ if (!n.onMounted || !c.value)
203
+ return;
204
+ await Ye();
205
+ const e = n.onMounted;
206
+ try {
207
+ c.value[e](m);
208
+ } catch (t) {
209
+ console.error(t);
210
+ }
211
+ }, Z = async () => {
212
+ if (!n.onActivated || !c.value)
213
+ return;
214
+ const e = n.onActivated;
215
+ try {
216
+ c.value[e](m);
217
+ } catch (t) {
218
+ console.error(t);
219
+ }
220
+ };
221
+ Ge(async () => {
222
+ await Y();
223
+ }), Ke(() => {
224
+ Z();
225
+ }), qe(() => {
226
+ });
227
+ const ee = Je({
228
+ ...Oe(n),
229
+ setCellData: ge,
230
+ clearSelection: ke,
231
+ getData: ze,
232
+ getCurrentRow: Pe,
233
+ getSelectedRows: be,
234
+ addRow: Ae,
235
+ deleteRow: Ie,
236
+ refresh: Fe,
237
+ validate: we,
238
+ setData: Le,
239
+ selectRow: $e,
240
+ selectRowNum: Me,
241
+ setTotal: Re,
242
+ getPagination: Te,
243
+ setPagination: _e,
244
+ setTopBtnHidden: Be,
245
+ setColVisible: he,
246
+ setColumn: De,
247
+ setRowsBtnHidden: Ne,
248
+ rootRef: X,
249
+ mounted: Y,
250
+ activated: Z,
251
+ type: "table"
252
+ });
253
+ if (n.name) {
254
+ const e = et(n.name, ee);
255
+ Qe(() => {
256
+ e();
257
+ });
258
+ }
259
+ return pe(ee), (e, t) => {
260
+ const o = E("el-pagination"), u = E("el-table-column"), C = E("el-popover"), te = E("el-tooltip"), ae = E("el-button");
261
+ return e.hidden ? v("", !0) : (r(), d("div", {
262
+ key: 0,
263
+ class: T(["table-render", { tableBorder: M.value === "table", [e.name]: !0 }]),
264
+ ref_key: "rootRef",
265
+ ref: X,
266
+ id: e.name
267
+ }, [
268
+ e.paginationPosition === "top" ? (r(), d("div", {
269
+ key: 0,
270
+ class: T(["pagination-wrapper", {
271
+ hidePagination: (e.hiddenPagination || p.value.length === 0) && !e.height,
272
+ transparentPagination: (e.hiddenPagination || p.value.length === 0) && e.height,
273
+ cardlistPadding: M.value === "card"
274
+ }])
275
+ }, [
276
+ y(o, {
277
+ layout: e.paginationLayout || "slot,sizes, prev, pager, next,jumper",
278
+ total: V.value,
279
+ "page-sizes": e.pageSizes || [5, 6, 10, 20, 30, 40],
280
+ "default-page-size": e.defaultPageSize,
281
+ "current-page": i.value.pageNum,
282
+ "onUpdate:currentPage": t[0] || (t[0] = (a) => i.value.pageNum = a),
283
+ "page-size": i.value.pageSize,
284
+ "onUpdate:pageSize": t[1] || (t[1] = (a) => i.value.pageSize = a),
285
+ "pager-count": Number(e.pagerCount) || 5,
286
+ onSizeChange: O,
287
+ onCurrentChange: Q
288
+ }, {
289
+ default: g(() => [
290
+ b("div", rt, B(h(_)(e.totalText, { $total: V.value })), 1)
291
+ ]),
292
+ _: 1
293
+ }, 8, ["layout", "total", "page-sizes", "default-page-size", "current-page", "page-size", "pager-count"])
294
+ ], 2)) : v("", !0),
295
+ le(b("div", null, [
296
+ y(h(ot), {
297
+ ref_key: "tableRef",
298
+ ref: L,
299
+ data: p.value,
300
+ "highlight-current-row": "",
301
+ "row-key": e.rowKey,
302
+ stripe: e.stripe,
303
+ onRowClick: ve,
304
+ onRowDblclick: me,
305
+ onSelectionChange: fe,
306
+ onCurrentChange: Se,
307
+ height: He.value
308
+ }, {
309
+ empty: g(() => [
310
+ b("div", it, [
311
+ y(h(tt), {
312
+ name: "tableEmpty",
313
+ style: { width: 56, height: 56 }
314
+ }),
315
+ t[4] || (t[4] = b("div", null, "No data available,please check", -1))
316
+ ])
317
+ ]),
318
+ default: g(() => [
319
+ e.multipleSelection ? (r(), f(u, {
320
+ key: 0,
321
+ type: "selection",
322
+ width: "55",
323
+ selectable: Ce
324
+ })) : v("", !0),
325
+ (r(!0), d(N, null, re(e.columns, (a) => (r(), d(N, {
326
+ key: a.key
327
+ }, [
328
+ a.hidden ? v("", !0) : (r(), f(u, {
329
+ key: 0,
330
+ prop: a.key,
331
+ "min-width": a.minWidth,
332
+ fixed: a.fixed || !1,
333
+ sortable: a.sortable ?? e.sortable ?? !0
334
+ }, {
335
+ header: g(() => [
336
+ b("div", {
337
+ class: "text-ellipsis",
338
+ title: a.label
339
+ }, B(a.label), 9, st)
340
+ ]),
341
+ default: g(({ row: s, $index: l }) => {
342
+ var A, R, ne, oe;
343
+ return [
344
+ a.type === "link" ? (r(), d("div", {
345
+ key: 0,
346
+ class: T(["text-ellipsis link-style", { "click-style": a.onClick }]),
347
+ title: w(a, s),
348
+ onClick: (k) => U(a, s, l, k)
349
+ }, B(w(a, s)), 11, ut)) : a.type === "iconText" ? (r(), d("div", ct, [
350
+ a.iconPosition === "left" ? (r(), d(N, { key: 0 }, [
351
+ a.iconPopover && Array.isArray(j(a, s)) ? (r(), f(C, { key: 0 }, {
352
+ reference: g(() => {
353
+ var k, I;
354
+ return [
355
+ y($, {
356
+ name: (k = S(a, s)) == null ? void 0 : k.name,
357
+ color: (I = S(a, s)) == null ? void 0 : I.color
358
+ }, null, 8, ["name", "color"])
359
+ ];
360
+ }),
361
+ default: g(() => [
362
+ y(h(W), {
363
+ list: j(a, s) || []
364
+ }, null, 8, ["list"])
365
+ ]),
366
+ _: 2
367
+ }, 1024)) : (r(), f($, {
368
+ key: 1,
369
+ name: (A = S(a, s)) == null ? void 0 : A.name,
370
+ color: (R = S(a, s)) == null ? void 0 : R.color
371
+ }, null, 8, ["name", "color"]))
372
+ ], 64)) : v("", !0),
373
+ b("span", {
374
+ class: T(["text-ellipsis", { "click-style": a.onClick }]),
375
+ title: w(a, s),
376
+ onClick: (k) => U(a, s, l, k)
377
+ }, B(w(a, s)), 11, pt),
378
+ a.iconPosition === "right" ? (r(), d(N, { key: 1 }, [
379
+ a.iconPopover && Array.isArray(j(a, s)) ? (r(), f(C, { key: 0 }, {
380
+ reference: g(() => {
381
+ var k, I;
382
+ return [
383
+ y($, {
384
+ name: (k = S(a, s)) == null ? void 0 : k.name,
385
+ color: (I = S(a, s)) == null ? void 0 : I.color
386
+ }, null, 8, ["name", "color"])
387
+ ];
388
+ }),
389
+ default: g(() => [
390
+ y(h(W), {
391
+ list: j(a, s) || []
392
+ }, null, 8, ["list"])
393
+ ]),
394
+ _: 2
395
+ }, 1024)) : (r(), f($, {
396
+ key: 1,
397
+ name: (ne = S(a, s)) == null ? void 0 : ne.name,
398
+ color: (oe = S(a, s)) == null ? void 0 : oe.color
399
+ }, null, 8, ["name", "color"]))
400
+ ], 64)) : v("", !0)
401
+ ])) : a.type === "customContent" ? (r(), d("div", dt, [
402
+ y(h(W), {
403
+ list: Ue(a, s) || []
404
+ }, null, 8, ["list"])
405
+ ])) : (r(), d("div", {
406
+ key: 3,
407
+ class: T({ "text-ellipsis": !a.noEllipsis }),
408
+ title: w(a, s),
409
+ style: x(Ee(a, s))
410
+ }, B(w(a, s)), 15, gt))
411
+ ];
412
+ }),
413
+ _: 2
414
+ }, 1032, ["prop", "min-width", "fixed", "sortable"]))
415
+ ], 64))), 128)),
416
+ Ve.value && e.rowBtns && e.rowBtns.length > 0 ? (r(), f(u, {
417
+ key: 1,
418
+ label: e.rowBtnsLabel || "Action",
419
+ fixed: "right",
420
+ align: "left",
421
+ width: e.rowBtnsWidth || (e.rowBtns.length * 34 + 12 > 100 ? e.rowBtns.length * 34 + 12 : 100)
422
+ }, {
423
+ default: g(({ row: a, $index: s }) => [
424
+ b("div", ht, [
425
+ (r(!0), d(N, null, re(e.rowBtns, (l) => {
426
+ var A;
427
+ return r(), d(N, {
428
+ key: l.key
429
+ }, [
430
+ l.component === "Popover" ? (r(), f(C, {
431
+ key: 0,
432
+ title: l.label,
433
+ trigger: "click",
434
+ "popper-class": "btn-popover",
435
+ width: (A = l.children) != null && A.length && l.children[0].width || 400
436
+ }, {
437
+ reference: g(() => [
438
+ l.condition === void 0 || l.condition === null || h(_)(l.condition, {
439
+ $row: a,
440
+ $globalParams: h(D)()
441
+ }) ? (r(), f(ae, {
442
+ key: 0,
443
+ disabled: l.disabled,
444
+ link: "",
445
+ size: "small",
446
+ type: l.type,
447
+ onClick: ie((R) => U(l, a, s, R), ["stop"])
448
+ }, {
449
+ default: g(() => [
450
+ y(te, {
451
+ class: "box-item",
452
+ effect: "dark",
453
+ content: l.label,
454
+ placement: "top"
455
+ }, {
456
+ default: g(() => [
457
+ l.icon ? (r(), f($, {
458
+ key: 0,
459
+ name: l.icon.name,
460
+ color: l.icon.color
461
+ }, null, 8, ["name", "color"])) : v("", !0)
462
+ ]),
463
+ _: 2
464
+ }, 1032, ["content"]),
465
+ l.buttonText ? (r(), d("span", {
466
+ key: 0,
467
+ style: x({ color: l.buttonText.color, fontSize: "14px" })
468
+ }, B(h(_)(l.buttonText.text, {
469
+ $row: a,
470
+ $globalParams: h(D)()
471
+ })), 5)) : v("", !0)
472
+ ]),
473
+ _: 2
474
+ }, 1032, ["disabled", "type", "onClick"])) : v("", !0)
475
+ ]),
476
+ default: g(() => [
477
+ b("div", null, [
478
+ y(h(W), {
479
+ list: l.children
480
+ }, null, 8, ["list"])
481
+ ])
482
+ ]),
483
+ _: 2
484
+ }, 1032, ["title", "width"])) : (r(), d(N, { key: 1 }, [
485
+ l.condition === void 0 || l.condition === null || h(_)(l.condition, {
486
+ $row: a,
487
+ $globalParams: h(D)()
488
+ }) ? (r(), f(ae, {
489
+ key: 0,
490
+ disabled: l.disabled,
491
+ link: "",
492
+ size: "small",
493
+ type: l.type,
494
+ onClick: ie((R) => U(l, a, s, R), ["stop"])
495
+ }, {
496
+ default: g(() => [
497
+ y(te, {
498
+ class: "box-item",
499
+ effect: "dark",
500
+ content: l.label,
501
+ placement: "top"
502
+ }, {
503
+ default: g(() => [
504
+ l.icon ? (r(), f($, {
505
+ key: 0,
506
+ name: l.icon.name,
507
+ color: l.icon.color
508
+ }, null, 8, ["name", "color"])) : v("", !0)
509
+ ]),
510
+ _: 2
511
+ }, 1032, ["content"]),
512
+ l.buttonText ? (r(), d("span", {
513
+ key: 0,
514
+ style: x({ color: l.buttonText.color, fontSize: "14px" })
515
+ }, B(h(_)(l.buttonText.text, {
516
+ $row: a,
517
+ $globalParams: h(D)()
518
+ })), 5)) : v("", !0)
519
+ ]),
520
+ _: 2
521
+ }, 1032, ["disabled", "type", "onClick"])) : v("", !0)
522
+ ], 64))
523
+ ], 64);
524
+ }), 128))
525
+ ])
526
+ ]),
527
+ _: 1
528
+ }, 8, ["label", "width"])) : v("", !0)
529
+ ]),
530
+ _: 1
531
+ }, 8, ["data", "row-key", "stripe", "height"])
532
+ ], 512), [
533
+ [se, M.value === "table"]
534
+ ]),
535
+ le(y(at, Xe({ data: p.value }, n, { getColText: w }), null, 16, ["data"]), [
536
+ [se, M.value === "card"]
537
+ ]),
538
+ e.paginationPosition !== "top" ? (r(), d("div", {
539
+ key: 1,
540
+ class: T(["pagination-wrapper", {
541
+ hidePagination: (e.hiddenPagination || p.value.length === 0) && !e.height,
542
+ transparentPagination: (e.hiddenPagination || p.value.length === 0) && e.height,
543
+ cardlistPadding: M.value === "card"
544
+ }])
545
+ }, [
546
+ y(o, {
547
+ layout: e.paginationLayout || "total,sizes, prev, pager, next,jumper",
548
+ total: V.value,
549
+ "page-sizes": e.pageSizes || [5, 6, 10, 20, 30, 40],
550
+ "default-page-size": e.defaultPageSize,
551
+ "current-page": i.value.pageNum,
552
+ "onUpdate:currentPage": t[2] || (t[2] = (a) => i.value.pageNum = a),
553
+ "page-size": i.value.pageSize,
554
+ "onUpdate:pageSize": t[3] || (t[3] = (a) => i.value.pageSize = a),
555
+ "pager-count": Number(e.pagerCount) || 5,
556
+ onSizeChange: O,
557
+ onCurrentChange: Q
558
+ }, null, 8, ["layout", "total", "page-sizes", "default-page-size", "current-page", "page-size", "pager-count"])
559
+ ], 2)) : v("", !0)
560
+ ], 10, lt));
561
+ };
562
+ }
563
+ }), Ct = /* @__PURE__ */ nt(vt, [["__scopeId", "data-v-f3445c26"]]);
564
+ export {
565
+ Ct as default
566
+ };
@@ -0,0 +1,127 @@
1
+ import { defineComponent as V, ref as w, computed as I, watch as u, onMounted as B, resolveComponent as b, openBlock as t, createBlock as p, mergeProps as _, withCtx as i, createElementVNode as r, createElementBlock as l, Fragment as d, renderList as m, createVNode as y, createCommentVNode as c, toDisplayString as M, normalizeClass as E, unref as F } from "vue";
2
+ import { c as $, I as f, b as z, _ as A } from "./index-DY31m1LD.js";
3
+ import "element-plus";
4
+ const D = { class: "right-icon-wrapper" }, L = { class: "dynamic-icon-wrapper" }, P = {
5
+ key: 0,
6
+ class: "dynamic-icon-item"
7
+ }, R = { class: "static-icon-wrapper" }, S = {
8
+ key: 0,
9
+ class: "static-icon-item"
10
+ }, U = { class: "tab-label" }, j = { class: "tab-label-text" }, q = /* @__PURE__ */ V({
11
+ __name: "Tabs",
12
+ props: {
13
+ id: {},
14
+ children: {},
15
+ defaultKey: {},
16
+ tabChange: {},
17
+ styleType: { default: "normal" },
18
+ staticBtns: {},
19
+ dynamicBtns: {}
20
+ },
21
+ setup(v) {
22
+ const a = v, o = w(""), g = I(() => {
23
+ const e = a.children.findIndex((s) => s.name === o.value);
24
+ return e - 1 >= 0 ? e - 1 : null;
25
+ }), { ruleModule: C, pageMethodMap: k } = $();
26
+ function T(e) {
27
+ if (a.tabChange)
28
+ try {
29
+ C[a.tabChange](k, e);
30
+ } catch (s) {
31
+ console.error(s);
32
+ }
33
+ }
34
+ return u(
35
+ () => a.children,
36
+ () => {
37
+ a.children.forEach((e) => {
38
+ e.children || (e.children = []);
39
+ });
40
+ }
41
+ ), u(
42
+ () => a.defaultKey,
43
+ () => {
44
+ o.value = a.defaultKey;
45
+ }
46
+ ), u(
47
+ () => a.defaultKey,
48
+ () => {
49
+ o.value = a.defaultKey;
50
+ }
51
+ ), B(() => {
52
+ a.defaultKey && (o.value = a.defaultKey);
53
+ }), (e, s) => {
54
+ const K = b("el-tab-pane"), N = b("el-tabs");
55
+ return t(), p(N, _({ id: e.id }, e.$attrs, {
56
+ modelValue: o.value,
57
+ "onUpdate:modelValue": s[0] || (s[0] = (n) => o.value = n),
58
+ onTabChange: T,
59
+ addable: e.styleType === "btn",
60
+ class: {
61
+ "modal-type": e.styleType === "modal",
62
+ "btn-type": e.styleType === "btn",
63
+ "form-item-tabs": e.styleType === "normal"
64
+ }
65
+ }), {
66
+ "add-icon": i(() => [
67
+ r("div", D, [
68
+ r("div", L, [
69
+ (t(!0), l(d, null, m(e.dynamicBtns, (n) => (t(), l(d, {
70
+ key: n.iconName
71
+ }, [
72
+ n.hidden ? c("", !0) : (t(), l("div", P, [
73
+ y(f, {
74
+ name: n.iconName
75
+ }, null, 8, ["name"])
76
+ ]))
77
+ ], 64))), 128))
78
+ ]),
79
+ r("div", R, [
80
+ (t(!0), l(d, null, m(e.staticBtns, (n) => (t(), l(d, {
81
+ key: n.iconName
82
+ }, [
83
+ n.hidden ? c("", !0) : (t(), l("div", S, [
84
+ y(f, {
85
+ name: n.iconName
86
+ }, null, 8, ["name"])
87
+ ]))
88
+ ], 64))), 128))
89
+ ])
90
+ ])
91
+ ]),
92
+ default: i(() => [
93
+ (t(!0), l(d, null, m(e.children, (n, h) => (t(), p(K, _({
94
+ key: n.name,
95
+ ref_for: !0
96
+ }, n), {
97
+ label: i(() => [
98
+ r("div", U, [
99
+ e.styleType === "btn" && n.icon ? (t(), p(f, {
100
+ key: 0,
101
+ name: n.icon
102
+ }, null, 8, ["name"])) : c("", !0),
103
+ r("span", j, M(n.label), 1),
104
+ h !== e.children.length - 1 ? (t(), l("span", {
105
+ key: 1,
106
+ class: E(["divider", {
107
+ "divider-hidden": o.value === n.name || g.value === h
108
+ }])
109
+ }, null, 2)) : c("", !0)
110
+ ])
111
+ ]),
112
+ default: i(() => [
113
+ y(F(z), {
114
+ list: n.children
115
+ }, null, 8, ["list"])
116
+ ]),
117
+ _: 2
118
+ }, 1040))), 128))
119
+ ]),
120
+ _: 1
121
+ }, 16, ["id", "modelValue", "addable", "class"]);
122
+ };
123
+ }
124
+ }), O = /* @__PURE__ */ A(q, [["__scopeId", "data-v-7f3cbcb9"]]);
125
+ export {
126
+ O as default
127
+ };