st-comp 0.0.91 → 0.0.93
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/components.d.ts +0 -12
- package/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +2 -2
- package/es/Dialog.cjs +5 -1
- package/es/Dialog.js +711 -45
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +1 -410
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +91 -92
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +9 -10
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +104 -106
- package/es/Table.cjs +20 -1
- package/es/Table.js +4254 -362
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +1 -2015
- package/es/VirtualTable.cjs +2 -2
- package/es/VirtualTable.js +254 -249
- package/es/base-8aa55db5.js +725 -0
- package/es/base-b187e78f.cjs +9 -0
- package/es/{el-button-93e0ac7c.js → el-button-9476b767.js} +69 -69
- package/es/{el-button-ec16f484.cjs → el-button-ed961332.cjs} +1 -1
- package/es/{el-empty-16ceef82.cjs → el-empty-7adcc7f0.cjs} +1 -1
- package/es/{el-empty-0c85d9b7.js → el-empty-f4c08c01.js} +3 -3
- package/es/{el-scrollbar-9473fd47.cjs → el-scrollbar-586be9bd.cjs} +1 -1
- package/es/{el-scrollbar-e17fad47.js → el-scrollbar-ffb7b9c1.js} +43 -43
- package/es/el-select-a6cf0236.js +1893 -0
- package/es/el-select-eaa79c54.cjs +9 -0
- package/es/el-tag-5a8b728a.cjs +1 -0
- package/es/{el-tag-9493bdff.js → el-tag-7549c103.js} +119 -126
- package/es/{focus-trap-1b2aef75.js → focus-trap-5fc152a0.js} +34 -35
- package/es/focus-trap-ea1e7a19.cjs +1 -0
- package/es/raf-3a2b250a.js +6 -0
- package/es/{raf-c437ab23.cjs → raf-c4bba516.cjs} +1 -1
- package/es/{scroll-a80e1458.cjs → scroll-38e17abc.cjs} +1 -1
- package/es/{scroll-a928a93e.js → scroll-c6e51ef8.js} +5 -5
- package/es/style.css +1 -1
- package/es/use-form-item-bd4b9eeb.js +531 -0
- package/es/use-form-item-c25c7251.cjs +3 -0
- package/es/use-global-config-2d21cd56.js +110 -0
- package/es/use-global-config-bce8cdd8.cjs +1 -0
- package/es/{vnode-85a610a2.cjs → vnode-40f9df3c.cjs} +1 -1
- package/es/{vnode-aa872900.js → vnode-f4b846cb.js} +1 -1
- package/es/zh-cn-a61d484e.cjs +1 -0
- package/es/{zh-cn-d29347f8.js → zh-cn-e36dfbf4.js} +45 -6
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +141 -141
- package/lib/{index-ee45a01a.js → index-4635557b.js} +10896 -10844
- package/lib/{python-1c6a2ac7.js → python-aa056c80.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/FactorWarning/index.vue +268 -202
- package/src/pages/FactorWarning/index.vue +852 -0
- package/es/base-1bc9f12c.js +0 -762
- package/es/base-315cbfab.cjs +0 -9
- package/es/castArray-f42865a2.js +0 -10
- package/es/castArray-f54f6f75.cjs +0 -1
- package/es/config-provider-17c85684.cjs +0 -1
- package/es/config-provider-c8d3957d.js +0 -46
- package/es/el-icon-0ea8fbf8.cjs +0 -1
- package/es/el-icon-4ed993c7.js +0 -1
- package/es/el-input-29806e42.js +0 -543
- package/es/el-input-a8791103.cjs +0 -9
- package/es/el-overlay-53eb27a5.js +0 -678
- package/es/el-overlay-6d0c5cc3.cjs +0 -5
- package/es/el-popover-1d087574.cjs +0 -1
- package/es/el-popover-dd66e2c8.js +0 -133
- package/es/el-radio-group-46e8f574.cjs +0 -12
- package/es/el-radio-group-caebab9d.js +0 -1743
- package/es/el-select-64511731.cjs +0 -1
- package/es/el-select-ac302f3c.js +0 -1360
- package/es/el-table-column-773986c7.cjs +0 -20
- package/es/el-table-column-b8e2141b.js +0 -3795
- package/es/el-tag-a6a4d4ef.cjs +0 -1
- package/es/focus-trap-ea177336.cjs +0 -1
- package/es/raf-6d7e80f4.js +0 -6
- package/es/use-form-item-7924b6c1.cjs +0 -3
- package/es/use-form-item-aeec8499.js +0 -669
- package/es/use-global-config-b07c467a.js +0 -110
- package/es/use-global-config-d02be80b.cjs +0 -1
- package/es/zh-cn-0024c96d.cjs +0 -1
package/es/Dialog.js
CHANGED
|
@@ -1,16 +1,682 @@
|
|
|
1
|
-
import "./base-
|
|
2
|
-
import { z as
|
|
3
|
-
import { E as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./use-
|
|
9
|
-
import "./
|
|
10
|
-
import "./focus-trap-1b2aef75.js";
|
|
11
|
-
import "./scroll-a928a93e.js";
|
|
1
|
+
import { H as fe, f as K, I as Le, N as U, J as De, K as me, L as Te, u as te, a as pe, M as ne, O as Ie, P as Me, Q as Ne, b as oe, d as G, e as Be, _ as ve, R as $e, c as le, q as Ve, S as ae, w as Oe } from "./base-8aa55db5.js";
|
|
2
|
+
import { z as Fe, E as Pe } from "./zh-cn-e36dfbf4.js";
|
|
3
|
+
import { E as Ae } from "./el-button-9476b767.js";
|
|
4
|
+
import { onMounted as he, watchEffect as Re, onBeforeUnmount as ze, isRef as Ye, watch as J, onScopeDispose as xe, defineComponent as A, createVNode as w, renderSlot as b, h as Ue, inject as ie, computed as S, openBlock as M, createElementBlock as q, unref as n, normalizeClass as k, normalizeStyle as se, createElementVNode as P, toDisplayString as He, withCtx as y, createBlock as H, resolveDynamicComponent as We, createCommentVNode as Z, getCurrentInstance as qe, ref as N, nextTick as Xe, useSlots as je, provide as Ke, Teleport as Ge, Transition as Je, withDirectives as Ze, mergeProps as Qe, createSlots as et, vShow as tt, createTextVNode as re } from "vue";
|
|
5
|
+
import { P as X } from "./vnode-f4b846cb.js";
|
|
6
|
+
import { g as ot, E as st, C as nt, a as lt, b as ue } from "./use-form-item-bd4b9eeb.js";
|
|
7
|
+
import { F as at, U as ge, E as it } from "./focus-trap-5fc152a0.js";
|
|
8
|
+
import { u as rt } from "./use-global-config-2d21cd56.js";
|
|
9
|
+
import { g as ut } from "./scroll-c6e51ef8.js";
|
|
12
10
|
import "./index-657047bb.js";
|
|
13
|
-
const
|
|
11
|
+
const ct = (...e) => (t) => {
|
|
12
|
+
e.forEach((s) => {
|
|
13
|
+
fe(s) ? s(t) : s.value = t;
|
|
14
|
+
});
|
|
15
|
+
}, dt = (e, t, s) => {
|
|
16
|
+
let l = {
|
|
17
|
+
offsetX: 0,
|
|
18
|
+
offsetY: 0
|
|
19
|
+
};
|
|
20
|
+
const o = (a) => {
|
|
21
|
+
const c = a.clientX, p = a.clientY, { offsetX: f, offsetY: m } = l, v = e.value.getBoundingClientRect(), d = v.left, C = v.top, $ = v.width, R = v.height, z = document.documentElement.clientWidth, V = document.documentElement.clientHeight, Y = -d + f, O = -C + m, L = z - d - $ + f, D = V - C - R + m, F = (E) => {
|
|
22
|
+
const u = Math.min(Math.max(f + E.clientX - c, Y), L), _ = Math.min(Math.max(m + E.clientY - p, O), D);
|
|
23
|
+
l = {
|
|
24
|
+
offsetX: u,
|
|
25
|
+
offsetY: _
|
|
26
|
+
}, e.value.style.transform = `translate(${K(u)}, ${K(_)})`;
|
|
27
|
+
}, h = () => {
|
|
28
|
+
document.removeEventListener("mousemove", F), document.removeEventListener("mouseup", h);
|
|
29
|
+
};
|
|
30
|
+
document.addEventListener("mousemove", F), document.addEventListener("mouseup", h);
|
|
31
|
+
}, i = () => {
|
|
32
|
+
t.value && e.value && t.value.addEventListener("mousedown", o);
|
|
33
|
+
}, r = () => {
|
|
34
|
+
t.value && e.value && t.value.removeEventListener("mousedown", o);
|
|
35
|
+
};
|
|
36
|
+
he(() => {
|
|
37
|
+
Re(() => {
|
|
38
|
+
s.value ? i() : r();
|
|
39
|
+
});
|
|
40
|
+
}), ze(() => {
|
|
41
|
+
r();
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* @vue/reactivity v3.4.19
|
|
46
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
47
|
+
* @license MIT
|
|
48
|
+
**/
|
|
49
|
+
function ye(e, ...t) {
|
|
50
|
+
console.warn(`[Vue warn] ${e}`, ...t);
|
|
51
|
+
}
|
|
52
|
+
let ft;
|
|
53
|
+
function mt(e, t = ft) {
|
|
54
|
+
t && t.active && t.effects.push(e);
|
|
55
|
+
}
|
|
56
|
+
let x;
|
|
57
|
+
class pt {
|
|
58
|
+
constructor(t, s, l, o) {
|
|
59
|
+
this.fn = t, this.trigger = s, this.scheduler = l, this.active = !0, this.deps = [], this._dirtyLevel = 4, this._trackId = 0, this._runnings = 0, this._shouldSchedule = !1, this._depsLength = 0, mt(this, o);
|
|
60
|
+
}
|
|
61
|
+
get dirty() {
|
|
62
|
+
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
63
|
+
this._dirtyLevel = 1, ht();
|
|
64
|
+
for (let t = 0; t < this._depsLength; t++) {
|
|
65
|
+
const s = this.deps[t];
|
|
66
|
+
if (s.computed && (vt(s.computed), this._dirtyLevel >= 4))
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
this._dirtyLevel === 1 && (this._dirtyLevel = 0), gt();
|
|
70
|
+
}
|
|
71
|
+
return this._dirtyLevel >= 4;
|
|
72
|
+
}
|
|
73
|
+
set dirty(t) {
|
|
74
|
+
this._dirtyLevel = t ? 4 : 0;
|
|
75
|
+
}
|
|
76
|
+
run() {
|
|
77
|
+
if (this._dirtyLevel = 0, !this.active)
|
|
78
|
+
return this.fn();
|
|
79
|
+
let t = B, s = x;
|
|
80
|
+
try {
|
|
81
|
+
return B = !0, x = this, this._runnings++, ce(this), this.fn();
|
|
82
|
+
} finally {
|
|
83
|
+
de(this), this._runnings--, x = s, B = t;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
stop() {
|
|
87
|
+
var t;
|
|
88
|
+
this.active && (ce(this), de(this), (t = this.onStop) == null || t.call(this), this.active = !1);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function vt(e) {
|
|
92
|
+
return e.value;
|
|
93
|
+
}
|
|
94
|
+
function ce(e) {
|
|
95
|
+
e._trackId++, e._depsLength = 0;
|
|
96
|
+
}
|
|
97
|
+
function de(e) {
|
|
98
|
+
if (e.deps.length > e._depsLength) {
|
|
99
|
+
for (let t = e._depsLength; t < e.deps.length; t++)
|
|
100
|
+
_e(e.deps[t], e);
|
|
101
|
+
e.deps.length = e._depsLength;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function _e(e, t) {
|
|
105
|
+
const s = e.get(t);
|
|
106
|
+
s !== void 0 && t._trackId !== s && (e.delete(t), e.size === 0 && e.cleanup());
|
|
107
|
+
}
|
|
108
|
+
let B = !0, Q = 0;
|
|
109
|
+
const Ce = [];
|
|
110
|
+
function ht() {
|
|
111
|
+
Ce.push(B), B = !1;
|
|
112
|
+
}
|
|
113
|
+
function gt() {
|
|
114
|
+
const e = Ce.pop();
|
|
115
|
+
B = e === void 0 ? !0 : e;
|
|
116
|
+
}
|
|
117
|
+
function yt() {
|
|
118
|
+
Q++;
|
|
119
|
+
}
|
|
120
|
+
function _t() {
|
|
121
|
+
for (Q--; !Q && ee.length; )
|
|
122
|
+
ee.shift()();
|
|
123
|
+
}
|
|
124
|
+
function Ct(e, t, s) {
|
|
125
|
+
var l;
|
|
126
|
+
if (t.get(e) !== e._trackId) {
|
|
127
|
+
t.set(e, e._trackId);
|
|
128
|
+
const o = e.deps[e._depsLength];
|
|
129
|
+
o !== t ? (o && _e(o, e), e.deps[e._depsLength++] = t) : e._depsLength++, process.env.NODE_ENV !== "production" && ((l = e.onTrack) == null || l.call(e, me({ effect: e }, s)));
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
const ee = [];
|
|
133
|
+
function bt(e, t, s) {
|
|
134
|
+
var l;
|
|
135
|
+
yt();
|
|
136
|
+
for (const o of e.keys()) {
|
|
137
|
+
let i;
|
|
138
|
+
o._dirtyLevel < t && (i ?? (i = e.get(o) === o._trackId)) && (o._shouldSchedule || (o._shouldSchedule = o._dirtyLevel === 0), o._dirtyLevel = t), o._shouldSchedule && (i ?? (i = e.get(o) === o._trackId)) && (process.env.NODE_ENV !== "production" && ((l = o.onTrigger) == null || l.call(o, me({ effect: o }, s))), o.trigger(), (!o._runnings || o.allowRecurse) && o._dirtyLevel !== 2 && (o._shouldSchedule = !1, o.scheduler && ee.push(o.scheduler)));
|
|
139
|
+
}
|
|
140
|
+
_t();
|
|
141
|
+
}
|
|
142
|
+
const Et = (e, t) => {
|
|
143
|
+
const s = /* @__PURE__ */ new Map();
|
|
144
|
+
return s.cleanup = e, s.computed = t, s;
|
|
145
|
+
};
|
|
146
|
+
Symbol(process.env.NODE_ENV !== "production" ? "iterate" : "");
|
|
147
|
+
Symbol(process.env.NODE_ENV !== "production" ? "Map key iterate" : "");
|
|
148
|
+
new Set(
|
|
149
|
+
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(Le)
|
|
150
|
+
);
|
|
151
|
+
function W(e) {
|
|
152
|
+
const t = e && e.__v_raw;
|
|
153
|
+
return t ? W(t) : e;
|
|
154
|
+
}
|
|
155
|
+
const kt = "Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free";
|
|
156
|
+
class be {
|
|
157
|
+
constructor(t, s, l, o) {
|
|
158
|
+
this._setter = s, this.dep = void 0, this.__v_isRef = !0, this.__v_isReadonly = !1, this.effect = new pt(
|
|
159
|
+
() => t(this._value),
|
|
160
|
+
() => j(
|
|
161
|
+
this,
|
|
162
|
+
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
163
|
+
)
|
|
164
|
+
), this.effect.computed = this, this.effect.active = this._cacheable = !o, this.__v_isReadonly = l;
|
|
165
|
+
}
|
|
166
|
+
get value() {
|
|
167
|
+
const t = W(this);
|
|
168
|
+
return (!t._cacheable || t.effect.dirty) && De(t._value, t._value = t.effect.run()) && j(t, 4), St(t), t.effect._dirtyLevel >= 2 && (process.env.NODE_ENV !== "production" && ye(kt), j(t, 2)), t._value;
|
|
169
|
+
}
|
|
170
|
+
set value(t) {
|
|
171
|
+
this._setter(t);
|
|
172
|
+
}
|
|
173
|
+
// #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x
|
|
174
|
+
get _dirty() {
|
|
175
|
+
return this.effect.dirty;
|
|
176
|
+
}
|
|
177
|
+
set _dirty(t) {
|
|
178
|
+
this.effect.dirty = t;
|
|
179
|
+
}
|
|
180
|
+
// #endregion
|
|
181
|
+
}
|
|
182
|
+
function wt(e, t, s = !1) {
|
|
183
|
+
let l, o;
|
|
184
|
+
const i = fe(e);
|
|
185
|
+
i ? (l = e, o = process.env.NODE_ENV !== "production" ? () => {
|
|
186
|
+
ye("Write operation failed: computed value is readonly");
|
|
187
|
+
} : U) : (l = e.get, o = e.set);
|
|
188
|
+
const r = new be(l, o, i || !o, s);
|
|
189
|
+
return process.env.NODE_ENV !== "production" && t && !s && (r.effect.onTrack = t.onTrack, r.effect.onTrigger = t.onTrigger), r;
|
|
190
|
+
}
|
|
191
|
+
function St(e) {
|
|
192
|
+
var t;
|
|
193
|
+
B && x && (e = W(e), Ct(
|
|
194
|
+
x,
|
|
195
|
+
(t = e.dep) != null ? t : e.dep = Et(
|
|
196
|
+
() => e.dep = void 0,
|
|
197
|
+
e instanceof be ? e : void 0
|
|
198
|
+
),
|
|
199
|
+
process.env.NODE_ENV !== "production" ? {
|
|
200
|
+
target: e,
|
|
201
|
+
type: "get",
|
|
202
|
+
key: "value"
|
|
203
|
+
} : void 0
|
|
204
|
+
));
|
|
205
|
+
}
|
|
206
|
+
function j(e, t = 4, s) {
|
|
207
|
+
e = W(e);
|
|
208
|
+
const l = e.dep;
|
|
209
|
+
l && bt(
|
|
210
|
+
l,
|
|
211
|
+
t,
|
|
212
|
+
process.env.NODE_ENV !== "production" ? {
|
|
213
|
+
target: e,
|
|
214
|
+
type: "set",
|
|
215
|
+
key: "value",
|
|
216
|
+
newValue: s
|
|
217
|
+
} : void 0
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
const Lt = (e, t = {}) => {
|
|
221
|
+
Ye(e) || Te("[useLockscreen]", "You need to pass a ref param to this function");
|
|
222
|
+
const s = t.ns || te("popup"), l = wt(() => s.bm("parent", "hidden"));
|
|
223
|
+
if (!pe || ne(document.body, l.value))
|
|
224
|
+
return;
|
|
225
|
+
let o = 0, i = !1, r = "0";
|
|
226
|
+
const a = () => {
|
|
227
|
+
setTimeout(() => {
|
|
228
|
+
Ne(document == null ? void 0 : document.body, l.value), i && document && (document.body.style.width = r);
|
|
229
|
+
}, 200);
|
|
230
|
+
};
|
|
231
|
+
J(e, (c) => {
|
|
232
|
+
if (!c) {
|
|
233
|
+
a();
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
i = !ne(document.body, l.value), i && (r = document.body.style.width), o = ut(s.namespace.value);
|
|
237
|
+
const p = document.documentElement.clientHeight < document.body.scrollHeight, f = Ie(document.body, "overflowY");
|
|
238
|
+
o > 0 && (p || f === "scroll") && i && (document.body.style.width = `calc(100% - ${o}px)`), Me(document.body, l.value);
|
|
239
|
+
}), xe(() => a());
|
|
240
|
+
}, Ee = (e) => {
|
|
241
|
+
if (!e)
|
|
242
|
+
return { onClick: U, onMousedown: U, onMouseup: U };
|
|
243
|
+
let t = !1, s = !1;
|
|
244
|
+
return { onClick: (r) => {
|
|
245
|
+
t && s && e(r), t = s = !1;
|
|
246
|
+
}, onMousedown: (r) => {
|
|
247
|
+
t = r.target === r.currentTarget;
|
|
248
|
+
}, onMouseup: (r) => {
|
|
249
|
+
s = r.target === r.currentTarget;
|
|
250
|
+
} };
|
|
251
|
+
}, Dt = oe({
|
|
252
|
+
mask: {
|
|
253
|
+
type: Boolean,
|
|
254
|
+
default: !0
|
|
255
|
+
},
|
|
256
|
+
customMaskEvent: {
|
|
257
|
+
type: Boolean,
|
|
258
|
+
default: !1
|
|
259
|
+
},
|
|
260
|
+
overlayClass: {
|
|
261
|
+
type: G([
|
|
262
|
+
String,
|
|
263
|
+
Array,
|
|
264
|
+
Object
|
|
265
|
+
])
|
|
266
|
+
},
|
|
267
|
+
zIndex: {
|
|
268
|
+
type: G([String, Number])
|
|
269
|
+
}
|
|
270
|
+
}), Tt = {
|
|
271
|
+
click: (e) => e instanceof MouseEvent
|
|
272
|
+
}, It = "overlay";
|
|
273
|
+
var Mt = A({
|
|
274
|
+
name: "ElOverlay",
|
|
275
|
+
props: Dt,
|
|
276
|
+
emits: Tt,
|
|
277
|
+
setup(e, { slots: t, emit: s }) {
|
|
278
|
+
const l = te(It), o = (c) => {
|
|
279
|
+
s("click", c);
|
|
280
|
+
}, { onClick: i, onMousedown: r, onMouseup: a } = Ee(e.customMaskEvent ? void 0 : o);
|
|
281
|
+
return () => e.mask ? w("div", {
|
|
282
|
+
class: [l.b(), e.overlayClass],
|
|
283
|
+
style: {
|
|
284
|
+
zIndex: e.zIndex
|
|
285
|
+
},
|
|
286
|
+
onClick: i,
|
|
287
|
+
onMousedown: r,
|
|
288
|
+
onMouseup: a
|
|
289
|
+
}, [b(t, "default")], X.STYLE | X.CLASS | X.PROPS, ["onClick", "onMouseup", "onMousedown"]) : Ue("div", {
|
|
290
|
+
class: e.overlayClass,
|
|
291
|
+
style: {
|
|
292
|
+
zIndex: e.zIndex,
|
|
293
|
+
position: "fixed",
|
|
294
|
+
top: "0px",
|
|
295
|
+
right: "0px",
|
|
296
|
+
bottom: "0px",
|
|
297
|
+
left: "0px"
|
|
298
|
+
}
|
|
299
|
+
}, [b(t, "default")]);
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
const Nt = Mt, ke = Symbol("dialogInjectionKey"), we = oe({
|
|
303
|
+
center: Boolean,
|
|
304
|
+
alignCenter: Boolean,
|
|
305
|
+
closeIcon: {
|
|
306
|
+
type: ot
|
|
307
|
+
},
|
|
308
|
+
customClass: {
|
|
309
|
+
type: String,
|
|
310
|
+
default: ""
|
|
311
|
+
},
|
|
312
|
+
draggable: Boolean,
|
|
313
|
+
fullscreen: Boolean,
|
|
314
|
+
showClose: {
|
|
315
|
+
type: Boolean,
|
|
316
|
+
default: !0
|
|
317
|
+
},
|
|
318
|
+
title: {
|
|
319
|
+
type: String,
|
|
320
|
+
default: ""
|
|
321
|
+
},
|
|
322
|
+
ariaLevel: {
|
|
323
|
+
type: String,
|
|
324
|
+
default: "2"
|
|
325
|
+
}
|
|
326
|
+
}), Bt = {
|
|
327
|
+
close: () => !0
|
|
328
|
+
}, $t = ["aria-level"], Vt = ["aria-label"], Ot = ["id"], Ft = A({ name: "ElDialogContent" }), Pt = /* @__PURE__ */ A({
|
|
329
|
+
...Ft,
|
|
330
|
+
props: we,
|
|
331
|
+
emits: Bt,
|
|
332
|
+
setup(e) {
|
|
333
|
+
const t = e, { t: s } = Be(), { Close: l } = nt, { dialogRef: o, headerRef: i, bodyId: r, ns: a, style: c } = ie(ke), { focusTrapRef: p } = ie(at), f = S(() => [
|
|
334
|
+
a.b(),
|
|
335
|
+
a.is("fullscreen", t.fullscreen),
|
|
336
|
+
a.is("draggable", t.draggable),
|
|
337
|
+
a.is("align-center", t.alignCenter),
|
|
338
|
+
{ [a.m("center")]: t.center },
|
|
339
|
+
t.customClass
|
|
340
|
+
]), m = ct(p, o), v = S(() => t.draggable);
|
|
341
|
+
return dt(o, i, v), (d, C) => (M(), q("div", {
|
|
342
|
+
ref: n(m),
|
|
343
|
+
class: k(n(f)),
|
|
344
|
+
style: se(n(c)),
|
|
345
|
+
tabindex: "-1"
|
|
346
|
+
}, [
|
|
347
|
+
P("header", {
|
|
348
|
+
ref_key: "headerRef",
|
|
349
|
+
ref: i,
|
|
350
|
+
class: k(n(a).e("header"))
|
|
351
|
+
}, [
|
|
352
|
+
b(d.$slots, "header", {}, () => [
|
|
353
|
+
P("span", {
|
|
354
|
+
role: "heading",
|
|
355
|
+
"aria-level": d.ariaLevel,
|
|
356
|
+
class: k(n(a).e("title"))
|
|
357
|
+
}, He(d.title), 11, $t)
|
|
358
|
+
]),
|
|
359
|
+
d.showClose ? (M(), q("button", {
|
|
360
|
+
key: 0,
|
|
361
|
+
"aria-label": n(s)("el.dialog.close"),
|
|
362
|
+
class: k(n(a).e("headerbtn")),
|
|
363
|
+
type: "button",
|
|
364
|
+
onClick: C[0] || (C[0] = ($) => d.$emit("close"))
|
|
365
|
+
}, [
|
|
366
|
+
w(n(st), {
|
|
367
|
+
class: k(n(a).e("close"))
|
|
368
|
+
}, {
|
|
369
|
+
default: y(() => [
|
|
370
|
+
(M(), H(We(d.closeIcon || n(l))))
|
|
371
|
+
]),
|
|
372
|
+
_: 1
|
|
373
|
+
}, 8, ["class"])
|
|
374
|
+
], 10, Vt)) : Z("v-if", !0)
|
|
375
|
+
], 2),
|
|
376
|
+
P("div", {
|
|
377
|
+
id: n(r),
|
|
378
|
+
class: k(n(a).e("body"))
|
|
379
|
+
}, [
|
|
380
|
+
b(d.$slots, "default")
|
|
381
|
+
], 10, Ot),
|
|
382
|
+
d.$slots.footer ? (M(), q("footer", {
|
|
383
|
+
key: 0,
|
|
384
|
+
class: k(n(a).e("footer"))
|
|
385
|
+
}, [
|
|
386
|
+
b(d.$slots, "footer")
|
|
387
|
+
], 2)) : Z("v-if", !0)
|
|
388
|
+
], 6));
|
|
389
|
+
}
|
|
390
|
+
});
|
|
391
|
+
var At = /* @__PURE__ */ ve(Pt, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/dialog/src/dialog-content.vue"]]);
|
|
392
|
+
const Rt = oe({
|
|
393
|
+
...we,
|
|
394
|
+
appendToBody: Boolean,
|
|
395
|
+
beforeClose: {
|
|
396
|
+
type: G(Function)
|
|
397
|
+
},
|
|
398
|
+
destroyOnClose: Boolean,
|
|
399
|
+
closeOnClickModal: {
|
|
400
|
+
type: Boolean,
|
|
401
|
+
default: !0
|
|
402
|
+
},
|
|
403
|
+
closeOnPressEscape: {
|
|
404
|
+
type: Boolean,
|
|
405
|
+
default: !0
|
|
406
|
+
},
|
|
407
|
+
lockScroll: {
|
|
408
|
+
type: Boolean,
|
|
409
|
+
default: !0
|
|
410
|
+
},
|
|
411
|
+
modal: {
|
|
412
|
+
type: Boolean,
|
|
413
|
+
default: !0
|
|
414
|
+
},
|
|
415
|
+
openDelay: {
|
|
416
|
+
type: Number,
|
|
417
|
+
default: 0
|
|
418
|
+
},
|
|
419
|
+
closeDelay: {
|
|
420
|
+
type: Number,
|
|
421
|
+
default: 0
|
|
422
|
+
},
|
|
423
|
+
top: {
|
|
424
|
+
type: String
|
|
425
|
+
},
|
|
426
|
+
modelValue: Boolean,
|
|
427
|
+
modalClass: String,
|
|
428
|
+
width: {
|
|
429
|
+
type: [String, Number]
|
|
430
|
+
},
|
|
431
|
+
zIndex: {
|
|
432
|
+
type: Number
|
|
433
|
+
},
|
|
434
|
+
trapFocus: {
|
|
435
|
+
type: Boolean,
|
|
436
|
+
default: !1
|
|
437
|
+
},
|
|
438
|
+
headerAriaLevel: {
|
|
439
|
+
type: String,
|
|
440
|
+
default: "2"
|
|
441
|
+
}
|
|
442
|
+
}), zt = {
|
|
443
|
+
open: () => !0,
|
|
444
|
+
opened: () => !0,
|
|
445
|
+
close: () => !0,
|
|
446
|
+
closed: () => !0,
|
|
447
|
+
[ge]: (e) => $e(e),
|
|
448
|
+
openAutoFocus: () => !0,
|
|
449
|
+
closeAutoFocus: () => !0
|
|
450
|
+
}, Yt = (e, t) => {
|
|
451
|
+
const l = qe().emit, { nextZIndex: o } = lt();
|
|
452
|
+
let i = "";
|
|
453
|
+
const r = le(), a = le(), c = N(!1), p = N(!1), f = N(!1), m = N(e.zIndex || o());
|
|
454
|
+
let v, d;
|
|
455
|
+
const C = rt("namespace", Ve), $ = S(() => {
|
|
456
|
+
const g = {}, I = `--${C.value}-dialog`;
|
|
457
|
+
return e.fullscreen || (e.top && (g[`${I}-margin-top`] = e.top), e.width && (g[`${I}-width`] = K(e.width))), g;
|
|
458
|
+
}), R = S(() => e.alignCenter ? { display: "flex" } : {});
|
|
459
|
+
function z() {
|
|
460
|
+
l("opened");
|
|
461
|
+
}
|
|
462
|
+
function V() {
|
|
463
|
+
l("closed"), l(ge, !1), e.destroyOnClose && (f.value = !1);
|
|
464
|
+
}
|
|
465
|
+
function Y() {
|
|
466
|
+
l("close");
|
|
467
|
+
}
|
|
468
|
+
function O() {
|
|
469
|
+
d == null || d(), v == null || v(), e.openDelay && e.openDelay > 0 ? { stop: v } = ae(() => h(), e.openDelay) : h();
|
|
470
|
+
}
|
|
471
|
+
function L() {
|
|
472
|
+
v == null || v(), d == null || d(), e.closeDelay && e.closeDelay > 0 ? { stop: d } = ae(() => E(), e.closeDelay) : E();
|
|
473
|
+
}
|
|
474
|
+
function D() {
|
|
475
|
+
function g(I) {
|
|
476
|
+
I || (p.value = !0, c.value = !1);
|
|
477
|
+
}
|
|
478
|
+
e.beforeClose ? e.beforeClose(g) : L();
|
|
479
|
+
}
|
|
480
|
+
function F() {
|
|
481
|
+
e.closeOnClickModal && D();
|
|
482
|
+
}
|
|
483
|
+
function h() {
|
|
484
|
+
pe && (c.value = !0);
|
|
485
|
+
}
|
|
486
|
+
function E() {
|
|
487
|
+
c.value = !1;
|
|
488
|
+
}
|
|
489
|
+
function u() {
|
|
490
|
+
l("openAutoFocus");
|
|
491
|
+
}
|
|
492
|
+
function _() {
|
|
493
|
+
l("closeAutoFocus");
|
|
494
|
+
}
|
|
495
|
+
function T(g) {
|
|
496
|
+
var I;
|
|
497
|
+
((I = g.detail) == null ? void 0 : I.focusReason) === "pointer" && g.preventDefault();
|
|
498
|
+
}
|
|
499
|
+
e.lockScroll && Lt(c);
|
|
500
|
+
function Se() {
|
|
501
|
+
e.closeOnPressEscape && D();
|
|
502
|
+
}
|
|
503
|
+
return J(() => e.modelValue, (g) => {
|
|
504
|
+
g ? (p.value = !1, O(), f.value = !0, m.value = e.zIndex ? m.value++ : o(), Xe(() => {
|
|
505
|
+
l("open"), t.value && (t.value.scrollTop = 0);
|
|
506
|
+
})) : c.value && L();
|
|
507
|
+
}), J(() => e.fullscreen, (g) => {
|
|
508
|
+
t.value && (g ? (i = t.value.style.transform, t.value.style.transform = "") : t.value.style.transform = i);
|
|
509
|
+
}), he(() => {
|
|
510
|
+
e.modelValue && (c.value = !0, f.value = !0, O());
|
|
511
|
+
}), {
|
|
512
|
+
afterEnter: z,
|
|
513
|
+
afterLeave: V,
|
|
514
|
+
beforeLeave: Y,
|
|
515
|
+
handleClose: D,
|
|
516
|
+
onModalClick: F,
|
|
517
|
+
close: L,
|
|
518
|
+
doClose: E,
|
|
519
|
+
onOpenAutoFocus: u,
|
|
520
|
+
onCloseAutoFocus: _,
|
|
521
|
+
onCloseRequested: Se,
|
|
522
|
+
onFocusoutPrevented: T,
|
|
523
|
+
titleId: r,
|
|
524
|
+
bodyId: a,
|
|
525
|
+
closed: p,
|
|
526
|
+
style: $,
|
|
527
|
+
overlayDialogStyle: R,
|
|
528
|
+
rendered: f,
|
|
529
|
+
visible: c,
|
|
530
|
+
zIndex: m
|
|
531
|
+
};
|
|
532
|
+
}, xt = ["aria-label", "aria-labelledby", "aria-describedby"], Ut = A({
|
|
533
|
+
name: "ElDialog",
|
|
534
|
+
inheritAttrs: !1
|
|
535
|
+
}), Ht = /* @__PURE__ */ A({
|
|
536
|
+
...Ut,
|
|
537
|
+
props: Rt,
|
|
538
|
+
emits: zt,
|
|
539
|
+
setup(e, { expose: t }) {
|
|
540
|
+
const s = e, l = je();
|
|
541
|
+
ue({
|
|
542
|
+
scope: "el-dialog",
|
|
543
|
+
from: "the title slot",
|
|
544
|
+
replacement: "the header slot",
|
|
545
|
+
version: "3.0.0",
|
|
546
|
+
ref: "https://element-plus.org/en-US/component/dialog.html#slots"
|
|
547
|
+
}, S(() => !!l.title)), ue({
|
|
548
|
+
scope: "el-dialog",
|
|
549
|
+
from: "custom-class",
|
|
550
|
+
replacement: "class",
|
|
551
|
+
version: "2.3.0",
|
|
552
|
+
ref: "https://element-plus.org/en-US/component/dialog.html#attributes",
|
|
553
|
+
type: "Attribute"
|
|
554
|
+
}, S(() => !!s.customClass));
|
|
555
|
+
const o = te("dialog"), i = N(), r = N(), a = N(), {
|
|
556
|
+
visible: c,
|
|
557
|
+
titleId: p,
|
|
558
|
+
bodyId: f,
|
|
559
|
+
style: m,
|
|
560
|
+
overlayDialogStyle: v,
|
|
561
|
+
rendered: d,
|
|
562
|
+
zIndex: C,
|
|
563
|
+
afterEnter: $,
|
|
564
|
+
afterLeave: R,
|
|
565
|
+
beforeLeave: z,
|
|
566
|
+
handleClose: V,
|
|
567
|
+
onModalClick: Y,
|
|
568
|
+
onOpenAutoFocus: O,
|
|
569
|
+
onCloseAutoFocus: L,
|
|
570
|
+
onCloseRequested: D,
|
|
571
|
+
onFocusoutPrevented: F
|
|
572
|
+
} = Yt(s, i);
|
|
573
|
+
Ke(ke, {
|
|
574
|
+
dialogRef: i,
|
|
575
|
+
headerRef: r,
|
|
576
|
+
bodyId: f,
|
|
577
|
+
ns: o,
|
|
578
|
+
rendered: d,
|
|
579
|
+
style: m
|
|
580
|
+
});
|
|
581
|
+
const h = Ee(Y), E = S(() => s.draggable && !s.fullscreen);
|
|
582
|
+
return t({
|
|
583
|
+
visible: c,
|
|
584
|
+
dialogContentRef: a
|
|
585
|
+
}), (u, _) => (M(), H(Ge, {
|
|
586
|
+
to: "body",
|
|
587
|
+
disabled: !u.appendToBody
|
|
588
|
+
}, [
|
|
589
|
+
w(Je, {
|
|
590
|
+
name: "dialog-fade",
|
|
591
|
+
onAfterEnter: n($),
|
|
592
|
+
onAfterLeave: n(R),
|
|
593
|
+
onBeforeLeave: n(z),
|
|
594
|
+
persisted: ""
|
|
595
|
+
}, {
|
|
596
|
+
default: y(() => [
|
|
597
|
+
Ze(w(n(Nt), {
|
|
598
|
+
"custom-mask-event": "",
|
|
599
|
+
mask: u.modal,
|
|
600
|
+
"overlay-class": u.modalClass,
|
|
601
|
+
"z-index": n(C)
|
|
602
|
+
}, {
|
|
603
|
+
default: y(() => [
|
|
604
|
+
P("div", {
|
|
605
|
+
role: "dialog",
|
|
606
|
+
"aria-modal": "true",
|
|
607
|
+
"aria-label": u.title || void 0,
|
|
608
|
+
"aria-labelledby": u.title ? void 0 : n(p),
|
|
609
|
+
"aria-describedby": n(f),
|
|
610
|
+
class: k(`${n(o).namespace.value}-overlay-dialog`),
|
|
611
|
+
style: se(n(v)),
|
|
612
|
+
onClick: _[0] || (_[0] = (...T) => n(h).onClick && n(h).onClick(...T)),
|
|
613
|
+
onMousedown: _[1] || (_[1] = (...T) => n(h).onMousedown && n(h).onMousedown(...T)),
|
|
614
|
+
onMouseup: _[2] || (_[2] = (...T) => n(h).onMouseup && n(h).onMouseup(...T))
|
|
615
|
+
}, [
|
|
616
|
+
w(n(it), {
|
|
617
|
+
loop: "",
|
|
618
|
+
trapped: n(c),
|
|
619
|
+
"focus-start-el": "container",
|
|
620
|
+
onFocusAfterTrapped: n(O),
|
|
621
|
+
onFocusAfterReleased: n(L),
|
|
622
|
+
onFocusoutPrevented: n(F),
|
|
623
|
+
onReleaseRequested: n(D)
|
|
624
|
+
}, {
|
|
625
|
+
default: y(() => [
|
|
626
|
+
n(d) ? (M(), H(At, Qe({
|
|
627
|
+
key: 0,
|
|
628
|
+
ref_key: "dialogContentRef",
|
|
629
|
+
ref: a
|
|
630
|
+
}, u.$attrs, {
|
|
631
|
+
"custom-class": u.customClass,
|
|
632
|
+
center: u.center,
|
|
633
|
+
"align-center": u.alignCenter,
|
|
634
|
+
"close-icon": u.closeIcon,
|
|
635
|
+
draggable: n(E),
|
|
636
|
+
fullscreen: u.fullscreen,
|
|
637
|
+
"show-close": u.showClose,
|
|
638
|
+
title: u.title,
|
|
639
|
+
"aria-level": u.headerAriaLevel,
|
|
640
|
+
onClose: n(V)
|
|
641
|
+
}), et({
|
|
642
|
+
header: y(() => [
|
|
643
|
+
u.$slots.title ? b(u.$slots, "title", { key: 1 }) : b(u.$slots, "header", {
|
|
644
|
+
key: 0,
|
|
645
|
+
close: n(V),
|
|
646
|
+
titleId: n(p),
|
|
647
|
+
titleClass: n(o).e("title")
|
|
648
|
+
})
|
|
649
|
+
]),
|
|
650
|
+
default: y(() => [
|
|
651
|
+
b(u.$slots, "default")
|
|
652
|
+
]),
|
|
653
|
+
_: 2
|
|
654
|
+
}, [
|
|
655
|
+
u.$slots.footer ? {
|
|
656
|
+
name: "footer",
|
|
657
|
+
fn: y(() => [
|
|
658
|
+
b(u.$slots, "footer")
|
|
659
|
+
])
|
|
660
|
+
} : void 0
|
|
661
|
+
]), 1040, ["custom-class", "center", "align-center", "close-icon", "draggable", "fullscreen", "show-close", "title", "aria-level", "onClose"])) : Z("v-if", !0)
|
|
662
|
+
]),
|
|
663
|
+
_: 3
|
|
664
|
+
}, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
|
|
665
|
+
], 46, xt)
|
|
666
|
+
]),
|
|
667
|
+
_: 3
|
|
668
|
+
}, 8, ["mask", "overlay-class", "z-index"]), [
|
|
669
|
+
[tt, n(c)]
|
|
670
|
+
])
|
|
671
|
+
]),
|
|
672
|
+
_: 3
|
|
673
|
+
}, 8, ["onAfterEnter", "onAfterLeave", "onBeforeLeave"])
|
|
674
|
+
], 8, ["disabled"]));
|
|
675
|
+
}
|
|
676
|
+
});
|
|
677
|
+
var Wt = /* @__PURE__ */ ve(Ht, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/dialog/src/dialog.vue"]]);
|
|
678
|
+
const qt = Oe(Wt);
|
|
679
|
+
const Xt = /* @__PURE__ */ P("span", null, "This is a message", -1), jt = { class: "dialog-footer" }, Kt = /* @__PURE__ */ A({
|
|
14
680
|
__name: "index",
|
|
15
681
|
props: {
|
|
16
682
|
modelValue: {
|
|
@@ -27,52 +693,52 @@ const z = /* @__PURE__ */ d("span", null, "This is a message", -1), N = { class:
|
|
|
27
693
|
}
|
|
28
694
|
},
|
|
29
695
|
emits: ["update:modelValue"],
|
|
30
|
-
setup(
|
|
31
|
-
const
|
|
696
|
+
setup(e, { emit: t }) {
|
|
697
|
+
const s = t, l = e, o = S({
|
|
32
698
|
get() {
|
|
33
|
-
return
|
|
699
|
+
return l.modelValue;
|
|
34
700
|
},
|
|
35
|
-
set(
|
|
36
|
-
|
|
701
|
+
set(r) {
|
|
702
|
+
s("update:modelValue", r);
|
|
37
703
|
}
|
|
38
|
-
}),
|
|
39
|
-
|
|
704
|
+
}), i = (r) => {
|
|
705
|
+
s("update:modelValue", !1);
|
|
40
706
|
};
|
|
41
|
-
return (
|
|
42
|
-
const
|
|
43
|
-
return
|
|
44
|
-
default:
|
|
45
|
-
|
|
46
|
-
modelValue:
|
|
47
|
-
"onUpdate:modelValue":
|
|
48
|
-
title:
|
|
707
|
+
return (r, a) => {
|
|
708
|
+
const c = Ae, p = qt, f = Pe;
|
|
709
|
+
return M(), H(f, { locale: n(Fe) }, {
|
|
710
|
+
default: y(() => [
|
|
711
|
+
w(p, {
|
|
712
|
+
modelValue: o.value,
|
|
713
|
+
"onUpdate:modelValue": a[2] || (a[2] = (m) => o.value = m),
|
|
714
|
+
title: e.title,
|
|
49
715
|
width: "30%",
|
|
50
|
-
"before-close":
|
|
51
|
-
style:
|
|
716
|
+
"before-close": i,
|
|
717
|
+
style: se(e.style)
|
|
52
718
|
}, {
|
|
53
|
-
footer:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
onClick:
|
|
719
|
+
footer: y(() => [
|
|
720
|
+
P("span", jt, [
|
|
721
|
+
w(c, {
|
|
722
|
+
onClick: a[0] || (a[0] = (m) => o.value = !1)
|
|
57
723
|
}, {
|
|
58
|
-
default:
|
|
59
|
-
|
|
724
|
+
default: y(() => [
|
|
725
|
+
re("Cancel")
|
|
60
726
|
]),
|
|
61
727
|
_: 1
|
|
62
728
|
}),
|
|
63
|
-
|
|
729
|
+
w(c, {
|
|
64
730
|
type: "primary",
|
|
65
|
-
onClick:
|
|
731
|
+
onClick: a[1] || (a[1] = (m) => o.value = !1)
|
|
66
732
|
}, {
|
|
67
|
-
default:
|
|
68
|
-
|
|
733
|
+
default: y(() => [
|
|
734
|
+
re(" Confirm ")
|
|
69
735
|
]),
|
|
70
736
|
_: 1
|
|
71
737
|
})
|
|
72
738
|
])
|
|
73
739
|
]),
|
|
74
|
-
default:
|
|
75
|
-
|
|
740
|
+
default: y(() => [
|
|
741
|
+
Xt
|
|
76
742
|
]),
|
|
77
743
|
_: 1
|
|
78
744
|
}, 8, ["modelValue", "title", "style"])
|
|
@@ -81,11 +747,11 @@ const z = /* @__PURE__ */ d("span", null, "This is a message", -1), N = { class:
|
|
|
81
747
|
}, 8, ["locale"]);
|
|
82
748
|
};
|
|
83
749
|
}
|
|
84
|
-
}),
|
|
85
|
-
install(
|
|
86
|
-
|
|
750
|
+
}), ao = {
|
|
751
|
+
install(e) {
|
|
752
|
+
e.component("st-dialog", Kt);
|
|
87
753
|
}
|
|
88
754
|
};
|
|
89
755
|
export {
|
|
90
|
-
|
|
756
|
+
ao as default
|
|
91
757
|
};
|