st-comp 0.0.119 → 0.0.120
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/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +2 -2
- package/es/Dialog.cjs +1 -1
- package/es/Dialog.js +11 -11
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +114 -111
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +12 -12
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +11 -11
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +53 -53
- package/es/Pie.cjs +1 -2
- package/es/Pie.js +1 -159
- package/es/Table.cjs +1 -1
- package/es/Table.js +42 -42
- package/es/User.cjs +1 -1
- package/es/User.js +32 -32
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +71 -71
- package/es/VirtualTable.cjs +2 -2
- package/es/VirtualTable.js +10 -10
- package/es/{base-f7877059.js → base-11914420.js} +67 -67
- package/es/{base-ec05f348.cjs → base-b384d332.cjs} +1 -1
- package/es/{castArray-a45823fe.cjs → castArray-21cb8c6a.cjs} +1 -1
- package/es/{castArray-18f43497.js → castArray-63513408.js} +1 -1
- package/es/{config-provider-7cdfca4d.cjs → config-provider-08c54ec3.cjs} +1 -1
- package/es/{config-provider-6479d795.js → config-provider-40502529.js} +3 -3
- package/es/debounce-2ecf2d1f.cjs +1 -0
- package/es/{debounce-2336e546.js → debounce-a57891c6.js} +12 -12
- package/es/{dropdown-9a974876.cjs → dropdown-1de99dc2.cjs} +1 -1
- package/es/{dropdown-46daf582.js → dropdown-4fb49237.js} +4 -4
- package/es/{el-button-196807af.cjs → el-button-d234707c.cjs} +1 -1
- package/es/{el-button-802f579a.js → el-button-f0269eec.js} +18 -18
- package/es/{el-empty-19ea04f4.cjs → el-empty-2d7a61d4.cjs} +1 -1
- package/es/{el-empty-3c5ec277.js → el-empty-d85386ab.js} +5 -5
- package/es/el-form-item-7cf4d392.cjs +12 -0
- package/es/{el-form-item-84099d46.js → el-form-item-a2793eee.js} +43 -43
- package/es/{el-input-fac5b401.js → el-input-c7436eee.js} +63 -63
- package/es/el-input-fd2b3a26.cjs +1 -0
- package/es/{el-overlay-69e9ae49.js → el-overlay-587c0f42.js} +79 -79
- package/es/{el-overlay-891dcc40.cjs → el-overlay-7d8307c8.cjs} +1 -1
- package/es/{el-popover-8735b1fa.cjs → el-popover-129a9692.cjs} +1 -1
- package/es/{el-popover-694ded47.js → el-popover-7781eefc.js} +20 -20
- package/es/{el-popper-6126b1f6.js → el-popper-242a0eb5.js} +170 -170
- package/es/el-popper-3d8f2656.cjs +1 -0
- package/es/{el-scrollbar-e0493906.js → el-scrollbar-41e6d010.js} +10 -10
- package/es/el-scrollbar-a01fea99.cjs +1 -0
- package/es/el-select-d3f8b31c.cjs +1 -0
- package/es/{el-select-513126a5.js → el-select-f70bb17d.js} +64 -64
- package/es/el-table-column-1319b1ba.cjs +14 -0
- package/es/{el-table-column-3c920bdd.js → el-table-column-d6952a3d.js} +73 -73
- package/es/{el-tag-5becabc9.js → el-tag-33526075.js} +68 -68
- package/es/{el-tag-3b03d13e.cjs → el-tag-6d45f0b2.cjs} +1 -1
- package/es/{index-048dca7e.js → index-20c6f535.js} +1 -1
- package/es/{index-80a2b137.cjs → index-2d697ae8.cjs} +1 -1
- package/es/{index-7e40be25.js → index-7ee24173.js} +18 -18
- package/es/index-bdc8ae3f.js +81 -0
- package/es/{index-8a0b1c53.cjs → index-cb665c76.cjs} +1 -1
- package/es/{index-e1e83173.cjs → index-e0fa2f71.cjs} +1 -1
- package/es/{raf-07da7cdf.js → raf-862dc8b5.js} +1 -1
- package/es/{raf-8fc301fd.cjs → raf-930895a1.cjs} +1 -1
- package/es/{refs-d00b710b.cjs → refs-4b61ff18.cjs} +1 -1
- package/es/refs-e2671b32.js +9 -0
- package/es/{scroll-41224831.cjs → scroll-495227b0.cjs} +1 -1
- package/es/{scroll-3b521d81.js → scroll-c4e30037.js} +1 -1
- package/es/style.css +1 -1
- package/es/{use-form-common-props-1b84d8f4.cjs → use-form-common-props-41091f5f.cjs} +2 -2
- package/es/{use-form-common-props-f3a520d0.js → use-form-common-props-422d25a5.js} +70 -70
- package/es/{vnode-25d7c2f5.js → vnode-029f1740.js} +1 -1
- package/es/{vnode-7fbc61e1.cjs → vnode-44ebae3f.cjs} +1 -1
- package/es/{zh-cn-ab9a583d.cjs → zh-cn-44d71e6d.cjs} +1 -1
- package/es/{zh-cn-74781bbd.js → zh-cn-4659cb4f.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +1 -1
- package/lib/{index-824e4fa8.js → index-b77b391d.js} +7 -4
- package/lib/{python-d78b6dc4.js → python-7a6d9a11.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/FactorWarning/index.vue +4 -1
- package/es/debounce-b2ff12bd.cjs +0 -1
- package/es/el-form-item-c39f717e.cjs +0 -12
- package/es/el-input-6c6f5bda.cjs +0 -1
- package/es/el-popper-f62316cd.cjs +0 -1
- package/es/el-scrollbar-d1c3e7f7.cjs +0 -1
- package/es/el-select-928f8c19.cjs +0 -1
- package/es/el-table-column-dd8b62aa.cjs +0 -14
- package/es/index-35117549.js +0 -81
- package/es/refs-1b1fe6ca.js +0 -9
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as X, createVNode as R, renderSlot as b, h as de, onMounted as te, watchEffect as fe, onBeforeUnmount as me, inject as Q, computed as k, openBlock as N, createElementBlock as
|
|
2
|
-
import { N as
|
|
3
|
-
import { P as W } from "./vnode-
|
|
4
|
-
import { F as $e, i as Ne, b as ze, a as Ye } from "./index-
|
|
5
|
-
import {
|
|
6
|
-
import { c as
|
|
1
|
+
import { defineComponent as X, createVNode as R, renderSlot as b, h as de, onMounted as te, watchEffect as fe, onBeforeUnmount as me, inject as Q, computed as k, openBlock as N, createElementBlock as V, unref as o, normalizeClass as w, normalizeStyle as le, createElementVNode as H, toDisplayString as ve, withCtx as E, createBlock as j, resolveDynamicComponent as ye, createCommentVNode as q, isRef as pe, watch as Z, onScopeDispose as ge, getCurrentInstance as Ce, ref as A, nextTick as be, useSlots as he, provide as we, Transition as Ee, withDirectives as ke, mergeProps as Se, createSlots as Me, vShow as Te } from "vue";
|
|
2
|
+
import { N as K, d as J, e as U, l as _, m as G, u as Ie, _ as ne, I as Le, R as Be, b as se, S as x, M as De, L as Pe, K as Ae, o as ee, A as Oe, T as oe, w as Fe } from "./base-11914420.js";
|
|
3
|
+
import { P as W } from "./vnode-029f1740.js";
|
|
4
|
+
import { F as $e, i as Ne, b as ze, a as Ye } from "./index-20c6f535.js";
|
|
5
|
+
import { i as Re, E as Xe, C as He, c as Ue } from "./use-form-common-props-422d25a5.js";
|
|
6
|
+
import { c as Ve } from "./refs-e2671b32.js";
|
|
7
7
|
import { U as ae } from "./event-09e37cc8.js";
|
|
8
|
-
import { g as
|
|
9
|
-
import {
|
|
8
|
+
import { g as Ke } from "./scroll-c4e30037.js";
|
|
9
|
+
import { a as We, u as je } from "./index-bdc8ae3f.js";
|
|
10
10
|
const re = (e) => {
|
|
11
11
|
if (!e)
|
|
12
|
-
return { onClick:
|
|
12
|
+
return { onClick: K, onMousedown: K, onMouseup: K };
|
|
13
13
|
let l = !1, n = !1;
|
|
14
14
|
return { onClick: (r) => {
|
|
15
15
|
l && n && e(r), l = n = !1;
|
|
@@ -25,14 +25,14 @@ const re = (e) => {
|
|
|
25
25
|
},
|
|
26
26
|
customMaskEvent: Boolean,
|
|
27
27
|
overlayClass: {
|
|
28
|
-
type:
|
|
28
|
+
type: U([
|
|
29
29
|
String,
|
|
30
30
|
Array,
|
|
31
31
|
Object
|
|
32
32
|
])
|
|
33
33
|
},
|
|
34
34
|
zIndex: {
|
|
35
|
-
type:
|
|
35
|
+
type: U([String, Number])
|
|
36
36
|
}
|
|
37
37
|
}), Ze = {
|
|
38
38
|
click: (e) => e instanceof MouseEvent
|
|
@@ -44,13 +44,13 @@ var Je = X({
|
|
|
44
44
|
setup(e, { slots: l, emit: n }) {
|
|
45
45
|
const d = _(Ge), s = (a) => {
|
|
46
46
|
n("click", a);
|
|
47
|
-
}, { onClick:
|
|
47
|
+
}, { onClick: u, onMousedown: r, onMouseup: f } = re(e.customMaskEvent ? void 0 : s);
|
|
48
48
|
return () => e.mask ? R("div", {
|
|
49
49
|
class: [d.b(), e.overlayClass],
|
|
50
50
|
style: {
|
|
51
51
|
zIndex: e.zIndex
|
|
52
52
|
},
|
|
53
|
-
onClick:
|
|
53
|
+
onClick: u,
|
|
54
54
|
onMousedown: r,
|
|
55
55
|
onMouseup: f
|
|
56
56
|
}, [b(l, "default")], W.STYLE | W.CLASS | W.PROPS, ["onClick", "onMouseup", "onMousedown"]) : de("div", {
|
|
@@ -66,7 +66,7 @@ var Je = X({
|
|
|
66
66
|
}, [b(l, "default")]);
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
|
-
const _e = Je, ie = Symbol("dialogInjectionKey"),
|
|
69
|
+
const _e = Je, ie = Symbol("dialogInjectionKey"), ue = J({
|
|
70
70
|
center: Boolean,
|
|
71
71
|
alignCenter: Boolean,
|
|
72
72
|
closeIcon: {
|
|
@@ -97,21 +97,21 @@ const _e = Je, ie = Symbol("dialogInjectionKey"), ce = J({
|
|
|
97
97
|
offsetX: 0,
|
|
98
98
|
offsetY: 0
|
|
99
99
|
};
|
|
100
|
-
const
|
|
101
|
-
const y =
|
|
102
|
-
let
|
|
103
|
-
d != null && d.value || (
|
|
104
|
-
offsetX:
|
|
100
|
+
const u = (c) => {
|
|
101
|
+
const y = c.clientX, C = c.clientY, { offsetX: g, offsetY: m } = s, v = e.value.getBoundingClientRect(), h = v.left, i = v.top, O = v.width, S = v.height, z = document.documentElement.clientWidth, Y = document.documentElement.clientHeight, F = -h + g, M = -i + m, T = z - h - O + g, I = Y - i - S + m, L = (t) => {
|
|
102
|
+
let D = g + t.clientX - y, $ = m + t.clientY - C;
|
|
103
|
+
d != null && d.value || (D = Math.min(Math.max(D, F), T), $ = Math.min(Math.max($, M), I)), s = {
|
|
104
|
+
offsetX: D,
|
|
105
105
|
offsetY: $
|
|
106
|
-
}, e.value && (e.value.style.transform = `translate(${G(
|
|
106
|
+
}, e.value && (e.value.style.transform = `translate(${G(D)}, ${G($)})`);
|
|
107
107
|
}, B = () => {
|
|
108
|
-
document.removeEventListener("mousemove",
|
|
108
|
+
document.removeEventListener("mousemove", L), document.removeEventListener("mouseup", B);
|
|
109
109
|
};
|
|
110
|
-
document.addEventListener("mousemove",
|
|
110
|
+
document.addEventListener("mousemove", L), document.addEventListener("mouseup", B);
|
|
111
111
|
}, r = () => {
|
|
112
|
-
l.value && e.value && l.value.addEventListener("mousedown",
|
|
112
|
+
l.value && e.value && l.value.addEventListener("mousedown", u);
|
|
113
113
|
}, f = () => {
|
|
114
|
-
l.value && e.value && l.value.removeEventListener("mousedown",
|
|
114
|
+
l.value && e.value && l.value.removeEventListener("mousedown", u);
|
|
115
115
|
}, a = () => {
|
|
116
116
|
s = {
|
|
117
117
|
offsetX: 0,
|
|
@@ -129,37 +129,37 @@ const _e = Je, ie = Symbol("dialogInjectionKey"), ce = J({
|
|
|
129
129
|
};
|
|
130
130
|
}, eo = X({ name: "ElDialogContent" }), oo = /* @__PURE__ */ X({
|
|
131
131
|
...eo,
|
|
132
|
-
props:
|
|
132
|
+
props: ue,
|
|
133
133
|
emits: Qe,
|
|
134
134
|
setup(e, { expose: l }) {
|
|
135
|
-
const n = e, { t: d } =
|
|
135
|
+
const n = e, { t: d } = Ie(), { Close: s } = He, { dialogRef: u, headerRef: r, bodyId: f, ns: a, style: c } = Q(ie), { focusTrapRef: y } = Q($e), C = k(() => [
|
|
136
136
|
a.b(),
|
|
137
137
|
a.is("fullscreen", n.fullscreen),
|
|
138
138
|
a.is("draggable", n.draggable),
|
|
139
139
|
a.is("align-center", n.alignCenter),
|
|
140
140
|
{ [a.m("center")]: n.center }
|
|
141
|
-
]), g =
|
|
141
|
+
]), g = Ve(y, u), m = k(() => n.draggable), v = k(() => n.overflow), { resetPosition: h } = xe(u, r, m, v);
|
|
142
142
|
return l({
|
|
143
143
|
resetPosition: h
|
|
144
|
-
}), (i, O) => (N(),
|
|
144
|
+
}), (i, O) => (N(), V("div", {
|
|
145
145
|
ref: o(g),
|
|
146
146
|
class: w(o(C)),
|
|
147
|
-
style: le(o(
|
|
147
|
+
style: le(o(c)),
|
|
148
148
|
tabindex: "-1"
|
|
149
149
|
}, [
|
|
150
|
-
|
|
150
|
+
H("header", {
|
|
151
151
|
ref_key: "headerRef",
|
|
152
152
|
ref: r,
|
|
153
153
|
class: w([o(a).e("header"), i.headerClass, { "show-close": i.showClose }])
|
|
154
154
|
}, [
|
|
155
155
|
b(i.$slots, "header", {}, () => [
|
|
156
|
-
|
|
156
|
+
H("span", {
|
|
157
157
|
role: "heading",
|
|
158
158
|
"aria-level": i.ariaLevel,
|
|
159
159
|
class: w(o(a).e("title"))
|
|
160
160
|
}, ve(i.title), 11, ["aria-level"])
|
|
161
161
|
]),
|
|
162
|
-
i.showClose ? (N(),
|
|
162
|
+
i.showClose ? (N(), V("button", {
|
|
163
163
|
key: 0,
|
|
164
164
|
"aria-label": o(d)("el.dialog.close"),
|
|
165
165
|
class: w(o(a).e("headerbtn")),
|
|
@@ -170,19 +170,19 @@ const _e = Je, ie = Symbol("dialogInjectionKey"), ce = J({
|
|
|
170
170
|
class: w(o(a).e("close"))
|
|
171
171
|
}, {
|
|
172
172
|
default: E(() => [
|
|
173
|
-
(N(),
|
|
173
|
+
(N(), j(ye(i.closeIcon || o(s))))
|
|
174
174
|
]),
|
|
175
175
|
_: 1
|
|
176
176
|
}, 8, ["class"])
|
|
177
177
|
], 10, ["aria-label", "onClick"])) : q("v-if", !0)
|
|
178
178
|
], 2),
|
|
179
|
-
|
|
179
|
+
H("div", {
|
|
180
180
|
id: o(f),
|
|
181
181
|
class: w([o(a).e("body"), i.bodyClass])
|
|
182
182
|
}, [
|
|
183
183
|
b(i.$slots, "default")
|
|
184
184
|
], 10, ["id"]),
|
|
185
|
-
i.$slots.footer ? (N(),
|
|
185
|
+
i.$slots.footer ? (N(), V("footer", {
|
|
186
186
|
key: 0,
|
|
187
187
|
class: w([o(a).e("footer"), i.footerClass])
|
|
188
188
|
}, [
|
|
@@ -193,14 +193,14 @@ const _e = Je, ie = Symbol("dialogInjectionKey"), ce = J({
|
|
|
193
193
|
});
|
|
194
194
|
var to = /* @__PURE__ */ ne(oo, [["__file", "dialog-content.vue"]]);
|
|
195
195
|
const lo = J({
|
|
196
|
-
...
|
|
196
|
+
...ue,
|
|
197
197
|
appendToBody: Boolean,
|
|
198
198
|
appendTo: {
|
|
199
|
-
type:
|
|
199
|
+
type: U([String, Object]),
|
|
200
200
|
default: "body"
|
|
201
201
|
},
|
|
202
202
|
beforeClose: {
|
|
203
|
-
type:
|
|
203
|
+
type: U(Function)
|
|
204
204
|
},
|
|
205
205
|
destroyOnClose: Boolean,
|
|
206
206
|
closeOnClickModal: {
|
|
@@ -251,7 +251,7 @@ const lo = J({
|
|
|
251
251
|
opened: () => !0,
|
|
252
252
|
close: () => !0,
|
|
253
253
|
closed: () => !0,
|
|
254
|
-
[ae]: (e) =>
|
|
254
|
+
[ae]: (e) => Le(e),
|
|
255
255
|
openAutoFocus: () => !0,
|
|
256
256
|
closeAutoFocus: () => !0
|
|
257
257
|
}, so = (e, l = {}) => {
|
|
@@ -259,10 +259,10 @@ const lo = J({
|
|
|
259
259
|
const n = l.ns || _("popup"), d = k(() => n.bm("parent", "hidden"));
|
|
260
260
|
if (!se || x(document.body, d.value))
|
|
261
261
|
return;
|
|
262
|
-
let s = 0,
|
|
262
|
+
let s = 0, u = !1, r = "0";
|
|
263
263
|
const f = () => {
|
|
264
264
|
setTimeout(() => {
|
|
265
|
-
typeof document > "u" ||
|
|
265
|
+
typeof document > "u" || u && document && (document.body.style.width = r, Ae(document.body, d.value));
|
|
266
266
|
}, 200);
|
|
267
267
|
};
|
|
268
268
|
Z(e, (a) => {
|
|
@@ -270,15 +270,15 @@ const lo = J({
|
|
|
270
270
|
f();
|
|
271
271
|
return;
|
|
272
272
|
}
|
|
273
|
-
|
|
274
|
-
const
|
|
275
|
-
s > 0 && (
|
|
273
|
+
u = !x(document.body, d.value), u && (r = document.body.style.width, De(document.body, d.value)), s = Ke(n.namespace.value);
|
|
274
|
+
const c = document.documentElement.clientHeight < document.body.scrollHeight, y = Pe(document.body, "overflowY");
|
|
275
|
+
s > 0 && (c || y === "scroll") && u && (document.body.style.width = `calc(100% - ${s}px)`);
|
|
276
276
|
}), ge(() => f());
|
|
277
277
|
}, ao = (e, l) => {
|
|
278
278
|
var n;
|
|
279
|
-
const s = Ce().emit, { nextZIndex:
|
|
279
|
+
const s = Ce().emit, { nextZIndex: u } = Ue();
|
|
280
280
|
let r = "";
|
|
281
|
-
const f = ee(), a = ee(),
|
|
281
|
+
const f = ee(), a = ee(), c = A(!1), y = A(!1), C = A(!1), g = A((n = e.zIndex) != null ? n : u());
|
|
282
282
|
let m, v;
|
|
283
283
|
const h = We("namespace", Oe), i = k(() => {
|
|
284
284
|
const p = {}, P = `--${h.value}-dialog`;
|
|
@@ -294,59 +294,59 @@ const lo = J({
|
|
|
294
294
|
s("close");
|
|
295
295
|
}
|
|
296
296
|
function F() {
|
|
297
|
-
v == null || v(), m == null || m(), e.openDelay && e.openDelay > 0 ? { stop: m } = oe(() =>
|
|
297
|
+
v == null || v(), m == null || m(), e.openDelay && e.openDelay > 0 ? { stop: m } = oe(() => L(), e.openDelay) : L();
|
|
298
298
|
}
|
|
299
299
|
function M() {
|
|
300
300
|
m == null || m(), v == null || v(), e.closeDelay && e.closeDelay > 0 ? { stop: v } = oe(() => B(), e.closeDelay) : B();
|
|
301
301
|
}
|
|
302
302
|
function T() {
|
|
303
303
|
function p(P) {
|
|
304
|
-
P || (y.value = !0,
|
|
304
|
+
P || (y.value = !0, c.value = !1);
|
|
305
305
|
}
|
|
306
306
|
e.beforeClose ? e.beforeClose(p) : M();
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function I() {
|
|
309
309
|
e.closeOnClickModal && T();
|
|
310
310
|
}
|
|
311
|
-
function
|
|
312
|
-
se && (
|
|
311
|
+
function L() {
|
|
312
|
+
se && (c.value = !0);
|
|
313
313
|
}
|
|
314
314
|
function B() {
|
|
315
|
-
|
|
315
|
+
c.value = !1;
|
|
316
316
|
}
|
|
317
317
|
function t() {
|
|
318
318
|
s("openAutoFocus");
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function D() {
|
|
321
321
|
s("closeAutoFocus");
|
|
322
322
|
}
|
|
323
323
|
function $(p) {
|
|
324
324
|
var P;
|
|
325
325
|
((P = p.detail) == null ? void 0 : P.focusReason) === "pointer" && p.preventDefault();
|
|
326
326
|
}
|
|
327
|
-
e.lockScroll && so(
|
|
328
|
-
function
|
|
327
|
+
e.lockScroll && so(c);
|
|
328
|
+
function ce() {
|
|
329
329
|
e.closeOnPressEscape && T();
|
|
330
330
|
}
|
|
331
331
|
return Z(() => e.modelValue, (p) => {
|
|
332
|
-
p ? (y.value = !1, F(), C.value = !0, g.value = Ne(e.zIndex) ?
|
|
332
|
+
p ? (y.value = !1, F(), C.value = !0, g.value = Ne(e.zIndex) ? u() : g.value++, be(() => {
|
|
333
333
|
s("open"), l.value && (l.value.parentElement.scrollTop = 0, l.value.parentElement.scrollLeft = 0, l.value.scrollTop = 0);
|
|
334
|
-
})) :
|
|
334
|
+
})) : c.value && M();
|
|
335
335
|
}), Z(() => e.fullscreen, (p) => {
|
|
336
336
|
l.value && (p ? (r = l.value.style.transform, l.value.style.transform = "") : l.value.style.transform = r);
|
|
337
337
|
}), te(() => {
|
|
338
|
-
e.modelValue && (
|
|
338
|
+
e.modelValue && (c.value = !0, C.value = !0, F());
|
|
339
339
|
}), {
|
|
340
340
|
afterEnter: S,
|
|
341
341
|
afterLeave: z,
|
|
342
342
|
beforeLeave: Y,
|
|
343
343
|
handleClose: T,
|
|
344
|
-
onModalClick:
|
|
344
|
+
onModalClick: I,
|
|
345
345
|
close: M,
|
|
346
346
|
doClose: B,
|
|
347
347
|
onOpenAutoFocus: t,
|
|
348
|
-
onCloseAutoFocus:
|
|
349
|
-
onCloseRequested:
|
|
348
|
+
onCloseAutoFocus: D,
|
|
349
|
+
onCloseRequested: ce,
|
|
350
350
|
onFocusoutPrevented: $,
|
|
351
351
|
titleId: f,
|
|
352
352
|
bodyId: a,
|
|
@@ -354,7 +354,7 @@ const lo = J({
|
|
|
354
354
|
style: i,
|
|
355
355
|
overlayDialogStyle: O,
|
|
356
356
|
rendered: C,
|
|
357
|
-
visible:
|
|
357
|
+
visible: c,
|
|
358
358
|
zIndex: g
|
|
359
359
|
};
|
|
360
360
|
}, ro = X({
|
|
@@ -366,16 +366,16 @@ const lo = J({
|
|
|
366
366
|
emits: no,
|
|
367
367
|
setup(e, { expose: l }) {
|
|
368
368
|
const n = e, d = he();
|
|
369
|
-
|
|
369
|
+
je({
|
|
370
370
|
scope: "el-dialog",
|
|
371
371
|
from: "the title slot",
|
|
372
372
|
replacement: "the header slot",
|
|
373
373
|
version: "3.0.0",
|
|
374
374
|
ref: "https://element-plus.org/en-US/component/dialog.html#slots"
|
|
375
375
|
}, k(() => !!d.title));
|
|
376
|
-
const s = _("dialog"),
|
|
376
|
+
const s = _("dialog"), u = A(), r = A(), f = A(), {
|
|
377
377
|
visible: a,
|
|
378
|
-
titleId:
|
|
378
|
+
titleId: c,
|
|
379
379
|
bodyId: y,
|
|
380
380
|
style: C,
|
|
381
381
|
overlayDialogStyle: g,
|
|
@@ -390,16 +390,16 @@ const lo = J({
|
|
|
390
390
|
onCloseAutoFocus: F,
|
|
391
391
|
onCloseRequested: M,
|
|
392
392
|
onFocusoutPrevented: T
|
|
393
|
-
} = ao(n,
|
|
393
|
+
} = ao(n, u);
|
|
394
394
|
we(ie, {
|
|
395
|
-
dialogRef:
|
|
395
|
+
dialogRef: u,
|
|
396
396
|
headerRef: r,
|
|
397
397
|
bodyId: y,
|
|
398
398
|
ns: s,
|
|
399
399
|
rendered: m,
|
|
400
400
|
style: C
|
|
401
401
|
});
|
|
402
|
-
const
|
|
402
|
+
const I = re(z), L = k(() => n.draggable && !n.fullscreen);
|
|
403
403
|
return l({
|
|
404
404
|
visible: a,
|
|
405
405
|
dialogContentRef: f,
|
|
@@ -407,7 +407,7 @@ const lo = J({
|
|
|
407
407
|
var t;
|
|
408
408
|
(t = f.value) == null || t.resetPosition();
|
|
409
409
|
}
|
|
410
|
-
}), (t,
|
|
410
|
+
}), (t, D) => (N(), j(o(ze), {
|
|
411
411
|
to: t.appendTo,
|
|
412
412
|
disabled: t.appendTo !== "body" ? !1 : !t.appendToBody
|
|
413
413
|
}, {
|
|
@@ -427,17 +427,17 @@ const lo = J({
|
|
|
427
427
|
"z-index": o(v)
|
|
428
428
|
}, {
|
|
429
429
|
default: E(() => [
|
|
430
|
-
|
|
430
|
+
H("div", {
|
|
431
431
|
role: "dialog",
|
|
432
432
|
"aria-modal": "true",
|
|
433
433
|
"aria-label": t.title || void 0,
|
|
434
|
-
"aria-labelledby": t.title ? void 0 : o(
|
|
434
|
+
"aria-labelledby": t.title ? void 0 : o(c),
|
|
435
435
|
"aria-describedby": o(y),
|
|
436
436
|
class: w(`${o(s).namespace.value}-overlay-dialog`),
|
|
437
437
|
style: le(o(g)),
|
|
438
|
-
onClick: o(
|
|
439
|
-
onMousedown: o(
|
|
440
|
-
onMouseup: o(
|
|
438
|
+
onClick: o(I).onClick,
|
|
439
|
+
onMousedown: o(I).onMousedown,
|
|
440
|
+
onMouseup: o(I).onMouseup
|
|
441
441
|
}, [
|
|
442
442
|
R(o(Ye), {
|
|
443
443
|
loop: "",
|
|
@@ -449,7 +449,7 @@ const lo = J({
|
|
|
449
449
|
onReleaseRequested: o(M)
|
|
450
450
|
}, {
|
|
451
451
|
default: E(() => [
|
|
452
|
-
o(m) ? (N(),
|
|
452
|
+
o(m) ? (N(), j(to, Se({
|
|
453
453
|
key: 0,
|
|
454
454
|
ref_key: "dialogContentRef",
|
|
455
455
|
ref: f
|
|
@@ -457,7 +457,7 @@ const lo = J({
|
|
|
457
457
|
center: t.center,
|
|
458
458
|
"align-center": t.alignCenter,
|
|
459
459
|
"close-icon": t.closeIcon,
|
|
460
|
-
draggable: o(
|
|
460
|
+
draggable: o(L),
|
|
461
461
|
overflow: t.overflow,
|
|
462
462
|
fullscreen: t.fullscreen,
|
|
463
463
|
"header-class": t.headerClass,
|
|
@@ -472,7 +472,7 @@ const lo = J({
|
|
|
472
472
|
t.$slots.title ? b(t.$slots, "title", { key: 1 }) : b(t.$slots, "header", {
|
|
473
473
|
key: 0,
|
|
474
474
|
close: o(S),
|
|
475
|
-
titleId: o(
|
|
475
|
+
titleId: o(c),
|
|
476
476
|
titleClass: o(s).e("title")
|
|
477
477
|
})
|
|
478
478
|
]),
|
|
@@ -505,8 +505,8 @@ const lo = J({
|
|
|
505
505
|
}, 8, ["to", "disabled"]));
|
|
506
506
|
}
|
|
507
507
|
});
|
|
508
|
-
var
|
|
509
|
-
const ho = Fe(
|
|
508
|
+
var uo = /* @__PURE__ */ ne(io, [["__file", "dialog.vue"]]);
|
|
509
|
+
const ho = Fe(uo);
|
|
510
510
|
export {
|
|
511
511
|
ho as E,
|
|
512
512
|
_e as a,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),t=require("./base-ec05f348.cjs"),$=require("./vnode-7fbc61e1.cjs"),F=require("./index-e1e83173.cjs"),A=require("./use-form-common-props-1b84d8f4.cjs"),W=require("./refs-d00b710b.cjs"),V=require("./event-61f49698.cjs"),x=require("./scroll-41224831.cjs"),q=require("./index-8a0b1c53.cjs"),z=o=>{if(!o)return{onClick:t.NOOP,onMousedown:t.NOOP,onMouseup:t.NOOP};let l=!1,s=!1;return{onClick:i=>{l&&s&&o(i),l=s=!1},onMousedown:i=>{l=i.target===i.currentTarget},onMouseup:i=>{s=i.target===i.currentTarget}}},K=t.buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:t.definePropType([String,Array,Object])},zIndex:{type:t.definePropType([String,Number])}}),_={click:o=>o instanceof MouseEvent},Z="overlay";var G=e.defineComponent({name:"ElOverlay",props:K,emits:_,setup(o,{slots:l,emit:s}){const f=t.useNamespace(Z),a=r=>{s("click",r)},{onClick:c,onMousedown:i,onMouseup:m}=z(o.customMaskEvent?void 0:a);return()=>o.mask?e.createVNode("div",{class:[f.b(),o.overlayClass],style:{zIndex:o.zIndex},onClick:c,onMousedown:i,onMouseup:m},[e.renderSlot(l,"default")],$.PatchFlags.STYLE|$.PatchFlags.CLASS|$.PatchFlags.PROPS,["onClick","onMouseup","onMousedown"]):e.h("div",{class:o.overlayClass,style:{zIndex:o.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[e.renderSlot(l,"default")])}});const Y=G,U=Symbol("dialogInjectionKey"),R=t.buildProps({center:Boolean,alignCenter:Boolean,closeIcon:{type:A.iconPropType},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),J={close:()=>!0},X=(o,l,s,f)=>{let a={offsetX:0,offsetY:0};const c=d=>{const y=d.clientX,h=d.clientY,{offsetX:g,offsetY:v}=a,p=o.value.getBoundingClientRect(),b=p.left,u=p.top,D=p.width,E=p.height,O=document.documentElement.clientWidth,N=document.documentElement.clientHeight,L=-b+g,w=-u+v,k=O-b-D+g,S=N-u-E+v,T=n=>{let P=g+n.clientX-y,I=v+n.clientY-h;f!=null&&f.value||(P=Math.min(Math.max(P,L),k),I=Math.min(Math.max(I,w),S)),a={offsetX:P,offsetY:I},o.value&&(o.value.style.transform=`translate(${t.addUnit(P)}, ${t.addUnit(I)})`)},B=()=>{document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",B)};document.addEventListener("mousemove",T),document.addEventListener("mouseup",B)},i=()=>{l.value&&o.value&&l.value.addEventListener("mousedown",c)},m=()=>{l.value&&o.value&&l.value.removeEventListener("mousedown",c)},r=()=>{a={offsetX:0,offsetY:0},o.value&&(o.value.style.transform="none")};return e.onMounted(()=>{e.watchEffect(()=>{s.value?i():m()})}),e.onBeforeUnmount(()=>{m()}),{resetPosition:r}},Q=e.defineComponent({name:"ElDialogContent"}),ee=e.defineComponent({...Q,props:R,emits:J,setup(o,{expose:l}){const s=o,{t:f}=t.useLocale(),{Close:a}=A.CloseComponents,{dialogRef:c,headerRef:i,bodyId:m,ns:r,style:d}=e.inject(U),{focusTrapRef:y}=e.inject(F.FOCUS_TRAP_INJECTION_KEY),h=e.computed(()=>[r.b(),r.is("fullscreen",s.fullscreen),r.is("draggable",s.draggable),r.is("align-center",s.alignCenter),{[r.m("center")]:s.center}]),g=W.composeRefs(y,c),v=e.computed(()=>s.draggable),p=e.computed(()=>s.overflow),{resetPosition:b}=X(c,i,v,p);return l({resetPosition:b}),(u,D)=>(e.openBlock(),e.createElementBlock("div",{ref:e.unref(g),class:e.normalizeClass(e.unref(h)),style:e.normalizeStyle(e.unref(d)),tabindex:"-1"},[e.createElementVNode("header",{ref_key:"headerRef",ref:i,class:e.normalizeClass([e.unref(r).e("header"),u.headerClass,{"show-close":u.showClose}])},[e.renderSlot(u.$slots,"header",{},()=>[e.createElementVNode("span",{role:"heading","aria-level":u.ariaLevel,class:e.normalizeClass(e.unref(r).e("title"))},e.toDisplayString(u.title),11,["aria-level"])]),u.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":e.unref(f)("el.dialog.close"),class:e.normalizeClass(e.unref(r).e("headerbtn")),type:"button",onClick:E=>u.$emit("close")},[e.createVNode(e.unref(A.ElIcon),{class:e.normalizeClass(e.unref(r).e("close"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.closeIcon||e.unref(a))))]),_:1},8,["class"])],10,["aria-label","onClick"])):e.createCommentVNode("v-if",!0)],2),e.createElementVNode("div",{id:e.unref(m),class:e.normalizeClass([e.unref(r).e("body"),u.bodyClass])},[e.renderSlot(u.$slots,"default")],10,["id"]),u.$slots.footer?(e.openBlock(),e.createElementBlock("footer",{key:0,class:e.normalizeClass([e.unref(r).e("footer"),u.footerClass])},[e.renderSlot(u.$slots,"footer")],2)):e.createCommentVNode("v-if",!0)],6))}});var oe=t._export_sfc(ee,[["__file","dialog-content.vue"]]);const te=t.buildProps({...R,appendToBody:Boolean,appendTo:{type:t.definePropType([String,Object]),default:"body"},beforeClose:{type:t.definePropType(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,headerClass:String,bodyClass:String,footerClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),ne={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[V.UPDATE_MODEL_EVENT]:o=>t.isBoolean(o),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},H=(o,l={})=>{e.isRef(o)||t.throwError("[useLockscreen]","You need to pass a ref param to this function");const s=l.ns||t.useNamespace("popup"),f=e.computed(()=>s.bm("parent","hidden"));if(!t.isClient||t.hasClass(document.body,f.value))return;let a=0,c=!1,i="0";const m=()=>{setTimeout(()=>{typeof document>"u"||c&&document&&(document.body.style.width=i,t.removeClass(document.body,f.value))},200)};e.watch(o,r=>{if(!r){m();return}c=!t.hasClass(document.body,f.value),c&&(i=document.body.style.width,t.addClass(document.body,f.value)),a=x.getScrollBarWidth(s.namespace.value);const d=document.documentElement.clientHeight<document.body.scrollHeight,y=t.getStyle(document.body,"overflowY");a>0&&(d||y==="scroll")&&c&&(document.body.style.width=`calc(100% - ${a}px)`)}),e.onScopeDispose(()=>m())},le=(o,l)=>{var s;const a=e.getCurrentInstance().emit,{nextZIndex:c}=A.useZIndex();let i="";const m=t.useId(),r=t.useId(),d=e.ref(!1),y=e.ref(!1),h=e.ref(!1),g=e.ref((s=o.zIndex)!=null?s:c());let v,p;const b=q.useGlobalConfig("namespace",t.defaultNamespace),u=e.computed(()=>{const C={},M=`--${b.value}-dialog`;return o.fullscreen||(o.top&&(C[`${M}-margin-top`]=o.top),o.width&&(C[`${M}-width`]=t.addUnit(o.width))),C}),D=e.computed(()=>o.alignCenter?{display:"flex"}:{});function E(){a("opened")}function O(){a("closed"),a(V.UPDATE_MODEL_EVENT,!1),o.destroyOnClose&&(h.value=!1)}function N(){a("close")}function L(){p==null||p(),v==null||v(),o.openDelay&&o.openDelay>0?{stop:v}=t.useTimeoutFn(()=>T(),o.openDelay):T()}function w(){v==null||v(),p==null||p(),o.closeDelay&&o.closeDelay>0?{stop:p}=t.useTimeoutFn(()=>B(),o.closeDelay):B()}function k(){function C(M){M||(y.value=!0,d.value=!1)}o.beforeClose?o.beforeClose(C):w()}function S(){o.closeOnClickModal&&k()}function T(){t.isClient&&(d.value=!0)}function B(){d.value=!1}function n(){a("openAutoFocus")}function P(){a("closeAutoFocus")}function I(C){var M;((M=C.detail)==null?void 0:M.focusReason)==="pointer"&&C.preventDefault()}o.lockScroll&&H(d);function j(){o.closeOnPressEscape&&k()}return e.watch(()=>o.modelValue,C=>{C?(y.value=!1,L(),h.value=!0,g.value=F.isUndefined(o.zIndex)?c():g.value++,e.nextTick(()=>{a("open"),l.value&&(l.value.parentElement.scrollTop=0,l.value.parentElement.scrollLeft=0,l.value.scrollTop=0)})):d.value&&w()}),e.watch(()=>o.fullscreen,C=>{l.value&&(C?(i=l.value.style.transform,l.value.style.transform=""):l.value.style.transform=i)}),e.onMounted(()=>{o.modelValue&&(d.value=!0,h.value=!0,L())}),{afterEnter:E,afterLeave:O,beforeLeave:N,handleClose:k,onModalClick:S,close:w,doClose:B,onOpenAutoFocus:n,onCloseAutoFocus:P,onCloseRequested:j,onFocusoutPrevented:I,titleId:m,bodyId:r,closed:y,style:u,overlayDialogStyle:D,rendered:h,visible:d,zIndex:g}},se=e.defineComponent({name:"ElDialog",inheritAttrs:!1}),ae=e.defineComponent({...se,props:te,emits:ne,setup(o,{expose:l}){const s=o,f=e.useSlots();q.useDeprecated({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},e.computed(()=>!!f.title));const a=t.useNamespace("dialog"),c=e.ref(),i=e.ref(),m=e.ref(),{visible:r,titleId:d,bodyId:y,style:h,overlayDialogStyle:g,rendered:v,zIndex:p,afterEnter:b,afterLeave:u,beforeLeave:D,handleClose:E,onModalClick:O,onOpenAutoFocus:N,onCloseAutoFocus:L,onCloseRequested:w,onFocusoutPrevented:k}=le(s,c);e.provide(U,{dialogRef:c,headerRef:i,bodyId:y,ns:a,rendered:v,style:h});const S=z(O),T=e.computed(()=>s.draggable&&!s.fullscreen);return l({visible:r,dialogContentRef:m,resetPosition:()=>{var n;(n=m.value)==null||n.resetPosition()}}),(n,P)=>(e.openBlock(),e.createBlock(e.unref(F.ElTeleport),{to:n.appendTo,disabled:n.appendTo!=="body"?!1:!n.appendToBody},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:"dialog-fade",onAfterEnter:e.unref(b),onAfterLeave:e.unref(u),onBeforeLeave:e.unref(D),persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(e.unref(Y),{"custom-mask-event":"",mask:n.modal,"overlay-class":n.modalClass,"z-index":e.unref(p)},{default:e.withCtx(()=>[e.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":n.title||void 0,"aria-labelledby":n.title?void 0:e.unref(d),"aria-describedby":e.unref(y),class:e.normalizeClass(`${e.unref(a).namespace.value}-overlay-dialog`),style:e.normalizeStyle(e.unref(g)),onClick:e.unref(S).onClick,onMousedown:e.unref(S).onMousedown,onMouseup:e.unref(S).onMouseup},[e.createVNode(e.unref(F.ElFocusTrap),{loop:"",trapped:e.unref(r),"focus-start-el":"container",onFocusAfterTrapped:e.unref(N),onFocusAfterReleased:e.unref(L),onFocusoutPrevented:e.unref(k),onReleaseRequested:e.unref(w)},{default:e.withCtx(()=>[e.unref(v)?(e.openBlock(),e.createBlock(oe,e.mergeProps({key:0,ref_key:"dialogContentRef",ref:m},n.$attrs,{center:n.center,"align-center":n.alignCenter,"close-icon":n.closeIcon,draggable:e.unref(T),overflow:n.overflow,fullscreen:n.fullscreen,"header-class":n.headerClass,"body-class":n.bodyClass,"footer-class":n.footerClass,"show-close":n.showClose,title:n.title,"aria-level":n.headerAriaLevel,onClose:e.unref(E)}),e.createSlots({header:e.withCtx(()=>[n.$slots.title?e.renderSlot(n.$slots,"title",{key:1}):e.renderSlot(n.$slots,"header",{key:0,close:e.unref(E),titleId:e.unref(d),titleClass:e.unref(a).e("title")})]),default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:2},[n.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose"])):e.createCommentVNode("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[e.vShow,e.unref(r)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var re=t._export_sfc(ae,[["__file","dialog.vue"]]);const ie=t.withInstall(re);exports.ElDialog=ie;exports.ElOverlay=Y;exports.useDraggable=X;exports.useLockscreen=H;exports.useSameTarget=z;
|
|
1
|
+
"use strict";const e=require("vue"),t=require("./base-b384d332.cjs"),$=require("./vnode-44ebae3f.cjs"),F=require("./index-e0fa2f71.cjs"),A=require("./use-form-common-props-41091f5f.cjs"),W=require("./refs-4b61ff18.cjs"),V=require("./event-61f49698.cjs"),x=require("./scroll-495227b0.cjs"),q=require("./index-cb665c76.cjs"),z=o=>{if(!o)return{onClick:t.NOOP,onMousedown:t.NOOP,onMouseup:t.NOOP};let l=!1,s=!1;return{onClick:i=>{l&&s&&o(i),l=s=!1},onMousedown:i=>{l=i.target===i.currentTarget},onMouseup:i=>{s=i.target===i.currentTarget}}},K=t.buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:t.definePropType([String,Array,Object])},zIndex:{type:t.definePropType([String,Number])}}),_={click:o=>o instanceof MouseEvent},Z="overlay";var G=e.defineComponent({name:"ElOverlay",props:K,emits:_,setup(o,{slots:l,emit:s}){const f=t.useNamespace(Z),a=r=>{s("click",r)},{onClick:c,onMousedown:i,onMouseup:m}=z(o.customMaskEvent?void 0:a);return()=>o.mask?e.createVNode("div",{class:[f.b(),o.overlayClass],style:{zIndex:o.zIndex},onClick:c,onMousedown:i,onMouseup:m},[e.renderSlot(l,"default")],$.PatchFlags.STYLE|$.PatchFlags.CLASS|$.PatchFlags.PROPS,["onClick","onMouseup","onMousedown"]):e.h("div",{class:o.overlayClass,style:{zIndex:o.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[e.renderSlot(l,"default")])}});const Y=G,U=Symbol("dialogInjectionKey"),R=t.buildProps({center:Boolean,alignCenter:Boolean,closeIcon:{type:A.iconPropType},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),J={close:()=>!0},X=(o,l,s,f)=>{let a={offsetX:0,offsetY:0};const c=d=>{const y=d.clientX,h=d.clientY,{offsetX:g,offsetY:v}=a,p=o.value.getBoundingClientRect(),b=p.left,u=p.top,D=p.width,E=p.height,O=document.documentElement.clientWidth,N=document.documentElement.clientHeight,L=-b+g,w=-u+v,k=O-b-D+g,S=N-u-E+v,T=n=>{let P=g+n.clientX-y,I=v+n.clientY-h;f!=null&&f.value||(P=Math.min(Math.max(P,L),k),I=Math.min(Math.max(I,w),S)),a={offsetX:P,offsetY:I},o.value&&(o.value.style.transform=`translate(${t.addUnit(P)}, ${t.addUnit(I)})`)},B=()=>{document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",B)};document.addEventListener("mousemove",T),document.addEventListener("mouseup",B)},i=()=>{l.value&&o.value&&l.value.addEventListener("mousedown",c)},m=()=>{l.value&&o.value&&l.value.removeEventListener("mousedown",c)},r=()=>{a={offsetX:0,offsetY:0},o.value&&(o.value.style.transform="none")};return e.onMounted(()=>{e.watchEffect(()=>{s.value?i():m()})}),e.onBeforeUnmount(()=>{m()}),{resetPosition:r}},Q=e.defineComponent({name:"ElDialogContent"}),ee=e.defineComponent({...Q,props:R,emits:J,setup(o,{expose:l}){const s=o,{t:f}=t.useLocale(),{Close:a}=A.CloseComponents,{dialogRef:c,headerRef:i,bodyId:m,ns:r,style:d}=e.inject(U),{focusTrapRef:y}=e.inject(F.FOCUS_TRAP_INJECTION_KEY),h=e.computed(()=>[r.b(),r.is("fullscreen",s.fullscreen),r.is("draggable",s.draggable),r.is("align-center",s.alignCenter),{[r.m("center")]:s.center}]),g=W.composeRefs(y,c),v=e.computed(()=>s.draggable),p=e.computed(()=>s.overflow),{resetPosition:b}=X(c,i,v,p);return l({resetPosition:b}),(u,D)=>(e.openBlock(),e.createElementBlock("div",{ref:e.unref(g),class:e.normalizeClass(e.unref(h)),style:e.normalizeStyle(e.unref(d)),tabindex:"-1"},[e.createElementVNode("header",{ref_key:"headerRef",ref:i,class:e.normalizeClass([e.unref(r).e("header"),u.headerClass,{"show-close":u.showClose}])},[e.renderSlot(u.$slots,"header",{},()=>[e.createElementVNode("span",{role:"heading","aria-level":u.ariaLevel,class:e.normalizeClass(e.unref(r).e("title"))},e.toDisplayString(u.title),11,["aria-level"])]),u.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":e.unref(f)("el.dialog.close"),class:e.normalizeClass(e.unref(r).e("headerbtn")),type:"button",onClick:E=>u.$emit("close")},[e.createVNode(e.unref(A.ElIcon),{class:e.normalizeClass(e.unref(r).e("close"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.closeIcon||e.unref(a))))]),_:1},8,["class"])],10,["aria-label","onClick"])):e.createCommentVNode("v-if",!0)],2),e.createElementVNode("div",{id:e.unref(m),class:e.normalizeClass([e.unref(r).e("body"),u.bodyClass])},[e.renderSlot(u.$slots,"default")],10,["id"]),u.$slots.footer?(e.openBlock(),e.createElementBlock("footer",{key:0,class:e.normalizeClass([e.unref(r).e("footer"),u.footerClass])},[e.renderSlot(u.$slots,"footer")],2)):e.createCommentVNode("v-if",!0)],6))}});var oe=t._export_sfc(ee,[["__file","dialog-content.vue"]]);const te=t.buildProps({...R,appendToBody:Boolean,appendTo:{type:t.definePropType([String,Object]),default:"body"},beforeClose:{type:t.definePropType(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,headerClass:String,bodyClass:String,footerClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),ne={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[V.UPDATE_MODEL_EVENT]:o=>t.isBoolean(o),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},H=(o,l={})=>{e.isRef(o)||t.throwError("[useLockscreen]","You need to pass a ref param to this function");const s=l.ns||t.useNamespace("popup"),f=e.computed(()=>s.bm("parent","hidden"));if(!t.isClient||t.hasClass(document.body,f.value))return;let a=0,c=!1,i="0";const m=()=>{setTimeout(()=>{typeof document>"u"||c&&document&&(document.body.style.width=i,t.removeClass(document.body,f.value))},200)};e.watch(o,r=>{if(!r){m();return}c=!t.hasClass(document.body,f.value),c&&(i=document.body.style.width,t.addClass(document.body,f.value)),a=x.getScrollBarWidth(s.namespace.value);const d=document.documentElement.clientHeight<document.body.scrollHeight,y=t.getStyle(document.body,"overflowY");a>0&&(d||y==="scroll")&&c&&(document.body.style.width=`calc(100% - ${a}px)`)}),e.onScopeDispose(()=>m())},le=(o,l)=>{var s;const a=e.getCurrentInstance().emit,{nextZIndex:c}=A.useZIndex();let i="";const m=t.useId(),r=t.useId(),d=e.ref(!1),y=e.ref(!1),h=e.ref(!1),g=e.ref((s=o.zIndex)!=null?s:c());let v,p;const b=q.useGlobalConfig("namespace",t.defaultNamespace),u=e.computed(()=>{const C={},M=`--${b.value}-dialog`;return o.fullscreen||(o.top&&(C[`${M}-margin-top`]=o.top),o.width&&(C[`${M}-width`]=t.addUnit(o.width))),C}),D=e.computed(()=>o.alignCenter?{display:"flex"}:{});function E(){a("opened")}function O(){a("closed"),a(V.UPDATE_MODEL_EVENT,!1),o.destroyOnClose&&(h.value=!1)}function N(){a("close")}function L(){p==null||p(),v==null||v(),o.openDelay&&o.openDelay>0?{stop:v}=t.useTimeoutFn(()=>T(),o.openDelay):T()}function w(){v==null||v(),p==null||p(),o.closeDelay&&o.closeDelay>0?{stop:p}=t.useTimeoutFn(()=>B(),o.closeDelay):B()}function k(){function C(M){M||(y.value=!0,d.value=!1)}o.beforeClose?o.beforeClose(C):w()}function S(){o.closeOnClickModal&&k()}function T(){t.isClient&&(d.value=!0)}function B(){d.value=!1}function n(){a("openAutoFocus")}function P(){a("closeAutoFocus")}function I(C){var M;((M=C.detail)==null?void 0:M.focusReason)==="pointer"&&C.preventDefault()}o.lockScroll&&H(d);function j(){o.closeOnPressEscape&&k()}return e.watch(()=>o.modelValue,C=>{C?(y.value=!1,L(),h.value=!0,g.value=F.isUndefined(o.zIndex)?c():g.value++,e.nextTick(()=>{a("open"),l.value&&(l.value.parentElement.scrollTop=0,l.value.parentElement.scrollLeft=0,l.value.scrollTop=0)})):d.value&&w()}),e.watch(()=>o.fullscreen,C=>{l.value&&(C?(i=l.value.style.transform,l.value.style.transform=""):l.value.style.transform=i)}),e.onMounted(()=>{o.modelValue&&(d.value=!0,h.value=!0,L())}),{afterEnter:E,afterLeave:O,beforeLeave:N,handleClose:k,onModalClick:S,close:w,doClose:B,onOpenAutoFocus:n,onCloseAutoFocus:P,onCloseRequested:j,onFocusoutPrevented:I,titleId:m,bodyId:r,closed:y,style:u,overlayDialogStyle:D,rendered:h,visible:d,zIndex:g}},se=e.defineComponent({name:"ElDialog",inheritAttrs:!1}),ae=e.defineComponent({...se,props:te,emits:ne,setup(o,{expose:l}){const s=o,f=e.useSlots();q.useDeprecated({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},e.computed(()=>!!f.title));const a=t.useNamespace("dialog"),c=e.ref(),i=e.ref(),m=e.ref(),{visible:r,titleId:d,bodyId:y,style:h,overlayDialogStyle:g,rendered:v,zIndex:p,afterEnter:b,afterLeave:u,beforeLeave:D,handleClose:E,onModalClick:O,onOpenAutoFocus:N,onCloseAutoFocus:L,onCloseRequested:w,onFocusoutPrevented:k}=le(s,c);e.provide(U,{dialogRef:c,headerRef:i,bodyId:y,ns:a,rendered:v,style:h});const S=z(O),T=e.computed(()=>s.draggable&&!s.fullscreen);return l({visible:r,dialogContentRef:m,resetPosition:()=>{var n;(n=m.value)==null||n.resetPosition()}}),(n,P)=>(e.openBlock(),e.createBlock(e.unref(F.ElTeleport),{to:n.appendTo,disabled:n.appendTo!=="body"?!1:!n.appendToBody},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:"dialog-fade",onAfterEnter:e.unref(b),onAfterLeave:e.unref(u),onBeforeLeave:e.unref(D),persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(e.unref(Y),{"custom-mask-event":"",mask:n.modal,"overlay-class":n.modalClass,"z-index":e.unref(p)},{default:e.withCtx(()=>[e.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":n.title||void 0,"aria-labelledby":n.title?void 0:e.unref(d),"aria-describedby":e.unref(y),class:e.normalizeClass(`${e.unref(a).namespace.value}-overlay-dialog`),style:e.normalizeStyle(e.unref(g)),onClick:e.unref(S).onClick,onMousedown:e.unref(S).onMousedown,onMouseup:e.unref(S).onMouseup},[e.createVNode(e.unref(F.ElFocusTrap),{loop:"",trapped:e.unref(r),"focus-start-el":"container",onFocusAfterTrapped:e.unref(N),onFocusAfterReleased:e.unref(L),onFocusoutPrevented:e.unref(k),onReleaseRequested:e.unref(w)},{default:e.withCtx(()=>[e.unref(v)?(e.openBlock(),e.createBlock(oe,e.mergeProps({key:0,ref_key:"dialogContentRef",ref:m},n.$attrs,{center:n.center,"align-center":n.alignCenter,"close-icon":n.closeIcon,draggable:e.unref(T),overflow:n.overflow,fullscreen:n.fullscreen,"header-class":n.headerClass,"body-class":n.bodyClass,"footer-class":n.footerClass,"show-close":n.showClose,title:n.title,"aria-level":n.headerAriaLevel,onClose:e.unref(E)}),e.createSlots({header:e.withCtx(()=>[n.$slots.title?e.renderSlot(n.$slots,"title",{key:1}):e.renderSlot(n.$slots,"header",{key:0,close:e.unref(E),titleId:e.unref(d),titleClass:e.unref(a).e("title")})]),default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:2},[n.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose"])):e.createCommentVNode("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[e.vShow,e.unref(r)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var re=t._export_sfc(ae,[["__file","dialog.vue"]]);const ie=t.withInstall(re);exports.ElDialog=ie;exports.ElOverlay=Y;exports.useDraggable=X;exports.useLockscreen=H;exports.useSameTarget=z;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),l=require("./el-button-
|
|
1
|
+
"use strict";const e=require("vue"),l=require("./el-button-d234707c.cjs"),c=require("./use-form-common-props-41091f5f.cjs"),p=require("./el-popper-3d8f2656.cjs"),o=require("./base-b384d332.cjs"),v=o.buildProps({title:String,confirmButtonText:String,cancelButtonText:String,confirmButtonType:{type:String,values:l.buttonTypes,default:"primary"},cancelButtonType:{type:String,values:l.buttonTypes,default:"text"},icon:{type:c.iconPropType,default:()=>c.question_filled_default},iconColor:{type:String,default:"#f90"},hideIcon:{type:Boolean,default:!1},hideAfter:{type:Number,default:200},teleported:p.useTooltipContentProps.teleported,persistent:p.useTooltipContentProps.persistent,width:{type:[String,Number],default:150}}),h={confirm:n=>n instanceof MouseEvent,cancel:n=>n instanceof MouseEvent},g=e.defineComponent({name:"ElPopconfirm"}),P=e.defineComponent({...g,props:v,emits:h,setup(n,{emit:a}){const i=n,{t:u}=o.useLocale(),r=o.useNamespace("popconfirm"),f=e.ref(),m=()=>{var t,s;(s=(t=f.value)==null?void 0:t.onClose)==null||s.call(t)},B=e.computed(()=>({width:o.addUnit(i.width)})),d=t=>{a("confirm",t),m()},y=t=>{a("cancel",t),m()},T=e.computed(()=>i.confirmButtonText||u("el.popconfirm.confirmButtonText")),C=e.computed(()=>i.cancelButtonText||u("el.popconfirm.cancelButtonText"));return(t,s)=>(e.openBlock(),e.createBlock(e.unref(p.ElTooltip),e.mergeProps({ref_key:"tooltipRef",ref:f,trigger:"click",effect:"light"},t.$attrs,{"popper-class":`${e.unref(r).namespace.value}-popover`,"popper-style":e.unref(B),teleported:t.teleported,"fallback-placements":["bottom","top","right","left"],"hide-after":t.hideAfter,persistent:t.persistent}),{content:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).b())},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("main"))},[!t.hideIcon&&t.icon?(e.openBlock(),e.createBlock(e.unref(c.ElIcon),{key:0,class:e.normalizeClass(e.unref(r).e("icon")),style:e.normalizeStyle({color:t.iconColor})},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon)))]),_:1},8,["class","style"])):e.createCommentVNode("v-if",!0),e.createTextVNode(" "+e.toDisplayString(t.title),1)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("action"))},[e.renderSlot(t.$slots,"actions",{confirm:d,cancel:y},()=>[e.createVNode(e.unref(l.ElButton),{size:"small",type:t.cancelButtonType==="text"?"":t.cancelButtonType,text:t.cancelButtonType==="text",onClick:y},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(C)),1)]),_:1},8,["type","text"]),e.createVNode(e.unref(l.ElButton),{size:"small",type:t.confirmButtonType==="text"?"":t.confirmButtonType,text:t.confirmButtonType==="text",onClick:d},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(T)),1)]),_:1},8,["type","text"])])],2)],2)]),default:e.withCtx(()=>[t.$slots.reference?e.renderSlot(t.$slots,"reference",{key:0}):e.createCommentVNode("v-if",!0)]),_:3},16,["popper-class","popper-style","teleported","hide-after","persistent"]))}});var k=o._export_sfc(P,[["__file","popconfirm.vue"]]);const E=o.withInstall(k);exports.ElPopconfirm=E;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineComponent as k, ref as
|
|
2
|
-
import { b, E as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const G =
|
|
1
|
+
import { defineComponent as k, ref as x, computed as p, openBlock as a, createBlock as c, unref as t, mergeProps as z, withCtx as r, createElementVNode as f, normalizeClass as l, normalizeStyle as I, resolveDynamicComponent as V, createCommentVNode as g, createTextVNode as u, toDisplayString as m, renderSlot as C, createVNode as E } from "vue";
|
|
2
|
+
import { b as P, E as S } from "./el-button-f0269eec.js";
|
|
3
|
+
import { i as _, q, E as A } from "./use-form-common-props-422d25a5.js";
|
|
4
|
+
import { a as b, E as D } from "./el-popper-242a0eb5.js";
|
|
5
|
+
import { d as M, u as R, l as L, m as U, _ as j, w as F } from "./base-11914420.js";
|
|
6
|
+
const G = M({
|
|
7
7
|
title: String,
|
|
8
8
|
confirmButtonText: String,
|
|
9
9
|
cancelButtonText: String,
|
|
10
10
|
confirmButtonType: {
|
|
11
11
|
type: String,
|
|
12
|
-
values:
|
|
12
|
+
values: P,
|
|
13
13
|
default: "primary"
|
|
14
14
|
},
|
|
15
15
|
cancelButtonType: {
|
|
16
16
|
type: String,
|
|
17
|
-
values:
|
|
17
|
+
values: P,
|
|
18
18
|
default: "text"
|
|
19
19
|
},
|
|
20
20
|
icon: {
|
|
21
21
|
type: _,
|
|
22
|
-
default: () =>
|
|
22
|
+
default: () => q
|
|
23
23
|
},
|
|
24
24
|
iconColor: {
|
|
25
25
|
type: String,
|
|
@@ -33,8 +33,8 @@ const G = R({
|
|
|
33
33
|
type: Number,
|
|
34
34
|
default: 200
|
|
35
35
|
},
|
|
36
|
-
teleported:
|
|
37
|
-
persistent:
|
|
36
|
+
teleported: b.teleported,
|
|
37
|
+
persistent: b.persistent,
|
|
38
38
|
width: {
|
|
39
39
|
type: [String, Number],
|
|
40
40
|
default: 150
|
|
@@ -49,17 +49,17 @@ const G = R({
|
|
|
49
49
|
props: G,
|
|
50
50
|
emits: H,
|
|
51
51
|
setup(o, { emit: d }) {
|
|
52
|
-
const s = o, { t: y } =
|
|
52
|
+
const s = o, { t: y } = R(), n = L("popconfirm"), T = x(), B = () => {
|
|
53
53
|
var e, i;
|
|
54
54
|
(i = (e = T.value) == null ? void 0 : e.onClose) == null || i.call(e);
|
|
55
55
|
}, N = p(() => ({
|
|
56
|
-
width:
|
|
56
|
+
width: U(s.width)
|
|
57
57
|
})), v = (e) => {
|
|
58
58
|
d("confirm", e), B();
|
|
59
59
|
}, h = (e) => {
|
|
60
60
|
d("cancel", e), B();
|
|
61
|
-
}, w = p(() => s.confirmButtonText || y("el.popconfirm.confirmButtonText")),
|
|
62
|
-
return (e, i) => (a(), c(t(
|
|
61
|
+
}, w = p(() => s.confirmButtonText || y("el.popconfirm.confirmButtonText")), $ = p(() => s.cancelButtonText || y("el.popconfirm.cancelButtonText"));
|
|
62
|
+
return (e, i) => (a(), c(t(D), z({
|
|
63
63
|
ref_key: "tooltipRef",
|
|
64
64
|
ref: T,
|
|
65
65
|
trigger: "click",
|
|
@@ -79,7 +79,7 @@ const G = R({
|
|
|
79
79
|
f("div", {
|
|
80
80
|
class: l(t(n).e("main"))
|
|
81
81
|
}, [
|
|
82
|
-
!e.hideIcon && e.icon ? (a(), c(t(
|
|
82
|
+
!e.hideIcon && e.icon ? (a(), c(t(A), {
|
|
83
83
|
key: 0,
|
|
84
84
|
class: l(t(n).e("icon")),
|
|
85
85
|
style: I({ color: e.iconColor })
|
|
@@ -98,18 +98,18 @@ const G = R({
|
|
|
98
98
|
confirm: v,
|
|
99
99
|
cancel: h
|
|
100
100
|
}, () => [
|
|
101
|
-
E(t(
|
|
101
|
+
E(t(S), {
|
|
102
102
|
size: "small",
|
|
103
103
|
type: e.cancelButtonType === "text" ? "" : e.cancelButtonType,
|
|
104
104
|
text: e.cancelButtonType === "text",
|
|
105
105
|
onClick: h
|
|
106
106
|
}, {
|
|
107
107
|
default: r(() => [
|
|
108
|
-
u(m(t(
|
|
108
|
+
u(m(t($)), 1)
|
|
109
109
|
]),
|
|
110
110
|
_: 1
|
|
111
111
|
}, 8, ["type", "text"]),
|
|
112
|
-
E(t(
|
|
112
|
+
E(t(S), {
|
|
113
113
|
size: "small",
|
|
114
114
|
type: e.confirmButtonType === "text" ? "" : e.confirmButtonType,
|
|
115
115
|
text: e.confirmButtonType === "text",
|
|
@@ -131,7 +131,7 @@ const G = R({
|
|
|
131
131
|
}, 16, ["popper-class", "popper-style", "teleported", "hide-after", "persistent"]));
|
|
132
132
|
}
|
|
133
133
|
});
|
|
134
|
-
var O = /* @__PURE__ */
|
|
134
|
+
var O = /* @__PURE__ */ j(K, [["__file", "popconfirm.vue"]]);
|
|
135
135
|
const ee = F(O);
|
|
136
136
|
export {
|
|
137
137
|
ee as E
|