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