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.
Files changed (47) hide show
  1. package/dist/_utils/icon.d.ts +1 -1
  2. package/dist/_utils/vue-eco.d.ts +4 -1
  3. package/dist/{componets/button/index.vue.d.ts → components/button/Button.d.ts} +4 -69
  4. package/dist/components/button/index.d.ts +181 -0
  5. package/dist/components/index.d.ts +1 -0
  6. package/dist/icons/animation/animation-loading.d.ts +2 -0
  7. package/dist/icons/animation/animation-loading.vue.d.ts +1 -1
  8. package/dist/icons/default/check-circle-fill.vue.d.ts +1 -1
  9. package/dist/icons/default/close-circle-fill.vue.d.ts +1 -1
  10. package/dist/icons/default/exclamation-circle-fill.vue.d.ts +1 -1
  11. package/dist/icons/default/info-circle-fill.vue.d.ts +1 -1
  12. package/dist/icons/default/minus-circle-fill.vue.d.ts +1 -1
  13. package/dist/index.d.ts +6 -6
  14. package/dist/index.es.js +569 -621
  15. package/dist/index.umd.js +1 -1
  16. package/package.json +8 -17
  17. package/volar.d.ts +7 -0
  18. package/dist/components.d.ts +0 -1
  19. package/dist/componets/button/install.d.ts +0 -4
  20. package/global.d.ts +0 -8
  21. package/dist/{componets → components}/button/props.d.ts +0 -0
  22. package/dist/{componets → components}/dialog/index.vue.d.ts +4 -4
  23. package/dist/{componets → components}/dialog/props.d.ts +0 -0
  24. package/dist/{componets → components}/dialog/use-props.d.ts +0 -0
  25. package/dist/{componets → components}/dialog/use.d.ts +0 -0
  26. package/dist/{componets → components}/dialog/warp.d.ts +0 -0
  27. package/dist/{componets → components}/message/index.vue.d.ts +5 -5
  28. package/dist/{componets → components}/message/props.d.ts +0 -0
  29. package/dist/{componets → components}/message/warp.d.ts +0 -0
  30. package/dist/{componets → components}/message-box/index.d.ts +0 -0
  31. package/dist/{componets → components}/message-box/props.d.ts +0 -0
  32. package/dist/{componets → components}/message-box/warp.d.ts +0 -0
  33. package/dist/{componets → components}/notification/index.vue.d.ts +2 -2
  34. /package/dist/{componets → components}/notification/props.d.ts +0 -0
  35. /package/dist/{componets → components}/notification/warp.d.ts +0 -0
  36. /package/dist/{componets → components}/space/index.d.ts +0 -0
  37. /package/dist/{componets → components}/tag-cloud/index.d.ts +0 -0
  38. /package/dist/{componets → components}/trend-chart/components/trend-chart-curve.d.ts +0 -0
  39. /package/dist/{componets → components}/trend-chart/components/trend-chart-grid.d.ts +0 -0
  40. /package/dist/{componets → components}/trend-chart/components/trend-chart-labels.d.ts +0 -0
  41. /package/dist/{componets → components}/trend-chart/components/trend-chart.d.ts +0 -0
  42. /package/dist/{componets → components}/trend-chart/helpers/genPath.d.ts +0 -0
  43. /package/dist/{componets → components}/trend-chart/helpers/genPoints.d.ts +0 -0
  44. /package/dist/{componets → components}/trend-chart/helpers/getPadding.d.ts +0 -0
  45. /package/dist/{componets → components}/trend-chart/helpers/validatePadding.d.ts +0 -0
  46. /package/dist/{componets → components}/trend-chart/index.d.ts +0 -0
  47. /package/dist/{componets → components}/trend-chart/props.d.ts +0 -0
package/dist/index.es.js CHANGED
@@ -1,47 +1,46 @@
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);
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: (o) => `${t}--${o}`,
10
- modifier: (o) => `${t}-${o}`,
11
- is: (o) => `${t}-is-${o}`
9
+ element: (r) => `${t}--${r}`,
10
+ modifier: (r) => `${t}-${r}`,
11
+ is: (r) => `${t}-is-${r}`
12
12
  };
13
- }, J = Object.prototype.toString;
13
+ }, G = Object.prototype.toString;
14
14
  function De(e) {
15
- return J.call(e) === "[object Array]";
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 J.call(e) === "[object String]";
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 ot(e) {
25
- return J.call(e) === "[object Number]" && e === e;
24
+ function lt(e) {
25
+ return G.call(e) === "[object Number]" && e === e;
26
26
  }
27
- function E(e) {
27
+ function B(e) {
28
28
  return typeof e == "function";
29
29
  }
30
- function le() {
30
+ function ne() {
31
31
  return typeof window < "u";
32
32
  }
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 = {
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: K(String),
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: K(String),
64
+ type: W(String),
66
65
  default: void 0
67
66
  },
68
67
  status: {
69
- type: K(String),
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: K(String),
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 = (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
- },
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
- const t = Se({
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
- }), 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;
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
- }, 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;
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
- 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
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
- }), 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({
140
+ }), K = ct("XButton", ft), oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
242
141
  __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 "";
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 kt.some((l) => n.includes(l)) ? n : n + t;
249
- }, pt = 1e3, bt = 3e3, Ot = 1;
250
- class wt {
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
- z(this, "popupStack", {
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
- 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) => {
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
- z(this, "delete", (t, n) => {
160
+ L(this, "delete", (t, n) => {
263
161
  this.popupStack[n].delete(t), n === "dialog" && this.popupStack.popup.delete(t);
264
162
  });
265
- z(this, "isLastDialog", (t) => this.popupStack.dialog.size > 1 ? t === Array.from(this.popupStack.dialog).pop() : !0);
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 wt();
166
+ const se = new vt();
269
167
  function fe(e, {
270
168
  visible: t,
271
169
  runOnMounted: n
272
170
  } = {}) {
273
- const l = Y(0), s = () => {
171
+ const l = X(0), o = () => {
274
172
  l.value = se.add(e);
275
- }, o = () => {
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
- (r) => {
281
- r ? s() : o();
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: _e(l),
292
- open: s,
293
- close: o,
189
+ zIndex: Je(l),
190
+ open: o,
191
+ close: r,
294
192
  isLastDialog: u
295
193
  };
296
194
  }
297
- const He = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t, n) => {
298
- var l;
299
- return (l = n == null ? void 0 : n.toUpperCase()) !== null && l !== void 0 ? l : "";
300
- }), je = () => {
301
- }, Et = (e, t) => {
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
- }, Nt = (e) => e.tagName === "BODY" ? document.documentElement.scrollHeight > window.innerHeight : e.scrollHeight > e.offsetHeight, Bt = (e, t) => {
311
- var n;
312
- if (!le || !e || !t)
313
- return "";
314
- let l = He(t);
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 s = e.style[l];
318
- if (s)
319
- return s;
320
- const o = (n = document.defaultView) === null || n === void 0 ? void 0 : n.getComputedStyle(e, "");
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[l];
215
+ return e.style[n];
324
216
  }
325
- }, X = (e, t, n) => {
217
+ }, Z = (e, t, n) => {
326
218
  if (!(!e || !t))
327
- if (Ie(t))
328
- Object.entries(t).forEach(([l, s]) => X(e, l, s));
219
+ if (ze(t))
220
+ Object.entries(t).forEach(
221
+ ([l, o]) => Z(e, l, o)
222
+ );
329
223
  else {
330
- const l = He(t);
224
+ const l = Ie(t);
331
225
  e.style[l] = n;
332
226
  }
333
227
  }, me = (e, t) => {
334
- if (ze(e)) {
228
+ if (je(e)) {
335
229
  const n = e[0] === "#" ? `[id='${e.slice(1)}']` : e;
336
- return Et(n);
230
+ return Ct(n, t);
337
231
  }
338
232
  return e;
339
- }, St = le ? (e, t, n, l = !1) => {
233
+ }, wt = ne ? (e, t, n, l = !1) => {
340
234
  e.addEventListener(t, n, l);
341
- } : je, Tt = le ? (e, t, n, l = !1) => {
235
+ } : Pe, Bt = ne ? (e, t, n, l = !1) => {
342
236
  e.removeEventListener(t, n, l);
343
- } : je, Mt = (e, t) => {
237
+ } : Pe, St = (e, t) => {
344
238
  let n = !1;
345
239
  const l = {
346
240
  overflow: "",
347
241
  width: ""
348
- }, s = (r) => r.tagName === "BODY", o = () => {
242
+ }, o = (s) => s.tagName === "BODY", r = () => {
349
243
  if (e.value) {
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;
355
- let f = 0;
356
- s(r) && (f = r.getBoundingClientRect().left || 0), X(r, {
357
- width: `calc(100% - ${Math.ceil(d - f)}px)`,
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 r = e.value;
366
- X(r, {
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
- (r) => {
375
- e.value && !s(e.value) && (r && X(r, {
268
+ (s) => {
269
+ e.value && !o(e.value) && (s && Z(s, {
376
270
  position: "absolute"
377
- }), Bt(e.value, "position") === "static" && X(e.value, { position: "relative" }));
271
+ }), bt(e.value, "position") === "static" && Z(e.value, { position: "relative" }));
378
272
  }
379
273
  ), {
380
- setOverflowHidden: o,
274
+ setOverflowHidden: r,
381
275
  resetOverflow: u
382
276
  };
383
- }, Lt = {
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
- }, At = {
287
+ }, Ot = {
394
288
  renderTo: {
395
- type: K([String, Object]),
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
- }, Dt = ["width", "minWidth", "height", "minHeight"], It = F({
480
- name: q("Dialog"),
373
+ }, Et = ["width", "minWidth", "height", "minHeight"], Nt = z({
374
+ name: Y("Dialog"),
481
375
  inheritAttrs: !1,
482
- props: At,
376
+ props: Ot,
483
377
  emits: ["closed", "close", "open", "opened", "update:modelValue"],
484
378
  setup(e, { emit: t }) {
485
- const n = I("dialog"), l = n.block, s = I("message-box"), o = s.block, u = p(() => [
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
- ]), r = p(() => me(e.renderTo)), d = Y(), f = p(() => e.disabled || !r.value), g = p(() => ({
490
- zIndex: w.value
491
- })), i = p(() => {
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 = we(e.top)), Dt.forEach((L) => {
494
- e[L] && (h[L] = we(e[L]));
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 = Y(!1), c = p(() => e.modelValue), k = p(() => c.value || a.value), { zIndex: w, isLastDialog: P } = fe("dialog", {
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: Fe, resetOverflow: ke } = Mt(r, d), pe = (h, L) => {
499
- t("update:modelValue", !1), t("close", e.messageBox ? h : void 0, e.messageBox ? L : void 0);
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
- }, Q = Se({
398
+ }, q = Ne({
505
399
  ok: !1,
506
400
  cancel: !1
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);
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
- Q[h] = !1, _ && pe(h, L);
516
- }, Ze = () => {
517
- e.maskToClose && e.mask && W("cancel");
518
- }, Ke = (h) => {
519
- W("cancel", h);
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
- W("ok", h);
415
+ P("ok", h);
522
416
  };
523
- let oe = !1;
417
+ let re = !1;
524
418
  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);
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
- ke(), Oe();
426
+ pe(), we();
533
427
  }), ue(
534
428
  () => c.value,
535
429
  (h) => {
536
- h ? (t("open"), Fe(), a.value = !0, Ye()) : Oe();
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: s,
544
- messageBoxNs: o,
437
+ cnOMB: o,
438
+ messageBoxNs: r,
545
439
  containerStyle: i,
546
- dialogStyle: g,
440
+ dialogStyle: C,
547
441
  dialogRef: d,
548
- teleportContainer: r,
549
- teleportDisabled: f,
442
+ teleportContainer: s,
443
+ teleportDisabled: m,
550
444
  modelVisible: c,
551
- mergeVisible: k,
552
- interceptClose: W,
553
- afterLeave: Ue,
554
- afterEnter: We,
555
- handleMaskClick: Ze,
556
- handleCancel: Ke,
445
+ mergeVisible: p,
446
+ interceptClose: P,
447
+ afterLeave: We,
448
+ afterEnter: Ze,
449
+ handleMaskClick: Ue,
450
+ handleCancel: Re,
557
451
  handleOk: Xe,
558
- loadingObj: Q
452
+ loadingObj: q
559
453
  };
560
454
  }
561
- });
562
- function Pt(e, t, n, l, s, o) {
563
- return C(), B(xe, {
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 ? j((C(), b("div", {
466
+ !e.destroyOnClosed || e.mergeVisible ? U((v(), S("div", {
568
467
  key: 0,
569
468
  ref: "dialogRef",
570
- class: y(e.cls),
571
- style: $(e.dialogStyle)
469
+ class: g(e.cls),
470
+ style: N(e.dialogStyle)
572
471
  }, [
573
- m(ee, {
472
+ f(_, {
574
473
  name: "x-fade-in-standard",
575
474
  appear: ""
576
475
  }, {
577
- default: te(() => [
578
- e.mask ? j((C(), b("div", {
476
+ default: ee(() => [
477
+ e.mask ? U((v(), S("div", {
579
478
  key: 0,
580
- class: y([e.cn.element("mask")])
479
+ class: g([e.cn.element("mask")])
581
480
  }, null, 2)), [
582
- [V, e.modelVisible]
583
- ]) : M("", !0)
481
+ [R, e.modelVisible]
482
+ ]) : D("", !0)
584
483
  ]),
585
484
  _: 1
586
485
  }),
587
- v("div", {
588
- class: y([e.cn.element("wrapper"), { "is-center": e.center }]),
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
- m(ee, {
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: te(() => [
598
- j(v("div", {
599
- class: y([e.cn.element("container"), { "is-fullscreen": e.fullscreen }]),
600
- style: $(e.containerStyle)
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
- v("div", {
603
- class: y([
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
- T(e.$slots, "title", {}, () => [
609
- v("div", {
610
- class: y([e.cn.element("header-title")])
611
- }, ne(e.title), 3)
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
- v("div", {
615
- class: y([e.messageBox ? e.cnOMB.element("body") : e.cn.element("body")])
513
+ y("div", {
514
+ class: g([e.messageBox ? e.cnOMB.element("body") : e.cn.element("body")])
616
515
  }, [
617
- T(e.$slots, "default")
516
+ j(e.$slots, "default")
618
517
  ], 2),
619
- v("div", {
620
- class: y([e.messageBox ? e.cnOMB.element("footer") : e.cn.element("footer")])
518
+ y("div", {
519
+ class: g([e.messageBox ? e.cnOMB.element("footer") : e.cn.element("footer")])
621
520
  }, [
622
- T(e.$slots, "footer", {
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 ? (C(), b("span", {
527
+ e.showClose ? (v(), S("span", {
629
528
  key: 0,
630
- class: y([e.cn.element("close-icon"), e.messageBox && e.cnOMB.element("close-icon")]),
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)) : M("", !0)
531
+ }, null, 2)) : D("", !0)
633
532
  ], 6), [
634
- [V, e.modelVisible]
533
+ [R, e.modelVisible]
635
534
  ])
636
535
  ]),
637
536
  _: 3
638
537
  }, 8, ["onAfterEnter", "onAfterLeave"])
639
538
  ], 2)
640
539
  ], 6)), [
641
- [V, e.mergeVisible]
642
- ]) : M("", !0)
540
+ [R, e.mergeVisible]
541
+ ]) : D("", !0)
643
542
  ], 8, ["to", "disabled"]);
644
543
  }
645
- const Ve = /* @__PURE__ */ N(It, [["render", Pt]]), Re = /* @__PURE__ */ F({
646
- name: q("Space"),
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 = I("space"), l = p(() => [n.block, n.element(e.direction), e.fill && "is-fill", n.element(`${e.direction}-${e.align}`)]);
669
- function s(u) {
670
- if (ot(u))
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 o = (u) => {
686
- const r = {};
687
- if (u) return r;
688
- const d = `${s(e.size)}px`, f = `${s(e.size)}px`;
689
- return e.direction === "horizontal" && (r.marginRight = d), e.direction === "vertical" && (r.marginBottom = f), r;
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 r;
693
- const u = x((r = t.default) == null ? void 0 : r.call(t), !0).filter((d) => d.type !== et);
694
- return m("div", {
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, f) => {
595
+ }, [u.map((d, m) => {
697
596
  var i;
698
- const g = t.split && f > 0;
699
- return m(G, {
700
- key: `space-item-${f}`
701
- }, [g && m("div", {
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: o(!1)
704
- }, [(i = t.split) == null ? void 0 : i.call(t)]), m("div", {
602
+ style: r(!1)
603
+ }, [(i = t.split) == null ? void 0 : i.call(t)]), f("div", {
705
604
  className: n.element("item"),
706
- style: o(f === u.length - 1)
605
+ style: r(m === u.length - 1)
707
606
  }, [d])]);
708
607
  })]);
709
608
  };
710
609
  }
711
610
  });
712
- function Ee(e) {
713
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !O(e);
611
+ function Se(e) {
612
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !w(e);
714
613
  }
715
- const $e = I("dialog"), cn = (e) => {
614
+ const $e = A("dialog"), rn = (e) => {
716
615
  const t = document.createElement("div"), n = () => {
717
- D(null, t);
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
- }, s = (i, a) => {
622
+ }, o = (i, a) => {
724
623
  i === "cancel" && e.onCancel && e.onCancel(a), i === "ok" && e.onOk && e.onOk(a);
725
- }, o = (i) => {
726
- if (O(i)) return i;
727
- if (E(i)) {
624
+ }, r = (i) => {
625
+ if (w(i)) return i;
626
+ if (B(i)) {
728
627
  const a = i();
729
- return O(a) ? a : null;
628
+ return w(a) ? a : null;
730
629
  }
731
- return m("div", {
732
- className: $e.element("header-title")
733
- }, [S(" "), i, S(" ")]);
630
+ return f("div", {
631
+ class: $e.element("header-title")
632
+ }, [E(" "), i, E(" ")]);
734
633
  }, u = (i) => {
735
- if (O(i)) return i;
736
- if (E(i)) {
634
+ if (w(i)) return i;
635
+ if (B(i)) {
737
636
  const a = i();
738
- return O(a) ? a : null;
637
+ return w(a) ? a : null;
739
638
  }
740
- return m("div", {
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))
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) => m(Re, {
646
+ return (c) => f(He, {
748
647
  size: 12
749
648
  }, {
750
649
  default: () => {
751
- var k, w;
752
- return [!e.hideCancel && m(A, {
650
+ var p, b;
651
+ return [!e.hideCancel && f(K, {
753
652
  size: "small",
754
653
  onClick: c.cancel,
755
- loading: (k = c.loadingObj) == null ? void 0 : k.cancel
756
- }, Ee(i) ? i : {
654
+ loading: (p = c.loadingObj) == null ? void 0 : p.cancel
655
+ }, Se(i) ? i : {
757
656
  default: () => [i]
758
- }), !e.hideOk && m(A, {
657
+ }), !e.hideOk && f(K, {
759
658
  type: "primary",
760
659
  size: "small",
761
660
  onClick: c.ok,
762
- loading: (w = c.loadingObj) == null ? void 0 : w.ok
763
- }, Ee(a) ? a : {
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
- }, g = m(Ve, {
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: s,
677
+ onClose: o,
779
678
  onBeforeCancel: l,
780
679
  "onUpdate:modelValue": () => {
781
- g.component.props.modelValue = !1;
680
+ C.component.props.modelValue = !1;
782
681
  },
783
682
  // 等待动画完全结束后销毁vm
784
683
  onClosed: n,
785
684
  onOpened: () => {
786
685
  }
787
686
  }, {
788
- title: r(),
687
+ title: s(),
789
688
  default: d(),
790
- footer: f()
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
- D(g, t);
793
- }, zt = ["success", "warning", "error", "strong", "info"], Ht = U("close-circle-fill");
794
- function jt(e, t, n, l, s, o) {
795
- return C(), b("div", {
796
- class: y(e.cls),
797
- style: $(e.styles)
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
- v("svg", {
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
- v("path", {
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 ye = /* @__PURE__ */ N(Ht, [["render", jt]]), Vt = U("check-circle-fill");
820
- function Rt(e, t, n, l, s, o) {
821
- return C(), b("div", {
822
- class: y(e.cls),
823
- style: $(e.styles)
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
- v("svg", {
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
- v("path", {
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 ge = /* @__PURE__ */ N(Vt, [["render", Rt]]), Ft = U("exclamation-circle-fill");
846
- function Ut(e, t, n, l, s, o) {
847
- return C(), b("div", {
848
- class: y(e.cls),
849
- style: $(e.styles)
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
- v("svg", {
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
- v("path", {
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 Ce = /* @__PURE__ */ N(Ft, [["render", Ut]]), Wt = U("info-circle-fill");
872
- function Zt(e, t, n, l, s, o) {
873
- return C(), b("div", {
874
- class: y(e.cls),
875
- style: $(e.styles)
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
- v("svg", {
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
- v("path", {
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__ */ N(Wt, [["render", Zt]]), Kt = U("minus-circle-fill");
898
- function Xt(e, t, n, l, s, o) {
899
- return C(), b("div", {
900
- class: y(e.cls),
901
- style: $(e.styles)
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
- v("svg", {
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
- v("path", {
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 he = /* @__PURE__ */ N(Kt, [["render", Xt]]), Yt = F({
924
- name: q("Message"),
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: ye,
927
- CheckCircleFill: ge,
928
- ExclamationCircleFill: Ce,
874
+ CloseCircleFill: ge,
875
+ CheckCircleFill: ye,
876
+ ExclamationCircleFill: he,
929
877
  InfoCircleFill: ve,
930
- MinusCircleFill: he
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 = I("message"), n = p(() => [
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 = Y(!1);
985
- let s = null;
986
- const o = () => {
987
- s = setTimeout(() => {
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 && o();
993
- }), Le(() => {
994
- clearTimeout(s);
940
+ l.value = !0, e.duration !== 0 && r();
941
+ }), Ae(() => {
942
+ clearTimeout(o);
995
943
  });
996
- const { zIndex: u } = fe("message", { runOnMounted: !0 }), r = p(() => ({
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: r,
951
+ styles: s,
1004
952
  visible: l,
1005
953
  handleClose: () => {
1006
954
  l.value = !1;
1007
955
  }
1008
956
  };
1009
957
  }
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, {
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: te(() => [
1019
- j(v("div", {
1020
- class: y(e.cls),
1021
- style: $(e.styles)
966
+ default: ee(() => [
967
+ U(y("div", {
968
+ class: g(e.cls),
969
+ style: N(e.styles)
1022
970
  }, [
1023
- e.$slots.icon ? M("", !0) : (C(), b("span", {
971
+ e.$slots.icon ? D("", !0) : (v(), S("span", {
1024
972
  key: 0,
1025
- class: y([e.cn.element("icon"), e.cn.modifier(`icon-${e.type}`)])
973
+ class: g([e.cn.element("icon"), e.cn.modifier(`icon-${e.type}`)])
1026
974
  }, [
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)
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
- T(e.$slots, "default", {}, () => [
1032
- e.useHTML ? (C(), b("span", {
979
+ j(e.$slots, "default", {}, () => [
980
+ e.useHTML ? (v(), S("span", {
1033
981
  key: 0,
1034
982
  innerHTML: e.message
1035
- }, null, 8, Gt)) : (C(), b("span", qt, ne(e.message), 1)),
1036
- e.showClose ? (C(), b("span", {
983
+ }, null, 8, Rt)) : (v(), S("span", Xt, te(e.message), 1)),
984
+ e.showClose ? (v(), S("span", {
1037
985
  key: 2,
1038
- class: y([e.cn.element("close-icon")]),
986
+ class: g([e.cn.element("close-icon")]),
1039
987
  onClick: t[0] || (t[0] = (...i) => e.handleClose && e.handleClose(...i))
1040
- }, null, 2)) : M("", !0)
988
+ }, null, 2)) : D("", !0)
1041
989
  ])
1042
990
  ], 6), [
1043
- [V, e.visible]
991
+ [R, e.visible]
1044
992
  ])
1045
993
  ]),
1046
994
  _: 3
1047
995
  }, 8, ["onBeforeLeave"]);
1048
996
  }
1049
- const Qt = /* @__PURE__ */ N(Yt, [["render", Jt]]), ae = /* @__PURE__ */ new WeakMap(), ie = (e) => {
1050
- (typeof e == "string" || O(e)) && (e = {
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 s = e.onClose;
1062
- let o = {};
1063
- o = { ...e, onClose: () => {
1009
+ const o = e.onClose;
1010
+ let r = {};
1011
+ r = { ...e, onClose: () => {
1064
1012
  var c;
1065
- const i = n.findIndex((k) => k === d);
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((k) => {
1069
- var P;
1070
- const w = (P = k.component) == null ? void 0 : P.props.offset;
1071
- k.component.props.offset = w - a;
1072
- }), n.splice(i, 1), s && s(d);
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
- D(null, f);
1022
+ M(null, m);
1075
1023
  }, offset: l };
1076
- const d = m(
1077
- Qt,
1078
- o,
1079
- E(o.message) || O(o.message) ? {
1080
- default: E(o.message) ? o.message : () => o.message
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
- ), f = document.createElement("div");
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), {
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
- }, _t = () => {
1089
- zt.forEach((e) => {
1090
- ie[e] = (t) => Ie(t) ? ie({
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
- _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);
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 = I("message-box"), Be = (e) => {
1052
+ const ce = A("message-box"), Ee = (e) => {
1105
1053
  const t = document.createElement("div"), n = () => {
1106
- D(null, t);
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
- }, s = (a, c) => {
1060
+ }, o = (a, c) => {
1113
1061
  a === "cancel" && e.onCancel && e.onCancel(c), a === "ok" && e.onOk && e.onOk(c);
1114
- }, o = (a) => {
1062
+ }, r = (a) => {
1115
1063
  let c;
1116
1064
  switch (a) {
1117
1065
  case "warning":
1118
- c = m(Ce, {
1066
+ c = f(he, {
1119
1067
  size: "22px",
1120
1068
  color: "#f6c64b"
1121
1069
  }, null);
1122
1070
  break;
1123
1071
  case "strong":
1124
- c = m(he, {
1072
+ c = f(Ce, {
1125
1073
  size: "22px",
1126
1074
  color: "#ff7125"
1127
1075
  }, null);
1128
1076
  break;
1129
1077
  case "error":
1130
- c = m(ye, {
1078
+ c = f(ge, {
1131
1079
  size: "22px",
1132
1080
  color: "#e24f48"
1133
1081
  }, null);
1134
1082
  break;
1135
1083
  case "success":
1136
- c = m(ge, {
1084
+ c = f(ye, {
1137
1085
  size: "22px",
1138
1086
  color: "#68d1ab"
1139
1087
  }, null);
1140
1088
  break;
1141
1089
  case "info":
1142
- c = m(ve, {
1090
+ c = f(ve, {
1143
1091
  size: "22px",
1144
1092
  color: "#2355f5"
1145
1093
  }, null);
1146
1094
  break;
1147
1095
  }
1148
- return m("div", {
1149
- className: ce.element("icon")
1096
+ return f("div", {
1097
+ class: ce.element("icon")
1150
1098
  }, [c]);
1151
1099
  }, u = (a) => {
1152
- if (O(a)) return a;
1153
- if (E(a)) {
1100
+ if (w(a)) return a;
1101
+ if (B(a)) {
1154
1102
  const c = a();
1155
- return O(c) ? c : null;
1103
+ return w(c) ? c : null;
1156
1104
  }
1157
- return m("div", {
1158
- className: ce.element("title")
1159
- }, [S(" "), a, S(" ")]);
1160
- }, r = (a) => {
1161
- if (O(a)) return a;
1162
- if (E(a)) {
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 O(c) ? c : null;
1112
+ return w(c) ? c : null;
1165
1113
  }
1166
- return m("div", {
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))
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 (k) => m(Re, {
1121
+ return (p) => f(He, {
1174
1122
  size: 12
1175
1123
  }, {
1176
1124
  default: () => {
1177
- var w, P;
1178
- return [!e.hideCancel && m(A, {
1125
+ var b, $;
1126
+ return [!e.hideCancel && f(K, {
1179
1127
  size: "small",
1180
- onClick: k.cancel,
1181
- loading: (w = k.loadingObj) == null ? void 0 : w.cancel
1182
- }, Ne(a) ? a : {
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 && m(A, {
1132
+ }), !e.hideOk && f(K, {
1185
1133
  type: "primary",
1186
1134
  size: "small",
1187
- onClick: k.ok,
1188
- loading: (P = k.loadingObj) == null ? void 0 : P.ok
1189
- }, Ne(c) ? c : {
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 = m(Ve, {
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: s,
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: f(),
1217
- footer: g()
1164
+ default: m(),
1165
+ footer: C()
1218
1166
  });
1219
- D(i, t);
1220
- }, en = () => {
1221
- xt.forEach((e) => {
1222
- Be[e] = (t, n) => {
1223
- const l = [], s = [];
1224
- let o = () => !0, u = () => !0;
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
- Be({
1174
+ Ee({
1227
1175
  title: t,
1228
1176
  content: n,
1229
1177
  type: e,
1230
1178
  beforeOnCancel: u,
1231
- beforeOnOk: o,
1179
+ beforeOnOk: r,
1232
1180
  onOk: () => {
1233
- l.forEach((r) => E(r) && r());
1181
+ l.forEach((s) => B(s) && s());
1234
1182
  },
1235
1183
  onCancel: () => {
1236
- s.forEach((r) => E(r) && r());
1184
+ o.forEach((s) => B(s) && s());
1237
1185
  }
1238
1186
  });
1239
1187
  }, 0), {
1240
- ok(...r) {
1241
- return r.length === 1 && l.push(r[0]), r.length === 2 && (o = r[0], l.push(r[1])), this;
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(...r) {
1244
- return r.length === 1 && s.push(r[0]), r.length === 2 && (u = r[0], s.push(r[1])), this;
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
- en();
1251
- const tn = {
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
- }, nn = F({
1290
- name: q("Notification"),
1291
- props: tn,
1237
+ }, Qt = z({
1238
+ name: Y("Notification"),
1239
+ props: Jt,
1292
1240
  emits: ["close", "destroy"],
1293
1241
  setup(e) {
1294
- const t = I("notification"), n = t.block, l = p(() => [n, t.modifier(o.value.ver)]), { zIndex: s } = fe("message", { runOnMounted: !0 }), o = p(() => {
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 = p(() => `x-notification-slide-${o.value.hor}`), r = p(() => {
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 = s.value, c[o.value.hor] = "20px", c[o.value.ver] = `${e.offset}px`, c;
1303
- }), d = Y(!1);
1304
- let f = 0;
1305
- const g = () => {
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 = p(() => e.type === "info" ? ve : e.type === "warning" ? Ce : e.type === "strong" ? he : e.type === "success" ? ge : e.type === "error" ? ye : ""), a = () => {
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 && g(), d.value = !0;
1314
- }), Le(() => {
1315
- clearTimeout(f);
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: r,
1269
+ positionStyle: s,
1322
1270
  visible: d,
1323
- positionPropMap: o,
1271
+ positionPropMap: r,
1324
1272
  currentIcon: i,
1325
1273
  handleClose: a
1326
1274
  };
1327
1275
  }
1328
1276
  });
1329
- function ln(e, t, n, l, s, o) {
1330
- return C(), B(ee, {
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: te(() => [
1336
- j(v("div", {
1337
- class: y(e.cls),
1338
- style: $(e.positionStyle)
1283
+ default: ee(() => [
1284
+ U(y("div", {
1285
+ class: g(e.cls),
1286
+ style: N(e.positionStyle)
1339
1287
  }, [
1340
- v("div", {
1341
- class: y([e.cn.element("header")])
1288
+ y("div", {
1289
+ class: g([e.cn.element("header")])
1342
1290
  }, [
1343
- v("div", {
1344
- class: y([e.cn.element("icon"), e.cn.modifier(`icon-${e.type}`)])
1291
+ y("div", {
1292
+ class: g([e.cn.element("icon"), e.cn.modifier(`icon-${e.type}`)])
1345
1293
  }, [
1346
- (C(), B(tt(e.currentIcon)))
1294
+ (v(), O(et(e.currentIcon)))
1347
1295
  ], 2),
1348
- v("div", null, [
1349
- v("div", {
1350
- class: y([e.cn.element("title")])
1351
- }, ne(e.title), 3),
1352
- v("div", {
1353
- class: y([e.cn.element("message")])
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
- T(e.$slots, "default", {}, () => [
1356
- S(ne(e.message), 1)
1303
+ j(e.$slots, "default", {}, () => [
1304
+ E(te(e.message), 1)
1357
1305
  ])
1358
1306
  ], 2)
1359
1307
  ])
1360
1308
  ], 2),
1361
- e.showClose ? (C(), b("span", {
1309
+ e.showClose ? (v(), S("span", {
1362
1310
  key: 0,
1363
- class: y([e.cn.element("close-icon")]),
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)) : M("", !0)
1313
+ }, null, 2)) : D("", !0)
1366
1314
  ], 6), [
1367
- [V, e.visible]
1315
+ [R, e.visible]
1368
1316
  ])
1369
1317
  ]),
1370
1318
  _: 3
1371
1319
  }, 8, ["name"]);
1372
1320
  }
1373
- const on = /* @__PURE__ */ N(nn, [["render", ln]]), Z = /* @__PURE__ */ new WeakMap(), un = (e) => {
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
- Z.get(t) || Z.set(t, {}), Z.get(t)[e.position] || (Z.get(t)[e.position] = []);
1376
- const l = Z.get(t)[e.position];
1377
- let s = e.offset || 20;
1378
- l.forEach((g) => {
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
- s += ((i = g.el) == null ? void 0 : i.offsetHeight) + 20;
1328
+ o += ((i = C.el) == null ? void 0 : i.offsetHeight) + 20;
1381
1329
  });
1382
- const o = t.tagName === "BODY";
1383
- o || (t.style.position = "relative", t.style.overflowX = "hidden");
1384
- const u = e.onClose, r = () => {
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 g = l.findIndex((c) => c === f);
1387
- if (g < 0) return;
1388
- const i = ((a = f.el) == null ? void 0 : a.offsetHeight) + 20;
1389
- l.slice(g + 1).forEach((c) => {
1390
- var w;
1391
- const k = (w = c.component) == null ? void 0 : w.props.offset;
1392
- c.component.props.offset = k - i;
1393
- }), l.splice(g, 1), u && u(f);
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
- D(null, n);
1396
- }, f = m(
1397
- on,
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: s,
1403
- renderToBody: o,
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: r,
1355
+ onClose: s,
1408
1356
  onDestroy: d
1409
1357
  },
1410
- E(e.message) || O(e.message) ? {
1411
- default: E(e.message) ? e.message : () => e.message
1358
+ B(e.message) || w(e.message) ? {
1359
+ default: B(e.message) ? e.message : () => e.message
1412
1360
  } : null
1413
1361
  );
1414
- D(f, n), l.push(f), t == null || t.appendChild(n.firstChild);
1415
- }, rn = function(e) {
1416
- Object.keys(re).forEach((t) => {
1417
- const n = re[t];
1418
- e.component(t, re[t]), n.install && e.use(n);
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
- }, dn = {
1421
- install: rn
1368
+ }, sn = {
1369
+ install: tn
1422
1370
  };
1423
1371
  export {
1424
- A as Button,
1425
- cn as Dialog,
1372
+ rn as Dialog,
1426
1373
  ie as Message,
1427
- Be as MessageBox,
1428
- un as Notification,
1429
- dn as default,
1430
- rn as install
1374
+ Ee as MessageBox,
1375
+ on as Notification,
1376
+ K as XButton,
1377
+ sn as default,
1378
+ tn as install
1431
1379
  };