asiaint-lowcode 3.1.175 → 3.1.176

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 (51) hide show
  1. package/dist/asiaint-lowcode.d.ts +41 -0
  2. package/dist/asiaint-lowcode.js +8 -8
  3. package/dist/asiaint-lowcode.umd.cjs +222 -222
  4. package/dist/lazy/{Card-CuIuPVfa.js → Card-tY03_jsQ.js} +1 -1
  5. package/dist/lazy/{Cascader-DG9-lQL_.js → Cascader-CoiEWibG.js} +1 -1
  6. package/dist/lazy/{Checkbox-DkokY_T5.js → Checkbox-DgAWi7xv.js} +2 -2
  7. package/dist/lazy/{Collapse-CfN04wPP.js → Collapse-DoX4-z6R.js} +2 -2
  8. package/dist/lazy/Component-B1cRXfb6.js +198 -0
  9. package/dist/lazy/{Component-bJujdUFt.js → Component-CEPZFfnv.js} +1 -1
  10. package/dist/lazy/{Component-DDr0mt26.js → Component-CwFNnxot.js} +1 -1
  11. package/dist/lazy/{Component-BmIr-TEc.js → Component-DYj0-oAE.js} +1 -1
  12. package/dist/lazy/{CurdCard-fARDual0.js → CurdCard-DfTd52sw.js} +1 -1
  13. package/dist/lazy/{Custom-DLf2H4j-.js → Custom-Dbj0V-xU.js} +1 -1
  14. package/dist/lazy/{DatePicker-DwGL3Rfo.js → DatePicker-Bn2V6hsJ.js} +1 -1
  15. package/dist/lazy/{DragList-CkJN4M1_.js → DragList-DqreIFnM.js} +13 -13
  16. package/dist/lazy/FilterSearch-DhDZ-EZP.js +149 -0
  17. package/dist/lazy/FloatCurd-Cfkz6IKM.js +268 -0
  18. package/dist/lazy/FloatSearchCurd-CuGQMSfs.js +447 -0
  19. package/dist/lazy/{FormList-BisnYpYy.js → FormList-iRDxU3y1.js} +1 -1
  20. package/dist/lazy/{Grid-DU0cGkx3.js → Grid-BdWqDQr5.js} +1 -1
  21. package/dist/lazy/{InfiniteScroll-DIBaRISh.js → InfiniteScroll-DLdq1kWV.js} +1 -1
  22. package/dist/lazy/{Inline-Dz8K0mcs.js → Inline-BUA_Nnzb.js} +1 -1
  23. package/dist/lazy/{JsonEdit-CcHoX1MX.js → JsonEdit-Dza78rMu.js} +1 -1
  24. package/dist/lazy/{LogList-CCqb9sMw.js → LogList-BuZ8Xjtk.js} +1 -1
  25. package/dist/lazy/{ObjGroup-9CuErhWA.js → ObjGroup-BVYeKRas.js} +5 -5
  26. package/dist/lazy/{OfferDetails-BizT7B7e.js → OfferDetails-BuFlnyVM.js} +68 -67
  27. package/dist/lazy/Pagination-DIueKA4T.js +121 -0
  28. package/dist/lazy/{Progress-BEuL9CsA.js → Progress-MldyKkep.js} +1 -1
  29. package/dist/lazy/{Radio-CbcqDR_c.js → Radio-Bod52dE2.js} +2 -2
  30. package/dist/lazy/{SearchSelect-PZJ79a84.js → SearchSelect-CzIo7iiM.js} +2 -2
  31. package/dist/lazy/{Select-CTGej9Jt.js → Select-Cy9eA5-X.js} +2 -2
  32. package/dist/lazy/Table-BVg8ydp1.js +598 -0
  33. package/dist/lazy/{Tabs-Kra7RQza.js → Tabs-CbJpP5yI.js} +5 -5
  34. package/dist/lazy/Tag-DfelP1C7.js +25 -0
  35. package/dist/lazy/{TextArea-D-md2_JP.js → TextArea-HCAqMgrp.js} +1 -1
  36. package/dist/lazy/{Title-32bZDihB.js → Title-7fiPAhd5.js} +1 -1
  37. package/dist/lazy/Title.vue_vue_type_script_setup_true_lang-LunhnrZy.js +26 -0
  38. package/dist/lazy/{Wrapper-Djhw4u_A.js → Wrapper-BR-FaBxi.js} +3 -3
  39. package/dist/lazy/{index-if5yiaE6.js → index-1omyaX4F.js} +6260 -6321
  40. package/dist/lazy/{useSelect-Cx92c9xA.js → useSelect-U2g9t7In.js} +1 -1
  41. package/dist/style.css +2 -2
  42. package/package.json +1 -1
  43. package/dist/lazy/Component-DPKOSkbS.js +0 -192
  44. package/dist/lazy/Component-DVnr7_Wq.js +0 -321
  45. package/dist/lazy/FilterSearch-DWIoFEYA.js +0 -149
  46. package/dist/lazy/FloatCurd-BIIOwN6L.js +0 -268
  47. package/dist/lazy/FloatSearchCurd-B5mTYPo4.js +0 -447
  48. package/dist/lazy/Pagination-BcwTZvOy.js +0 -121
  49. package/dist/lazy/Table-CTLmaWUi.js +0 -667
  50. package/dist/lazy/Tag-IQ_W6v0E.js +0 -22
  51. package/dist/lazy/Title.vue_vue_type_script_setup_true_lang-Ceco_9-w.js +0 -23
@@ -1,447 +0,0 @@
1
- import { defineComponent as Te, mergeModels as Ee, useModel as oe, ref as c, computed as ae, onUnmounted as se, watch as Le, onMounted as Be, resolveComponent as k, resolveDirective as Pe, withDirectives as q, openBlock as a, createElementBlock as r, createElementVNode as n, createVNode as u, withKeys as Ye, withCtx as p, Fragment as C, withModifiers as re, renderList as B, createBlock as A, toDisplayString as v, createTextVNode as ie, createCommentVNode as w, normalizeClass as Oe, normalizeStyle as Ne, unref as ue, vShow as ce } from "vue";
2
- import { c as $e, u as ze, d as He, f as de, j as Re, I as D, a as qe, b as Ae, _ as Ue } from "./index-if5yiaE6.js";
3
- import { dayjs as U } from "element-plus";
4
- const je = { class: "float-curd" }, Ge = { class: "curd-body" }, Ke = { class: "custom-prefix-text" }, We = { style: { "padding-right": "8px" } }, Je = { style: { "font-size": "12px" } }, Qe = {
5
- key: 0,
6
- class: "empty-content h-[234px]"
7
- }, Xe = {
8
- key: 2,
9
- class: "flex"
10
- }, Ze = ["onMouseenter", "onClick"], el = ["innerHTML"], ll = ["innerHTML"], tl = {
11
- key: 0,
12
- class: "flex-[500_1_0] bg-[#ffffff] border-l-solid border-l-[#E5E7EB] border-l-[1px]"
13
- }, nl = { class: "bg-[#FBFBFB] py-[24px] px-[16px] border-b-solid border-b-[#E5E7EB] border-b-[1px]" }, ol = { class: "flex-y-center gap-[8px]" }, al = { class: "text-[#333333] text-[18px] leading-[18px] font-bold mb-[4px]" }, sl = { class: "text-[#333333] text-[12px] leading-[12px]" }, rl = { class: "px-[16px] pt-[16px]" }, il = { class: "detail-info-label" }, ul = ["title"], cl = { class: "float-form" }, dl = { class: "float-form-header" }, pl = { class: "float-form-header-title" }, fl = { class: "float-form-header-btns" }, vl = { class: "float-form-body" }, ml = { class: "curd-footer" }, hl = ["innerHTML"], xl = ["title"], _l = /* @__PURE__ */ Te({
14
- __name: "FloatSearchCurd",
15
- props: /* @__PURE__ */ Ee({
16
- name: {},
17
- children: {},
18
- formTitle: {},
19
- onSearch: {},
20
- onAiSearch: {},
21
- onClear: {},
22
- inputPlaceholder: {},
23
- hidden: { type: Boolean },
24
- prefixOptions: {},
25
- prefixChange: {},
26
- defaultPrefixValue: {},
27
- onDetailInfo: {},
28
- onFloatSearch: {},
29
- onSelectItem: {}
30
- }, {
31
- searchData: {},
32
- searchDataModifiers: {},
33
- detailInfo: {},
34
- detailInfoModifiers: {}
35
- }),
36
- emits: ["update:searchData", "update:detailInfo"],
37
- setup($, { expose: pe }) {
38
- const o = $, m = oe($, "searchData"), h = oe($, "detailInfo"), V = c(!1), { ruleModule: _, pageMethodMap: y } = $e(), z = ze(), fe = He(), j = ae(() => {
39
- var F, M, P, Y, O, N, t, S, te;
40
- const e = z.schema.items, l = z.formValues, s = de(e, o.name);
41
- if (!s || !s.children)
42
- return [];
43
- const b = [];
44
- for (const ne in l) {
45
- const i = de(s.children, ne);
46
- if (i && i.label && !i.hidden) {
47
- const x = l[ne];
48
- if (x != null && x !== "") {
49
- const L = {
50
- name: i.name,
51
- label: i.label,
52
- value: x,
53
- closeable: !i.required && !((F = i.props) != null && F.disabled) && ((M = i.props) == null ? void 0 : M.clearable) !== !1
54
- };
55
- i.component === "DatePicker" && (((P = i.props) == null ? void 0 : P.type) === "daterange" ? L.value = U(x[0]).format(((Y = i.props) == null ? void 0 : Y.valueFormat) || "YYYY-MM-DD") + " - " + U(x[1]).format(((O = i.props) == null ? void 0 : O.valueFormat) || "YYYY-MM-DD") : (L.iconName = "icon-rili", L.value = U(x).format(((N = i.props) == null ? void 0 : N.valueFormat) || "YYYY-MM-DD"))), i.component === "Select" && (L.value = (te = (S = (t = i.props) == null ? void 0 : t.options) == null ? void 0 : S.find((Ve) => Ve.value === x)) == null ? void 0 : te.label), b.push(L);
56
- }
57
- }
58
- }
59
- return b;
60
- }), f = c(""), ve = ae(() => {
61
- var e, l;
62
- return !o.prefixOptions || o.prefixOptions.length === 0 || !f.value ? "" : (l = (e = o.prefixOptions) == null ? void 0 : e.find((s) => s.value === f.value)) == null ? void 0 : l.label;
63
- });
64
- function me(e) {
65
- f.value = e, d.value = "";
66
- try {
67
- _[o.prefixChange](y, e);
68
- } catch (l) {
69
- console.error(l);
70
- }
71
- }
72
- const d = c("");
73
- function G() {
74
- try {
75
- _[o.onSearch](y), V.value = !1;
76
- } catch (e) {
77
- console.error(e);
78
- }
79
- }
80
- const H = c(!1);
81
- async function R() {
82
- try {
83
- H.value = !0, await _[o.onAiSearch](y, d.value, f.value || "");
84
- } catch (e) {
85
- console.error(e);
86
- } finally {
87
- H.value = !1;
88
- }
89
- }
90
- function he(e) {
91
- z.setFieldValue(e.name, "", ""), G();
92
- }
93
- function xe() {
94
- try {
95
- _[o.onClear](y);
96
- } catch (e) {
97
- console.error(e);
98
- }
99
- }
100
- const K = {
101
- type: "floatcurd"
102
- };
103
- if (pe(K), o.name) {
104
- const e = Re(o.name, K);
105
- se(() => {
106
- e();
107
- });
108
- }
109
- Le(
110
- () => o.defaultPrefixValue,
111
- (e) => {
112
- e && (f.value = e);
113
- }
114
- );
115
- const W = c(!1), I = c(!1);
116
- c([]);
117
- const _e = c(""), T = c(!1), ye = c(!1);
118
- function J(e) {
119
- return d.value ? e ? e.replace(
120
- new RegExp(d.value, "gi"),
121
- (l) => `<span style="color: var(--el-color-primary)">${l}</span>`
122
- ) : "--" : e;
123
- }
124
- async function ge(e) {
125
- try {
126
- await _[o.onDetailInfo](y, e);
127
- } catch (l) {
128
- console.error(l);
129
- }
130
- }
131
- async function be(e) {
132
- try {
133
- await _[o.onSelectItem](y, e), I.value = !1;
134
- } catch (l) {
135
- console.error(l);
136
- }
137
- }
138
- function ke() {
139
- d.value && (I.value = !0);
140
- }
141
- function Ce() {
142
- W.value = !0;
143
- }
144
- function we() {
145
- W.value = !1;
146
- }
147
- function Ie(e) {
148
- e ? (I.value = !0, Se()) : (g = !1, m.value = [], h.value = {
149
- title: "",
150
- subTitle: "",
151
- content: []
152
- }, I.value = !1);
153
- }
154
- let E = 0, g = !1;
155
- function Q() {
156
- if (!d.value) {
157
- g = !1, m.value = [], h.value = {
158
- title: "",
159
- subTitle: "",
160
- content: []
161
- };
162
- return;
163
- }
164
- if (E > 0) {
165
- g = !0;
166
- return;
167
- }
168
- g = !1, Me();
169
- }
170
- function Fe() {
171
- E > 0 || !g || Q();
172
- }
173
- async function Me() {
174
- const e = d.value, l = f.value || "";
175
- E++;
176
- try {
177
- T.value = !0, m.value = [], h.value = {
178
- title: "",
179
- subTitle: "",
180
- content: []
181
- }, await _[o.onFloatSearch](y, e, l);
182
- } catch (s) {
183
- console.error(s);
184
- } finally {
185
- E--, d.value && (e !== d.value || l !== (f.value || "")) && (g = !0), E === 0 && !g && (T.value = !1), Fe();
186
- }
187
- }
188
- let Se = De(Q, 600);
189
- function De(e, l = 500) {
190
- let s = null;
191
- return function(...b) {
192
- const F = this;
193
- s && clearTimeout(s), s = setTimeout(() => {
194
- e.apply(F, b), s = null;
195
- }, l);
196
- };
197
- }
198
- const X = c(null), Z = c(null), ee = (e) => {
199
- var l, s;
200
- try {
201
- !((l = X.value) != null && l.contains(e.target)) && !((s = Z.value) != null && s.contains(e.target)) && le();
202
- } catch {
203
- le();
204
- }
205
- };
206
- function le() {
207
- console.log("hideSearchDialog"), I.value = !1;
208
- }
209
- return Be(() => {
210
- document.addEventListener("click", ee), o.defaultPrefixValue ? f.value = o.defaultPrefixValue : o.prefixOptions && o.prefixOptions.length > 0 && (f.value = o.prefixOptions[0].value);
211
- }), se(() => {
212
- document.removeEventListener("click", ee);
213
- }), (e, l) => {
214
- const s = k("el-dropdown-item"), b = k("el-dropdown-menu"), F = k("el-dropdown"), M = k("el-button"), P = k("el-input"), Y = k("el-skeleton"), O = k("el-scrollbar"), N = Pe("loading");
215
- return q((a(), r("div", je, [
216
- n("div", Ge, [
217
- n("div", {
218
- class: "gradient-input-wrapper",
219
- ref_key: "gradientInputWrapperRef",
220
- ref: Z
221
- }, [
222
- u(P, {
223
- class: "float-curd-ai-input",
224
- placeholder: e.inputPlaceholder,
225
- modelValue: d.value,
226
- "onUpdate:modelValue": l[1] || (l[1] = (t) => d.value = t),
227
- clearable: "",
228
- onClear: R,
229
- onKeyup: Ye(R, ["enter"]),
230
- onInput: Ie,
231
- onFocus: Ce,
232
- onBlur: we,
233
- onClick: ke
234
- }, {
235
- prefix: p(() => [
236
- e.prefixOptions && e.prefixOptions.length > 0 ? (a(), r(C, { key: 0 }, [
237
- u(F, {
238
- onClick: l[0] || (l[0] = re(() => {
239
- }, ["stop"]))
240
- }, {
241
- dropdown: p(() => [
242
- u(b, null, {
243
- default: p(() => [
244
- (a(!0), r(C, null, B(e.prefixOptions, (t) => (a(), A(s, {
245
- key: t.value,
246
- command: t.value,
247
- onClick: (S) => me(t.value),
248
- style: { padding: "4px 8px" }
249
- }, {
250
- default: p(() => [
251
- n("span", Je, v(t.label), 1)
252
- ]),
253
- _: 2
254
- }, 1032, ["command", "onClick"]))), 128))
255
- ]),
256
- _: 1
257
- })
258
- ]),
259
- default: p(() => [
260
- n("span", Ke, [
261
- n("span", We, v(ve.value), 1)
262
- ])
263
- ]),
264
- _: 1
265
- }),
266
- u(D, {
267
- name: "icon-dropdown",
268
- size: 12,
269
- color: "#999"
270
- })
271
- ], 64)) : (a(), r(C, { key: 1 }, [
272
- u(D, { name: "icon-a-mobang1" }),
273
- l[4] || (l[4] = n("span", { class: "prefix-text" }, "Ask AI", -1))
274
- ], 64))
275
- ]),
276
- suffix: p(() => [
277
- u(M, {
278
- type: "primary",
279
- size: "small",
280
- onClick: re(R, ["stop"]),
281
- loading: H.value
282
- }, {
283
- default: p(() => l[5] || (l[5] = [
284
- ie("Go")
285
- ])),
286
- _: 1
287
- }, 8, ["loading"])
288
- ]),
289
- _: 1
290
- }, 8, ["placeholder", "modelValue"]),
291
- I.value ? (a(), r("div", {
292
- key: 0,
293
- ref_key: "resultPanelRef",
294
- ref: X,
295
- class: "absolute top-[32px] w-full bg-[#ffffff] shadow-[0_4px_12px_rgba(0,0,0,0.08)] rounded-bl-[8px] rounded-br-[8px] z-2002"
296
- }, [
297
- (!m.value || m.value.length === 0) && !T.value ? (a(), r("div", Qe, [
298
- u(qe, {
299
- name: "tableEmpty",
300
- style: { width: 56, height: 56 }
301
- }),
302
- l[6] || (l[6] = n("div", { class: "flex items-center" }, [
303
- n("span", null, "No data")
304
- ], -1))
305
- ])) : w("", !0),
306
- T.value ? (a(), r(C, { key: 1 }, B(5, (t) => n("div", {
307
- key: t,
308
- class: "flex items-center py-[8px] px-[16px]"
309
- }, [
310
- u(Y, {
311
- rows: 1,
312
- animated: ""
313
- })
314
- ])), 64)) : m.value && m.value.length > 0 ? (a(), r("div", Xe, [
315
- u(O, {
316
- class: "pt-[16px] flex-[764_1_0]",
317
- "max-height": "368px",
318
- "wrap-style": { minHeight: T.value ? "368px" : "234px" }
319
- }, {
320
- default: p(() => [
321
- n("div", null, [
322
- (a(!0), r(C, null, B(m.value, (t) => (a(), r("div", {
323
- key: t.name,
324
- class: Oe(["flex-y-center h-[52px] px-[16px] hover:bg-[#E6F0F9] gap-[8px]", { "bg-[#E6F0F9]": t.name === _e.value }]),
325
- onMouseenter: (S) => ge(t),
326
- onClick: (S) => be(t)
327
- }, [
328
- n("div", null, [
329
- n("div", {
330
- class: "text-[#333333] text-[14px] leading-[14px] font-bold mb-[4px] whitespace-nowrap",
331
- innerHTML: J(t.title)
332
- }, null, 8, el),
333
- n("div", {
334
- class: "text-[#333333] text-[12px] leading-[14px] whitespace-nowrap",
335
- innerHTML: J(t.content)
336
- }, null, 8, ll)
337
- ])
338
- ], 42, Ze))), 128))
339
- ])
340
- ]),
341
- _: 1
342
- }, 8, ["wrap-style"]),
343
- h.value && h.value.title ? q((a(), r("div", tl, [
344
- n("div", nl, [
345
- n("div", ol, [
346
- n("div", null, [
347
- n("div", al, v(h.value.title), 1),
348
- n("div", sl, v(h.value.subTitle), 1)
349
- ])
350
- ])
351
- ]),
352
- n("div", rl, [
353
- (a(!0), r(C, null, B(h.value.content, (t) => (a(), r("div", {
354
- key: t.label,
355
- class: "detail-info"
356
- }, [
357
- n("div", il, v(t.label), 1),
358
- n("div", {
359
- class: "detail-info-value",
360
- style: Ne({ color: t.color }),
361
- title: t.value ?? "--"
362
- }, v(t.value || "--"), 13, ul)
363
- ]))), 128))
364
- ])
365
- ])), [
366
- [N, ye.value]
367
- ]) : w("", !0)
368
- ])) : w("", !0)
369
- ], 512)) : w("", !0)
370
- ], 512),
371
- u(M, {
372
- plain: !0,
373
- onClick: l[2] || (l[2] = (t) => V.value = !V.value),
374
- class: "more-btn",
375
- type: "primary"
376
- }, {
377
- default: p(() => [
378
- u(D, { name: "icon-tiaojianshaixuan" }),
379
- l[7] || (l[7] = n("span", null, "More", -1))
380
- ]),
381
- _: 1
382
- }),
383
- q(n("div", cl, [
384
- n("div", dl, [
385
- n("div", pl, v(e.formTitle), 1),
386
- n("div", fl, [
387
- u(M, {
388
- type: "primary",
389
- size: "small",
390
- onClick: G
391
- }, {
392
- default: p(() => l[8] || (l[8] = [
393
- ie("Go")
394
- ])),
395
- _: 1
396
- }),
397
- u(D, {
398
- name: "icon-a-rongqi1",
399
- onClick: l[3] || (l[3] = (t) => V.value = !1)
400
- })
401
- ])
402
- ]),
403
- n("div", vl, [
404
- u(ue(Ae), { list: e.children }, null, 8, ["list"])
405
- ])
406
- ], 512), [
407
- [ce, V.value]
408
- ])
409
- ]),
410
- n("div", ml, [
411
- (a(!0), r(C, null, B(j.value, (t) => (a(), r("div", {
412
- class: "tag",
413
- key: t.name
414
- }, [
415
- t.iconName ? (a(), A(D, {
416
- key: 0,
417
- name: t.iconName
418
- }, null, 8, ["name"])) : w("", !0),
419
- n("span", {
420
- innerHTML: t.label + ":"
421
- }, null, 8, hl),
422
- n("span", {
423
- class: "tag-value",
424
- title: t.value
425
- }, v(t.value), 9, xl),
426
- t.closeable ? (a(), A(D, {
427
- key: 1,
428
- name: "icon-a-rongqi1",
429
- onClick: (S) => he(t),
430
- class: "close-icon"
431
- }, null, 8, ["onClick"])) : w("", !0)
432
- ]))), 128)),
433
- j.value.length > 0 ? (a(), r("div", {
434
- key: 0,
435
- class: "clear-btn",
436
- onClick: xe
437
- }, v(ue(fe).curd.resetFilters), 1)) : w("", !0)
438
- ])
439
- ], 512)), [
440
- [ce, !e.hidden]
441
- ]);
442
- };
443
- }
444
- }), kl = /* @__PURE__ */ Ue(_l, [["__scopeId", "data-v-8a9e3c9d"]]);
445
- export {
446
- kl as default
447
- };
@@ -1,121 +0,0 @@
1
- import { defineComponent as B, ref as d, computed as U, onUnmounted as b, resolveComponent as C, openBlock as s, createElementBlock as S, normalizeStyle as M, createBlock as f, withCtx as j, createElementVNode as r, createVNode as L, createCommentVNode as x, createTextVNode as m, toDisplayString as h } from "vue";
2
- import { c as E, j as I, _ as R } from "./index-if5yiaE6.js";
3
- import "element-plus";
4
- const T = { class: "custom-slot" }, D = {
5
- key: 0,
6
- class: "select-all-wrapper"
7
- }, O = { style: { color: "#666666" } }, q = { style: { color: "var(--el-color-primary)" } }, F = { style: { color: "var(--el-color-primary)" } }, G = /* @__PURE__ */ B({
8
- __name: "Pagination",
9
- props: {
10
- pageSizes: {},
11
- defaultPageSize: {},
12
- paginationLayout: {},
13
- hiddenPagination: { type: Boolean },
14
- pagerCount: {},
15
- style: { type: [Boolean, null, String, Object, Array] },
16
- sizeChange: {},
17
- pageChange: {},
18
- name: {},
19
- mode: {},
20
- showSelectAll: { type: Boolean },
21
- selectAllChange: {}
22
- },
23
- setup(N, { expose: P }) {
24
- const n = N, { ruleModule: p, pageMethodMap: u } = E(), l = d(0), k = U(() => {
25
- const { pageNum: a, pageSize: e } = t.value, g = (a - 1) * e;
26
- return Math.min(e, Math.max(0, l.value - g));
27
- }), w = (a) => {
28
- l.value = a;
29
- }, t = d({ pageNum: 1, pageSize: n.defaultPageSize || 5 }), A = () => t.value, c = async (a) => {
30
- if (t.value.pageNum = 1, t.value.pageSize = a, !!n.sizeChange)
31
- try {
32
- await p[n.sizeChange](u, t.value);
33
- } catch (e) {
34
- console.error(e);
35
- }
36
- }, z = async (a) => {
37
- if (t.value.pageNum = a, !!n.pageChange)
38
- try {
39
- await p[n.pageChange](u, t.value);
40
- } catch (e) {
41
- console.error(e);
42
- }
43
- }, i = d(!1), V = (a) => {
44
- try {
45
- p[n.selectAllChange](u, a);
46
- } catch (e) {
47
- console.error(e);
48
- }
49
- }, v = {
50
- getPagination: A,
51
- setTotal: w,
52
- selectAll: i,
53
- type: "pagination"
54
- };
55
- if (n.name) {
56
- const a = I(n.name, v);
57
- b(() => {
58
- a();
59
- });
60
- }
61
- return P(v), (a, e) => {
62
- const g = C("el-checkbox"), y = C("el-pagination");
63
- return s(), S("div", {
64
- class: "pagination-wrapper",
65
- style: M(a.style)
66
- }, [
67
- a.mode === "top" ? (s(), f(y, {
68
- key: 0,
69
- layout: a.paginationLayout || "slot,sizes, prev, pager, next,jumper",
70
- total: l.value,
71
- "page-sizes": a.pageSizes || [5, 6, 10, 20, 30, 40],
72
- "default-page-size": a.defaultPageSize,
73
- "current-page": t.value.pageNum,
74
- "onUpdate:currentPage": e[2] || (e[2] = (o) => t.value.pageNum = o),
75
- "page-size": t.value.pageSize,
76
- "onUpdate:pageSize": e[3] || (e[3] = (o) => t.value.pageSize = o),
77
- "pager-count": Number(a.pagerCount) || 5,
78
- onSizeChange: c,
79
- onCurrentChange: z
80
- }, {
81
- default: j(() => [
82
- r("div", T, [
83
- a.showSelectAll ? (s(), S("div", D, [
84
- L(g, {
85
- modelValue: i.value,
86
- "onUpdate:modelValue": e[0] || (e[0] = (o) => i.value = o),
87
- onChange: e[1] || (e[1] = (o) => V(o))
88
- }, null, 8, ["modelValue"]),
89
- e[6] || (e[6] = r("span", null, "Select All", -1))
90
- ])) : x("", !0),
91
- r("span", O, [
92
- e[7] || (e[7] = m("Showing ")),
93
- r("span", q, h(k.value), 1),
94
- e[8] || (e[8] = m(" of ")),
95
- r("span", F, h(l.value), 1),
96
- e[9] || (e[9] = m(" records"))
97
- ])
98
- ])
99
- ]),
100
- _: 1
101
- }, 8, ["layout", "total", "page-sizes", "default-page-size", "current-page", "page-size", "pager-count"])) : (s(), f(y, {
102
- key: 1,
103
- layout: a.paginationLayout || "total,sizes, prev, pager, next,jumper",
104
- total: l.value,
105
- "page-sizes": a.pageSizes || [5, 6, 10, 20, 30, 40],
106
- "default-page-size": a.defaultPageSize,
107
- "current-page": t.value.pageNum,
108
- "onUpdate:currentPage": e[4] || (e[4] = (o) => t.value.pageNum = o),
109
- "page-size": t.value.pageSize,
110
- "onUpdate:pageSize": e[5] || (e[5] = (o) => t.value.pageSize = o),
111
- "pager-count": Number(a.pagerCount) || 5,
112
- onSizeChange: c,
113
- onCurrentChange: z
114
- }, null, 8, ["layout", "total", "page-sizes", "default-page-size", "current-page", "page-size", "pager-count"]))
115
- ], 4);
116
- };
117
- }
118
- }), Q = /* @__PURE__ */ R(G, [["__scopeId", "data-v-a9ae91de"]]);
119
- export {
120
- Q as default
121
- };