st-comp 0.0.149 → 0.0.150
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 +5 -4
- package/es/Dialog.cjs +1 -1
- package/es/Dialog.js +24 -22
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +52 -50
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +18 -16
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +26 -24
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +16 -14
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +58 -56
- package/es/PasswordPrompt.cjs +1 -0
- package/es/PasswordPrompt.js +13 -0
- package/es/Table.cjs +1 -1
- package/es/Table.js +105 -103
- package/es/User.cjs +1 -1
- package/es/User.js +400 -378
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +230 -228
- package/es/VirtualTable.cjs +3 -3
- package/es/VirtualTable.js +196 -194
- package/es/_initCloneObject-47814efa.cjs +1 -0
- package/es/{_initCloneObject-14b53c6f.js → _initCloneObject-e3d8a9ab.js} +21 -21
- package/es/base-0ca7c43a.cjs +5 -0
- package/es/base-19787dfb.js +303 -0
- package/es/{castArray-4251bbe4.js → castArray-8405000b.js} +1 -1
- package/es/castArray-a78ae889.cjs +1 -0
- package/es/{config-provider-55482a43.js → config-provider-0f6672af.js} +3 -3
- package/es/{config-provider-7cdfca4d.cjs → config-provider-cfbb9cd8.cjs} +1 -1
- package/es/{debounce-ac30be50.js → debounce-6cb0781f.js} +19 -19
- package/es/debounce-cf26af24.cjs +1 -0
- package/es/{dropdown-634b5e27.js → dropdown-17b3ef6a.js} +4 -4
- package/es/{dropdown-d7c59a21.cjs → dropdown-790d31ea.cjs} +1 -1
- package/es/{el-button-e1665717.js → el-button-0bf1d532.js} +17 -16
- package/es/el-button-62966947.cjs +1 -0
- package/es/{el-checkbox-group-492b95cc.cjs → el-checkbox-group-45247bbf.cjs} +1 -1
- package/es/{el-checkbox-group-e8fece80.js → el-checkbox-group-d53bc316.js} +5 -5
- package/es/el-empty-2ece1134.cjs +1 -0
- package/es/{el-empty-bacc6613.js → el-empty-bd5343a7.js} +10 -9
- package/es/{el-form-item-af1855f0.js → el-form-item-05c0e335.js} +52 -51
- package/es/el-form-item-47e255d4.cjs +12 -0
- package/es/{el-input-4961b99f.js → el-input-1e309239.js} +79 -78
- package/es/el-input-6a3805c5.cjs +1 -0
- package/es/{el-input-number-610fc8ba.js → el-input-number-60ebc58f.js} +57 -55
- package/es/el-input-number-96ff2e47.cjs +1 -0
- package/es/el-menu-item-4c9eb7ad.cjs +1 -0
- package/es/{el-menu-item-7d04c11a.js → el-menu-item-6c6236a1.js} +84 -83
- package/es/{el-message-c3b3ac96.js → el-message-7d927756.js} +55 -54
- package/es/el-message-d5ed7a4f.cjs +1 -0
- package/es/{el-overlay-12dd9b35.js → el-overlay-26bf0945.js} +73 -71
- package/es/el-overlay-41994f67.cjs +1 -0
- package/es/{el-popover-0aa071f2.js → el-popover-17e2e66c.js} +26 -24
- package/es/el-popover-7bd8a7c3.cjs +1 -0
- package/es/el-popper-7adbf1c6.cjs +1 -0
- package/es/{el-popper-50100766.js → el-popper-b6527ae2.js} +194 -193
- package/es/{el-scrollbar-562d0595.js → el-scrollbar-29bcab5f.js} +28 -28
- package/es/{el-scrollbar-d1c3e7f7.cjs → el-scrollbar-ac525239.cjs} +1 -1
- package/es/el-select-31f8ac8a.cjs +1 -0
- package/es/{el-select-9381b156.js → el-select-7395562b.js} +42 -40
- package/es/{el-table-column-55bffba5.js → el-table-column-47d80736.js} +329 -327
- package/es/el-table-column-bdc46568.cjs +14 -0
- package/es/{el-tag-985d9aff.js → el-tag-7414e0c7.js} +78 -77
- package/es/el-tag-9732314f.cjs +1 -0
- package/es/{index-deb8de52.cjs → index-1d85ba4b.cjs} +1 -1
- package/es/{index-39ec9741.js → index-273822d1.js} +21 -20
- package/es/index-2f958e56.cjs +3 -0
- package/es/index-375e8de4.cjs +5 -0
- package/es/{index-0cb48e01.js → index-621b092b.js} +1 -1
- package/es/{index-3bf8d597.cjs → index-65b4113e.cjs} +1 -1
- package/es/index-70372cdb.js +519 -0
- package/es/{use-form-common-props-f377e500.js → index-72151b24.js} +150 -312
- package/es/index-9e6e8d03.cjs +1 -0
- package/es/index-ab96bbf4.js +156 -0
- package/es/index-afc88a4b.cjs +1 -0
- package/es/{index-09e01b1d.js → index-c066fe0d.js} +32 -31
- package/es/index-ce3223db.cjs +1 -0
- package/es/{index-a902a0d9.js → index-dc22ffe4.js} +2 -2
- package/es/{raf-b128c7b7.js → raf-a532c514.js} +1 -1
- package/es/{raf-8fc301fd.cjs → raf-f46caea0.cjs} +1 -1
- package/es/{scroll-41224831.cjs → scroll-339681d4.cjs} +1 -1
- package/es/{scroll-387fcfdb.js → scroll-d787d648.js} +1 -1
- package/es/style.css +1 -1
- package/es/use-form-common-props-5ff2f51b.js +171 -0
- package/es/use-form-common-props-74a96df2.cjs +2 -0
- package/es/{vnode-7dfd4ed5.js → vnode-6a0c7411.js} +1 -1
- package/es/{vnode-7fbc61e1.cjs → vnode-b15eb11b.cjs} +1 -1
- package/es/{zh-cn-ab9a583d.cjs → zh-cn-36f34912.cjs} +1 -1
- package/es/{zh-cn-eb9c2820.js → zh-cn-f37255ae.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +136 -136
- package/lib/{index-d2de454d.js → index-d0cb2fa2.js} +14674 -14502
- package/lib/{python-22975586.js → python-050ba5a4.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/PasswordPrompt/index.ts +8 -0
- package/packages/PasswordPrompt/index.vue +266 -0
- package/packages/User/index.vue +97 -58
- package/packages/index.ts +2 -0
- package/src/pages/PasswordPrompt/index.vue +12 -0
- package/src/router/routes.ts +5 -0
- package/es/_initCloneObject-441db749.cjs +0 -1
- package/es/base-437d17f3.js +0 -816
- package/es/base-ec05f348.cjs +0 -9
- package/es/castArray-a45823fe.cjs +0 -1
- package/es/debounce-b2ff12bd.cjs +0 -1
- package/es/el-button-196807af.cjs +0 -1
- package/es/el-empty-19ea04f4.cjs +0 -1
- package/es/el-form-item-5bdffd07.cjs +0 -12
- package/es/el-input-23e2bac3.cjs +0 -1
- package/es/el-input-number-40a81eb5.cjs +0 -1
- package/es/el-menu-item-78b858f2.cjs +0 -1
- package/es/el-message-d4df8136.cjs +0 -1
- package/es/el-overlay-bc0790a2.cjs +0 -1
- package/es/el-popover-8a77e015.cjs +0 -1
- package/es/el-popper-746070ba.cjs +0 -1
- package/es/el-select-b162dffc.cjs +0 -1
- package/es/el-table-column-6d761fce.cjs +0 -14
- package/es/el-tag-c51a6490.cjs +0 -1
- package/es/index-8a0b1c53.cjs +0 -3
- package/es/index-a387515d.cjs +0 -1
- package/es/use-form-common-props-1b84d8f4.cjs +0 -2
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { P as
|
|
4
|
-
import { F as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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 E, normalizeStyle as le, createElementVNode as H, toDisplayString as ve, withCtx as w, createBlock as K, resolveDynamicComponent as ye, createCommentVNode as q, isRef as pe, watch as Z, onScopeDispose as ge, getCurrentInstance as Ce, ref as F, nextTick as be, useSlots as he, provide as Ee, Transition as we, withDirectives as ke, mergeProps as Se, createSlots as Me, vShow as Te } from "vue";
|
|
2
|
+
import { N as W, b as J, d as U, u as _, v as G, g as Be, _ as ne, c as De, t as Ie, h as se, n as x, m as Le, y as Pe, r as Fe, F as Oe, o as ee, w as Ae } from "./base-19787dfb.js";
|
|
3
|
+
import { P as j } from "./vnode-6a0c7411.js";
|
|
4
|
+
import { F as $e, U as ae, i as Ne, b as ze, a as Ye } from "./index-621b092b.js";
|
|
5
|
+
import { E as Re } from "./index-72151b24.js";
|
|
6
|
+
import { i as Xe, C as He, p as Ue } from "./use-form-common-props-5ff2f51b.js";
|
|
7
|
+
import { a as Ve, u as oe } from "./index-70372cdb.js";
|
|
8
|
+
import { g as We } from "./scroll-d787d648.js";
|
|
9
|
+
import { b as je, a as Ke } from "./index-c066fe0d.js";
|
|
8
10
|
const re = (e) => {
|
|
9
11
|
if (!e)
|
|
10
|
-
return { onClick:
|
|
12
|
+
return { onClick: W, onMousedown: W, onMouseup: W };
|
|
11
13
|
let l = !1, n = !1;
|
|
12
14
|
return { onClick: (r) => {
|
|
13
15
|
l && n && e(r), l = n = !1;
|
|
@@ -16,31 +18,31 @@ const re = (e) => {
|
|
|
16
18
|
}, onMouseup: (r) => {
|
|
17
19
|
n = r.target === r.currentTarget;
|
|
18
20
|
} };
|
|
19
|
-
}, qe =
|
|
21
|
+
}, qe = J({
|
|
20
22
|
mask: {
|
|
21
23
|
type: Boolean,
|
|
22
24
|
default: !0
|
|
23
25
|
},
|
|
24
26
|
customMaskEvent: Boolean,
|
|
25
27
|
overlayClass: {
|
|
26
|
-
type:
|
|
28
|
+
type: U([
|
|
27
29
|
String,
|
|
28
30
|
Array,
|
|
29
31
|
Object
|
|
30
32
|
])
|
|
31
33
|
},
|
|
32
34
|
zIndex: {
|
|
33
|
-
type:
|
|
35
|
+
type: U([String, Number])
|
|
34
36
|
}
|
|
35
|
-
}),
|
|
37
|
+
}), Ze = {
|
|
36
38
|
click: (e) => e instanceof MouseEvent
|
|
37
|
-
},
|
|
38
|
-
var
|
|
39
|
+
}, Ge = "overlay";
|
|
40
|
+
var Je = X({
|
|
39
41
|
name: "ElOverlay",
|
|
40
42
|
props: qe,
|
|
41
|
-
emits:
|
|
43
|
+
emits: Ze,
|
|
42
44
|
setup(e, { slots: l, emit: n }) {
|
|
43
|
-
const d = _(
|
|
45
|
+
const d = _(Ge), s = (a) => {
|
|
44
46
|
n("click", a);
|
|
45
47
|
}, { onClick: u, onMousedown: r, onMouseup: f } = re(e.customMaskEvent ? void 0 : s);
|
|
46
48
|
return () => e.mask ? R("div", {
|
|
@@ -51,7 +53,7 @@ var Ge = U({
|
|
|
51
53
|
onClick: u,
|
|
52
54
|
onMousedown: r,
|
|
53
55
|
onMouseup: f
|
|
54
|
-
}, [b(l, "default")],
|
|
56
|
+
}, [b(l, "default")], j.STYLE | j.CLASS | j.PROPS, ["onClick", "onMouseup", "onMousedown"]) : de("div", {
|
|
55
57
|
class: e.overlayClass,
|
|
56
58
|
style: {
|
|
57
59
|
zIndex: e.zIndex,
|
|
@@ -64,11 +66,11 @@ var Ge = U({
|
|
|
64
66
|
}, [b(l, "default")]);
|
|
65
67
|
}
|
|
66
68
|
});
|
|
67
|
-
const _e =
|
|
69
|
+
const _e = Je, ie = Symbol("dialogInjectionKey"), ue = J({
|
|
68
70
|
center: Boolean,
|
|
69
71
|
alignCenter: Boolean,
|
|
70
72
|
closeIcon: {
|
|
71
|
-
type:
|
|
73
|
+
type: Xe
|
|
72
74
|
},
|
|
73
75
|
draggable: Boolean,
|
|
74
76
|
overflow: Boolean,
|
|
@@ -96,12 +98,12 @@ const _e = Ge, ie = Symbol("dialogInjectionKey"), ue = G({
|
|
|
96
98
|
offsetY: 0
|
|
97
99
|
};
|
|
98
100
|
const u = (c) => {
|
|
99
|
-
const y = c.clientX, C = c.clientY, { offsetX: g, offsetY: m } = s, v = e.value.getBoundingClientRect(), h = v.left, i = v.top,
|
|
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, A = -h + g, M = -i + m, T = z - h - O + g, B = Y - i - S + m, D = (t) => {
|
|
100
102
|
let L = g + t.clientX - y, $ = m + t.clientY - C;
|
|
101
|
-
d != null && d.value || (L = Math.min(Math.max(L,
|
|
103
|
+
d != null && d.value || (L = Math.min(Math.max(L, A), T), $ = Math.min(Math.max($, M), B)), s = {
|
|
102
104
|
offsetX: L,
|
|
103
105
|
offsetY: $
|
|
104
|
-
}, e.value && (e.value.style.transform = `translate(${
|
|
106
|
+
}, e.value && (e.value.style.transform = `translate(${G(L)}, ${G($)})`);
|
|
105
107
|
}, I = () => {
|
|
106
108
|
document.removeEventListener("mousemove", D), document.removeEventListener("mouseup", I);
|
|
107
109
|
};
|
|
@@ -129,12 +131,12 @@ const _e = Ge, ie = Symbol("dialogInjectionKey"), ue = G({
|
|
|
129
131
|
e.forEach((n) => {
|
|
130
132
|
Be(n) ? n(l) : n.value = l;
|
|
131
133
|
});
|
|
132
|
-
}, oo =
|
|
134
|
+
}, oo = X({ name: "ElDialogContent" }), to = /* @__PURE__ */ X({
|
|
133
135
|
...oo,
|
|
134
136
|
props: ue,
|
|
135
137
|
emits: Qe,
|
|
136
138
|
setup(e, { expose: l }) {
|
|
137
|
-
const n = e, { t: d } =
|
|
139
|
+
const n = e, { t: d } = Ve(), { Close: s } = He, { dialogRef: u, headerRef: r, bodyId: f, ns: a, style: c } = Q(ie), { focusTrapRef: y } = Q($e), C = k(() => [
|
|
138
140
|
a.b(),
|
|
139
141
|
a.is("fullscreen", n.fullscreen),
|
|
140
142
|
a.is("draggable", n.draggable),
|
|
@@ -143,48 +145,48 @@ const _e = Ge, ie = Symbol("dialogInjectionKey"), ue = G({
|
|
|
143
145
|
]), g = eo(y, u), m = k(() => n.draggable), v = k(() => n.overflow), { resetPosition: h } = xe(u, r, m, v);
|
|
144
146
|
return l({
|
|
145
147
|
resetPosition: h
|
|
146
|
-
}), (i,
|
|
148
|
+
}), (i, O) => (N(), V("div", {
|
|
147
149
|
ref: o(g),
|
|
148
150
|
class: E(o(C)),
|
|
149
151
|
style: le(o(c)),
|
|
150
152
|
tabindex: "-1"
|
|
151
153
|
}, [
|
|
152
|
-
|
|
154
|
+
H("header", {
|
|
153
155
|
ref_key: "headerRef",
|
|
154
156
|
ref: r,
|
|
155
157
|
class: E([o(a).e("header"), i.headerClass, { "show-close": i.showClose }])
|
|
156
158
|
}, [
|
|
157
159
|
b(i.$slots, "header", {}, () => [
|
|
158
|
-
|
|
160
|
+
H("span", {
|
|
159
161
|
role: "heading",
|
|
160
162
|
"aria-level": i.ariaLevel,
|
|
161
163
|
class: E(o(a).e("title"))
|
|
162
164
|
}, ve(i.title), 11, ["aria-level"])
|
|
163
165
|
]),
|
|
164
|
-
i.showClose ? (
|
|
166
|
+
i.showClose ? (N(), V("button", {
|
|
165
167
|
key: 0,
|
|
166
168
|
"aria-label": o(d)("el.dialog.close"),
|
|
167
169
|
class: E(o(a).e("headerbtn")),
|
|
168
170
|
type: "button",
|
|
169
171
|
onClick: (S) => i.$emit("close")
|
|
170
172
|
}, [
|
|
171
|
-
R(o(
|
|
173
|
+
R(o(Re), {
|
|
172
174
|
class: E(o(a).e("close"))
|
|
173
175
|
}, {
|
|
174
176
|
default: w(() => [
|
|
175
|
-
(
|
|
177
|
+
(N(), K(ye(i.closeIcon || o(s))))
|
|
176
178
|
]),
|
|
177
179
|
_: 1
|
|
178
180
|
}, 8, ["class"])
|
|
179
181
|
], 10, ["aria-label", "onClick"])) : q("v-if", !0)
|
|
180
182
|
], 2),
|
|
181
|
-
|
|
183
|
+
H("div", {
|
|
182
184
|
id: o(f),
|
|
183
185
|
class: E([o(a).e("body"), i.bodyClass])
|
|
184
186
|
}, [
|
|
185
187
|
b(i.$slots, "default")
|
|
186
188
|
], 10, ["id"]),
|
|
187
|
-
i.$slots.footer ? (
|
|
189
|
+
i.$slots.footer ? (N(), V("footer", {
|
|
188
190
|
key: 0,
|
|
189
191
|
class: E([o(a).e("footer"), i.footerClass])
|
|
190
192
|
}, [
|
|
@@ -194,15 +196,15 @@ const _e = Ge, ie = Symbol("dialogInjectionKey"), ue = G({
|
|
|
194
196
|
}
|
|
195
197
|
});
|
|
196
198
|
var lo = /* @__PURE__ */ ne(to, [["__file", "dialog-content.vue"]]);
|
|
197
|
-
const no =
|
|
199
|
+
const no = J({
|
|
198
200
|
...ue,
|
|
199
201
|
appendToBody: Boolean,
|
|
200
202
|
appendTo: {
|
|
201
|
-
type:
|
|
203
|
+
type: U([String, Object]),
|
|
202
204
|
default: "body"
|
|
203
205
|
},
|
|
204
206
|
beforeClose: {
|
|
205
|
-
type:
|
|
207
|
+
type: U(Function)
|
|
206
208
|
},
|
|
207
209
|
destroyOnClose: Boolean,
|
|
208
210
|
closeOnClickModal: {
|
|
@@ -253,11 +255,11 @@ const no = G({
|
|
|
253
255
|
opened: () => !0,
|
|
254
256
|
close: () => !0,
|
|
255
257
|
closed: () => !0,
|
|
256
|
-
[ae]: (e) =>
|
|
258
|
+
[ae]: (e) => De(e),
|
|
257
259
|
openAutoFocus: () => !0,
|
|
258
260
|
closeAutoFocus: () => !0
|
|
259
261
|
}, ao = (e, l = {}) => {
|
|
260
|
-
pe(e) ||
|
|
262
|
+
pe(e) || Ie("[useLockscreen]", "You need to pass a ref param to this function");
|
|
261
263
|
const n = l.ns || _("popup"), d = k(() => n.bm("parent", "hidden"));
|
|
262
264
|
if (!se || x(document.body, d.value))
|
|
263
265
|
return;
|
|
@@ -267,39 +269,39 @@ const no = G({
|
|
|
267
269
|
typeof document > "u" || u && document && (document.body.style.width = r, Fe(document.body, d.value));
|
|
268
270
|
}, 200);
|
|
269
271
|
};
|
|
270
|
-
|
|
272
|
+
Z(e, (a) => {
|
|
271
273
|
if (!a) {
|
|
272
274
|
f();
|
|
273
275
|
return;
|
|
274
276
|
}
|
|
275
|
-
u = !x(document.body, d.value), u && (r = document.body.style.width,
|
|
276
|
-
const c = document.documentElement.clientHeight < document.body.scrollHeight, y =
|
|
277
|
+
u = !x(document.body, d.value), u && (r = document.body.style.width, Le(document.body, d.value)), s = We(n.namespace.value);
|
|
278
|
+
const c = document.documentElement.clientHeight < document.body.scrollHeight, y = Pe(document.body, "overflowY");
|
|
277
279
|
s > 0 && (c || y === "scroll") && u && (document.body.style.width = `calc(100% - ${s}px)`);
|
|
278
280
|
}), ge(() => f());
|
|
279
281
|
}, ro = (e, l) => {
|
|
280
282
|
var n;
|
|
281
|
-
const s = Ce().emit, { nextZIndex: u } =
|
|
283
|
+
const s = Ce().emit, { nextZIndex: u } = Ue();
|
|
282
284
|
let r = "";
|
|
283
|
-
const f =
|
|
285
|
+
const f = oe(), a = oe(), c = F(!1), y = F(!1), C = F(!1), g = F((n = e.zIndex) != null ? n : u());
|
|
284
286
|
let m, v;
|
|
285
|
-
const h =
|
|
287
|
+
const h = je("namespace", Oe), i = k(() => {
|
|
286
288
|
const p = {}, P = `--${h.value}-dialog`;
|
|
287
|
-
return e.fullscreen || (e.top && (p[`${P}-margin-top`] = e.top), e.width && (p[`${P}-width`] =
|
|
288
|
-
}),
|
|
289
|
+
return e.fullscreen || (e.top && (p[`${P}-margin-top`] = e.top), e.width && (p[`${P}-width`] = G(e.width))), p;
|
|
290
|
+
}), O = k(() => e.alignCenter ? { display: "flex" } : {});
|
|
289
291
|
function S() {
|
|
290
292
|
s("opened");
|
|
291
293
|
}
|
|
292
|
-
function
|
|
294
|
+
function z() {
|
|
293
295
|
s("closed"), s(ae, !1), e.destroyOnClose && (C.value = !1);
|
|
294
296
|
}
|
|
295
297
|
function Y() {
|
|
296
298
|
s("close");
|
|
297
299
|
}
|
|
298
|
-
function
|
|
299
|
-
v == null || v(), m == null || m(), e.openDelay && e.openDelay > 0 ? { stop: m } =
|
|
300
|
+
function A() {
|
|
301
|
+
v == null || v(), m == null || m(), e.openDelay && e.openDelay > 0 ? { stop: m } = ee(() => D(), e.openDelay) : D();
|
|
300
302
|
}
|
|
301
303
|
function M() {
|
|
302
|
-
m == null || m(), v == null || v(), e.closeDelay && e.closeDelay > 0 ? { stop: v } =
|
|
304
|
+
m == null || m(), v == null || v(), e.closeDelay && e.closeDelay > 0 ? { stop: v } = ee(() => I(), e.closeDelay) : I();
|
|
303
305
|
}
|
|
304
306
|
function T() {
|
|
305
307
|
function p(P) {
|
|
@@ -330,17 +332,17 @@ const no = G({
|
|
|
330
332
|
function ce() {
|
|
331
333
|
e.closeOnPressEscape && T();
|
|
332
334
|
}
|
|
333
|
-
return
|
|
334
|
-
p ? (y.value = !1,
|
|
335
|
+
return Z(() => e.modelValue, (p) => {
|
|
336
|
+
p ? (y.value = !1, A(), C.value = !0, g.value = Ne(e.zIndex) ? u() : g.value++, be(() => {
|
|
335
337
|
s("open"), l.value && (l.value.parentElement.scrollTop = 0, l.value.parentElement.scrollLeft = 0, l.value.scrollTop = 0);
|
|
336
338
|
})) : c.value && M();
|
|
337
|
-
}),
|
|
339
|
+
}), Z(() => e.fullscreen, (p) => {
|
|
338
340
|
l.value && (p ? (r = l.value.style.transform, l.value.style.transform = "") : l.value.style.transform = r);
|
|
339
341
|
}), te(() => {
|
|
340
|
-
e.modelValue && (c.value = !0, C.value = !0,
|
|
342
|
+
e.modelValue && (c.value = !0, C.value = !0, A());
|
|
341
343
|
}), {
|
|
342
344
|
afterEnter: S,
|
|
343
|
-
afterLeave:
|
|
345
|
+
afterLeave: z,
|
|
344
346
|
beforeLeave: Y,
|
|
345
347
|
handleClose: T,
|
|
346
348
|
onModalClick: B,
|
|
@@ -354,28 +356,28 @@ const no = G({
|
|
|
354
356
|
bodyId: a,
|
|
355
357
|
closed: y,
|
|
356
358
|
style: i,
|
|
357
|
-
overlayDialogStyle:
|
|
359
|
+
overlayDialogStyle: O,
|
|
358
360
|
rendered: C,
|
|
359
361
|
visible: c,
|
|
360
362
|
zIndex: g
|
|
361
363
|
};
|
|
362
|
-
}, io =
|
|
364
|
+
}, io = X({
|
|
363
365
|
name: "ElDialog",
|
|
364
366
|
inheritAttrs: !1
|
|
365
|
-
}), uo = /* @__PURE__ */
|
|
367
|
+
}), uo = /* @__PURE__ */ X({
|
|
366
368
|
...io,
|
|
367
369
|
props: no,
|
|
368
370
|
emits: so,
|
|
369
371
|
setup(e, { expose: l }) {
|
|
370
372
|
const n = e, d = he();
|
|
371
|
-
|
|
373
|
+
Ke({
|
|
372
374
|
scope: "el-dialog",
|
|
373
375
|
from: "the title slot",
|
|
374
376
|
replacement: "the header slot",
|
|
375
377
|
version: "3.0.0",
|
|
376
378
|
ref: "https://element-plus.org/en-US/component/dialog.html#slots"
|
|
377
379
|
}, k(() => !!d.title));
|
|
378
|
-
const s = _("dialog"), u =
|
|
380
|
+
const s = _("dialog"), u = F(), r = F(), f = F(), {
|
|
379
381
|
visible: a,
|
|
380
382
|
titleId: c,
|
|
381
383
|
bodyId: y,
|
|
@@ -385,11 +387,11 @@ const no = G({
|
|
|
385
387
|
zIndex: v,
|
|
386
388
|
afterEnter: h,
|
|
387
389
|
afterLeave: i,
|
|
388
|
-
beforeLeave:
|
|
390
|
+
beforeLeave: O,
|
|
389
391
|
handleClose: S,
|
|
390
|
-
onModalClick:
|
|
392
|
+
onModalClick: z,
|
|
391
393
|
onOpenAutoFocus: Y,
|
|
392
|
-
onCloseAutoFocus:
|
|
394
|
+
onCloseAutoFocus: A,
|
|
393
395
|
onCloseRequested: M,
|
|
394
396
|
onFocusoutPrevented: T
|
|
395
397
|
} = ro(n, u);
|
|
@@ -401,7 +403,7 @@ const no = G({
|
|
|
401
403
|
rendered: m,
|
|
402
404
|
style: C
|
|
403
405
|
});
|
|
404
|
-
const B = re(
|
|
406
|
+
const B = re(z), D = k(() => n.draggable && !n.fullscreen);
|
|
405
407
|
return l({
|
|
406
408
|
visible: a,
|
|
407
409
|
dialogContentRef: f,
|
|
@@ -409,7 +411,7 @@ const no = G({
|
|
|
409
411
|
var t;
|
|
410
412
|
(t = f.value) == null || t.resetPosition();
|
|
411
413
|
}
|
|
412
|
-
}), (t, L) => (
|
|
414
|
+
}), (t, L) => (N(), K(o(ze), {
|
|
413
415
|
to: t.appendTo,
|
|
414
416
|
disabled: t.appendTo !== "body" ? !1 : !t.appendToBody
|
|
415
417
|
}, {
|
|
@@ -418,7 +420,7 @@ const no = G({
|
|
|
418
420
|
name: "dialog-fade",
|
|
419
421
|
onAfterEnter: o(h),
|
|
420
422
|
onAfterLeave: o(i),
|
|
421
|
-
onBeforeLeave: o(
|
|
423
|
+
onBeforeLeave: o(O),
|
|
422
424
|
persisted: ""
|
|
423
425
|
}, {
|
|
424
426
|
default: w(() => [
|
|
@@ -429,7 +431,7 @@ const no = G({
|
|
|
429
431
|
"z-index": o(v)
|
|
430
432
|
}, {
|
|
431
433
|
default: w(() => [
|
|
432
|
-
|
|
434
|
+
H("div", {
|
|
433
435
|
role: "dialog",
|
|
434
436
|
"aria-modal": "true",
|
|
435
437
|
"aria-label": t.title || void 0,
|
|
@@ -441,17 +443,17 @@ const no = G({
|
|
|
441
443
|
onMousedown: o(B).onMousedown,
|
|
442
444
|
onMouseup: o(B).onMouseup
|
|
443
445
|
}, [
|
|
444
|
-
R(o(
|
|
446
|
+
R(o(Ye), {
|
|
445
447
|
loop: "",
|
|
446
448
|
trapped: o(a),
|
|
447
449
|
"focus-start-el": "container",
|
|
448
450
|
onFocusAfterTrapped: o(Y),
|
|
449
|
-
onFocusAfterReleased: o(
|
|
451
|
+
onFocusAfterReleased: o(A),
|
|
450
452
|
onFocusoutPrevented: o(T),
|
|
451
453
|
onReleaseRequested: o(M)
|
|
452
454
|
}, {
|
|
453
455
|
default: w(() => [
|
|
454
|
-
o(m) ? (
|
|
456
|
+
o(m) ? (N(), K(lo, Se({
|
|
455
457
|
key: 0,
|
|
456
458
|
ref_key: "dialogContentRef",
|
|
457
459
|
ref: f
|
|
@@ -508,9 +510,9 @@ const no = G({
|
|
|
508
510
|
}
|
|
509
511
|
});
|
|
510
512
|
var co = /* @__PURE__ */ ne(uo, [["__file", "dialog.vue"]]);
|
|
511
|
-
const
|
|
513
|
+
const Eo = Ae(co);
|
|
512
514
|
export {
|
|
513
|
-
|
|
515
|
+
Eo as E,
|
|
514
516
|
_e as a,
|
|
515
517
|
ao as b,
|
|
516
518
|
re as c,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),n=require("./base-0ca7c43a.cjs"),$=require("./vnode-b15eb11b.cjs"),O=require("./index-65b4113e.cjs"),W=require("./index-afc88a4b.cjs"),z=require("./use-form-common-props-74a96df2.cjs"),A=require("./index-375e8de4.cjs"),K=require("./scroll-339681d4.cjs"),q=require("./index-2f958e56.cjs"),V=o=>{if(!o)return{onClick:n.NOOP,onMousedown:n.NOOP,onMouseup:n.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}}},_=n.buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:n.definePropType([String,Array,Object])},zIndex:{type:n.definePropType([String,Number])}}),Z={click:o=>o instanceof MouseEvent},G="overlay";var J=e.defineComponent({name:"ElOverlay",props:_,emits:Z,setup(o,{slots:l,emit:s}){const f=n.useNamespace(G),a=r=>{s("click",r)},{onClick:c,onMousedown:i,onMouseup:m}=V(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=J,R=Symbol("dialogInjectionKey"),U=n.buildProps({center:Boolean,alignCenter:Boolean,closeIcon:{type:z.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"}}),Q={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,N=document.documentElement.clientWidth,F=document.documentElement.clientHeight,L=-b+g,w=-u+v,k=N-b-D+g,S=F-u-E+v,T=t=>{let P=g+t.clientX-y,I=v+t.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(${n.addUnit(P)}, ${n.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}},x=(...o)=>l=>{o.forEach(s=>{n.isFunction(s)?s(l):s.value=l})},ee=e.defineComponent({name:"ElDialogContent"}),oe=e.defineComponent({...ee,props:U,emits:Q,setup(o,{expose:l}){const s=o,{t:f}=A.useLocale(),{Close:a}=z.CloseComponents,{dialogRef:c,headerRef:i,bodyId:m,ns:r,style:d}=e.inject(R),{focusTrapRef:y}=e.inject(O.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=x(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(W.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 te=n._export_sfc(oe,[["__file","dialog-content.vue"]]);const ne=n.buildProps({...U,appendToBody:Boolean,appendTo:{type:n.definePropType([String,Object]),default:"body"},beforeClose:{type:n.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"}}),le={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[O.UPDATE_MODEL_EVENT]:o=>n.isBoolean(o),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},H=(o,l={})=>{e.isRef(o)||n.throwError("[useLockscreen]","You need to pass a ref param to this function");const s=l.ns||n.useNamespace("popup"),f=e.computed(()=>s.bm("parent","hidden"));if(!n.isClient||n.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,n.removeClass(document.body,f.value))},200)};e.watch(o,r=>{if(!r){m();return}c=!n.hasClass(document.body,f.value),c&&(i=document.body.style.width,n.addClass(document.body,f.value)),a=K.getScrollBarWidth(s.namespace.value);const d=document.documentElement.clientHeight<document.body.scrollHeight,y=n.getStyle(document.body,"overflowY");a>0&&(d||y==="scroll")&&c&&(document.body.style.width=`calc(100% - ${a}px)`)}),e.onScopeDispose(()=>m())},se=(o,l)=>{var s;const a=e.getCurrentInstance().emit,{nextZIndex:c}=z.useZIndex();let i="";const m=A.useId(),r=A.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",n.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`]=n.addUnit(o.width))),C}),D=e.computed(()=>o.alignCenter?{display:"flex"}:{});function E(){a("opened")}function N(){a("closed"),a(O.UPDATE_MODEL_EVENT,!1),o.destroyOnClose&&(h.value=!1)}function F(){a("close")}function L(){p==null||p(),v==null||v(),o.openDelay&&o.openDelay>0?{stop:v}=n.useTimeoutFn(()=>T(),o.openDelay):T()}function w(){v==null||v(),p==null||p(),o.closeDelay&&o.closeDelay>0?{stop:p}=n.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(){n.isClient&&(d.value=!0)}function B(){d.value=!1}function t(){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=O.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:N,beforeLeave:F,handleClose:k,onModalClick:S,close:w,doClose:B,onOpenAutoFocus:t,onCloseAutoFocus:P,onCloseRequested:j,onFocusoutPrevented:I,titleId:m,bodyId:r,closed:y,style:u,overlayDialogStyle:D,rendered:h,visible:d,zIndex:g}},ae=e.defineComponent({name:"ElDialog",inheritAttrs:!1}),re=e.defineComponent({...ae,props:ne,emits:le,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=n.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:N,onOpenAutoFocus:F,onCloseAutoFocus:L,onCloseRequested:w,onFocusoutPrevented:k}=se(s,c);e.provide(R,{dialogRef:c,headerRef:i,bodyId:y,ns:a,rendered:v,style:h});const S=V(N),T=e.computed(()=>s.draggable&&!s.fullscreen);return l({visible:r,dialogContentRef:m,resetPosition:()=>{var t;(t=m.value)==null||t.resetPosition()}}),(t,P)=>(e.openBlock(),e.createBlock(e.unref(O.ElTeleport),{to:t.appendTo,disabled:t.appendTo!=="body"?!1:!t.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:t.modal,"overlay-class":t.modalClass,"z-index":e.unref(p)},{default:e.withCtx(()=>[e.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":t.title||void 0,"aria-labelledby":t.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(O.ElFocusTrap),{loop:"",trapped:e.unref(r),"focus-start-el":"container",onFocusAfterTrapped:e.unref(F),onFocusAfterReleased:e.unref(L),onFocusoutPrevented:e.unref(k),onReleaseRequested:e.unref(w)},{default:e.withCtx(()=>[e.unref(v)?(e.openBlock(),e.createBlock(te,e.mergeProps({key:0,ref_key:"dialogContentRef",ref:m},t.$attrs,{center:t.center,"align-center":t.alignCenter,"close-icon":t.closeIcon,draggable:e.unref(T),overflow:t.overflow,fullscreen:t.fullscreen,"header-class":t.headerClass,"body-class":t.bodyClass,"footer-class":t.footerClass,"show-close":t.showClose,title:t.title,"aria-level":t.headerAriaLevel,onClose:e.unref(E)}),e.createSlots({header:e.withCtx(()=>[t.$slots.title?e.renderSlot(t.$slots,"title",{key:1}):e.renderSlot(t.$slots,"header",{key:0,close:e.unref(E),titleId:e.unref(d),titleClass:e.unref(a).e("title")})]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:2},[t.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(t.$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 ie=n._export_sfc(re,[["__file","dialog.vue"]]);const ue=n.withInstall(ie);exports.ElDialog=ue;exports.ElOverlay=Y;exports.composeRefs=x;exports.useDraggable=X;exports.useLockscreen=H;exports.useSameTarget=V;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { defineComponent as k, ref as
|
|
2
|
-
import { b, E as P } from "./el-button-
|
|
3
|
-
import {
|
|
4
|
-
import { b as S, E as
|
|
5
|
-
import { b as
|
|
6
|
-
|
|
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 m, toDisplayString as u, renderSlot as C, createVNode as E } from "vue";
|
|
2
|
+
import { b, E as P } from "./el-button-0bf1d532.js";
|
|
3
|
+
import { q as _, E as q } from "./index-72151b24.js";
|
|
4
|
+
import { b as S, E as A } from "./el-popper-b6527ae2.js";
|
|
5
|
+
import { b as D, u as M, v as R, _ as L, w as U } from "./base-19787dfb.js";
|
|
6
|
+
import { i as j } from "./use-form-common-props-5ff2f51b.js";
|
|
7
|
+
import { a as F } from "./index-70372cdb.js";
|
|
8
|
+
const G = D({
|
|
7
9
|
title: String,
|
|
8
10
|
confirmButtonText: String,
|
|
9
11
|
cancelButtonText: String,
|
|
@@ -18,8 +20,8 @@ const G = R({
|
|
|
18
20
|
default: "text"
|
|
19
21
|
},
|
|
20
22
|
icon: {
|
|
21
|
-
type:
|
|
22
|
-
default: () =>
|
|
23
|
+
type: j,
|
|
24
|
+
default: () => _
|
|
23
25
|
},
|
|
24
26
|
iconColor: {
|
|
25
27
|
type: String,
|
|
@@ -49,17 +51,17 @@ const G = R({
|
|
|
49
51
|
props: G,
|
|
50
52
|
emits: H,
|
|
51
53
|
setup(o, { emit: d }) {
|
|
52
|
-
const s = o, { t: y } =
|
|
54
|
+
const s = o, { t: y } = F(), n = M("popconfirm"), T = x(), v = () => {
|
|
53
55
|
var e, i;
|
|
54
56
|
(i = (e = T.value) == null ? void 0 : e.onClose) == null || i.call(e);
|
|
55
57
|
}, N = p(() => ({
|
|
56
|
-
width:
|
|
57
|
-
})),
|
|
58
|
-
d("confirm", e),
|
|
58
|
+
width: R(s.width)
|
|
59
|
+
})), B = (e) => {
|
|
60
|
+
d("confirm", e), v();
|
|
59
61
|
}, h = (e) => {
|
|
60
|
-
d("cancel", e),
|
|
61
|
-
}, w = p(() => s.confirmButtonText || y("el.popconfirm.confirmButtonText")),
|
|
62
|
-
return (e, i) => (a(), c(t(
|
|
62
|
+
d("cancel", e), v();
|
|
63
|
+
}, w = p(() => s.confirmButtonText || y("el.popconfirm.confirmButtonText")), $ = p(() => s.cancelButtonText || y("el.popconfirm.cancelButtonText"));
|
|
64
|
+
return (e, i) => (a(), c(t(A), z({
|
|
63
65
|
ref_key: "tooltipRef",
|
|
64
66
|
ref: T,
|
|
65
67
|
trigger: "click",
|
|
@@ -79,7 +81,7 @@ const G = R({
|
|
|
79
81
|
f("div", {
|
|
80
82
|
class: l(t(n).e("main"))
|
|
81
83
|
}, [
|
|
82
|
-
!e.hideIcon && e.icon ? (a(), c(t(
|
|
84
|
+
!e.hideIcon && e.icon ? (a(), c(t(q), {
|
|
83
85
|
key: 0,
|
|
84
86
|
class: l(t(n).e("icon")),
|
|
85
87
|
style: I({ color: e.iconColor })
|
|
@@ -89,13 +91,13 @@ const G = R({
|
|
|
89
91
|
]),
|
|
90
92
|
_: 1
|
|
91
93
|
}, 8, ["class", "style"])) : g("v-if", !0),
|
|
92
|
-
|
|
94
|
+
m(" " + u(e.title), 1)
|
|
93
95
|
], 2),
|
|
94
96
|
f("div", {
|
|
95
97
|
class: l(t(n).e("action"))
|
|
96
98
|
}, [
|
|
97
99
|
C(e.$slots, "actions", {
|
|
98
|
-
confirm:
|
|
100
|
+
confirm: B,
|
|
99
101
|
cancel: h
|
|
100
102
|
}, () => [
|
|
101
103
|
E(t(P), {
|
|
@@ -105,7 +107,7 @@ const G = R({
|
|
|
105
107
|
onClick: h
|
|
106
108
|
}, {
|
|
107
109
|
default: r(() => [
|
|
108
|
-
u(
|
|
110
|
+
m(u(t($)), 1)
|
|
109
111
|
]),
|
|
110
112
|
_: 1
|
|
111
113
|
}, 8, ["type", "text"]),
|
|
@@ -113,10 +115,10 @@ const G = R({
|
|
|
113
115
|
size: "small",
|
|
114
116
|
type: e.confirmButtonType === "text" ? "" : e.confirmButtonType,
|
|
115
117
|
text: e.confirmButtonType === "text",
|
|
116
|
-
onClick:
|
|
118
|
+
onClick: B
|
|
117
119
|
}, {
|
|
118
120
|
default: r(() => [
|
|
119
|
-
u(
|
|
121
|
+
m(u(t(w)), 1)
|
|
120
122
|
]),
|
|
121
123
|
_: 1
|
|
122
124
|
}, 8, ["type", "text"])
|
|
@@ -131,8 +133,8 @@ const G = R({
|
|
|
131
133
|
}, 16, ["popper-class", "popper-style", "teleported", "hide-after", "persistent"]));
|
|
132
134
|
}
|
|
133
135
|
});
|
|
134
|
-
var O = /* @__PURE__ */
|
|
135
|
-
const
|
|
136
|
+
var O = /* @__PURE__ */ L(K, [["__file", "popconfirm.vue"]]);
|
|
137
|
+
const oe = U(O);
|
|
136
138
|
export {
|
|
137
|
-
|
|
139
|
+
oe as E
|
|
138
140
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),l=require("./el-button-62966947.cjs"),y=require("./index-afc88a4b.cjs"),c=require("./el-popper-7adbf1c6.cjs"),r=require("./base-0ca7c43a.cjs"),v=require("./use-form-common-props-74a96df2.cjs"),h=require("./index-375e8de4.cjs"),g=r.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:v.iconPropType,default:()=>y.question_filled_default},iconColor:{type:String,default:"#f90"},hideIcon:{type:Boolean,default:!1},hideAfter:{type:Number,default:200},teleported:c.useTooltipContentProps.teleported,persistent:c.useTooltipContentProps.persistent,width:{type:[String,Number],default:150}}),P={confirm:o=>o instanceof MouseEvent,cancel:o=>o instanceof MouseEvent},k=e.defineComponent({name:"ElPopconfirm"}),E=e.defineComponent({...k,props:g,emits:P,setup(o,{emit:p}){const i=o,{t:a}=h.useLocale(),n=r.useNamespace("popconfirm"),u=e.ref(),f=()=>{var t,s;(s=(t=u.value)==null?void 0:t.onClose)==null||s.call(t)},B=e.computed(()=>({width:r.addUnit(i.width)})),m=t=>{p("confirm",t),f()},d=t=>{p("cancel",t),f()},T=e.computed(()=>i.confirmButtonText||a("el.popconfirm.confirmButtonText")),C=e.computed(()=>i.cancelButtonText||a("el.popconfirm.cancelButtonText"));return(t,s)=>(e.openBlock(),e.createBlock(e.unref(c.ElTooltip),e.mergeProps({ref_key:"tooltipRef",ref:u,trigger:"click",effect:"light"},t.$attrs,{"popper-class":`${e.unref(n).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(n).b())},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("main"))},[!t.hideIcon&&t.icon?(e.openBlock(),e.createBlock(e.unref(y.ElIcon),{key:0,class:e.normalizeClass(e.unref(n).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(n).e("action"))},[e.renderSlot(t.$slots,"actions",{confirm:m,cancel:d},()=>[e.createVNode(e.unref(l.ElButton),{size:"small",type:t.cancelButtonType==="text"?"":t.cancelButtonType,text:t.cancelButtonType==="text",onClick:d},{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:m},{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 N=r._export_sfc(E,[["__file","popconfirm.vue"]]);const S=r.withInstall(N);exports.ElPopconfirm=S;
|