little-dizzy 2.5.0 → 2.6.0

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.
@@ -1,10 +1,10 @@
1
- import { createElementBlock as a, openBlock as s, normalizeClass as $, renderSlot as z, createCommentVNode as g, createElementVNode as o, toDisplayString as T, normalizeStyle as x, ref as I, createBlock as X, Teleport as K, createVNode as J, TransitionGroup as Q, withCtx as Z, Fragment as _, renderList as B, computed as A, onMounted as F, onUnmounted as ee, watch as Y, createStaticVNode as R, createTextVNode as U } from "vue";
2
- const C = (e, t) => {
3
- const n = e.__vccOpts || e;
1
+ import { createElementBlock as n, openBlock as a, normalizeClass as C, renderSlot as _, createCommentVNode as f, createElementVNode as l, toDisplayString as V, normalizeStyle as w, ref as z, createBlock as R, Teleport as Z, createVNode as ee, TransitionGroup as te, withCtx as U, Fragment as $, renderList as S, computed as I, onMounted as j, onUnmounted as q, watch as G, createStaticVNode as W, createTextVNode as X, shallowRef as Y, Transition as se, withDirectives as ae, vShow as oe } from "vue";
2
+ const B = (e, t) => {
3
+ const o = e.__vccOpts || e;
4
4
  for (const [r, d] of t)
5
- n[r] = d;
6
- return n;
7
- }, te = ["disabled"], se = {
5
+ o[r] = d;
6
+ return o;
7
+ }, ne = ["disabled"], le = {
8
8
  __name: "Button",
9
9
  props: {
10
10
  // 按钮类型
@@ -32,29 +32,29 @@ const C = (e, t) => {
32
32
  },
33
33
  emits: ["click"],
34
34
  setup(e, { emit: t }) {
35
- return (n, r) => (s(), a("button", {
36
- class: $(["btn", [
35
+ return (o, r) => (a(), n("button", {
36
+ class: C(["btn", [
37
37
  `btn-${e.type}`,
38
38
  `btn-${e.size}`,
39
39
  { "btn-block": e.block },
40
40
  { "btn-disabled": e.disabled }
41
41
  ]]),
42
42
  disabled: e.disabled,
43
- onClick: r[0] || (r[0] = (d) => n.$emit("click", d))
43
+ onClick: r[0] || (r[0] = (d) => o.$emit("click", d))
44
44
  }, [
45
- z(n.$slots, "default", {}, void 0, !0)
46
- ], 10, te));
45
+ _(o.$slots, "default", {}, void 0, !0)
46
+ ], 10, ne));
47
47
  }
48
- }, ae = /* @__PURE__ */ C(se, [["__scopeId", "data-v-75f082b2"]]), ne = {
48
+ }, re = /* @__PURE__ */ B(le, [["__scopeId", "data-v-75f082b2"]]), ie = {
49
49
  key: 0,
50
50
  class: "card-header"
51
- }, oe = {
51
+ }, ce = {
52
52
  key: 0,
53
53
  class: "card-header-title"
54
- }, le = { class: "card-body" }, re = {
54
+ }, de = { class: "card-body" }, ue = {
55
55
  key: 1,
56
56
  class: "card-footer"
57
- }, ie = {
57
+ }, pe = {
58
58
  __name: "Card",
59
59
  props: {
60
60
  // 卡片标题
@@ -69,31 +69,31 @@ const C = (e, t) => {
69
69
  }
70
70
  },
71
71
  setup(e) {
72
- return (t, n) => (s(), a("div", {
73
- class: $(["card", { "card-shadow": e.shadow }])
72
+ return (t, o) => (a(), n("div", {
73
+ class: C(["card", { "card-shadow": e.shadow }])
74
74
  }, [
75
- t.$slots.header || e.title ? (s(), a("div", ne, [
76
- e.title ? (s(), a("h3", oe, T(e.title), 1)) : g("", !0),
77
- z(t.$slots, "header", {}, void 0, !0)
78
- ])) : g("", !0),
79
- o("div", le, [
80
- z(t.$slots, "default", {}, void 0, !0)
75
+ t.$slots.header || e.title ? (a(), n("div", ie, [
76
+ e.title ? (a(), n("h3", ce, V(e.title), 1)) : f("", !0),
77
+ _(t.$slots, "header", {}, void 0, !0)
78
+ ])) : f("", !0),
79
+ l("div", de, [
80
+ _(t.$slots, "default", {}, void 0, !0)
81
81
  ]),
82
- t.$slots.footer ? (s(), a("div", re, [
83
- z(t.$slots, "footer", {}, void 0, !0)
84
- ])) : g("", !0)
82
+ t.$slots.footer ? (a(), n("div", ue, [
83
+ _(t.$slots, "footer", {}, void 0, !0)
84
+ ])) : f("", !0)
85
85
  ], 2));
86
86
  }
87
- }, ce = /* @__PURE__ */ C(ie, [["__scopeId", "data-v-1e2b2467"]]), de = { class: "modal-dialog" }, ue = { class: "modal-header" }, pe = {
87
+ }, me = /* @__PURE__ */ B(pe, [["__scopeId", "data-v-1e2b2467"]]), ge = { class: "modal-dialog" }, ve = { class: "modal-header" }, he = {
88
88
  key: 0,
89
89
  class: "modal-header-title"
90
- }, me = { class: "modal-body" }, ge = {
90
+ }, fe = { class: "modal-body" }, ye = {
91
91
  key: 0,
92
92
  class: "modal-footer"
93
- }, ve = {
93
+ }, be = {
94
94
  key: 1,
95
95
  class: "modal-footer"
96
- }, he = {
96
+ }, ke = {
97
97
  __name: "Modal",
98
98
  props: {
99
99
  // 是否显示模态框
@@ -118,54 +118,54 @@ const C = (e, t) => {
118
118
  },
119
119
  emits: ["close", "cancel", "confirm"],
120
120
  setup(e, { emit: t }) {
121
- const n = t, r = () => {
122
- n("close");
121
+ const o = t, r = () => {
122
+ o("close");
123
123
  }, d = () => {
124
- n("cancel");
124
+ o("cancel");
125
125
  }, c = () => {
126
- n("confirm");
126
+ o("confirm");
127
127
  };
128
- return (l, v) => e.visible ? (s(), a("div", {
128
+ return (s, g) => e.visible ? (a(), n("div", {
129
129
  key: 0,
130
- class: $(["modal", { "modal-show": e.visible }])
130
+ class: C(["modal", { "modal-show": e.visible }])
131
131
  }, [
132
- o("div", de, [
133
- o("div", {
132
+ l("div", ge, [
133
+ l("div", {
134
134
  class: "modal-content",
135
- style: x({ width: e.width })
135
+ style: w({ width: e.width })
136
136
  }, [
137
- o("div", ue, [
138
- e.title ? (s(), a("h3", pe, T(e.title), 1)) : g("", !0),
139
- o("button", {
137
+ l("div", ve, [
138
+ e.title ? (a(), n("h3", he, V(e.title), 1)) : f("", !0),
139
+ l("button", {
140
140
  class: "modal-header-close",
141
141
  onClick: r
142
142
  }, "×")
143
143
  ]),
144
- o("div", me, [
145
- z(l.$slots, "default", {}, void 0, !0)
144
+ l("div", fe, [
145
+ _(s.$slots, "default", {}, void 0, !0)
146
146
  ]),
147
- l.$slots.footer ? (s(), a("div", ge, [
148
- z(l.$slots, "footer", {}, void 0, !0)
149
- ])) : e.showFooter ? (s(), a("div", ve, [
150
- o("button", {
147
+ s.$slots.footer ? (a(), n("div", ye, [
148
+ _(s.$slots, "footer", {}, void 0, !0)
149
+ ])) : e.showFooter ? (a(), n("div", be, [
150
+ l("button", {
151
151
  class: "btn btn-secondary",
152
152
  onClick: d
153
153
  }, "取消"),
154
- o("button", {
154
+ l("button", {
155
155
  class: "btn btn-primary",
156
156
  onClick: c
157
157
  }, "确定")
158
- ])) : g("", !0)
158
+ ])) : f("", !0)
159
159
  ], 4)
160
160
  ])
161
- ], 2)) : g("", !0);
161
+ ], 2)) : f("", !0);
162
162
  }
163
- }, fe = /* @__PURE__ */ C(he, [["__scopeId", "data-v-39af2dcd"]]), ye = ["innerHTML"], be = { class: "text-sm font-medium" }, ke = ["onClick"], we = /* @__PURE__ */ Object.assign({
163
+ }, we = /* @__PURE__ */ B(ke, [["__scopeId", "data-v-39af2dcd"]]), xe = ["innerHTML"], _e = { class: "text-sm font-medium" }, $e = ["onClick"], Be = /* @__PURE__ */ Object.assign({
164
164
  name: "Message"
165
165
  }, {
166
166
  __name: "Message",
167
167
  setup(e, { expose: t }) {
168
- const n = I([]), r = {
168
+ const o = z([]), r = {
169
169
  success: "bg-emerald-500/95 text-white",
170
170
  warning: "bg-amber-500/95 text-white",
171
171
  error: "bg-rose-500/95 text-white",
@@ -186,7 +186,7 @@ const C = (e, t) => {
186
186
  </svg>`
187
187
  };
188
188
  let c = 0;
189
- const l = (p) => {
189
+ const s = (p) => {
190
190
  const i = ++c, u = {
191
191
  id: i,
192
192
  type: p.type || "info",
@@ -194,76 +194,76 @@ const C = (e, t) => {
194
194
  duration: p.duration ?? 3e3,
195
195
  closable: p.closable ?? !1
196
196
  };
197
- return n.value.push(u), u.duration > 0 && setTimeout(() => {
198
- v(i);
197
+ return o.value.push(u), u.duration > 0 && setTimeout(() => {
198
+ g(i);
199
199
  }, u.duration), i;
200
- }, v = (p) => {
201
- const i = n.value.findIndex((u) => u.id === p);
202
- i > -1 && n.value.splice(i, 1);
200
+ }, g = (p) => {
201
+ const i = o.value.findIndex((u) => u.id === p);
202
+ i > -1 && o.value.splice(i, 1);
203
203
  };
204
204
  return t({
205
- addMessage: l,
206
- removeMessage: v,
205
+ addMessage: s,
206
+ removeMessage: g,
207
207
  clearAll: () => {
208
- n.value = [];
208
+ o.value = [];
209
209
  },
210
210
  // Shorthand methods
211
- success: (p, i = {}) => l({ ...i, type: "success", content: p }),
212
- warning: (p, i = {}) => l({ ...i, type: "warning", content: p }),
213
- error: (p, i = {}) => l({ ...i, type: "error", content: p }),
214
- info: (p, i = {}) => l({ ...i, type: "info", content: p })
215
- }), (p, i) => (s(), X(K, { to: "body" }, [
216
- J(Q, {
211
+ success: (p, i = {}) => s({ ...i, type: "success", content: p }),
212
+ warning: (p, i = {}) => s({ ...i, type: "warning", content: p }),
213
+ error: (p, i = {}) => s({ ...i, type: "error", content: p }),
214
+ info: (p, i = {}) => s({ ...i, type: "info", content: p })
215
+ }), (p, i) => (a(), R(Z, { to: "body" }, [
216
+ ee(te, {
217
217
  name: "message",
218
218
  tag: "div",
219
219
  class: "fixed top-4 left-1/2 -translate-x-1/2 z-[9999] flex flex-col items-center gap-3 pointer-events-none"
220
220
  }, {
221
- default: Z(() => [
222
- (s(!0), a(_, null, B(n.value, (u) => (s(), a("div", {
221
+ default: U(() => [
222
+ (a(!0), n($, null, S(o.value, (u) => (a(), n("div", {
223
223
  key: u.id,
224
- class: $(["pointer-events-auto flex items-center gap-3 px-5 py-3 rounded-lg shadow-lg backdrop-blur-sm transition-all duration-300", r[u.type]])
224
+ class: C(["pointer-events-auto flex items-center gap-3 px-5 py-3 rounded-lg shadow-lg backdrop-blur-sm transition-all duration-300", r[u.type]])
225
225
  }, [
226
- o("span", {
226
+ l("span", {
227
227
  class: "flex-shrink-0",
228
228
  innerHTML: d[u.type]
229
- }, null, 8, ye),
230
- o("span", be, T(u.content), 1),
231
- u.closable ? (s(), a("button", {
229
+ }, null, 8, xe),
230
+ l("span", _e, V(u.content), 1),
231
+ u.closable ? (a(), n("button", {
232
232
  key: 0,
233
- onClick: (V) => v(u.id),
233
+ onClick: (A) => g(u.id),
234
234
  class: "flex-shrink-0 ml-2 p-1 rounded-full hover:bg-black/10 transition-colors"
235
235
  }, [...i[0] || (i[0] = [
236
- o("svg", {
236
+ l("svg", {
237
237
  class: "w-4 h-4",
238
238
  viewBox: "0 0 24 24",
239
239
  fill: "none",
240
240
  stroke: "currentColor",
241
241
  "stroke-width": "2"
242
242
  }, [
243
- o("path", { d: "M18 6L6 18M6 6l12 12" })
243
+ l("path", { d: "M18 6L6 18M6 6l12 12" })
244
244
  ], -1)
245
- ])], 8, ke)) : g("", !0)
245
+ ])], 8, $e)) : f("", !0)
246
246
  ], 2))), 128))
247
247
  ]),
248
248
  _: 1
249
249
  })
250
250
  ]));
251
251
  }
252
- }), xe = /* @__PURE__ */ C(we, [["__scopeId", "data-v-d727fd6c"]]), _e = ["src", "alt"], $e = {
252
+ }), ze = /* @__PURE__ */ B(Be, [["__scopeId", "data-v-d727fd6c"]]), Ce = ["src", "alt"], Se = {
253
253
  key: 1,
254
254
  class: "slide-title"
255
- }, ze = {
255
+ }, Me = {
256
256
  key: 0,
257
257
  class: "carousel-indicators"
258
- }, Be = ["onClick"], Ce = {
258
+ }, Le = ["onClick"], Te = {
259
259
  viewBox: "0 0 24 24",
260
260
  width: "24",
261
261
  height: "24"
262
- }, Se = ["d"], Me = {
262
+ }, Ie = ["d"], Ve = {
263
263
  viewBox: "0 0 24 24",
264
264
  width: "24",
265
265
  height: "24"
266
- }, Le = ["d"], Ie = /* @__PURE__ */ Object.assign({
266
+ }, Ae = ["d"], Ee = /* @__PURE__ */ Object.assign({
267
267
  name: "Carousel"
268
268
  }, {
269
269
  __name: "Carousel",
@@ -299,100 +299,100 @@ const C = (e, t) => {
299
299
  }
300
300
  },
301
301
  emits: ["change"],
302
- setup(e, { expose: t, emit: n }) {
303
- const r = e, d = n, c = I(0);
304
- let l = null;
305
- const v = A(() => {
306
- const y = c.value * 100;
307
- return r.direction === "vertical" ? { transform: `translateY(-${y}%)` } : { transform: `translateX(-${y}%)` };
308
- }), f = () => {
302
+ setup(e, { expose: t, emit: o }) {
303
+ const r = e, d = o, c = z(0);
304
+ let s = null;
305
+ const g = I(() => {
306
+ const v = c.value * 100;
307
+ return r.direction === "vertical" ? { transform: `translateY(-${v}%)` } : { transform: `translateX(-${v}%)` };
308
+ }), h = () => {
309
309
  c.value = (c.value + 1) % r.items.length, d("change", c.value);
310
310
  }, p = () => {
311
311
  c.value = (c.value - 1 + r.items.length) % r.items.length, d("change", c.value);
312
- }, i = (y) => {
313
- c.value = y, d("change", c.value);
312
+ }, i = (v) => {
313
+ c.value = v, d("change", c.value);
314
314
  }, u = () => {
315
- r.autoplay && r.items.length > 1 && (l = setInterval(f, r.interval));
316
- }, V = () => {
317
- l && (clearInterval(l), l = null);
315
+ r.autoplay && r.items.length > 1 && (s = setInterval(h, r.interval));
316
+ }, A = () => {
317
+ s && (clearInterval(s), s = null);
318
318
  };
319
- return F(() => {
319
+ return j(() => {
320
320
  u();
321
- }), ee(() => {
322
- V();
321
+ }), q(() => {
322
+ A();
323
323
  }), t({
324
- next: f,
324
+ next: h,
325
325
  prev: p,
326
326
  goTo: i,
327
327
  currentIndex: c
328
- }), (y, k) => (s(), a("div", {
329
- class: $(["ld-carousel", { "ld-carousel--vertical": e.direction === "vertical" }]),
330
- style: x({ height: e.height })
328
+ }), (v, b) => (a(), n("div", {
329
+ class: C(["ld-carousel", { "ld-carousel--vertical": e.direction === "vertical" }]),
330
+ style: w({ height: e.height })
331
331
  }, [
332
- o("div", {
332
+ l("div", {
333
333
  class: "carousel-container",
334
- style: x(v.value)
334
+ style: w(g.value)
335
335
  }, [
336
- (s(!0), a(_, null, B(e.items, (S, M) => (s(), a("div", {
337
- key: M,
338
- class: $(["carousel-slide", { active: M === c.value }])
336
+ (a(!0), n($, null, S(e.items, (M, L) => (a(), n("div", {
337
+ key: L,
338
+ class: C(["carousel-slide", { active: L === c.value }])
339
339
  }, [
340
- z(y.$slots, "item", {
341
- item: S,
342
- index: M
340
+ _(v.$slots, "item", {
341
+ item: M,
342
+ index: L
343
343
  }, () => [
344
- S.image ? (s(), a("img", {
344
+ M.image ? (a(), n("img", {
345
345
  key: 0,
346
- src: S.image,
347
- alt: S.title || ""
348
- }, null, 8, _e)) : g("", !0),
349
- S.title ? (s(), a("div", $e, T(S.title), 1)) : g("", !0)
346
+ src: M.image,
347
+ alt: M.title || ""
348
+ }, null, 8, Ce)) : f("", !0),
349
+ M.title ? (a(), n("div", Se, V(M.title), 1)) : f("", !0)
350
350
  ], !0)
351
351
  ], 2))), 128))
352
352
  ], 4),
353
- e.showIndicators ? (s(), a("div", ze, [
354
- (s(!0), a(_, null, B(e.items, (S, M) => (s(), a("span", {
355
- key: M,
356
- class: $(["indicator", { active: M === c.value }]),
357
- onClick: (O) => i(M)
358
- }, null, 10, Be))), 128))
359
- ])) : g("", !0),
360
- e.showArrows ? (s(), a(_, { key: 1 }, [
361
- o("button", {
353
+ e.showIndicators ? (a(), n("div", Me, [
354
+ (a(!0), n($, null, S(e.items, (M, L) => (a(), n("span", {
355
+ key: L,
356
+ class: C(["indicator", { active: L === c.value }]),
357
+ onClick: (O) => i(L)
358
+ }, null, 10, Le))), 128))
359
+ ])) : f("", !0),
360
+ e.showArrows ? (a(), n($, { key: 1 }, [
361
+ l("button", {
362
362
  class: "carousel-arrow prev",
363
363
  onClick: p
364
364
  }, [
365
- (s(), a("svg", Ce, [
366
- o("path", {
365
+ (a(), n("svg", Te, [
366
+ l("path", {
367
367
  fill: "currentColor",
368
368
  d: e.direction === "vertical" ? "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" : "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"
369
- }, null, 8, Se)
369
+ }, null, 8, Ie)
370
370
  ]))
371
371
  ]),
372
- o("button", {
372
+ l("button", {
373
373
  class: "carousel-arrow next",
374
- onClick: f
374
+ onClick: h
375
375
  }, [
376
- (s(), a("svg", Me, [
377
- o("path", {
376
+ (a(), n("svg", Ve, [
377
+ l("path", {
378
378
  fill: "currentColor",
379
379
  d: e.direction === "vertical" ? "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z" : "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
380
- }, null, 8, Le)
380
+ }, null, 8, Ae)
381
381
  ]))
382
382
  ])
383
- ], 64)) : g("", !0)
383
+ ], 64)) : f("", !0)
384
384
  ], 6));
385
385
  }
386
- }), Te = /* @__PURE__ */ C(Ie, [["__scopeId", "data-v-42bf1623"]]), Ae = {
386
+ }), Oe = /* @__PURE__ */ B(Ee, [["__scopeId", "data-v-42bf1623"]]), je = {
387
387
  key: 1,
388
388
  class: "dots"
389
- }, Ve = {
389
+ }, De = {
390
390
  key: 4,
391
391
  class: "bars"
392
- }, Ee = {
392
+ }, He = {
393
393
  key: 5,
394
394
  class: "loading-text"
395
- }, Oe = /* @__PURE__ */ Object.assign({
395
+ }, Ne = /* @__PURE__ */ Object.assign({
396
396
  name: "Loading"
397
397
  }, {
398
398
  __name: "Loading",
@@ -420,60 +420,60 @@ const C = (e, t) => {
420
420
  }
421
421
  },
422
422
  setup(e) {
423
- const t = e, n = A(() => ({
423
+ const t = e, o = I(() => ({
424
424
  width: t.size,
425
425
  height: t.size,
426
426
  "--spinner-color": t.color
427
- })), r = A(() => ({
427
+ })), r = I(() => ({
428
428
  width: t.size,
429
429
  height: t.size,
430
430
  "--ring-color": t.color
431
431
  }));
432
- return (d, c) => (s(), a("div", {
433
- class: $(["ld-loading", [`ld-loading--${e.type}`, { "ld-loading--fullscreen": e.fullscreen }]])
432
+ return (d, c) => (a(), n("div", {
433
+ class: C(["ld-loading", [`ld-loading--${e.type}`, { "ld-loading--fullscreen": e.fullscreen }]])
434
434
  }, [
435
- e.type === "spinner" ? (s(), a("div", {
435
+ e.type === "spinner" ? (a(), n("div", {
436
436
  key: 0,
437
437
  class: "spinner",
438
- style: x(n.value)
438
+ style: w(o.value)
439
439
  }, [
440
- (s(), a(_, null, B(12, (l) => o("div", {
441
- key: l,
440
+ (a(), n($, null, S(12, (s) => l("div", {
441
+ key: s,
442
442
  class: "spinner-blade"
443
443
  })), 64))
444
- ], 4)) : e.type === "dots" ? (s(), a("div", Ae, [
445
- (s(), a(_, null, B(3, (l) => o("span", {
446
- key: l,
444
+ ], 4)) : e.type === "dots" ? (a(), n("div", je, [
445
+ (a(), n($, null, S(3, (s) => l("span", {
446
+ key: s,
447
447
  class: "dot",
448
- style: x({ background: e.color })
448
+ style: w({ background: e.color })
449
449
  }, null, 4)), 64))
450
- ])) : e.type === "ring" ? (s(), a("div", {
450
+ ])) : e.type === "ring" ? (a(), n("div", {
451
451
  key: 2,
452
452
  class: "ring",
453
- style: x(r.value)
453
+ style: w(r.value)
454
454
  }, [...c[0] || (c[0] = [
455
- o("div", { class: "ring-inner" }, null, -1)
456
- ])], 4)) : e.type === "pulse" ? (s(), a("div", {
455
+ l("div", { class: "ring-inner" }, null, -1)
456
+ ])], 4)) : e.type === "pulse" ? (a(), n("div", {
457
457
  key: 3,
458
458
  class: "pulse",
459
- style: x({ background: e.color, width: e.size, height: e.size })
460
- }, null, 4)) : e.type === "bars" ? (s(), a("div", Ve, [
461
- (s(), a(_, null, B(5, (l) => o("span", {
462
- key: l,
459
+ style: w({ background: e.color, width: e.size, height: e.size })
460
+ }, null, 4)) : e.type === "bars" ? (a(), n("div", De, [
461
+ (a(), n($, null, S(5, (s) => l("span", {
462
+ key: s,
463
463
  class: "bar",
464
- style: x({ background: e.color })
464
+ style: w({ background: e.color })
465
465
  }, null, 4)), 64))
466
- ])) : g("", !0),
467
- e.text ? (s(), a("div", Ee, T(e.text), 1)) : g("", !0)
466
+ ])) : f("", !0),
467
+ e.text ? (a(), n("div", He, V(e.text), 1)) : f("", !0)
468
468
  ], 2));
469
469
  }
470
- }), je = /* @__PURE__ */ C(Oe, [["__scopeId", "data-v-5052ea89"]]), De = {
470
+ }), Pe = /* @__PURE__ */ B(Ne, [["__scopeId", "data-v-5052ea89"]]), Ye = {
471
471
  key: 0,
472
472
  class: "ld-table-loading"
473
- }, He = {
473
+ }, Fe = {
474
474
  key: 0,
475
475
  class: "loading-text"
476
- }, Pe = { class: "ld-table" }, Ne = ["onClick"], Fe = { class: "th-content" }, Ye = { key: 0 }, Re = ["colspan"], Ue = ["onClick"], qe = /* @__PURE__ */ Object.assign({
476
+ }, Re = { class: "ld-table" }, Ue = ["onClick"], qe = { class: "th-content" }, Ge = { key: 0 }, We = ["colspan"], Xe = ["onClick"], Ke = /* @__PURE__ */ Object.assign({
477
477
  name: "ldTable"
478
478
  }, {
479
479
  __name: "Table",
@@ -517,54 +517,54 @@ const C = (e, t) => {
517
517
  }
518
518
  },
519
519
  emits: ["row-click", "load-success", "load-error"],
520
- setup(e, { expose: t, emit: n }) {
521
- const r = e, d = n, c = I(!1), l = I([]), v = A(() => typeof r.api == "function"), f = A(() => r.loading || c.value), p = A(() => v.value ? l.value : r.data), i = async (h = {}) => {
522
- if (v.value) {
520
+ setup(e, { expose: t, emit: o }) {
521
+ const r = e, d = o, c = z(!1), s = z([]), g = I(() => typeof r.api == "function"), h = I(() => r.loading || c.value), p = I(() => g.value ? s.value : r.data), i = async (y = {}) => {
522
+ if (g.value) {
523
523
  c.value = !0;
524
524
  try {
525
- const b = { ...r.loadParams, ...h }, m = await r.api(b);
526
- return l.value = Array.isArray(m) ? m : m?.data || m?.list || [], d("load-success", l.value), l.value;
527
- } catch (b) {
528
- throw console.error("[ld-table] Load error:", b), d("load-error", b), b;
525
+ const k = { ...r.loadParams, ...y }, m = await r.api(k);
526
+ return s.value = Array.isArray(m) ? m : m?.data || m?.list || [], d("load-success", s.value), s.value;
527
+ } catch (k) {
528
+ throw console.error("[ld-table] Load error:", k), d("load-error", k), k;
529
529
  } finally {
530
530
  c.value = !1;
531
531
  }
532
532
  }
533
- }, u = (h = {}) => i(h), V = () => {
534
- l.value = [];
533
+ }, u = (y = {}) => i(y), A = () => {
534
+ s.value = [];
535
535
  };
536
- Y(() => r.loadParams, (h) => {
537
- v.value && r.autoLoad && i();
538
- }, { deep: !0 }), F(() => {
539
- v.value && r.autoLoad && i();
536
+ G(() => r.loadParams, (y) => {
537
+ g.value && r.autoLoad && i();
538
+ }, { deep: !0 }), j(() => {
539
+ g.value && r.autoLoad && i();
540
540
  });
541
- const y = I(""), k = I(""), S = (h) => {
542
- y.value === h ? (k.value = k.value === "asc" ? "desc" : k.value === "desc" ? "" : "asc", k.value || (y.value = "")) : (y.value = h, k.value = "asc");
543
- }, M = (h) => y.value !== h ? "" : k.value === "asc" ? "sort-asc" : k.value === "desc" ? "sort-desc" : "", O = A(() => {
544
- const h = p.value;
545
- return !y.value || !k.value ? h : [...h].sort((b, m) => {
546
- const L = b[y.value], w = m[y.value];
547
- if (typeof L == "number" && typeof w == "number")
548
- return k.value === "asc" ? L - w : w - L;
549
- const H = String(L || ""), P = String(w || "");
550
- return k.value === "asc" ? H.localeCompare(P) : P.localeCompare(H);
541
+ const v = z(""), b = z(""), M = (y) => {
542
+ v.value === y ? (b.value = b.value === "asc" ? "desc" : b.value === "desc" ? "" : "asc", b.value || (v.value = "")) : (v.value = y, b.value = "asc");
543
+ }, L = (y) => v.value !== y ? "" : b.value === "asc" ? "sort-asc" : b.value === "desc" ? "sort-desc" : "", O = I(() => {
544
+ const y = p.value;
545
+ return !v.value || !b.value ? y : [...y].sort((k, m) => {
546
+ const T = k[v.value], x = m[v.value];
547
+ if (typeof T == "number" && typeof x == "number")
548
+ return b.value === "asc" ? T - x : x - T;
549
+ const N = String(T || ""), P = String(x || "");
550
+ return b.value === "asc" ? N.localeCompare(P) : P.localeCompare(N);
551
551
  });
552
552
  });
553
553
  return t({
554
554
  load: i,
555
555
  reload: u,
556
- clear: V,
557
- getData: () => l.value
558
- }), (h, b) => (s(), a("div", {
559
- class: $(["ld-table-wrapper", { "ld-table--bordered": e.bordered, "ld-table--striped": e.striped }])
556
+ clear: A,
557
+ getData: () => s.value
558
+ }), (y, k) => (a(), n("div", {
559
+ class: C(["ld-table-wrapper", { "ld-table--bordered": e.bordered, "ld-table--striped": e.striped }])
560
560
  }, [
561
- f.value ? (s(), a("div", De, [
562
- b[0] || (b[0] = o("div", { class: "loading-spinner" }, [
563
- o("svg", {
561
+ h.value ? (a(), n("div", Ye, [
562
+ k[0] || (k[0] = l("div", { class: "loading-spinner" }, [
563
+ l("svg", {
564
564
  class: "circular",
565
565
  viewBox: "0 0 50 50"
566
566
  }, [
567
- o("circle", {
567
+ l("circle", {
568
568
  class: "path",
569
569
  cx: "25",
570
570
  cy: "25",
@@ -573,76 +573,153 @@ const C = (e, t) => {
573
573
  })
574
574
  ])
575
575
  ], -1)),
576
- e.loadingText ? (s(), a("span", He, T(e.loadingText), 1)) : g("", !0)
577
- ])) : g("", !0),
578
- o("table", Pe, [
579
- o("thead", null, [
580
- o("tr", null, [
581
- (s(!0), a(_, null, B(e.columns, (m) => (s(), a("th", {
576
+ e.loadingText ? (a(), n("span", Fe, V(e.loadingText), 1)) : f("", !0)
577
+ ])) : f("", !0),
578
+ l("table", Re, [
579
+ l("thead", null, [
580
+ l("tr", null, [
581
+ (a(!0), n($, null, S(e.columns, (m) => (a(), n("th", {
582
582
  key: m.key,
583
- style: x({ width: m.width, textAlign: m.align || "left" }),
584
- onClick: (L) => m.sortable && S(m.key)
583
+ style: w({ width: m.width, textAlign: m.align || "left" }),
584
+ onClick: (T) => m.sortable && M(m.key)
585
585
  }, [
586
- o("div", Fe, [
587
- o("span", null, T(m.title), 1),
588
- m.sortable ? (s(), a("span", {
586
+ l("div", qe, [
587
+ l("span", null, V(m.title), 1),
588
+ m.sortable ? (a(), n("span", {
589
589
  key: 0,
590
- class: $(["sort-icon", M(m.key)])
591
- }, [...b[1] || (b[1] = [
592
- o("svg", {
590
+ class: C(["sort-icon", L(m.key)])
591
+ }, [...k[1] || (k[1] = [
592
+ l("svg", {
593
593
  viewBox: "0 0 24 24",
594
594
  width: "14",
595
595
  height: "14"
596
596
  }, [
597
- o("path", {
597
+ l("path", {
598
598
  fill: "currentColor",
599
599
  d: "M7 10l5-5 5 5H7zm0 4l5 5 5-5H7z"
600
600
  })
601
601
  ], -1)
602
- ])], 2)) : g("", !0)
602
+ ])], 2)) : f("", !0)
603
603
  ])
604
- ], 12, Ne))), 128))
604
+ ], 12, Ue))), 128))
605
605
  ])
606
606
  ]),
607
- o("tbody", null, [
608
- !O.value.length && !f.value ? (s(), a("tr", Ye, [
609
- o("td", {
607
+ l("tbody", null, [
608
+ !O.value.length && !h.value ? (a(), n("tr", Ge, [
609
+ l("td", {
610
610
  colspan: e.columns.length,
611
611
  class: "empty-cell"
612
612
  }, [
613
- z(h.$slots, "empty", {}, () => [
614
- b[2] || (b[2] = R('<div class="empty-content" data-v-567f3024><svg viewBox="0 0 64 41" width="64" height="41" data-v-567f3024><g transform="translate(0 1)" fill="none" fill-rule="evenodd" data-v-567f3024><ellipse fill="var(--ld-color-bg-secondary, #f5f5f5)" cx="32" cy="33" rx="32" ry="7" data-v-567f3024></ellipse><g fill-rule="nonzero" stroke="var(--ld-color-border, #d9d9d9)" data-v-567f3024><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z" data-v-567f3024></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="var(--ld-color-bg, #fafafa)" data-v-567f3024></path></g></g></svg><span data-v-567f3024>暂无数据</span></div>', 1))
613
+ _(y.$slots, "empty", {}, () => [
614
+ k[2] || (k[2] = W('<div class="empty-content" data-v-567f3024><svg viewBox="0 0 64 41" width="64" height="41" data-v-567f3024><g transform="translate(0 1)" fill="none" fill-rule="evenodd" data-v-567f3024><ellipse fill="var(--ld-color-bg-secondary, #f5f5f5)" cx="32" cy="33" rx="32" ry="7" data-v-567f3024></ellipse><g fill-rule="nonzero" stroke="var(--ld-color-border, #d9d9d9)" data-v-567f3024><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z" data-v-567f3024></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="var(--ld-color-bg, #fafafa)" data-v-567f3024></path></g></g></svg><span data-v-567f3024>暂无数据</span></div>', 1))
615
615
  ], !0)
616
- ], 8, Re)
617
- ])) : g("", !0),
618
- (s(!0), a(_, null, B(O.value, (m, L) => (s(), a("tr", {
619
- key: L,
620
- onClick: (w) => h.$emit("row-click", m, L)
616
+ ], 8, We)
617
+ ])) : f("", !0),
618
+ (a(!0), n($, null, S(O.value, (m, T) => (a(), n("tr", {
619
+ key: T,
620
+ onClick: (x) => y.$emit("row-click", m, T)
621
621
  }, [
622
- (s(!0), a(_, null, B(e.columns, (w) => (s(), a("td", {
623
- key: w.key,
624
- style: x({ textAlign: w.align || "left" })
622
+ (a(!0), n($, null, S(e.columns, (x) => (a(), n("td", {
623
+ key: x.key,
624
+ style: w({ textAlign: x.align || "left" })
625
625
  }, [
626
- z(h.$slots, w.key, {
626
+ _(y.$slots, x.key, {
627
627
  row: m,
628
- index: L,
629
- value: m[w.key]
628
+ index: T,
629
+ value: m[x.key]
630
630
  }, () => [
631
- U(T(m[w.key]), 1)
631
+ X(V(m[x.key]), 1)
632
632
  ], !0)
633
633
  ], 4))), 128))
634
- ], 8, Ue))), 128))
634
+ ], 8, Xe))), 128))
635
635
  ])
636
636
  ])
637
637
  ], 2));
638
638
  }
639
- }), Ge = /* @__PURE__ */ C(qe, [["__scopeId", "data-v-567f3024"]]);
640
- I([]);
641
- let We = 0;
642
- const Xe = (e) => {
643
- const t = ++We, n = e.type || "info", r = e.content || "", d = e.duration ?? 3e3, c = e.closable ?? !1, l = document.createElement("div");
644
- l.className = `ld-message ld-message--${n}`, l.setAttribute("data-id", t);
645
- let f = `${{
639
+ }), Je = /* @__PURE__ */ B(Ke, [["__scopeId", "data-v-567f3024"]]), Qe = {
640
+ __name: "Backtop",
641
+ props: {
642
+ // 滚动高度达到此参数值才出现
643
+ visibilityHeight: {
644
+ type: Number,
645
+ default: 200
646
+ },
647
+ // 距离页面右边距
648
+ right: {
649
+ type: Number,
650
+ default: 40
651
+ },
652
+ // 距离页面底部距离
653
+ bottom: {
654
+ type: Number,
655
+ default: 40
656
+ },
657
+ // 触发滚动的对象
658
+ target: {
659
+ type: String,
660
+ default: ""
661
+ }
662
+ },
663
+ emits: ["click"],
664
+ setup(e, { expose: t, emit: o }) {
665
+ const r = e, d = o, c = z(!1), s = Y(null);
666
+ Y(null);
667
+ const g = I(() => ({
668
+ right: `${r.right}px`,
669
+ bottom: `${r.bottom}px`
670
+ })), h = () => r.target ? document.querySelector(r.target) ?? window : window, p = () => s.value === window ? window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0 : s.value?.scrollTop ?? 0, i = () => {
671
+ c.value = p() >= r.visibilityHeight;
672
+ }, u = (v) => {
673
+ A(), d("click", v);
674
+ }, A = () => {
675
+ s.value && (s.value === window ? window.scrollTo({
676
+ top: 0,
677
+ behavior: "smooth"
678
+ }) : s.value.scrollTo({
679
+ top: 0,
680
+ behavior: "smooth"
681
+ }));
682
+ };
683
+ return j(() => {
684
+ s.value = h(), s.value && (s.value.addEventListener("scroll", i, { passive: !0 }), i());
685
+ }), q(() => {
686
+ s.value && s.value.removeEventListener("scroll", i);
687
+ }), t({
688
+ scrollToTop: A
689
+ }), (v, b) => (a(), R(se, { name: "ld-backtop-fade" }, {
690
+ default: U(() => [
691
+ ae(l("div", {
692
+ class: "ld-backtop",
693
+ style: w(g.value),
694
+ onClick: u
695
+ }, [
696
+ _(v.$slots, "default", {}, () => [
697
+ b[0] || (b[0] = l("svg", {
698
+ class: "ld-backtop-icon",
699
+ viewBox: "0 0 24 24",
700
+ width: "20",
701
+ height: "20"
702
+ }, [
703
+ l("path", {
704
+ fill: "currentColor",
705
+ d: "M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"
706
+ })
707
+ ], -1))
708
+ ], !0)
709
+ ], 4), [
710
+ [oe, c.value]
711
+ ])
712
+ ]),
713
+ _: 3
714
+ }));
715
+ }
716
+ }, Ze = /* @__PURE__ */ B(Qe, [["__scopeId", "data-v-e2cc7059"]]);
717
+ z([]);
718
+ let et = 0;
719
+ const tt = (e) => {
720
+ const t = ++et, o = e.type || "info", r = e.content || "", d = e.duration ?? 3e3, c = e.closable ?? !1, s = document.createElement("div");
721
+ s.className = `ld-message ld-message--${o}`, s.setAttribute("data-id", t);
722
+ let h = `${{
646
723
  success: `<svg class="ld-message-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
647
724
  <path d="M20 6L9 17l-5-5" stroke-linecap="round" stroke-linejoin="round"/>
648
725
  </svg>`,
@@ -656,13 +733,13 @@ const Xe = (e) => {
656
733
  info: `<svg class="ld-message-icon" viewBox="0 0 24 24" fill="currentColor">
657
734
  <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>
658
735
  </svg>`
659
- }[n]}<span class="ld-message-content">${r}</span>`;
660
- return c && (f += `<button class="ld-message-close" onclick="window.__ldMessageClose(${t})">
736
+ }[o]}<span class="ld-message-content">${r}</span>`;
737
+ return c && (h += `<button class="ld-message-close" onclick="window.__ldMessageClose(${t})">
661
738
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
662
739
  <path d="M18 6L6 18M6 6l12 12"/>
663
740
  </svg>
664
- </button>`), l.innerHTML = f, { id: t, element: l, duration: d };
665
- }, Ke = () => {
741
+ </button>`), s.innerHTML = h, { id: t, element: s, duration: d };
742
+ }, st = () => {
666
743
  let e = document.getElementById("ld-message-root");
667
744
  if (!e) {
668
745
  e = document.createElement("div"), e.id = "ld-message-root", document.body.appendChild(e);
@@ -731,50 +808,50 @@ const Xe = (e) => {
731
808
  `, document.head.appendChild(t);
732
809
  }
733
810
  return e;
734
- }, j = (e) => {
811
+ }, D = (e) => {
735
812
  const t = document.getElementById("ld-message-root");
736
813
  if (!t) return;
737
- const n = t.querySelector(`[data-id="${e}"]`);
738
- n && (n.classList.add("ld-message--closing"), setTimeout(() => {
739
- n.remove();
814
+ const o = t.querySelector(`[data-id="${e}"]`);
815
+ o && (o.classList.add("ld-message--closing"), setTimeout(() => {
816
+ o.remove();
740
817
  }, 200));
741
818
  };
742
- typeof window < "u" && (window.__ldMessageClose = j);
819
+ typeof window < "u" && (window.__ldMessageClose = D);
743
820
  const E = (e) => {
744
- const t = Ke(), { id: n, element: r, duration: d } = Xe(e);
821
+ const t = st(), { id: o, element: r, duration: d } = tt(e);
745
822
  return t.appendChild(r), d > 0 && setTimeout(() => {
746
- j(n);
747
- }, d), n;
748
- }, N = {
823
+ D(o);
824
+ }, d), o;
825
+ }, F = {
749
826
  success: (e, t = {}) => E({ ...t, type: "success", content: e }),
750
827
  warning: (e, t = {}) => E({ ...t, type: "warning", content: e }),
751
828
  error: (e, t = {}) => E({ ...t, type: "error", content: e }),
752
829
  info: (e, t = {}) => E({ ...t, type: "info", content: e }),
753
- close: j,
830
+ close: D,
754
831
  closeAll: () => {
755
832
  const e = document.getElementById("ld-message-root");
756
833
  e && (e.innerHTML = "");
757
834
  }
758
- }, Je = { class: "lzbutton-wrapper" }, Qe = { class: "button" }, Ze = /* @__PURE__ */ Object.assign({
835
+ }, at = { class: "lzbutton-wrapper" }, ot = { class: "button" }, nt = /* @__PURE__ */ Object.assign({
759
836
  name: "Lzbutton"
760
837
  }, {
761
838
  __name: "lzbutton",
762
839
  setup(e) {
763
- return (t, n) => (s(), a("div", Je, [
764
- o("button", Qe, [
765
- n[1] || (n[1] = o("svg", {
840
+ return (t, o) => (a(), n("div", at, [
841
+ l("button", ot, [
842
+ o[1] || (o[1] = l("svg", {
766
843
  xmlns: "http://www.w3.org/2000/svg",
767
844
  viewBox: "0 0 36 24"
768
845
  }, [
769
- o("path", { d: "m18 0 8 12 10-8-4 20H4L0 4l10 8 8-12z" })
846
+ l("path", { d: "m18 0 8 12 10-8-4 20H4L0 4l10 8 8-12z" })
770
847
  ], -1)),
771
- z(t.$slots, "default", {}, () => [
772
- n[0] || (n[0] = U("Unlock Pro", -1))
848
+ _(t.$slots, "default", {}, () => [
849
+ o[0] || (o[0] = X("Unlock Pro", -1))
773
850
  ], !0)
774
851
  ])
775
852
  ]));
776
853
  }
777
- }), et = /* @__PURE__ */ C(Ze, [["__scopeId", "data-v-7124b716"]]), tt = { class: "Lztext-wrapper" }, st = { class: "loader-wrapper" }, at = /* @__PURE__ */ Object.assign({
854
+ }), lt = /* @__PURE__ */ B(nt, [["__scopeId", "data-v-7124b716"]]), rt = { class: "Lztext-wrapper" }, it = { class: "loader-wrapper" }, ct = /* @__PURE__ */ Object.assign({
778
855
  name: "Lztext"
779
856
  }, {
780
857
  __name: "Lztext",
@@ -788,19 +865,19 @@ const E = (e) => {
788
865
  }
789
866
  },
790
867
  setup(e) {
791
- const t = e, n = A(() => t.text.split(""));
792
- return (r, d) => (s(), a("div", tt, [
793
- o("div", st, [
794
- (s(!0), a(_, null, B(n.value, (c, l) => (s(), a("span", {
795
- key: l,
868
+ const t = e, o = I(() => t.text.split(""));
869
+ return (r, d) => (a(), n("div", rt, [
870
+ l("div", it, [
871
+ (a(!0), n($, null, S(o.value, (c, s) => (a(), n("span", {
872
+ key: s,
796
873
  class: "loader-letter",
797
- style: x({ animationDelay: `${0.1 + l * 0.105}s` })
798
- }, T(c === " " ? " " : c), 5))), 128)),
799
- d[0] || (d[0] = o("div", { class: "loader" }, null, -1))
874
+ style: w({ animationDelay: `${0.1 + s * 0.105}s` })
875
+ }, V(c === " " ? " " : c), 5))), 128)),
876
+ d[0] || (d[0] = l("div", { class: "loader" }, null, -1))
800
877
  ])
801
878
  ]));
802
879
  }
803
- }), nt = /* @__PURE__ */ C(at, [["__scopeId", "data-v-2cca50b0"]]), ot = { class: "lztheme-wrapper" }, lt = { class: "theme__toggle-wrap" }, rt = ["checked"], it = /* @__PURE__ */ Object.assign({
880
+ }), dt = /* @__PURE__ */ B(ct, [["__scopeId", "data-v-2cca50b0"]]), ut = { class: "lztheme-wrapper" }, pt = { class: "theme__toggle-wrap" }, mt = ["checked"], gt = /* @__PURE__ */ Object.assign({
804
881
  name: "Lztheme"
805
882
  }, {
806
883
  __name: "lztheme",
@@ -812,51 +889,51 @@ const E = (e) => {
812
889
  }
813
890
  },
814
891
  emits: ["update:modelValue", "change"],
815
- setup(e, { expose: t, emit: n }) {
892
+ setup(e, { expose: t, emit: o }) {
816
893
  let r = 0;
817
- const d = `lztheme-toggle-${++r}-${Date.now()}`, c = e, l = n, v = I(null), f = I(c.modelValue);
818
- Y(() => c.modelValue, (i) => {
819
- f.value = i;
894
+ const d = `lztheme-toggle-${++r}-${Date.now()}`, c = e, s = o, g = z(null), h = z(c.modelValue);
895
+ G(() => c.modelValue, (i) => {
896
+ h.value = i;
820
897
  });
821
898
  const p = (i) => {
822
899
  const u = i.target.checked;
823
- f.value = u, l("update:modelValue", u), l("change", u);
900
+ h.value = u, s("update:modelValue", u), s("change", u);
824
901
  };
825
902
  return t({
826
903
  toggle: () => {
827
- v.value && v.value.click();
904
+ g.value && g.value.click();
828
905
  },
829
906
  setDark: (i) => {
830
- f.value = i, l("update:modelValue", i), l("change", i);
907
+ h.value = i, s("update:modelValue", i), s("change", i);
831
908
  }
832
- }), (i, u) => (s(), a("div", ot, [
833
- o("label", {
909
+ }), (i, u) => (a(), n("div", ut, [
910
+ l("label", {
834
911
  for: d,
835
912
  class: "theme"
836
913
  }, [
837
- o("span", lt, [
838
- o("input", {
914
+ l("span", pt, [
915
+ l("input", {
839
916
  id: d,
840
917
  ref_key: "toggleRef",
841
- ref: v,
918
+ ref: g,
842
919
  class: "theme__toggle",
843
920
  type: "checkbox",
844
921
  role: "switch",
845
922
  name: "theme",
846
923
  value: "dark",
847
- checked: f.value,
924
+ checked: h.value,
848
925
  onChange: p
849
- }, null, 40, rt),
850
- u[0] || (u[0] = R('<span class="theme__icon" data-v-e887d581><span class="theme__icon-part" data-v-e887d581></span><span class="theme__icon-part" data-v-e887d581></span><span class="theme__icon-part" data-v-e887d581></span><span class="theme__icon-part" data-v-e887d581></span><span class="theme__icon-part" data-v-e887d581></span><span class="theme__icon-part" data-v-e887d581></span><span class="theme__icon-part" data-v-e887d581></span><span class="theme__icon-part" data-v-e887d581></span><span class="theme__icon-part" data-v-e887d581></span></span>', 1))
926
+ }, null, 40, mt),
927
+ u[0] || (u[0] = W('<span class="theme__icon" data-v-e887d581><span class="theme__icon-part" data-v-e887d581></span><span class="theme__icon-part" data-v-e887d581></span><span class="theme__icon-part" data-v-e887d581></span><span class="theme__icon-part" data-v-e887d581></span><span class="theme__icon-part" data-v-e887d581></span><span class="theme__icon-part" data-v-e887d581></span><span class="theme__icon-part" data-v-e887d581></span><span class="theme__icon-part" data-v-e887d581></span><span class="theme__icon-part" data-v-e887d581></span></span>', 1))
851
928
  ])
852
929
  ])
853
930
  ]));
854
931
  }
855
- }), ct = /* @__PURE__ */ C(it, [["__scopeId", "data-v-e887d581"]]), dt = {
856
- Lzbutton: et,
857
- Lztext: nt,
858
- Lztheme: ct
859
- }, ut = {
932
+ }), vt = /* @__PURE__ */ B(gt, [["__scopeId", "data-v-e887d581"]]), ht = {
933
+ Lzbutton: lt,
934
+ Lztext: dt,
935
+ Lztheme: vt
936
+ }, ft = {
860
937
  name: "Button",
861
938
  type: "vue",
862
939
  label: "Button 按钮",
@@ -870,7 +947,7 @@ const E = (e) => {
870
947
  <script setup>
871
948
  import { Button } from 'little-dizzy'
872
949
  <\/script>`
873
- }, pt = {
950
+ }, yt = {
874
951
  name: "Card",
875
952
  type: "vue",
876
953
  label: "Card 卡片",
@@ -890,7 +967,7 @@ import { Button } from 'little-dizzy'
890
967
  <script setup>
891
968
  import { Card, Button } from 'little-dizzy'
892
969
  <\/script>`
893
- }, mt = {
970
+ }, bt = {
894
971
  name: "Modal",
895
972
  type: "vue",
896
973
  label: "Modal 模态框",
@@ -915,7 +992,7 @@ import { Modal, Button } from 'little-dizzy'
915
992
 
916
993
  const visible = ref(false)
917
994
  <\/script>`
918
- }, gt = {
995
+ }, kt = {
919
996
  name: "Message",
920
997
  type: "vue",
921
998
  label: "Message 消息提示",
@@ -955,7 +1032,7 @@ const showInfo = () => {
955
1032
  flex-wrap: wrap;
956
1033
  }
957
1034
  </style>`
958
- }, vt = {
1035
+ }, wt = {
959
1036
  name: "Carousel",
960
1037
  type: "vue",
961
1038
  label: "Carousel 轮播图",
@@ -972,7 +1049,7 @@ const items = [
972
1049
  { image: 'https://picsum.photos/800/300?random=3', title: '图片 3' }
973
1050
  ]
974
1051
  <\/script>`
975
- }, ht = {
1052
+ }, xt = {
976
1053
  name: "Loading",
977
1054
  type: "vue",
978
1055
  label: "Loading 加载",
@@ -987,7 +1064,7 @@ const items = [
987
1064
  <script setup>
988
1065
  import { Loading } from 'little-dizzy'
989
1066
  <\/script>`
990
- }, ft = {
1067
+ }, _t = {
991
1068
  name: "Table",
992
1069
  type: "vue",
993
1070
  label: "Table 表格",
@@ -1010,7 +1087,7 @@ const data = [
1010
1087
  { name: '王五', age: 25, address: '广州市天河区' }
1011
1088
  ]
1012
1089
  <\/script>`
1013
- }, yt = {
1090
+ }, $t = {
1014
1091
  name: "Backtop",
1015
1092
  type: "vue",
1016
1093
  label: "Backtop 回到顶部",
@@ -1030,18 +1107,18 @@ const data = [
1030
1107
  <script setup>
1031
1108
  import { Backtop } from 'little-dizzy'
1032
1109
  <\/script>`
1033
- }, bt = [
1034
- ut,
1035
- pt,
1036
- mt,
1037
- gt,
1038
- vt,
1039
- ht,
1110
+ }, Bt = [
1040
1111
  ft,
1041
- yt
1042
- ], D = /* @__PURE__ */ new Map();
1043
- function q(e) {
1044
- return !e || !e.name ? (console.warn("[LittleDizzy] Snippet must have a name property"), !1) : (D.set(e.name, {
1112
+ yt,
1113
+ bt,
1114
+ kt,
1115
+ wt,
1116
+ xt,
1117
+ _t,
1118
+ $t
1119
+ ], H = /* @__PURE__ */ new Map();
1120
+ function K(e) {
1121
+ return !e || !e.name ? (console.warn("[LittleDizzy] Snippet must have a name property"), !1) : (H.set(e.name, {
1045
1122
  name: e.name,
1046
1123
  type: e.type || "html",
1047
1124
  label: e.label || e.name,
@@ -1050,57 +1127,59 @@ function q(e) {
1050
1127
  ...e
1051
1128
  }), !0);
1052
1129
  }
1053
- function G(e) {
1130
+ function J(e) {
1054
1131
  if (!Array.isArray(e))
1055
1132
  return console.warn("[LittleDizzy] registerSnippets expects an array"), 0;
1056
1133
  let t = 0;
1057
- return e.forEach((n) => {
1058
- q(n) && t++;
1134
+ return e.forEach((o) => {
1135
+ K(o) && t++;
1059
1136
  }), t;
1060
1137
  }
1061
- function kt() {
1138
+ function zt() {
1062
1139
  const e = {};
1063
- return D.forEach((t, n) => {
1064
- e[n] = t;
1140
+ return H.forEach((t, o) => {
1141
+ e[o] = t;
1065
1142
  }), e;
1066
1143
  }
1067
- function wt(e) {
1068
- return D.get(e);
1144
+ function Ct(e) {
1145
+ return H.get(e);
1069
1146
  }
1070
- G(bt);
1071
- const W = {
1072
- Button: ae,
1073
- Card: ce,
1074
- Modal: fe,
1075
- Message: xe,
1076
- Carousel: Te,
1077
- Loading: je,
1078
- Table: Ge,
1079
- ...dt
1080
- }, xt = (e, t = {}) => {
1081
- Object.entries(W).forEach(([n, r]) => {
1082
- e.component(t.prefix ? `${t.prefix}${n}` : n, r);
1083
- }), e.config.globalProperties.$message = N, e.provide("message", N);
1084
- }, $t = kt, zt = q, Bt = G, Ct = wt, St = {
1085
- install: xt,
1086
- ...W
1147
+ J(Bt);
1148
+ const Q = {
1149
+ Button: re,
1150
+ Card: me,
1151
+ Modal: we,
1152
+ Message: ze,
1153
+ Carousel: Oe,
1154
+ Loading: Pe,
1155
+ Table: Je,
1156
+ Backtop: Ze,
1157
+ ...ht
1158
+ }, St = (e, t = {}) => {
1159
+ Object.entries(Q).forEach(([o, r]) => {
1160
+ e.component(t.prefix ? `${t.prefix}${o}` : o, r);
1161
+ }), e.config.globalProperties.$message = F, e.provide("message", F);
1162
+ }, Lt = zt, Tt = K, It = J, Vt = Ct, At = {
1163
+ install: St,
1164
+ ...Q
1087
1165
  };
1088
1166
  export {
1089
- ae as Button,
1090
- ce as Card,
1091
- Te as Carousel,
1092
- je as Loading,
1093
- et as Lzbutton,
1094
- nt as Lztext,
1095
- ct as Lztheme,
1096
- xe as Message,
1097
- fe as Modal,
1098
- Ge as Table,
1099
- dt as customComponents,
1100
- St as default,
1101
- Ct as getSnippet,
1102
- N as message,
1103
- zt as registerSnippet,
1104
- Bt as registerSnippets,
1105
- $t as snippets
1167
+ Ze as Backtop,
1168
+ re as Button,
1169
+ me as Card,
1170
+ Oe as Carousel,
1171
+ Pe as Loading,
1172
+ lt as Lzbutton,
1173
+ dt as Lztext,
1174
+ vt as Lztheme,
1175
+ ze as Message,
1176
+ we as Modal,
1177
+ Je as Table,
1178
+ ht as customComponents,
1179
+ At as default,
1180
+ Vt as getSnippet,
1181
+ F as message,
1182
+ Tt as registerSnippet,
1183
+ It as registerSnippets,
1184
+ Lt as snippets
1106
1185
  };