x-next 0.0.0-alpha.5 → 0.0.0-alpha.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/_utils/icon.d.ts +3 -3
- package/dist/components.d.ts +1 -0
- package/dist/componets/button/index.vue.d.ts +6 -6
- package/dist/componets/button/install.d.ts +4 -0
- package/dist/componets/dialog/index.vue.d.ts +13 -13
- package/dist/componets/dialog/props.d.ts +5 -5
- package/dist/componets/message/index.vue.d.ts +16 -16
- package/dist/componets/notification/index.vue.d.ts +5 -5
- package/dist/componets/space/index.d.ts +1 -1
- package/dist/componets/trend-chart/components/trend-chart-curve.d.ts +1 -1
- package/dist/componets/trend-chart/components/trend-chart.d.ts +1 -1
- package/dist/icons/animation/animation-loading.vue.d.ts +3 -3
- package/dist/icons/default/check-circle-fill.vue.d.ts +3 -3
- package/dist/icons/default/close-circle-fill.vue.d.ts +3 -3
- package/dist/icons/default/exclamation-circle-fill.vue.d.ts +3 -3
- package/dist/icons/default/info-circle-fill.vue.d.ts +3 -3
- package/dist/icons/default/minus-circle-fill.vue.d.ts +3 -3
- package/dist/{ui.d.ts → index.d.ts} +3 -0
- package/dist/index.es.js +541 -527
- package/dist/index.umd.js +1 -1
- package/package.json +6 -4
package/dist/index.es.js
CHANGED
@@ -1,33 +1,28 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var
|
4
|
-
import {
|
5
|
-
const
|
6
|
-
const t =
|
1
|
+
var qe = Object.defineProperty;
|
2
|
+
var Je = (e, t, n) => t in e ? qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
3
|
+
var z = (e, t, n) => Je(e, typeof t != "symbol" ? t + "" : t, n);
|
4
|
+
import { defineComponent as F, computed as p, openBlock as C, createElementBlock as b, normalizeClass as y, normalizeStyle as $, createElementVNode as v, reactive as Se, getCurrentInstance as Qe, resolveComponent as H, withDirectives as j, createVNode as m, vShow as V, renderSlot as T, createCommentVNode as M, ref as Y, watch as ue, onMounted as de, onBeforeUnmount as Te, readonly as _e, createBlock as B, Teleport as xe, Transition as ee, withCtx as te, withModifiers as Me, toDisplayString as ne, Comment as et, Fragment as G, render as D, isVNode as O, createTextVNode as S, onUnmounted as Le, resolveDynamicComponent as tt } from "vue";
|
5
|
+
const nt = "X", lt = "x", Ae = (e) => e ? lt + "-" + e : e || "", q = (e) => nt + e, I = (e) => {
|
6
|
+
const t = Ae(e);
|
7
7
|
return {
|
8
8
|
block: t,
|
9
|
-
element: (
|
10
|
-
modifier: (
|
11
|
-
is: (
|
9
|
+
element: (o) => `${t}--${o}`,
|
10
|
+
modifier: (o) => `${t}-${o}`,
|
11
|
+
is: (o) => `${t}-is-${o}`
|
12
12
|
};
|
13
|
-
},
|
14
|
-
if (e === void 0)
|
15
|
-
return "";
|
16
|
-
const n = String(e);
|
17
|
-
return lt.some((l) => n.includes(l)) ? n : n + t;
|
18
|
-
}, q = Object.prototype.toString;
|
19
|
-
function Ae(e) {
|
20
|
-
return q.call(e) === "[object Array]";
|
21
|
-
}
|
13
|
+
}, J = Object.prototype.toString;
|
22
14
|
function De(e) {
|
23
|
-
return
|
15
|
+
return J.call(e) === "[object Array]";
|
16
|
+
}
|
17
|
+
function Ie(e) {
|
18
|
+
return J.call(e) === "[object Object]";
|
24
19
|
}
|
25
|
-
const
|
26
|
-
function
|
27
|
-
return
|
20
|
+
const Pe = (e) => J.call(e) === "[object Promise]";
|
21
|
+
function ze(e) {
|
22
|
+
return J.call(e) === "[object String]";
|
28
23
|
}
|
29
|
-
function
|
30
|
-
return
|
24
|
+
function ot(e) {
|
25
|
+
return J.call(e) === "[object Number]" && e === e;
|
31
26
|
}
|
32
27
|
function E(e) {
|
33
28
|
return typeof e == "function";
|
@@ -35,114 +30,330 @@ function E(e) {
|
|
35
30
|
function le() {
|
36
31
|
return typeof window < "u";
|
37
32
|
}
|
38
|
-
const
|
39
|
-
|
33
|
+
const K = (e) => e;
|
34
|
+
var R;
|
35
|
+
(function(e) {
|
36
|
+
e[e.ELEMENT = 1] = "ELEMENT", e[e.FUNCTIONAL_COMPONENT = 2] = "FUNCTIONAL_COMPONENT", e[e.STATEFUL_COMPONENT = 4] = "STATEFUL_COMPONENT", e[e.COMPONENT = 6] = "COMPONENT", e[e.TEXT_CHILDREN = 8] = "TEXT_CHILDREN", e[e.ARRAY_CHILDREN = 16] = "ARRAY_CHILDREN", e[e.SLOTS_CHILDREN = 32] = "SLOTS_CHILDREN", e[e.TELEPORT = 64] = "TELEPORT", e[e.SUSPENSE = 128] = "SUSPENSE", e[e.COMPONENT_SHOULD_KEEP_ALIVE = 256] = "COMPONENT_SHOULD_KEEP_ALIVE", e[e.COMPONENT_KEPT_ALIVE = 512] = "COMPONENT_KEPT_ALIVE";
|
37
|
+
})(R || (R = {}));
|
38
|
+
const rt = (e) => !!(e && e.shapeFlag & R.ELEMENT), st = (e, t) => !!(e && e.shapeFlag & R.COMPONENT), at = (e, t) => !!(e && e.shapeFlag & 8), it = (e, t) => !!(e && e.shapeFlag & R.ARRAY_CHILDREN), ct = (e, t) => !!(e && e.shapeFlag & R.SLOTS_CHILDREN), x = (e, t = !1) => {
|
39
|
+
var n, l;
|
40
|
+
const s = [];
|
41
|
+
for (const o of e ?? [])
|
42
|
+
rt(o) || st(o) || t && at(o, o.children) ? s.push(o) : it(o, o.children) ? s.push(...x(o.children, t)) : ct(o, o.children) ? s.push(...x((l = (n = o.children).default) === null || l === void 0 ? void 0 : l.call(n), t)) : De(o) && s.push(...x(o, t));
|
43
|
+
return s;
|
44
|
+
}, ut = {
|
45
|
+
disabled: Boolean,
|
46
|
+
block: Boolean,
|
47
|
+
loading: Boolean,
|
48
|
+
loadingFill: {
|
49
|
+
type: Boolean,
|
50
|
+
default: !1
|
51
|
+
},
|
52
|
+
debounce: {
|
53
|
+
type: Number,
|
54
|
+
default: 0
|
55
|
+
},
|
56
|
+
shape: {
|
57
|
+
type: K(String),
|
58
|
+
default: void 0
|
59
|
+
},
|
60
|
+
link: {
|
61
|
+
type: Boolean,
|
62
|
+
default: !1
|
63
|
+
},
|
64
|
+
type: {
|
65
|
+
type: K(String),
|
66
|
+
default: void 0
|
67
|
+
},
|
68
|
+
status: {
|
69
|
+
type: K(String),
|
70
|
+
default: void 0
|
71
|
+
},
|
72
|
+
plain: {
|
73
|
+
type: Boolean,
|
74
|
+
default: !1
|
75
|
+
},
|
76
|
+
size: {
|
77
|
+
type: K(String),
|
78
|
+
default: "medium"
|
79
|
+
},
|
80
|
+
border: {
|
81
|
+
type: Boolean,
|
82
|
+
default: !0
|
83
|
+
}
|
84
|
+
}, dt = (e) => ze(e) ? e.split("-").map((t) => t.charAt(0).toUpperCase() + t.slice(1)).join("") : "", ft = (e, t = "px") => {
|
85
|
+
if (e === void 0)
|
86
|
+
return "";
|
87
|
+
const n = typeof e == "number" ? `${e}` : e;
|
88
|
+
return ["px", "%", "vh", "vw", "calc"].some((s) => n.includes(s)) ? n : n + t;
|
89
|
+
};
|
90
|
+
function U(e) {
|
91
|
+
return F({
|
92
|
+
name: Ae(`Icon${dt(e)}`),
|
93
|
+
props: {
|
94
|
+
size: {
|
95
|
+
type: [Number, String],
|
96
|
+
default: void 0
|
97
|
+
},
|
98
|
+
rotate: {
|
99
|
+
type: Number,
|
100
|
+
default: void 0
|
101
|
+
},
|
102
|
+
spin: {
|
103
|
+
type: Boolean,
|
104
|
+
default: !1
|
105
|
+
},
|
106
|
+
color: {
|
107
|
+
type: String,
|
108
|
+
default: void 0
|
109
|
+
},
|
110
|
+
fillColor: {
|
111
|
+
type: Array,
|
112
|
+
default: void 0
|
113
|
+
}
|
114
|
+
},
|
115
|
+
setup(t) {
|
116
|
+
const n = "x-icon", l = p(() => {
|
117
|
+
const o = {};
|
118
|
+
return t.size && (o.fontSize = ft(t.size)), t.rotate && (o.transform = `rotate(${t.rotate}deg)`), t.color && (o.color = t.color), o;
|
119
|
+
});
|
120
|
+
return {
|
121
|
+
cls: p(() => [
|
122
|
+
n,
|
123
|
+
{
|
124
|
+
[`${n}-loading`]: t.spin
|
125
|
+
}
|
126
|
+
]),
|
127
|
+
styles: l
|
128
|
+
};
|
129
|
+
}
|
130
|
+
});
|
131
|
+
}
|
132
|
+
const mt = U("animation-loading"), N = (e, t) => {
|
133
|
+
const n = e.__vccOpts || e;
|
134
|
+
for (const [l, s] of t)
|
135
|
+
n[l] = s;
|
136
|
+
return n;
|
137
|
+
};
|
138
|
+
function yt(e, t, n, l, s, o) {
|
139
|
+
return C(), b("div", {
|
140
|
+
class: y(e.cls),
|
141
|
+
style: $(e.styles)
|
142
|
+
}, t[0] || (t[0] = [
|
143
|
+
v("svg", {
|
144
|
+
viewBox: "0 0 50 50",
|
145
|
+
class: "icon-loading-svg"
|
146
|
+
}, [
|
147
|
+
v("circle", {
|
148
|
+
cx: "25",
|
149
|
+
cy: "25",
|
150
|
+
r: "20",
|
151
|
+
class: "path",
|
152
|
+
fill: "none",
|
153
|
+
stroke: "currentColor"
|
154
|
+
})
|
155
|
+
], -1)
|
156
|
+
]), 6);
|
157
|
+
}
|
158
|
+
const gt = /* @__PURE__ */ N(mt, [["render", yt], ["__scopeId", "data-v-62d46830"]]), Ct = F({
|
159
|
+
name: q("Button"),
|
160
|
+
components: {
|
161
|
+
AnimationLoading: gt
|
162
|
+
},
|
163
|
+
props: ut,
|
164
|
+
emits: ["click"],
|
165
|
+
setup(e) {
|
166
|
+
const t = Se({
|
167
|
+
// 点击
|
168
|
+
clicked: !1,
|
169
|
+
// 防抖
|
170
|
+
isDebounce: !1
|
171
|
+
}), n = I("button"), l = p(() => [
|
172
|
+
n.block,
|
173
|
+
e.type && n.modifier(e.type),
|
174
|
+
e.status && n.modifier(e.status),
|
175
|
+
e.disabled && n.is("disabled"),
|
176
|
+
e.block && n.modifier("block"),
|
177
|
+
e.plain && n.is("plain"),
|
178
|
+
e.shape && n.modifier(e.shape),
|
179
|
+
e.link && n.modifier("is-link"),
|
180
|
+
e.size && n.modifier(e.size),
|
181
|
+
!e.border && n.modifier("is-hide-border"),
|
182
|
+
o.value && n.modifier("is-loading")
|
183
|
+
]), s = () => {
|
184
|
+
e.debounce > 0 && !t.isDebounce && (t.isDebounce = !0, setTimeout(() => {
|
185
|
+
t.isDebounce = !1;
|
186
|
+
}, e.debounce));
|
187
|
+
}, o = p(() => e.loading || t.clicked || t.isDebounce), u = Qe(), r = (f, g) => {
|
188
|
+
const i = f(g);
|
189
|
+
Pe(i) && (t.clicked = !0, i.finally(() => {
|
190
|
+
t.clicked = !1;
|
191
|
+
}));
|
192
|
+
};
|
193
|
+
return {
|
194
|
+
cn: n,
|
195
|
+
cls: l,
|
196
|
+
handleClick: async (f) => {
|
197
|
+
var i, a, c, k;
|
198
|
+
if ((a = (i = f.target).blur) == null || a.call(i), o.value) return;
|
199
|
+
s();
|
200
|
+
const g = (k = (c = u == null ? void 0 : u.vnode) == null ? void 0 : c.props) == null ? void 0 : k.onClick;
|
201
|
+
De(g) ? g.forEach((w) => r(w, f)) : E(g) && r(g, f);
|
202
|
+
},
|
203
|
+
isLoading: o
|
204
|
+
};
|
205
|
+
}
|
206
|
+
}), vt = ["disabled"];
|
207
|
+
function ht(e, t, n, l, s, o) {
|
208
|
+
const u = H("AnimationLoading");
|
209
|
+
return C(), b("button", {
|
210
|
+
class: y(e.cls),
|
211
|
+
type: "button",
|
212
|
+
disabled: e.disabled,
|
213
|
+
onClick: t[0] || (t[0] = (...r) => e.handleClick && e.handleClick(...r))
|
214
|
+
}, [
|
215
|
+
j(v("span", {
|
216
|
+
class: y([e.cn.element("loading")])
|
217
|
+
}, [
|
218
|
+
m(u)
|
219
|
+
], 2), [
|
220
|
+
[V, e.isLoading]
|
221
|
+
]),
|
222
|
+
e.$slots.prefix ? (C(), b("span", {
|
223
|
+
key: 0,
|
224
|
+
class: y([e.cn.element("prefix")])
|
225
|
+
}, [
|
226
|
+
T(e.$slots, "prefix")
|
227
|
+
], 2)) : M("", !0),
|
228
|
+
T(e.$slots, "default"),
|
229
|
+
e.$slots.suffix ? (C(), b("span", {
|
230
|
+
key: 1,
|
231
|
+
class: y([e.cn.element("suffix")])
|
232
|
+
}, [
|
233
|
+
T(e.$slots, "suffix")
|
234
|
+
], 2)) : M("", !0)
|
235
|
+
], 10, vt);
|
236
|
+
}
|
237
|
+
const A = /* @__PURE__ */ N(Ct, [["render", ht]]);
|
238
|
+
A.install = function(e) {
|
239
|
+
e.component(A.name, A);
|
240
|
+
};
|
241
|
+
const re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
242
|
+
__proto__: null,
|
243
|
+
Button: A
|
244
|
+
}, Symbol.toStringTag, { value: "Module" })), kt = ["px", "%", "vh", "vw", "calc"], we = (e, t = "px") => {
|
245
|
+
if (e === void 0)
|
246
|
+
return "";
|
247
|
+
const n = String(e);
|
248
|
+
return kt.some((l) => n.includes(l)) ? n : n + t;
|
249
|
+
}, pt = 1e3, bt = 3e3, Ot = 1;
|
250
|
+
class wt {
|
40
251
|
constructor() {
|
41
|
-
|
252
|
+
z(this, "popupStack", {
|
42
253
|
popup: /* @__PURE__ */ new Set(),
|
43
254
|
dialog: /* @__PURE__ */ new Set(),
|
44
255
|
message: /* @__PURE__ */ new Set()
|
45
256
|
});
|
46
|
-
|
47
|
-
|
257
|
+
z(this, "getNextZIndex", (t) => (t === "message" ? Array.from(this.popupStack.message).pop() || bt : Array.from(this.popupStack.popup).pop() || pt) + Ot);
|
258
|
+
z(this, "add", (t) => {
|
48
259
|
const n = this.getNextZIndex(t);
|
49
260
|
return this.popupStack[t].add(n), t === "dialog" && this.popupStack.popup.add(n), n;
|
50
261
|
});
|
51
|
-
|
262
|
+
z(this, "delete", (t, n) => {
|
52
263
|
this.popupStack[n].delete(t), n === "dialog" && this.popupStack.popup.delete(t);
|
53
264
|
});
|
54
|
-
|
265
|
+
z(this, "isLastDialog", (t) => this.popupStack.dialog.size > 1 ? t === Array.from(this.popupStack.dialog).pop() : !0);
|
55
266
|
}
|
56
267
|
}
|
57
|
-
const
|
58
|
-
function
|
268
|
+
const se = new wt();
|
269
|
+
function fe(e, {
|
59
270
|
visible: t,
|
60
271
|
runOnMounted: n
|
61
272
|
} = {}) {
|
62
|
-
const l =
|
63
|
-
l.value =
|
64
|
-
},
|
65
|
-
|
66
|
-
}, u = () => e === "dialog" ?
|
67
|
-
return
|
273
|
+
const l = Y(0), s = () => {
|
274
|
+
l.value = se.add(e);
|
275
|
+
}, o = () => {
|
276
|
+
se.delete(l.value, e);
|
277
|
+
}, u = () => e === "dialog" ? se.isLastDialog(l.value) : !1;
|
278
|
+
return ue(
|
68
279
|
() => t == null ? void 0 : t.value,
|
69
|
-
(
|
70
|
-
|
280
|
+
(r) => {
|
281
|
+
r ? s() : o();
|
71
282
|
},
|
72
283
|
{
|
73
284
|
immediate: !0
|
74
285
|
}
|
75
|
-
), n && (
|
286
|
+
), n && (de(() => {
|
76
287
|
s();
|
77
|
-
}),
|
78
|
-
|
288
|
+
}), Te(() => {
|
289
|
+
o();
|
79
290
|
})), {
|
80
|
-
zIndex:
|
291
|
+
zIndex: _e(l),
|
81
292
|
open: s,
|
82
|
-
close:
|
293
|
+
close: o,
|
83
294
|
isLastDialog: u
|
84
295
|
};
|
85
296
|
}
|
86
|
-
const
|
297
|
+
const He = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t, n) => {
|
87
298
|
var l;
|
88
299
|
return (l = n == null ? void 0 : n.toUpperCase()) !== null && l !== void 0 ? l : "";
|
89
|
-
}),
|
90
|
-
},
|
300
|
+
}), je = () => {
|
301
|
+
}, Et = (e, t) => {
|
91
302
|
var n;
|
92
303
|
if (le)
|
93
304
|
return (n = document.querySelector(e)) !== null && n !== void 0 ? n : void 0;
|
94
|
-
},
|
305
|
+
}, $t = (e) => {
|
95
306
|
if (e.tagName === "BODY")
|
96
307
|
return window.innerWidth - (document.documentElement.offsetWidth || document.body.offsetWidth);
|
97
308
|
const { borderLeftWidth: t, borderRightWidth: n } = window.getComputedStyle(e), l = Number(t.replace("px", "")) + Number(n.replace("px", ""));
|
98
309
|
return e.offsetWidth - (e.clientWidth + l);
|
99
|
-
},
|
310
|
+
}, Nt = (e) => e.tagName === "BODY" ? document.documentElement.scrollHeight > window.innerHeight : e.scrollHeight > e.offsetHeight, Bt = (e, t) => {
|
100
311
|
var n;
|
101
312
|
if (!le || !e || !t)
|
102
313
|
return "";
|
103
|
-
let l =
|
314
|
+
let l = He(t);
|
104
315
|
l === "float" && (l = "cssFloat");
|
105
316
|
try {
|
106
317
|
const s = e.style[l];
|
107
318
|
if (s)
|
108
319
|
return s;
|
109
|
-
const
|
110
|
-
return
|
320
|
+
const o = (n = document.defaultView) === null || n === void 0 ? void 0 : n.getComputedStyle(e, "");
|
321
|
+
return o ? o[l] : "";
|
111
322
|
} catch {
|
112
323
|
return e.style[l];
|
113
324
|
}
|
114
|
-
},
|
325
|
+
}, X = (e, t, n) => {
|
115
326
|
if (!(!e || !t))
|
116
|
-
if (
|
117
|
-
Object.entries(t).forEach(([l, s]) =>
|
327
|
+
if (Ie(t))
|
328
|
+
Object.entries(t).forEach(([l, s]) => X(e, l, s));
|
118
329
|
else {
|
119
|
-
const l =
|
330
|
+
const l = He(t);
|
120
331
|
e.style[l] = n;
|
121
332
|
}
|
122
|
-
},
|
123
|
-
if (
|
333
|
+
}, me = (e, t) => {
|
334
|
+
if (ze(e)) {
|
124
335
|
const n = e[0] === "#" ? `[id='${e.slice(1)}']` : e;
|
125
|
-
return
|
336
|
+
return Et(n);
|
126
337
|
}
|
127
338
|
return e;
|
128
|
-
},
|
339
|
+
}, St = le ? (e, t, n, l = !1) => {
|
129
340
|
e.addEventListener(t, n, l);
|
130
|
-
} :
|
341
|
+
} : je, Tt = le ? (e, t, n, l = !1) => {
|
131
342
|
e.removeEventListener(t, n, l);
|
132
|
-
} :
|
343
|
+
} : je, Mt = (e, t) => {
|
133
344
|
let n = !1;
|
134
345
|
const l = {
|
135
346
|
overflow: "",
|
136
347
|
width: ""
|
137
|
-
}, s = (
|
348
|
+
}, s = (r) => r.tagName === "BODY", o = () => {
|
138
349
|
if (e.value) {
|
139
|
-
const
|
140
|
-
if (!n &&
|
141
|
-
const d =
|
142
|
-
if (d > 0 ||
|
143
|
-
l.overflow =
|
350
|
+
const r = e.value;
|
351
|
+
if (!n && r.style.overflow !== "hidden") {
|
352
|
+
const d = $t(r);
|
353
|
+
if (d > 0 || Nt(r)) {
|
354
|
+
l.overflow = r.style.overflow, l.width = r.style.width;
|
144
355
|
let f = 0;
|
145
|
-
s(
|
356
|
+
s(r) && (f = r.getBoundingClientRect().left || 0), X(r, {
|
146
357
|
width: `calc(100% - ${Math.ceil(d - f)}px)`,
|
147
358
|
overflow: "hidden"
|
148
359
|
}), n = !0;
|
@@ -151,25 +362,25 @@ const ze = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
151
362
|
}
|
152
363
|
}, u = () => {
|
153
364
|
if (e.value && n) {
|
154
|
-
const
|
155
|
-
|
365
|
+
const r = e.value;
|
366
|
+
X(r, {
|
156
367
|
overflow: l.overflow,
|
157
368
|
width: l.width
|
158
369
|
}), n = !1;
|
159
370
|
}
|
160
371
|
};
|
161
|
-
return
|
372
|
+
return ue(
|
162
373
|
() => t == null ? void 0 : t.value,
|
163
|
-
(
|
164
|
-
e.value && !s(e.value) && (
|
374
|
+
(r) => {
|
375
|
+
e.value && !s(e.value) && (r && X(r, {
|
165
376
|
position: "absolute"
|
166
|
-
}),
|
377
|
+
}), Bt(e.value, "position") === "static" && X(e.value, { position: "relative" }));
|
167
378
|
}
|
168
379
|
), {
|
169
|
-
setOverflowHidden:
|
380
|
+
setOverflowHidden: o,
|
170
381
|
resetOverflow: u
|
171
382
|
};
|
172
|
-
},
|
383
|
+
}, Lt = {
|
173
384
|
ENTER: "Enter",
|
174
385
|
ESC: "Escape",
|
175
386
|
BACKSPACE: "Backspace",
|
@@ -179,18 +390,7 @@ const ze = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
179
390
|
ARROW_DOWN: "ArrowDown",
|
180
391
|
ARROW_LEFT: "ArrowLeft",
|
181
392
|
ARROW_RIGHT: "ArrowRight"
|
182
|
-
},
|
183
|
-
var j;
|
184
|
-
(function(e) {
|
185
|
-
e[e.ELEMENT = 1] = "ELEMENT", e[e.FUNCTIONAL_COMPONENT = 2] = "FUNCTIONAL_COMPONENT", e[e.STATEFUL_COMPONENT = 4] = "STATEFUL_COMPONENT", e[e.COMPONENT = 6] = "COMPONENT", e[e.TEXT_CHILDREN = 8] = "TEXT_CHILDREN", e[e.ARRAY_CHILDREN = 16] = "ARRAY_CHILDREN", e[e.SLOTS_CHILDREN = 32] = "SLOTS_CHILDREN", e[e.TELEPORT = 64] = "TELEPORT", e[e.SUSPENSE = 128] = "SUSPENSE", e[e.COMPONENT_SHOULD_KEEP_ALIVE = 256] = "COMPONENT_SHOULD_KEEP_ALIVE", e[e.COMPONENT_KEPT_ALIVE = 512] = "COMPONENT_KEPT_ALIVE";
|
186
|
-
})(j || (j = {}));
|
187
|
-
const vt = (e) => !!(e && e.shapeFlag & j.ELEMENT), ht = (e, t) => !!(e && e.shapeFlag & j.COMPONENT), kt = (e, t) => !!(e && e.shapeFlag & 8), pt = (e, t) => !!(e && e.shapeFlag & j.ARRAY_CHILDREN), bt = (e, t) => !!(e && e.shapeFlag & j.SLOTS_CHILDREN), _ = (e, t = !1) => {
|
188
|
-
var n, l;
|
189
|
-
const s = [];
|
190
|
-
for (const r of e ?? [])
|
191
|
-
vt(r) || ht(r) || t && kt(r, r.children) ? s.push(r) : pt(r, r.children) ? s.push(..._(r.children, t)) : bt(r, r.children) ? s.push(..._((l = (n = r.children).default) === null || l === void 0 ? void 0 : l.call(n), t)) : Ae(r) && s.push(..._(r, t));
|
192
|
-
return s;
|
193
|
-
}, wt = {
|
393
|
+
}, At = {
|
194
394
|
renderTo: {
|
195
395
|
type: K([String, Object]),
|
196
396
|
default: "body"
|
@@ -276,64 +476,64 @@ const vt = (e) => !!(e && e.shapeFlag & j.ELEMENT), ht = (e, t) => !!(e && e.sha
|
|
276
476
|
type: Boolean,
|
277
477
|
default: !1
|
278
478
|
}
|
279
|
-
},
|
280
|
-
name:
|
479
|
+
}, Dt = ["width", "minWidth", "height", "minHeight"], It = F({
|
480
|
+
name: q("Dialog"),
|
281
481
|
inheritAttrs: !1,
|
282
|
-
props:
|
482
|
+
props: At,
|
283
483
|
emits: ["closed", "close", "open", "opened", "update:modelValue"],
|
284
484
|
setup(e, { emit: t }) {
|
285
|
-
const n =
|
485
|
+
const n = I("dialog"), l = n.block, s = I("message-box"), o = s.block, u = p(() => [
|
286
486
|
l,
|
287
487
|
e.messageBox && "is-message-box",
|
288
488
|
e.popupClass && e.popupClass
|
289
|
-
]),
|
290
|
-
zIndex:
|
489
|
+
]), r = p(() => me(e.renderTo)), d = Y(), f = p(() => e.disabled || !r.value), g = p(() => ({
|
490
|
+
zIndex: w.value
|
291
491
|
})), i = p(() => {
|
292
492
|
const h = {};
|
293
|
-
return e.fullscreen || (!e.center && e.top && (h.top = we(e.top)),
|
493
|
+
return e.fullscreen || (!e.center && e.top && (h.top = we(e.top)), Dt.forEach((L) => {
|
294
494
|
e[L] && (h[L] = we(e[L]));
|
295
495
|
})), h;
|
296
|
-
}), a =
|
496
|
+
}), a = Y(!1), c = p(() => e.modelValue), k = p(() => c.value || a.value), { zIndex: w, isLastDialog: P } = fe("dialog", {
|
297
497
|
visible: c
|
298
|
-
}), { setOverflowHidden:
|
498
|
+
}), { setOverflowHidden: Fe, resetOverflow: ke } = Mt(r, d), pe = (h, L) => {
|
299
499
|
t("update:modelValue", !1), t("close", e.messageBox ? h : void 0, e.messageBox ? L : void 0);
|
300
|
-
}, Fe = () => {
|
301
|
-
a.value = !1, he(), t("closed");
|
302
500
|
}, Ue = () => {
|
501
|
+
a.value = !1, ke(), t("closed");
|
502
|
+
}, We = () => {
|
303
503
|
t("opened");
|
304
|
-
},
|
504
|
+
}, Q = Se({
|
305
505
|
ok: !1,
|
306
506
|
cancel: !1
|
307
|
-
}),
|
308
|
-
let
|
309
|
-
if (
|
310
|
-
|
311
|
-
|
507
|
+
}), W = (h, L) => {
|
508
|
+
let _ = !0;
|
509
|
+
if (Q[h] = !0, E(e.onBeforeCancel) && (_ = e.onBeforeCancel(h) ?? !1), Pe(_)) {
|
510
|
+
_.then((Ge) => {
|
511
|
+
Q[h] = !1, Ge && pe(h, L);
|
312
512
|
});
|
313
513
|
return;
|
314
514
|
}
|
315
|
-
|
316
|
-
},
|
317
|
-
e.maskToClose && e.mask &&
|
318
|
-
}, Ze = (h) => {
|
319
|
-
U("cancel", h);
|
515
|
+
Q[h] = !1, _ && pe(h, L);
|
516
|
+
}, Ze = () => {
|
517
|
+
e.maskToClose && e.mask && W("cancel");
|
320
518
|
}, Ke = (h) => {
|
321
|
-
|
519
|
+
W("cancel", h);
|
520
|
+
}, Xe = (h) => {
|
521
|
+
W("ok", h);
|
322
522
|
};
|
323
|
-
let
|
324
|
-
const
|
325
|
-
e.escToClose && h.key ===
|
326
|
-
},
|
327
|
-
e.escToClose && !
|
328
|
-
},
|
329
|
-
|
523
|
+
let oe = !1;
|
524
|
+
const be = (h) => {
|
525
|
+
e.escToClose && h.key === Lt.ESC && P() && W("cancel");
|
526
|
+
}, Ye = () => {
|
527
|
+
e.escToClose && !oe && (oe = !0, St(document.documentElement, "keydown", be));
|
528
|
+
}, Oe = () => {
|
529
|
+
oe = !1, Tt(document.documentElement, "keydown", be);
|
330
530
|
};
|
331
|
-
return
|
332
|
-
|
333
|
-
}),
|
531
|
+
return Te(() => {
|
532
|
+
ke(), Oe();
|
533
|
+
}), ue(
|
334
534
|
() => c.value,
|
335
535
|
(h) => {
|
336
|
-
h ? (t("open"),
|
536
|
+
h ? (t("open"), Fe(), a.value = !0, Ye()) : Oe();
|
337
537
|
},
|
338
538
|
{ immediate: !0 }
|
339
539
|
), {
|
@@ -341,66 +541,61 @@ const vt = (e) => !!(e && e.shapeFlag & j.ELEMENT), ht = (e, t) => !!(e && e.sha
|
|
341
541
|
ns: l,
|
342
542
|
cn: n,
|
343
543
|
cnOMB: s,
|
344
|
-
messageBoxNs:
|
544
|
+
messageBoxNs: o,
|
345
545
|
containerStyle: i,
|
346
546
|
dialogStyle: g,
|
347
547
|
dialogRef: d,
|
348
|
-
teleportContainer:
|
548
|
+
teleportContainer: r,
|
349
549
|
teleportDisabled: f,
|
350
550
|
modelVisible: c,
|
351
551
|
mergeVisible: k,
|
352
|
-
interceptClose:
|
353
|
-
afterLeave:
|
354
|
-
afterEnter:
|
355
|
-
handleMaskClick:
|
356
|
-
handleCancel:
|
357
|
-
handleOk:
|
358
|
-
loadingObj:
|
552
|
+
interceptClose: W,
|
553
|
+
afterLeave: Ue,
|
554
|
+
afterEnter: We,
|
555
|
+
handleMaskClick: Ze,
|
556
|
+
handleCancel: Ke,
|
557
|
+
handleOk: Xe,
|
558
|
+
loadingObj: Q
|
359
559
|
};
|
360
560
|
}
|
361
|
-
})
|
362
|
-
|
363
|
-
|
364
|
-
n[l] = s;
|
365
|
-
return n;
|
366
|
-
};
|
367
|
-
function $t(e, t, n, l, s, r) {
|
368
|
-
return C(), B(Qe, {
|
561
|
+
});
|
562
|
+
function Pt(e, t, n, l, s, o) {
|
563
|
+
return C(), B(xe, {
|
369
564
|
to: e.teleportContainer,
|
370
565
|
disabled: e.teleportDisabled
|
371
566
|
}, [
|
372
|
-
!e.destroyOnClosed || e.mergeVisible ?
|
567
|
+
!e.destroyOnClosed || e.mergeVisible ? j((C(), b("div", {
|
373
568
|
key: 0,
|
374
569
|
ref: "dialogRef",
|
375
570
|
class: y(e.cls),
|
376
571
|
style: $(e.dialogStyle)
|
377
572
|
}, [
|
378
|
-
m(
|
573
|
+
m(ee, {
|
379
574
|
name: "x-fade-in-standard",
|
380
575
|
appear: ""
|
381
576
|
}, {
|
382
|
-
default:
|
383
|
-
e.mask ?
|
577
|
+
default: te(() => [
|
578
|
+
e.mask ? j((C(), b("div", {
|
384
579
|
key: 0,
|
385
580
|
class: y([e.cn.element("mask")])
|
386
581
|
}, null, 2)), [
|
387
582
|
[V, e.modelVisible]
|
388
|
-
]) :
|
583
|
+
]) : M("", !0)
|
389
584
|
]),
|
390
585
|
_: 1
|
391
586
|
}),
|
392
587
|
v("div", {
|
393
588
|
class: y([e.cn.element("wrapper"), { "is-center": e.center }]),
|
394
|
-
onClick: t[1] || (t[1] =
|
589
|
+
onClick: t[1] || (t[1] = Me((...u) => e.handleMaskClick && e.handleMaskClick(...u), ["self"]))
|
395
590
|
}, [
|
396
|
-
m(
|
591
|
+
m(ee, {
|
397
592
|
name: "x-zoom-in",
|
398
593
|
appear: "",
|
399
594
|
onAfterEnter: e.afterEnter,
|
400
595
|
onAfterLeave: e.afterLeave
|
401
596
|
}, {
|
402
|
-
default:
|
403
|
-
|
597
|
+
default: te(() => [
|
598
|
+
j(v("div", {
|
404
599
|
class: y([e.cn.element("container"), { "is-fullscreen": e.fullscreen }]),
|
405
600
|
style: $(e.containerStyle)
|
406
601
|
}, [
|
@@ -410,21 +605,21 @@ function $t(e, t, n, l, s, r) {
|
|
410
605
|
e.showHeaderBottomLine && "is-bottom-line"
|
411
606
|
])
|
412
607
|
}, [
|
413
|
-
|
608
|
+
T(e.$slots, "title", {}, () => [
|
414
609
|
v("div", {
|
415
610
|
class: y([e.cn.element("header-title")])
|
416
|
-
},
|
611
|
+
}, ne(e.title), 3)
|
417
612
|
])
|
418
613
|
], 2),
|
419
614
|
v("div", {
|
420
615
|
class: y([e.messageBox ? e.cnOMB.element("body") : e.cn.element("body")])
|
421
616
|
}, [
|
422
|
-
|
617
|
+
T(e.$slots, "default")
|
423
618
|
], 2),
|
424
619
|
v("div", {
|
425
620
|
class: y([e.messageBox ? e.cnOMB.element("footer") : e.cn.element("footer")])
|
426
621
|
}, [
|
427
|
-
|
622
|
+
T(e.$slots, "footer", {
|
428
623
|
cancel: e.handleCancel,
|
429
624
|
ok: e.handleOk,
|
430
625
|
loadingObj: e.loadingObj
|
@@ -434,7 +629,7 @@ function $t(e, t, n, l, s, r) {
|
|
434
629
|
key: 0,
|
435
630
|
class: y([e.cn.element("close-icon"), e.messageBox && e.cnOMB.element("close-icon")]),
|
436
631
|
onClick: t[0] || (t[0] = (u) => e.interceptClose("cancel"))
|
437
|
-
}, null, 2)) :
|
632
|
+
}, null, 2)) : M("", !0)
|
438
633
|
], 6), [
|
439
634
|
[V, e.modelVisible]
|
440
635
|
])
|
@@ -444,199 +639,11 @@ function $t(e, t, n, l, s, r) {
|
|
444
639
|
], 2)
|
445
640
|
], 6)), [
|
446
641
|
[V, e.mergeVisible]
|
447
|
-
]) :
|
642
|
+
]) : M("", !0)
|
448
643
|
], 8, ["to", "disabled"]);
|
449
644
|
}
|
450
|
-
const Ve = /* @__PURE__ */ N(
|
451
|
-
|
452
|
-
block: Boolean,
|
453
|
-
loading: Boolean,
|
454
|
-
loadingFill: {
|
455
|
-
type: Boolean,
|
456
|
-
default: !1
|
457
|
-
},
|
458
|
-
debounce: {
|
459
|
-
type: Number,
|
460
|
-
default: 0
|
461
|
-
},
|
462
|
-
shape: {
|
463
|
-
type: K(String),
|
464
|
-
default: void 0
|
465
|
-
},
|
466
|
-
link: {
|
467
|
-
type: Boolean,
|
468
|
-
default: !1
|
469
|
-
},
|
470
|
-
type: {
|
471
|
-
type: K(String),
|
472
|
-
default: void 0
|
473
|
-
},
|
474
|
-
status: {
|
475
|
-
type: K(String),
|
476
|
-
default: void 0
|
477
|
-
},
|
478
|
-
plain: {
|
479
|
-
type: Boolean,
|
480
|
-
default: !1
|
481
|
-
},
|
482
|
-
size: {
|
483
|
-
type: K(String),
|
484
|
-
default: "medium"
|
485
|
-
},
|
486
|
-
border: {
|
487
|
-
type: Boolean,
|
488
|
-
default: !0
|
489
|
-
}
|
490
|
-
}, Bt = (e) => Pe(e) ? e.split("-").map((t) => t.charAt(0).toUpperCase() + t.slice(1)).join("") : "", Tt = (e, t = "px") => {
|
491
|
-
if (e === void 0)
|
492
|
-
return "";
|
493
|
-
const n = typeof e == "number" ? `${e}` : e;
|
494
|
-
return ["px", "%", "vh", "vw", "calc"].some((s) => n.includes(s)) ? n : n + t;
|
495
|
-
};
|
496
|
-
function F(e) {
|
497
|
-
return R({
|
498
|
-
name: Le(`Icon${Bt(e)}`),
|
499
|
-
props: {
|
500
|
-
size: {
|
501
|
-
type: [Number, String],
|
502
|
-
default: void 0
|
503
|
-
},
|
504
|
-
rotate: {
|
505
|
-
type: Number,
|
506
|
-
default: void 0
|
507
|
-
},
|
508
|
-
spin: {
|
509
|
-
type: Boolean,
|
510
|
-
default: !1
|
511
|
-
},
|
512
|
-
color: {
|
513
|
-
type: String,
|
514
|
-
default: void 0
|
515
|
-
},
|
516
|
-
fillColor: {
|
517
|
-
type: Array,
|
518
|
-
default: void 0
|
519
|
-
}
|
520
|
-
},
|
521
|
-
setup(t) {
|
522
|
-
const n = "x-icon", l = p(() => {
|
523
|
-
const r = {};
|
524
|
-
return t.size && (r.fontSize = Tt(t.size)), t.rotate && (r.transform = `rotate(${t.rotate}deg)`), t.color && (r.color = t.color), r;
|
525
|
-
});
|
526
|
-
return {
|
527
|
-
cls: p(() => [
|
528
|
-
n,
|
529
|
-
{
|
530
|
-
[`${n}-loading`]: t.spin
|
531
|
-
}
|
532
|
-
]),
|
533
|
-
styles: l
|
534
|
-
};
|
535
|
-
}
|
536
|
-
});
|
537
|
-
}
|
538
|
-
const St = F("animation-loading");
|
539
|
-
function Mt(e, t, n, l, s, r) {
|
540
|
-
return C(), b("div", {
|
541
|
-
class: y(e.cls),
|
542
|
-
style: $(e.styles)
|
543
|
-
}, t[0] || (t[0] = [
|
544
|
-
v("svg", {
|
545
|
-
viewBox: "0 0 50 50",
|
546
|
-
class: "icon-loading-svg"
|
547
|
-
}, [
|
548
|
-
v("circle", {
|
549
|
-
cx: "25",
|
550
|
-
cy: "25",
|
551
|
-
r: "20",
|
552
|
-
class: "path",
|
553
|
-
fill: "none",
|
554
|
-
stroke: "currentColor"
|
555
|
-
})
|
556
|
-
], -1)
|
557
|
-
]), 6);
|
558
|
-
}
|
559
|
-
const Lt = /* @__PURE__ */ N(St, [["render", Mt], ["__scopeId", "data-v-62d46830"]]), At = R({
|
560
|
-
name: G("Button"),
|
561
|
-
components: {
|
562
|
-
AnimationLoading: Lt
|
563
|
-
},
|
564
|
-
props: Nt,
|
565
|
-
emits: ["click"],
|
566
|
-
setup(e) {
|
567
|
-
const t = Te({
|
568
|
-
// 点击
|
569
|
-
clicked: !1,
|
570
|
-
// 防抖
|
571
|
-
isDebounce: !1
|
572
|
-
}), n = D("button"), l = p(() => [
|
573
|
-
n.block,
|
574
|
-
e.type && n.modifier(e.type),
|
575
|
-
e.status && n.modifier(e.status),
|
576
|
-
e.disabled && n.is("disabled"),
|
577
|
-
e.block && n.modifier("block"),
|
578
|
-
e.plain && n.is("plain"),
|
579
|
-
e.shape && n.modifier(e.shape),
|
580
|
-
e.link && n.modifier("is-link"),
|
581
|
-
e.size && n.modifier(e.size),
|
582
|
-
!e.border && n.modifier("is-hide-border"),
|
583
|
-
r.value && n.modifier("is-loading")
|
584
|
-
]), s = () => {
|
585
|
-
e.debounce > 0 && !t.isDebounce && (t.isDebounce = !0, setTimeout(() => {
|
586
|
-
t.isDebounce = !1;
|
587
|
-
}, e.debounce));
|
588
|
-
}, r = p(() => e.loading || t.clicked || t.isDebounce), u = _e(), o = (f, g) => {
|
589
|
-
const i = f(g);
|
590
|
-
Ie(i) && (t.clicked = !0, i.finally(() => {
|
591
|
-
t.clicked = !1;
|
592
|
-
}));
|
593
|
-
};
|
594
|
-
return {
|
595
|
-
cn: n,
|
596
|
-
cls: l,
|
597
|
-
handleClick: async (f) => {
|
598
|
-
var i, a, c, k;
|
599
|
-
if ((a = (i = f.target).blur) == null || a.call(i), r.value) return;
|
600
|
-
s();
|
601
|
-
const g = (k = (c = u == null ? void 0 : u.vnode) == null ? void 0 : c.props) == null ? void 0 : k.onClick;
|
602
|
-
Ae(g) ? g.forEach((O) => o(O, f)) : E(g) && o(g, f);
|
603
|
-
},
|
604
|
-
isLoading: r
|
605
|
-
};
|
606
|
-
}
|
607
|
-
}), Dt = ["disabled"];
|
608
|
-
function It(e, t, n, l, s, r) {
|
609
|
-
const u = z("AnimationLoading");
|
610
|
-
return C(), b("button", {
|
611
|
-
class: y(e.cls),
|
612
|
-
type: "button",
|
613
|
-
disabled: e.disabled,
|
614
|
-
onClick: t[0] || (t[0] = (...o) => e.handleClick && e.handleClick(...o))
|
615
|
-
}, [
|
616
|
-
H(v("span", {
|
617
|
-
class: y([e.cn.element("loading")])
|
618
|
-
}, [
|
619
|
-
m(u)
|
620
|
-
], 2), [
|
621
|
-
[V, e.isLoading]
|
622
|
-
]),
|
623
|
-
e.$slots.prefix ? (C(), b("span", {
|
624
|
-
key: 0,
|
625
|
-
class: y([e.cn.element("prefix")])
|
626
|
-
}, [
|
627
|
-
M(e.$slots, "prefix")
|
628
|
-
], 2)) : S("", !0),
|
629
|
-
M(e.$slots, "default"),
|
630
|
-
e.$slots.suffix ? (C(), b("span", {
|
631
|
-
key: 1,
|
632
|
-
class: y([e.cn.element("suffix")])
|
633
|
-
}, [
|
634
|
-
M(e.$slots, "suffix")
|
635
|
-
], 2)) : S("", !0)
|
636
|
-
], 10, Dt);
|
637
|
-
}
|
638
|
-
const ne = /* @__PURE__ */ N(At, [["render", It]]), je = /* @__PURE__ */ R({
|
639
|
-
name: G("Space"),
|
645
|
+
const Ve = /* @__PURE__ */ N(It, [["render", Pt]]), Re = /* @__PURE__ */ F({
|
646
|
+
name: q("Space"),
|
640
647
|
props: {
|
641
648
|
direction: {
|
642
649
|
type: String,
|
@@ -658,9 +665,9 @@ const ne = /* @__PURE__ */ N(At, [["render", It]]), je = /* @__PURE__ */ R({
|
|
658
665
|
setup(e, {
|
659
666
|
slots: t
|
660
667
|
}) {
|
661
|
-
const n =
|
668
|
+
const n = I("space"), l = p(() => [n.block, n.element(e.direction), e.fill && "is-fill", n.element(`${e.direction}-${e.align}`)]);
|
662
669
|
function s(u) {
|
663
|
-
if (
|
670
|
+
if (ot(u))
|
664
671
|
return u;
|
665
672
|
switch (u) {
|
666
673
|
case "mini":
|
@@ -675,39 +682,39 @@ const ne = /* @__PURE__ */ N(At, [["render", It]]), je = /* @__PURE__ */ R({
|
|
675
682
|
return 8;
|
676
683
|
}
|
677
684
|
}
|
678
|
-
const
|
679
|
-
const
|
680
|
-
if (u) return
|
685
|
+
const o = (u) => {
|
686
|
+
const r = {};
|
687
|
+
if (u) return r;
|
681
688
|
const d = `${s(e.size)}px`, f = `${s(e.size)}px`;
|
682
|
-
return e.direction === "horizontal" && (
|
689
|
+
return e.direction === "horizontal" && (r.marginRight = d), e.direction === "vertical" && (r.marginBottom = f), r;
|
683
690
|
};
|
684
691
|
return () => {
|
685
|
-
var
|
686
|
-
const u =
|
692
|
+
var r;
|
693
|
+
const u = x((r = t.default) == null ? void 0 : r.call(t), !0).filter((d) => d.type !== et);
|
687
694
|
return m("div", {
|
688
695
|
class: [l.value]
|
689
696
|
}, [u.map((d, f) => {
|
690
697
|
var i;
|
691
698
|
const g = t.split && f > 0;
|
692
|
-
return m(
|
699
|
+
return m(G, {
|
693
700
|
key: `space-item-${f}`
|
694
701
|
}, [g && m("div", {
|
695
702
|
className: n.element("split"),
|
696
|
-
style:
|
703
|
+
style: o(!1)
|
697
704
|
}, [(i = t.split) == null ? void 0 : i.call(t)]), m("div", {
|
698
705
|
className: n.element("item"),
|
699
|
-
style:
|
706
|
+
style: o(f === u.length - 1)
|
700
707
|
}, [d])]);
|
701
708
|
})]);
|
702
709
|
};
|
703
710
|
}
|
704
711
|
});
|
705
|
-
function
|
706
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
712
|
+
function Ee(e) {
|
713
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !O(e);
|
707
714
|
}
|
708
|
-
const
|
715
|
+
const $e = I("dialog"), an = (e) => {
|
709
716
|
const t = document.createElement("div"), n = () => {
|
710
|
-
|
717
|
+
D(null, t);
|
711
718
|
}, l = (i) => {
|
712
719
|
if (i === "cancel")
|
713
720
|
return e.beforeOnCancel ? e.beforeOnCancel() : !0;
|
@@ -715,45 +722,45 @@ const Ee = D("dialog"), sn = (e) => {
|
|
715
722
|
return e.beforeOnOk ? e.beforeOnOk() : !0;
|
716
723
|
}, s = (i, a) => {
|
717
724
|
i === "cancel" && e.onCancel && e.onCancel(a), i === "ok" && e.onOk && e.onOk(a);
|
718
|
-
},
|
719
|
-
if (
|
725
|
+
}, o = (i) => {
|
726
|
+
if (O(i)) return i;
|
720
727
|
if (E(i)) {
|
721
728
|
const a = i();
|
722
|
-
return
|
729
|
+
return O(a) ? a : null;
|
723
730
|
}
|
724
731
|
return m("div", {
|
725
|
-
className:
|
726
|
-
}, [
|
732
|
+
className: $e.element("header-title")
|
733
|
+
}, [S(" "), i, S(" ")]);
|
727
734
|
}, u = (i) => {
|
728
|
-
if (
|
735
|
+
if (O(i)) return i;
|
729
736
|
if (E(i)) {
|
730
737
|
const a = i();
|
731
|
-
return
|
738
|
+
return O(a) ? a : null;
|
732
739
|
}
|
733
740
|
return m("div", {
|
734
|
-
className:
|
735
|
-
}, [
|
736
|
-
},
|
737
|
-
if (
|
741
|
+
className: $e.element("content")
|
742
|
+
}, [S(" "), e.content, S(" ")]);
|
743
|
+
}, r = () => () => m(G, null, [e.title && o(e.title)]), d = () => () => m(G, null, [e.content && u(e.content)]), f = () => {
|
744
|
+
if (O(e.footer) || E(e.footer))
|
738
745
|
return e.footer;
|
739
746
|
const i = (e == null ? void 0 : e.cancelText) || "取消", a = (e == null ? void 0 : e.okText) || "确认";
|
740
|
-
return (c) => m(
|
747
|
+
return (c) => m(Re, {
|
741
748
|
size: 12
|
742
749
|
}, {
|
743
750
|
default: () => {
|
744
|
-
var k,
|
745
|
-
return [!e.hideCancel && m(
|
751
|
+
var k, w;
|
752
|
+
return [!e.hideCancel && m(A, {
|
746
753
|
size: "small",
|
747
754
|
onClick: c.cancel,
|
748
755
|
loading: (k = c.loadingObj) == null ? void 0 : k.cancel
|
749
|
-
},
|
756
|
+
}, Ee(i) ? i : {
|
750
757
|
default: () => [i]
|
751
|
-
}), !e.hideOk && m(
|
758
|
+
}), !e.hideOk && m(A, {
|
752
759
|
type: "primary",
|
753
760
|
size: "small",
|
754
761
|
onClick: c.ok,
|
755
|
-
loading: (
|
756
|
-
},
|
762
|
+
loading: (w = c.loadingObj) == null ? void 0 : w.ok
|
763
|
+
}, Ee(a) ? a : {
|
757
764
|
default: () => [a]
|
758
765
|
})];
|
759
766
|
}
|
@@ -778,13 +785,13 @@ const Ee = D("dialog"), sn = (e) => {
|
|
778
785
|
onOpened: () => {
|
779
786
|
}
|
780
787
|
}, {
|
781
|
-
title:
|
788
|
+
title: r(),
|
782
789
|
default: d(),
|
783
790
|
footer: f()
|
784
791
|
});
|
785
|
-
|
786
|
-
},
|
787
|
-
function
|
792
|
+
D(g, t);
|
793
|
+
}, zt = ["success", "warning", "error", "strong", "info"], Ht = U("close-circle-fill");
|
794
|
+
function jt(e, t, n, l, s, o) {
|
788
795
|
return C(), b("div", {
|
789
796
|
class: y(e.cls),
|
790
797
|
style: $(e.styles)
|
@@ -809,8 +816,8 @@ function Ht(e, t, n, l, s, r) {
|
|
809
816
|
], -1)
|
810
817
|
]), 6);
|
811
818
|
}
|
812
|
-
const
|
813
|
-
function
|
819
|
+
const ye = /* @__PURE__ */ N(Ht, [["render", jt]]), Vt = U("check-circle-fill");
|
820
|
+
function Rt(e, t, n, l, s, o) {
|
814
821
|
return C(), b("div", {
|
815
822
|
class: y(e.cls),
|
816
823
|
style: $(e.styles)
|
@@ -835,8 +842,8 @@ function jt(e, t, n, l, s, r) {
|
|
835
842
|
], -1)
|
836
843
|
]), 6);
|
837
844
|
}
|
838
|
-
const
|
839
|
-
function
|
845
|
+
const ge = /* @__PURE__ */ N(Vt, [["render", Rt]]), Ft = U("exclamation-circle-fill");
|
846
|
+
function Ut(e, t, n, l, s, o) {
|
840
847
|
return C(), b("div", {
|
841
848
|
class: y(e.cls),
|
842
849
|
style: $(e.styles)
|
@@ -861,8 +868,8 @@ function Ft(e, t, n, l, s, r) {
|
|
861
868
|
], -1)
|
862
869
|
]), 6);
|
863
870
|
}
|
864
|
-
const
|
865
|
-
function
|
871
|
+
const Ce = /* @__PURE__ */ N(Ft, [["render", Ut]]), Wt = U("info-circle-fill");
|
872
|
+
function Zt(e, t, n, l, s, o) {
|
866
873
|
return C(), b("div", {
|
867
874
|
class: y(e.cls),
|
868
875
|
style: $(e.styles)
|
@@ -887,8 +894,8 @@ function Wt(e, t, n, l, s, r) {
|
|
887
894
|
], -1)
|
888
895
|
]), 6);
|
889
896
|
}
|
890
|
-
const
|
891
|
-
function
|
897
|
+
const ve = /* @__PURE__ */ N(Wt, [["render", Zt]]), Kt = U("minus-circle-fill");
|
898
|
+
function Xt(e, t, n, l, s, o) {
|
892
899
|
return C(), b("div", {
|
893
900
|
class: y(e.cls),
|
894
901
|
style: $(e.styles)
|
@@ -913,14 +920,14 @@ function Kt(e, t, n, l, s, r) {
|
|
913
920
|
], -1)
|
914
921
|
]), 6);
|
915
922
|
}
|
916
|
-
const
|
917
|
-
name:
|
923
|
+
const he = /* @__PURE__ */ N(Kt, [["render", Xt]]), Yt = F({
|
924
|
+
name: q("Message"),
|
918
925
|
components: {
|
919
|
-
CloseCircleFill:
|
920
|
-
CheckCircleFill:
|
921
|
-
ExclamationCircleFill:
|
922
|
-
InfoCircleFill:
|
923
|
-
MinusCircleFill:
|
926
|
+
CloseCircleFill: ye,
|
927
|
+
CheckCircleFill: ge,
|
928
|
+
ExclamationCircleFill: Ce,
|
929
|
+
InfoCircleFill: ve,
|
930
|
+
MinusCircleFill: he
|
924
931
|
},
|
925
932
|
props: {
|
926
933
|
id: {
|
@@ -968,69 +975,69 @@ const ve = /* @__PURE__ */ N(Zt, [["render", Kt]]), Xt = R({
|
|
968
975
|
},
|
969
976
|
emits: ["destroy"],
|
970
977
|
setup(e) {
|
971
|
-
const t =
|
978
|
+
const t = I("message"), n = p(() => [
|
972
979
|
t.block,
|
973
980
|
t.modifier(e.type),
|
974
981
|
e.center && t.modifier("center"),
|
975
982
|
e.showClose && !e.center && t.element("show-close"),
|
976
983
|
e.popupClass && e.popupClass
|
977
|
-
]), l =
|
984
|
+
]), l = Y(!1);
|
978
985
|
let s = null;
|
979
|
-
const
|
986
|
+
const o = () => {
|
980
987
|
s = setTimeout(() => {
|
981
988
|
l.value = !1;
|
982
989
|
}, e.duration);
|
983
990
|
};
|
984
|
-
|
985
|
-
l.value = !0, e.duration !== 0 &&
|
986
|
-
}),
|
991
|
+
de(() => {
|
992
|
+
l.value = !0, e.duration !== 0 && o();
|
993
|
+
}), Le(() => {
|
987
994
|
clearTimeout(s);
|
988
995
|
});
|
989
|
-
const { zIndex: u } =
|
996
|
+
const { zIndex: u } = fe("message", { runOnMounted: !0 }), r = p(() => ({
|
990
997
|
top: `${e.offset}px`,
|
991
998
|
zIndex: u.value
|
992
999
|
}));
|
993
1000
|
return {
|
994
1001
|
cn: t,
|
995
1002
|
cls: n,
|
996
|
-
styles:
|
1003
|
+
styles: r,
|
997
1004
|
visible: l,
|
998
1005
|
handleClose: () => {
|
999
1006
|
l.value = !1;
|
1000
1007
|
}
|
1001
1008
|
};
|
1002
1009
|
}
|
1003
|
-
}),
|
1004
|
-
function
|
1005
|
-
const u =
|
1006
|
-
return C(), B(
|
1010
|
+
}), Gt = ["innerHTML"], qt = { key: 1 };
|
1011
|
+
function Jt(e, t, n, l, s, o) {
|
1012
|
+
const u = H("CheckCircleFill"), r = H("ExclamationCircleFill"), d = H("MinusCircleFill"), f = H("CloseCircleFill"), g = H("InfoCircleFill");
|
1013
|
+
return C(), B(ee, {
|
1007
1014
|
name: "x-message-slide-top",
|
1008
1015
|
onBeforeLeave: e.onClose,
|
1009
1016
|
onAfterLeave: t[1] || (t[1] = (i) => e.$emit("destroy"))
|
1010
1017
|
}, {
|
1011
|
-
default:
|
1012
|
-
|
1018
|
+
default: te(() => [
|
1019
|
+
j(v("div", {
|
1013
1020
|
class: y(e.cls),
|
1014
1021
|
style: $(e.styles)
|
1015
1022
|
}, [
|
1016
|
-
e.$slots.icon ?
|
1023
|
+
e.$slots.icon ? M("", !0) : (C(), b("span", {
|
1017
1024
|
key: 0,
|
1018
1025
|
class: y([e.cn.element("icon"), e.cn.modifier(`icon-${e.type}`)])
|
1019
1026
|
}, [
|
1020
|
-
|
1021
|
-
e.type === "success" ? (C(), B(u, { key: 0 })) : e.type === "warning" ? (C(), B(
|
1027
|
+
T(e.$slots, "icon", {}, () => [
|
1028
|
+
e.type === "success" ? (C(), B(u, { key: 0 })) : e.type === "warning" ? (C(), B(r, { key: 1 })) : e.type === "strong" ? (C(), B(d, { key: 2 })) : e.type === "error" ? (C(), B(f, { key: 3 })) : e.type === "info" ? (C(), B(g, { key: 4 })) : M("", !0)
|
1022
1029
|
])
|
1023
1030
|
], 2)),
|
1024
|
-
|
1031
|
+
T(e.$slots, "default", {}, () => [
|
1025
1032
|
e.useHTML ? (C(), b("span", {
|
1026
1033
|
key: 0,
|
1027
1034
|
innerHTML: e.message
|
1028
|
-
}, null, 8,
|
1035
|
+
}, null, 8, Gt)) : (C(), b("span", qt, ne(e.message), 1)),
|
1029
1036
|
e.showClose ? (C(), b("span", {
|
1030
1037
|
key: 2,
|
1031
1038
|
class: y([e.cn.element("close-icon")]),
|
1032
1039
|
onClick: t[0] || (t[0] = (...i) => e.handleClose && e.handleClose(...i))
|
1033
|
-
}, null, 2)) :
|
1040
|
+
}, null, 2)) : M("", !0)
|
1034
1041
|
])
|
1035
1042
|
], 6), [
|
1036
1043
|
[V, e.visible]
|
@@ -1039,64 +1046,64 @@ function qt(e, t, n, l, s, r) {
|
|
1039
1046
|
_: 3
|
1040
1047
|
}, 8, ["onBeforeLeave"]);
|
1041
1048
|
}
|
1042
|
-
const
|
1043
|
-
(typeof e == "string" ||
|
1049
|
+
const Qt = /* @__PURE__ */ N(Yt, [["render", Jt]]), ae = /* @__PURE__ */ new WeakMap(), ie = (e) => {
|
1050
|
+
(typeof e == "string" || O(e)) && (e = {
|
1044
1051
|
message: e
|
1045
1052
|
});
|
1046
|
-
const t =
|
1047
|
-
|
1048
|
-
const n =
|
1053
|
+
const t = me(e.renderTo || "body");
|
1054
|
+
ae.has(t) || ae.set(t, []);
|
1055
|
+
const n = ae.get(t);
|
1049
1056
|
let l = e.offset || 20;
|
1050
1057
|
n.forEach((i) => {
|
1051
1058
|
var a;
|
1052
1059
|
l += ((a = i.el) == null ? void 0 : a.offsetHeight) + 20;
|
1053
1060
|
});
|
1054
1061
|
const s = e.onClose;
|
1055
|
-
let
|
1056
|
-
|
1062
|
+
let o = {};
|
1063
|
+
o = { ...e, onClose: () => {
|
1057
1064
|
var c;
|
1058
1065
|
const i = n.findIndex((k) => k === d);
|
1059
1066
|
if (i < 0) return;
|
1060
1067
|
const a = ((c = d.el) == null ? void 0 : c.offsetHeight) + 20;
|
1061
1068
|
n.slice(i + 1).forEach((k) => {
|
1062
|
-
var
|
1063
|
-
const
|
1064
|
-
k.component.props.offset =
|
1069
|
+
var P;
|
1070
|
+
const w = (P = k.component) == null ? void 0 : P.props.offset;
|
1071
|
+
k.component.props.offset = w - a;
|
1065
1072
|
}), n.splice(i, 1), s && s(d);
|
1066
1073
|
}, onDestroy: () => {
|
1067
|
-
|
1074
|
+
D(null, f);
|
1068
1075
|
}, offset: l };
|
1069
1076
|
const d = m(
|
1070
|
-
|
1071
|
-
|
1072
|
-
E(
|
1073
|
-
default: E(
|
1077
|
+
Qt,
|
1078
|
+
o,
|
1079
|
+
E(o.message) || O(o.message) ? {
|
1080
|
+
default: E(o.message) ? o.message : () => o.message
|
1074
1081
|
} : null
|
1075
1082
|
), f = document.createElement("div");
|
1076
|
-
return
|
1083
|
+
return D(d, f), t.tagName === "BODY" ? d.el.style.position = "fixed" : (t.style.position = "relative", d.el.style.position = "absolute"), t.appendChild(f.firstElementChild), n.push(d), {
|
1077
1084
|
close: () => {
|
1078
1085
|
d.component.proxy.handleClose();
|
1079
1086
|
}
|
1080
1087
|
};
|
1081
|
-
},
|
1082
|
-
|
1083
|
-
|
1088
|
+
}, _t = () => {
|
1089
|
+
zt.forEach((e) => {
|
1090
|
+
ie[e] = (t) => Ie(t) ? ie({
|
1084
1091
|
type: e,
|
1085
1092
|
...t
|
1086
|
-
}) :
|
1093
|
+
}) : ie({
|
1087
1094
|
message: t,
|
1088
1095
|
type: e
|
1089
1096
|
});
|
1090
1097
|
});
|
1091
1098
|
};
|
1092
|
-
|
1093
|
-
const
|
1094
|
-
function
|
1095
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
1099
|
+
_t();
|
1100
|
+
const xt = ["info", "success", "warning", "strong", "error"];
|
1101
|
+
function Ne(e) {
|
1102
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !O(e);
|
1096
1103
|
}
|
1097
|
-
const
|
1104
|
+
const ce = I("message-box"), Be = (e) => {
|
1098
1105
|
const t = document.createElement("div"), n = () => {
|
1099
|
-
|
1106
|
+
D(null, t);
|
1100
1107
|
}, l = (a) => {
|
1101
1108
|
if (a === "cancel")
|
1102
1109
|
return e.beforeOnCancel ? e.beforeOnCancel() : !0;
|
@@ -1104,82 +1111,82 @@ const ie = D("message-box"), Ne = (e) => {
|
|
1104
1111
|
return e.beforeOnOk ? e.beforeOnOk() : !0;
|
1105
1112
|
}, s = (a, c) => {
|
1106
1113
|
a === "cancel" && e.onCancel && e.onCancel(c), a === "ok" && e.onOk && e.onOk(c);
|
1107
|
-
},
|
1114
|
+
}, o = (a) => {
|
1108
1115
|
let c;
|
1109
1116
|
switch (a) {
|
1110
1117
|
case "warning":
|
1111
|
-
c = m(
|
1118
|
+
c = m(Ce, {
|
1112
1119
|
size: "22px",
|
1113
1120
|
color: "#f6c64b"
|
1114
1121
|
}, null);
|
1115
1122
|
break;
|
1116
1123
|
case "strong":
|
1117
|
-
c = m(
|
1124
|
+
c = m(he, {
|
1118
1125
|
size: "22px",
|
1119
1126
|
color: "#ff7125"
|
1120
1127
|
}, null);
|
1121
1128
|
break;
|
1122
1129
|
case "error":
|
1123
|
-
c = m(
|
1130
|
+
c = m(ye, {
|
1124
1131
|
size: "22px",
|
1125
1132
|
color: "#e24f48"
|
1126
1133
|
}, null);
|
1127
1134
|
break;
|
1128
1135
|
case "success":
|
1129
|
-
c = m(
|
1136
|
+
c = m(ge, {
|
1130
1137
|
size: "22px",
|
1131
1138
|
color: "#68d1ab"
|
1132
1139
|
}, null);
|
1133
1140
|
break;
|
1134
1141
|
case "info":
|
1135
|
-
c = m(
|
1142
|
+
c = m(ve, {
|
1136
1143
|
size: "22px",
|
1137
1144
|
color: "#2355f5"
|
1138
1145
|
}, null);
|
1139
1146
|
break;
|
1140
1147
|
}
|
1141
1148
|
return m("div", {
|
1142
|
-
className:
|
1149
|
+
className: ce.element("icon")
|
1143
1150
|
}, [c]);
|
1144
1151
|
}, u = (a) => {
|
1145
|
-
if (
|
1152
|
+
if (O(a)) return a;
|
1146
1153
|
if (E(a)) {
|
1147
1154
|
const c = a();
|
1148
|
-
return
|
1155
|
+
return O(c) ? c : null;
|
1149
1156
|
}
|
1150
1157
|
return m("div", {
|
1151
|
-
className:
|
1152
|
-
}, [
|
1153
|
-
},
|
1154
|
-
if (
|
1158
|
+
className: ce.element("title")
|
1159
|
+
}, [S(" "), a, S(" ")]);
|
1160
|
+
}, r = (a) => {
|
1161
|
+
if (O(a)) return a;
|
1155
1162
|
if (E(a)) {
|
1156
1163
|
const c = a();
|
1157
|
-
return
|
1164
|
+
return O(c) ? c : null;
|
1158
1165
|
}
|
1159
1166
|
return m("div", {
|
1160
|
-
className:
|
1161
|
-
}, [
|
1162
|
-
}, d = () => () => m(
|
1163
|
-
if (
|
1167
|
+
className: ce.element("content")
|
1168
|
+
}, [S(" "), e.content, S(" ")]);
|
1169
|
+
}, d = () => () => m(G, null, [o(e.type || "success"), e.title && u(e.title)]), f = () => () => m(G, null, [e.content && r(e.content)]), g = () => {
|
1170
|
+
if (O(e.footer) || E(e.footer))
|
1164
1171
|
return e.footer;
|
1165
1172
|
const a = (e == null ? void 0 : e.cancelText) || "取消", c = (e == null ? void 0 : e.okText) || "确认";
|
1166
|
-
return (k) => m(
|
1173
|
+
return (k) => m(Re, {
|
1167
1174
|
size: 12
|
1168
1175
|
}, {
|
1169
1176
|
default: () => {
|
1170
|
-
var
|
1171
|
-
return [!e.hideCancel && m(
|
1177
|
+
var w, P;
|
1178
|
+
return [!e.hideCancel && m(A, {
|
1172
1179
|
size: "small",
|
1173
1180
|
onClick: k.cancel,
|
1174
|
-
loading: (
|
1175
|
-
},
|
1181
|
+
loading: (w = k.loadingObj) == null ? void 0 : w.cancel
|
1182
|
+
}, Ne(a) ? a : {
|
1176
1183
|
default: () => [a]
|
1177
|
-
}), !e.hideOk && m(
|
1184
|
+
}), !e.hideOk && m(A, {
|
1178
1185
|
type: "primary",
|
1179
1186
|
size: "small",
|
1180
1187
|
onClick: k.ok,
|
1181
|
-
loading: (
|
1182
|
-
},
|
1188
|
+
loading: (P = k.loadingObj) == null ? void 0 : P.ok
|
1189
|
+
}, Ne(c) ? c : {
|
1183
1190
|
default: () => [c]
|
1184
1191
|
})];
|
1185
1192
|
}
|
@@ -1209,39 +1216,39 @@ const ie = D("message-box"), Ne = (e) => {
|
|
1209
1216
|
default: f(),
|
1210
1217
|
footer: g()
|
1211
1218
|
});
|
1212
|
-
|
1213
|
-
},
|
1214
|
-
|
1215
|
-
|
1219
|
+
D(i, t);
|
1220
|
+
}, en = () => {
|
1221
|
+
xt.forEach((e) => {
|
1222
|
+
Be[e] = (t, n) => {
|
1216
1223
|
const l = [], s = [];
|
1217
|
-
let
|
1224
|
+
let o = () => !0, u = () => !0;
|
1218
1225
|
return setTimeout(() => {
|
1219
|
-
|
1226
|
+
Be({
|
1220
1227
|
title: t,
|
1221
1228
|
content: n,
|
1222
1229
|
type: e,
|
1223
1230
|
beforeOnCancel: u,
|
1224
|
-
beforeOnOk:
|
1231
|
+
beforeOnOk: o,
|
1225
1232
|
onOk: () => {
|
1226
|
-
l.forEach((
|
1233
|
+
l.forEach((r) => E(r) && r());
|
1227
1234
|
},
|
1228
1235
|
onCancel: () => {
|
1229
|
-
s.forEach((
|
1236
|
+
s.forEach((r) => E(r) && r());
|
1230
1237
|
}
|
1231
1238
|
});
|
1232
1239
|
}, 0), {
|
1233
|
-
ok(...
|
1234
|
-
return
|
1240
|
+
ok(...r) {
|
1241
|
+
return r.length === 1 && l.push(r[0]), r.length === 2 && (o = r[0], l.push(r[1])), this;
|
1235
1242
|
},
|
1236
|
-
cancel(...
|
1237
|
-
return
|
1243
|
+
cancel(...r) {
|
1244
|
+
return r.length === 1 && s.push(r[0]), r.length === 2 && (u = r[0], s.push(r[1])), this;
|
1238
1245
|
}
|
1239
1246
|
};
|
1240
1247
|
};
|
1241
1248
|
});
|
1242
1249
|
};
|
1243
|
-
|
1244
|
-
const
|
1250
|
+
en();
|
1251
|
+
const tn = {
|
1245
1252
|
position: {
|
1246
1253
|
type: String,
|
1247
1254
|
default: "top-right"
|
@@ -1279,54 +1286,54 @@ const en = {
|
|
1279
1286
|
type: Boolean,
|
1280
1287
|
default: !1
|
1281
1288
|
}
|
1282
|
-
},
|
1283
|
-
name:
|
1284
|
-
props:
|
1289
|
+
}, nn = F({
|
1290
|
+
name: q("Notification"),
|
1291
|
+
props: tn,
|
1285
1292
|
emits: ["close", "destroy"],
|
1286
1293
|
setup(e) {
|
1287
|
-
const t =
|
1294
|
+
const t = I("notification"), n = t.block, l = p(() => [n, t.modifier(o.value.ver)]), { zIndex: s } = fe("message", { runOnMounted: !0 }), o = p(() => {
|
1288
1295
|
const c = e.position.split("-");
|
1289
1296
|
return {
|
1290
1297
|
hor: c[1],
|
1291
1298
|
ver: c[0]
|
1292
1299
|
};
|
1293
|
-
}), u = p(() => `x-notification-slide-${
|
1300
|
+
}), u = p(() => `x-notification-slide-${o.value.hor}`), r = p(() => {
|
1294
1301
|
const c = {};
|
1295
|
-
return c.position = e.renderToBody ? "fixed" : "absolute", c.zIndex = s.value, c[
|
1296
|
-
}), d =
|
1302
|
+
return c.position = e.renderToBody ? "fixed" : "absolute", c.zIndex = s.value, c[o.value.hor] = "20px", c[o.value.ver] = `${e.offset}px`, c;
|
1303
|
+
}), d = Y(!1);
|
1297
1304
|
let f = 0;
|
1298
1305
|
const g = () => {
|
1299
1306
|
setTimeout(() => {
|
1300
1307
|
d.value = !1;
|
1301
1308
|
}, e.duration);
|
1302
|
-
}, i = p(() => e.type === "info" ?
|
1309
|
+
}, i = p(() => e.type === "info" ? ve : e.type === "warning" ? Ce : e.type === "strong" ? he : e.type === "success" ? ge : e.type === "error" ? ye : ""), a = () => {
|
1303
1310
|
d.value = !1;
|
1304
1311
|
};
|
1305
|
-
return
|
1312
|
+
return de(() => {
|
1306
1313
|
e.duration !== 0 && g(), d.value = !0;
|
1307
|
-
}),
|
1314
|
+
}), Le(() => {
|
1308
1315
|
clearTimeout(f);
|
1309
1316
|
}), {
|
1310
1317
|
ns: n,
|
1311
1318
|
cn: t,
|
1312
1319
|
cls: l,
|
1313
1320
|
animationClsName: u,
|
1314
|
-
positionStyle:
|
1321
|
+
positionStyle: r,
|
1315
1322
|
visible: d,
|
1316
|
-
positionPropMap:
|
1323
|
+
positionPropMap: o,
|
1317
1324
|
currentIcon: i,
|
1318
1325
|
handleClose: a
|
1319
1326
|
};
|
1320
1327
|
}
|
1321
1328
|
});
|
1322
|
-
function
|
1323
|
-
return C(), B(
|
1329
|
+
function ln(e, t, n, l, s, o) {
|
1330
|
+
return C(), B(ee, {
|
1324
1331
|
name: e.animationClsName,
|
1325
1332
|
onBeforeLeave: t[1] || (t[1] = (u) => e.$emit("close")),
|
1326
1333
|
onAfterLeave: t[2] || (t[2] = (u) => e.$emit("destroy"))
|
1327
1334
|
}, {
|
1328
|
-
default:
|
1329
|
-
|
1335
|
+
default: te(() => [
|
1336
|
+
j(v("div", {
|
1330
1337
|
class: y(e.cls),
|
1331
1338
|
style: $(e.positionStyle)
|
1332
1339
|
}, [
|
@@ -1336,17 +1343,17 @@ function nn(e, t, n, l, s, r) {
|
|
1336
1343
|
v("div", {
|
1337
1344
|
class: y([e.cn.element("icon"), e.cn.modifier(`icon-${e.type}`)])
|
1338
1345
|
}, [
|
1339
|
-
(C(), B(
|
1346
|
+
(C(), B(tt(e.currentIcon)))
|
1340
1347
|
], 2),
|
1341
1348
|
v("div", null, [
|
1342
1349
|
v("div", {
|
1343
1350
|
class: y([e.cn.element("title")])
|
1344
|
-
},
|
1351
|
+
}, ne(e.title), 3),
|
1345
1352
|
v("div", {
|
1346
1353
|
class: y([e.cn.element("message")])
|
1347
1354
|
}, [
|
1348
|
-
|
1349
|
-
|
1355
|
+
T(e.$slots, "default", {}, () => [
|
1356
|
+
S(ne(e.message), 1)
|
1350
1357
|
])
|
1351
1358
|
], 2)
|
1352
1359
|
])
|
@@ -1354,8 +1361,8 @@ function nn(e, t, n, l, s, r) {
|
|
1354
1361
|
e.showClose ? (C(), b("span", {
|
1355
1362
|
key: 0,
|
1356
1363
|
class: y([e.cn.element("close-icon")]),
|
1357
|
-
onClick: t[0] || (t[0] =
|
1358
|
-
}, null, 2)) :
|
1364
|
+
onClick: t[0] || (t[0] = Me((...u) => e.handleClose && e.handleClose(...u), ["self"]))
|
1365
|
+
}, null, 2)) : M("", !0)
|
1359
1366
|
], 6), [
|
1360
1367
|
[V, e.visible]
|
1361
1368
|
])
|
@@ -1363,52 +1370,59 @@ function nn(e, t, n, l, s, r) {
|
|
1363
1370
|
_: 3
|
1364
1371
|
}, 8, ["name"]);
|
1365
1372
|
}
|
1366
|
-
const
|
1367
|
-
const t =
|
1368
|
-
|
1369
|
-
const l =
|
1373
|
+
const on = /* @__PURE__ */ N(nn, [["render", ln]]), Z = /* @__PURE__ */ new WeakMap(), cn = (e) => {
|
1374
|
+
const t = me(e.renderTo || "body"), n = document.createElement("div");
|
1375
|
+
Z.get(t) || Z.set(t, {}), Z.get(t)[e.position] || (Z.get(t)[e.position] = []);
|
1376
|
+
const l = Z.get(t)[e.position];
|
1370
1377
|
let s = e.offset || 20;
|
1371
1378
|
l.forEach((g) => {
|
1372
1379
|
var i;
|
1373
1380
|
s += ((i = g.el) == null ? void 0 : i.offsetHeight) + 20;
|
1374
1381
|
});
|
1375
|
-
const
|
1376
|
-
|
1377
|
-
const u = e.onClose,
|
1382
|
+
const o = t.tagName === "BODY";
|
1383
|
+
o || (t.style.position = "relative", t.style.overflowX = "hidden");
|
1384
|
+
const u = e.onClose, r = () => {
|
1378
1385
|
var a;
|
1379
1386
|
const g = l.findIndex((c) => c === f);
|
1380
1387
|
if (g < 0) return;
|
1381
1388
|
const i = ((a = f.el) == null ? void 0 : a.offsetHeight) + 20;
|
1382
1389
|
l.slice(g + 1).forEach((c) => {
|
1383
|
-
var
|
1384
|
-
const k = (
|
1390
|
+
var w;
|
1391
|
+
const k = (w = c.component) == null ? void 0 : w.props.offset;
|
1385
1392
|
c.component.props.offset = k - i;
|
1386
1393
|
}), l.splice(g, 1), u && u(f);
|
1387
1394
|
}, d = () => {
|
1388
|
-
|
1395
|
+
D(null, n);
|
1389
1396
|
}, f = m(
|
1390
|
-
|
1397
|
+
on,
|
1391
1398
|
{
|
1392
1399
|
message: e.message,
|
1393
1400
|
title: e.title,
|
1394
1401
|
type: e.type,
|
1395
1402
|
offset: s,
|
1396
|
-
renderToBody:
|
1403
|
+
renderToBody: o,
|
1397
1404
|
position: e.position,
|
1398
1405
|
duration: e.duration ?? 3e3,
|
1399
1406
|
showClose: e.showClose ?? !0,
|
1400
|
-
onClose:
|
1407
|
+
onClose: r,
|
1401
1408
|
onDestroy: d
|
1402
1409
|
},
|
1403
|
-
E(e.message) ||
|
1410
|
+
E(e.message) || O(e.message) ? {
|
1404
1411
|
default: E(e.message) ? e.message : () => e.message
|
1405
1412
|
} : null
|
1406
1413
|
);
|
1407
|
-
|
1414
|
+
D(f, n), l.push(f), t == null || t.appendChild(n.firstChild);
|
1415
|
+
}, un = function(e) {
|
1416
|
+
Object.keys(re).forEach((t) => {
|
1417
|
+
const n = re[t];
|
1418
|
+
e.component(t, re[t]), n.install && e.use(n);
|
1419
|
+
});
|
1408
1420
|
};
|
1409
1421
|
export {
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1422
|
+
A as Button,
|
1423
|
+
an as Dialog,
|
1424
|
+
ie as Message,
|
1425
|
+
Be as MessageBox,
|
1426
|
+
cn as Notification,
|
1427
|
+
un as install
|
1414
1428
|
};
|