x-next 0.0.0-alpha.29 → 0.0.0-alpha.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/trend-chart/components/trend-chart-curve.d.ts +3 -3
- package/dist/components/trend-chart/components/trend-chart.d.ts +24 -12
- package/dist/components/trend-chart/index.d.ts +34 -13
- package/dist/components/trend-chart/props.d.ts +17 -20
- package/dist/components/trend-chart/themes.d.ts +42 -66
- package/dist/components/trend-chart.bak/components/trend-chart-curve.d.ts +111 -0
- package/dist/components/trend-chart.bak/components/trend-chart-grid.d.ts +55 -0
- package/dist/components/trend-chart.bak/components/trend-chart-labels.d.ts +22 -0
- package/dist/components/trend-chart.bak/components/trend-chart.d.ts +274 -0
- package/dist/components/trend-chart.bak/helpers/genPath.d.ts +8 -0
- package/dist/components/trend-chart.bak/helpers/genPoints.d.ts +3 -0
- package/dist/components/trend-chart.bak/helpers/getPadding.d.ts +7 -0
- package/dist/components/trend-chart.bak/helpers/validatePadding.d.ts +2 -0
- package/dist/components/trend-chart.bak/index.d.ts +530 -0
- package/dist/components/trend-chart.bak/props.d.ts +211 -0
- package/dist/components/trend-chart.bak/themes.d.ts +152 -0
- package/dist/index.es.js +837 -848
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -1,46 +1,46 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var D = (e, t, l) =>
|
4
|
-
import { defineComponent as
|
5
|
-
const
|
6
|
-
const t =
|
1
|
+
var lt = Object.defineProperty;
|
2
|
+
var nt = (e, t, l) => t in e ? lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l;
|
3
|
+
var D = (e, t, l) => nt(e, typeof t != "symbol" ? t + "" : t, l);
|
4
|
+
import { defineComponent as E, computed as g, createVNode as r, h as w, reactive as ce, getCurrentInstance as at, ref as M, watch as ee, onMounted as W, onBeforeUnmount as De, readonly as rt, Teleport as ot, Transition as te, createTextVNode as p, onUnmounted as ue, Comment as it, Fragment as Y, render as I, isVNode as O, nextTick as Ee, mergeProps as ze, resolveComponent as _, openBlock as P, createBlock as H, withCtx as st, withDirectives as ct, createElementVNode as ut, normalizeClass as Ce, normalizeStyle as dt, createElementBlock as oe, renderSlot as Pe, createCommentVNode as xe, toDisplayString as ft, vShow as mt } from "vue";
|
5
|
+
const ht = "X", yt = "x", He = (e) => e ? yt + "-" + e : e || "", B = (e) => ht + e, $ = (e) => {
|
6
|
+
const t = He(e);
|
7
7
|
return {
|
8
8
|
block: t,
|
9
|
-
element: (
|
10
|
-
modifier: (
|
11
|
-
is: (
|
9
|
+
element: (a) => `${t}--${a}`,
|
10
|
+
modifier: (a) => `${t}-${a}`,
|
11
|
+
is: (a) => `${t}-is-${a}`
|
12
12
|
};
|
13
|
-
},
|
14
|
-
function
|
15
|
-
return
|
13
|
+
}, ne = Object.prototype.toString;
|
14
|
+
function Re(e) {
|
15
|
+
return ne.call(e) === "[object Array]";
|
16
16
|
}
|
17
|
-
function
|
18
|
-
return
|
17
|
+
function Ye(e) {
|
18
|
+
return ne.call(e) === "[object Object]";
|
19
19
|
}
|
20
|
-
const
|
21
|
-
function
|
22
|
-
return
|
20
|
+
const We = (e) => ne.call(e) === "[object Promise]", gt = (e) => S(e) && e.constructor.name === "AsyncFunction", vt = (e) => We(e) || gt(e);
|
21
|
+
function _e(e) {
|
22
|
+
return ne.call(e) === "[object String]";
|
23
23
|
}
|
24
|
-
function
|
25
|
-
return
|
24
|
+
function bt(e) {
|
25
|
+
return ne.call(e) === "[object Number]" && e === e;
|
26
26
|
}
|
27
|
-
function
|
27
|
+
function S(e) {
|
28
28
|
return typeof e == "function";
|
29
29
|
}
|
30
|
-
function
|
30
|
+
function de() {
|
31
31
|
return typeof window < "u";
|
32
32
|
}
|
33
|
-
const
|
34
|
-
var n,
|
33
|
+
const L = (e) => e, Ct = (e) => !!(e && e.shapeFlag & 1), xt = (e, t) => !!(e && e.shapeFlag & 6), wt = (e, t) => !!(e && e.shapeFlag & 8), kt = (e, t) => !!(e && e.shapeFlag & 16), Lt = (e, t) => !!(e && e.shapeFlag & 32), se = (e, t = !1) => {
|
34
|
+
var n, o;
|
35
35
|
const l = [];
|
36
|
-
for (const
|
37
|
-
|
36
|
+
for (const a of e ?? [])
|
37
|
+
Ct(a) || xt(a) || t && wt(a, a.children) ? l.push(a) : kt(a, a.children) ? l.push(...se(a.children, t)) : Lt(a, a.children) ? l.push(...se((o = (n = a.children).default) == null ? void 0 : o.call(n), t)) : Re(a) && l.push(...se(a, t));
|
38
38
|
return l;
|
39
|
-
},
|
39
|
+
}, V = (e, t) => Object.assign(t, {
|
40
40
|
install(l) {
|
41
41
|
l.component(e) || l.component(e, t);
|
42
42
|
}
|
43
|
-
}),
|
43
|
+
}), Nt = {
|
44
44
|
disabled: Boolean,
|
45
45
|
block: Boolean,
|
46
46
|
loading: Boolean,
|
@@ -53,7 +53,7 @@ const N = (e) => e, ft = (e) => !!(e && e.shapeFlag & 1), mt = (e, t) => !!(e &&
|
|
53
53
|
default: 0
|
54
54
|
},
|
55
55
|
shape: {
|
56
|
-
type:
|
56
|
+
type: L(String),
|
57
57
|
default: void 0
|
58
58
|
},
|
59
59
|
link: {
|
@@ -61,11 +61,11 @@ const N = (e) => e, ft = (e) => !!(e && e.shapeFlag & 1), mt = (e, t) => !!(e &&
|
|
61
61
|
default: !1
|
62
62
|
},
|
63
63
|
type: {
|
64
|
-
type:
|
64
|
+
type: L(String),
|
65
65
|
default: void 0
|
66
66
|
},
|
67
67
|
status: {
|
68
|
-
type:
|
68
|
+
type: L(String),
|
69
69
|
default: void 0
|
70
70
|
},
|
71
71
|
plain: {
|
@@ -73,21 +73,21 @@ const N = (e) => e, ft = (e) => !!(e && e.shapeFlag & 1), mt = (e, t) => !!(e &&
|
|
73
73
|
default: !1
|
74
74
|
},
|
75
75
|
size: {
|
76
|
-
type:
|
76
|
+
type: L(String),
|
77
77
|
default: "medium"
|
78
78
|
},
|
79
79
|
border: {
|
80
80
|
type: Boolean,
|
81
81
|
default: !0
|
82
82
|
}
|
83
|
-
},
|
83
|
+
}, Ot = (e) => _e(e) ? e.split("-").map((t) => t.charAt(0).toUpperCase() + t.slice(1)).join("") : "", St = (e, t = "px") => {
|
84
84
|
if (e === void 0) return "";
|
85
85
|
const l = typeof e == "number" ? `${e}` : e;
|
86
|
-
return ["px", "%", "vh", "vw", "calc"].some((
|
86
|
+
return ["px", "%", "vh", "vw", "calc"].some((o) => l.includes(o)) ? l : l + t;
|
87
87
|
};
|
88
88
|
function X(e, t) {
|
89
|
-
return /* @__PURE__ */
|
90
|
-
name:
|
89
|
+
return /* @__PURE__ */ E({
|
90
|
+
name: He(`Icon${Ot(e)}`),
|
91
91
|
props: {
|
92
92
|
size: {
|
93
93
|
type: [Number, String],
|
@@ -111,20 +111,20 @@ function X(e, t) {
|
|
111
111
|
}
|
112
112
|
},
|
113
113
|
setup(l) {
|
114
|
-
const n = "x-icon",
|
115
|
-
const
|
116
|
-
return l.size && (
|
117
|
-
}),
|
114
|
+
const n = "x-icon", o = g(() => {
|
115
|
+
const s = {};
|
116
|
+
return l.size && (s.fontSize = St(l.size)), l.rotate && (s.transform = `rotate(${l.rotate}deg)`), l.color && (s.color = l.color), s;
|
117
|
+
}), a = g(() => [n, {
|
118
118
|
[`${n}-loading`]: l.spin
|
119
119
|
}]);
|
120
120
|
return () => r("div", {
|
121
|
-
class:
|
122
|
-
style:
|
121
|
+
class: a.value,
|
122
|
+
style: o.value
|
123
123
|
}, [t]);
|
124
124
|
}
|
125
125
|
});
|
126
126
|
}
|
127
|
-
const
|
127
|
+
const Bt = X("InfoCircleFill", w(r("svg", {
|
128
128
|
viewBox: "0 0 50 50",
|
129
129
|
class: "x-icon-loading-svg"
|
130
130
|
}, [r("circle", {
|
@@ -134,9 +134,9 @@ const xt = X("InfoCircleFill", k(r("svg", {
|
|
134
134
|
class: "path",
|
135
135
|
fill: "none",
|
136
136
|
stroke: "currentColor"
|
137
|
-
}, null)]))),
|
137
|
+
}, null)]))), Tt = /* @__PURE__ */ E({
|
138
138
|
name: "Button",
|
139
|
-
props:
|
139
|
+
props: Nt,
|
140
140
|
emits: ["click"],
|
141
141
|
// 显式导入插槽
|
142
142
|
$slots: ["prefix", "suffix"],
|
@@ -144,65 +144,65 @@ const xt = X("InfoCircleFill", k(r("svg", {
|
|
144
144
|
slots: t,
|
145
145
|
emit: l
|
146
146
|
}) {
|
147
|
-
const n =
|
147
|
+
const n = ce({
|
148
148
|
clicked: !1,
|
149
149
|
isDebounce: !1
|
150
|
-
}),
|
150
|
+
}), o = $("button"), a = g(() => [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"), i.value && o.modifier("is-loading")]), s = () => {
|
151
151
|
e.debounce > 0 && !n.isDebounce && (n.isDebounce = !0, setTimeout(() => {
|
152
152
|
n.isDebounce = !1;
|
153
153
|
}, e.debounce));
|
154
|
-
}, i =
|
155
|
-
const m = u(
|
156
|
-
|
154
|
+
}, i = g(() => e.loading || n.clicked || n.isDebounce), f = at(), c = (u, d) => {
|
155
|
+
const m = u(d);
|
156
|
+
vt(m) && (n.clicked = !0, m.finally(() => {
|
157
157
|
n.clicked = !1;
|
158
158
|
}));
|
159
|
-
},
|
160
|
-
var m, C,
|
159
|
+
}, y = (u) => {
|
160
|
+
var m, C, v, N;
|
161
161
|
if (u.stopPropagation(), (C = (m = u.target).blur) == null || C.call(m), i.value) return;
|
162
|
-
|
163
|
-
const
|
164
|
-
if (
|
165
|
-
|
166
|
-
else if (
|
167
|
-
|
162
|
+
s();
|
163
|
+
const d = (N = (v = f == null ? void 0 : f.vnode) == null ? void 0 : v.props) == null ? void 0 : N.onClick;
|
164
|
+
if (Re(d))
|
165
|
+
d.forEach((A) => c(A, u));
|
166
|
+
else if (S(d)) {
|
167
|
+
c(d, u);
|
168
168
|
return;
|
169
169
|
}
|
170
170
|
};
|
171
171
|
return () => {
|
172
172
|
var u;
|
173
173
|
return r("button", {
|
174
|
-
class:
|
174
|
+
class: a.value,
|
175
175
|
type: "button",
|
176
176
|
disabled: e.disabled,
|
177
|
-
onClick:
|
177
|
+
onClick: y
|
178
178
|
}, [r("span", {
|
179
179
|
style: {
|
180
180
|
display: i.value ? "flex" : "none",
|
181
181
|
marginRight: i.value ? "4px" : "0px"
|
182
182
|
},
|
183
|
-
class:
|
184
|
-
}, [r(
|
185
|
-
class:
|
183
|
+
class: o.element("loading")
|
184
|
+
}, [r(Bt, null, null)]), t.prefix && r("span", {
|
185
|
+
class: o.element("prefix")
|
186
186
|
}, [t.prefix()]), r("span", {
|
187
|
-
class:
|
187
|
+
class: o.element("content")
|
188
188
|
}, [(u = t.default) == null ? void 0 : u.call(t)]), t.suffix && r("span", {
|
189
|
-
class:
|
189
|
+
class: o.element("suffix")
|
190
190
|
}, [t.suffix()])]);
|
191
191
|
};
|
192
192
|
}
|
193
|
-
}),
|
193
|
+
}), le = V(B("Button"), Tt), Mt = ["px", "%", "vh", "vw", "calc"], Ae = (e, t = "px") => {
|
194
194
|
if (e === void 0) return "";
|
195
195
|
const l = String(e);
|
196
|
-
return
|
197
|
-
},
|
198
|
-
class
|
196
|
+
return Mt.some((n) => l.includes(n)) ? l : l + t;
|
197
|
+
}, Et = 1e3, zt = 3e3, Pt = 1;
|
198
|
+
class At {
|
199
199
|
constructor() {
|
200
200
|
D(this, "popupStack", {
|
201
201
|
popup: /* @__PURE__ */ new Set(),
|
202
202
|
dialog: /* @__PURE__ */ new Set(),
|
203
203
|
message: /* @__PURE__ */ new Set()
|
204
204
|
});
|
205
|
-
D(this, "getNextZIndex", (t) => (t === "message" ? Array.from(this.popupStack.message).pop() ||
|
205
|
+
D(this, "getNextZIndex", (t) => (t === "message" ? Array.from(this.popupStack.message).pop() || zt : Array.from(this.popupStack.popup).pop() || Et) + Pt);
|
206
206
|
D(this, "add", (t) => {
|
207
207
|
const l = this.getNextZIndex(t);
|
208
208
|
return this.popupStack[t].add(l), t === "dialog" && this.popupStack.popup.add(l), l;
|
@@ -213,114 +213,114 @@ class Ot {
|
|
213
213
|
D(this, "isLastDialog", (t) => this.popupStack.dialog.size > 1 ? t === Array.from(this.popupStack.dialog).pop() : !0);
|
214
214
|
}
|
215
215
|
}
|
216
|
-
const
|
217
|
-
function
|
216
|
+
const we = new At();
|
217
|
+
function fe(e, {
|
218
218
|
visible: t,
|
219
219
|
runOnMounted: l
|
220
220
|
} = {}) {
|
221
|
-
const n =
|
222
|
-
n.value =
|
223
|
-
},
|
224
|
-
|
225
|
-
},
|
226
|
-
return
|
221
|
+
const n = M(0), o = () => {
|
222
|
+
n.value = we.add(e);
|
223
|
+
}, a = () => {
|
224
|
+
we.delete(n.value, e);
|
225
|
+
}, s = () => e === "dialog" ? we.isLastDialog(n.value) : !1;
|
226
|
+
return ee(
|
227
227
|
() => t == null ? void 0 : t.value,
|
228
228
|
(i) => {
|
229
|
-
i ?
|
229
|
+
i ? o() : a();
|
230
230
|
},
|
231
231
|
{
|
232
232
|
immediate: !0
|
233
233
|
}
|
234
|
-
), l && (
|
235
|
-
zIndex:
|
236
|
-
open:
|
237
|
-
close:
|
238
|
-
isLastDialog:
|
234
|
+
), l && (W(o), De(a)), {
|
235
|
+
zIndex: rt(n),
|
236
|
+
open: o,
|
237
|
+
close: a,
|
238
|
+
isLastDialog: s
|
239
239
|
};
|
240
240
|
}
|
241
|
-
const
|
242
|
-
},
|
243
|
-
if (
|
241
|
+
const Ze = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t, l) => (l == null ? void 0 : l.toUpperCase()) ?? ""), qe = () => {
|
242
|
+
}, pt = (e, t) => {
|
243
|
+
if (de)
|
244
244
|
return (t ?? document).querySelector(e) ?? void 0;
|
245
|
-
},
|
245
|
+
}, $t = (e) => {
|
246
246
|
if (e.tagName === "BODY")
|
247
247
|
return window.innerWidth - (document.documentElement.offsetWidth || document.body.offsetWidth);
|
248
248
|
const { borderLeftWidth: t, borderRightWidth: l } = window.getComputedStyle(e), n = Number(t.replace("px", "")) + Number(l.replace("px", ""));
|
249
249
|
return e.offsetWidth - (e.clientWidth + n);
|
250
|
-
},
|
250
|
+
}, Ft = (e) => e.tagName === "BODY" ? document.documentElement.scrollHeight > window.innerHeight : e.scrollHeight > e.offsetHeight, jt = (e, t) => {
|
251
251
|
var n;
|
252
|
-
if (!
|
253
|
-
let l =
|
252
|
+
if (!de || !e || !t) return "";
|
253
|
+
let l = Ze(t);
|
254
254
|
l === "float" && (l = "cssFloat");
|
255
255
|
try {
|
256
|
-
const
|
257
|
-
if (
|
258
|
-
const
|
259
|
-
return
|
256
|
+
const o = e.style[l];
|
257
|
+
if (o) return o;
|
258
|
+
const a = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, "");
|
259
|
+
return a ? a[l] : "";
|
260
260
|
} catch {
|
261
261
|
return e.style[l];
|
262
262
|
}
|
263
|
-
},
|
263
|
+
}, Q = (e, t, l) => {
|
264
264
|
if (!(!e || !t))
|
265
|
-
if (
|
265
|
+
if (Ye(t))
|
266
266
|
Object.entries(t).forEach(
|
267
|
-
([n,
|
267
|
+
([n, o]) => Q(e, n, o)
|
268
268
|
);
|
269
269
|
else {
|
270
|
-
const n =
|
270
|
+
const n = Ze(t);
|
271
271
|
e.style[n] = l;
|
272
272
|
}
|
273
|
-
},
|
274
|
-
if (
|
273
|
+
}, Se = (e, t) => {
|
274
|
+
if (_e(e)) {
|
275
275
|
const l = e[0] === "#" ? `[id='${e.slice(1)}']` : e;
|
276
|
-
return
|
276
|
+
return pt(l, t);
|
277
277
|
}
|
278
278
|
return e;
|
279
|
-
},
|
279
|
+
}, It = de ? (e, t, l, n = !1) => {
|
280
280
|
e.addEventListener(t, l, n);
|
281
|
-
} :
|
281
|
+
} : qe, Vt = de ? (e, t, l, n = !1) => {
|
282
282
|
e.removeEventListener(t, l, n);
|
283
|
-
} :
|
283
|
+
} : qe, Xt = (e, t) => {
|
284
284
|
let l = !1;
|
285
285
|
const n = {
|
286
286
|
overflow: "",
|
287
287
|
width: ""
|
288
|
-
},
|
288
|
+
}, o = (i) => i.tagName === "BODY", a = () => {
|
289
289
|
if (e.value) {
|
290
290
|
const i = e.value;
|
291
291
|
if (!l && i.style.overflow !== "hidden") {
|
292
|
-
const
|
293
|
-
if (
|
292
|
+
const f = $t(i);
|
293
|
+
if (f > 0 || Ft(i)) {
|
294
294
|
n.overflow = i.style.overflow, n.width = i.style.width;
|
295
|
-
let
|
296
|
-
|
297
|
-
width: `calc(100% - ${Math.ceil(
|
295
|
+
let c = 0;
|
296
|
+
o(i) && (c = i.getBoundingClientRect().left || 0), Q(i, {
|
297
|
+
width: `calc(100% - ${Math.ceil(f - c)}px)`,
|
298
298
|
overflow: "hidden"
|
299
299
|
}), l = !0;
|
300
300
|
}
|
301
301
|
}
|
302
302
|
}
|
303
|
-
},
|
303
|
+
}, s = () => {
|
304
304
|
if (e.value && l) {
|
305
305
|
const i = e.value;
|
306
|
-
|
306
|
+
Q(i, {
|
307
307
|
overflow: n.overflow,
|
308
308
|
width: n.width
|
309
309
|
}), l = !1;
|
310
310
|
}
|
311
311
|
};
|
312
|
-
return
|
312
|
+
return ee(
|
313
313
|
() => t == null ? void 0 : t.value,
|
314
314
|
(i) => {
|
315
|
-
e.value && !
|
315
|
+
e.value && !o(e.value) && (i && Q(i, {
|
316
316
|
position: "absolute"
|
317
|
-
}),
|
317
|
+
}), jt(e.value, "position") === "static" && Q(e.value, { position: "relative" }));
|
318
318
|
}
|
319
319
|
), {
|
320
|
-
setOverflowHidden:
|
321
|
-
resetOverflow:
|
320
|
+
setOverflowHidden: a,
|
321
|
+
resetOverflow: s
|
322
322
|
};
|
323
|
-
},
|
323
|
+
}, Dt = {
|
324
324
|
ENTER: "Enter",
|
325
325
|
ESC: "Escape",
|
326
326
|
BACKSPACE: "Backspace",
|
@@ -330,9 +330,9 @@ const De = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
330
330
|
ARROW_DOWN: "ArrowDown",
|
331
331
|
ARROW_LEFT: "ArrowLeft",
|
332
332
|
ARROW_RIGHT: "ArrowRight"
|
333
|
-
},
|
333
|
+
}, Ht = {
|
334
334
|
renderTo: {
|
335
|
-
type:
|
335
|
+
type: L([String, Object]),
|
336
336
|
default: "body"
|
337
337
|
},
|
338
338
|
disabled: {
|
@@ -416,80 +416,80 @@ const De = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
416
416
|
type: Boolean,
|
417
417
|
default: !1
|
418
418
|
}
|
419
|
-
},
|
420
|
-
name:
|
419
|
+
}, Rt = ["width", "minWidth", "height", "minHeight"], Ue = /* @__PURE__ */ E({
|
420
|
+
name: B("Dialog"),
|
421
421
|
inheritAttrs: !1,
|
422
|
-
props:
|
422
|
+
props: Ht,
|
423
423
|
emits: ["closed", "close", "open", "opened", "update:modelValue"],
|
424
424
|
setup(e, {
|
425
425
|
emit: t,
|
426
426
|
slots: l
|
427
427
|
}) {
|
428
|
-
const n =
|
429
|
-
|
430
|
-
const
|
431
|
-
zIndex:
|
432
|
-
})), u =
|
428
|
+
const n = $("dialog"), o = n.block, a = $("message-box");
|
429
|
+
a.block;
|
430
|
+
const s = g(() => [o, e.messageBox && "is-message-box", e.popupClass && e.popupClass]), i = g(() => Se(e.renderTo)), f = M(), c = g(() => e.disabled || !i.value), y = g(() => ({
|
431
|
+
zIndex: v.value
|
432
|
+
})), u = g(() => {
|
433
433
|
const x = {};
|
434
|
-
return e.fullscreen || (!e.center && e.top && (x.top =
|
435
|
-
e[j] && (x[j] =
|
434
|
+
return e.fullscreen || (!e.center && e.top && (x.top = Ae(e.top)), Rt.forEach((j) => {
|
435
|
+
e[j] && (x[j] = Ae(e[j]));
|
436
436
|
})), x;
|
437
|
-
}),
|
438
|
-
zIndex:
|
439
|
-
isLastDialog:
|
440
|
-
} =
|
437
|
+
}), d = M(!1), m = g(() => e.modelValue), C = g(() => m.value || d.value), {
|
438
|
+
zIndex: v,
|
439
|
+
isLastDialog: N
|
440
|
+
} = fe("dialog", {
|
441
441
|
visible: m
|
442
442
|
}), {
|
443
|
-
setOverflowHidden:
|
444
|
-
resetOverflow:
|
445
|
-
} =
|
443
|
+
setOverflowHidden: A,
|
444
|
+
resetOverflow: h
|
445
|
+
} = Xt(i, f), b = (x, j) => {
|
446
446
|
t("update:modelValue", !1), t("close", e.messageBox ? x : void 0, e.messageBox ? j : void 0);
|
447
|
-
},
|
448
|
-
|
449
|
-
},
|
447
|
+
}, k = () => {
|
448
|
+
d.value = !1, h(), t("closed");
|
449
|
+
}, z = () => {
|
450
450
|
t("opened");
|
451
|
-
}, T =
|
451
|
+
}, T = ce({
|
452
452
|
ok: !1,
|
453
453
|
cancel: !1
|
454
|
-
}),
|
455
|
-
let
|
456
|
-
if (T[x] = !0,
|
457
|
-
|
458
|
-
T[x] = !1,
|
454
|
+
}), F = (x, j) => {
|
455
|
+
let re = !0;
|
456
|
+
if (T[x] = !0, S(e.onBeforeCancel) && (re = e.onBeforeCancel(x) ?? !1), We(re)) {
|
457
|
+
re.then((tt) => {
|
458
|
+
T[x] = !1, tt && b(x, j);
|
459
459
|
});
|
460
460
|
return;
|
461
461
|
}
|
462
|
-
T[x] = !1,
|
463
|
-
},
|
464
|
-
e.maskToClose && e.mask &&
|
465
|
-
},
|
466
|
-
|
467
|
-
},
|
468
|
-
|
462
|
+
T[x] = !1, re && b(x, j);
|
463
|
+
}, ae = () => {
|
464
|
+
e.maskToClose && e.mask && F("cancel");
|
465
|
+
}, Je = (x) => {
|
466
|
+
F("cancel", x);
|
467
|
+
}, Qe = (x) => {
|
468
|
+
F("ok", x);
|
469
469
|
};
|
470
|
-
let
|
471
|
-
const
|
472
|
-
e.escToClose && x.key ===
|
473
|
-
},
|
474
|
-
e.escToClose && !
|
475
|
-
},
|
476
|
-
|
470
|
+
let be = !1;
|
471
|
+
const Te = (x) => {
|
472
|
+
e.escToClose && x.key === Dt.ESC && N() && F("cancel");
|
473
|
+
}, et = () => {
|
474
|
+
e.escToClose && !be && (be = !0, It(document.documentElement, "keydown", Te));
|
475
|
+
}, Me = () => {
|
476
|
+
be = !1, Vt(document.documentElement, "keydown", Te);
|
477
477
|
};
|
478
|
-
return
|
479
|
-
|
480
|
-
}),
|
481
|
-
x ? (t("open"),
|
478
|
+
return De(() => {
|
479
|
+
h(), Me();
|
480
|
+
}), ee(() => m.value, (x) => {
|
481
|
+
x ? (t("open"), A(), d.value = !0, et()) : Me();
|
482
482
|
}, {
|
483
483
|
immediate: !0
|
484
|
-
}), () => r(
|
484
|
+
}), () => r(ot, {
|
485
485
|
to: i.value,
|
486
|
-
disabled:
|
486
|
+
disabled: c.value
|
487
487
|
}, {
|
488
488
|
default: () => [C.value && r("div", {
|
489
|
-
ref:
|
490
|
-
class:
|
491
|
-
style:
|
492
|
-
}, [r(
|
489
|
+
ref: f,
|
490
|
+
class: s.value,
|
491
|
+
style: y.value
|
492
|
+
}, [r(te, {
|
493
493
|
name: "x-fade-in-standard",
|
494
494
|
appear: !0
|
495
495
|
}, {
|
@@ -500,12 +500,12 @@ const De = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
500
500
|
class: [n.element("wrapper"), {
|
501
501
|
"is-center": e.center
|
502
502
|
}],
|
503
|
-
onClick: (x) => x.target === x.currentTarget &&
|
504
|
-
}, [r(
|
503
|
+
onClick: (x) => x.target === x.currentTarget && ae()
|
504
|
+
}, [r(te, {
|
505
505
|
name: "x-zoom-in",
|
506
506
|
appear: !0,
|
507
|
-
onAfterEnter:
|
508
|
-
onAfterLeave:
|
507
|
+
onAfterEnter: z,
|
508
|
+
onAfterLeave: k
|
509
509
|
}, {
|
510
510
|
default: () => [m.value && r("div", {
|
511
511
|
class: [n.element("container"), {
|
@@ -513,25 +513,25 @@ const De = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
513
513
|
}],
|
514
514
|
style: u.value
|
515
515
|
}, [r("div", {
|
516
|
-
class: [e.messageBox ?
|
516
|
+
class: [e.messageBox ? a.element("header") : n.element("header"), e.showHeaderBottomLine && "is-bottom-line"]
|
517
517
|
}, [l.title ? l.title() : r("div", {
|
518
518
|
class: [n.element("header-title")]
|
519
519
|
}, [e.title])]), r("div", {
|
520
|
-
class: [e.messageBox ?
|
520
|
+
class: [e.messageBox ? a.element("body") : n.element("body")]
|
521
521
|
}, [l.default && l.default()]), r("div", {
|
522
|
-
class: [e.messageBox ?
|
522
|
+
class: [e.messageBox ? a.element("footer") : n.element("footer")]
|
523
523
|
}, [l.footer && l.footer({
|
524
|
-
cancel:
|
525
|
-
ok:
|
524
|
+
cancel: Je,
|
525
|
+
ok: Qe,
|
526
526
|
"loading-obj": T
|
527
527
|
})]), e.showClose && r("span", {
|
528
|
-
class: [n.element("close-icon"), e.messageBox &&
|
529
|
-
onClick: () =>
|
528
|
+
class: [n.element("close-icon"), e.messageBox && a.element("close-icon")],
|
529
|
+
onClick: () => F("cancel")
|
530
530
|
}, null)])]
|
531
531
|
})])])]
|
532
532
|
});
|
533
533
|
}
|
534
|
-
}),
|
534
|
+
}), Ge = V(B("Dialog"), Ue), me = X("CloseCircleFill", w(r("svg", {
|
535
535
|
viewBox: "0 0 48 48",
|
536
536
|
fill: "none",
|
537
537
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -546,7 +546,7 @@ const De = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
546
546
|
d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm4.955-27.771-4.95 4.95-4.95-4.95a1 1 0 0 0-1.414 0l-1.414 1.414a1 1 0 0 0 0 1.414l4.95 4.95-4.95 4.95a1 1 0 0 0 0 1.414l1.414 1.414a1 1 0 0 0 1.414 0l4.95-4.95 4.95 4.95a1 1 0 0 0 1.414 0l1.414-1.414a1 1 0 0 0 0-1.414l-4.95-4.95 4.95-4.95a1 1 0 0 0 0-1.414l-1.414-1.414a1 1 0 0 0-1.414 0Z",
|
547
547
|
fill: "currentColor",
|
548
548
|
stroke: "none"
|
549
|
-
}, null)]))),
|
549
|
+
}, null)]))), he = X("CheckCircleFill", w(r("svg", {
|
550
550
|
viewBox: "0 0 48 48",
|
551
551
|
fill: "none",
|
552
552
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -561,7 +561,7 @@ const De = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
561
561
|
d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm10.207-24.379a1 1 0 0 0 0-1.414l-1.414-1.414a1 1 0 0 0-1.414 0L22 26.172l-4.878-4.88a1 1 0 0 0-1.415 0l-1.414 1.415a1 1 0 0 0 0 1.414l7 7a1 1 0 0 0 1.414 0l11.5-11.5Z",
|
562
562
|
fill: "currentColor",
|
563
563
|
stroke: "none"
|
564
|
-
}, null)]))),
|
564
|
+
}, null)]))), ye = X("ExclamationCircleFill", w(r("svg", {
|
565
565
|
viewBox: "0 0 48 48",
|
566
566
|
fill: "none",
|
567
567
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -576,7 +576,7 @@ const De = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
576
576
|
d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm2-30a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2Zm0 17h1a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h1v-8a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v11Z",
|
577
577
|
fill: "currentColor",
|
578
578
|
stroke: "none"
|
579
|
-
}, null)]))),
|
579
|
+
}, null)]))), ge = X("InfoCircleFill", w(r("svg", {
|
580
580
|
viewBox: "0 0 48 48",
|
581
581
|
fill: "none",
|
582
582
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -591,7 +591,7 @@ const De = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
591
591
|
d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm2-30a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2Zm0 17h1a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h1v-8a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v11Z",
|
592
592
|
fill: "currentColor",
|
593
593
|
stroke: "none"
|
594
|
-
}, null)]))),
|
594
|
+
}, null)]))), ve = X("MinusCircleFill", w(r("svg", {
|
595
595
|
viewBox: "0 0 48 48",
|
596
596
|
fill: "none",
|
597
597
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -607,14 +607,14 @@ const De = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
|
|
607
607
|
fill: "currentColor",
|
608
608
|
stroke: "none"
|
609
609
|
}, null)])));
|
610
|
-
X("LogoSimple",
|
610
|
+
X("LogoSimple", w(r("svg", {
|
611
611
|
width: "61.000000",
|
612
612
|
height: "41.000000",
|
613
613
|
viewBox: "0 0 61 41",
|
614
614
|
fill: "none",
|
615
615
|
xmlns: "http://www.w3.org/2000/svg",
|
616
616
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
617
|
-
}, [r("desc", null, [
|
617
|
+
}, [r("desc", null, [p("Created with Pixso.")]), r("defs", null, null), r("path", {
|
618
618
|
id: "path",
|
619
619
|
d: "M32 29.5L32 41L49.4 41C55.8 41 61 35.85 61 29.5C61 23.14 55.8 18 49.4 18C42.99 18 37.79 23.14 37.79 29.5L32 29.5Z",
|
620
620
|
fill: "#00C1FF",
|
@@ -633,8 +633,8 @@ X("LogoSimple", k(r("svg", {
|
|
633
633
|
"fill-opacity": "1.000000",
|
634
634
|
"fill-rule": "nonzero"
|
635
635
|
}, null)])));
|
636
|
-
const
|
637
|
-
name:
|
636
|
+
const Yt = /* @__PURE__ */ E({
|
637
|
+
name: B("Message"),
|
638
638
|
props: {
|
639
639
|
id: {
|
640
640
|
type: String,
|
@@ -687,64 +687,64 @@ const jt = /* @__PURE__ */ z({
|
|
687
687
|
emit: t,
|
688
688
|
slots: l
|
689
689
|
}) {
|
690
|
-
const n =
|
690
|
+
const n = $("message"), o = M(!1), a = M(null), s = g(() => [n.block, n.modifier(e.type), e.center && n.modifier("center"), e.showClose && !e.center && n.element("show-close"), e.popupClass]), {
|
691
691
|
zIndex: i
|
692
|
-
} =
|
692
|
+
} = fe("message", {
|
693
693
|
runOnMounted: !0
|
694
|
-
}),
|
694
|
+
}), f = g(() => ({
|
695
695
|
top: `${e.offset}px`,
|
696
696
|
zIndex: i.value
|
697
|
-
})),
|
697
|
+
})), c = () => {
|
698
698
|
if (l.icon) return l.icon();
|
699
699
|
switch (e.type) {
|
700
700
|
case "success":
|
701
|
-
return r(
|
701
|
+
return r(he, null, null);
|
702
702
|
case "warning":
|
703
|
-
return r(
|
703
|
+
return r(ye, null, null);
|
704
704
|
case "strong":
|
705
|
-
return r(
|
705
|
+
return r(ve, null, null);
|
706
706
|
case "error":
|
707
|
-
return r(
|
707
|
+
return r(me, null, null);
|
708
708
|
case "info":
|
709
|
-
return r(
|
709
|
+
return r(ge, null, null);
|
710
710
|
default:
|
711
711
|
return null;
|
712
712
|
}
|
713
|
-
},
|
714
|
-
e.duration > 0 && (
|
715
|
-
|
713
|
+
}, y = () => {
|
714
|
+
e.duration > 0 && (a.value = setTimeout(() => {
|
715
|
+
o.value = !1;
|
716
716
|
}, e.duration));
|
717
717
|
}, u = () => {
|
718
|
-
|
718
|
+
a.value && (clearTimeout(a.value), a.value = null);
|
719
719
|
};
|
720
|
-
|
721
|
-
|
722
|
-
}),
|
720
|
+
W(() => {
|
721
|
+
o.value = !0, y();
|
722
|
+
}), ue(() => {
|
723
723
|
u();
|
724
724
|
});
|
725
|
-
const
|
725
|
+
const d = () => {
|
726
726
|
var m;
|
727
|
-
|
727
|
+
o.value = !1, u(), (m = e.onClose) == null || m.call(e);
|
728
728
|
};
|
729
|
-
return () => r(
|
729
|
+
return () => r(te, {
|
730
730
|
name: "x-message-slide-top",
|
731
731
|
onBeforeLeave: e.onClose,
|
732
732
|
onAfterLeave: () => t("destroy")
|
733
733
|
}, {
|
734
|
-
default: () => [
|
735
|
-
class:
|
736
|
-
style:
|
734
|
+
default: () => [o.value && r("div", {
|
735
|
+
class: s.value,
|
736
|
+
style: f.value
|
737
737
|
}, [r("span", {
|
738
738
|
class: [n.element("icon"), n.modifier(`icon-${e.type}`)]
|
739
|
-
}, [
|
739
|
+
}, [c()]), r("div", null, [l.default ? l.default() : e.useHTML ? r("span", {
|
740
740
|
innerHTML: e.message
|
741
741
|
}, null) : r("span", null, [e.message]), e.showClose && r("span", {
|
742
742
|
class: n.element("close-icon"),
|
743
|
-
onClick:
|
743
|
+
onClick: d
|
744
744
|
}, null)])])]
|
745
745
|
});
|
746
746
|
}
|
747
|
-
}),
|
747
|
+
}), Wt = V(B("Message"), Yt), _t = /* @__PURE__ */ E({
|
748
748
|
name: "Space",
|
749
749
|
props: {
|
750
750
|
direction: {
|
@@ -767,11 +767,11 @@ const jt = /* @__PURE__ */ z({
|
|
767
767
|
setup(e, {
|
768
768
|
slots: t
|
769
769
|
}) {
|
770
|
-
const l =
|
771
|
-
function
|
772
|
-
if (
|
773
|
-
return
|
774
|
-
switch (
|
770
|
+
const l = $("space"), n = g(() => [l.block, l.element(e.direction), e.fill && "is-fill", l.element(`${e.direction}-${e.align}`)]);
|
771
|
+
function o(s) {
|
772
|
+
if (bt(s))
|
773
|
+
return s;
|
774
|
+
switch (s) {
|
775
775
|
case "mini":
|
776
776
|
return 4;
|
777
777
|
case "small":
|
@@ -784,127 +784,127 @@ const jt = /* @__PURE__ */ z({
|
|
784
784
|
return 8;
|
785
785
|
}
|
786
786
|
}
|
787
|
-
const
|
787
|
+
const a = (s) => {
|
788
788
|
const i = {};
|
789
|
-
if (
|
790
|
-
const
|
791
|
-
return e.direction === "horizontal" && (i.marginRight =
|
789
|
+
if (s) return i;
|
790
|
+
const f = `${o(e.size)}px`, c = `${o(e.size)}px`;
|
791
|
+
return e.direction === "horizontal" && (i.marginRight = f), e.direction === "vertical" && (i.marginBottom = c), i;
|
792
792
|
};
|
793
793
|
return () => {
|
794
794
|
var i;
|
795
|
-
const
|
795
|
+
const s = se((i = t.default) == null ? void 0 : i.call(t), !0).filter((f) => f.type !== it);
|
796
796
|
return r("div", {
|
797
797
|
class: [n.value]
|
798
|
-
}, [
|
798
|
+
}, [s.map((f, c) => {
|
799
799
|
var u;
|
800
|
-
const
|
801
|
-
return r(
|
802
|
-
key: `space-item-${
|
803
|
-
}, [
|
800
|
+
const y = t.split && c > 0;
|
801
|
+
return r(Y, {
|
802
|
+
key: `space-item-${c}`
|
803
|
+
}, [y && r("div", {
|
804
804
|
className: l.element("split"),
|
805
|
-
style:
|
805
|
+
style: a(!1)
|
806
806
|
}, [(u = t.split) == null ? void 0 : u.call(t)]), r("div", {
|
807
807
|
className: l.element("item"),
|
808
|
-
style:
|
809
|
-
}, [
|
808
|
+
style: a(c === s.length - 1)
|
809
|
+
}, [f])]);
|
810
810
|
})]);
|
811
811
|
};
|
812
812
|
}
|
813
|
-
}),
|
814
|
-
function
|
815
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
813
|
+
}), Be = V(B("Space"), _t), Zt = ["info", "success", "warning", "strong", "error"];
|
814
|
+
function pe(e) {
|
815
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !O(e);
|
816
816
|
}
|
817
|
-
const
|
817
|
+
const ke = $("message-box"), Oe = (e) => {
|
818
818
|
const t = document.createElement("div"), l = () => {
|
819
|
-
|
820
|
-
}, n = (
|
821
|
-
if (
|
819
|
+
I(null, t);
|
820
|
+
}, n = (d) => {
|
821
|
+
if (d === "cancel")
|
822
822
|
return e.beforeOnCancel ? e.beforeOnCancel() : !0;
|
823
|
-
if (
|
823
|
+
if (d === "ok")
|
824
824
|
return e.beforeOnOk ? e.beforeOnOk() : !0;
|
825
|
-
},
|
826
|
-
|
827
|
-
},
|
825
|
+
}, o = (d, m) => {
|
826
|
+
d === "cancel" && e.onCancel && e.onCancel(m), d === "ok" && e.onOk && e.onOk(m);
|
827
|
+
}, a = (d) => {
|
828
828
|
let m;
|
829
|
-
switch (
|
829
|
+
switch (d) {
|
830
830
|
case "warning":
|
831
|
-
m = r(
|
831
|
+
m = r(ye, {
|
832
832
|
size: "22px",
|
833
833
|
color: "#f6c64b"
|
834
834
|
}, null);
|
835
835
|
break;
|
836
836
|
case "strong":
|
837
|
-
m = r(
|
837
|
+
m = r(ve, {
|
838
838
|
size: "22px",
|
839
839
|
color: "#ff7125"
|
840
840
|
}, null);
|
841
841
|
break;
|
842
842
|
case "error":
|
843
|
-
m = r(
|
843
|
+
m = r(me, {
|
844
844
|
size: "22px",
|
845
845
|
color: "#e24f48"
|
846
846
|
}, null);
|
847
847
|
break;
|
848
848
|
case "success":
|
849
|
-
m = r(
|
849
|
+
m = r(he, {
|
850
850
|
size: "22px",
|
851
851
|
color: "#68d1ab"
|
852
852
|
}, null);
|
853
853
|
break;
|
854
854
|
case "info":
|
855
|
-
m = r(
|
855
|
+
m = r(ge, {
|
856
856
|
size: "22px",
|
857
857
|
color: "#2355f5"
|
858
858
|
}, null);
|
859
859
|
break;
|
860
860
|
}
|
861
861
|
return r("div", {
|
862
|
-
class:
|
862
|
+
class: ke.element("icon")
|
863
863
|
}, [m]);
|
864
|
-
},
|
865
|
-
if (
|
866
|
-
if (
|
867
|
-
const m =
|
868
|
-
return
|
864
|
+
}, s = (d) => {
|
865
|
+
if (O(d)) return d;
|
866
|
+
if (S(d)) {
|
867
|
+
const m = d();
|
868
|
+
return O(m) ? m : null;
|
869
869
|
}
|
870
870
|
return r("div", {
|
871
|
-
class:
|
872
|
-
}, [
|
873
|
-
}, i = (
|
874
|
-
if (
|
875
|
-
if (
|
876
|
-
const m =
|
877
|
-
return
|
871
|
+
class: ke.element("title")
|
872
|
+
}, [p(" "), d, p(" ")]);
|
873
|
+
}, i = (d) => {
|
874
|
+
if (O(d)) return d;
|
875
|
+
if (S(d)) {
|
876
|
+
const m = d();
|
877
|
+
return O(m) ? m : null;
|
878
878
|
}
|
879
879
|
return r("div", {
|
880
|
-
class:
|
881
|
-
}, [
|
882
|
-
},
|
883
|
-
if (
|
880
|
+
class: ke.element("content")
|
881
|
+
}, [p(" "), e.content, p(" ")]);
|
882
|
+
}, f = () => () => r(Y, null, [a(e.type || "success"), e.title && s(e.title)]), c = () => () => r(Y, null, [e.content && i(e.content)]), y = () => {
|
883
|
+
if (O(e.footer) || S(e.footer))
|
884
884
|
return e.footer;
|
885
|
-
const
|
886
|
-
return (C) => r(
|
885
|
+
const d = (e == null ? void 0 : e.cancelText) || "取消", m = (e == null ? void 0 : e.okText) || "确认";
|
886
|
+
return (C) => r(Be, {
|
887
887
|
size: 12
|
888
888
|
}, {
|
889
889
|
default: () => {
|
890
|
-
var
|
891
|
-
return [!e.hideCancel && r(
|
890
|
+
var v, N;
|
891
|
+
return [!e.hideCancel && r(le, {
|
892
892
|
size: "small",
|
893
893
|
onClick: C.cancel,
|
894
|
-
loading: (
|
895
|
-
},
|
896
|
-
default: () => [
|
897
|
-
}), !e.hideOk && r(
|
894
|
+
loading: (v = C.loadingObj) == null ? void 0 : v.cancel
|
895
|
+
}, pe(d) ? d : {
|
896
|
+
default: () => [d]
|
897
|
+
}), !e.hideOk && r(le, {
|
898
898
|
type: "primary",
|
899
899
|
size: "small",
|
900
900
|
onClick: C.ok,
|
901
|
-
loading: (
|
902
|
-
},
|
901
|
+
loading: (N = C.loadingObj) == null ? void 0 : N.ok
|
902
|
+
}, pe(m) ? m : {
|
903
903
|
default: () => [m]
|
904
904
|
})];
|
905
905
|
}
|
906
906
|
});
|
907
|
-
}, u = r(
|
907
|
+
}, u = r(Ge, {
|
908
908
|
messageBox: !0,
|
909
909
|
width: (e == null ? void 0 : e.width) ?? 358,
|
910
910
|
height: (e == null ? void 0 : e.height) ?? "auto",
|
@@ -915,7 +915,7 @@ const ge = F("message-box"), xe = (e) => {
|
|
915
915
|
mask: (e == null ? void 0 : e.mask) ?? !0,
|
916
916
|
maskToClose: (e == null ? void 0 : e.maskToClose) ?? !0,
|
917
917
|
popupClass: e.popupClass,
|
918
|
-
onClose:
|
918
|
+
onClose: o,
|
919
919
|
onBeforeCancel: n,
|
920
920
|
"onUpdate:modelValue": () => {
|
921
921
|
u.component.props.modelValue = !1;
|
@@ -925,43 +925,43 @@ const ge = F("message-box"), xe = (e) => {
|
|
925
925
|
onOpened: () => {
|
926
926
|
}
|
927
927
|
}, {
|
928
|
-
title:
|
929
|
-
default:
|
930
|
-
footer:
|
928
|
+
title: f(),
|
929
|
+
default: c(),
|
930
|
+
footer: y()
|
931
931
|
});
|
932
|
-
|
933
|
-
},
|
934
|
-
|
935
|
-
|
936
|
-
const n = [],
|
937
|
-
let
|
932
|
+
I(u, t);
|
933
|
+
}, qt = () => {
|
934
|
+
Zt.forEach((e) => {
|
935
|
+
Oe[e] = (t, l) => {
|
936
|
+
const n = [], o = [];
|
937
|
+
let a = () => !0, s = () => !0;
|
938
938
|
return setTimeout(() => {
|
939
|
-
|
939
|
+
Oe({
|
940
940
|
title: t,
|
941
941
|
content: l,
|
942
942
|
type: e,
|
943
|
-
beforeOnCancel:
|
944
|
-
beforeOnOk:
|
943
|
+
beforeOnCancel: s,
|
944
|
+
beforeOnOk: a,
|
945
945
|
onOk: () => {
|
946
|
-
n.forEach((i) =>
|
946
|
+
n.forEach((i) => S(i) && i());
|
947
947
|
},
|
948
948
|
onCancel: () => {
|
949
|
-
|
949
|
+
o.forEach((i) => S(i) && i());
|
950
950
|
}
|
951
951
|
});
|
952
952
|
}, 0), {
|
953
953
|
ok(...i) {
|
954
|
-
return i.length === 1 && n.push(i[0]), i.length === 2 && (
|
954
|
+
return i.length === 1 && n.push(i[0]), i.length === 2 && (a = i[0], n.push(i[1])), this;
|
955
955
|
},
|
956
956
|
cancel(...i) {
|
957
|
-
return i.length === 1 &&
|
957
|
+
return i.length === 1 && o.push(i[0]), i.length === 2 && (s = i[0], o.push(i[1])), this;
|
958
958
|
}
|
959
959
|
};
|
960
960
|
};
|
961
961
|
});
|
962
962
|
};
|
963
|
-
|
964
|
-
const
|
963
|
+
qt();
|
964
|
+
const Ut = V(B("MessageBox"), Oe), Gt = {
|
965
965
|
position: {
|
966
966
|
type: String,
|
967
967
|
default: "top-right"
|
@@ -999,50 +999,50 @@ const Wt = I(S("MessageBox"), xe), Ht = {
|
|
999
999
|
type: Boolean,
|
1000
1000
|
default: !1
|
1001
1001
|
}
|
1002
|
-
},
|
1003
|
-
name:
|
1004
|
-
props:
|
1002
|
+
}, Ke = /* @__PURE__ */ E({
|
1003
|
+
name: B("Notification"),
|
1004
|
+
props: Gt,
|
1005
1005
|
emits: ["close", "destroy"],
|
1006
1006
|
setup(e, {
|
1007
1007
|
emit: t,
|
1008
1008
|
slots: l
|
1009
1009
|
}) {
|
1010
|
-
const n =
|
1011
|
-
zIndex:
|
1012
|
-
} =
|
1010
|
+
const n = $("notification"), o = n.block, a = g(() => [o, n.modifier(i.value.ver)]), {
|
1011
|
+
zIndex: s
|
1012
|
+
} = fe("message", {
|
1013
1013
|
runOnMounted: !0
|
1014
|
-
}), i =
|
1015
|
-
const
|
1014
|
+
}), i = g(() => {
|
1015
|
+
const v = e.position.split("-");
|
1016
1016
|
return {
|
1017
|
-
hor:
|
1018
|
-
ver:
|
1017
|
+
hor: v[1],
|
1018
|
+
ver: v[0]
|
1019
1019
|
};
|
1020
|
-
}),
|
1021
|
-
const
|
1022
|
-
return
|
1023
|
-
}),
|
1020
|
+
}), f = g(() => `x-notification-slide-${i.value.hor}`), c = g(() => {
|
1021
|
+
const v = {};
|
1022
|
+
return v.position = e.renderToBody ? "fixed" : "absolute", v.zIndex = s.value, v[i.value.hor] = "20px", v[i.value.ver] = `${e.offset}px`, v;
|
1023
|
+
}), y = M(!1);
|
1024
1024
|
let u = 0;
|
1025
|
-
const
|
1025
|
+
const d = () => {
|
1026
1026
|
u = setTimeout(() => {
|
1027
|
-
|
1027
|
+
y.value = !1;
|
1028
1028
|
}, e.duration);
|
1029
|
-
}, m =
|
1030
|
-
|
1029
|
+
}, m = g(() => e.type === "info" ? ge : e.type === "warning" ? ye : e.type === "strong" ? ve : e.type === "success" ? he : e.type === "error" ? me : ""), C = () => {
|
1030
|
+
y.value = !1;
|
1031
1031
|
};
|
1032
|
-
return
|
1033
|
-
e.duration !== 0 &&
|
1034
|
-
}),
|
1032
|
+
return W(() => {
|
1033
|
+
e.duration !== 0 && d(), y.value = !0;
|
1034
|
+
}), ue(() => {
|
1035
1035
|
clearTimeout(u);
|
1036
|
-
}), () => r(
|
1037
|
-
name:
|
1036
|
+
}), () => r(te, {
|
1037
|
+
name: f.value,
|
1038
1038
|
onBeforeLeave: () => t("close"),
|
1039
1039
|
onAfterLeave: () => t("destroy")
|
1040
1040
|
}, {
|
1041
1041
|
default: () => {
|
1042
|
-
var
|
1043
|
-
return [
|
1044
|
-
class:
|
1045
|
-
style:
|
1042
|
+
var v;
|
1043
|
+
return [y.value && r("div", {
|
1044
|
+
class: a.value,
|
1045
|
+
style: c.value
|
1046
1046
|
}, [r("div", {
|
1047
1047
|
class: [n.element("header")]
|
1048
1048
|
}, [r("div", {
|
@@ -1051,14 +1051,14 @@ const Wt = I(S("MessageBox"), xe), Ht = {
|
|
1051
1051
|
class: [n.element("title")]
|
1052
1052
|
}, [e.title]), r("div", {
|
1053
1053
|
class: [n.element("message")]
|
1054
|
-
}, [((
|
1054
|
+
}, [((v = l.default) == null ? void 0 : v.call(l)) || e.message])])]), e.showClose && r("span", {
|
1055
1055
|
class: [n.element("close-icon")],
|
1056
1056
|
onClick: C
|
1057
1057
|
}, null)])];
|
1058
1058
|
}
|
1059
1059
|
});
|
1060
1060
|
}
|
1061
|
-
}),
|
1061
|
+
}), Kt = V(B("Notification"), Ke), Jt = (e) => {
|
1062
1062
|
const t = e.split(" ").filter((n) => n !== "").map((n) => parseInt(n));
|
1063
1063
|
let l = {};
|
1064
1064
|
switch (t.length) {
|
@@ -1075,24 +1075,29 @@ const Wt = I(S("MessageBox"), xe), Ht = {
|
|
1075
1075
|
l = { top: t[0], right: t[0], bottom: t[0], left: t[0] };
|
1076
1076
|
}
|
1077
1077
|
return l;
|
1078
|
-
},
|
1078
|
+
}, Qt = (e) => {
|
1079
1079
|
const t = e.split(" ").filter((l) => l !== "").map((l) => parseInt(l));
|
1080
1080
|
return t.length < 1 || t.length > 4 ? !1 : t.every((l) => typeof l == "number" && l >= 0);
|
1081
|
-
},
|
1081
|
+
}, el = {
|
1082
1082
|
// 数据集
|
1083
|
-
|
1083
|
+
dataset: {
|
1084
1084
|
required: !0,
|
1085
|
-
type:
|
1085
|
+
type: L(Array),
|
1086
|
+
default: () => []
|
1087
|
+
},
|
1088
|
+
status: {
|
1089
|
+
type: L(String),
|
1090
|
+
default: void 0
|
1086
1091
|
},
|
1087
1092
|
// 网格属性
|
1088
1093
|
grid: {
|
1089
1094
|
default: null,
|
1090
|
-
type:
|
1095
|
+
type: L(Object)
|
1091
1096
|
},
|
1092
1097
|
// 标签属性
|
1093
1098
|
labels: {
|
1094
1099
|
default: null,
|
1095
|
-
type:
|
1100
|
+
type: L(Object)
|
1096
1101
|
},
|
1097
1102
|
// 最大值,默认数据集最大值
|
1098
1103
|
max: {
|
@@ -1107,7 +1112,7 @@ const Wt = I(S("MessageBox"), xe), Ht = {
|
|
1107
1112
|
default: "5",
|
1108
1113
|
type: String,
|
1109
1114
|
validator(e) {
|
1110
|
-
return
|
1115
|
+
return Qt(e);
|
1111
1116
|
}
|
1112
1117
|
},
|
1113
1118
|
// 开启交互,开启后启用onmousemove事件
|
@@ -1117,15 +1122,15 @@ const Wt = I(S("MessageBox"), xe), Ht = {
|
|
1117
1122
|
},
|
1118
1123
|
// 主题
|
1119
1124
|
theme: {
|
1120
|
-
type:
|
1125
|
+
type: L(Object),
|
1121
1126
|
default: () => ({
|
1122
1127
|
activeLineColor: "#CCC"
|
1123
1128
|
})
|
1124
1129
|
}
|
1125
|
-
},
|
1130
|
+
}, tl = {
|
1126
1131
|
boundary: {
|
1127
1132
|
required: !0,
|
1128
|
-
type:
|
1133
|
+
type: L(Object),
|
1129
1134
|
default: () => {
|
1130
1135
|
}
|
1131
1136
|
},
|
@@ -1146,38 +1151,41 @@ const Wt = I(S("MessageBox"), xe), Ht = {
|
|
1146
1151
|
},
|
1147
1152
|
data: {
|
1148
1153
|
required: !0,
|
1149
|
-
type:
|
1154
|
+
type: L(Array),
|
1150
1155
|
default: () => []
|
1151
1156
|
},
|
1152
1157
|
className: {
|
1153
1158
|
type: String
|
1154
1159
|
},
|
1160
|
+
// 平滑
|
1155
1161
|
smooth: {
|
1156
|
-
default: !
|
1162
|
+
default: !0,
|
1157
1163
|
type: Boolean
|
1158
1164
|
},
|
1159
1165
|
stroke: {
|
1160
1166
|
default: !0,
|
1161
1167
|
type: Boolean
|
1162
1168
|
},
|
1169
|
+
// 填充
|
1163
1170
|
fill: {
|
1164
|
-
default: !
|
1171
|
+
default: !0,
|
1165
1172
|
type: Boolean
|
1166
1173
|
},
|
1174
|
+
// 鼠标
|
1167
1175
|
showPoints: {
|
1168
|
-
default: !
|
1176
|
+
default: !0,
|
1169
1177
|
type: Boolean
|
1170
1178
|
},
|
1171
1179
|
theme: {
|
1172
|
-
type:
|
1180
|
+
type: L(Object)
|
1173
1181
|
},
|
1174
1182
|
mainTheme: {
|
1175
|
-
type:
|
1183
|
+
type: L(Object)
|
1176
1184
|
}
|
1177
|
-
},
|
1185
|
+
}, ll = {
|
1178
1186
|
boundary: {
|
1179
1187
|
required: !0,
|
1180
|
-
type:
|
1188
|
+
type: L(Object),
|
1181
1189
|
default: () => {
|
1182
1190
|
}
|
1183
1191
|
},
|
@@ -1197,10 +1205,10 @@ const Wt = I(S("MessageBox"), xe), Ht = {
|
|
1197
1205
|
default: 0,
|
1198
1206
|
type: Number
|
1199
1207
|
}
|
1200
|
-
},
|
1208
|
+
}, nl = {
|
1201
1209
|
boundary: {
|
1202
1210
|
required: !0,
|
1203
|
-
type:
|
1211
|
+
type: L(Object),
|
1204
1212
|
default: () => {
|
1205
1213
|
}
|
1206
1214
|
},
|
@@ -1223,101 +1231,101 @@ const Wt = I(S("MessageBox"), xe), Ht = {
|
|
1223
1231
|
default: (e) => e,
|
1224
1232
|
type: Function
|
1225
1233
|
}
|
1226
|
-
},
|
1227
|
-
name:
|
1228
|
-
props:
|
1234
|
+
}, $e = E({
|
1235
|
+
name: B("TrendChartGrid"),
|
1236
|
+
props: ll,
|
1229
1237
|
setup(e) {
|
1230
|
-
const t = (
|
1231
|
-
const
|
1238
|
+
const t = (a) => {
|
1239
|
+
const s = e.verticalLinesNumber > 1 ? (e.boundary.maxX - e.boundary.minX) / (e.verticalLinesNumber - 1) : 0, i = e.boundary.minX + s * (a - 1), f = e.boundary.minY, c = e.boundary.maxY;
|
1232
1240
|
return {
|
1233
1241
|
x1: i,
|
1234
1242
|
x2: i,
|
1235
|
-
y1:
|
1236
|
-
y2:
|
1243
|
+
y1: f,
|
1244
|
+
y2: c,
|
1237
1245
|
stroke: "rgba(0,0,0,0.1)"
|
1238
1246
|
};
|
1239
|
-
}, l = (
|
1240
|
-
const
|
1247
|
+
}, l = (a) => {
|
1248
|
+
const s = e.horizontalLinesNumber > 1 ? (e.boundary.maxY - e.boundary.minY) / (e.horizontalLinesNumber - 1) : 0, i = e.boundary.maxY - s * (a - 1), f = e.boundary.minX, c = e.boundary.maxX;
|
1241
1249
|
return {
|
1242
|
-
x1:
|
1243
|
-
x2:
|
1250
|
+
x1: f,
|
1251
|
+
x2: c,
|
1244
1252
|
y1: i,
|
1245
1253
|
y2: i,
|
1246
1254
|
stroke: "rgba(0,0,0,0.1)"
|
1247
1255
|
};
|
1248
|
-
}, n =
|
1256
|
+
}, n = g(() => {
|
1249
1257
|
if (e.verticalLines && e.verticalLinesNumber > 0) {
|
1250
|
-
const
|
1251
|
-
for (let
|
1252
|
-
|
1253
|
-
|
1258
|
+
const a = [];
|
1259
|
+
for (let s = 1; s <= e.verticalLinesNumber; s++)
|
1260
|
+
a.push(
|
1261
|
+
w("line", {
|
1254
1262
|
class: "line",
|
1255
|
-
...t(
|
1263
|
+
...t(s)
|
1256
1264
|
})
|
1257
1265
|
);
|
1258
|
-
return
|
1266
|
+
return w("g", { class: "vertical" }, a);
|
1259
1267
|
}
|
1260
1268
|
return null;
|
1261
|
-
}),
|
1269
|
+
}), o = g(() => {
|
1262
1270
|
if (e.horizontalLines && e.horizontalLinesNumber > 0) {
|
1263
|
-
const
|
1264
|
-
for (let
|
1265
|
-
|
1266
|
-
|
1271
|
+
const a = [];
|
1272
|
+
for (let s = 1; s <= e.horizontalLinesNumber; s++)
|
1273
|
+
a.push(
|
1274
|
+
w("line", {
|
1267
1275
|
class: "line",
|
1268
|
-
...l(
|
1276
|
+
...l(s)
|
1269
1277
|
})
|
1270
1278
|
);
|
1271
|
-
return
|
1279
|
+
return w("g", { class: "horizontal" }, a);
|
1272
1280
|
}
|
1273
1281
|
return null;
|
1274
1282
|
});
|
1275
1283
|
return () => {
|
1276
|
-
const
|
1277
|
-
return n.value &&
|
1284
|
+
const a = [];
|
1285
|
+
return n.value && a.push(n.value), o.value && a.push(o.value), a.length === 0 ? null : w("g", null, a);
|
1278
1286
|
};
|
1279
1287
|
}
|
1280
|
-
}),
|
1281
|
-
name:
|
1282
|
-
props:
|
1288
|
+
}), Fe = E({
|
1289
|
+
name: B("TrendChartLabels"),
|
1290
|
+
props: nl,
|
1283
1291
|
setup(e) {
|
1284
|
-
const t =
|
1292
|
+
const t = ce({
|
1285
1293
|
xLabelHeight: 0,
|
1286
1294
|
yLabelHeight: 0
|
1287
|
-
}), l =
|
1288
|
-
const
|
1289
|
-
return { transform: `translate(${
|
1290
|
-
},
|
1291
|
-
const
|
1292
|
-
return { transform: `translate(${
|
1295
|
+
}), l = M(null), n = M(null), o = (f) => {
|
1296
|
+
const c = (e.boundary.maxX - e.boundary.minX) / (e.xLabels.length - 1), y = e.boundary.minX + c * f, u = e.boundary.maxY;
|
1297
|
+
return { transform: `translate(${y}, ${u})` };
|
1298
|
+
}, a = (f) => {
|
1299
|
+
const c = (e.boundary.maxY - e.boundary.minY) / (e.yLabels - 1), y = e.boundary.minX, u = e.boundary.maxY - c * f;
|
1300
|
+
return { transform: `translate(${y}, ${u})` };
|
1293
1301
|
};
|
1294
|
-
|
1295
|
-
var
|
1296
|
-
l.value && e.xLabels && e.xLabels.length && (t.xLabelHeight = ((
|
1302
|
+
W(() => {
|
1303
|
+
var f, c;
|
1304
|
+
l.value && e.xLabels && e.xLabels.length && (t.xLabelHeight = ((f = l.value.querySelector("text")) == null ? void 0 : f.getBoundingClientRect().height) || 0), n.value && e.yLabels && e.yLabels > 0 && (t.yLabelHeight = ((c = n.value.querySelector("text")) == null ? void 0 : c.getBoundingClientRect().height) || 0);
|
1297
1305
|
});
|
1298
|
-
const
|
1306
|
+
const s = g(() => e.xLabels && e.xLabels.length ? w(
|
1299
1307
|
"g",
|
1300
1308
|
{ class: "x-labels", ref: l },
|
1301
1309
|
e.xLabels.map(
|
1302
|
-
(
|
1303
|
-
|
1310
|
+
(f, c) => w("g", { class: "label", ...o(c) }, [
|
1311
|
+
w(
|
1304
1312
|
"text",
|
1305
1313
|
{
|
1306
1314
|
dy: t.xLabelHeight + 5,
|
1307
1315
|
"text-anchor": "middle"
|
1308
1316
|
},
|
1309
|
-
|
1317
|
+
f
|
1310
1318
|
),
|
1311
|
-
|
1319
|
+
w("line", { stroke: "rgba(0,0,0,0.1)", y2: 5 })
|
1312
1320
|
])
|
1313
1321
|
)
|
1314
|
-
) : null), i =
|
1322
|
+
) : null), i = g(() => {
|
1315
1323
|
if (e.yLabels && e.yLabels > 0) {
|
1316
|
-
const
|
1317
|
-
for (let
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1324
|
+
const f = [];
|
1325
|
+
for (let c = 0; c < e.yLabels; c++)
|
1326
|
+
f.push(
|
1327
|
+
w("g", { class: "label", ...a(c) }, [
|
1328
|
+
w(
|
1321
1329
|
"text",
|
1322
1330
|
{
|
1323
1331
|
dx: -10,
|
@@ -1325,109 +1333,252 @@ const Wt = I(S("MessageBox"), xe), Ht = {
|
|
1325
1333
|
"text-anchor": "end"
|
1326
1334
|
},
|
1327
1335
|
e.yLabelsTextFormatter(
|
1328
|
-
e.minValue + (e.maxValue - e.minValue) / (e.yLabels - 1) *
|
1336
|
+
e.minValue + (e.maxValue - e.minValue) / (e.yLabels - 1) * c
|
1329
1337
|
)
|
1330
1338
|
),
|
1331
|
-
|
1339
|
+
w("line", { stroke: "rgba(0,0,0,0.1)", x1: 0, x2: -5 })
|
1332
1340
|
])
|
1333
1341
|
);
|
1334
|
-
return
|
1342
|
+
return w("g", { class: "y-labels", ref: n }, f);
|
1335
1343
|
}
|
1336
1344
|
return null;
|
1337
1345
|
});
|
1338
1346
|
return () => {
|
1339
|
-
const
|
1340
|
-
return
|
1347
|
+
const f = [];
|
1348
|
+
return s.value && f.push(s.value), i.value && f.push(i.value), w("g", f);
|
1341
1349
|
};
|
1342
1350
|
}
|
1343
|
-
}),
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
y: t.maxY - (d - o) * i + +(s === a - 1) * 1e-5 - +(s === 0) * 1e-5
|
1351
|
+
}), al = (e, t, l, n, o) => {
|
1352
|
+
const a = n - 1e-3, s = (t.maxX - t.minX) / (o - 1), i = (t.maxY - t.minY) / (l + 1e-3 - a);
|
1353
|
+
return e.map((f, c) => ({
|
1354
|
+
x: c * s + t.minX,
|
1355
|
+
y: t.maxY - (f - a) * i + +(c === o - 1) * 1e-5 - +(c === 0) * 1e-5
|
1349
1356
|
}));
|
1350
|
-
},
|
1351
|
-
const n = e.shift(),
|
1357
|
+
}, rl = (e, t, { maxY: l }) => {
|
1358
|
+
const n = e.shift(), o = e[e.length - 1], s = (e[0].x - n.x) / 2;
|
1352
1359
|
let i = `M ${n.x},${n.y}`;
|
1353
|
-
e.forEach((
|
1354
|
-
if (!t) i += ` L${
|
1360
|
+
e.forEach((c, y) => {
|
1361
|
+
if (!t) i += ` L${c.x},${c.y}`;
|
1355
1362
|
else {
|
1356
|
-
const u = e[
|
1357
|
-
i += ` C ${
|
1363
|
+
const u = e[y - 1] || n;
|
1364
|
+
i += ` C ${s + u.x},${u.y} ${s + u.x},${c.y} ${c.x},${c.y}`;
|
1358
1365
|
}
|
1359
1366
|
});
|
1360
|
-
let
|
1361
|
-
return
|
1362
|
-
},
|
1363
|
-
name:
|
1364
|
-
props:
|
1367
|
+
let f = i;
|
1368
|
+
return o.y !== l && (f += ` L${o.x},${l}`), n.y !== l && (f += ` L${n.x},${l}`), f += " Z", { linePath: i, fillPath: f };
|
1369
|
+
}, je = /* @__PURE__ */ E({
|
1370
|
+
name: B("TrendChartCurve"),
|
1371
|
+
props: tl,
|
1365
1372
|
setup(e) {
|
1366
|
-
const t =
|
1367
|
-
var
|
1368
|
-
const
|
1369
|
-
|
1373
|
+
const t = g(() => al(e.data, e.boundary, e.maxValue, e.minValue, e.maxAmount)), l = g(() => rl([...t.value], e.smooth, e.boundary)), n = g(() => {
|
1374
|
+
var s, i, f, c, y, u, d, m, C, v, N, A;
|
1375
|
+
const o = [];
|
1376
|
+
e.fill && ((s = l.value) != null && s.fillPath) && o.push(r("path", {
|
1370
1377
|
class: "x-trend-chart-fill",
|
1371
1378
|
d: l.value.fillPath,
|
1372
1379
|
fill: "none",
|
1373
1380
|
style: {
|
1374
|
-
fill: ((
|
1375
|
-
opacity: ((
|
1381
|
+
fill: ((f = (i = e.theme) == null ? void 0 : i.fill) == null ? void 0 : f.color) || "#585858",
|
1382
|
+
opacity: ((y = (c = e.theme) == null ? void 0 : c.fill) == null ? void 0 : y.opacity) || 0.1
|
1376
1383
|
}
|
1377
|
-
}, null)), e.stroke && ((u = l.value) != null && u.linePath) &&
|
1384
|
+
}, null)), e.stroke && ((u = l.value) != null && u.linePath) && o.push(r("path", {
|
1378
1385
|
class: "x-trend-chart-stroke",
|
1379
1386
|
d: l.value.linePath,
|
1380
1387
|
fill: "none",
|
1381
1388
|
stroke: "none",
|
1382
1389
|
style: {
|
1383
|
-
stroke: (
|
1384
|
-
strokeWidth: (
|
1385
|
-
opacity: (
|
1390
|
+
stroke: (m = (d = e.theme) == null ? void 0 : d.stroke) == null ? void 0 : m.color,
|
1391
|
+
strokeWidth: (v = (C = e.theme) == null ? void 0 : C.stroke) == null ? void 0 : v.width,
|
1392
|
+
opacity: (A = (N = e.theme) == null ? void 0 : N.stroke) == null ? void 0 : A.opacity
|
1386
1393
|
}
|
1387
|
-
}, null))
|
1388
|
-
const
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1394
|
+
}, null));
|
1395
|
+
const a = (h) => {
|
1396
|
+
var b, k, z, T;
|
1397
|
+
return h ? {
|
1398
|
+
stroke: (k = (b = e.theme) == null ? void 0 : b.point) == null ? void 0 : k.color,
|
1399
|
+
strokeWidth: (T = (z = e.theme) == null ? void 0 : z.point) == null ? void 0 : T.width,
|
1400
|
+
r: 1
|
1401
|
+
} : {};
|
1402
|
+
};
|
1393
1403
|
if (e.showPoints && t.value) {
|
1394
|
-
const
|
1395
|
-
var
|
1404
|
+
const h = t.value.map((b, k) => {
|
1405
|
+
var z, T;
|
1396
1406
|
return r("circle", {
|
1397
1407
|
class: {
|
1398
1408
|
point: !0,
|
1399
|
-
"x-trend-chart-point-active": ((
|
1409
|
+
"x-trend-chart-point-active": ((z = e.activeLineParams) == null ? void 0 : z.index) === k
|
1400
1410
|
},
|
1401
|
-
cx:
|
1402
|
-
cy:
|
1403
|
-
style:
|
1411
|
+
cx: b.x,
|
1412
|
+
cy: b.y,
|
1413
|
+
style: a(((T = e.activeLineParams) == null ? void 0 : T.index) === k)
|
1404
1414
|
}, null);
|
1405
1415
|
});
|
1406
|
-
|
1416
|
+
o.push(r("g", {
|
1407
1417
|
class: "x-trend-chart-points"
|
1408
|
-
}, [
|
1418
|
+
}, [h]));
|
1409
1419
|
}
|
1410
|
-
return
|
1420
|
+
return o;
|
1411
1421
|
});
|
1412
1422
|
return () => r("g", {
|
1413
1423
|
class: e.className
|
1414
1424
|
}, [n.value]);
|
1415
1425
|
}
|
1416
|
-
}),
|
1417
|
-
|
1426
|
+
}), ie = "#f00", Z = "#ff7126", q = "#ffc703", U = "#363636", G = "#25c341", K = "#0056ff", R = {
|
1427
|
+
DANGER: {
|
1428
|
+
// 主题色
|
1429
|
+
color: "#f00",
|
1430
|
+
// 点
|
1431
|
+
point: {
|
1432
|
+
width: 3,
|
1433
|
+
color: ie
|
1434
|
+
},
|
1435
|
+
// 描边
|
1436
|
+
stroke: {
|
1437
|
+
width: 3,
|
1438
|
+
color: ie,
|
1439
|
+
opacity: 0.8
|
1440
|
+
},
|
1441
|
+
// 填充
|
1442
|
+
fill: {
|
1443
|
+
color: ie,
|
1444
|
+
opacity: 0.1
|
1445
|
+
},
|
1446
|
+
axisLine: {
|
1447
|
+
color: ie,
|
1448
|
+
width: 2,
|
1449
|
+
opacity: 0.9
|
1450
|
+
}
|
1451
|
+
},
|
1452
|
+
STRONG: {
|
1453
|
+
// 主题色
|
1454
|
+
color: Z,
|
1455
|
+
// 点
|
1456
|
+
point: {
|
1457
|
+
width: 4,
|
1458
|
+
color: Z
|
1459
|
+
},
|
1460
|
+
stroke: {
|
1461
|
+
width: 3,
|
1462
|
+
color: Z,
|
1463
|
+
opacity: 0.8
|
1464
|
+
},
|
1465
|
+
fill: {
|
1466
|
+
color: Z,
|
1467
|
+
opacity: 0.1
|
1468
|
+
},
|
1469
|
+
axisLine: {
|
1470
|
+
color: Z,
|
1471
|
+
width: 2,
|
1472
|
+
opacity: 0.9
|
1473
|
+
}
|
1474
|
+
},
|
1475
|
+
WARNING: {
|
1476
|
+
// 主题色
|
1477
|
+
color: q,
|
1478
|
+
// 点
|
1479
|
+
point: {
|
1480
|
+
width: 4,
|
1481
|
+
color: q
|
1482
|
+
},
|
1483
|
+
stroke: {
|
1484
|
+
width: 3,
|
1485
|
+
color: q,
|
1486
|
+
opacity: 1
|
1487
|
+
},
|
1488
|
+
fill: {
|
1489
|
+
color: q,
|
1490
|
+
opacity: 0.1
|
1491
|
+
},
|
1492
|
+
axisLine: {
|
1493
|
+
color: q,
|
1494
|
+
width: 2,
|
1495
|
+
opacity: 0.9
|
1496
|
+
}
|
1497
|
+
},
|
1498
|
+
SUCCESS: {
|
1499
|
+
// 主题色
|
1500
|
+
color: G,
|
1501
|
+
// 点
|
1502
|
+
point: {
|
1503
|
+
width: 4,
|
1504
|
+
color: G
|
1505
|
+
},
|
1506
|
+
stroke: {
|
1507
|
+
width: 3,
|
1508
|
+
color: G,
|
1509
|
+
opacity: 1
|
1510
|
+
},
|
1511
|
+
fill: {
|
1512
|
+
color: G,
|
1513
|
+
opacity: 0.1
|
1514
|
+
},
|
1515
|
+
axisLine: {
|
1516
|
+
color: G,
|
1517
|
+
width: 2,
|
1518
|
+
opacity: 0.9
|
1519
|
+
}
|
1520
|
+
},
|
1521
|
+
INFO: {
|
1522
|
+
// 主题色
|
1523
|
+
color: U,
|
1524
|
+
// 点
|
1525
|
+
point: {
|
1526
|
+
width: 4,
|
1527
|
+
color: U
|
1528
|
+
},
|
1529
|
+
stroke: {
|
1530
|
+
width: 3,
|
1531
|
+
color: U,
|
1532
|
+
opacity: 1
|
1533
|
+
},
|
1534
|
+
fill: {
|
1535
|
+
color: U,
|
1536
|
+
opacity: 0.1
|
1537
|
+
},
|
1538
|
+
axisLine: {
|
1539
|
+
color: U,
|
1540
|
+
width: 2,
|
1541
|
+
opacity: 0.9
|
1542
|
+
}
|
1543
|
+
},
|
1544
|
+
PRIMARY: {
|
1545
|
+
// 主题色
|
1546
|
+
color: K,
|
1547
|
+
// 点
|
1548
|
+
point: {
|
1549
|
+
width: 4,
|
1550
|
+
color: K
|
1551
|
+
},
|
1552
|
+
stroke: {
|
1553
|
+
width: 3,
|
1554
|
+
color: K,
|
1555
|
+
opacity: 0.9
|
1556
|
+
},
|
1557
|
+
fill: {
|
1558
|
+
color: K,
|
1559
|
+
opacity: 0.1
|
1560
|
+
},
|
1561
|
+
axisLine: {
|
1562
|
+
color: K,
|
1563
|
+
width: 2,
|
1564
|
+
opacity: 0.9
|
1565
|
+
}
|
1566
|
+
}
|
1567
|
+
}, ol = /* @__PURE__ */ E({
|
1568
|
+
name: B("TrendChart"),
|
1418
1569
|
components: {
|
1419
|
-
TrendChartGrid:
|
1420
|
-
TrendChartLabels:
|
1421
|
-
TrendChartCurve:
|
1570
|
+
TrendChartGrid: $e,
|
1571
|
+
TrendChartLabels: Fe,
|
1572
|
+
TrendChartCurve: je
|
1422
1573
|
},
|
1423
|
-
props:
|
1574
|
+
props: el,
|
1424
1575
|
emits: {
|
1425
1576
|
"mouse-move": (e) => !0
|
1426
1577
|
},
|
1427
1578
|
setup(e, {
|
1428
1579
|
emit: t
|
1429
1580
|
}) {
|
1430
|
-
const l =
|
1581
|
+
const l = ce({
|
1431
1582
|
width: null,
|
1432
1583
|
height: null,
|
1433
1584
|
labelsOverflowObject: {
|
@@ -1438,46 +1589,48 @@ const Wt = I(S("MessageBox"), xe), Ht = {
|
|
1438
1589
|
},
|
1439
1590
|
activeLine: null,
|
1440
1591
|
activeLineParams: null
|
1441
|
-
}), n =
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1592
|
+
}), n = g(() => {
|
1593
|
+
let h = R.INFO;
|
1594
|
+
return e.status === "primary" ? h = R.PRIMARY : e.status === "success" ? h = R.SUCCESS : e.status === "danger" ? h = R.DANGER : e.status === "warning" ? h = R.WARNING : e.status === "strong" && (h = R.STRONG), {
|
1595
|
+
...h,
|
1596
|
+
...e.theme
|
1597
|
+
};
|
1598
|
+
}), o = g(() => Jt(e.padding || "0")), a = g(() => ({
|
1599
|
+
minX: Number(o.value.left) + Number(l.labelsOverflowObject.left),
|
1600
|
+
minY: Number(o.value.top) + Number(l.labelsOverflowObject.top),
|
1601
|
+
maxX: (l.width ?? 0) - Number(o.value.right) - Number(l.labelsOverflowObject.right),
|
1602
|
+
maxY: (l.height ?? 0) - Number(o.value.bottom) - Number(l.labelsOverflowObject.bottom)
|
1603
|
+
})), s = g(() => {
|
1604
|
+
let h = -1 / 0, b = 1 / 0, k = 0;
|
1605
|
+
return h = Math.max(h, ...e.dataset), b = Math.min(b, ...e.dataset), k = Math.max(k, e.dataset.length), e.max !== void 0 && (h = Math.max(h, e.max)), e.min !== void 0 && (b = Math.min(b, e.min)), {
|
1606
|
+
maxValue: h,
|
1454
1607
|
minValue: b,
|
1455
|
-
maxAmount:
|
1608
|
+
maxAmount: k
|
1456
1609
|
};
|
1457
|
-
}),
|
1610
|
+
}), i = g(() => ({
|
1458
1611
|
x: a.value.minX,
|
1459
1612
|
y: a.value.minY,
|
1460
1613
|
width: Math.max(0, a.value.maxX - a.value.minX),
|
1461
1614
|
height: Math.max(0, a.value.maxY - a.value.minY),
|
1462
1615
|
opacity: 0
|
1463
|
-
})),
|
1464
|
-
const
|
1616
|
+
})), f = g(() => {
|
1617
|
+
const h = (a.value.maxX - a.value.minX) / (s.value.maxAmount - 1);
|
1465
1618
|
return Array.from({
|
1466
|
-
length:
|
1467
|
-
}, (b,
|
1468
|
-
}),
|
1469
|
-
if (
|
1470
|
-
const
|
1471
|
-
l.width =
|
1619
|
+
length: s.value.maxAmount
|
1620
|
+
}, (b, k) => Math.round(a.value.minX + h * k));
|
1621
|
+
}), c = M(null), y = M(null), u = () => {
|
1622
|
+
if (c.value) {
|
1623
|
+
const h = c.value.getBoundingClientRect();
|
1624
|
+
l.width = h.width, l.height = h.height;
|
1472
1625
|
}
|
1473
|
-
},
|
1474
|
-
if (
|
1475
|
-
const
|
1626
|
+
}, d = () => {
|
1627
|
+
if (y.value) {
|
1628
|
+
const h = c.value.getBoundingClientRect(), b = y.value.$el.getBoundingClientRect();
|
1476
1629
|
l.labelsOverflowObject = {
|
1477
|
-
top: Math.max(0, Number(
|
1478
|
-
right: Math.max(0, Number(b.right) - Number(
|
1479
|
-
bottom: Math.max(0, Number(b.bottom) - Number(
|
1480
|
-
left: Math.max(0, Number(
|
1630
|
+
top: Math.max(0, Number(h.top) - Number(b.top) + Number(o.value.top)),
|
1631
|
+
right: Math.max(0, Number(b.right) - Number(h.right) + Number(o.value.right)),
|
1632
|
+
bottom: Math.max(0, Number(b.bottom) - Number(h.bottom) + Number(o.value.bottom)),
|
1633
|
+
left: Math.max(0, Number(o.value.left) - Number(b.left) + Number(h.left))
|
1481
1634
|
};
|
1482
1635
|
} else
|
1483
1636
|
l.labelsOverflowObject = {
|
@@ -1486,75 +1639,74 @@ const Wt = I(S("MessageBox"), xe), Ht = {
|
|
1486
1639
|
bottom: 0,
|
1487
1640
|
left: 0
|
1488
1641
|
};
|
1489
|
-
},
|
1490
|
-
|
1491
|
-
},
|
1492
|
-
if (
|
1493
|
-
const b =
|
1494
|
-
l.activeLine =
|
1642
|
+
}, m = () => {
|
1643
|
+
u(), Ee(d);
|
1644
|
+
}, C = (h) => f.value.reduce((b, k) => Math.abs(b - h) > Math.abs(k - h) ? k : b, 1 / 0), v = (h) => {
|
1645
|
+
if (c.value) {
|
1646
|
+
const b = c.value.getBoundingClientRect();
|
1647
|
+
l.activeLine = C(h.clientX - b.left);
|
1495
1648
|
}
|
1496
|
-
},
|
1649
|
+
}, N = () => {
|
1497
1650
|
l.activeLine = null, l.activeLineParams = null;
|
1498
|
-
},
|
1499
|
-
|
1651
|
+
}, A = () => {
|
1652
|
+
u();
|
1500
1653
|
};
|
1501
|
-
return
|
1502
|
-
|
1503
|
-
}),
|
1504
|
-
window.removeEventListener("resize",
|
1505
|
-
}),
|
1506
|
-
|
1507
|
-
|
1508
|
-
const w = i.value.indexOf(y);
|
1654
|
+
return W(() => {
|
1655
|
+
m(), window.addEventListener("resize", A);
|
1656
|
+
}), ue(() => {
|
1657
|
+
window.removeEventListener("resize", A);
|
1658
|
+
}), ee(() => l.activeLine, (h) => {
|
1659
|
+
if (h !== null) {
|
1660
|
+
const b = f.value.indexOf(h);
|
1509
1661
|
l.activeLineParams = {
|
1510
|
-
index:
|
1662
|
+
index: b
|
1511
1663
|
}, t("mouse-move", {
|
1512
1664
|
...l.activeLineParams,
|
1513
|
-
data:
|
1665
|
+
data: e.dataset[b]
|
1514
1666
|
});
|
1515
1667
|
} else
|
1516
1668
|
t("mouse-move", null);
|
1517
|
-
}),
|
1669
|
+
}), ee(() => e.labels, () => {
|
1518
1670
|
l.labelsOverflowObject = {
|
1519
1671
|
top: 0,
|
1520
1672
|
right: 0,
|
1521
1673
|
bottom: 0,
|
1522
1674
|
left: 0
|
1523
|
-
},
|
1675
|
+
}, Ee(d);
|
1524
1676
|
}, {
|
1525
1677
|
deep: !0
|
1526
1678
|
}), () => {
|
1527
|
-
var
|
1679
|
+
var h, b, k, z, T, F, ae;
|
1528
1680
|
return r("svg", {
|
1529
1681
|
class: "x-trend-chart",
|
1530
|
-
ref:
|
1682
|
+
ref: c,
|
1531
1683
|
xmlns: "http://www.w3.org/2000/svg",
|
1532
1684
|
width: "100%",
|
1533
1685
|
height: "100%"
|
1534
|
-
}, [e.grid && r(
|
1686
|
+
}, [e.grid && r($e, {
|
1535
1687
|
class: "grid",
|
1536
1688
|
verticalLines: e.grid.verticalLines,
|
1537
|
-
verticalLinesNumber: e.grid.verticalLinesNumber ||
|
1689
|
+
verticalLinesNumber: e.grid.verticalLinesNumber || s.value.maxAmount,
|
1538
1690
|
horizontalLines: e.grid.horizontalLines,
|
1539
|
-
horizontalLinesNumber: e.grid.horizontalLinesNumber || (((
|
1691
|
+
horizontalLinesNumber: e.grid.horizontalLinesNumber || (((h = e.labels) == null ? void 0 : h.yLabels) ?? 0),
|
1540
1692
|
boundary: a.value
|
1541
|
-
}, null), e.labels && r(
|
1542
|
-
ref:
|
1693
|
+
}, null), e.labels && r(Fe, ze({
|
1694
|
+
ref: y,
|
1543
1695
|
class: "labels"
|
1544
1696
|
}, e.labels, {
|
1545
1697
|
boundary: a.value,
|
1546
|
-
minValue:
|
1547
|
-
maxValue:
|
1548
|
-
}), null),
|
1549
|
-
class: "curve"
|
1550
|
-
|
1698
|
+
minValue: s.value.minValue,
|
1699
|
+
maxValue: s.value.maxValue
|
1700
|
+
}), null), r(je, {
|
1701
|
+
class: "curve",
|
1702
|
+
data: e.dataset,
|
1551
1703
|
boundary: a.value,
|
1552
|
-
minValue:
|
1553
|
-
maxValue:
|
1554
|
-
maxAmount:
|
1704
|
+
minValue: s.value.minValue,
|
1705
|
+
maxValue: s.value.maxValue,
|
1706
|
+
maxAmount: s.value.maxAmount,
|
1555
1707
|
activeLineParams: l.activeLineParams,
|
1556
|
-
|
1557
|
-
}
|
1708
|
+
theme: n.value
|
1709
|
+
}, null), e.interactive && r(Y, null, [r("line", {
|
1558
1710
|
class: "x-trend-chart-active-line",
|
1559
1711
|
x1: l.activeLine ?? a.value.minX,
|
1560
1712
|
x2: l.activeLine ?? a.value.minX,
|
@@ -1562,83 +1714,83 @@ const Wt = I(S("MessageBox"), xe), Ht = {
|
|
1562
1714
|
y2: a.value.maxY,
|
1563
1715
|
visibility: l.activeLine ? "visible" : "hidden",
|
1564
1716
|
style: {
|
1565
|
-
stroke: (
|
1566
|
-
strokeWidth: (
|
1567
|
-
strokeOpacity: (
|
1717
|
+
stroke: (k = (b = n.value) == null ? void 0 : b.axisLine) == null ? void 0 : k.color,
|
1718
|
+
strokeWidth: (T = (z = n.value) == null ? void 0 : z.axisLine) == null ? void 0 : T.width,
|
1719
|
+
strokeOpacity: (ae = (F = n.value) == null ? void 0 : F.axisLine) == null ? void 0 : ae.opacity
|
1568
1720
|
}
|
1569
|
-
}, null), r("rect",
|
1570
|
-
onMousemove:
|
1571
|
-
onMouseout:
|
1721
|
+
}, null), r("rect", ze(i.value, {
|
1722
|
+
onMousemove: v,
|
1723
|
+
onMouseout: N
|
1572
1724
|
}), null)])]);
|
1573
1725
|
};
|
1574
1726
|
}
|
1575
|
-
}),
|
1727
|
+
}), il = V(B("TrendChart"), ol), Ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
1576
1728
|
__proto__: null,
|
1577
|
-
XButton:
|
1578
|
-
XDialog:
|
1579
|
-
XMessage:
|
1580
|
-
XMessageBox:
|
1581
|
-
XNotification:
|
1582
|
-
XSpace:
|
1583
|
-
XTrendChart:
|
1729
|
+
XButton: le,
|
1730
|
+
XDialog: Ge,
|
1731
|
+
XMessage: Wt,
|
1732
|
+
XMessageBox: Ut,
|
1733
|
+
XNotification: Kt,
|
1734
|
+
XSpace: Be,
|
1735
|
+
XTrendChart: il
|
1584
1736
|
}, Symbol.toStringTag, { value: "Module" }));
|
1585
|
-
function
|
1586
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
1737
|
+
function Ve(e) {
|
1738
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !O(e);
|
1587
1739
|
}
|
1588
|
-
const
|
1740
|
+
const Xe = $("dialog"), bl = (e) => {
|
1589
1741
|
const t = document.createElement("div"), l = () => {
|
1590
|
-
|
1742
|
+
I(null, t);
|
1591
1743
|
}, n = (u) => {
|
1592
1744
|
if (u === "cancel")
|
1593
1745
|
return e.beforeOnCancel ? e.beforeOnCancel() : !0;
|
1594
1746
|
if (u === "ok")
|
1595
1747
|
return e.beforeOnOk ? e.beforeOnOk() : !0;
|
1596
|
-
},
|
1597
|
-
u === "cancel" && e.onCancel && e.onCancel(
|
1598
|
-
},
|
1599
|
-
if (
|
1600
|
-
if (
|
1601
|
-
const
|
1602
|
-
return
|
1748
|
+
}, o = (u, d) => {
|
1749
|
+
u === "cancel" && e.onCancel && e.onCancel(d), u === "ok" && e.onOk && e.onOk(d);
|
1750
|
+
}, a = (u) => {
|
1751
|
+
if (O(u)) return u;
|
1752
|
+
if (S(u)) {
|
1753
|
+
const d = u();
|
1754
|
+
return O(d) ? d : null;
|
1603
1755
|
}
|
1604
1756
|
return r("div", {
|
1605
|
-
class:
|
1606
|
-
}, [
|
1607
|
-
},
|
1608
|
-
if (
|
1609
|
-
if (
|
1610
|
-
const
|
1611
|
-
return
|
1757
|
+
class: Xe.element("header-title")
|
1758
|
+
}, [p(" "), u, p(" ")]);
|
1759
|
+
}, s = (u) => {
|
1760
|
+
if (O(u)) return u;
|
1761
|
+
if (S(u)) {
|
1762
|
+
const d = u();
|
1763
|
+
return O(d) ? d : null;
|
1612
1764
|
}
|
1613
1765
|
return r("div", {
|
1614
|
-
class:
|
1615
|
-
}, [
|
1616
|
-
}, i = () => () => r(
|
1617
|
-
if (
|
1766
|
+
class: Xe.element("content")
|
1767
|
+
}, [p(" "), e.content, p(" ")]);
|
1768
|
+
}, i = () => () => r(Y, null, [e.title && a(e.title)]), f = () => () => r(Y, null, [e.content && s(e.content)]), c = () => {
|
1769
|
+
if (O(e.footer) || S(e.footer))
|
1618
1770
|
return e.footer;
|
1619
|
-
const u = (e == null ? void 0 : e.cancelText) || "取消",
|
1620
|
-
return (m) => r(
|
1771
|
+
const u = (e == null ? void 0 : e.cancelText) || "取消", d = (e == null ? void 0 : e.okText) || "确认";
|
1772
|
+
return (m) => r(Be, {
|
1621
1773
|
size: 12
|
1622
1774
|
}, {
|
1623
1775
|
default: () => {
|
1624
|
-
var C,
|
1625
|
-
return [!e.hideCancel && r(
|
1776
|
+
var C, v;
|
1777
|
+
return [!e.hideCancel && r(le, {
|
1626
1778
|
size: "small",
|
1627
1779
|
onClick: m.cancel,
|
1628
1780
|
loading: (C = m.loadingObj) == null ? void 0 : C.cancel
|
1629
|
-
},
|
1781
|
+
}, Ve(u) ? u : {
|
1630
1782
|
default: () => [u]
|
1631
|
-
}), !e.hideOk && r(
|
1783
|
+
}), !e.hideOk && r(le, {
|
1632
1784
|
type: "primary",
|
1633
1785
|
size: "small",
|
1634
1786
|
onClick: m.ok,
|
1635
|
-
loading: (
|
1636
|
-
},
|
1637
|
-
default: () => [
|
1787
|
+
loading: (v = m.loadingObj) == null ? void 0 : v.ok
|
1788
|
+
}, Ve(d) ? d : {
|
1789
|
+
default: () => [d]
|
1638
1790
|
})];
|
1639
1791
|
}
|
1640
1792
|
});
|
1641
|
-
},
|
1793
|
+
}, y = r(Ue, {
|
1642
1794
|
width: (e == null ? void 0 : e.width) ?? 368,
|
1643
1795
|
height: (e == null ? void 0 : e.height) ?? "auto",
|
1644
1796
|
modelValue: !0,
|
@@ -1648,10 +1800,10 @@ const $e = F("dialog"), dl = (e) => {
|
|
1648
1800
|
mask: (e == null ? void 0 : e.mask) ?? !0,
|
1649
1801
|
maskToClose: (e == null ? void 0 : e.maskToClose) ?? !0,
|
1650
1802
|
popupClass: e.popupClass,
|
1651
|
-
onClose:
|
1803
|
+
onClose: o,
|
1652
1804
|
onBeforeCancel: n,
|
1653
1805
|
"onUpdate:modelValue": () => {
|
1654
|
-
|
1806
|
+
y.component.props.modelValue = !1;
|
1655
1807
|
},
|
1656
1808
|
// 等待动画完全结束后销毁vm
|
1657
1809
|
onClosed: l,
|
@@ -1659,18 +1811,18 @@ const $e = F("dialog"), dl = (e) => {
|
|
1659
1811
|
}
|
1660
1812
|
}, {
|
1661
1813
|
title: i(),
|
1662
|
-
default:
|
1663
|
-
footer:
|
1814
|
+
default: f(),
|
1815
|
+
footer: c()
|
1664
1816
|
});
|
1665
|
-
|
1666
|
-
},
|
1667
|
-
name:
|
1817
|
+
I(y, t);
|
1818
|
+
}, sl = ["success", "warning", "error", "strong", "info"], cl = E({
|
1819
|
+
name: B("Message"),
|
1668
1820
|
components: {
|
1669
|
-
CloseCircleFill:
|
1670
|
-
CheckCircleFill:
|
1671
|
-
ExclamationCircleFill:
|
1672
|
-
InfoCircleFill:
|
1673
|
-
MinusCircleFill:
|
1821
|
+
CloseCircleFill: me,
|
1822
|
+
CheckCircleFill: he,
|
1823
|
+
ExclamationCircleFill: ye,
|
1824
|
+
InfoCircleFill: ge,
|
1825
|
+
MinusCircleFill: ve
|
1674
1826
|
},
|
1675
1827
|
props: {
|
1676
1828
|
id: {
|
@@ -1718,27 +1870,27 @@ const $e = F("dialog"), dl = (e) => {
|
|
1718
1870
|
},
|
1719
1871
|
emits: ["destroy"],
|
1720
1872
|
setup(e) {
|
1721
|
-
const t =
|
1873
|
+
const t = $("message"), l = g(() => [
|
1722
1874
|
t.block,
|
1723
1875
|
t.modifier(e.type),
|
1724
1876
|
e.center && t.modifier("center"),
|
1725
1877
|
e.showClose && !e.center && t.element("show-close"),
|
1726
1878
|
e.popupClass && e.popupClass
|
1727
|
-
]), n =
|
1728
|
-
let
|
1729
|
-
const
|
1730
|
-
|
1879
|
+
]), n = M(!1);
|
1880
|
+
let o = null;
|
1881
|
+
const a = () => {
|
1882
|
+
o = setTimeout(() => {
|
1731
1883
|
n.value = !1;
|
1732
1884
|
}, e.duration);
|
1733
1885
|
};
|
1734
|
-
|
1735
|
-
n.value = !0, e.duration !== 0 &&
|
1736
|
-
}),
|
1737
|
-
clearTimeout(
|
1886
|
+
W(() => {
|
1887
|
+
n.value = !0, e.duration !== 0 && a();
|
1888
|
+
}), ue(() => {
|
1889
|
+
clearTimeout(o);
|
1738
1890
|
});
|
1739
|
-
const { zIndex:
|
1891
|
+
const { zIndex: s } = fe("message", { runOnMounted: !0 }), i = g(() => ({
|
1740
1892
|
top: `${e.offset}px`,
|
1741
|
-
zIndex:
|
1893
|
+
zIndex: s.value
|
1742
1894
|
}));
|
1743
1895
|
return {
|
1744
1896
|
cn: t,
|
@@ -1750,326 +1902,163 @@ const $e = F("dialog"), dl = (e) => {
|
|
1750
1902
|
}
|
1751
1903
|
};
|
1752
1904
|
}
|
1753
|
-
}),
|
1905
|
+
}), ul = (e, t) => {
|
1754
1906
|
const l = e.__vccOpts || e;
|
1755
|
-
for (const [n,
|
1756
|
-
l[n] =
|
1907
|
+
for (const [n, o] of t)
|
1908
|
+
l[n] = o;
|
1757
1909
|
return l;
|
1758
|
-
},
|
1759
|
-
function
|
1760
|
-
const
|
1761
|
-
return P(),
|
1910
|
+
}, dl = ["innerHTML"], fl = { key: 1 };
|
1911
|
+
function ml(e, t, l, n, o, a) {
|
1912
|
+
const s = _("CheckCircleFill"), i = _("ExclamationCircleFill"), f = _("MinusCircleFill"), c = _("CloseCircleFill"), y = _("InfoCircleFill");
|
1913
|
+
return P(), H(te, {
|
1762
1914
|
name: "x-message-slide-top",
|
1763
1915
|
onBeforeLeave: e.onClose,
|
1764
1916
|
onAfterLeave: t[1] || (t[1] = (u) => e.$emit("destroy"))
|
1765
1917
|
}, {
|
1766
|
-
default:
|
1767
|
-
|
1768
|
-
class:
|
1769
|
-
style:
|
1918
|
+
default: st(() => [
|
1919
|
+
ct(ut("div", {
|
1920
|
+
class: Ce(e.cls),
|
1921
|
+
style: dt(e.styles)
|
1770
1922
|
}, [
|
1771
|
-
e.$slots.icon ?
|
1923
|
+
e.$slots.icon ? xe("", !0) : (P(), oe("span", {
|
1772
1924
|
key: 0,
|
1773
|
-
class:
|
1925
|
+
class: Ce([e.cn.element("icon"), e.cn.modifier(`icon-${e.type}`)])
|
1774
1926
|
}, [
|
1775
|
-
|
1776
|
-
e.type === "success" ? (P(),
|
1927
|
+
Pe(e.$slots, "icon", {}, () => [
|
1928
|
+
e.type === "success" ? (P(), H(s, { key: 0 })) : e.type === "warning" ? (P(), H(i, { key: 1 })) : e.type === "strong" ? (P(), H(f, { key: 2 })) : e.type === "error" ? (P(), H(c, { key: 3 })) : e.type === "info" ? (P(), H(y, { key: 4 })) : xe("", !0)
|
1777
1929
|
])
|
1778
1930
|
], 2)),
|
1779
|
-
|
1780
|
-
e.useHTML ? (P(),
|
1931
|
+
Pe(e.$slots, "default", {}, () => [
|
1932
|
+
e.useHTML ? (P(), oe("span", {
|
1781
1933
|
key: 0,
|
1782
1934
|
innerHTML: e.message
|
1783
|
-
}, null, 8,
|
1784
|
-
e.showClose ? (P(),
|
1935
|
+
}, null, 8, dl)) : (P(), oe("span", fl, ft(e.message), 1)),
|
1936
|
+
e.showClose ? (P(), oe("span", {
|
1785
1937
|
key: 2,
|
1786
|
-
class:
|
1938
|
+
class: Ce([e.cn.element("close-icon")]),
|
1787
1939
|
onClick: t[0] || (t[0] = (...u) => e.handleClose && e.handleClose(...u))
|
1788
|
-
}, null, 2)) :
|
1940
|
+
}, null, 2)) : xe("", !0)
|
1789
1941
|
])
|
1790
1942
|
], 6), [
|
1791
|
-
[
|
1943
|
+
[mt, e.visible]
|
1792
1944
|
])
|
1793
1945
|
]),
|
1794
1946
|
_: 3
|
1795
1947
|
}, 8, ["onBeforeLeave"]);
|
1796
1948
|
}
|
1797
|
-
const
|
1798
|
-
(typeof e == "string" ||
|
1949
|
+
const hl = /* @__PURE__ */ ul(cl, [["render", ml]]), Le = /* @__PURE__ */ new WeakMap(), Ne = (e) => {
|
1950
|
+
(typeof e == "string" || O(e)) && (e = {
|
1799
1951
|
message: e
|
1800
1952
|
});
|
1801
|
-
const t =
|
1802
|
-
|
1803
|
-
const n =
|
1804
|
-
let
|
1953
|
+
const t = Se(e.renderTo || "body"), l = document.createElement("div");
|
1954
|
+
Le.has(t) || Le.set(t, []);
|
1955
|
+
const n = Le.get(t);
|
1956
|
+
let o = e.offset || 20;
|
1805
1957
|
n.forEach((u) => {
|
1806
|
-
var
|
1807
|
-
|
1958
|
+
var d;
|
1959
|
+
o += ((d = u.el) == null ? void 0 : d.offsetHeight) + 20;
|
1808
1960
|
});
|
1809
|
-
const
|
1810
|
-
let
|
1811
|
-
|
1961
|
+
const a = e.onClose;
|
1962
|
+
let s = {};
|
1963
|
+
s = { ...e, onClose: () => {
|
1812
1964
|
var m;
|
1813
|
-
const u = n.findIndex((C) => C ===
|
1965
|
+
const u = n.findIndex((C) => C === c);
|
1814
1966
|
if (u < 0) return;
|
1815
|
-
const
|
1967
|
+
const d = ((m = c.el) == null ? void 0 : m.offsetHeight) + 20;
|
1816
1968
|
n.slice(u + 1).forEach((C) => {
|
1817
|
-
var
|
1818
|
-
const
|
1819
|
-
C.component.props.offset =
|
1820
|
-
}), n.splice(u, 1),
|
1969
|
+
var N;
|
1970
|
+
const v = (N = C.component) == null ? void 0 : N.props.offset;
|
1971
|
+
C.component.props.offset = v - d;
|
1972
|
+
}), n.splice(u, 1), a && a(c);
|
1821
1973
|
}, onDestroy: () => {
|
1822
|
-
|
1823
|
-
}, offset:
|
1824
|
-
const
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
1828
|
-
default:
|
1974
|
+
I(null, l);
|
1975
|
+
}, offset: o };
|
1976
|
+
const c = r(
|
1977
|
+
hl,
|
1978
|
+
s,
|
1979
|
+
S(s.message) || O(s.message) ? {
|
1980
|
+
default: S(s.message) ? s.message : () => s.message
|
1829
1981
|
} : null
|
1830
1982
|
);
|
1831
|
-
return
|
1983
|
+
return I(c, l), t.tagName === "BODY" ? c.el.style.position = "fixed" : (t.style.position = "relative", c.el.style.position = "absolute"), t.appendChild(l.firstElementChild), n.push(c), {
|
1832
1984
|
close: () => {
|
1833
|
-
|
1985
|
+
c.component.proxy.handleClose();
|
1834
1986
|
}
|
1835
1987
|
};
|
1836
|
-
},
|
1837
|
-
|
1838
|
-
|
1988
|
+
}, yl = () => {
|
1989
|
+
sl.forEach((e) => {
|
1990
|
+
Ne[e] = (t) => Ye(t) ? Ne({
|
1839
1991
|
type: e,
|
1840
1992
|
...t
|
1841
|
-
}) :
|
1993
|
+
}) : Ne({
|
1842
1994
|
message: t,
|
1843
1995
|
type: e
|
1844
1996
|
});
|
1845
1997
|
});
|
1846
1998
|
};
|
1847
|
-
|
1848
|
-
const
|
1849
|
-
const t =
|
1850
|
-
|
1851
|
-
const n =
|
1852
|
-
let
|
1853
|
-
n.forEach((
|
1999
|
+
yl();
|
2000
|
+
const J = /* @__PURE__ */ new WeakMap(), Cl = (e) => {
|
2001
|
+
const t = Se(e.renderTo || "body"), l = document.createElement("div");
|
2002
|
+
J.get(t) || J.set(t, {}), J.get(t)[e.position] || (J.get(t)[e.position] = []);
|
2003
|
+
const n = J.get(t)[e.position];
|
2004
|
+
let o = e.offset || 20;
|
2005
|
+
n.forEach((y) => {
|
1854
2006
|
var u;
|
1855
|
-
|
2007
|
+
o += ((u = y.el) == null ? void 0 : u.offsetHeight) + 20;
|
1856
2008
|
});
|
1857
|
-
const
|
1858
|
-
|
1859
|
-
const
|
1860
|
-
var
|
1861
|
-
const
|
1862
|
-
if (
|
1863
|
-
const u = ((
|
1864
|
-
n.slice(
|
1865
|
-
var
|
1866
|
-
const C = (
|
2009
|
+
const a = t.tagName === "BODY";
|
2010
|
+
a || (t.style.position = "relative", t.style.overflowX = "hidden");
|
2011
|
+
const s = e.onClose, i = () => {
|
2012
|
+
var d;
|
2013
|
+
const y = n.findIndex((m) => m === c);
|
2014
|
+
if (y < 0) return;
|
2015
|
+
const u = ((d = c.el) == null ? void 0 : d.offsetHeight) + 20;
|
2016
|
+
n.slice(y + 1).forEach((m) => {
|
2017
|
+
var v;
|
2018
|
+
const C = (v = m.component) == null ? void 0 : v.props.offset;
|
1867
2019
|
m.component.props.offset = C - u;
|
1868
|
-
}), n.splice(
|
1869
|
-
},
|
1870
|
-
|
1871
|
-
},
|
1872
|
-
|
2020
|
+
}), n.splice(y, 1), s && s(c);
|
2021
|
+
}, f = () => {
|
2022
|
+
I(null, l);
|
2023
|
+
}, c = r(
|
2024
|
+
Ke,
|
1873
2025
|
{
|
1874
2026
|
message: e.message,
|
1875
2027
|
title: e.title,
|
1876
2028
|
type: e.type,
|
1877
|
-
offset:
|
1878
|
-
renderToBody:
|
2029
|
+
offset: o,
|
2030
|
+
renderToBody: a,
|
1879
2031
|
position: e.position,
|
1880
2032
|
duration: e.duration ?? 3e3,
|
1881
2033
|
showClose: e.showClose ?? !0,
|
1882
2034
|
onClose: i,
|
1883
|
-
onDestroy:
|
2035
|
+
onDestroy: f
|
1884
2036
|
},
|
1885
|
-
|
1886
|
-
default:
|
2037
|
+
S(e.message) || O(e.message) ? {
|
2038
|
+
default: S(e.message) ? e.message : () => e.message
|
1887
2039
|
} : null
|
1888
2040
|
);
|
1889
|
-
|
1890
|
-
},
|
1891
|
-
DANGER: {
|
1892
|
-
// 主题色
|
1893
|
-
color: "#f00",
|
1894
|
-
// 点
|
1895
|
-
point: {
|
1896
|
-
radius: 4,
|
1897
|
-
borderWidth: 2,
|
1898
|
-
borderColor: "#f00",
|
1899
|
-
backgroundColor: "#f00",
|
1900
|
-
opacity: 0.5,
|
1901
|
-
hoverRadius: 6,
|
1902
|
-
hoverColor: "#f00",
|
1903
|
-
hoverBorderWidth: 2,
|
1904
|
-
hoverBorderColor: "#f00",
|
1905
|
-
hoverBackgroundColor: "#f00",
|
1906
|
-
hoverOpacity: 0.1
|
1907
|
-
},
|
1908
|
-
stroke: {
|
1909
|
-
width: 2,
|
1910
|
-
color: "#f00",
|
1911
|
-
opacity: 0.5
|
1912
|
-
},
|
1913
|
-
fill: {
|
1914
|
-
color: "#ffa8a8",
|
1915
|
-
opacity: 0.2
|
1916
|
-
}
|
1917
|
-
},
|
1918
|
-
STRONG: {
|
1919
|
-
// 主题色
|
1920
|
-
color: "#f00",
|
1921
|
-
// 点
|
1922
|
-
point: {
|
1923
|
-
radius: 4,
|
1924
|
-
borderWidth: 2,
|
1925
|
-
borderColor: "#f00",
|
1926
|
-
backgroundColor: "#f00",
|
1927
|
-
opacity: 0.5,
|
1928
|
-
hoverRadius: 6,
|
1929
|
-
hoverColor: "#f00",
|
1930
|
-
hoverBorderWidth: 2,
|
1931
|
-
hoverBorderColor: "#f00",
|
1932
|
-
hoverBackgroundColor: "#f00",
|
1933
|
-
hoverOpacity: 0.5
|
1934
|
-
},
|
1935
|
-
stroke: {
|
1936
|
-
width: 2,
|
1937
|
-
color: "#ff7126",
|
1938
|
-
opacity: 0.8
|
1939
|
-
},
|
1940
|
-
fill: {
|
1941
|
-
color: "#ffdecc",
|
1942
|
-
opacity: 0.5
|
1943
|
-
}
|
1944
|
-
},
|
1945
|
-
WARNING: {
|
1946
|
-
// 主题色
|
1947
|
-
color: "#f00",
|
1948
|
-
// 点
|
1949
|
-
point: {
|
1950
|
-
radius: 4,
|
1951
|
-
borderWidth: 2,
|
1952
|
-
borderColor: "#f00",
|
1953
|
-
backgroundColor: "#f00",
|
1954
|
-
opacity: 0.5,
|
1955
|
-
hoverRadius: 6,
|
1956
|
-
hoverColor: "#f00",
|
1957
|
-
hoverBorderWidth: 2,
|
1958
|
-
hoverBorderColor: "#f00",
|
1959
|
-
hoverBackgroundColor: "#f00",
|
1960
|
-
hoverOpacity: 0.1
|
1961
|
-
},
|
1962
|
-
stroke: {
|
1963
|
-
width: 2,
|
1964
|
-
color: "#ffc703",
|
1965
|
-
opacity: 0.9
|
1966
|
-
},
|
1967
|
-
fill: {
|
1968
|
-
color: "#fff5d3",
|
1969
|
-
opacity: 0.8
|
1970
|
-
}
|
1971
|
-
},
|
1972
|
-
SUCCESS: {
|
1973
|
-
// 主题色
|
1974
|
-
color: "#f00",
|
1975
|
-
// 点
|
1976
|
-
point: {
|
1977
|
-
radius: 4,
|
1978
|
-
borderWidth: 2,
|
1979
|
-
borderColor: "#f00",
|
1980
|
-
backgroundColor: "#f00",
|
1981
|
-
opacity: 0.5,
|
1982
|
-
hoverRadius: 6,
|
1983
|
-
hoverColor: "#f00",
|
1984
|
-
hoverBorderWidth: 2,
|
1985
|
-
hoverBorderColor: "#f00",
|
1986
|
-
hoverBackgroundColor: "#f00",
|
1987
|
-
hoverOpacity: 0.5
|
1988
|
-
},
|
1989
|
-
stroke: {
|
1990
|
-
width: 2,
|
1991
|
-
color: "#25c341",
|
1992
|
-
opacity: 0.9
|
1993
|
-
},
|
1994
|
-
fill: {
|
1995
|
-
color: "#c4e5dc",
|
1996
|
-
opacity: 0.5
|
1997
|
-
}
|
1998
|
-
},
|
1999
|
-
INFO: {
|
2000
|
-
// 主题色
|
2001
|
-
color: "#f00",
|
2002
|
-
// 点
|
2003
|
-
point: {
|
2004
|
-
radius: 4,
|
2005
|
-
borderWidth: 2,
|
2006
|
-
borderColor: "#f00",
|
2007
|
-
backgroundColor: "#f00",
|
2008
|
-
opacity: 0.5,
|
2009
|
-
hoverRadius: 6,
|
2010
|
-
hoverColor: "#f00",
|
2011
|
-
hoverBorderWidth: 2,
|
2012
|
-
hoverBorderColor: "#f00",
|
2013
|
-
hoverBackgroundColor: "#f00",
|
2014
|
-
hoverOpacity: 0.5
|
2015
|
-
},
|
2016
|
-
stroke: {
|
2017
|
-
width: 2,
|
2018
|
-
color: "#363636",
|
2019
|
-
opacity: 0.8
|
2020
|
-
},
|
2021
|
-
fill: {
|
2022
|
-
color: "#686868",
|
2023
|
-
opacity: 0.1
|
2024
|
-
}
|
2025
|
-
},
|
2026
|
-
PRIMARY: {
|
2027
|
-
// 主题色
|
2028
|
-
color: "#f00",
|
2029
|
-
// 点
|
2030
|
-
point: {
|
2031
|
-
radius: 4,
|
2032
|
-
borderWidth: 2,
|
2033
|
-
borderColor: "#f00",
|
2034
|
-
backgroundColor: "#f00",
|
2035
|
-
opacity: 0.5,
|
2036
|
-
hoverRadius: 6,
|
2037
|
-
hoverColor: "#f00",
|
2038
|
-
hoverBorderWidth: 2,
|
2039
|
-
hoverBorderColor: "#f00",
|
2040
|
-
hoverBackgroundColor: "#f00",
|
2041
|
-
hoverOpacity: 0.5
|
2042
|
-
},
|
2043
|
-
stroke: {
|
2044
|
-
width: 2,
|
2045
|
-
color: "#0056ff",
|
2046
|
-
opacity: 0.8
|
2047
|
-
},
|
2048
|
-
fill: {
|
2049
|
-
color: "#dae0ed",
|
2050
|
-
opacity: 0.5
|
2051
|
-
}
|
2052
|
-
}
|
2053
|
-
}, hl = {
|
2041
|
+
I(c, l), n.push(c), t == null || t.appendChild(l.firstChild);
|
2042
|
+
}, xl = {
|
2054
2043
|
install: function(e) {
|
2055
|
-
Object.keys(
|
2056
|
-
const l =
|
2044
|
+
Object.keys(Ie).forEach((t) => {
|
2045
|
+
const l = Ie[t];
|
2057
2046
|
l.install && e.use(l);
|
2058
2047
|
});
|
2059
2048
|
}
|
2060
2049
|
};
|
2061
2050
|
export {
|
2062
|
-
|
2063
|
-
|
2064
|
-
|
2065
|
-
|
2066
|
-
|
2067
|
-
|
2068
|
-
|
2069
|
-
|
2070
|
-
|
2071
|
-
|
2072
|
-
|
2073
|
-
|
2074
|
-
|
2051
|
+
bl as Dialog,
|
2052
|
+
Ne as Message,
|
2053
|
+
Oe as MessageBox,
|
2054
|
+
Cl as Notification,
|
2055
|
+
R as TrendChartTheme,
|
2056
|
+
le as XButton,
|
2057
|
+
Ge as XDialog,
|
2058
|
+
Wt as XMessage,
|
2059
|
+
Ut as XMessageBox,
|
2060
|
+
Kt as XNotification,
|
2061
|
+
Be as XSpace,
|
2062
|
+
il as XTrendChart,
|
2063
|
+
xl as default
|
2075
2064
|
};
|