y-design-ssr 0.2.10 → 0.2.12
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/libs/button/index.d.ts +112 -1
- package/libs/button/index.mjs +55 -51
- package/libs/button/index.umd.js +2 -2
- package/libs/cell/index.d.ts +87 -1
- package/libs/cell/index.mjs +70 -70
- package/libs/cell/index.umd.js +2 -2
- package/libs/checkbox/index.d.ts +58 -1
- package/libs/checkbox/index.mjs +72 -72
- package/libs/checkbox/index.umd.js +2 -2
- package/libs/checkboxGroup/index.d.ts +67 -1
- package/libs/checkboxGroup/index.mjs +48 -44
- package/libs/checkboxGroup/index.umd.js +2 -2
- package/libs/col/index.d.ts +24 -1
- package/libs/col/index.mjs +49 -45
- package/libs/col/index.umd.js +2 -2
- package/libs/countdown/index.d.ts +42 -1
- package/libs/countdown/index.mjs +54 -50
- package/libs/countdown/index.umd.js +2 -2
- package/libs/dialog/index.d.ts +157 -1
- package/libs/dialog/index.mjs +219 -274
- package/libs/dialog/index.umd.js +2 -2
- package/libs/empty/index.d.ts +40 -1
- package/libs/empty/index.mjs +36 -32
- package/libs/empty/index.umd.js +2 -2
- package/libs/form/index.d.ts +127 -1
- package/libs/form/index.mjs +69 -64
- package/libs/form/index.umd.js +2 -2
- package/libs/formItem/index.d.ts +118 -1
- package/libs/formItem/index.mjs +61 -56
- package/libs/formItem/index.umd.js +2 -2
- package/libs/icon/index.d.ts +94 -1
- package/libs/icon/index.mjs +46 -42
- package/libs/icon/index.umd.js +2 -2
- package/libs/index.d.ts +3 -56
- package/libs/index.mjs +804 -899
- package/libs/index.umd.js +2 -2
- package/libs/input/index.d.ts +112 -1
- package/libs/input/index.mjs +75 -70
- package/libs/input/index.umd.js +2 -2
- package/libs/list/index.d.ts +112 -1
- package/libs/list/index.mjs +110 -106
- package/libs/list/index.umd.js +2 -2
- package/libs/loading/index.d.ts +112 -1
- package/libs/loading/index.mjs +57 -52
- package/libs/loading/index.umd.js +2 -2
- package/libs/mask/index.d.ts +67 -1
- package/libs/mask/index.mjs +54 -50
- package/libs/mask/index.umd.js +2 -2
- package/libs/popup/index.d.ts +103 -1
- package/libs/popup/index.mjs +47 -47
- package/libs/popup/index.umd.js +2 -2
- package/libs/progress/index.d.ts +130 -1
- package/libs/progress/index.mjs +66 -62
- package/libs/progress/index.umd.js +2 -2
- package/libs/pullrefresh/index.d.ts +67 -1
- package/libs/pullrefresh/index.mjs +59 -55
- package/libs/pullrefresh/index.umd.js +2 -2
- package/libs/row/index.d.ts +42 -1
- package/libs/row/index.mjs +55 -51
- package/libs/row/index.umd.js +2 -2
- package/libs/slider/index.d.ts +121 -1
- package/libs/slider/index.mjs +93 -89
- package/libs/slider/index.umd.js +2 -2
- package/libs/stepper/index.d.ts +94 -1
- package/libs/stepper/index.mjs +50 -46
- package/libs/stepper/index.umd.js +2 -2
- package/libs/swipe/index.d.ts +148 -1
- package/libs/swipe/index.mjs +78 -74
- package/libs/swipe/index.umd.js +2 -2
- package/libs/swipeItem/index.d.ts +22 -1
- package/libs/swipeItem/index.mjs +38 -34
- package/libs/swipeItem/index.umd.js +2 -2
- package/libs/switch/index.d.ts +79 -1
- package/libs/switch/index.mjs +32 -28
- package/libs/switch/index.umd.js +2 -2
- package/libs/tab/index.d.ts +31 -1
- package/libs/tab/index.mjs +36 -32
- package/libs/tab/index.umd.js +1 -1
- package/libs/tabs/index.d.ts +150 -1
- package/libs/tabs/index.mjs +89 -85
- package/libs/tabs/index.umd.js +2 -2
- package/libs/toast/index.d.ts +57 -1
- package/libs/toast/index.mjs +59 -57
- package/libs/toast/index.umd.js +2 -2
- package/libs/tooltip/index.d.ts +112 -1
- package/libs/tooltip/index.mjs +69 -65
- package/libs/tooltip/index.umd.js +2 -2
- package/libs/utils/withInstall.d.ts +5 -0
- package/libs/vue-sfc.d.ts +4 -8
- package/package.json +2 -2
package/libs/dialog/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
const
|
|
3
|
-
(l, a) => l + (t[a] ?
|
|
1
|
+
import { ref as R, reactive as D, defineComponent as x, onMounted as re, onUnmounted as ce, watch as ie, createVNode as r, Transition as Q, withDirectives as I, vShow as X, computed as O, Teleport as ue, Fragment as se, createApp as P, h as Y, mergeProps as de, resolveDirective as W, isVNode as fe } from "vue";
|
|
2
|
+
const Z = (e) => (t) => Object.prototype.toString.call(t) === `[object ${e}]`, pe = Z("Function"), me = Z("Promise"), z = (e, t) => t ? typeof t == "string" ? ` ${e}--${t}` : Array.isArray(t) ? t.reduce((l, a) => l + z(e, a), "") : Object.keys(t).reduce(
|
|
3
|
+
(l, a) => l + (t[a] ? z(e, a) : ""),
|
|
4
4
|
""
|
|
5
|
-
) : "",
|
|
6
|
-
let a = t,
|
|
7
|
-
return a && typeof a != "string" && (
|
|
8
|
-
},
|
|
5
|
+
) : "", ge = (e) => (t, l) => {
|
|
6
|
+
let a = t, u = l;
|
|
7
|
+
return a && typeof a != "string" && (u = a, a = ""), a = a ? `${e}__${a}` : e, `${a}${z(a, u)}`;
|
|
8
|
+
}, ye = () => (e, t) => t ? `${z(`y-${e}`, t)}` : `y-${e}`, be = {
|
|
9
9
|
"pull-refresh": {
|
|
10
10
|
pulling: "下拉刷新...",
|
|
11
11
|
loosing: "释放刷新...",
|
|
@@ -17,14 +17,14 @@ const oe = (e) => (t) => Object.prototype.toString.call(t) === `[object ${e}]`,
|
|
|
17
17
|
validateMessage: "请输入正确内容"
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"zh-CN":
|
|
20
|
+
R("zh-CN");
|
|
21
|
+
D({
|
|
22
|
+
"zh-CN": be
|
|
23
23
|
});
|
|
24
24
|
const w = (e) => {
|
|
25
25
|
const t = `y-${e}`;
|
|
26
|
-
return [t,
|
|
27
|
-
}, m = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`,
|
|
26
|
+
return [t, ge(t), ye()];
|
|
27
|
+
}, m = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, Se = (e) => {
|
|
28
28
|
switch (e) {
|
|
29
29
|
case "top":
|
|
30
30
|
return "column-reverse";
|
|
@@ -37,7 +37,7 @@ const w = (e) => {
|
|
|
37
37
|
default:
|
|
38
38
|
return "column";
|
|
39
39
|
}
|
|
40
|
-
}, [
|
|
40
|
+
}, [$e, ve, he] = w("mask"), ke = {
|
|
41
41
|
// 控制显示
|
|
42
42
|
modelValue: {
|
|
43
43
|
type: Boolean,
|
|
@@ -72,77 +72,80 @@ const w = (e) => {
|
|
|
72
72
|
type: Function,
|
|
73
73
|
default: null
|
|
74
74
|
}
|
|
75
|
-
}, S =
|
|
76
|
-
let
|
|
77
|
-
const
|
|
78
|
-
name:
|
|
79
|
-
props:
|
|
75
|
+
}, S = D([]);
|
|
76
|
+
let G = 0;
|
|
77
|
+
const Ce = /* @__PURE__ */ x({
|
|
78
|
+
name: $e,
|
|
79
|
+
props: ke,
|
|
80
80
|
emits: ["update:modelValue"],
|
|
81
81
|
setup(e, {
|
|
82
82
|
slots: t
|
|
83
83
|
}) {
|
|
84
|
-
const l =
|
|
85
|
-
|
|
86
|
-
l.value = `mask${
|
|
87
|
-
}),
|
|
88
|
-
const n = S.findIndex((
|
|
84
|
+
const l = R("");
|
|
85
|
+
re(() => {
|
|
86
|
+
l.value = `mask${G}`, G += 1, a(e.modelValue, !0);
|
|
87
|
+
}), ce(() => {
|
|
88
|
+
const n = S.findIndex((c) => c._id === l.value);
|
|
89
89
|
n >= 0 && S.splice(n, 1);
|
|
90
|
-
}),
|
|
90
|
+
}), ie(() => e.modelValue, (n) => {
|
|
91
91
|
a(n);
|
|
92
92
|
});
|
|
93
|
-
const a = (n,
|
|
93
|
+
const a = (n, c) => {
|
|
94
94
|
n ? (S.unshift({
|
|
95
95
|
_id: l.value,
|
|
96
96
|
_state: n
|
|
97
|
-
}), S.length > 1 && (S[1]._state = !1)) :
|
|
98
|
-
},
|
|
97
|
+
}), S.length > 1 && (S[1]._state = !1)) : c || (S.splice(0, 1), S.length > 0 && (S[0]._state = !0));
|
|
98
|
+
}, u = () => {
|
|
99
99
|
let n = !1;
|
|
100
|
-
for (let
|
|
101
|
-
S[
|
|
100
|
+
for (let c = 0; c < S.length; c++)
|
|
101
|
+
S[c]._id === l.value && (n = S[c]._state);
|
|
102
102
|
return {
|
|
103
103
|
_state: n
|
|
104
104
|
};
|
|
105
105
|
}, f = (n) => {
|
|
106
106
|
const {
|
|
107
|
-
lockScroll:
|
|
107
|
+
lockScroll: c
|
|
108
108
|
} = e;
|
|
109
|
-
|
|
109
|
+
c && (n.preventDefault(), n.stopPropagation());
|
|
110
110
|
};
|
|
111
111
|
return () => {
|
|
112
112
|
const {
|
|
113
113
|
customClass: n,
|
|
114
|
-
duration:
|
|
114
|
+
duration: c,
|
|
115
115
|
zIndex: p,
|
|
116
116
|
customStyle: g,
|
|
117
|
-
onAfterLeave:
|
|
117
|
+
onAfterLeave: i
|
|
118
118
|
} = e, {
|
|
119
119
|
_state: d
|
|
120
|
-
} =
|
|
121
|
-
return r(
|
|
122
|
-
name:
|
|
123
|
-
onAfterLeave:
|
|
120
|
+
} = u();
|
|
121
|
+
return r(Q, {
|
|
122
|
+
name: he("animation", "fade"),
|
|
123
|
+
onAfterLeave: i
|
|
124
124
|
}, {
|
|
125
125
|
default: () => {
|
|
126
126
|
var o;
|
|
127
|
-
return [
|
|
127
|
+
return [I(r("div", {
|
|
128
128
|
style: {
|
|
129
|
-
animationDuration: `${
|
|
129
|
+
animationDuration: `${c}ms`,
|
|
130
130
|
zIndex: p,
|
|
131
131
|
...g
|
|
132
132
|
},
|
|
133
|
-
class: [
|
|
133
|
+
class: [ve(), n],
|
|
134
134
|
onTouchmove: f
|
|
135
|
-
}, [(o = t.default) == null ? void 0 : o.call(t)]), [[
|
|
135
|
+
}, [(o = t.default) == null ? void 0 : o.call(t)]), [[X, d]])];
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
140
|
});
|
|
141
|
-
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
};
|
|
145
|
-
|
|
141
|
+
function B(e) {
|
|
142
|
+
const t = e;
|
|
143
|
+
return t.install = (l) => {
|
|
144
|
+
const { name: a } = e;
|
|
145
|
+
a && l.component(a, e);
|
|
146
|
+
}, t;
|
|
147
|
+
}
|
|
148
|
+
const xe = B(Ce), [we, H, Be] = w("popup"), _e = {
|
|
146
149
|
// 控制显示
|
|
147
150
|
modelValue: {
|
|
148
151
|
type: Boolean,
|
|
@@ -195,97 +198,93 @@ const [_e, Z, Ve] = w("popup"), Ae = {
|
|
|
195
198
|
type: Number,
|
|
196
199
|
default: 101
|
|
197
200
|
}
|
|
198
|
-
},
|
|
199
|
-
name:
|
|
200
|
-
props:
|
|
201
|
+
}, Ne = /* @__PURE__ */ x({
|
|
202
|
+
name: we,
|
|
203
|
+
props: _e,
|
|
201
204
|
emits: ["clickMask", "update:modelValue"],
|
|
202
205
|
setup(e, {
|
|
203
206
|
slots: t,
|
|
204
207
|
emit: l
|
|
205
208
|
}) {
|
|
206
|
-
const a =
|
|
209
|
+
const a = O(() => {
|
|
207
210
|
const {
|
|
208
211
|
position: n,
|
|
209
|
-
borderRadius:
|
|
212
|
+
borderRadius: c,
|
|
210
213
|
customStyle: p,
|
|
211
214
|
duration: g
|
|
212
|
-
} = e,
|
|
215
|
+
} = e, i = m(c);
|
|
213
216
|
let d = "0";
|
|
214
217
|
switch (n) {
|
|
215
218
|
case "top":
|
|
216
|
-
d = ` 0 0 ${
|
|
219
|
+
d = ` 0 0 ${i} ${i}`;
|
|
217
220
|
break;
|
|
218
221
|
case "bottom":
|
|
219
|
-
d = `${
|
|
222
|
+
d = `${i} ${i} 0 0`;
|
|
220
223
|
break;
|
|
221
224
|
case "left":
|
|
222
|
-
d = `0 ${
|
|
225
|
+
d = `0 ${i} ${i} 0`;
|
|
223
226
|
break;
|
|
224
227
|
case "right":
|
|
225
|
-
d = `${
|
|
228
|
+
d = `${i} 0 0 ${i}`;
|
|
226
229
|
break;
|
|
227
230
|
default:
|
|
228
|
-
d = `${
|
|
231
|
+
d = `${i}`;
|
|
229
232
|
}
|
|
230
233
|
return {
|
|
231
234
|
borderRadius: d,
|
|
232
235
|
animationDuration: `${g}ms`,
|
|
233
236
|
...p
|
|
234
237
|
};
|
|
235
|
-
}),
|
|
238
|
+
}), u = (n) => {
|
|
236
239
|
l("clickMask", n), e.isCloseOnClickMask && (f.value = !1);
|
|
237
|
-
}, f =
|
|
240
|
+
}, f = O({
|
|
238
241
|
get: () => e.modelValue,
|
|
239
242
|
set: (n) => l("update:modelValue", n)
|
|
240
243
|
});
|
|
241
244
|
return () => {
|
|
242
245
|
const {
|
|
243
246
|
teleport: n,
|
|
244
|
-
position:
|
|
247
|
+
position: c,
|
|
245
248
|
customClass: p,
|
|
246
249
|
duration: g,
|
|
247
|
-
onAfterLeave:
|
|
250
|
+
onAfterLeave: i,
|
|
248
251
|
lockScroll: d,
|
|
249
252
|
zIndex: o
|
|
250
253
|
} = e;
|
|
251
|
-
return r(
|
|
254
|
+
return r(ue, {
|
|
252
255
|
to: n
|
|
253
256
|
}, {
|
|
254
257
|
default: () => [r("div", {
|
|
255
|
-
class:
|
|
258
|
+
class: H(),
|
|
256
259
|
style: {
|
|
257
260
|
zIndex: o
|
|
258
261
|
}
|
|
259
|
-
}, [r(
|
|
262
|
+
}, [r(xe, {
|
|
260
263
|
modelValue: f.value,
|
|
261
|
-
"onUpdate:modelValue": (
|
|
264
|
+
"onUpdate:modelValue": (s) => f.value = s,
|
|
262
265
|
duration: g,
|
|
263
266
|
lockScroll: d,
|
|
264
|
-
onClick:
|
|
265
|
-
onAfterLeave:
|
|
266
|
-
}, null), r(
|
|
267
|
-
name:
|
|
267
|
+
onClick: u,
|
|
268
|
+
onAfterLeave: i
|
|
269
|
+
}, null), r(Q, {
|
|
270
|
+
name: Be("animation", `slide-${c}`)
|
|
268
271
|
}, {
|
|
269
272
|
default: () => {
|
|
270
|
-
var
|
|
271
|
-
return [
|
|
273
|
+
var s;
|
|
274
|
+
return [I(r("div", {
|
|
272
275
|
style: a.value,
|
|
273
|
-
class: [
|
|
274
|
-
[
|
|
276
|
+
class: [H("content", {
|
|
277
|
+
[c]: c
|
|
275
278
|
}), p]
|
|
276
|
-
}, [((
|
|
279
|
+
}, [((s = t.default) == null ? void 0 : s.call(t)) || null]), [[X, f.value]])];
|
|
277
280
|
}
|
|
278
281
|
})])]
|
|
279
282
|
});
|
|
280
283
|
};
|
|
281
284
|
}
|
|
282
285
|
});
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
e.component(t, L);
|
|
286
|
-
};
|
|
287
|
-
const [ze, z] = w("icon"), Ie = (e) => new RegExp(/\.(https|png|jpg|gif|jpeg|webp|apng)$/).test(e.toLowerCase()), M = /* @__PURE__ */ x({
|
|
288
|
-
name: ze,
|
|
286
|
+
const Ve = B(Ne), [Ae, A] = w("icon"), Ie = (e) => new RegExp(/\.(https|png|jpg|gif|jpeg|webp|apng)$/).test(e.toLowerCase()), ze = /* @__PURE__ */ x({
|
|
287
|
+
name: Ae,
|
|
289
288
|
props: {
|
|
290
289
|
dot: {
|
|
291
290
|
type: Boolean,
|
|
@@ -336,7 +335,7 @@ const [ze, z] = w("icon"), Ie = (e) => new RegExp(/\.(https|png|jpg|gif|jpeg|web
|
|
|
336
335
|
slots: t,
|
|
337
336
|
emit: l
|
|
338
337
|
}) {
|
|
339
|
-
const a = Ie(e.name),
|
|
338
|
+
const a = Ie(e.name), u = () => ({
|
|
340
339
|
fontSize: m(e.size),
|
|
341
340
|
color: e.color
|
|
342
341
|
}), f = (n) => {
|
|
@@ -345,49 +344,45 @@ const [ze, z] = w("icon"), Ie = (e) => new RegExp(/\.(https|png|jpg|gif|jpeg|web
|
|
|
345
344
|
return () => {
|
|
346
345
|
const {
|
|
347
346
|
name: n,
|
|
348
|
-
classPrefix:
|
|
347
|
+
classPrefix: c,
|
|
349
348
|
badge: p,
|
|
350
349
|
dot: g,
|
|
351
|
-
subColor:
|
|
350
|
+
subColor: i,
|
|
352
351
|
subBg: d,
|
|
353
352
|
tag: o
|
|
354
353
|
} = e;
|
|
355
354
|
return r(o, {
|
|
356
|
-
class: `${
|
|
357
|
-
style:
|
|
355
|
+
class: `${c}${a ? "" : ` y-icon--${n}`}`,
|
|
356
|
+
style: u(),
|
|
358
357
|
onClick: f
|
|
359
358
|
}, {
|
|
360
359
|
default: () => {
|
|
361
|
-
var
|
|
360
|
+
var s;
|
|
362
361
|
return [a ? r("em", {
|
|
363
|
-
class:
|
|
362
|
+
class: A("node")
|
|
364
363
|
}, [r("img", {
|
|
365
|
-
class:
|
|
364
|
+
class: A("image"),
|
|
366
365
|
src: n,
|
|
367
366
|
alt: "icon"
|
|
368
367
|
}, null)]) : null, g ? r("em", {
|
|
369
|
-
class:
|
|
368
|
+
class: A("dot"),
|
|
370
369
|
style: {
|
|
371
370
|
backgroundColor: d
|
|
372
371
|
}
|
|
373
372
|
}, null) : null, p ? r("em", {
|
|
374
|
-
class:
|
|
373
|
+
class: A("badge"),
|
|
375
374
|
style: {
|
|
376
|
-
color:
|
|
375
|
+
color: i,
|
|
377
376
|
backgroundColor: d
|
|
378
377
|
}
|
|
379
|
-
}, [p]) : null, ((
|
|
378
|
+
}, [p]) : null, ((s = t.default) == null ? void 0 : s.call(t)) || null];
|
|
380
379
|
}
|
|
381
380
|
});
|
|
382
381
|
};
|
|
383
382
|
}
|
|
384
383
|
});
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
e.component(t, M);
|
|
388
|
-
};
|
|
389
|
-
const [Le, B, Me] = w("button"), _ = /* @__PURE__ */ x({
|
|
390
|
-
name: Le,
|
|
384
|
+
const Le = B(ze), [Me, _, Oe] = w("button"), Re = /* @__PURE__ */ x({
|
|
385
|
+
name: Me,
|
|
391
386
|
props: {
|
|
392
387
|
// 标签
|
|
393
388
|
tag: {
|
|
@@ -455,33 +450,33 @@ const [Le, B, Me] = w("button"), _ = /* @__PURE__ */ x({
|
|
|
455
450
|
slots: t,
|
|
456
451
|
emit: l
|
|
457
452
|
}) {
|
|
458
|
-
const a = (
|
|
459
|
-
l("click",
|
|
453
|
+
const a = (u) => {
|
|
454
|
+
l("click", u);
|
|
460
455
|
};
|
|
461
456
|
return () => {
|
|
462
457
|
let {
|
|
463
|
-
tag:
|
|
458
|
+
tag: u
|
|
464
459
|
} = e;
|
|
465
460
|
const {
|
|
466
461
|
radius: f,
|
|
467
462
|
type: n,
|
|
468
|
-
size:
|
|
463
|
+
size: c,
|
|
469
464
|
disabled: p,
|
|
470
465
|
shadow: g,
|
|
471
|
-
block:
|
|
466
|
+
block: i,
|
|
472
467
|
square: d,
|
|
473
468
|
semicircle: o,
|
|
474
|
-
danger:
|
|
469
|
+
danger: s,
|
|
475
470
|
text: b,
|
|
476
471
|
supplementText: y
|
|
477
|
-
} = e,
|
|
478
|
-
return
|
|
479
|
-
class: [
|
|
480
|
-
block:
|
|
472
|
+
} = e, v = t.default ? t.default() : b;
|
|
473
|
+
return u = n === "link" ? "a" : u, r(u, {
|
|
474
|
+
class: [_([n, c, {
|
|
475
|
+
block: i,
|
|
481
476
|
square: d,
|
|
482
477
|
semicircle: o,
|
|
483
|
-
disabled: p &&
|
|
484
|
-
}, (n === "primary" || n === "secondary") && g ? `shadow_${g}` : "",
|
|
478
|
+
disabled: p && u === "a"
|
|
479
|
+
}, (n === "primary" || n === "secondary") && g ? `shadow_${g}` : "", s ? `${n}_danger` : "", p ? `${n}_disabled` : ""]), Oe("el", "clickable")],
|
|
485
480
|
style: {
|
|
486
481
|
borderRadius: m(f)
|
|
487
482
|
},
|
|
@@ -489,26 +484,22 @@ const [Le, B, Me] = w("button"), _ = /* @__PURE__ */ x({
|
|
|
489
484
|
onClick: a
|
|
490
485
|
}, {
|
|
491
486
|
default: () => {
|
|
492
|
-
var h,
|
|
487
|
+
var h, N;
|
|
493
488
|
return [r("div", {
|
|
494
|
-
class:
|
|
495
|
-
}, [((h = t.leftIcon) == null ? void 0 : h.call(t)) || null,
|
|
496
|
-
class:
|
|
497
|
-
}, [r("p", null, [
|
|
498
|
-
class:
|
|
489
|
+
class: _("content")
|
|
490
|
+
}, [((h = t.leftIcon) == null ? void 0 : h.call(t)) || null, v && r(se, null, [y ? r("div", {
|
|
491
|
+
class: _("text")
|
|
492
|
+
}, [r("p", null, [v]), r("p", {
|
|
493
|
+
class: _("subtext")
|
|
499
494
|
}, [y])]) : r("span", {
|
|
500
|
-
class:
|
|
501
|
-
}, [
|
|
495
|
+
class: _("text")
|
|
496
|
+
}, [v])]), ((N = t.rightIcon) == null ? void 0 : N.call(t)) || null])];
|
|
502
497
|
}
|
|
503
498
|
});
|
|
504
499
|
};
|
|
505
500
|
}
|
|
506
501
|
});
|
|
507
|
-
|
|
508
|
-
const { name: t } = _;
|
|
509
|
-
e.component(t, _);
|
|
510
|
-
};
|
|
511
|
-
const [Re, C] = w("loading"), Oe = {
|
|
502
|
+
const J = B(Re), [De, C] = w("loading"), Pe = {
|
|
512
503
|
// Loading icon 的颜色
|
|
513
504
|
color: {
|
|
514
505
|
type: String,
|
|
@@ -567,27 +558,27 @@ const [Re, C] = w("loading"), Oe = {
|
|
|
567
558
|
type: String,
|
|
568
559
|
default: "relative"
|
|
569
560
|
}
|
|
570
|
-
},
|
|
571
|
-
name:
|
|
572
|
-
props:
|
|
561
|
+
}, ee = /* @__PURE__ */ x({
|
|
562
|
+
name: De,
|
|
563
|
+
props: Pe,
|
|
573
564
|
setup(e, {
|
|
574
565
|
slots: t
|
|
575
566
|
}) {
|
|
576
567
|
return () => {
|
|
577
|
-
var y,
|
|
568
|
+
var y, v;
|
|
578
569
|
const {
|
|
579
570
|
position: l,
|
|
580
571
|
textLocation: a,
|
|
581
|
-
bgColor:
|
|
572
|
+
bgColor: u,
|
|
582
573
|
bgBorderRadius: f,
|
|
583
574
|
size: n,
|
|
584
|
-
padding:
|
|
575
|
+
padding: c,
|
|
585
576
|
color: p,
|
|
586
577
|
thick: g,
|
|
587
|
-
direction:
|
|
578
|
+
direction: i,
|
|
588
579
|
text: d,
|
|
589
580
|
textColor: o,
|
|
590
|
-
textSize:
|
|
581
|
+
textSize: s
|
|
591
582
|
} = e, b = ((y = t.default) == null ? void 0 : y.call(t)) || d;
|
|
592
583
|
return r("div", {
|
|
593
584
|
class: C({
|
|
@@ -598,10 +589,10 @@ const [Re, C] = w("loading"), Oe = {
|
|
|
598
589
|
[l]: l !== "relative"
|
|
599
590
|
}),
|
|
600
591
|
style: {
|
|
601
|
-
flexDirection:
|
|
602
|
-
backgroundColor:
|
|
592
|
+
flexDirection: Se(a),
|
|
593
|
+
backgroundColor: u,
|
|
603
594
|
borderRadius: m(f),
|
|
604
|
-
padding: m(
|
|
595
|
+
padding: m(c)
|
|
605
596
|
}
|
|
606
597
|
}, [r("span", {
|
|
607
598
|
class: C("icon-wrapper"),
|
|
@@ -609,9 +600,9 @@ const [Re, C] = w("loading"), Oe = {
|
|
|
609
600
|
width: m(n),
|
|
610
601
|
height: m(n)
|
|
611
602
|
}
|
|
612
|
-
}, [((
|
|
603
|
+
}, [((v = t.icon) == null ? void 0 : v.call(t)) || r("svg", {
|
|
613
604
|
class: C("icon", {
|
|
614
|
-
[
|
|
605
|
+
[i]: i
|
|
615
606
|
}),
|
|
616
607
|
viewBox: "25 25 50 50"
|
|
617
608
|
}, [r("circle", {
|
|
@@ -630,78 +621,35 @@ const [Re, C] = w("loading"), Oe = {
|
|
|
630
621
|
}),
|
|
631
622
|
style: {
|
|
632
623
|
color: o,
|
|
633
|
-
fontSize: m(
|
|
624
|
+
fontSize: m(s)
|
|
634
625
|
}
|
|
635
626
|
}, [b])])]);
|
|
636
627
|
};
|
|
637
628
|
}
|
|
638
|
-
}),
|
|
639
|
-
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
render: () => le(R, { ...e }, { ...t })
|
|
645
|
-
}), s = document.createElement("div");
|
|
646
|
-
return a.mount(s);
|
|
647
|
-
}, De = {
|
|
648
|
-
/**
|
|
649
|
-
* @description: show
|
|
650
|
-
* @param {LoadingPropsType} options
|
|
651
|
-
* @return {*}
|
|
652
|
-
*/
|
|
653
|
-
show: (e, t) => {
|
|
654
|
-
N || (N = ae(
|
|
655
|
-
{
|
|
656
|
-
...Pe,
|
|
657
|
-
...e
|
|
658
|
-
},
|
|
659
|
-
t
|
|
660
|
-
)), document.body.appendChild(N.$el);
|
|
661
|
-
},
|
|
662
|
-
/**
|
|
663
|
-
* @description: hide
|
|
664
|
-
* @param {*}
|
|
665
|
-
* @return {*}
|
|
666
|
-
*/
|
|
667
|
-
hide: () => {
|
|
668
|
-
N && N.$el.remove();
|
|
669
|
-
}
|
|
670
|
-
}, ee = (e, t) => {
|
|
629
|
+
}), Te = (e, t) => {
|
|
630
|
+
const a = P({
|
|
631
|
+
render: () => Y(ee, { ...e }, { ...t })
|
|
632
|
+
}), u = document.createElement("div");
|
|
633
|
+
return a.mount(u);
|
|
634
|
+
}, K = (e, t) => {
|
|
671
635
|
t.value ? (e.classList.add("y-loading__wrap"), e.appendChild(e.instance.$el)) : (e.classList.remove("y-loading__wrap"), e.removeChild(e.instance.$el));
|
|
672
|
-
},
|
|
673
|
-
install: (e) => {
|
|
674
|
-
e.directive("loading", re), e.directive("loading-props", je), e.directive("loading-slots", Fe);
|
|
675
|
-
}
|
|
676
|
-
}, re = {
|
|
636
|
+
}, je = {
|
|
677
637
|
getSSRProps: (e) => ({ ...e }),
|
|
678
638
|
mounted: (e, t) => {
|
|
679
|
-
e.instance =
|
|
639
|
+
e.instance = Te({ ...e.customProps }, { ...e.customSlots }), t.value && K(e, t);
|
|
680
640
|
},
|
|
681
641
|
updated: (e, t) => {
|
|
682
|
-
t.oldValue !== t.value &&
|
|
642
|
+
t.oldValue !== t.value && K(e, t);
|
|
683
643
|
},
|
|
684
644
|
unmounted: (e) => {
|
|
685
645
|
e.instance && e.instance.$el.remove();
|
|
686
646
|
}
|
|
687
|
-
}, je = {
|
|
688
|
-
getSSRProps: (e) => ({ ...e }),
|
|
689
|
-
beforeMount: (e, t) => {
|
|
690
|
-
e.customProps = { ...t.value };
|
|
691
|
-
}
|
|
692
|
-
}, Fe = {
|
|
693
|
-
getSSRProps: (e) => ({ ...e }),
|
|
694
|
-
beforeMount: (e, t) => {
|
|
695
|
-
e.customSlots = { ...t.value };
|
|
696
|
-
}
|
|
697
647
|
};
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
function Ee(e) {
|
|
702
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !be(e);
|
|
648
|
+
B(ee);
|
|
649
|
+
function Fe(e) {
|
|
650
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !fe(e);
|
|
703
651
|
}
|
|
704
|
-
const [
|
|
652
|
+
const [Ee, $] = w("dialog"), Ue = {
|
|
705
653
|
// 控制显示
|
|
706
654
|
modelValue: {
|
|
707
655
|
type: Boolean,
|
|
@@ -772,140 +720,140 @@ const [Ue, v] = w("dialog"), qe = {
|
|
|
772
720
|
type: String,
|
|
773
721
|
default: "body"
|
|
774
722
|
}
|
|
775
|
-
},
|
|
776
|
-
name:
|
|
723
|
+
}, te = /* @__PURE__ */ x({
|
|
724
|
+
name: Ee,
|
|
777
725
|
directives: {
|
|
778
|
-
loading:
|
|
726
|
+
loading: je
|
|
779
727
|
},
|
|
780
|
-
props:
|
|
728
|
+
props: Ue,
|
|
781
729
|
emits: ["update:modelValue", "cancel", "confirm"],
|
|
782
730
|
setup(e, {
|
|
783
731
|
emit: t,
|
|
784
732
|
slots: l
|
|
785
733
|
}) {
|
|
786
|
-
const a =
|
|
734
|
+
const a = D({
|
|
787
735
|
cancel: !1,
|
|
788
736
|
confirm: !1
|
|
789
|
-
}),
|
|
737
|
+
}), u = (o) => {
|
|
790
738
|
d.value = o;
|
|
791
739
|
}, f = (o) => {
|
|
792
|
-
var
|
|
793
|
-
|
|
740
|
+
var s;
|
|
741
|
+
u(!1), (s = e.callback) == null || s.call(e, o);
|
|
794
742
|
}, n = (o) => {
|
|
795
743
|
t("cancel", o, p("cancel"));
|
|
796
|
-
},
|
|
744
|
+
}, c = (o) => {
|
|
797
745
|
t("confirm", o, p("confirm"));
|
|
798
746
|
}, p = (o) => {
|
|
799
747
|
const {
|
|
800
|
-
modelValue:
|
|
748
|
+
modelValue: s,
|
|
801
749
|
beforeClose: b
|
|
802
750
|
} = e;
|
|
803
|
-
if (
|
|
804
|
-
if (
|
|
751
|
+
if (s)
|
|
752
|
+
if (pe(b)) {
|
|
805
753
|
a[o] = !0;
|
|
806
754
|
const y = b(o);
|
|
807
|
-
|
|
755
|
+
me(y) ? y.then((h) => {
|
|
808
756
|
g(h, o);
|
|
809
757
|
}).catch((h) => {
|
|
810
758
|
throw new Error(h);
|
|
811
759
|
}) : g(y, o);
|
|
812
760
|
} else
|
|
813
761
|
f(o);
|
|
814
|
-
}, g = (o,
|
|
815
|
-
o && f(
|
|
816
|
-
},
|
|
762
|
+
}, g = (o, s) => {
|
|
763
|
+
o && f(s), a[s] = !1;
|
|
764
|
+
}, i = (o, s, b) => {
|
|
817
765
|
let y = Number(o.substring(0, o.length - 2));
|
|
818
|
-
return y /=
|
|
819
|
-
}, d =
|
|
766
|
+
return y /= s || 2, b ? `${b(y)}px` : `${y}px`;
|
|
767
|
+
}, d = O({
|
|
820
768
|
get: () => e.modelValue,
|
|
821
769
|
set: (o) => t("update:modelValue", o)
|
|
822
770
|
});
|
|
823
771
|
return () => {
|
|
824
772
|
const {
|
|
825
773
|
width: o,
|
|
826
|
-
title:
|
|
774
|
+
title: s,
|
|
827
775
|
titleAlign: b,
|
|
828
776
|
message: y,
|
|
829
|
-
messageAlign:
|
|
777
|
+
messageAlign: v,
|
|
830
778
|
isCloseOnClickMask: h,
|
|
831
|
-
showCloseIcon:
|
|
832
|
-
showCancelBtn:
|
|
833
|
-
cancelButtonText:
|
|
834
|
-
showConfirmBtn:
|
|
835
|
-
confirmButtonText:
|
|
836
|
-
imgSrc:
|
|
779
|
+
showCloseIcon: N,
|
|
780
|
+
showCancelBtn: T,
|
|
781
|
+
cancelButtonText: L,
|
|
782
|
+
showConfirmBtn: j,
|
|
783
|
+
confirmButtonText: le,
|
|
784
|
+
imgSrc: F,
|
|
837
785
|
circleImg: k,
|
|
838
|
-
teleport:
|
|
786
|
+
teleport: ae
|
|
839
787
|
} = e;
|
|
840
|
-
return r(
|
|
788
|
+
return r(Ve, de({
|
|
841
789
|
modelValue: d.value,
|
|
842
|
-
"onUpdate:modelValue": (
|
|
843
|
-
customClass:
|
|
790
|
+
"onUpdate:modelValue": (V) => d.value = V,
|
|
791
|
+
customClass: $(),
|
|
844
792
|
customStyle: {
|
|
845
793
|
width: m(o)
|
|
846
794
|
}
|
|
847
795
|
}, {
|
|
848
|
-
"onUpdate:modelValue":
|
|
796
|
+
"onUpdate:modelValue": u
|
|
849
797
|
}, {
|
|
850
798
|
isCloseOnClickMask: h,
|
|
851
|
-
teleport:
|
|
799
|
+
teleport: ae
|
|
852
800
|
}), {
|
|
853
801
|
default: () => {
|
|
854
|
-
var
|
|
855
|
-
return [((
|
|
856
|
-
class:
|
|
802
|
+
var V, E, U, q;
|
|
803
|
+
return [((V = l.img) == null ? void 0 : V.call(l)) || F && r("div", {
|
|
804
|
+
class: $("img", {
|
|
857
805
|
circle: k
|
|
858
806
|
}),
|
|
859
807
|
style: {
|
|
860
|
-
top: k ? `-${
|
|
861
|
-
left: k ? `calc(50% - ${
|
|
808
|
+
top: k ? `-${i(m(o), 4)}` : "auto",
|
|
809
|
+
left: k ? `calc(50% - ${i(m(o), 4)})` : "auto"
|
|
862
810
|
}
|
|
863
811
|
}, [r("div", {
|
|
864
812
|
style: {
|
|
865
|
-
width: k ?
|
|
866
|
-
height:
|
|
867
|
-
background: `url(${
|
|
813
|
+
width: k ? i(m(o)) : m(o),
|
|
814
|
+
height: i(m(o)),
|
|
815
|
+
background: `url(${F}) center`,
|
|
868
816
|
borderRadius: k ? "50%" : "20px 20px 0 0"
|
|
869
817
|
}
|
|
870
818
|
}, null)]), r("div", {
|
|
871
|
-
class:
|
|
819
|
+
class: $("container")
|
|
872
820
|
}, [r("div", {
|
|
873
821
|
style: {
|
|
874
|
-
height: k ?
|
|
822
|
+
height: k ? i(m(o), 4, (oe) => oe + 20) : "24px"
|
|
875
823
|
}
|
|
876
|
-
}, null), ((
|
|
877
|
-
class:
|
|
824
|
+
}, null), ((E = l.title) == null ? void 0 : E.call(l)) || r("div", {
|
|
825
|
+
class: $("title"),
|
|
878
826
|
style: {
|
|
879
827
|
textAlign: b
|
|
880
828
|
}
|
|
881
|
-
}, [
|
|
882
|
-
class:
|
|
829
|
+
}, [s]), r("div", {
|
|
830
|
+
class: $("content")
|
|
883
831
|
}, [r("div", {
|
|
884
|
-
class:
|
|
832
|
+
class: $("message"),
|
|
885
833
|
style: {
|
|
886
|
-
textAlign:
|
|
834
|
+
textAlign: v
|
|
887
835
|
}
|
|
888
|
-
}, [((
|
|
889
|
-
class:
|
|
836
|
+
}, [((U = l.default) == null ? void 0 : U.call(l)) || y]), ((q = l.footer) == null ? void 0 : q.call(l)) || r("div", {
|
|
837
|
+
class: $("footer"),
|
|
890
838
|
style: {
|
|
891
|
-
paddingTop:
|
|
839
|
+
paddingTop: T || j ? "20px" : "0px"
|
|
892
840
|
}
|
|
893
|
-
}, [
|
|
841
|
+
}, [T && I(r(J, {
|
|
894
842
|
type: "secondary",
|
|
895
|
-
class:
|
|
843
|
+
class: $("footer-btn"),
|
|
896
844
|
onClick: n
|
|
897
|
-
},
|
|
898
|
-
default: () => [
|
|
899
|
-
}), [[
|
|
845
|
+
}, Fe(L) ? L : {
|
|
846
|
+
default: () => [L]
|
|
847
|
+
}), [[W("loading"), a.cancel]]), j && I(r(J, {
|
|
900
848
|
type: "primary",
|
|
901
|
-
class:
|
|
902
|
-
onClick:
|
|
849
|
+
class: $("footer-btn"),
|
|
850
|
+
onClick: c
|
|
903
851
|
}, {
|
|
904
|
-
default: () => [a.confirm ? "" :
|
|
905
|
-
}), [[
|
|
906
|
-
class:
|
|
852
|
+
default: () => [a.confirm ? "" : le]
|
|
853
|
+
}), [[W("loading"), a.confirm]])])]), N && r("div", {
|
|
854
|
+
class: $("close"),
|
|
907
855
|
onClick: () => f("close")
|
|
908
|
-
}, [r(
|
|
856
|
+
}, [r(Le, {
|
|
909
857
|
name: "cross"
|
|
910
858
|
}, null)])])];
|
|
911
859
|
}
|
|
@@ -913,40 +861,37 @@ const [Ue, v] = w("dialog"), qe = {
|
|
|
913
861
|
};
|
|
914
862
|
}
|
|
915
863
|
});
|
|
916
|
-
let
|
|
917
|
-
const
|
|
918
|
-
const l = `dialog${
|
|
919
|
-
|
|
864
|
+
let M = P({}), qe = 0;
|
|
865
|
+
const ne = [], He = (e, t) => {
|
|
866
|
+
const l = `dialog${qe += 1}`;
|
|
867
|
+
M = P({
|
|
920
868
|
setup() {
|
|
921
|
-
const f =
|
|
922
|
-
f.value =
|
|
869
|
+
const f = R(!0), n = (c) => {
|
|
870
|
+
f.value = c;
|
|
923
871
|
};
|
|
924
|
-
return () =>
|
|
925
|
-
|
|
872
|
+
return () => Y(
|
|
873
|
+
te,
|
|
926
874
|
{
|
|
927
875
|
modelValue: f.value,
|
|
928
876
|
"onUpdate:modelValue": n,
|
|
929
877
|
...e,
|
|
930
878
|
onAfterLeave: () => {
|
|
931
|
-
|
|
879
|
+
We(l);
|
|
932
880
|
}
|
|
933
881
|
},
|
|
934
882
|
{ ...t }
|
|
935
883
|
);
|
|
936
884
|
}
|
|
937
885
|
});
|
|
938
|
-
const
|
|
939
|
-
|
|
940
|
-
},
|
|
941
|
-
|
|
886
|
+
const u = document.createElement("div");
|
|
887
|
+
ne.push({ id: l, app: M, el: u }), M.mount(u);
|
|
888
|
+
}, We = (e) => {
|
|
889
|
+
ne.forEach((t) => {
|
|
942
890
|
e === t.id && t.app.unmount();
|
|
943
891
|
});
|
|
944
892
|
};
|
|
945
|
-
|
|
946
|
-
const { name: t } = O;
|
|
947
|
-
e.component(t, O), e.provide("dialog", Ge);
|
|
948
|
-
};
|
|
893
|
+
const Je = B(te);
|
|
949
894
|
export {
|
|
950
|
-
|
|
951
|
-
|
|
895
|
+
He as createDialog,
|
|
896
|
+
Je as default
|
|
952
897
|
};
|