y-design-ssr 1.1.9 → 1.1.11
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/dialog/index.d.ts +9 -0
- package/libs/dialog/index.mjs +117 -111
- package/libs/dialog/index.umd.js +2 -2
- package/libs/dialog/src/dialog.d.ts +14 -1
- package/libs/index.mjs +132 -126
- package/libs/index.umd.js +1 -1
- package/package.json +1 -1
package/libs/dialog/index.d.ts
CHANGED
|
@@ -72,6 +72,10 @@ declare const Dialog: import("../utils/withInstall").WithInstall<import("vue").D
|
|
|
72
72
|
type: NumberConstructor;
|
|
73
73
|
default: number;
|
|
74
74
|
};
|
|
75
|
+
onClickMask: {
|
|
76
|
+
type: import("vue").PropType<(event: import("vue").Events) => void>;
|
|
77
|
+
default: null;
|
|
78
|
+
};
|
|
75
79
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, "update:modelValue" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
76
80
|
modelValue: {
|
|
77
81
|
type: BooleanConstructor;
|
|
@@ -145,11 +149,16 @@ declare const Dialog: import("../utils/withInstall").WithInstall<import("vue").D
|
|
|
145
149
|
type: NumberConstructor;
|
|
146
150
|
default: number;
|
|
147
151
|
};
|
|
152
|
+
onClickMask: {
|
|
153
|
+
type: import("vue").PropType<(event: import("vue").Events) => void>;
|
|
154
|
+
default: null;
|
|
155
|
+
};
|
|
148
156
|
}>>, {
|
|
149
157
|
title: string;
|
|
150
158
|
duration: number;
|
|
151
159
|
modelValue: boolean;
|
|
152
160
|
message: string;
|
|
161
|
+
onClickMask: (event: import("vue").Events) => void;
|
|
153
162
|
teleport: string;
|
|
154
163
|
isCloseOnClickMask: boolean;
|
|
155
164
|
width: string | number;
|
package/libs/dialog/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ref as D, reactive as P, defineComponent as x, onMounted as
|
|
2
|
-
const le = (e) => (t) => Object.prototype.toString.call(t) === `[object ${e}]`,
|
|
1
|
+
import { ref as D, reactive as P, defineComponent as x, onMounted as fe, onUnmounted as pe, watch as ee, createVNode as r, Transition as O, withDirectives as N, vShow as R, computed as j, Teleport as me, Fragment as te, createApp as T, h as ne, mergeProps as ge, resolveDirective as H, isVNode as ye } from "vue";
|
|
2
|
+
const le = (e) => (t) => Object.prototype.toString.call(t) === `[object ${e}]`, be = le("Function"), Se = le("Promise"), A = (e, t) => t ? typeof t == "string" ? ` ${e}--${t}` : Array.isArray(t) ? t.reduce((o, a) => o + A(e, a), "") : Object.keys(t).reduce(
|
|
3
3
|
(o, a) => o + (t[a] ? A(e, a) : ""),
|
|
4
4
|
""
|
|
5
|
-
) : "",
|
|
5
|
+
) : "", ke = (e) => (t, o) => {
|
|
6
6
|
let a = t, c = o;
|
|
7
7
|
return a && typeof a != "string" && (c = a, a = ""), a = a ? `${e}__${a}` : e, `${a}${A(a, c)}`;
|
|
8
|
-
}, ve = () => (e, t) => t ? `${A(`y-${e}`, t)}` : `y-${e}`,
|
|
8
|
+
}, ve = () => (e, t) => t ? `${A(`y-${e}`, t)}` : `y-${e}`, $e = {
|
|
9
9
|
"pull-refresh": {
|
|
10
10
|
pulling: "下拉刷新...",
|
|
11
11
|
loosing: "释放刷新...",
|
|
@@ -19,12 +19,12 @@ const le = (e) => (t) => Object.prototype.toString.call(t) === `[object ${e}]`,
|
|
|
19
19
|
};
|
|
20
20
|
D("zh-CN");
|
|
21
21
|
P({
|
|
22
|
-
"zh-CN":
|
|
22
|
+
"zh-CN": $e
|
|
23
23
|
});
|
|
24
24
|
const w = (e) => {
|
|
25
25
|
const t = `y-${e}`;
|
|
26
|
-
return [t,
|
|
27
|
-
}, y = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`,
|
|
26
|
+
return [t, ke(t), ve()];
|
|
27
|
+
}, y = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, Ce = (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
|
+
}, [he, xe, we] = w("mask"), Be = {
|
|
41
41
|
// 控制显示
|
|
42
42
|
modelValue: {
|
|
43
43
|
type: Boolean,
|
|
@@ -74,17 +74,17 @@ const w = (e) => {
|
|
|
74
74
|
}
|
|
75
75
|
}, S = P([]);
|
|
76
76
|
let J = 0;
|
|
77
|
-
const
|
|
78
|
-
name:
|
|
79
|
-
props:
|
|
77
|
+
const _e = /* @__PURE__ */ x({
|
|
78
|
+
name: he,
|
|
79
|
+
props: Be,
|
|
80
80
|
emits: ["update:modelValue"],
|
|
81
81
|
setup(e, {
|
|
82
82
|
slots: t
|
|
83
83
|
}) {
|
|
84
84
|
const o = D("");
|
|
85
|
-
|
|
85
|
+
fe(() => {
|
|
86
86
|
o.value = `mask${J}`, J += 1, a(e.modelValue, !0);
|
|
87
|
-
}),
|
|
87
|
+
}), pe(() => {
|
|
88
88
|
const l = S.findIndex((u) => u._id === o.value);
|
|
89
89
|
l >= 0 && S.splice(l, 1);
|
|
90
90
|
}), ee(() => e.modelValue, (l) => {
|
|
@@ -112,25 +112,25 @@ const Be = /* @__PURE__ */ x({
|
|
|
112
112
|
const {
|
|
113
113
|
customClass: l,
|
|
114
114
|
duration: u,
|
|
115
|
-
zIndex:
|
|
115
|
+
zIndex: m,
|
|
116
116
|
customStyle: g,
|
|
117
|
-
onAfterLeave:
|
|
117
|
+
onAfterLeave: p
|
|
118
118
|
} = e, {
|
|
119
119
|
_state: i
|
|
120
120
|
} = c();
|
|
121
121
|
return r(O, {
|
|
122
|
-
name:
|
|
123
|
-
onAfterLeave:
|
|
122
|
+
name: we("animation", "fade"),
|
|
123
|
+
onAfterLeave: p
|
|
124
124
|
}, {
|
|
125
125
|
default: () => {
|
|
126
126
|
var n;
|
|
127
127
|
return [N(r("div", {
|
|
128
128
|
style: {
|
|
129
129
|
animationDuration: `${u}ms`,
|
|
130
|
-
zIndex:
|
|
130
|
+
zIndex: m,
|
|
131
131
|
...g
|
|
132
132
|
},
|
|
133
|
-
class: [
|
|
133
|
+
class: [xe(), l],
|
|
134
134
|
onTouchmove: d
|
|
135
135
|
}, [(n = t.default) == null ? void 0 : n.call(t)]), [[R, i]])];
|
|
136
136
|
}
|
|
@@ -145,7 +145,7 @@ function B(e) {
|
|
|
145
145
|
a && o.component(a, e);
|
|
146
146
|
}, t;
|
|
147
147
|
}
|
|
148
|
-
const K = B(
|
|
148
|
+
const K = B(_e), [Ne, Q, X] = w("popup"), Ve = {
|
|
149
149
|
// 控制显示
|
|
150
150
|
modelValue: {
|
|
151
151
|
type: Boolean,
|
|
@@ -208,9 +208,9 @@ const K = B(Be), [_e, Q, X] = w("popup"), Ne = {
|
|
|
208
208
|
type: Number,
|
|
209
209
|
default: 100
|
|
210
210
|
}
|
|
211
|
-
},
|
|
212
|
-
name:
|
|
213
|
-
props:
|
|
211
|
+
}, Ie = /* @__PURE__ */ x({
|
|
212
|
+
name: Ne,
|
|
213
|
+
props: Ve,
|
|
214
214
|
emits: ["clickMask", "update:modelValue"],
|
|
215
215
|
setup(e, {
|
|
216
216
|
slots: t,
|
|
@@ -220,9 +220,9 @@ const K = B(Be), [_e, Q, X] = w("popup"), Ne = {
|
|
|
220
220
|
const {
|
|
221
221
|
position: l,
|
|
222
222
|
borderRadius: u,
|
|
223
|
-
customStyle:
|
|
223
|
+
customStyle: m,
|
|
224
224
|
duration: g,
|
|
225
|
-
zIndex:
|
|
225
|
+
zIndex: p
|
|
226
226
|
} = e, i = y(u);
|
|
227
227
|
let n = "0";
|
|
228
228
|
switch (l) {
|
|
@@ -244,8 +244,8 @@ const K = B(Be), [_e, Q, X] = w("popup"), Ne = {
|
|
|
244
244
|
return {
|
|
245
245
|
borderRadius: n,
|
|
246
246
|
animationDuration: `${g}ms`,
|
|
247
|
-
...
|
|
248
|
-
zIndex:
|
|
247
|
+
...m,
|
|
248
|
+
zIndex: p + 1
|
|
249
249
|
};
|
|
250
250
|
}), c = (l) => {
|
|
251
251
|
o("clickMask", l), e.isCloseOnClickMask && (d.value = !1);
|
|
@@ -259,9 +259,9 @@ const K = B(Be), [_e, Q, X] = w("popup"), Ne = {
|
|
|
259
259
|
const {
|
|
260
260
|
teleport: l,
|
|
261
261
|
position: u,
|
|
262
|
-
customClass:
|
|
262
|
+
customClass: m,
|
|
263
263
|
duration: g,
|
|
264
|
-
onAfterLeave:
|
|
264
|
+
onAfterLeave: p,
|
|
265
265
|
lockScroll: i,
|
|
266
266
|
zIndex: n,
|
|
267
267
|
maskCustomClass: f,
|
|
@@ -276,7 +276,7 @@ const K = B(Be), [_e, Q, X] = w("popup"), Ne = {
|
|
|
276
276
|
duration: g,
|
|
277
277
|
lockScroll: i,
|
|
278
278
|
onClick: c,
|
|
279
|
-
onAfterLeave:
|
|
279
|
+
onAfterLeave: p,
|
|
280
280
|
zIndex: n,
|
|
281
281
|
customClass: f,
|
|
282
282
|
customStyle: b
|
|
@@ -289,7 +289,7 @@ const K = B(Be), [_e, Q, X] = w("popup"), Ne = {
|
|
|
289
289
|
style: a.value,
|
|
290
290
|
class: [Q("content", {
|
|
291
291
|
[u]: u
|
|
292
|
-
}),
|
|
292
|
+
}), m]
|
|
293
293
|
}, [((s = t.default) == null ? void 0 : s.call(t)) || null]), [[R, d.value]])];
|
|
294
294
|
}
|
|
295
295
|
})]
|
|
@@ -299,7 +299,7 @@ const K = B(Be), [_e, Q, X] = w("popup"), Ne = {
|
|
|
299
299
|
duration: g,
|
|
300
300
|
lockScroll: i,
|
|
301
301
|
onClick: c,
|
|
302
|
-
onAfterLeave:
|
|
302
|
+
onAfterLeave: p,
|
|
303
303
|
zIndex: n,
|
|
304
304
|
customClass: f,
|
|
305
305
|
customStyle: b
|
|
@@ -312,15 +312,15 @@ const K = B(Be), [_e, Q, X] = w("popup"), Ne = {
|
|
|
312
312
|
style: a.value,
|
|
313
313
|
class: [Q("content", {
|
|
314
314
|
[u]: u
|
|
315
|
-
}),
|
|
315
|
+
}), m]
|
|
316
316
|
}, [((s = t.default) == null ? void 0 : s.call(t)) || null]), [[R, d.value]])];
|
|
317
317
|
}
|
|
318
318
|
})]);
|
|
319
319
|
};
|
|
320
320
|
}
|
|
321
321
|
});
|
|
322
|
-
const
|
|
323
|
-
name:
|
|
322
|
+
const ze = B(Ie), [Ae, z] = w("icon"), Me = (e) => new RegExp(/\.(https|png|jpg|gif|jpeg|webp|apng)$/).test(e.toLowerCase()), Le = /* @__PURE__ */ x({
|
|
323
|
+
name: Ae,
|
|
324
324
|
props: {
|
|
325
325
|
dot: {
|
|
326
326
|
type: Boolean,
|
|
@@ -371,7 +371,7 @@ const Ie = B(Ve), [ze, z] = w("icon"), Ae = (e) => new RegExp(/\.(https|png|jpg|
|
|
|
371
371
|
slots: t,
|
|
372
372
|
emit: o
|
|
373
373
|
}) {
|
|
374
|
-
const a =
|
|
374
|
+
const a = Me(e.name), c = () => ({
|
|
375
375
|
fontSize: y(e.size),
|
|
376
376
|
color: e.color
|
|
377
377
|
}), d = (l) => {
|
|
@@ -381,9 +381,9 @@ const Ie = B(Ve), [ze, z] = w("icon"), Ae = (e) => new RegExp(/\.(https|png|jpg|
|
|
|
381
381
|
const {
|
|
382
382
|
name: l,
|
|
383
383
|
classPrefix: u,
|
|
384
|
-
badge:
|
|
384
|
+
badge: m,
|
|
385
385
|
dot: g,
|
|
386
|
-
subColor:
|
|
386
|
+
subColor: p,
|
|
387
387
|
subBg: i,
|
|
388
388
|
tag: n
|
|
389
389
|
} = e;
|
|
@@ -405,20 +405,20 @@ const Ie = B(Ve), [ze, z] = w("icon"), Ae = (e) => new RegExp(/\.(https|png|jpg|
|
|
|
405
405
|
style: {
|
|
406
406
|
backgroundColor: i
|
|
407
407
|
}
|
|
408
|
-
}, null) : null,
|
|
408
|
+
}, null) : null, m ? r("em", {
|
|
409
409
|
class: z("badge"),
|
|
410
410
|
style: {
|
|
411
|
-
color:
|
|
411
|
+
color: p,
|
|
412
412
|
backgroundColor: i
|
|
413
413
|
}
|
|
414
|
-
}, [
|
|
414
|
+
}, [m]) : null, ((f = t.default) == null ? void 0 : f.call(t)) || null];
|
|
415
415
|
}
|
|
416
416
|
});
|
|
417
417
|
};
|
|
418
418
|
}
|
|
419
419
|
});
|
|
420
|
-
const
|
|
421
|
-
name:
|
|
420
|
+
const Oe = B(Le), [Re, _, je] = w("button"), De = /* @__PURE__ */ x({
|
|
421
|
+
name: Re,
|
|
422
422
|
props: {
|
|
423
423
|
// 标签
|
|
424
424
|
tag: {
|
|
@@ -497,45 +497,45 @@ const Me = B(Le), [Oe, _, Re] = w("button"), je = /* @__PURE__ */ x({
|
|
|
497
497
|
radius: d,
|
|
498
498
|
type: l,
|
|
499
499
|
size: u,
|
|
500
|
-
disabled:
|
|
500
|
+
disabled: m,
|
|
501
501
|
shadow: g,
|
|
502
|
-
block:
|
|
502
|
+
block: p,
|
|
503
503
|
square: i,
|
|
504
504
|
semicircle: n,
|
|
505
505
|
danger: f,
|
|
506
506
|
text: b,
|
|
507
507
|
supplementText: s
|
|
508
|
-
} = e,
|
|
508
|
+
} = e, v = t.default ? t.default() : b;
|
|
509
509
|
return c = l === "link" ? "a" : c, r(c, {
|
|
510
510
|
class: [_([l, u, {
|
|
511
|
-
block:
|
|
511
|
+
block: p,
|
|
512
512
|
square: i,
|
|
513
513
|
semicircle: n,
|
|
514
|
-
disabled:
|
|
515
|
-
}, (l === "primary" || l === "secondary") && g ? `shadow_${g}` : "", f ? `${l}_danger` : "",
|
|
514
|
+
disabled: m && c === "a"
|
|
515
|
+
}, (l === "primary" || l === "secondary") && g ? `shadow_${g}` : "", f ? `${l}_danger` : "", m ? `${l}_disabled` : ""]), je("el", "clickable")],
|
|
516
516
|
style: {
|
|
517
517
|
borderRadius: y(d)
|
|
518
518
|
},
|
|
519
|
-
disabled:
|
|
519
|
+
disabled: m,
|
|
520
520
|
onClick: a
|
|
521
521
|
}, {
|
|
522
522
|
default: () => {
|
|
523
523
|
var $, V;
|
|
524
524
|
return [r("div", {
|
|
525
525
|
class: _("content")
|
|
526
|
-
}, [(($ = t.leftIcon) == null ? void 0 : $.call(t)) || null,
|
|
526
|
+
}, [(($ = t.leftIcon) == null ? void 0 : $.call(t)) || null, v && r(te, null, [s ? r("div", {
|
|
527
527
|
class: _("text")
|
|
528
|
-
}, [r("p", null, [
|
|
528
|
+
}, [r("p", null, [v]), r("p", {
|
|
529
529
|
class: _("subtext")
|
|
530
530
|
}, [s])]) : r("span", {
|
|
531
531
|
class: _("text")
|
|
532
|
-
}, [
|
|
532
|
+
}, [v])]), ((V = t.rightIcon) == null ? void 0 : V.call(t)) || null])];
|
|
533
533
|
}
|
|
534
534
|
});
|
|
535
535
|
};
|
|
536
536
|
}
|
|
537
537
|
});
|
|
538
|
-
const Y = B(
|
|
538
|
+
const Y = B(De), [Pe, h] = w("loading"), Te = {
|
|
539
539
|
// Loading icon 的颜色
|
|
540
540
|
color: {
|
|
541
541
|
type: String,
|
|
@@ -595,13 +595,13 @@ const Y = B(je), [De, h] = w("loading"), Pe = {
|
|
|
595
595
|
default: "relative"
|
|
596
596
|
}
|
|
597
597
|
}, ae = /* @__PURE__ */ x({
|
|
598
|
-
name:
|
|
599
|
-
props:
|
|
598
|
+
name: Pe,
|
|
599
|
+
props: Te,
|
|
600
600
|
setup(e, {
|
|
601
601
|
slots: t
|
|
602
602
|
}) {
|
|
603
603
|
return () => {
|
|
604
|
-
var s,
|
|
604
|
+
var s, v;
|
|
605
605
|
const {
|
|
606
606
|
position: o,
|
|
607
607
|
textLocation: a,
|
|
@@ -609,9 +609,9 @@ const Y = B(je), [De, h] = w("loading"), Pe = {
|
|
|
609
609
|
bgBorderRadius: d,
|
|
610
610
|
size: l,
|
|
611
611
|
padding: u,
|
|
612
|
-
color:
|
|
612
|
+
color: m,
|
|
613
613
|
thick: g,
|
|
614
|
-
direction:
|
|
614
|
+
direction: p,
|
|
615
615
|
text: i,
|
|
616
616
|
textColor: n,
|
|
617
617
|
textSize: f
|
|
@@ -625,7 +625,7 @@ const Y = B(je), [De, h] = w("loading"), Pe = {
|
|
|
625
625
|
[o]: o !== "relative"
|
|
626
626
|
}),
|
|
627
627
|
style: {
|
|
628
|
-
flexDirection:
|
|
628
|
+
flexDirection: Ce(a),
|
|
629
629
|
backgroundColor: c,
|
|
630
630
|
borderRadius: y(d),
|
|
631
631
|
padding: y(u)
|
|
@@ -636,15 +636,15 @@ const Y = B(je), [De, h] = w("loading"), Pe = {
|
|
|
636
636
|
width: y(l),
|
|
637
637
|
height: y(l)
|
|
638
638
|
}
|
|
639
|
-
}, [((
|
|
639
|
+
}, [((v = t.icon) == null ? void 0 : v.call(t)) || r("svg", {
|
|
640
640
|
class: h("icon", {
|
|
641
|
-
[
|
|
641
|
+
[p]: p
|
|
642
642
|
}),
|
|
643
643
|
viewBox: "25 25 50 50"
|
|
644
644
|
}, [r("circle", {
|
|
645
645
|
class: h("icon-circle"),
|
|
646
646
|
style: {
|
|
647
|
-
stroke:
|
|
647
|
+
stroke: m,
|
|
648
648
|
strokeWidth: y(g)
|
|
649
649
|
},
|
|
650
650
|
cx: "50",
|
|
@@ -662,17 +662,17 @@ const Y = B(je), [De, h] = w("loading"), Pe = {
|
|
|
662
662
|
}, [b])])]);
|
|
663
663
|
};
|
|
664
664
|
}
|
|
665
|
-
}),
|
|
665
|
+
}), Fe = (e, t) => {
|
|
666
666
|
const a = T({
|
|
667
667
|
render: () => ne(ae, { ...e }, { ...t })
|
|
668
668
|
}), c = document.createElement("div");
|
|
669
669
|
return a.mount(c);
|
|
670
670
|
}, Z = (e, t) => {
|
|
671
671
|
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
|
-
},
|
|
672
|
+
}, Ue = {
|
|
673
673
|
getSSRProps: (e) => ({ ...e }),
|
|
674
674
|
mounted: (e, t) => {
|
|
675
|
-
e.instance =
|
|
675
|
+
e.instance = Fe({ ...e.customProps }, { ...e.customSlots }), t.value && Z(e, t);
|
|
676
676
|
},
|
|
677
677
|
updated: (e, t) => {
|
|
678
678
|
t.oldValue !== t.value && Z(e, t);
|
|
@@ -682,10 +682,10 @@ const Y = B(je), [De, h] = w("loading"), Pe = {
|
|
|
682
682
|
}
|
|
683
683
|
};
|
|
684
684
|
B(ae);
|
|
685
|
-
function
|
|
686
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
685
|
+
function Ee(e) {
|
|
686
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ye(e);
|
|
687
687
|
}
|
|
688
|
-
const [
|
|
688
|
+
const [qe, k] = w("dialog"), We = {
|
|
689
689
|
// 控制显示
|
|
690
690
|
modelValue: {
|
|
691
691
|
type: Boolean,
|
|
@@ -760,13 +760,17 @@ const [Ee, v] = w("dialog"), qe = {
|
|
|
760
760
|
duration: {
|
|
761
761
|
type: Number,
|
|
762
762
|
default: 300
|
|
763
|
+
},
|
|
764
|
+
onClickMask: {
|
|
765
|
+
type: Function,
|
|
766
|
+
default: null
|
|
763
767
|
}
|
|
764
768
|
}, oe = /* @__PURE__ */ x({
|
|
765
|
-
name:
|
|
769
|
+
name: qe,
|
|
766
770
|
directives: {
|
|
767
|
-
loading:
|
|
771
|
+
loading: Ue
|
|
768
772
|
},
|
|
769
|
-
props:
|
|
773
|
+
props: We,
|
|
770
774
|
emits: ["update:modelValue", "cancel", "confirm"],
|
|
771
775
|
setup(e, {
|
|
772
776
|
emit: t,
|
|
@@ -781,19 +785,19 @@ const [Ee, v] = w("dialog"), qe = {
|
|
|
781
785
|
var f;
|
|
782
786
|
c(!1), (f = e.callback) == null || f.call(e, n);
|
|
783
787
|
}, l = (n) => {
|
|
784
|
-
t("cancel", n,
|
|
788
|
+
t("cancel", n, m("cancel"));
|
|
785
789
|
}, u = (n) => {
|
|
786
|
-
t("confirm", n,
|
|
787
|
-
},
|
|
790
|
+
t("confirm", n, m("confirm"));
|
|
791
|
+
}, m = (n) => {
|
|
788
792
|
const {
|
|
789
793
|
modelValue: f,
|
|
790
794
|
beforeClose: b
|
|
791
795
|
} = e;
|
|
792
796
|
if (f)
|
|
793
|
-
if (
|
|
797
|
+
if (be(b)) {
|
|
794
798
|
a[n] = !0;
|
|
795
799
|
const s = b(n);
|
|
796
|
-
|
|
800
|
+
Se(s) ? s.then(($) => {
|
|
797
801
|
g($, n);
|
|
798
802
|
}).catch(($) => {
|
|
799
803
|
throw new Error($);
|
|
@@ -802,7 +806,7 @@ const [Ee, v] = w("dialog"), qe = {
|
|
|
802
806
|
d(n);
|
|
803
807
|
}, g = (n, f) => {
|
|
804
808
|
n && d(f), a[f] = !1;
|
|
805
|
-
},
|
|
809
|
+
}, p = (n, f, b) => {
|
|
806
810
|
let s = Number(n.substring(0, n.length - 2));
|
|
807
811
|
return s /= f || 2, b ? `${b(s)}px` : `${s}px`;
|
|
808
812
|
}, i = j({
|
|
@@ -815,26 +819,28 @@ const [Ee, v] = w("dialog"), qe = {
|
|
|
815
819
|
title: f,
|
|
816
820
|
titleAlign: b,
|
|
817
821
|
message: s,
|
|
818
|
-
messageAlign:
|
|
822
|
+
messageAlign: v,
|
|
819
823
|
isCloseOnClickMask: $,
|
|
820
824
|
showCloseIcon: V,
|
|
821
825
|
showCancelBtn: F,
|
|
822
|
-
cancelButtonText:
|
|
826
|
+
cancelButtonText: M,
|
|
823
827
|
showConfirmBtn: U,
|
|
824
828
|
confirmButtonText: ue,
|
|
825
829
|
imgSrc: E,
|
|
826
830
|
circleImg: C,
|
|
827
831
|
teleport: ce,
|
|
828
|
-
duration: ie
|
|
832
|
+
duration: ie,
|
|
833
|
+
onClickMask: se
|
|
829
834
|
} = e;
|
|
830
|
-
return r(
|
|
835
|
+
return r(ze, ge({
|
|
831
836
|
modelValue: i.value,
|
|
832
837
|
"onUpdate:modelValue": (I) => i.value = I,
|
|
833
|
-
customClass:
|
|
838
|
+
customClass: k(),
|
|
834
839
|
customStyle: {
|
|
835
840
|
width: y(n)
|
|
836
841
|
}
|
|
837
842
|
}, {
|
|
843
|
+
onClickMask: se,
|
|
838
844
|
"onUpdate:modelValue": c
|
|
839
845
|
}, {
|
|
840
846
|
isCloseOnClickMask: $,
|
|
@@ -844,59 +850,59 @@ const [Ee, v] = w("dialog"), qe = {
|
|
|
844
850
|
default: () => {
|
|
845
851
|
var I, q, W, G;
|
|
846
852
|
return [((I = o.img) == null ? void 0 : I.call(o)) || E && r("div", {
|
|
847
|
-
class:
|
|
853
|
+
class: k("img", {
|
|
848
854
|
circle: C
|
|
849
855
|
}),
|
|
850
856
|
style: {
|
|
851
|
-
top: C ? `-${
|
|
852
|
-
left: C ? `calc(50% - ${
|
|
857
|
+
top: C ? `-${p(y(n), 4)}` : "auto",
|
|
858
|
+
left: C ? `calc(50% - ${p(y(n), 4)})` : "auto"
|
|
853
859
|
}
|
|
854
860
|
}, [r("div", {
|
|
855
861
|
style: {
|
|
856
|
-
width: C ?
|
|
857
|
-
height:
|
|
862
|
+
width: C ? p(y(n)) : y(n),
|
|
863
|
+
height: p(y(n)),
|
|
858
864
|
background: `url(${E}) center`,
|
|
859
865
|
borderRadius: C ? "50%" : "20px 20px 0 0"
|
|
860
866
|
}
|
|
861
867
|
}, null)]), r("div", {
|
|
862
|
-
class:
|
|
868
|
+
class: k("container")
|
|
863
869
|
}, [r("div", {
|
|
864
870
|
style: {
|
|
865
|
-
height: C ?
|
|
871
|
+
height: C ? p(y(n), 4, (de) => de + 20) : "24px"
|
|
866
872
|
}
|
|
867
873
|
}, null), ((q = o.title) == null ? void 0 : q.call(o)) || r("div", {
|
|
868
|
-
class:
|
|
874
|
+
class: k("title"),
|
|
869
875
|
style: {
|
|
870
876
|
textAlign: b
|
|
871
877
|
}
|
|
872
878
|
}, [f]), r("div", {
|
|
873
|
-
class:
|
|
879
|
+
class: k("content")
|
|
874
880
|
}, [r("div", {
|
|
875
|
-
class:
|
|
881
|
+
class: k("message"),
|
|
876
882
|
style: {
|
|
877
|
-
textAlign:
|
|
883
|
+
textAlign: v
|
|
878
884
|
}
|
|
879
885
|
}, [((W = o.default) == null ? void 0 : W.call(o)) || s]), ((G = o.footer) == null ? void 0 : G.call(o)) || r("div", {
|
|
880
|
-
class:
|
|
886
|
+
class: k("footer"),
|
|
881
887
|
style: {
|
|
882
888
|
paddingTop: F || U ? "20px" : "0px"
|
|
883
889
|
}
|
|
884
890
|
}, [F && N(r(Y, {
|
|
885
891
|
type: "secondary",
|
|
886
|
-
class:
|
|
892
|
+
class: k("footer-btn"),
|
|
887
893
|
onClick: l
|
|
888
|
-
},
|
|
889
|
-
default: () => [
|
|
894
|
+
}, Ee(M) ? M : {
|
|
895
|
+
default: () => [M]
|
|
890
896
|
}), [[H("loading"), a.cancel]]), U && N(r(Y, {
|
|
891
897
|
type: "primary",
|
|
892
|
-
class:
|
|
898
|
+
class: k("footer-btn"),
|
|
893
899
|
onClick: u
|
|
894
900
|
}, {
|
|
895
901
|
default: () => [a.confirm ? "" : ue]
|
|
896
902
|
}), [[H("loading"), a.confirm]])])]), V && r("div", {
|
|
897
|
-
class:
|
|
903
|
+
class: k("close"),
|
|
898
904
|
onClick: () => d("close")
|
|
899
|
-
}, [r(
|
|
905
|
+
}, [r(Oe, {
|
|
900
906
|
name: "cross"
|
|
901
907
|
}, null)])])];
|
|
902
908
|
}
|
|
@@ -904,10 +910,10 @@ const [Ee, v] = w("dialog"), qe = {
|
|
|
904
910
|
};
|
|
905
911
|
}
|
|
906
912
|
});
|
|
907
|
-
let
|
|
908
|
-
const re = [],
|
|
909
|
-
const o = `dialog${
|
|
910
|
-
|
|
913
|
+
let L = T({}), Ge = 0;
|
|
914
|
+
const re = [], Ke = (e, t) => {
|
|
915
|
+
const o = `dialog${Ge += 1}`;
|
|
916
|
+
L = T({
|
|
911
917
|
setup() {
|
|
912
918
|
const d = D(!0), l = (u) => {
|
|
913
919
|
d.value = u;
|
|
@@ -919,7 +925,7 @@ const re = [], Je = (e, t) => {
|
|
|
919
925
|
"onUpdate:modelValue": l,
|
|
920
926
|
...e,
|
|
921
927
|
onAfterLeave: () => {
|
|
922
|
-
|
|
928
|
+
He(o);
|
|
923
929
|
}
|
|
924
930
|
},
|
|
925
931
|
{ ...t }
|
|
@@ -927,14 +933,14 @@ const re = [], Je = (e, t) => {
|
|
|
927
933
|
}
|
|
928
934
|
});
|
|
929
935
|
const c = document.createElement("div");
|
|
930
|
-
re.push({ id: o, app:
|
|
931
|
-
},
|
|
936
|
+
re.push({ id: o, app: L, el: c }), L.mount(c);
|
|
937
|
+
}, He = (e) => {
|
|
932
938
|
re.forEach((t) => {
|
|
933
939
|
e === t.id && t.app.unmount();
|
|
934
940
|
});
|
|
935
941
|
};
|
|
936
|
-
const
|
|
942
|
+
const Qe = B(oe);
|
|
937
943
|
export {
|
|
938
|
-
|
|
939
|
-
|
|
944
|
+
Ke as createDialog,
|
|
945
|
+
Qe as default
|
|
940
946
|
};
|