x-next 0.0.0-alpha.19 → 0.0.0-alpha.20
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/message/Message.d.ts +9 -3
- package/dist/components/message/MessageVue.vue.d.ts +362 -0
- package/dist/components/message/index.d.ts +15 -6
- package/dist/icons/icon.d.ts +2 -1
- package/dist/index.es.js +570 -438
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -2
- package/package.json +1 -1
- package/volar.d.ts +2 -2
package/dist/index.es.js
CHANGED
@@ -1,46 +1,46 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var
|
4
|
-
import { defineComponent as
|
5
|
-
const
|
6
|
-
const t =
|
1
|
+
var Ze = Object.defineProperty;
|
2
|
+
var Xe = (e, t, n) => t in e ? Ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
3
|
+
var M = (e, t, n) => Xe(e, typeof t != "symbol" ? t + "" : t, n);
|
4
|
+
import { defineComponent as E, computed as C, createVNode as r, h as A, reactive as xe, getCurrentInstance as Ue, ref as T, watch as de, onMounted as K, onBeforeUnmount as Oe, readonly as Re, Teleport as Ke, Transition as H, onUnmounted as fe, Comment as Ye, Fragment as _, render as N, isVNode as k, createTextVNode as O, resolveComponent as I, openBlock as B, createBlock as F, withCtx as Ge, withDirectives as qe, createElementVNode as Je, normalizeClass as re, normalizeStyle as Qe, createElementBlock as U, renderSlot as ke, createCommentVNode as oe, toDisplayString as et, vShow as tt } from "vue";
|
5
|
+
const nt = "X", lt = "x", Ne = (e) => e ? lt + "-" + e : e || "", S = (e) => nt + e, p = (e) => {
|
6
|
+
const t = Ne(e);
|
7
7
|
return {
|
8
8
|
block: t,
|
9
|
-
element: (
|
10
|
-
modifier: (
|
11
|
-
is: (
|
9
|
+
element: (s) => `${t}--${s}`,
|
10
|
+
modifier: (s) => `${t}-${s}`,
|
11
|
+
is: (s) => `${t}-is-${s}`
|
12
12
|
};
|
13
|
-
},
|
14
|
-
function
|
15
|
-
return
|
13
|
+
}, W = Object.prototype.toString;
|
14
|
+
function Te(e) {
|
15
|
+
return W.call(e) === "[object Array]";
|
16
16
|
}
|
17
|
-
function
|
18
|
-
return
|
17
|
+
function Ee(e) {
|
18
|
+
return W.call(e) === "[object Object]";
|
19
19
|
}
|
20
|
-
const
|
21
|
-
function
|
22
|
-
return
|
20
|
+
const Me = (e) => W.call(e) === "[object Promise]", rt = (e) => b(e) && e.constructor.name === "AsyncFunction", ot = (e) => Me(e) || rt(e);
|
21
|
+
function Fe(e) {
|
22
|
+
return W.call(e) === "[object String]";
|
23
23
|
}
|
24
|
-
function
|
25
|
-
return
|
24
|
+
function at(e) {
|
25
|
+
return W.call(e) === "[object Number]" && e === e;
|
26
26
|
}
|
27
27
|
function b(e) {
|
28
28
|
return typeof e == "function";
|
29
29
|
}
|
30
|
-
function
|
30
|
+
function Y() {
|
31
31
|
return typeof window < "u";
|
32
32
|
}
|
33
|
-
const
|
34
|
-
var l,
|
33
|
+
const j = (e) => e, st = (e) => !!(e && e.shapeFlag & 1), ct = (e, t) => !!(e && e.shapeFlag & 6), it = (e, t) => !!(e && e.shapeFlag & 8), ut = (e, t) => !!(e && e.shapeFlag & 16), dt = (e, t) => !!(e && e.shapeFlag & 32), R = (e, t = !1) => {
|
34
|
+
var l, a;
|
35
35
|
const n = [];
|
36
|
-
for (const
|
37
|
-
|
36
|
+
for (const s of e ?? [])
|
37
|
+
st(s) || ct(s) || t && it(s, s.children) ? n.push(s) : ut(s, s.children) ? n.push(...R(s.children, t)) : dt(s, s.children) ? n.push(...R((a = (l = s.children).default) == null ? void 0 : a.call(l), t)) : Te(s) && n.push(...R(s, t));
|
38
38
|
return n;
|
39
|
-
},
|
39
|
+
}, $ = (e, t) => Object.assign(t, {
|
40
40
|
install(n) {
|
41
41
|
n.component(e) || n.component(e, t);
|
42
42
|
}
|
43
|
-
}),
|
43
|
+
}), ft = {
|
44
44
|
disabled: Boolean,
|
45
45
|
block: Boolean,
|
46
46
|
loading: Boolean,
|
@@ -53,7 +53,7 @@ const z = (e) => e, Ye = (e) => !!(e && e.shapeFlag & 1), Ge = (e, t) => !!(e &&
|
|
53
53
|
default: 0
|
54
54
|
},
|
55
55
|
shape: {
|
56
|
-
type:
|
56
|
+
type: j(String),
|
57
57
|
default: void 0
|
58
58
|
},
|
59
59
|
link: {
|
@@ -61,11 +61,11 @@ const z = (e) => e, Ye = (e) => !!(e && e.shapeFlag & 1), Ge = (e, t) => !!(e &&
|
|
61
61
|
default: !1
|
62
62
|
},
|
63
63
|
type: {
|
64
|
-
type:
|
64
|
+
type: j(String),
|
65
65
|
default: void 0
|
66
66
|
},
|
67
67
|
status: {
|
68
|
-
type:
|
68
|
+
type: j(String),
|
69
69
|
default: void 0
|
70
70
|
},
|
71
71
|
plain: {
|
@@ -73,21 +73,21 @@ const z = (e) => e, Ye = (e) => !!(e && e.shapeFlag & 1), Ge = (e, t) => !!(e &&
|
|
73
73
|
default: !1
|
74
74
|
},
|
75
75
|
size: {
|
76
|
-
type:
|
76
|
+
type: j(String),
|
77
77
|
default: "medium"
|
78
78
|
},
|
79
79
|
border: {
|
80
80
|
type: Boolean,
|
81
81
|
default: !0
|
82
82
|
}
|
83
|
-
},
|
83
|
+
}, mt = (e) => Fe(e) ? e.split("-").map((t) => t.charAt(0).toUpperCase() + t.slice(1)).join("") : "", gt = (e, t = "px") => {
|
84
84
|
if (e === void 0) return "";
|
85
85
|
const n = typeof e == "number" ? `${e}` : e;
|
86
|
-
return ["px", "%", "vh", "vw", "calc"].some((
|
86
|
+
return ["px", "%", "vh", "vw", "calc"].some((a) => n.includes(a)) ? n : n + t;
|
87
87
|
};
|
88
|
-
function
|
89
|
-
return /* @__PURE__ */
|
90
|
-
name:
|
88
|
+
function z(e, t) {
|
89
|
+
return /* @__PURE__ */ E({
|
90
|
+
name: Ne(`Icon${mt(e)}`),
|
91
91
|
props: {
|
92
92
|
size: {
|
93
93
|
type: [Number, String],
|
@@ -111,20 +111,20 @@ function A(e, t) {
|
|
111
111
|
}
|
112
112
|
},
|
113
113
|
setup(n) {
|
114
|
-
const l = "x-icon",
|
114
|
+
const l = "x-icon", a = C(() => {
|
115
115
|
const d = {};
|
116
|
-
return n.size && (d.fontSize =
|
117
|
-
}),
|
116
|
+
return n.size && (d.fontSize = gt(n.size)), n.rotate && (d.transform = `rotate(${n.rotate}deg)`), n.color && (d.color = n.color), d;
|
117
|
+
}), s = C(() => [l, {
|
118
118
|
[`${l}-loading`]: n.spin
|
119
119
|
}]);
|
120
120
|
return () => r("div", {
|
121
|
-
class:
|
122
|
-
style:
|
121
|
+
class: s.value,
|
122
|
+
style: a.value
|
123
123
|
}, [t]);
|
124
124
|
}
|
125
125
|
});
|
126
126
|
}
|
127
|
-
const
|
127
|
+
const yt = z("InfoCircleFill", A(r("svg", {
|
128
128
|
viewBox: "0 0 50 50",
|
129
129
|
class: "x-icon-loading-svg"
|
130
130
|
}, [r("circle", {
|
@@ -134,9 +134,9 @@ const lt = A("InfoCircleFill", E(r("svg", {
|
|
134
134
|
class: "path",
|
135
135
|
fill: "none",
|
136
136
|
stroke: "currentColor"
|
137
|
-
}, null)]))),
|
137
|
+
}, null)]))), ht = /* @__PURE__ */ E({
|
138
138
|
name: "Button",
|
139
|
-
props:
|
139
|
+
props: ft,
|
140
140
|
emits: ["click"],
|
141
141
|
// 显式导入插槽
|
142
142
|
$slots: ["prefix", "suffix"],
|
@@ -144,161 +144,157 @@ const lt = A("InfoCircleFill", E(r("svg", {
|
|
144
144
|
slots: t,
|
145
145
|
emit: n
|
146
146
|
}) {
|
147
|
-
const l =
|
147
|
+
const l = xe({
|
148
148
|
clicked: !1,
|
149
149
|
isDebounce: !1
|
150
|
-
}),
|
150
|
+
}), a = p("button"), s = C(() => [a.block, e.type && a.modifier(e.type), e.status && a.modifier(e.status), e.disabled && a.is("disabled"), e.block && a.modifier("block"), e.plain && a.is("plain"), e.shape && a.modifier(e.shape), e.link && a.modifier("is-link"), e.size && a.modifier(e.size), !e.border && a.modifier("is-hide-border"), o.value && a.modifier("is-loading")]), d = () => {
|
151
151
|
e.debounce > 0 && !l.isDebounce && (l.isDebounce = !0, setTimeout(() => {
|
152
152
|
l.isDebounce = !1;
|
153
153
|
}, e.debounce));
|
154
|
-
},
|
155
|
-
const u = i
|
156
|
-
|
154
|
+
}, o = C(() => e.loading || l.clicked || l.isDebounce), m = Ue(), f = (c, i) => {
|
155
|
+
const u = c(i);
|
156
|
+
ot(u) && (l.clicked = !0, u.finally(() => {
|
157
157
|
l.clicked = !1;
|
158
158
|
}));
|
159
|
-
}, y = (
|
159
|
+
}, y = (c) => {
|
160
160
|
var u, v, g, w;
|
161
|
-
if (
|
161
|
+
if (c.stopPropagation(), (v = (u = c.target).blur) == null || v.call(u), o.value) return;
|
162
162
|
d();
|
163
|
-
const
|
164
|
-
if (
|
165
|
-
|
166
|
-
else if (b(
|
167
|
-
|
163
|
+
const i = (w = (g = m == null ? void 0 : m.vnode) == null ? void 0 : g.props) == null ? void 0 : w.onClick;
|
164
|
+
if (Te(i))
|
165
|
+
i.forEach((ne) => f(ne, c));
|
166
|
+
else if (b(i)) {
|
167
|
+
f(i, c);
|
168
168
|
return;
|
169
169
|
}
|
170
170
|
};
|
171
171
|
return () => {
|
172
|
-
var
|
172
|
+
var c;
|
173
173
|
return r("button", {
|
174
|
-
class:
|
174
|
+
class: s.value,
|
175
175
|
type: "button",
|
176
176
|
disabled: e.disabled,
|
177
177
|
onClick: y
|
178
178
|
}, [r("span", {
|
179
179
|
style: {
|
180
|
-
display:
|
181
|
-
marginRight:
|
180
|
+
display: o.value ? "flex" : "none",
|
181
|
+
marginRight: o.value ? "4px" : "0px"
|
182
182
|
},
|
183
|
-
class:
|
184
|
-
}, [r(
|
185
|
-
class:
|
183
|
+
class: a.element("loading")
|
184
|
+
}, [r(yt, null, null)]), t.prefix && r("span", {
|
185
|
+
class: a.element("prefix")
|
186
186
|
}, [t.prefix()]), r("span", {
|
187
|
-
class:
|
188
|
-
}, [(
|
189
|
-
class:
|
187
|
+
class: a.element("content")
|
188
|
+
}, [(c = t.default) == null ? void 0 : c.call(t)]), t.suffix && r("span", {
|
189
|
+
class: a.element("suffix")
|
190
190
|
}, [t.suffix()])]);
|
191
191
|
};
|
192
192
|
}
|
193
|
-
}),
|
193
|
+
}), V = $(S("Button"), ht), vt = ["px", "%", "vh", "vw", "calc"], be = (e, t = "px") => {
|
194
194
|
if (e === void 0) return "";
|
195
195
|
const n = String(e);
|
196
|
-
return
|
197
|
-
},
|
198
|
-
class
|
196
|
+
return vt.some((l) => n.includes(l)) ? n : n + t;
|
197
|
+
}, Ct = 1e3, kt = 3e3, bt = 1;
|
198
|
+
class wt {
|
199
199
|
constructor() {
|
200
|
-
|
200
|
+
M(this, "popupStack", {
|
201
201
|
popup: /* @__PURE__ */ new Set(),
|
202
202
|
dialog: /* @__PURE__ */ new Set(),
|
203
203
|
message: /* @__PURE__ */ new Set()
|
204
204
|
});
|
205
|
-
|
206
|
-
|
205
|
+
M(this, "getNextZIndex", (t) => (t === "message" ? Array.from(this.popupStack.message).pop() || kt : Array.from(this.popupStack.popup).pop() || Ct) + bt);
|
206
|
+
M(this, "add", (t) => {
|
207
207
|
const n = this.getNextZIndex(t);
|
208
208
|
return this.popupStack[t].add(n), t === "dialog" && this.popupStack.popup.add(n), n;
|
209
209
|
});
|
210
|
-
|
210
|
+
M(this, "delete", (t, n) => {
|
211
211
|
this.popupStack[n].delete(t), n === "dialog" && this.popupStack.popup.delete(t);
|
212
212
|
});
|
213
|
-
|
213
|
+
M(this, "isLastDialog", (t) => this.popupStack.dialog.size > 1 ? t === Array.from(this.popupStack.dialog).pop() : !0);
|
214
214
|
}
|
215
215
|
}
|
216
|
-
const
|
217
|
-
function
|
216
|
+
const ae = new wt();
|
217
|
+
function G(e, {
|
218
218
|
visible: t,
|
219
219
|
runOnMounted: n
|
220
220
|
} = {}) {
|
221
|
-
const l =
|
222
|
-
l.value =
|
223
|
-
},
|
224
|
-
|
225
|
-
}, d = () => e === "dialog" ?
|
226
|
-
return
|
221
|
+
const l = T(0), a = () => {
|
222
|
+
l.value = ae.add(e);
|
223
|
+
}, s = () => {
|
224
|
+
ae.delete(l.value, e);
|
225
|
+
}, d = () => e === "dialog" ? ae.isLastDialog(l.value) : !1;
|
226
|
+
return de(
|
227
227
|
() => t == null ? void 0 : t.value,
|
228
|
-
(
|
229
|
-
|
228
|
+
(o) => {
|
229
|
+
o ? a() : s();
|
230
230
|
},
|
231
231
|
{
|
232
232
|
immediate: !0
|
233
233
|
}
|
234
|
-
), n && (
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
})), {
|
239
|
-
zIndex: He(l),
|
240
|
-
open: s,
|
241
|
-
close: o,
|
234
|
+
), n && (K(a), Oe(s)), {
|
235
|
+
zIndex: Re(l),
|
236
|
+
open: a,
|
237
|
+
close: s,
|
242
238
|
isLastDialog: d
|
243
239
|
};
|
244
240
|
}
|
245
|
-
const
|
246
|
-
},
|
247
|
-
if (
|
241
|
+
const Ae = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t, n) => (n == null ? void 0 : n.toUpperCase()) ?? ""), $e = () => {
|
242
|
+
}, Bt = (e, t) => {
|
243
|
+
if (Y)
|
248
244
|
return (t ?? document).querySelector(e) ?? void 0;
|
249
|
-
},
|
245
|
+
}, St = (e) => {
|
250
246
|
if (e.tagName === "BODY")
|
251
247
|
return window.innerWidth - (document.documentElement.offsetWidth || document.body.offsetWidth);
|
252
248
|
const { borderLeftWidth: t, borderRightWidth: n } = window.getComputedStyle(e), l = Number(t.replace("px", "")) + Number(n.replace("px", ""));
|
253
249
|
return e.offsetWidth - (e.clientWidth + l);
|
254
|
-
},
|
250
|
+
}, pt = (e) => e.tagName === "BODY" ? document.documentElement.scrollHeight > window.innerHeight : e.scrollHeight > e.offsetHeight, xt = (e, t) => {
|
255
251
|
var l;
|
256
|
-
if (!
|
257
|
-
let n =
|
252
|
+
if (!Y || !e || !t) return "";
|
253
|
+
let n = Ae(t);
|
258
254
|
n === "float" && (n = "cssFloat");
|
259
255
|
try {
|
260
|
-
const
|
261
|
-
if (
|
262
|
-
const
|
263
|
-
return
|
256
|
+
const a = e.style[n];
|
257
|
+
if (a) return a;
|
258
|
+
const s = (l = document.defaultView) == null ? void 0 : l.getComputedStyle(e, "");
|
259
|
+
return s ? s[n] : "";
|
264
260
|
} catch {
|
265
261
|
return e.style[n];
|
266
262
|
}
|
267
|
-
},
|
263
|
+
}, P = (e, t, n) => {
|
268
264
|
if (!(!e || !t))
|
269
|
-
if (
|
265
|
+
if (Ee(t))
|
270
266
|
Object.entries(t).forEach(
|
271
|
-
([l,
|
267
|
+
([l, a]) => P(e, l, a)
|
272
268
|
);
|
273
269
|
else {
|
274
|
-
const l =
|
270
|
+
const l = Ae(t);
|
275
271
|
e.style[l] = n;
|
276
272
|
}
|
277
|
-
},
|
278
|
-
if (
|
273
|
+
}, me = (e, t) => {
|
274
|
+
if (Fe(e)) {
|
279
275
|
const n = e[0] === "#" ? `[id='${e.slice(1)}']` : e;
|
280
|
-
return
|
276
|
+
return Bt(n, t);
|
281
277
|
}
|
282
278
|
return e;
|
283
|
-
},
|
279
|
+
}, Ot = Y ? (e, t, n, l = !1) => {
|
284
280
|
e.addEventListener(t, n, l);
|
285
|
-
} :
|
281
|
+
} : $e, Nt = Y ? (e, t, n, l = !1) => {
|
286
282
|
e.removeEventListener(t, n, l);
|
287
|
-
} :
|
283
|
+
} : $e, Tt = (e, t) => {
|
288
284
|
let n = !1;
|
289
285
|
const l = {
|
290
286
|
overflow: "",
|
291
287
|
width: ""
|
292
|
-
},
|
288
|
+
}, a = (o) => o.tagName === "BODY", s = () => {
|
293
289
|
if (e.value) {
|
294
|
-
const
|
295
|
-
if (!n &&
|
296
|
-
const
|
297
|
-
if (
|
298
|
-
l.overflow =
|
299
|
-
let
|
300
|
-
|
301
|
-
width: `calc(100% - ${Math.ceil(
|
290
|
+
const o = e.value;
|
291
|
+
if (!n && o.style.overflow !== "hidden") {
|
292
|
+
const m = St(o);
|
293
|
+
if (m > 0 || pt(o)) {
|
294
|
+
l.overflow = o.style.overflow, l.width = o.style.width;
|
295
|
+
let f = 0;
|
296
|
+
a(o) && (f = o.getBoundingClientRect().left || 0), P(o, {
|
297
|
+
width: `calc(100% - ${Math.ceil(m - f)}px)`,
|
302
298
|
overflow: "hidden"
|
303
299
|
}), n = !0;
|
304
300
|
}
|
@@ -306,25 +302,25 @@ const Oe = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
306
302
|
}
|
307
303
|
}, d = () => {
|
308
304
|
if (e.value && n) {
|
309
|
-
const
|
310
|
-
|
305
|
+
const o = e.value;
|
306
|
+
P(o, {
|
311
307
|
overflow: l.overflow,
|
312
308
|
width: l.width
|
313
309
|
}), n = !1;
|
314
310
|
}
|
315
311
|
};
|
316
|
-
return
|
312
|
+
return de(
|
317
313
|
() => t == null ? void 0 : t.value,
|
318
|
-
(
|
319
|
-
e.value && !
|
314
|
+
(o) => {
|
315
|
+
e.value && !a(e.value) && (o && P(o, {
|
320
316
|
position: "absolute"
|
321
|
-
}),
|
317
|
+
}), xt(e.value, "position") === "static" && P(e.value, { position: "relative" }));
|
322
318
|
}
|
323
319
|
), {
|
324
|
-
setOverflowHidden:
|
320
|
+
setOverflowHidden: s,
|
325
321
|
resetOverflow: d
|
326
322
|
};
|
327
|
-
},
|
323
|
+
}, Et = {
|
328
324
|
ENTER: "Enter",
|
329
325
|
ESC: "Escape",
|
330
326
|
BACKSPACE: "Backspace",
|
@@ -334,9 +330,9 @@ const Oe = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
334
330
|
ARROW_DOWN: "ArrowDown",
|
335
331
|
ARROW_LEFT: "ArrowLeft",
|
336
332
|
ARROW_RIGHT: "ArrowRight"
|
337
|
-
},
|
333
|
+
}, Mt = {
|
338
334
|
renderTo: {
|
339
|
-
type:
|
335
|
+
type: j([String, Object]),
|
340
336
|
default: "body"
|
341
337
|
},
|
342
338
|
disabled: {
|
@@ -420,78 +416,80 @@ const Oe = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
420
416
|
type: Boolean,
|
421
417
|
default: !1
|
422
418
|
}
|
423
|
-
},
|
424
|
-
name:
|
419
|
+
}, Ft = ["width", "minWidth", "height", "minHeight"], ze = /* @__PURE__ */ E({
|
420
|
+
name: S("Dialog"),
|
425
421
|
inheritAttrs: !1,
|
426
|
-
props:
|
422
|
+
props: Mt,
|
427
423
|
emits: ["closed", "close", "open", "opened", "update:modelValue"],
|
428
424
|
setup(e, {
|
429
425
|
emit: t,
|
430
426
|
slots: n
|
431
427
|
}) {
|
432
|
-
const l =
|
428
|
+
const l = p("dialog"), a = l.block, s = p("message-box");
|
429
|
+
s.block;
|
430
|
+
const d = C(() => [a, e.messageBox && "is-message-box", e.popupClass && e.popupClass]), o = C(() => me(e.renderTo)), m = T(), f = C(() => e.disabled || !o.value), y = C(() => ({
|
433
431
|
zIndex: g.value
|
434
|
-
})),
|
432
|
+
})), c = C(() => {
|
435
433
|
const h = {};
|
436
|
-
return e.fullscreen || (!e.center && e.top && (h.top =
|
437
|
-
e[x] && (h[x] =
|
434
|
+
return e.fullscreen || (!e.center && e.top && (h.top = be(e.top)), Ft.forEach((x) => {
|
435
|
+
e[x] && (h[x] = be(e[x]));
|
438
436
|
})), h;
|
439
|
-
}),
|
437
|
+
}), i = T(!1), u = C(() => e.modelValue), v = C(() => u.value || i.value), {
|
440
438
|
zIndex: g,
|
441
439
|
isLastDialog: w
|
442
|
-
} =
|
440
|
+
} = G("dialog", {
|
443
441
|
visible: u
|
444
442
|
}), {
|
445
|
-
setOverflowHidden:
|
446
|
-
resetOverflow:
|
447
|
-
} =
|
443
|
+
setOverflowHidden: ne,
|
444
|
+
resetOverflow: ye
|
445
|
+
} = Tt(o, m), he = (h, x) => {
|
448
446
|
t("update:modelValue", !1), t("close", e.messageBox ? h : void 0, e.messageBox ? x : void 0);
|
449
|
-
},
|
450
|
-
|
451
|
-
},
|
447
|
+
}, Le = () => {
|
448
|
+
i.value = !1, ye(), t("closed");
|
449
|
+
}, je = () => {
|
452
450
|
t("opened");
|
453
|
-
},
|
451
|
+
}, Z = xe({
|
454
452
|
ok: !1,
|
455
453
|
cancel: !1
|
456
|
-
}),
|
457
|
-
let
|
458
|
-
if (
|
459
|
-
|
460
|
-
|
454
|
+
}), D = (h, x) => {
|
455
|
+
let X = !0;
|
456
|
+
if (Z[h] = !0, b(e.onBeforeCancel) && (X = e.onBeforeCancel(h) ?? !1), Me(X)) {
|
457
|
+
X.then((We) => {
|
458
|
+
Z[h] = !1, We && he(h, x);
|
461
459
|
});
|
462
460
|
return;
|
463
461
|
}
|
464
|
-
|
465
|
-
},
|
466
|
-
e.maskToClose && e.mask &&
|
467
|
-
},
|
468
|
-
|
469
|
-
},
|
470
|
-
|
462
|
+
Z[h] = !1, X && he(h, x);
|
463
|
+
}, Pe = () => {
|
464
|
+
e.maskToClose && e.mask && D("cancel");
|
465
|
+
}, He = (h) => {
|
466
|
+
D("cancel", h);
|
467
|
+
}, _e = (h) => {
|
468
|
+
D("ok", h);
|
471
469
|
};
|
472
|
-
let
|
473
|
-
const
|
474
|
-
e.escToClose && h.key ===
|
475
|
-
},
|
476
|
-
e.escToClose && !
|
477
|
-
},
|
478
|
-
|
470
|
+
let le = !1;
|
471
|
+
const ve = (h) => {
|
472
|
+
e.escToClose && h.key === Et.ESC && w() && D("cancel");
|
473
|
+
}, Ve = () => {
|
474
|
+
e.escToClose && !le && (le = !0, Ot(document.documentElement, "keydown", ve));
|
475
|
+
}, Ce = () => {
|
476
|
+
le = !1, Nt(document.documentElement, "keydown", ve);
|
479
477
|
};
|
480
|
-
return
|
481
|
-
|
482
|
-
}),
|
483
|
-
h ? (t("open"),
|
478
|
+
return Oe(() => {
|
479
|
+
ye(), Ce();
|
480
|
+
}), de(() => u.value, (h) => {
|
481
|
+
h ? (t("open"), ne(), i.value = !0, Ve()) : Ce();
|
484
482
|
}, {
|
485
483
|
immediate: !0
|
486
|
-
}), () => r(
|
487
|
-
to:
|
488
|
-
disabled:
|
484
|
+
}), () => r(Ke, {
|
485
|
+
to: o.value,
|
486
|
+
disabled: f.value
|
489
487
|
}, {
|
490
488
|
default: () => [v.value && r("div", {
|
491
|
-
ref:
|
489
|
+
ref: m,
|
492
490
|
class: d.value,
|
493
491
|
style: y.value
|
494
|
-
}, [r(
|
492
|
+
}, [r(H, {
|
495
493
|
name: "x-fade-in-standard",
|
496
494
|
appear: !0
|
497
495
|
}, {
|
@@ -502,38 +500,38 @@ const Oe = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
502
500
|
class: [l.element("wrapper"), {
|
503
501
|
"is-center": e.center
|
504
502
|
}],
|
505
|
-
onClick: (h) => h.target === h.currentTarget &&
|
506
|
-
}, [r(
|
503
|
+
onClick: (h) => h.target === h.currentTarget && Pe()
|
504
|
+
}, [r(H, {
|
507
505
|
name: "x-zoom-in",
|
508
506
|
appear: !0,
|
509
|
-
onAfterEnter:
|
510
|
-
onAfterLeave:
|
507
|
+
onAfterEnter: je,
|
508
|
+
onAfterLeave: Le
|
511
509
|
}, {
|
512
510
|
default: () => [u.value && r("div", {
|
513
511
|
class: [l.element("container"), {
|
514
512
|
"is-fullscreen": e.fullscreen
|
515
513
|
}],
|
516
|
-
style:
|
514
|
+
style: c.value
|
517
515
|
}, [r("div", {
|
518
|
-
class: [e.messageBox ?
|
516
|
+
class: [e.messageBox ? s.element("header") : l.element("header"), e.showHeaderBottomLine && "is-bottom-line"]
|
519
517
|
}, [n.title ? n.title() : r("div", {
|
520
518
|
class: [l.element("header-title")]
|
521
519
|
}, [e.title])]), r("div", {
|
522
|
-
class: [e.messageBox ?
|
520
|
+
class: [e.messageBox ? s.element("body") : l.element("body")]
|
523
521
|
}, [n.default && n.default()]), r("div", {
|
524
|
-
class: [e.messageBox ?
|
522
|
+
class: [e.messageBox ? s.element("footer") : l.element("footer")]
|
525
523
|
}, [n.footer && n.footer({
|
526
|
-
cancel:
|
527
|
-
ok:
|
528
|
-
"loading-obj":
|
524
|
+
cancel: He,
|
525
|
+
ok: _e,
|
526
|
+
"loading-obj": Z
|
529
527
|
})]), e.showClose && r("span", {
|
530
|
-
class: [l.element("close-icon"), e.messageBox &&
|
531
|
-
onClick: () =>
|
528
|
+
class: [l.element("close-icon"), e.messageBox && s.element("close-icon")],
|
529
|
+
onClick: () => D("cancel")
|
532
530
|
}, null)])]
|
533
531
|
})])])]
|
534
532
|
});
|
535
533
|
}
|
536
|
-
}),
|
534
|
+
}), De = $(S("Dialog"), ze), q = z("CloseCircleFill", A(r("svg", {
|
537
535
|
viewBox: "0 0 48 48",
|
538
536
|
fill: "none",
|
539
537
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -548,7 +546,7 @@ const Oe = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
548
546
|
d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm4.955-27.771-4.95 4.95-4.95-4.95a1 1 0 0 0-1.414 0l-1.414 1.414a1 1 0 0 0 0 1.414l4.95 4.95-4.95 4.95a1 1 0 0 0 0 1.414l1.414 1.414a1 1 0 0 0 1.414 0l4.95-4.95 4.95 4.95a1 1 0 0 0 1.414 0l1.414-1.414a1 1 0 0 0 0-1.414l-4.95-4.95 4.95-4.95a1 1 0 0 0 0-1.414l-1.414-1.414a1 1 0 0 0-1.414 0Z",
|
549
547
|
fill: "currentColor",
|
550
548
|
stroke: "none"
|
551
|
-
}, null)]))),
|
549
|
+
}, null)]))), J = z("CheckCircleFill", A(r("svg", {
|
552
550
|
viewBox: "0 0 48 48",
|
553
551
|
fill: "none",
|
554
552
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -563,7 +561,7 @@ const Oe = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
563
561
|
d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm10.207-24.379a1 1 0 0 0 0-1.414l-1.414-1.414a1 1 0 0 0-1.414 0L22 26.172l-4.878-4.88a1 1 0 0 0-1.415 0l-1.414 1.415a1 1 0 0 0 0 1.414l7 7a1 1 0 0 0 1.414 0l11.5-11.5Z",
|
564
562
|
fill: "currentColor",
|
565
563
|
stroke: "none"
|
566
|
-
}, null)]))),
|
564
|
+
}, null)]))), Q = z("ExclamationCircleFill", A(r("svg", {
|
567
565
|
viewBox: "0 0 48 48",
|
568
566
|
fill: "none",
|
569
567
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -578,7 +576,7 @@ const Oe = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
578
576
|
d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm2-30a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2Zm0 17h1a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h1v-8a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v11Z",
|
579
577
|
fill: "currentColor",
|
580
578
|
stroke: "none"
|
581
|
-
}, null)]))),
|
579
|
+
}, null)]))), ee = z("InfoCircleFill", A(r("svg", {
|
582
580
|
viewBox: "0 0 48 48",
|
583
581
|
fill: "none",
|
584
582
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -593,7 +591,7 @@ const Oe = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
593
591
|
d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm2-30a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2Zm0 17h1a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h1v-8a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v11Z",
|
594
592
|
fill: "currentColor",
|
595
593
|
stroke: "none"
|
596
|
-
}, null)]))),
|
594
|
+
}, null)]))), te = z("MinusCircleFill", A(r("svg", {
|
597
595
|
viewBox: "0 0 48 48",
|
598
596
|
fill: "none",
|
599
597
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -608,8 +606,8 @@ const Oe = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
608
606
|
d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm-7-22a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1H17Z",
|
609
607
|
fill: "currentColor",
|
610
608
|
stroke: "none"
|
611
|
-
}, null)]))),
|
612
|
-
name: "Message",
|
609
|
+
}, null)]))), At = /* @__PURE__ */ E({
|
610
|
+
name: S("Message"),
|
613
611
|
props: {
|
614
612
|
id: {
|
615
613
|
type: String,
|
@@ -648,7 +646,10 @@ const Oe = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
648
646
|
type: Boolean,
|
649
647
|
default: !1
|
650
648
|
},
|
651
|
-
useHTML:
|
649
|
+
useHTML: {
|
650
|
+
type: Boolean,
|
651
|
+
default: !1
|
652
|
+
},
|
652
653
|
popupClass: {
|
653
654
|
type: String,
|
654
655
|
default: void 0
|
@@ -659,64 +660,64 @@ const Oe = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
659
660
|
emit: t,
|
660
661
|
slots: n
|
661
662
|
}) {
|
662
|
-
const l =
|
663
|
-
|
664
|
-
|
665
|
-
d = setTimeout(() => {
|
666
|
-
o.value = !1;
|
667
|
-
}, e.duration);
|
668
|
-
};
|
669
|
-
Q(() => {
|
670
|
-
o.value = !0, e.duration !== 0 && a();
|
671
|
-
}), ke(() => {
|
672
|
-
d && clearTimeout(d);
|
673
|
-
});
|
674
|
-
const {
|
675
|
-
zIndex: f
|
676
|
-
} = ee("message", {
|
663
|
+
const l = p("message"), a = T(!1), s = T(null), d = C(() => [l.block, l.modifier(e.type), e.center && l.modifier("center"), e.showClose && !e.center && l.element("show-close"), e.popupClass]), {
|
664
|
+
zIndex: o
|
665
|
+
} = G("message", {
|
677
666
|
runOnMounted: !0
|
678
667
|
}), m = C(() => ({
|
679
668
|
top: `${e.offset}px`,
|
680
|
-
zIndex:
|
681
|
-
})),
|
682
|
-
|
683
|
-
}, i = () => {
|
684
|
-
if (n.icon)
|
685
|
-
return n.icon();
|
669
|
+
zIndex: o.value
|
670
|
+
})), f = () => {
|
671
|
+
if (n.icon) return n.icon();
|
686
672
|
switch (e.type) {
|
687
673
|
case "success":
|
688
|
-
return r(
|
674
|
+
return r(J, null, null);
|
689
675
|
case "warning":
|
690
|
-
return r(
|
676
|
+
return r(Q, null, null);
|
691
677
|
case "strong":
|
692
|
-
return r(
|
678
|
+
return r(te, null, null);
|
693
679
|
case "error":
|
694
|
-
return r(
|
680
|
+
return r(q, null, null);
|
695
681
|
case "info":
|
696
|
-
return r(
|
682
|
+
return r(ee, null, null);
|
697
683
|
default:
|
698
684
|
return null;
|
699
685
|
}
|
686
|
+
}, y = () => {
|
687
|
+
e.duration > 0 && (s.value = setTimeout(() => {
|
688
|
+
a.value = !1;
|
689
|
+
}, e.duration));
|
690
|
+
}, c = () => {
|
691
|
+
s.value && (clearTimeout(s.value), s.value = null);
|
692
|
+
};
|
693
|
+
K(() => {
|
694
|
+
a.value = !0, y();
|
695
|
+
}), fe(() => {
|
696
|
+
c();
|
697
|
+
});
|
698
|
+
const i = () => {
|
699
|
+
var u;
|
700
|
+
a.value = !1, c(), (u = e.onClose) == null || u.call(e);
|
700
701
|
};
|
701
|
-
return () => r(
|
702
|
+
return () => r(H, {
|
702
703
|
name: "x-message-slide-top",
|
703
704
|
onBeforeLeave: e.onClose,
|
704
705
|
onAfterLeave: () => t("destroy")
|
705
706
|
}, {
|
706
|
-
default: () => [
|
707
|
-
class:
|
707
|
+
default: () => [a.value && r("div", {
|
708
|
+
class: d.value,
|
708
709
|
style: m.value
|
709
710
|
}, [r("span", {
|
710
711
|
class: [l.element("icon"), l.modifier(`icon-${e.type}`)]
|
711
|
-
}, [
|
712
|
+
}, [f()]), r("div", null, [n.default ? n.default() : e.useHTML ? r("span", {
|
712
713
|
innerHTML: e.message
|
713
714
|
}, null) : r("span", null, [e.message]), e.showClose && r("span", {
|
714
715
|
class: l.element("close-icon"),
|
715
|
-
onClick:
|
716
|
+
onClick: i
|
716
717
|
}, null)])])]
|
717
718
|
});
|
718
719
|
}
|
719
|
-
}),
|
720
|
+
}), $t = $(S("Message"), At), zt = /* @__PURE__ */ E({
|
720
721
|
name: "Space",
|
721
722
|
props: {
|
722
723
|
direction: {
|
@@ -739,9 +740,9 @@ const Oe = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
739
740
|
setup(e, {
|
740
741
|
slots: t
|
741
742
|
}) {
|
742
|
-
const n =
|
743
|
-
function
|
744
|
-
if (
|
743
|
+
const n = p("space"), l = C(() => [n.block, n.element(e.direction), e.fill && "is-fill", n.element(`${e.direction}-${e.align}`)]);
|
744
|
+
function a(d) {
|
745
|
+
if (at(d))
|
745
746
|
return d;
|
746
747
|
switch (d) {
|
747
748
|
case "mini":
|
@@ -756,127 +757,127 @@ const Oe = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
756
757
|
return 8;
|
757
758
|
}
|
758
759
|
}
|
759
|
-
const
|
760
|
-
const
|
761
|
-
if (d) return
|
762
|
-
const
|
763
|
-
return e.direction === "horizontal" && (
|
760
|
+
const s = (d) => {
|
761
|
+
const o = {};
|
762
|
+
if (d) return o;
|
763
|
+
const m = `${a(e.size)}px`, f = `${a(e.size)}px`;
|
764
|
+
return e.direction === "horizontal" && (o.marginRight = m), e.direction === "vertical" && (o.marginBottom = f), o;
|
764
765
|
};
|
765
766
|
return () => {
|
766
|
-
var
|
767
|
-
const d =
|
767
|
+
var o;
|
768
|
+
const d = R((o = t.default) == null ? void 0 : o.call(t), !0).filter((m) => m.type !== Ye);
|
768
769
|
return r("div", {
|
769
770
|
class: [l.value]
|
770
|
-
}, [d.map((
|
771
|
-
var
|
772
|
-
const y = t.split &&
|
773
|
-
return r(
|
774
|
-
key: `space-item-${
|
771
|
+
}, [d.map((m, f) => {
|
772
|
+
var c;
|
773
|
+
const y = t.split && f > 0;
|
774
|
+
return r(_, {
|
775
|
+
key: `space-item-${f}`
|
775
776
|
}, [y && r("div", {
|
776
777
|
className: n.element("split"),
|
777
|
-
style:
|
778
|
-
}, [(
|
778
|
+
style: s(!1)
|
779
|
+
}, [(c = t.split) == null ? void 0 : c.call(t)]), r("div", {
|
779
780
|
className: n.element("item"),
|
780
|
-
style:
|
781
|
-
}, [
|
781
|
+
style: s(f === d.length - 1)
|
782
|
+
}, [m])]);
|
782
783
|
})]);
|
783
784
|
};
|
784
785
|
}
|
785
|
-
}),
|
786
|
-
function
|
786
|
+
}), ge = $(S("Space"), zt), Dt = ["info", "success", "warning", "strong", "error"];
|
787
|
+
function we(e) {
|
787
788
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !k(e);
|
788
789
|
}
|
789
|
-
const
|
790
|
+
const se = p("message-box"), ue = (e) => {
|
790
791
|
const t = document.createElement("div"), n = () => {
|
791
|
-
|
792
|
-
}, l = (
|
793
|
-
if (
|
792
|
+
N(null, t);
|
793
|
+
}, l = (i) => {
|
794
|
+
if (i === "cancel")
|
794
795
|
return e.beforeOnCancel ? e.beforeOnCancel() : !0;
|
795
|
-
if (
|
796
|
+
if (i === "ok")
|
796
797
|
return e.beforeOnOk ? e.beforeOnOk() : !0;
|
797
|
-
},
|
798
|
-
|
799
|
-
},
|
798
|
+
}, a = (i, u) => {
|
799
|
+
i === "cancel" && e.onCancel && e.onCancel(u), i === "ok" && e.onOk && e.onOk(u);
|
800
|
+
}, s = (i) => {
|
800
801
|
let u;
|
801
|
-
switch (
|
802
|
+
switch (i) {
|
802
803
|
case "warning":
|
803
|
-
u = r(
|
804
|
+
u = r(Q, {
|
804
805
|
size: "22px",
|
805
806
|
color: "#f6c64b"
|
806
807
|
}, null);
|
807
808
|
break;
|
808
809
|
case "strong":
|
809
|
-
u = r(
|
810
|
+
u = r(te, {
|
810
811
|
size: "22px",
|
811
812
|
color: "#ff7125"
|
812
813
|
}, null);
|
813
814
|
break;
|
814
815
|
case "error":
|
815
|
-
u = r(
|
816
|
+
u = r(q, {
|
816
817
|
size: "22px",
|
817
818
|
color: "#e24f48"
|
818
819
|
}, null);
|
819
820
|
break;
|
820
821
|
case "success":
|
821
|
-
u = r(
|
822
|
+
u = r(J, {
|
822
823
|
size: "22px",
|
823
824
|
color: "#68d1ab"
|
824
825
|
}, null);
|
825
826
|
break;
|
826
827
|
case "info":
|
827
|
-
u = r(
|
828
|
+
u = r(ee, {
|
828
829
|
size: "22px",
|
829
830
|
color: "#2355f5"
|
830
831
|
}, null);
|
831
832
|
break;
|
832
833
|
}
|
833
834
|
return r("div", {
|
834
|
-
class:
|
835
|
+
class: se.element("icon")
|
835
836
|
}, [u]);
|
836
|
-
}, d = (
|
837
|
-
if (k(
|
838
|
-
if (b(
|
839
|
-
const u =
|
837
|
+
}, d = (i) => {
|
838
|
+
if (k(i)) return i;
|
839
|
+
if (b(i)) {
|
840
|
+
const u = i();
|
840
841
|
return k(u) ? u : null;
|
841
842
|
}
|
842
843
|
return r("div", {
|
843
|
-
class:
|
844
|
-
}, [
|
845
|
-
},
|
846
|
-
if (k(
|
847
|
-
if (b(
|
848
|
-
const u =
|
844
|
+
class: se.element("title")
|
845
|
+
}, [O(" "), i, O(" ")]);
|
846
|
+
}, o = (i) => {
|
847
|
+
if (k(i)) return i;
|
848
|
+
if (b(i)) {
|
849
|
+
const u = i();
|
849
850
|
return k(u) ? u : null;
|
850
851
|
}
|
851
852
|
return r("div", {
|
852
|
-
class:
|
853
|
-
}, [
|
854
|
-
},
|
853
|
+
class: se.element("content")
|
854
|
+
}, [O(" "), e.content, O(" ")]);
|
855
|
+
}, m = () => () => r(_, null, [s(e.type || "success"), e.title && d(e.title)]), f = () => () => r(_, null, [e.content && o(e.content)]), y = () => {
|
855
856
|
if (k(e.footer) || b(e.footer))
|
856
857
|
return e.footer;
|
857
|
-
const
|
858
|
-
return (v) => r(
|
858
|
+
const i = (e == null ? void 0 : e.cancelText) || "取消", u = (e == null ? void 0 : e.okText) || "确认";
|
859
|
+
return (v) => r(ge, {
|
859
860
|
size: 12
|
860
861
|
}, {
|
861
862
|
default: () => {
|
862
863
|
var g, w;
|
863
|
-
return [!e.hideCancel && r(
|
864
|
+
return [!e.hideCancel && r(V, {
|
864
865
|
size: "small",
|
865
866
|
onClick: v.cancel,
|
866
867
|
loading: (g = v.loadingObj) == null ? void 0 : g.cancel
|
867
|
-
},
|
868
|
-
default: () => [
|
869
|
-
}), !e.hideOk && r(
|
868
|
+
}, we(i) ? i : {
|
869
|
+
default: () => [i]
|
870
|
+
}), !e.hideOk && r(V, {
|
870
871
|
type: "primary",
|
871
872
|
size: "small",
|
872
873
|
onClick: v.ok,
|
873
874
|
loading: (w = v.loadingObj) == null ? void 0 : w.ok
|
874
|
-
},
|
875
|
+
}, we(u) ? u : {
|
875
876
|
default: () => [u]
|
876
877
|
})];
|
877
878
|
}
|
878
879
|
});
|
879
|
-
},
|
880
|
+
}, c = r(De, {
|
880
881
|
messageBox: !0,
|
881
882
|
width: (e == null ? void 0 : e.width) ?? 358,
|
882
883
|
height: (e == null ? void 0 : e.height) ?? "auto",
|
@@ -887,53 +888,53 @@ const K = O("message-box"), q = (e) => {
|
|
887
888
|
mask: (e == null ? void 0 : e.mask) ?? !0,
|
888
889
|
maskToClose: (e == null ? void 0 : e.maskToClose) ?? !0,
|
889
890
|
popupClass: e.popupClass,
|
890
|
-
onClose:
|
891
|
+
onClose: a,
|
891
892
|
onBeforeCancel: l,
|
892
893
|
"onUpdate:modelValue": () => {
|
893
|
-
|
894
|
+
c.component.props.modelValue = !1;
|
894
895
|
},
|
895
896
|
// 等待动画完全结束后销毁vm
|
896
897
|
onClosed: n,
|
897
898
|
onOpened: () => {
|
898
899
|
}
|
899
900
|
}, {
|
900
|
-
title:
|
901
|
-
default:
|
901
|
+
title: m(),
|
902
|
+
default: f(),
|
902
903
|
footer: y()
|
903
904
|
});
|
904
|
-
|
905
|
-
},
|
906
|
-
|
907
|
-
|
908
|
-
const l = [],
|
909
|
-
let
|
905
|
+
N(c, t);
|
906
|
+
}, It = () => {
|
907
|
+
Dt.forEach((e) => {
|
908
|
+
ue[e] = (t, n) => {
|
909
|
+
const l = [], a = [];
|
910
|
+
let s = () => !0, d = () => !0;
|
910
911
|
return setTimeout(() => {
|
911
|
-
|
912
|
+
ue({
|
912
913
|
title: t,
|
913
914
|
content: n,
|
914
915
|
type: e,
|
915
916
|
beforeOnCancel: d,
|
916
|
-
beforeOnOk:
|
917
|
+
beforeOnOk: s,
|
917
918
|
onOk: () => {
|
918
|
-
l.forEach((
|
919
|
+
l.forEach((o) => b(o) && o());
|
919
920
|
},
|
920
921
|
onCancel: () => {
|
921
|
-
|
922
|
+
a.forEach((o) => b(o) && o());
|
922
923
|
}
|
923
924
|
});
|
924
925
|
}, 0), {
|
925
|
-
ok(...
|
926
|
-
return
|
926
|
+
ok(...o) {
|
927
|
+
return o.length === 1 && l.push(o[0]), o.length === 2 && (s = o[0], l.push(o[1])), this;
|
927
928
|
},
|
928
|
-
cancel(...
|
929
|
-
return
|
929
|
+
cancel(...o) {
|
930
|
+
return o.length === 1 && a.push(o[0]), o.length === 2 && (d = o[0], a.push(o[1])), this;
|
930
931
|
}
|
931
932
|
};
|
932
933
|
};
|
933
934
|
});
|
934
935
|
};
|
935
|
-
|
936
|
-
const
|
936
|
+
It();
|
937
|
+
const Lt = $(S("MessageBox"), ue), jt = {
|
937
938
|
position: {
|
938
939
|
type: String,
|
939
940
|
default: "top-right"
|
@@ -971,50 +972,50 @@ const St = M(p("MessageBox"), q), Ot = {
|
|
971
972
|
type: Boolean,
|
972
973
|
default: !1
|
973
974
|
}
|
974
|
-
},
|
975
|
-
name:
|
976
|
-
props:
|
975
|
+
}, Ie = /* @__PURE__ */ E({
|
976
|
+
name: S("Notification"),
|
977
|
+
props: jt,
|
977
978
|
emits: ["close", "destroy"],
|
978
979
|
setup(e, {
|
979
980
|
emit: t,
|
980
981
|
slots: n
|
981
982
|
}) {
|
982
|
-
const l =
|
983
|
+
const l = p("notification"), a = l.block, s = C(() => [a, l.modifier(o.value.ver)]), {
|
983
984
|
zIndex: d
|
984
|
-
} =
|
985
|
+
} = G("message", {
|
985
986
|
runOnMounted: !0
|
986
|
-
}),
|
987
|
+
}), o = C(() => {
|
987
988
|
const g = e.position.split("-");
|
988
989
|
return {
|
989
990
|
hor: g[1],
|
990
991
|
ver: g[0]
|
991
992
|
};
|
992
|
-
}),
|
993
|
+
}), m = C(() => `x-notification-slide-${o.value.hor}`), f = C(() => {
|
993
994
|
const g = {};
|
994
|
-
return g.position = e.renderToBody ? "fixed" : "absolute", g.zIndex = d.value, g[
|
995
|
-
}), y =
|
996
|
-
let
|
997
|
-
const
|
998
|
-
|
995
|
+
return g.position = e.renderToBody ? "fixed" : "absolute", g.zIndex = d.value, g[o.value.hor] = "20px", g[o.value.ver] = `${e.offset}px`, g;
|
996
|
+
}), y = T(!1);
|
997
|
+
let c = 0;
|
998
|
+
const i = () => {
|
999
|
+
c = setTimeout(() => {
|
999
1000
|
y.value = !1;
|
1000
1001
|
}, e.duration);
|
1001
|
-
}, u = C(() => e.type === "info" ?
|
1002
|
+
}, u = C(() => e.type === "info" ? ee : e.type === "warning" ? Q : e.type === "strong" ? te : e.type === "success" ? J : e.type === "error" ? q : ""), v = () => {
|
1002
1003
|
y.value = !1;
|
1003
1004
|
};
|
1004
|
-
return
|
1005
|
-
e.duration !== 0 &&
|
1006
|
-
}),
|
1007
|
-
clearTimeout(
|
1008
|
-
}), () => r(
|
1009
|
-
name:
|
1005
|
+
return K(() => {
|
1006
|
+
e.duration !== 0 && i(), y.value = !0;
|
1007
|
+
}), fe(() => {
|
1008
|
+
clearTimeout(c);
|
1009
|
+
}), () => r(H, {
|
1010
|
+
name: m.value,
|
1010
1011
|
onBeforeLeave: () => t("close"),
|
1011
1012
|
onAfterLeave: () => t("destroy")
|
1012
1013
|
}, {
|
1013
1014
|
default: () => {
|
1014
1015
|
var g;
|
1015
1016
|
return [y.value && r("div", {
|
1016
|
-
class:
|
1017
|
-
style:
|
1017
|
+
class: s.value,
|
1018
|
+
style: f.value
|
1018
1019
|
}, [r("div", {
|
1019
1020
|
class: [l.element("header")]
|
1020
1021
|
}, [r("div", {
|
@@ -1030,72 +1031,72 @@ const St = M(p("MessageBox"), q), Ot = {
|
|
1030
1031
|
}
|
1031
1032
|
});
|
1032
1033
|
}
|
1033
|
-
}),
|
1034
|
+
}), Pt = $(S("Notification"), Ie), Be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
1034
1035
|
__proto__: null,
|
1035
|
-
XButton:
|
1036
|
-
XDialog:
|
1037
|
-
XMessage:
|
1038
|
-
XMessageBox:
|
1039
|
-
XNotification:
|
1040
|
-
XSpace:
|
1036
|
+
XButton: V,
|
1037
|
+
XDialog: De,
|
1038
|
+
XMessage: $t,
|
1039
|
+
XMessageBox: Lt,
|
1040
|
+
XNotification: Pt,
|
1041
|
+
XSpace: ge
|
1041
1042
|
}, Symbol.toStringTag, { value: "Module" }));
|
1042
|
-
function
|
1043
|
+
function Se(e) {
|
1043
1044
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !k(e);
|
1044
1045
|
}
|
1045
|
-
const
|
1046
|
+
const pe = p("dialog"), Gt = (e) => {
|
1046
1047
|
const t = document.createElement("div"), n = () => {
|
1047
|
-
|
1048
|
-
}, l = (
|
1049
|
-
if (
|
1048
|
+
N(null, t);
|
1049
|
+
}, l = (c) => {
|
1050
|
+
if (c === "cancel")
|
1050
1051
|
return e.beforeOnCancel ? e.beforeOnCancel() : !0;
|
1051
|
-
if (
|
1052
|
+
if (c === "ok")
|
1052
1053
|
return e.beforeOnOk ? e.beforeOnOk() : !0;
|
1053
|
-
},
|
1054
|
-
|
1055
|
-
},
|
1056
|
-
if (k(
|
1057
|
-
if (b(
|
1058
|
-
const
|
1059
|
-
return k(
|
1054
|
+
}, a = (c, i) => {
|
1055
|
+
c === "cancel" && e.onCancel && e.onCancel(i), c === "ok" && e.onOk && e.onOk(i);
|
1056
|
+
}, s = (c) => {
|
1057
|
+
if (k(c)) return c;
|
1058
|
+
if (b(c)) {
|
1059
|
+
const i = c();
|
1060
|
+
return k(i) ? i : null;
|
1060
1061
|
}
|
1061
1062
|
return r("div", {
|
1062
|
-
class:
|
1063
|
-
}, [
|
1064
|
-
}, d = (
|
1065
|
-
if (k(
|
1066
|
-
if (b(
|
1067
|
-
const
|
1068
|
-
return k(
|
1063
|
+
class: pe.element("header-title")
|
1064
|
+
}, [O(" "), c, O(" ")]);
|
1065
|
+
}, d = (c) => {
|
1066
|
+
if (k(c)) return c;
|
1067
|
+
if (b(c)) {
|
1068
|
+
const i = c();
|
1069
|
+
return k(i) ? i : null;
|
1069
1070
|
}
|
1070
1071
|
return r("div", {
|
1071
|
-
class:
|
1072
|
-
}, [
|
1073
|
-
},
|
1072
|
+
class: pe.element("content")
|
1073
|
+
}, [O(" "), e.content, O(" ")]);
|
1074
|
+
}, o = () => () => r(_, null, [e.title && s(e.title)]), m = () => () => r(_, null, [e.content && d(e.content)]), f = () => {
|
1074
1075
|
if (k(e.footer) || b(e.footer))
|
1075
1076
|
return e.footer;
|
1076
|
-
const
|
1077
|
-
return (u) => r(
|
1077
|
+
const c = (e == null ? void 0 : e.cancelText) || "取消", i = (e == null ? void 0 : e.okText) || "确认";
|
1078
|
+
return (u) => r(ge, {
|
1078
1079
|
size: 12
|
1079
1080
|
}, {
|
1080
1081
|
default: () => {
|
1081
1082
|
var v, g;
|
1082
|
-
return [!e.hideCancel && r(
|
1083
|
+
return [!e.hideCancel && r(V, {
|
1083
1084
|
size: "small",
|
1084
1085
|
onClick: u.cancel,
|
1085
1086
|
loading: (v = u.loadingObj) == null ? void 0 : v.cancel
|
1086
|
-
},
|
1087
|
-
default: () => [
|
1088
|
-
}), !e.hideOk && r(
|
1087
|
+
}, Se(c) ? c : {
|
1088
|
+
default: () => [c]
|
1089
|
+
}), !e.hideOk && r(V, {
|
1089
1090
|
type: "primary",
|
1090
1091
|
size: "small",
|
1091
1092
|
onClick: u.ok,
|
1092
1093
|
loading: (g = u.loadingObj) == null ? void 0 : g.ok
|
1093
|
-
},
|
1094
|
-
default: () => [
|
1094
|
+
}, Se(i) ? i : {
|
1095
|
+
default: () => [i]
|
1095
1096
|
})];
|
1096
1097
|
}
|
1097
1098
|
});
|
1098
|
-
}, y = r(
|
1099
|
+
}, y = r(ze, {
|
1099
1100
|
width: (e == null ? void 0 : e.width) ?? 368,
|
1100
1101
|
height: (e == null ? void 0 : e.height) ?? "auto",
|
1101
1102
|
modelValue: !0,
|
@@ -1105,7 +1106,7 @@ const ye = O("dialog"), At = (e) => {
|
|
1105
1106
|
mask: (e == null ? void 0 : e.mask) ?? !0,
|
1106
1107
|
maskToClose: (e == null ? void 0 : e.maskToClose) ?? !0,
|
1107
1108
|
popupClass: e.popupClass,
|
1108
|
-
onClose:
|
1109
|
+
onClose: a,
|
1109
1110
|
onBeforeCancel: l,
|
1110
1111
|
"onUpdate:modelValue": () => {
|
1111
1112
|
y.component.props.modelValue = !1;
|
@@ -1115,122 +1116,253 @@ const ye = O("dialog"), At = (e) => {
|
|
1115
1116
|
onOpened: () => {
|
1116
1117
|
}
|
1117
1118
|
}, {
|
1118
|
-
title:
|
1119
|
-
default:
|
1120
|
-
footer:
|
1119
|
+
title: o(),
|
1120
|
+
default: m(),
|
1121
|
+
footer: f()
|
1121
1122
|
});
|
1122
|
-
|
1123
|
-
},
|
1123
|
+
N(y, t);
|
1124
|
+
}, Ht = ["success", "warning", "error", "strong", "info"], _t = E({
|
1125
|
+
name: S("Message"),
|
1126
|
+
components: {
|
1127
|
+
CloseCircleFill: q,
|
1128
|
+
CheckCircleFill: J,
|
1129
|
+
ExclamationCircleFill: Q,
|
1130
|
+
InfoCircleFill: ee,
|
1131
|
+
MinusCircleFill: te
|
1132
|
+
},
|
1133
|
+
props: {
|
1134
|
+
id: {
|
1135
|
+
type: String,
|
1136
|
+
default: ""
|
1137
|
+
},
|
1138
|
+
message: {
|
1139
|
+
type: [String, Number, Object],
|
1140
|
+
default: ""
|
1141
|
+
},
|
1142
|
+
type: {
|
1143
|
+
type: String,
|
1144
|
+
default: "success"
|
1145
|
+
},
|
1146
|
+
duration: {
|
1147
|
+
type: Number,
|
1148
|
+
default: 1500
|
1149
|
+
},
|
1150
|
+
center: {
|
1151
|
+
type: Boolean,
|
1152
|
+
default: !1
|
1153
|
+
},
|
1154
|
+
onClose: {
|
1155
|
+
type: Function,
|
1156
|
+
default: () => {
|
1157
|
+
}
|
1158
|
+
},
|
1159
|
+
offset: {
|
1160
|
+
type: Number,
|
1161
|
+
default: 20
|
1162
|
+
},
|
1163
|
+
zIndex: {
|
1164
|
+
type: Number,
|
1165
|
+
default: 0
|
1166
|
+
},
|
1167
|
+
showClose: {
|
1168
|
+
type: Boolean,
|
1169
|
+
default: !1
|
1170
|
+
},
|
1171
|
+
useHTML: Boolean,
|
1172
|
+
popupClass: {
|
1173
|
+
type: String,
|
1174
|
+
default: void 0
|
1175
|
+
}
|
1176
|
+
},
|
1177
|
+
emits: ["destroy"],
|
1178
|
+
setup(e) {
|
1179
|
+
const t = p("message"), n = C(() => [
|
1180
|
+
t.block,
|
1181
|
+
t.modifier(e.type),
|
1182
|
+
e.center && t.modifier("center"),
|
1183
|
+
e.showClose && !e.center && t.element("show-close"),
|
1184
|
+
e.popupClass && e.popupClass
|
1185
|
+
]), l = T(!1);
|
1186
|
+
let a = null;
|
1187
|
+
const s = () => {
|
1188
|
+
a = setTimeout(() => {
|
1189
|
+
l.value = !1;
|
1190
|
+
}, e.duration);
|
1191
|
+
};
|
1192
|
+
K(() => {
|
1193
|
+
l.value = !0, e.duration !== 0 && s();
|
1194
|
+
}), fe(() => {
|
1195
|
+
clearTimeout(a);
|
1196
|
+
});
|
1197
|
+
const { zIndex: d } = G("message", { runOnMounted: !0 }), o = C(() => ({
|
1198
|
+
top: `${e.offset}px`,
|
1199
|
+
zIndex: d.value
|
1200
|
+
}));
|
1201
|
+
return {
|
1202
|
+
cn: t,
|
1203
|
+
cls: n,
|
1204
|
+
styles: o,
|
1205
|
+
visible: l,
|
1206
|
+
handleClose: () => {
|
1207
|
+
l.value = !1;
|
1208
|
+
}
|
1209
|
+
};
|
1210
|
+
}
|
1211
|
+
}), Vt = (e, t) => {
|
1212
|
+
const n = e.__vccOpts || e;
|
1213
|
+
for (const [l, a] of t)
|
1214
|
+
n[l] = a;
|
1215
|
+
return n;
|
1216
|
+
}, Wt = ["innerHTML"], Zt = { key: 1 };
|
1217
|
+
function Xt(e, t, n, l, a, s) {
|
1218
|
+
const d = I("CheckCircleFill"), o = I("ExclamationCircleFill"), m = I("MinusCircleFill"), f = I("CloseCircleFill"), y = I("InfoCircleFill");
|
1219
|
+
return B(), F(H, {
|
1220
|
+
name: "x-message-slide-top",
|
1221
|
+
onBeforeLeave: e.onClose,
|
1222
|
+
onAfterLeave: t[1] || (t[1] = (c) => e.$emit("destroy"))
|
1223
|
+
}, {
|
1224
|
+
default: Ge(() => [
|
1225
|
+
qe(Je("div", {
|
1226
|
+
class: re(e.cls),
|
1227
|
+
style: Qe(e.styles)
|
1228
|
+
}, [
|
1229
|
+
e.$slots.icon ? oe("", !0) : (B(), U("span", {
|
1230
|
+
key: 0,
|
1231
|
+
class: re([e.cn.element("icon"), e.cn.modifier(`icon-${e.type}`)])
|
1232
|
+
}, [
|
1233
|
+
ke(e.$slots, "icon", {}, () => [
|
1234
|
+
e.type === "success" ? (B(), F(d, { key: 0 })) : e.type === "warning" ? (B(), F(o, { key: 1 })) : e.type === "strong" ? (B(), F(m, { key: 2 })) : e.type === "error" ? (B(), F(f, { key: 3 })) : e.type === "info" ? (B(), F(y, { key: 4 })) : oe("", !0)
|
1235
|
+
])
|
1236
|
+
], 2)),
|
1237
|
+
ke(e.$slots, "default", {}, () => [
|
1238
|
+
e.useHTML ? (B(), U("span", {
|
1239
|
+
key: 0,
|
1240
|
+
innerHTML: e.message
|
1241
|
+
}, null, 8, Wt)) : (B(), U("span", Zt, et(e.message), 1)),
|
1242
|
+
e.showClose ? (B(), U("span", {
|
1243
|
+
key: 2,
|
1244
|
+
class: re([e.cn.element("close-icon")]),
|
1245
|
+
onClick: t[0] || (t[0] = (...c) => e.handleClose && e.handleClose(...c))
|
1246
|
+
}, null, 2)) : oe("", !0)
|
1247
|
+
])
|
1248
|
+
], 6), [
|
1249
|
+
[tt, e.visible]
|
1250
|
+
])
|
1251
|
+
]),
|
1252
|
+
_: 3
|
1253
|
+
}, 8, ["onBeforeLeave"]);
|
1254
|
+
}
|
1255
|
+
const Ut = /* @__PURE__ */ Vt(_t, [["render", Xt]]), ce = /* @__PURE__ */ new WeakMap(), ie = (e) => {
|
1124
1256
|
(typeof e == "string" || k(e)) && (e = {
|
1125
1257
|
message: e
|
1126
1258
|
});
|
1127
|
-
const t =
|
1128
|
-
|
1129
|
-
const
|
1130
|
-
let
|
1131
|
-
|
1132
|
-
var
|
1133
|
-
|
1259
|
+
const t = me(e.renderTo || "body"), n = document.createElement("div");
|
1260
|
+
ce.has(t) || ce.set(t, []);
|
1261
|
+
const l = ce.get(t);
|
1262
|
+
let a = e.offset || 20;
|
1263
|
+
l.forEach((c) => {
|
1264
|
+
var i;
|
1265
|
+
a += ((i = c.el) == null ? void 0 : i.offsetHeight) + 20;
|
1134
1266
|
});
|
1135
1267
|
const s = e.onClose;
|
1136
|
-
let
|
1137
|
-
|
1268
|
+
let d = {};
|
1269
|
+
d = { ...e, onClose: () => {
|
1138
1270
|
var u;
|
1139
|
-
const
|
1140
|
-
if (
|
1141
|
-
const
|
1142
|
-
|
1271
|
+
const c = l.findIndex((v) => v === f);
|
1272
|
+
if (c < 0) return;
|
1273
|
+
const i = ((u = f.el) == null ? void 0 : u.offsetHeight) + 20;
|
1274
|
+
l.slice(c + 1).forEach((v) => {
|
1143
1275
|
var w;
|
1144
1276
|
const g = (w = v.component) == null ? void 0 : w.props.offset;
|
1145
|
-
v.component.props.offset = g -
|
1146
|
-
}),
|
1277
|
+
v.component.props.offset = g - i;
|
1278
|
+
}), l.splice(c, 1), s && s(f);
|
1147
1279
|
}, onDestroy: () => {
|
1148
|
-
|
1149
|
-
}, offset:
|
1280
|
+
N(null, n);
|
1281
|
+
}, offset: a };
|
1150
1282
|
const f = r(
|
1151
|
-
|
1152
|
-
|
1153
|
-
b(
|
1154
|
-
default: b(
|
1283
|
+
Ut,
|
1284
|
+
d,
|
1285
|
+
b(d.message) || k(d.message) ? {
|
1286
|
+
default: b(d.message) ? d.message : () => d.message
|
1155
1287
|
} : null
|
1156
|
-
)
|
1157
|
-
return
|
1288
|
+
);
|
1289
|
+
return console.log("VM----", f), N(f, n), t.tagName === "BODY" ? f.el.style.position = "fixed" : (t.style.position = "relative", f.el.style.position = "absolute"), t.appendChild(n.firstElementChild), l.push(f), {
|
1158
1290
|
close: () => {
|
1159
1291
|
f.component.proxy.handleClose();
|
1160
1292
|
}
|
1161
1293
|
};
|
1162
|
-
},
|
1163
|
-
|
1164
|
-
|
1294
|
+
}, Rt = () => {
|
1295
|
+
Ht.forEach((e) => {
|
1296
|
+
ie[e] = (t) => Ee(t) ? ie({
|
1165
1297
|
type: e,
|
1166
1298
|
...t
|
1167
|
-
}) :
|
1299
|
+
}) : ie({
|
1168
1300
|
message: t,
|
1169
1301
|
type: e
|
1170
1302
|
});
|
1171
1303
|
});
|
1172
1304
|
};
|
1173
|
-
|
1174
|
-
const
|
1175
|
-
const t =
|
1176
|
-
|
1177
|
-
const l =
|
1178
|
-
let
|
1305
|
+
Rt();
|
1306
|
+
const L = /* @__PURE__ */ new WeakMap(), qt = (e) => {
|
1307
|
+
const t = me(e.renderTo || "body"), n = document.createElement("div");
|
1308
|
+
L.get(t) || L.set(t, {}), L.get(t)[e.position] || (L.get(t)[e.position] = []);
|
1309
|
+
const l = L.get(t)[e.position];
|
1310
|
+
let a = e.offset || 20;
|
1179
1311
|
l.forEach((y) => {
|
1180
|
-
var i;
|
1181
|
-
s += ((i = y.el) == null ? void 0 : i.offsetHeight) + 20;
|
1182
|
-
});
|
1183
|
-
const o = t.tagName === "BODY";
|
1184
|
-
o || (t.style.position = "relative", t.style.overflowX = "hidden");
|
1185
|
-
const d = e.onClose, a = () => {
|
1186
1312
|
var c;
|
1187
|
-
|
1313
|
+
a += ((c = y.el) == null ? void 0 : c.offsetHeight) + 20;
|
1314
|
+
});
|
1315
|
+
const s = t.tagName === "BODY";
|
1316
|
+
s || (t.style.position = "relative", t.style.overflowX = "hidden");
|
1317
|
+
const d = e.onClose, o = () => {
|
1318
|
+
var i;
|
1319
|
+
const y = l.findIndex((u) => u === f);
|
1188
1320
|
if (y < 0) return;
|
1189
|
-
const
|
1321
|
+
const c = ((i = f.el) == null ? void 0 : i.offsetHeight) + 20;
|
1190
1322
|
l.slice(y + 1).forEach((u) => {
|
1191
1323
|
var g;
|
1192
1324
|
const v = (g = u.component) == null ? void 0 : g.props.offset;
|
1193
|
-
u.component.props.offset = v -
|
1194
|
-
}), l.splice(y, 1), d && d(
|
1195
|
-
},
|
1196
|
-
|
1197
|
-
},
|
1198
|
-
|
1325
|
+
u.component.props.offset = v - c;
|
1326
|
+
}), l.splice(y, 1), d && d(f);
|
1327
|
+
}, m = () => {
|
1328
|
+
N(null, n);
|
1329
|
+
}, f = r(
|
1330
|
+
Ie,
|
1199
1331
|
{
|
1200
1332
|
message: e.message,
|
1201
1333
|
title: e.title,
|
1202
1334
|
type: e.type,
|
1203
|
-
offset:
|
1204
|
-
renderToBody:
|
1335
|
+
offset: a,
|
1336
|
+
renderToBody: s,
|
1205
1337
|
position: e.position,
|
1206
1338
|
duration: e.duration ?? 3e3,
|
1207
1339
|
showClose: e.showClose ?? !0,
|
1208
|
-
onClose:
|
1209
|
-
onDestroy:
|
1340
|
+
onClose: o,
|
1341
|
+
onDestroy: m
|
1210
1342
|
},
|
1211
1343
|
b(e.message) || k(e.message) ? {
|
1212
1344
|
default: b(e.message) ? e.message : () => e.message
|
1213
1345
|
} : null
|
1214
1346
|
);
|
1215
|
-
|
1216
|
-
},
|
1347
|
+
N(f, n), l.push(f), t == null || t.appendChild(n.firstChild);
|
1348
|
+
}, Jt = {
|
1217
1349
|
install: function(e) {
|
1218
|
-
Object.keys(
|
1219
|
-
const n =
|
1350
|
+
Object.keys(Be).forEach((t) => {
|
1351
|
+
const n = Be[t];
|
1220
1352
|
n.install && e.use(n);
|
1221
1353
|
});
|
1222
1354
|
}
|
1223
1355
|
};
|
1224
1356
|
export {
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1357
|
+
Gt as Dialog,
|
1358
|
+
ie as Message,
|
1359
|
+
ue as MessageBox,
|
1360
|
+
qt as Notification,
|
1361
|
+
V as XButton,
|
1362
|
+
De as XDialog,
|
1363
|
+
$t as XMessage,
|
1364
|
+
Lt as XMessageBox,
|
1365
|
+
Pt as XNotification,
|
1366
|
+
ge as XSpace,
|
1367
|
+
Jt as default
|
1236
1368
|
};
|