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.
- package/dist/little-dizzy.css +1 -1
- package/dist/little-dizzy.js +427 -348
- package/dist/little-dizzy.umd.cjs +6 -6
- package/package.json +3 -3
- package/src/index.js +3 -1
package/dist/little-dizzy.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
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
|
-
|
|
6
|
-
return
|
|
7
|
-
},
|
|
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 (
|
|
36
|
-
class:
|
|
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) =>
|
|
43
|
+
onClick: r[0] || (r[0] = (d) => o.$emit("click", d))
|
|
44
44
|
}, [
|
|
45
|
-
|
|
46
|
-
], 10,
|
|
45
|
+
_(o.$slots, "default", {}, void 0, !0)
|
|
46
|
+
], 10, ne));
|
|
47
47
|
}
|
|
48
|
-
},
|
|
48
|
+
}, re = /* @__PURE__ */ B(le, [["__scopeId", "data-v-75f082b2"]]), ie = {
|
|
49
49
|
key: 0,
|
|
50
50
|
class: "card-header"
|
|
51
|
-
},
|
|
51
|
+
}, ce = {
|
|
52
52
|
key: 0,
|
|
53
53
|
class: "card-header-title"
|
|
54
|
-
},
|
|
54
|
+
}, de = { class: "card-body" }, ue = {
|
|
55
55
|
key: 1,
|
|
56
56
|
class: "card-footer"
|
|
57
|
-
},
|
|
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,
|
|
73
|
-
class:
|
|
72
|
+
return (t, o) => (a(), n("div", {
|
|
73
|
+
class: C(["card", { "card-shadow": e.shadow }])
|
|
74
74
|
}, [
|
|
75
|
-
t.$slots.header || e.title ? (
|
|
76
|
-
e.title ? (
|
|
77
|
-
|
|
78
|
-
])) :
|
|
79
|
-
|
|
80
|
-
|
|
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 ? (
|
|
83
|
-
|
|
84
|
-
])) :
|
|
82
|
+
t.$slots.footer ? (a(), n("div", ue, [
|
|
83
|
+
_(t.$slots, "footer", {}, void 0, !0)
|
|
84
|
+
])) : f("", !0)
|
|
85
85
|
], 2));
|
|
86
86
|
}
|
|
87
|
-
},
|
|
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
|
-
},
|
|
90
|
+
}, fe = { class: "modal-body" }, ye = {
|
|
91
91
|
key: 0,
|
|
92
92
|
class: "modal-footer"
|
|
93
|
-
},
|
|
93
|
+
}, be = {
|
|
94
94
|
key: 1,
|
|
95
95
|
class: "modal-footer"
|
|
96
|
-
},
|
|
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
|
|
122
|
-
|
|
121
|
+
const o = t, r = () => {
|
|
122
|
+
o("close");
|
|
123
123
|
}, d = () => {
|
|
124
|
-
|
|
124
|
+
o("cancel");
|
|
125
125
|
}, c = () => {
|
|
126
|
-
|
|
126
|
+
o("confirm");
|
|
127
127
|
};
|
|
128
|
-
return (
|
|
128
|
+
return (s, g) => e.visible ? (a(), n("div", {
|
|
129
129
|
key: 0,
|
|
130
|
-
class:
|
|
130
|
+
class: C(["modal", { "modal-show": e.visible }])
|
|
131
131
|
}, [
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
l("div", ge, [
|
|
133
|
+
l("div", {
|
|
134
134
|
class: "modal-content",
|
|
135
|
-
style:
|
|
135
|
+
style: w({ width: e.width })
|
|
136
136
|
}, [
|
|
137
|
-
|
|
138
|
-
e.title ? (
|
|
139
|
-
|
|
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
|
-
|
|
145
|
-
|
|
144
|
+
l("div", fe, [
|
|
145
|
+
_(s.$slots, "default", {}, void 0, !0)
|
|
146
146
|
]),
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
])) : e.showFooter ? (
|
|
150
|
-
|
|
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
|
-
|
|
154
|
+
l("button", {
|
|
155
155
|
class: "btn btn-primary",
|
|
156
156
|
onClick: c
|
|
157
157
|
}, "确定")
|
|
158
|
-
])) :
|
|
158
|
+
])) : f("", !0)
|
|
159
159
|
], 4)
|
|
160
160
|
])
|
|
161
|
-
], 2)) :
|
|
161
|
+
], 2)) : f("", !0);
|
|
162
162
|
}
|
|
163
|
-
},
|
|
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
|
|
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
|
|
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
|
|
198
|
-
|
|
197
|
+
return o.value.push(u), u.duration > 0 && setTimeout(() => {
|
|
198
|
+
g(i);
|
|
199
199
|
}, u.duration), i;
|
|
200
|
-
},
|
|
201
|
-
const i =
|
|
202
|
-
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:
|
|
206
|
-
removeMessage:
|
|
205
|
+
addMessage: s,
|
|
206
|
+
removeMessage: g,
|
|
207
207
|
clearAll: () => {
|
|
208
|
-
|
|
208
|
+
o.value = [];
|
|
209
209
|
},
|
|
210
210
|
// Shorthand methods
|
|
211
|
-
success: (p, i = {}) =>
|
|
212
|
-
warning: (p, i = {}) =>
|
|
213
|
-
error: (p, i = {}) =>
|
|
214
|
-
info: (p, i = {}) =>
|
|
215
|
-
}), (p, i) => (
|
|
216
|
-
|
|
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:
|
|
222
|
-
(
|
|
221
|
+
default: U(() => [
|
|
222
|
+
(a(!0), n($, null, S(o.value, (u) => (a(), n("div", {
|
|
223
223
|
key: u.id,
|
|
224
|
-
class:
|
|
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
|
-
|
|
226
|
+
l("span", {
|
|
227
227
|
class: "flex-shrink-0",
|
|
228
228
|
innerHTML: d[u.type]
|
|
229
|
-
}, null, 8,
|
|
230
|
-
|
|
231
|
-
u.closable ? (
|
|
229
|
+
}, null, 8, xe),
|
|
230
|
+
l("span", _e, V(u.content), 1),
|
|
231
|
+
u.closable ? (a(), n("button", {
|
|
232
232
|
key: 0,
|
|
233
|
-
onClick: (
|
|
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
|
-
|
|
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
|
-
|
|
243
|
+
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
244
244
|
], -1)
|
|
245
|
-
])], 8,
|
|
245
|
+
])], 8, $e)) : f("", !0)
|
|
246
246
|
], 2))), 128))
|
|
247
247
|
]),
|
|
248
248
|
_: 1
|
|
249
249
|
})
|
|
250
250
|
]));
|
|
251
251
|
}
|
|
252
|
-
}),
|
|
252
|
+
}), ze = /* @__PURE__ */ B(Be, [["__scopeId", "data-v-d727fd6c"]]), Ce = ["src", "alt"], Se = {
|
|
253
253
|
key: 1,
|
|
254
254
|
class: "slide-title"
|
|
255
|
-
},
|
|
255
|
+
}, Me = {
|
|
256
256
|
key: 0,
|
|
257
257
|
class: "carousel-indicators"
|
|
258
|
-
},
|
|
258
|
+
}, Le = ["onClick"], Te = {
|
|
259
259
|
viewBox: "0 0 24 24",
|
|
260
260
|
width: "24",
|
|
261
261
|
height: "24"
|
|
262
|
-
},
|
|
262
|
+
}, Ie = ["d"], Ve = {
|
|
263
263
|
viewBox: "0 0 24 24",
|
|
264
264
|
width: "24",
|
|
265
265
|
height: "24"
|
|
266
|
-
},
|
|
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:
|
|
303
|
-
const r = e, d =
|
|
304
|
-
let
|
|
305
|
-
const
|
|
306
|
-
const
|
|
307
|
-
return r.direction === "vertical" ? { transform: `translateY(-${
|
|
308
|
-
}),
|
|
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 = (
|
|
313
|
-
c.value =
|
|
312
|
+
}, i = (v) => {
|
|
313
|
+
c.value = v, d("change", c.value);
|
|
314
314
|
}, u = () => {
|
|
315
|
-
r.autoplay && r.items.length > 1 && (
|
|
316
|
-
},
|
|
317
|
-
|
|
315
|
+
r.autoplay && r.items.length > 1 && (s = setInterval(h, r.interval));
|
|
316
|
+
}, A = () => {
|
|
317
|
+
s && (clearInterval(s), s = null);
|
|
318
318
|
};
|
|
319
|
-
return
|
|
319
|
+
return j(() => {
|
|
320
320
|
u();
|
|
321
|
-
}),
|
|
322
|
-
|
|
321
|
+
}), q(() => {
|
|
322
|
+
A();
|
|
323
323
|
}), t({
|
|
324
|
-
next:
|
|
324
|
+
next: h,
|
|
325
325
|
prev: p,
|
|
326
326
|
goTo: i,
|
|
327
327
|
currentIndex: c
|
|
328
|
-
}), (
|
|
329
|
-
class:
|
|
330
|
-
style:
|
|
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
|
-
|
|
332
|
+
l("div", {
|
|
333
333
|
class: "carousel-container",
|
|
334
|
-
style:
|
|
334
|
+
style: w(g.value)
|
|
335
335
|
}, [
|
|
336
|
-
(
|
|
337
|
-
key:
|
|
338
|
-
class:
|
|
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
|
-
|
|
341
|
-
item:
|
|
342
|
-
index:
|
|
340
|
+
_(v.$slots, "item", {
|
|
341
|
+
item: M,
|
|
342
|
+
index: L
|
|
343
343
|
}, () => [
|
|
344
|
-
|
|
344
|
+
M.image ? (a(), n("img", {
|
|
345
345
|
key: 0,
|
|
346
|
-
src:
|
|
347
|
-
alt:
|
|
348
|
-
}, null, 8,
|
|
349
|
-
|
|
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 ? (
|
|
354
|
-
(
|
|
355
|
-
key:
|
|
356
|
-
class:
|
|
357
|
-
onClick: (O) => i(
|
|
358
|
-
}, null, 10,
|
|
359
|
-
])) :
|
|
360
|
-
e.showArrows ? (
|
|
361
|
-
|
|
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
|
-
(
|
|
366
|
-
|
|
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,
|
|
369
|
+
}, null, 8, Ie)
|
|
370
370
|
]))
|
|
371
371
|
]),
|
|
372
|
-
|
|
372
|
+
l("button", {
|
|
373
373
|
class: "carousel-arrow next",
|
|
374
|
-
onClick:
|
|
374
|
+
onClick: h
|
|
375
375
|
}, [
|
|
376
|
-
(
|
|
377
|
-
|
|
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,
|
|
380
|
+
}, null, 8, Ae)
|
|
381
381
|
]))
|
|
382
382
|
])
|
|
383
|
-
], 64)) :
|
|
383
|
+
], 64)) : f("", !0)
|
|
384
384
|
], 6));
|
|
385
385
|
}
|
|
386
|
-
}),
|
|
386
|
+
}), Oe = /* @__PURE__ */ B(Ee, [["__scopeId", "data-v-42bf1623"]]), je = {
|
|
387
387
|
key: 1,
|
|
388
388
|
class: "dots"
|
|
389
|
-
},
|
|
389
|
+
}, De = {
|
|
390
390
|
key: 4,
|
|
391
391
|
class: "bars"
|
|
392
|
-
},
|
|
392
|
+
}, He = {
|
|
393
393
|
key: 5,
|
|
394
394
|
class: "loading-text"
|
|
395
|
-
},
|
|
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,
|
|
423
|
+
const t = e, o = I(() => ({
|
|
424
424
|
width: t.size,
|
|
425
425
|
height: t.size,
|
|
426
426
|
"--spinner-color": t.color
|
|
427
|
-
})), r =
|
|
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) => (
|
|
433
|
-
class:
|
|
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" ? (
|
|
435
|
+
e.type === "spinner" ? (a(), n("div", {
|
|
436
436
|
key: 0,
|
|
437
437
|
class: "spinner",
|
|
438
|
-
style:
|
|
438
|
+
style: w(o.value)
|
|
439
439
|
}, [
|
|
440
|
-
(
|
|
441
|
-
key:
|
|
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" ? (
|
|
445
|
-
(
|
|
446
|
-
key:
|
|
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:
|
|
448
|
+
style: w({ background: e.color })
|
|
449
449
|
}, null, 4)), 64))
|
|
450
|
-
])) : e.type === "ring" ? (
|
|
450
|
+
])) : e.type === "ring" ? (a(), n("div", {
|
|
451
451
|
key: 2,
|
|
452
452
|
class: "ring",
|
|
453
|
-
style:
|
|
453
|
+
style: w(r.value)
|
|
454
454
|
}, [...c[0] || (c[0] = [
|
|
455
|
-
|
|
456
|
-
])], 4)) : e.type === "pulse" ? (
|
|
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:
|
|
460
|
-
}, null, 4)) : e.type === "bars" ? (
|
|
461
|
-
(
|
|
462
|
-
key:
|
|
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:
|
|
464
|
+
style: w({ background: e.color })
|
|
465
465
|
}, null, 4)), 64))
|
|
466
|
-
])) :
|
|
467
|
-
e.text ? (
|
|
466
|
+
])) : f("", !0),
|
|
467
|
+
e.text ? (a(), n("div", He, V(e.text), 1)) : f("", !0)
|
|
468
468
|
], 2));
|
|
469
469
|
}
|
|
470
|
-
}),
|
|
470
|
+
}), Pe = /* @__PURE__ */ B(Ne, [["__scopeId", "data-v-5052ea89"]]), Ye = {
|
|
471
471
|
key: 0,
|
|
472
472
|
class: "ld-table-loading"
|
|
473
|
-
},
|
|
473
|
+
}, Fe = {
|
|
474
474
|
key: 0,
|
|
475
475
|
class: "loading-text"
|
|
476
|
-
},
|
|
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:
|
|
521
|
-
const r = e, d =
|
|
522
|
-
if (
|
|
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
|
|
526
|
-
return
|
|
527
|
-
} catch (
|
|
528
|
-
throw console.error("[ld-table] Load error:",
|
|
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 = (
|
|
534
|
-
|
|
533
|
+
}, u = (y = {}) => i(y), A = () => {
|
|
534
|
+
s.value = [];
|
|
535
535
|
};
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
}, { deep: !0 }),
|
|
539
|
-
|
|
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
|
|
542
|
-
|
|
543
|
-
},
|
|
544
|
-
const
|
|
545
|
-
return !
|
|
546
|
-
const
|
|
547
|
-
if (typeof
|
|
548
|
-
return
|
|
549
|
-
const
|
|
550
|
-
return
|
|
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:
|
|
557
|
-
getData: () =>
|
|
558
|
-
}), (
|
|
559
|
-
class:
|
|
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
|
-
|
|
562
|
-
|
|
563
|
-
|
|
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
|
-
|
|
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 ? (
|
|
577
|
-
])) :
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
(
|
|
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:
|
|
584
|
-
onClick: (
|
|
583
|
+
style: w({ width: m.width, textAlign: m.align || "left" }),
|
|
584
|
+
onClick: (T) => m.sortable && M(m.key)
|
|
585
585
|
}, [
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
m.sortable ? (
|
|
586
|
+
l("div", qe, [
|
|
587
|
+
l("span", null, V(m.title), 1),
|
|
588
|
+
m.sortable ? (a(), n("span", {
|
|
589
589
|
key: 0,
|
|
590
|
-
class:
|
|
591
|
-
}, [...
|
|
592
|
-
|
|
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
|
-
|
|
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)) :
|
|
602
|
+
])], 2)) : f("", !0)
|
|
603
603
|
])
|
|
604
|
-
], 12,
|
|
604
|
+
], 12, Ue))), 128))
|
|
605
605
|
])
|
|
606
606
|
]),
|
|
607
|
-
|
|
608
|
-
!O.value.length && !
|
|
609
|
-
|
|
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
|
-
|
|
614
|
-
|
|
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,
|
|
617
|
-
])) :
|
|
618
|
-
(
|
|
619
|
-
key:
|
|
620
|
-
onClick: (
|
|
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
|
-
(
|
|
623
|
-
key:
|
|
624
|
-
style:
|
|
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
|
-
|
|
626
|
+
_(y.$slots, x.key, {
|
|
627
627
|
row: m,
|
|
628
|
-
index:
|
|
629
|
-
value: m[
|
|
628
|
+
index: T,
|
|
629
|
+
value: m[x.key]
|
|
630
630
|
}, () => [
|
|
631
|
-
|
|
631
|
+
X(V(m[x.key]), 1)
|
|
632
632
|
], !0)
|
|
633
633
|
], 4))), 128))
|
|
634
|
-
], 8,
|
|
634
|
+
], 8, Xe))), 128))
|
|
635
635
|
])
|
|
636
636
|
])
|
|
637
637
|
], 2));
|
|
638
638
|
}
|
|
639
|
-
}),
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
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
|
-
}[
|
|
660
|
-
return c && (
|
|
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>`),
|
|
665
|
-
},
|
|
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
|
-
},
|
|
811
|
+
}, D = (e) => {
|
|
735
812
|
const t = document.getElementById("ld-message-root");
|
|
736
813
|
if (!t) return;
|
|
737
|
-
const
|
|
738
|
-
|
|
739
|
-
|
|
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 =
|
|
819
|
+
typeof window < "u" && (window.__ldMessageClose = D);
|
|
743
820
|
const E = (e) => {
|
|
744
|
-
const t =
|
|
821
|
+
const t = st(), { id: o, element: r, duration: d } = tt(e);
|
|
745
822
|
return t.appendChild(r), d > 0 && setTimeout(() => {
|
|
746
|
-
|
|
747
|
-
}, d),
|
|
748
|
-
},
|
|
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:
|
|
830
|
+
close: D,
|
|
754
831
|
closeAll: () => {
|
|
755
832
|
const e = document.getElementById("ld-message-root");
|
|
756
833
|
e && (e.innerHTML = "");
|
|
757
834
|
}
|
|
758
|
-
},
|
|
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,
|
|
764
|
-
|
|
765
|
-
|
|
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
|
-
|
|
846
|
+
l("path", { d: "m18 0 8 12 10-8-4 20H4L0 4l10 8 8-12z" })
|
|
770
847
|
], -1)),
|
|
771
|
-
|
|
772
|
-
|
|
848
|
+
_(t.$slots, "default", {}, () => [
|
|
849
|
+
o[0] || (o[0] = X("Unlock Pro", -1))
|
|
773
850
|
], !0)
|
|
774
851
|
])
|
|
775
852
|
]));
|
|
776
853
|
}
|
|
777
|
-
}),
|
|
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,
|
|
792
|
-
return (r, d) => (
|
|
793
|
-
|
|
794
|
-
(
|
|
795
|
-
key:
|
|
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:
|
|
798
|
-
},
|
|
799
|
-
d[0] || (d[0] =
|
|
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
|
-
}),
|
|
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:
|
|
892
|
+
setup(e, { expose: t, emit: o }) {
|
|
816
893
|
let r = 0;
|
|
817
|
-
const d = `lztheme-toggle-${++r}-${Date.now()}`, c = e,
|
|
818
|
-
|
|
819
|
-
|
|
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
|
-
|
|
900
|
+
h.value = u, s("update:modelValue", u), s("change", u);
|
|
824
901
|
};
|
|
825
902
|
return t({
|
|
826
903
|
toggle: () => {
|
|
827
|
-
|
|
904
|
+
g.value && g.value.click();
|
|
828
905
|
},
|
|
829
906
|
setDark: (i) => {
|
|
830
|
-
|
|
907
|
+
h.value = i, s("update:modelValue", i), s("change", i);
|
|
831
908
|
}
|
|
832
|
-
}), (i, u) => (
|
|
833
|
-
|
|
909
|
+
}), (i, u) => (a(), n("div", ut, [
|
|
910
|
+
l("label", {
|
|
834
911
|
for: d,
|
|
835
912
|
class: "theme"
|
|
836
913
|
}, [
|
|
837
|
-
|
|
838
|
-
|
|
914
|
+
l("span", pt, [
|
|
915
|
+
l("input", {
|
|
839
916
|
id: d,
|
|
840
917
|
ref_key: "toggleRef",
|
|
841
|
-
ref:
|
|
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:
|
|
924
|
+
checked: h.value,
|
|
848
925
|
onChange: p
|
|
849
|
-
}, null, 40,
|
|
850
|
-
u[0] || (u[0] =
|
|
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
|
-
}),
|
|
856
|
-
Lzbutton:
|
|
857
|
-
Lztext:
|
|
858
|
-
Lztheme:
|
|
859
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
1034
|
-
ut,
|
|
1035
|
-
pt,
|
|
1036
|
-
mt,
|
|
1037
|
-
gt,
|
|
1038
|
-
vt,
|
|
1039
|
-
ht,
|
|
1110
|
+
}, Bt = [
|
|
1040
1111
|
ft,
|
|
1041
|
-
yt
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
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
|
|
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((
|
|
1058
|
-
|
|
1134
|
+
return e.forEach((o) => {
|
|
1135
|
+
K(o) && t++;
|
|
1059
1136
|
}), t;
|
|
1060
1137
|
}
|
|
1061
|
-
function
|
|
1138
|
+
function zt() {
|
|
1062
1139
|
const e = {};
|
|
1063
|
-
return
|
|
1064
|
-
e[
|
|
1140
|
+
return H.forEach((t, o) => {
|
|
1141
|
+
e[o] = t;
|
|
1065
1142
|
}), e;
|
|
1066
1143
|
}
|
|
1067
|
-
function
|
|
1068
|
-
return
|
|
1144
|
+
function Ct(e) {
|
|
1145
|
+
return H.get(e);
|
|
1069
1146
|
}
|
|
1070
|
-
|
|
1071
|
-
const
|
|
1072
|
-
Button:
|
|
1073
|
-
Card:
|
|
1074
|
-
Modal:
|
|
1075
|
-
Message:
|
|
1076
|
-
Carousel:
|
|
1077
|
-
Loading:
|
|
1078
|
-
Table:
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
},
|
|
1085
|
-
|
|
1086
|
-
|
|
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
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
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
|
};
|