st-comp 0.0.194 → 0.0.196
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.js +4 -4
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +270 -154
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +29 -29
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +15 -15
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +24 -24
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +20 -20
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +14 -14
- package/es/KlinePlus.cjs +1 -1
- package/es/KlinePlus.js +17 -17
- package/es/Map.cjs +1 -1
- package/es/Map.js +102944 -1
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +1 -1
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +69 -69
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +25 -25
- package/es/User.cjs +1 -1
- package/es/User.js +21 -21
- package/es/VarSelectDialog.cjs +1 -1
- package/es/VarSelectDialog.js +22 -22
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +9 -9
- package/es/VarietySearch.cjs +10 -10
- package/es/VarietySearch.js +1395 -1381
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +13 -13
- package/es/{_initCloneObject-95a1fe6e.cjs → _initCloneObject-1136ed17.cjs} +1 -1
- package/es/{_initCloneObject-25087817.js → _initCloneObject-64989891.js} +9 -9
- package/es/{base-f5b11441.js → base-62a70f61.js} +40 -40
- package/es/{config-provider-95d27ce2.js → config-provider-962c9213.js} +6 -6
- package/es/{config-provider-79c2df1b.cjs → config-provider-c629566a.cjs} +1 -1
- package/es/{debounce-06f59c68.js → debounce-ccdceb02.js} +9 -9
- package/es/{dropdown-7a853d45.js → dropdown-220099ea.js} +9 -9
- package/es/{dropdown-c2ef9062.cjs → dropdown-28ffc2a0.cjs} +1 -1
- package/es/{el-autocomplete-b7bcfb25.cjs → el-autocomplete-01985d09.cjs} +1 -1
- package/es/{el-autocomplete-e74d589c.js → el-autocomplete-a2dd1bb5.js} +15 -15
- package/es/{el-button-5973d99c.cjs → el-button-1cb4ce47.cjs} +1 -1
- package/es/{el-button-5a260464.js → el-button-639a79ee.js} +33 -33
- package/es/{el-dialog-a24f4f8f.cjs → el-dialog-10b4cda4.cjs} +1 -1
- package/es/{el-dialog-8d8f6443.js → el-dialog-43cb14a3.js} +15 -15
- package/es/{el-divider-4e1c0fb8.js → el-divider-2f300113.js} +1 -1
- package/es/{el-empty-deee6b39.js → el-empty-34086220.js} +5 -5
- package/es/{el-form-item-3167d76a.js → el-form-item-5425e443.js} +33 -33
- package/es/{el-form-item-8dc6aec8.cjs → el-form-item-6d81753f.cjs} +1 -1
- package/es/{el-input-06243b61.cjs → el-input-ebe964c2.cjs} +1 -1
- package/es/{el-input-03aad76d.js → el-input-f24248f2.js} +33 -33
- package/es/{el-input-number-12c09ac3.js → el-input-number-36036e60.js} +35 -35
- package/es/{el-input-number-854b2066.cjs → el-input-number-e3d58911.cjs} +1 -1
- package/es/{el-loading-86fdef94.js → el-loading-74b350d7.js} +5 -5
- package/es/{el-loading-a536daf8.cjs → el-loading-a6dd5081.cjs} +1 -1
- package/es/{el-menu-item-1172154b.js → el-menu-item-7d04ed7a.js} +22 -22
- package/es/{el-menu-item-6522d54c.cjs → el-menu-item-9a591f08.cjs} +1 -1
- package/es/{el-message-0aeea1a3.cjs → el-message-3517c44c.cjs} +1 -1
- package/es/{el-message-35d4e3ac.js → el-message-4e885359.js} +23 -23
- package/es/{el-message-box-f43b6e7a.js → el-message-box-1286fd77.js} +20 -20
- package/es/{el-message-box-2e7304ce.cjs → el-message-box-317e9f09.cjs} +1 -1
- package/es/{el-overlay-04659660.js → el-overlay-0310aac7.js} +47 -47
- package/es/{el-overlay-ef92f51f.cjs → el-overlay-ed457566.cjs} +1 -1
- package/es/{el-popconfirm-29d538b6.js → el-popconfirm-6235978c.js} +24 -24
- package/es/{el-popconfirm-58a1b946.cjs → el-popconfirm-d61782ad.cjs} +1 -1
- package/es/{el-popper-c9e0136d.cjs → el-popper-32eaad7d.cjs} +1 -1
- package/es/{el-popper-ee1f8186.js → el-popper-f38ba0a1.js} +126 -126
- package/es/{el-scrollbar-05815cf5.cjs → el-scrollbar-2cac7413.cjs} +1 -1
- package/es/{el-scrollbar-09769d9e.js → el-scrollbar-d8e60ed2.js} +48 -48
- package/es/{el-segmented-d454a924.cjs → el-segmented-bf42d915.cjs} +1 -1
- package/es/{el-segmented-916b982a.js → el-segmented-ee920d27.js} +8 -8
- package/es/{el-select-6d813c15.cjs → el-select-64816d07.cjs} +1 -1
- package/es/{el-select-8cb88e3c.js → el-select-bfade57c.js} +307 -307
- package/es/{el-table-column-762a20e0.cjs → el-table-column-00904cbd.cjs} +1 -1
- package/es/{el-table-column-0c899664.js → el-table-column-41685d02.js} +12 -12
- package/es/{el-tag-554c333b.js → el-tag-ada32d9e.js} +21 -21
- package/es/{el-tag-fe492a6d.cjs → el-tag-defe821c.cjs} +1 -1
- package/es/index-098c2447.cjs +1 -0
- package/es/{index-b07f58c9.js → index-0a8e1adb.js} +75 -60
- package/es/{index-5b62ea0e.js → index-3e26cc9f.js} +52 -52
- package/es/{index-cfeda35a.js → index-482f09b5.js} +1 -1
- package/es/{index-69a9bd75.js → index-492bd129.js} +2 -2
- package/es/{index-b7fd560c.js → index-6277c792.js} +12 -12
- package/es/{index-384ed4b0.js → index-787d3588.js} +3 -3
- package/es/{index-df06f32a.js → index-843be67c.js} +20 -20
- package/es/{index-34048a1d.js → index-89502796.js} +36 -36
- package/es/{index-77f4746b.cjs → index-9b9ef5dd.cjs} +1 -1
- package/es/{index-a9d4ef0f.cjs → index-b306360f.cjs} +1 -1
- package/es/{index-62573d45.cjs → index-bc26fe71.cjs} +1 -1
- package/es/{index-a8ee0e8c.js → index-bc8e277e.js} +1031 -1015
- package/es/{index-7e4e0bd3.cjs → index-d4910ece.cjs} +1 -1
- package/es/{index-fdb71325.cjs → index-d725fef6.cjs} +65 -65
- package/es/{index-ca7dbd47.cjs → index-ecf79ee2.cjs} +1 -1
- package/es/{python-0405c62e.cjs → python-c27ba105.cjs} +1 -1
- package/es/{python-791e6a42.js → python-ecde9ff2.js} +1 -1
- package/es/raf-41aed4d4.js +6 -0
- package/es/{scroll-9e2dd92b.js → scroll-7d352c1f.js} +5 -5
- package/es/style.css +1 -1
- package/es/{use-global-config-1923bb6f.js → use-global-config-2704a841.js} +16 -16
- package/es/{use-global-config-c2c5ca8f.cjs → use-global-config-878461f3.cjs} +1 -1
- package/es/{validator-866ea0bb.cjs → validator-027eff1b.cjs} +1 -1
- package/es/{validator-fd32f925.js → validator-61a65ac7.js} +1 -1
- package/es/{vnode-f9752526.js → vnode-c51c8aa3.js} +1 -1
- package/es/{zh-cn-d667062d.js → zh-cn-19fbf029.js} +2 -2
- package/es/{zh-cn-0fa1aa6d.cjs → zh-cn-6ee4b8df.cjs} +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +173 -173
- package/lib/{index-db060de6.js → index-dac23ed6.js} +16515 -16356
- package/lib/{python-077c8efa.js → python-fdc6b946.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/CustomFunction/index.vue +193 -15
- package/packages/MonacoEditor/index.vue +14 -1
- package/packages/MonacoEditor/tools.js +18 -0
- package/packages/VarietySearch/components/FactorScreen/index.vue +20 -8
- package/packages/VarietySearch/components/FactorScreen/tools.js +19 -0
- package/src/pages/CustomFunction/index.vue +2 -2
- package/src/pages/VarietySearch/index.vue +68 -19
- package/es/index-eab8a286.cjs +0 -1
- package/es/raf-fa761d02.js +0 -6
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as I, computed as d, openBlock as g, createElementBlock as
|
|
2
|
-
import { i as
|
|
3
|
-
import { b as se,
|
|
4
|
-
import { E as q } from "./index-
|
|
5
|
-
import { m as
|
|
6
|
-
import { u as
|
|
7
|
-
import {
|
|
8
|
-
import { m as u } from "./config-provider-
|
|
1
|
+
import { defineComponent as I, computed as d, openBlock as g, createElementBlock as A, normalizeClass as v, unref as o, renderSlot as P, createVNode as z, Transition as J, withCtx as $, withDirectives as K, createElementVNode as x, normalizeStyle as Q, createTextVNode as ve, toDisplayString as X, vShow as Y, shallowReactive as ee, ref as N, onMounted as ye, watch as he, createBlock as E, createCommentVNode as M, resolveDynamicComponent as Ce, Fragment as be, withModifiers as Te, nextTick as Ee, isVNode as te, render as j } from "vue";
|
|
2
|
+
import { i as Se, m as G, c as we, u as Be, T as Ne } from "./el-scrollbar-d8e60ed2.js";
|
|
3
|
+
import { b as se, e as k, u as Me, p as S, n as W, _ as ne, w as $e, s as oe, d as ke, c as F, x as D, o as O, y as Ie, z as _e, E as Le } from "./base-62a70f61.js";
|
|
4
|
+
import { E as q } from "./index-0a8e1adb.js";
|
|
5
|
+
import { m as Oe } from "./typescript-7ae59c4c.js";
|
|
6
|
+
import { u as Ae } from "./use-global-config-2704a841.js";
|
|
7
|
+
import { b as Pe, d as xe } from "./el-popper-f38ba0a1.js";
|
|
8
|
+
import { m as u } from "./config-provider-962c9213.js";
|
|
9
9
|
const De = se({
|
|
10
10
|
value: {
|
|
11
11
|
type: [String, Number],
|
|
@@ -43,7 +43,7 @@ const De = se({
|
|
|
43
43
|
...ze,
|
|
44
44
|
props: De,
|
|
45
45
|
setup(t, { expose: a }) {
|
|
46
|
-
const e = t, s = Me("badge"), i = d(() => e.isDot ? "" :
|
|
46
|
+
const e = t, s = Me("badge"), i = d(() => e.isDot ? "" : S(e.value) && S(e.max) ? e.max < e.value ? `${e.max}+` : `${e.value}` : `${e.value}`), r = d(() => {
|
|
47
47
|
var n, p, y, b, m;
|
|
48
48
|
return [
|
|
49
49
|
{
|
|
@@ -56,7 +56,7 @@ const De = se({
|
|
|
56
56
|
});
|
|
57
57
|
return a({
|
|
58
58
|
content: i
|
|
59
|
-
}), (n, p) => (g(),
|
|
59
|
+
}), (n, p) => (g(), A("div", {
|
|
60
60
|
class: v(o(s).b())
|
|
61
61
|
}, [
|
|
62
62
|
P(n.$slots, "default"),
|
|
@@ -102,7 +102,7 @@ const Re = $e(He), ae = [
|
|
|
102
102
|
"bottom",
|
|
103
103
|
"bottom-left",
|
|
104
104
|
"bottom-right"
|
|
105
|
-
], C = "top", c =
|
|
105
|
+
], C = "top", c = Oe({
|
|
106
106
|
customClass: "",
|
|
107
107
|
dangerouslyUseHTMLString: !1,
|
|
108
108
|
duration: 3e3,
|
|
@@ -133,7 +133,7 @@ const Re = $e(He), ae = [
|
|
|
133
133
|
default: c.duration
|
|
134
134
|
},
|
|
135
135
|
icon: {
|
|
136
|
-
type:
|
|
136
|
+
type: Se,
|
|
137
137
|
default: c.icon
|
|
138
138
|
},
|
|
139
139
|
id: {
|
|
@@ -202,7 +202,7 @@ const Re = $e(He), ae = [
|
|
|
202
202
|
props: Ue,
|
|
203
203
|
emits: Ve,
|
|
204
204
|
setup(t, { expose: a, emit: e }) {
|
|
205
|
-
const s = t, { Close: i } = Ne, r = N(!1), { ns: n, zIndex: p } =
|
|
205
|
+
const s = t, { Close: i } = Ne, r = N(!1), { ns: n, zIndex: p } = Ae("message"), { currentZIndex: y, nextZIndex: b } = p, m = N(), w = N(!1), H = N(0);
|
|
206
206
|
let _;
|
|
207
207
|
const ie = d(() => s.type ? s.type === "error" ? "danger" : s.type : "info"), ce = d(() => {
|
|
208
208
|
const l = s.type;
|
|
@@ -220,7 +220,7 @@ const Re = $e(He), ae = [
|
|
|
220
220
|
_ == null || _();
|
|
221
221
|
}
|
|
222
222
|
function B() {
|
|
223
|
-
w.value = !1,
|
|
223
|
+
w.value = !1, Ee(() => {
|
|
224
224
|
var l;
|
|
225
225
|
r.value || ((l = s.onClose) == null || l.call(s), e("destroy"));
|
|
226
226
|
});
|
|
@@ -238,7 +238,7 @@ const Re = $e(He), ae = [
|
|
|
238
238
|
visible: w,
|
|
239
239
|
bottom: pe,
|
|
240
240
|
close: B
|
|
241
|
-
}), (l, ot) => (g(),
|
|
241
|
+
}), (l, ot) => (g(), E(J, {
|
|
242
242
|
name: o(n).b("fade"),
|
|
243
243
|
onBeforeEnter: (ge) => r.value = !0,
|
|
244
244
|
onBeforeLeave: l.onClose,
|
|
@@ -264,34 +264,34 @@ const Re = $e(He), ae = [
|
|
|
264
264
|
onMouseenter: Z,
|
|
265
265
|
onMouseleave: L
|
|
266
266
|
}, [
|
|
267
|
-
l.repeatNum > 1 ? (g(),
|
|
267
|
+
l.repeatNum > 1 ? (g(), E(o(Re), {
|
|
268
268
|
key: 0,
|
|
269
269
|
value: l.repeatNum,
|
|
270
270
|
type: o(ie),
|
|
271
271
|
class: v(o(n).e("badge"))
|
|
272
272
|
}, null, 8, ["value", "type", "class"])) : M("v-if", !0),
|
|
273
|
-
o(R) ? (g(),
|
|
273
|
+
o(R) ? (g(), E(o(q), {
|
|
274
274
|
key: 1,
|
|
275
275
|
class: v([o(n).e("icon"), o(ce)])
|
|
276
276
|
}, {
|
|
277
277
|
default: $(() => [
|
|
278
|
-
(g(),
|
|
278
|
+
(g(), E(Ce(o(R))))
|
|
279
279
|
]),
|
|
280
280
|
_: 1
|
|
281
281
|
}, 8, ["class"])) : M("v-if", !0),
|
|
282
282
|
P(l.$slots, "default", {}, () => [
|
|
283
|
-
l.dangerouslyUseHTMLString ? (g(),
|
|
283
|
+
l.dangerouslyUseHTMLString ? (g(), A(be, { key: 1 }, [
|
|
284
284
|
M(" Caution here, message could've been compromised, never use user's input as message "),
|
|
285
285
|
x("p", {
|
|
286
286
|
class: v(o(n).e("content")),
|
|
287
287
|
innerHTML: l.message
|
|
288
288
|
}, null, 10, ["innerHTML"])
|
|
289
|
-
], 2112)) : (g(),
|
|
289
|
+
], 2112)) : (g(), A("p", {
|
|
290
290
|
key: 0,
|
|
291
291
|
class: v(o(n).e("content"))
|
|
292
292
|
}, X(l.message), 3))
|
|
293
293
|
]),
|
|
294
|
-
l.showClose ? (g(),
|
|
294
|
+
l.showClose ? (g(), E(o(q), {
|
|
295
295
|
key: 2,
|
|
296
296
|
class: v(o(n).e("closeBtn")),
|
|
297
297
|
onClick: Te(B, ["stop"])
|
|
@@ -325,7 +325,7 @@ const Xe = (t) => {
|
|
|
325
325
|
...c,
|
|
326
326
|
...a
|
|
327
327
|
};
|
|
328
|
-
return Xe(e), Ye(e),
|
|
328
|
+
return Xe(e), Ye(e), O(u.grouping) && !e.grouping && (e.grouping = u.grouping), S(u.duration) && e.duration === 3e3 && (e.duration = u.duration), S(u.offset) && e.offset === 16 && (e.offset = u.offset), O(u.showClose) && !e.showClose && (e.showClose = u.showClose), O(u.plain) && !e.plain && (e.plain = u.plain), e;
|
|
329
329
|
}, et = (t) => {
|
|
330
330
|
const a = t.props.placement || C, e = f[a], s = e.indexOf(t);
|
|
331
331
|
if (s === -1)
|
|
@@ -372,7 +372,7 @@ const Xe = (t) => {
|
|
|
372
372
|
if (r)
|
|
373
373
|
return r.props.repeatNum += 1, r.props.type = e.type, r.handler;
|
|
374
374
|
}
|
|
375
|
-
if (
|
|
375
|
+
if (S(u.max) && s.length >= u.max)
|
|
376
376
|
return { close: () => {
|
|
377
377
|
} };
|
|
378
378
|
const i = tt(e, a);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as Q, ref as k, computed as w, onMounted as me, onUpdated as Se, openBlock as f, createBlock as C, resolveDynamicComponent as I, normalizeClass as r, unref as Ie, normalizeStyle as G, withCtx as E, renderSlot as pe, useAttrs as Ae, nextTick as V, reactive as Re, markRaw as W, watch as se, onBeforeUnmount as $e, toRefs as ze, resolveComponent as z, Transition as Le, withDirectives as U, createVNode as A, createElementVNode as b, withModifiers as K, createElementBlock as
|
|
2
|
-
import { b as Ve, u as Oe,
|
|
3
|
-
import {
|
|
4
|
-
import { E as Ne } from "./el-button-
|
|
5
|
-
import { E as Ue } from "./el-input-
|
|
6
|
-
import { E as
|
|
7
|
-
import { E as We, l as ue } from "./index-
|
|
8
|
-
import { o as ce,
|
|
9
|
-
import { i as Je } from "./validator-
|
|
10
|
-
import { u as Qe } from "./use-global-config-
|
|
11
|
-
import { u as de } from "./index-
|
|
12
|
-
import { u as Ye } from "./el-dialog-
|
|
1
|
+
import { defineComponent as Q, ref as k, computed as w, onMounted as me, onUpdated as Se, openBlock as f, createBlock as C, resolveDynamicComponent as I, normalizeClass as r, unref as Ie, normalizeStyle as G, withCtx as E, renderSlot as pe, useAttrs as Ae, nextTick as V, reactive as Re, markRaw as W, watch as se, onBeforeUnmount as $e, toRefs as ze, resolveComponent as z, Transition as Le, withDirectives as U, createVNode as A, createElementVNode as b, withModifiers as K, createElementBlock as j, createCommentVNode as S, toDisplayString as L, withKeys as N, vShow as q, createTextVNode as le, isVNode as ge, render as ve } from "vue";
|
|
2
|
+
import { b as Ve, u as Oe, i as X, _ as he, w as Pe, x as Z, c as Y, s as De, y as ae, f as ye, z as ie } from "./base-62a70f61.js";
|
|
3
|
+
import { k as Fe, e as He, T as Ke, m as re } from "./el-scrollbar-d8e60ed2.js";
|
|
4
|
+
import { E as Ne } from "./el-button-639a79ee.js";
|
|
5
|
+
import { E as Ue } from "./el-input-f24248f2.js";
|
|
6
|
+
import { E as je, b as qe, c as Ge } from "./el-overlay-0310aac7.js";
|
|
7
|
+
import { E as We, l as ue } from "./index-0a8e1adb.js";
|
|
8
|
+
import { o as ce, b as Xe, g as Ze } from "./el-popper-f38ba0a1.js";
|
|
9
|
+
import { i as Je } from "./validator-61a65ac7.js";
|
|
10
|
+
import { u as Qe } from "./use-global-config-2704a841.js";
|
|
11
|
+
import { u as de } from "./index-89502796.js";
|
|
12
|
+
import { u as Ye } from "./el-dialog-43cb14a3.js";
|
|
13
13
|
const _e = Ve({
|
|
14
14
|
type: {
|
|
15
15
|
type: String,
|
|
@@ -103,7 +103,7 @@ const Mn = Pe(nn), J = "_trap-focus-children", T = [], fe = (e) => {
|
|
|
103
103
|
ElButton: Ne,
|
|
104
104
|
ElFocusTrap: Ze,
|
|
105
105
|
ElInput: Ue,
|
|
106
|
-
ElOverlay:
|
|
106
|
+
ElOverlay: je,
|
|
107
107
|
ElIcon: We,
|
|
108
108
|
...Ke
|
|
109
109
|
},
|
|
@@ -253,7 +253,7 @@ const Mn = Pe(nn), J = "_trap-focus-children", T = [], fe = (e) => {
|
|
|
253
253
|
}, Me = () => {
|
|
254
254
|
e.closeOnPressEscape && oe();
|
|
255
255
|
};
|
|
256
|
-
return e.lockScroll &&
|
|
256
|
+
return e.lockScroll && qe(m), {
|
|
257
257
|
...ze(n),
|
|
258
258
|
ns: l,
|
|
259
259
|
overlayEvent: Be,
|
|
@@ -327,7 +327,7 @@ function sn(e, o, t, i, l, s) {
|
|
|
327
327
|
onClick: K(() => {
|
|
328
328
|
}, ["stop"])
|
|
329
329
|
}, [
|
|
330
|
-
e.title !== null && e.title !== void 0 ? (f(),
|
|
330
|
+
e.title !== null && e.title !== void 0 ? (f(), j("div", {
|
|
331
331
|
key: 0,
|
|
332
332
|
ref: "headerRef",
|
|
333
333
|
class: r([e.ns.e("header"), { "show-close": e.showClose }])
|
|
@@ -346,7 +346,7 @@ function sn(e, o, t, i, l, s) {
|
|
|
346
346
|
}, 8, ["class"])) : S("v-if", !0),
|
|
347
347
|
b("span", null, L(e.title), 1)
|
|
348
348
|
], 2),
|
|
349
|
-
e.showClose ? (f(),
|
|
349
|
+
e.showClose ? (f(), j("button", {
|
|
350
350
|
key: 0,
|
|
351
351
|
type: "button",
|
|
352
352
|
class: r(e.ns.e("headerbtn")),
|
|
@@ -380,7 +380,7 @@ function sn(e, o, t, i, l, s) {
|
|
|
380
380
|
]),
|
|
381
381
|
_: 1
|
|
382
382
|
}, 8, ["class"])) : S("v-if", !0),
|
|
383
|
-
e.hasMessage ? (f(),
|
|
383
|
+
e.hasMessage ? (f(), j("div", {
|
|
384
384
|
key: 1,
|
|
385
385
|
class: r(e.ns.e("message"))
|
|
386
386
|
}, [
|
|
@@ -418,7 +418,7 @@ function sn(e, o, t, i, l, s) {
|
|
|
418
418
|
})
|
|
419
419
|
}, L(e.editorErrorMessage), 7)
|
|
420
420
|
], 2), [
|
|
421
|
-
[
|
|
421
|
+
[q, e.showInput]
|
|
422
422
|
])
|
|
423
423
|
], 10, ["id"]),
|
|
424
424
|
b("div", {
|
|
@@ -456,7 +456,7 @@ function sn(e, o, t, i, l, s) {
|
|
|
456
456
|
]),
|
|
457
457
|
_: 1
|
|
458
458
|
}, 8, ["loading", "loading-icon", "class", "round", "disabled", "size", "onClick", "onKeydown"]), [
|
|
459
|
-
[
|
|
459
|
+
[q, e.showConfirmButton]
|
|
460
460
|
])
|
|
461
461
|
], 2)
|
|
462
462
|
], 14, ["onClick"])
|
|
@@ -467,7 +467,7 @@ function sn(e, o, t, i, l, s) {
|
|
|
467
467
|
]),
|
|
468
468
|
_: 3
|
|
469
469
|
}, 8, ["z-index", "overlay-class", "mask"]), [
|
|
470
|
-
[
|
|
470
|
+
[q, e.visible]
|
|
471
471
|
])
|
|
472
472
|
]),
|
|
473
473
|
_: 3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("vue"),i=require("./base-ef747d02.cjs"),k=require("./el-scrollbar-05815cf5.cjs"),Q=require("./el-button-5973d99c.cjs"),Y=require("./el-input-06243b61.cjs"),A=require("./el-overlay-ef92f51f.cjs"),N=require("./index-eab8a286.cjs"),z=require("./el-popper-c9e0136d.cjs"),x=require("./validator-866ea0bb.cjs"),_=require("./use-global-config-c2c5ca8f.cjs"),F=require("./index-9780a537.cjs"),ee=require("./el-dialog-a24f4f8f.cjs"),ne=i.buildProps({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:k.componentSizes,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}}),oe=n.defineComponent({name:"ElText"}),te=n.defineComponent({...oe,props:ne,setup(e){const t=e,l=n.ref(),c=k.useFormSize(),a=i.useNamespace("text"),s=n.computed(()=>[a.b(),a.m(t.type),a.m(c.value),a.is("truncated",t.truncated),a.is("line-clamp",!i.isUndefined(t.lineClamp))]),d=()=>{var u,m,o,B,f,T,M;if(n.useAttrs().title)return;let C=!1;const I=((u=l.value)==null?void 0:u.textContent)||"";if(t.truncated){const p=(m=l.value)==null?void 0:m.offsetWidth,h=(o=l.value)==null?void 0:o.scrollWidth;p&&h&&h>p&&(C=!0)}else if(!i.isUndefined(t.lineClamp)){const p=(B=l.value)==null?void 0:B.offsetHeight,h=(f=l.value)==null?void 0:f.scrollHeight;p&&h&&h>p&&(C=!0)}C?(T=l.value)==null||T.setAttribute("title",I):(M=l.value)==null||M.removeAttribute("title")};return n.onMounted(d),n.onUpdated(d),(u,m)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(u.tag),{ref_key:"textRef",ref:l,class:n.normalizeClass(n.unref(s)),style:n.normalizeStyle({"-webkit-line-clamp":u.lineClamp})},{default:n.withCtx(()=>[n.renderSlot(u.$slots,"default")]),_:3},8,["class","style"]))}});var le=i._export_sfc(te,[["__file","text.vue"]]);const se=i.withInstall(le),D="_trap-focus-children",b=[],K=e=>{if(b.length===0)return;const t=b[b.length-1][D];if(t.length>0&&e.code===z.EVENT_CODE.tab){if(t.length===1){e.preventDefault(),document.activeElement!==t[0]&&t[0].focus();return}const l=e.shiftKey,c=e.target===t[0],a=e.target===t[t.length-1];c&&l&&(e.preventDefault(),t[t.length-1].focus()),a&&!l&&(e.preventDefault(),t[0].focus())}},ae={beforeMount(e){e[D]=z.obtainAllFocusableElements(e),b.push(e),b.length<=1&&document.addEventListener("keydown",K)},updated(e){n.nextTick(()=>{e[D]=z.obtainAllFocusableElements(e)})},unmounted(){b.shift(),b.length===0&&document.removeEventListener("keydown",K)}},re=n.defineComponent({name:"ElMessageBox",directives:{TrapFocus:ae},components:{ElButton:Q.ElButton,ElFocusTrap:z.ElFocusTrap,ElInput:Y.ElInput,ElOverlay:A.ElOverlay,ElIcon:N.ElIcon,...k.TypeComponents},inheritAttrs:!1,props:{buttonSize:{type:String,validator:x.isValidComponentSize},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:l,zIndex:c,ns:a,size:s}=_.useGlobalComponentSettings("message-box",n.computed(()=>e.buttonSize)),{t:d}=l,{nextZIndex:u}=c,m=n.ref(!1),o=n.reactive({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:n.markRaw(N.loading_default),cancelButtonLoadingIcon:n.markRaw(N.loading_default),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:u()}),B=n.computed(()=>{const r=o.type;return{[a.bm("icon",r)]:r&&k.TypeComponentsMap[r]}}),f=F.useId(),T=F.useId(),M=n.computed(()=>{const r=o.type;return o.icon||r&&k.TypeComponentsMap[r]||""}),R=n.computed(()=>!!o.message),C=n.ref(),I=n.ref(),p=n.ref(),h=n.ref(),O=n.ref(),U=n.computed(()=>o.confirmButtonClass);n.watch(()=>o.inputValue,async r=>{await n.nextTick(),e.boxType==="prompt"&&r&&L()},{immediate:!0}),n.watch(()=>m.value,r=>{var v,g;r&&(e.boxType!=="prompt"&&(o.autofocus?p.value=(g=(v=O.value)==null?void 0:v.$el)!=null?g:C.value:p.value=C.value),o.zIndex=u()),e.boxType==="prompt"&&(r?n.nextTick().then(()=>{var q;h.value&&h.value.$el&&(o.autofocus?p.value=(q=Z())!=null?q:C.value:p.value=C.value)}):(o.editorErrorMessage="",o.validateError=!1))});const H=n.computed(()=>e.draggable),j=n.computed(()=>e.overflow),{isDragging:G}=ee.useDraggable(C,I,H,j);n.onMounted(async()=>{await n.nextTick(),e.closeOnHashChange&&window.addEventListener("hashchange",w)}),n.onBeforeUnmount(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",w)});function w(){m.value&&(m.value=!1,n.nextTick(()=>{o.action&&t("action",o.action)}))}const $=()=>{e.closeOnClickModal&&V(o.distinguishCancelAndClose?"close":"cancel")},W=A.useSameTarget($),X=r=>{if(o.inputType!=="textarea")return r.preventDefault(),V("confirm")},V=r=>{var v;e.boxType==="prompt"&&r==="confirm"&&!L()||(o.action=r,o.beforeClose?(v=o.beforeClose)==null||v.call(o,r,o,w):w())},L=()=>{if(e.boxType==="prompt"){const r=o.inputPattern;if(r&&!r.test(o.inputValue||""))return o.editorErrorMessage=o.inputErrorMessage||d("el.messagebox.error"),o.validateError=!0,!1;const v=o.inputValidator;if(i.isFunction(v)){const g=v(o.inputValue);if(g===!1)return o.editorErrorMessage=o.inputErrorMessage||d("el.messagebox.error"),o.validateError=!0,!1;if(i.isString(g))return o.editorErrorMessage=g,o.validateError=!0,!1}}return o.editorErrorMessage="",o.validateError=!1,!0},Z=()=>{var r,v;const g=(r=h.value)==null?void 0:r.$refs;return(v=g==null?void 0:g.input)!=null?v:g==null?void 0:g.textarea},P=()=>{V("close")},J=()=>{e.closeOnPressEscape&&P()};return e.lockScroll&&A.useLockscreen(m),{...n.toRefs(o),ns:a,overlayEvent:W,visible:m,hasMessage:R,typeClass:B,contentId:f,inputId:T,btnSize:s,iconComponent:M,confirmButtonClasses:U,rootRef:C,focusStartRef:p,headerRef:I,inputRef:h,isDragging:G,confirmRef:O,doClose:w,handleClose:P,onCloseRequested:J,handleWrapperClick:$,handleInputEnter:X,handleAction:V,t:d}}});function ie(e,t,l,c,a,s){const d=n.resolveComponent("el-icon"),u=n.resolveComponent("el-input"),m=n.resolveComponent("el-button"),o=n.resolveComponent("el-focus-trap"),B=n.resolveComponent("el-overlay");return n.openBlock(),n.createBlock(n.Transition,{name:"fade-in-linear",onAfterLeave:f=>e.$emit("vanish"),persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createVNode(B,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:n.withCtx(()=>[n.createElementVNode("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:n.normalizeClass(`${e.ns.namespace.value}-overlay-message-box`),onClick:e.overlayEvent.onClick,onMousedown:e.overlayEvent.onMousedown,onMouseup:e.overlayEvent.onMouseup},[n.createVNode(o,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:n.withCtx(()=>[n.createElementVNode("div",{ref:"rootRef",class:n.normalizeClass([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),e.ns.is("dragging",e.isDragging),{[e.ns.m("center")]:e.center}]),style:n.normalizeStyle(e.customStyle),tabindex:"-1",onClick:n.withModifiers(()=>{},["stop"])},[e.title!==null&&e.title!==void 0?(n.openBlock(),n.createElementBlock("div",{key:0,ref:"headerRef",class:n.normalizeClass([e.ns.e("header"),{"show-close":e.showClose}])},[n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("title"))},[e.iconComponent&&e.center?(n.openBlock(),n.createBlock(d,{key:0,class:n.normalizeClass([e.ns.e("status"),e.typeClass])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0),n.createElementVNode("span",null,n.toDisplayString(e.title),1)],2),e.showClose?(n.openBlock(),n.createElementBlock("button",{key:0,type:"button",class:n.normalizeClass(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),onKeydown:n.withKeys(n.withModifiers(f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[n.createVNode(d,{class:n.normalizeClass(e.ns.e("close"))},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.closeIcon||"close")))]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):n.createCommentVNode("v-if",!0)],2)):n.createCommentVNode("v-if",!0),n.createElementVNode("div",{id:e.contentId,class:n.normalizeClass(e.ns.e("content"))},[n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(n.openBlock(),n.createBlock(d,{key:0,class:n.normalizeClass([e.ns.e("status"),e.typeClass])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0),e.hasMessage?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(e.ns.e("message"))},[n.renderSlot(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0,textContent:n.toDisplayString(e.message)},null,8,["for","textContent"]))])],2)):n.createCommentVNode("v-if",!0)],2),n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("input"))},[n.createVNode(u,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":f=>e.inputValue=f,type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:n.normalizeClass({invalid:e.validateError}),onKeydown:n.withKeys(e.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("errormsg")),style:n.normalizeStyle({visibility:e.editorErrorMessage?"visible":"hidden"})},n.toDisplayString(e.editorErrorMessage),7)],2),[[n.vShow,e.showInput]])],10,["id"]),n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("btns"))},[e.showCancelButton?(n.openBlock(),n.createBlock(m,{key:0,loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:n.normalizeClass([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:f=>e.handleAction("cancel"),onKeydown:n.withKeys(n.withModifiers(f=>e.handleAction("cancel"),["prevent"]),["enter"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):n.createCommentVNode("v-if",!0),n.withDirectives(n.createVNode(m,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:n.normalizeClass([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:f=>e.handleAction("confirm"),onKeydown:n.withKeys(n.withModifiers(f=>e.handleAction("confirm"),["prevent"]),["enter"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[n.vShow,e.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[n.vShow,e.visible]])]),_:3},8,["onAfterLeave"])}var ce=i._export_sfc(re,[["render",ie],["__file","index.vue"]]);const S=new Map,ue=e=>{let t=document.body;return e.appendTo&&(i.isString(e.appendTo)&&(t=document.querySelector(e.appendTo)),i.isElement(e.appendTo)&&(t=e.appendTo),i.isElement(t)||(t=document.body)),t},de=(e,t,l=null)=>{const c=n.createVNode(ce,e,i.isFunction(e.message)||n.isVNode(e.message)?{default:i.isFunction(e.message)?e.message:()=>e.message}:null);return c.appContext=l,n.render(c,t),ue(e).appendChild(t.firstElementChild),c.component},fe=()=>document.createElement("div"),me=(e,t)=>{const l=fe();e.onVanish=()=>{n.render(null,l),S.delete(a)},e.onAction=s=>{const d=S.get(a);let u;e.showInput?u={value:a.inputValue,action:s}:u=s,e.callback?e.callback(u,c.proxy):s==="cancel"||s==="close"?e.distinguishCancelAndClose&&s!=="cancel"?d.reject("close"):d.reject("cancel"):d.resolve(u)};const c=de(e,l,t),a=c.proxy;for(const s in e)i.hasOwn(e,s)&&!i.hasOwn(a.$props,s)&&(s==="closeIcon"&&i.isObject(e[s])?a[s]=n.markRaw(e[s]):a[s]=e[s]);return a.visible=!0,a};function E(e,t=null){if(!i.isClient)return Promise.reject();let l;return i.isString(e)||n.isVNode(e)?e={message:e}:l=e.callback,new Promise((c,a)=>{const s=me(e,t??E._context);S.set(s,{options:e,callback:l,resolve:c,reject:a})})}const pe=["alert","confirm","prompt"],ve={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};pe.forEach(e=>{E[e]=ge(e)});function ge(e){return(t,l,c,a)=>{let s="";return i.isObject(l)?(c=l,s=""):i.isUndefined(l)?s="":s=l,E(Object.assign({title:s,message:t,type:"",...ve[e]},c,{boxType:e}),a)}}E.close=()=>{S.forEach((e,t)=>{t.doClose()}),S.clear()};E._context=null;const y=E;y.install=e=>{y._context=e._context,e.config.globalProperties.$msgbox=y,e.config.globalProperties.$messageBox=y,e.config.globalProperties.$alert=y.alert,e.config.globalProperties.$confirm=y.confirm,e.config.globalProperties.$prompt=y.prompt};const Ce=y;exports.ElMessageBox=Ce;exports.ElText=se;
|
|
1
|
+
"use strict";const n=require("vue"),i=require("./base-ef747d02.cjs"),k=require("./el-scrollbar-2cac7413.cjs"),Q=require("./el-button-1cb4ce47.cjs"),Y=require("./el-input-ebe964c2.cjs"),A=require("./el-overlay-ed457566.cjs"),N=require("./index-098c2447.cjs"),z=require("./el-popper-32eaad7d.cjs"),x=require("./validator-027eff1b.cjs"),_=require("./use-global-config-878461f3.cjs"),F=require("./index-9780a537.cjs"),ee=require("./el-dialog-10b4cda4.cjs"),ne=i.buildProps({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:k.componentSizes,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}}),oe=n.defineComponent({name:"ElText"}),te=n.defineComponent({...oe,props:ne,setup(e){const t=e,l=n.ref(),c=k.useFormSize(),a=i.useNamespace("text"),s=n.computed(()=>[a.b(),a.m(t.type),a.m(c.value),a.is("truncated",t.truncated),a.is("line-clamp",!i.isUndefined(t.lineClamp))]),d=()=>{var u,m,o,B,f,T,M;if(n.useAttrs().title)return;let C=!1;const I=((u=l.value)==null?void 0:u.textContent)||"";if(t.truncated){const p=(m=l.value)==null?void 0:m.offsetWidth,h=(o=l.value)==null?void 0:o.scrollWidth;p&&h&&h>p&&(C=!0)}else if(!i.isUndefined(t.lineClamp)){const p=(B=l.value)==null?void 0:B.offsetHeight,h=(f=l.value)==null?void 0:f.scrollHeight;p&&h&&h>p&&(C=!0)}C?(T=l.value)==null||T.setAttribute("title",I):(M=l.value)==null||M.removeAttribute("title")};return n.onMounted(d),n.onUpdated(d),(u,m)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(u.tag),{ref_key:"textRef",ref:l,class:n.normalizeClass(n.unref(s)),style:n.normalizeStyle({"-webkit-line-clamp":u.lineClamp})},{default:n.withCtx(()=>[n.renderSlot(u.$slots,"default")]),_:3},8,["class","style"]))}});var le=i._export_sfc(te,[["__file","text.vue"]]);const se=i.withInstall(le),D="_trap-focus-children",b=[],K=e=>{if(b.length===0)return;const t=b[b.length-1][D];if(t.length>0&&e.code===z.EVENT_CODE.tab){if(t.length===1){e.preventDefault(),document.activeElement!==t[0]&&t[0].focus();return}const l=e.shiftKey,c=e.target===t[0],a=e.target===t[t.length-1];c&&l&&(e.preventDefault(),t[t.length-1].focus()),a&&!l&&(e.preventDefault(),t[0].focus())}},ae={beforeMount(e){e[D]=z.obtainAllFocusableElements(e),b.push(e),b.length<=1&&document.addEventListener("keydown",K)},updated(e){n.nextTick(()=>{e[D]=z.obtainAllFocusableElements(e)})},unmounted(){b.shift(),b.length===0&&document.removeEventListener("keydown",K)}},re=n.defineComponent({name:"ElMessageBox",directives:{TrapFocus:ae},components:{ElButton:Q.ElButton,ElFocusTrap:z.ElFocusTrap,ElInput:Y.ElInput,ElOverlay:A.ElOverlay,ElIcon:N.ElIcon,...k.TypeComponents},inheritAttrs:!1,props:{buttonSize:{type:String,validator:x.isValidComponentSize},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:l,zIndex:c,ns:a,size:s}=_.useGlobalComponentSettings("message-box",n.computed(()=>e.buttonSize)),{t:d}=l,{nextZIndex:u}=c,m=n.ref(!1),o=n.reactive({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:n.markRaw(N.loading_default),cancelButtonLoadingIcon:n.markRaw(N.loading_default),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:u()}),B=n.computed(()=>{const r=o.type;return{[a.bm("icon",r)]:r&&k.TypeComponentsMap[r]}}),f=F.useId(),T=F.useId(),M=n.computed(()=>{const r=o.type;return o.icon||r&&k.TypeComponentsMap[r]||""}),R=n.computed(()=>!!o.message),C=n.ref(),I=n.ref(),p=n.ref(),h=n.ref(),O=n.ref(),U=n.computed(()=>o.confirmButtonClass);n.watch(()=>o.inputValue,async r=>{await n.nextTick(),e.boxType==="prompt"&&r&&L()},{immediate:!0}),n.watch(()=>m.value,r=>{var v,g;r&&(e.boxType!=="prompt"&&(o.autofocus?p.value=(g=(v=O.value)==null?void 0:v.$el)!=null?g:C.value:p.value=C.value),o.zIndex=u()),e.boxType==="prompt"&&(r?n.nextTick().then(()=>{var q;h.value&&h.value.$el&&(o.autofocus?p.value=(q=Z())!=null?q:C.value:p.value=C.value)}):(o.editorErrorMessage="",o.validateError=!1))});const H=n.computed(()=>e.draggable),j=n.computed(()=>e.overflow),{isDragging:G}=ee.useDraggable(C,I,H,j);n.onMounted(async()=>{await n.nextTick(),e.closeOnHashChange&&window.addEventListener("hashchange",w)}),n.onBeforeUnmount(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",w)});function w(){m.value&&(m.value=!1,n.nextTick(()=>{o.action&&t("action",o.action)}))}const $=()=>{e.closeOnClickModal&&V(o.distinguishCancelAndClose?"close":"cancel")},W=A.useSameTarget($),X=r=>{if(o.inputType!=="textarea")return r.preventDefault(),V("confirm")},V=r=>{var v;e.boxType==="prompt"&&r==="confirm"&&!L()||(o.action=r,o.beforeClose?(v=o.beforeClose)==null||v.call(o,r,o,w):w())},L=()=>{if(e.boxType==="prompt"){const r=o.inputPattern;if(r&&!r.test(o.inputValue||""))return o.editorErrorMessage=o.inputErrorMessage||d("el.messagebox.error"),o.validateError=!0,!1;const v=o.inputValidator;if(i.isFunction(v)){const g=v(o.inputValue);if(g===!1)return o.editorErrorMessage=o.inputErrorMessage||d("el.messagebox.error"),o.validateError=!0,!1;if(i.isString(g))return o.editorErrorMessage=g,o.validateError=!0,!1}}return o.editorErrorMessage="",o.validateError=!1,!0},Z=()=>{var r,v;const g=(r=h.value)==null?void 0:r.$refs;return(v=g==null?void 0:g.input)!=null?v:g==null?void 0:g.textarea},P=()=>{V("close")},J=()=>{e.closeOnPressEscape&&P()};return e.lockScroll&&A.useLockscreen(m),{...n.toRefs(o),ns:a,overlayEvent:W,visible:m,hasMessage:R,typeClass:B,contentId:f,inputId:T,btnSize:s,iconComponent:M,confirmButtonClasses:U,rootRef:C,focusStartRef:p,headerRef:I,inputRef:h,isDragging:G,confirmRef:O,doClose:w,handleClose:P,onCloseRequested:J,handleWrapperClick:$,handleInputEnter:X,handleAction:V,t:d}}});function ie(e,t,l,c,a,s){const d=n.resolveComponent("el-icon"),u=n.resolveComponent("el-input"),m=n.resolveComponent("el-button"),o=n.resolveComponent("el-focus-trap"),B=n.resolveComponent("el-overlay");return n.openBlock(),n.createBlock(n.Transition,{name:"fade-in-linear",onAfterLeave:f=>e.$emit("vanish"),persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createVNode(B,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:n.withCtx(()=>[n.createElementVNode("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:n.normalizeClass(`${e.ns.namespace.value}-overlay-message-box`),onClick:e.overlayEvent.onClick,onMousedown:e.overlayEvent.onMousedown,onMouseup:e.overlayEvent.onMouseup},[n.createVNode(o,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:n.withCtx(()=>[n.createElementVNode("div",{ref:"rootRef",class:n.normalizeClass([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),e.ns.is("dragging",e.isDragging),{[e.ns.m("center")]:e.center}]),style:n.normalizeStyle(e.customStyle),tabindex:"-1",onClick:n.withModifiers(()=>{},["stop"])},[e.title!==null&&e.title!==void 0?(n.openBlock(),n.createElementBlock("div",{key:0,ref:"headerRef",class:n.normalizeClass([e.ns.e("header"),{"show-close":e.showClose}])},[n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("title"))},[e.iconComponent&&e.center?(n.openBlock(),n.createBlock(d,{key:0,class:n.normalizeClass([e.ns.e("status"),e.typeClass])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0),n.createElementVNode("span",null,n.toDisplayString(e.title),1)],2),e.showClose?(n.openBlock(),n.createElementBlock("button",{key:0,type:"button",class:n.normalizeClass(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),onKeydown:n.withKeys(n.withModifiers(f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[n.createVNode(d,{class:n.normalizeClass(e.ns.e("close"))},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.closeIcon||"close")))]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):n.createCommentVNode("v-if",!0)],2)):n.createCommentVNode("v-if",!0),n.createElementVNode("div",{id:e.contentId,class:n.normalizeClass(e.ns.e("content"))},[n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(n.openBlock(),n.createBlock(d,{key:0,class:n.normalizeClass([e.ns.e("status"),e.typeClass])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0),e.hasMessage?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(e.ns.e("message"))},[n.renderSlot(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0,textContent:n.toDisplayString(e.message)},null,8,["for","textContent"]))])],2)):n.createCommentVNode("v-if",!0)],2),n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("input"))},[n.createVNode(u,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":f=>e.inputValue=f,type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:n.normalizeClass({invalid:e.validateError}),onKeydown:n.withKeys(e.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("errormsg")),style:n.normalizeStyle({visibility:e.editorErrorMessage?"visible":"hidden"})},n.toDisplayString(e.editorErrorMessage),7)],2),[[n.vShow,e.showInput]])],10,["id"]),n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("btns"))},[e.showCancelButton?(n.openBlock(),n.createBlock(m,{key:0,loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:n.normalizeClass([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:f=>e.handleAction("cancel"),onKeydown:n.withKeys(n.withModifiers(f=>e.handleAction("cancel"),["prevent"]),["enter"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):n.createCommentVNode("v-if",!0),n.withDirectives(n.createVNode(m,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:n.normalizeClass([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:f=>e.handleAction("confirm"),onKeydown:n.withKeys(n.withModifiers(f=>e.handleAction("confirm"),["prevent"]),["enter"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[n.vShow,e.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[n.vShow,e.visible]])]),_:3},8,["onAfterLeave"])}var ce=i._export_sfc(re,[["render",ie],["__file","index.vue"]]);const S=new Map,ue=e=>{let t=document.body;return e.appendTo&&(i.isString(e.appendTo)&&(t=document.querySelector(e.appendTo)),i.isElement(e.appendTo)&&(t=e.appendTo),i.isElement(t)||(t=document.body)),t},de=(e,t,l=null)=>{const c=n.createVNode(ce,e,i.isFunction(e.message)||n.isVNode(e.message)?{default:i.isFunction(e.message)?e.message:()=>e.message}:null);return c.appContext=l,n.render(c,t),ue(e).appendChild(t.firstElementChild),c.component},fe=()=>document.createElement("div"),me=(e,t)=>{const l=fe();e.onVanish=()=>{n.render(null,l),S.delete(a)},e.onAction=s=>{const d=S.get(a);let u;e.showInput?u={value:a.inputValue,action:s}:u=s,e.callback?e.callback(u,c.proxy):s==="cancel"||s==="close"?e.distinguishCancelAndClose&&s!=="cancel"?d.reject("close"):d.reject("cancel"):d.resolve(u)};const c=de(e,l,t),a=c.proxy;for(const s in e)i.hasOwn(e,s)&&!i.hasOwn(a.$props,s)&&(s==="closeIcon"&&i.isObject(e[s])?a[s]=n.markRaw(e[s]):a[s]=e[s]);return a.visible=!0,a};function E(e,t=null){if(!i.isClient)return Promise.reject();let l;return i.isString(e)||n.isVNode(e)?e={message:e}:l=e.callback,new Promise((c,a)=>{const s=me(e,t??E._context);S.set(s,{options:e,callback:l,resolve:c,reject:a})})}const pe=["alert","confirm","prompt"],ve={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};pe.forEach(e=>{E[e]=ge(e)});function ge(e){return(t,l,c,a)=>{let s="";return i.isObject(l)?(c=l,s=""):i.isUndefined(l)?s="":s=l,E(Object.assign({title:s,message:t,type:"",...ve[e]},c,{boxType:e}),a)}}E.close=()=>{S.forEach((e,t)=>{t.doClose()}),S.clear()};E._context=null;const y=E;y.install=e=>{y._context=e._context,e.config.globalProperties.$msgbox=y,e.config.globalProperties.$messageBox=y,e.config.globalProperties.$alert=y.alert,e.config.globalProperties.$confirm=y.confirm,e.config.globalProperties.$prompt=y.prompt};const Ce=y;exports.ElMessageBox=Ce;exports.ElText=se;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as ce, createVNode as de, renderSlot as Y, h as fe, isRef as ve, computed as d, watch as
|
|
2
|
-
import { N as
|
|
3
|
-
import { P } from "./vnode-
|
|
4
|
-
import { i as we,
|
|
5
|
-
import {
|
|
6
|
-
import { g as
|
|
7
|
-
import { u as G } from "./index-
|
|
8
|
-
import { a as
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as ce, createVNode as de, renderSlot as Y, h as fe, isRef as ve, computed as d, watch as x, onScopeDispose as ye, getCurrentInstance as me, ref as S, nextTick as ge, onMounted as be } from "vue";
|
|
2
|
+
import { N as P, b as D, e as _, u as Z, o as Ce, s as q, h as $, a as pe, t as he, r as Se, F as xe, n as _e, f as Ee, j as Be, x as K, d as W } from "./base-62a70f61.js";
|
|
3
|
+
import { P as k } from "./vnode-c51c8aa3.js";
|
|
4
|
+
import { i as we, x as Oe } from "./el-scrollbar-d8e60ed2.js";
|
|
5
|
+
import { x as Ie, U as J, c as Te } from "./el-popper-f38ba0a1.js";
|
|
6
|
+
import { g as Ae } from "./scroll-7d352c1f.js";
|
|
7
|
+
import { u as G } from "./index-89502796.js";
|
|
8
|
+
import { a as Le } from "./use-global-config-2704a841.js";
|
|
9
|
+
const Me = (e) => {
|
|
10
10
|
if (!e)
|
|
11
|
-
return { onClick:
|
|
11
|
+
return { onClick: P, onMousedown: P, onMouseup: P };
|
|
12
12
|
let t = !1, s = !1;
|
|
13
13
|
return { onClick: (l) => {
|
|
14
14
|
t && s && e(l), t = s = !1;
|
|
@@ -17,33 +17,33 @@ const Le = (e) => {
|
|
|
17
17
|
}, onMouseup: (l) => {
|
|
18
18
|
s = l.target === l.currentTarget;
|
|
19
19
|
} };
|
|
20
|
-
},
|
|
20
|
+
}, Pe = D({
|
|
21
21
|
mask: {
|
|
22
22
|
type: Boolean,
|
|
23
23
|
default: !0
|
|
24
24
|
},
|
|
25
25
|
customMaskEvent: Boolean,
|
|
26
26
|
overlayClass: {
|
|
27
|
-
type:
|
|
27
|
+
type: _([
|
|
28
28
|
String,
|
|
29
29
|
Array,
|
|
30
30
|
Object
|
|
31
31
|
])
|
|
32
32
|
},
|
|
33
33
|
zIndex: {
|
|
34
|
-
type:
|
|
34
|
+
type: _([String, Number])
|
|
35
35
|
}
|
|
36
|
-
}),
|
|
36
|
+
}), ke = {
|
|
37
37
|
click: (e) => e instanceof MouseEvent
|
|
38
38
|
}, De = "overlay";
|
|
39
39
|
var Fe = ce({
|
|
40
40
|
name: "ElOverlay",
|
|
41
|
-
props:
|
|
42
|
-
emits:
|
|
41
|
+
props: Pe,
|
|
42
|
+
emits: ke,
|
|
43
43
|
setup(e, { slots: t, emit: s }) {
|
|
44
44
|
const f = Z(De), a = (y) => {
|
|
45
45
|
s("click", y);
|
|
46
|
-
}, { onClick: u, onMousedown: l, onMouseup: v } =
|
|
46
|
+
}, { onClick: u, onMousedown: l, onMouseup: v } = Me(e.customMaskEvent ? void 0 : a);
|
|
47
47
|
return () => e.mask ? de("div", {
|
|
48
48
|
class: [f.b(), e.overlayClass],
|
|
49
49
|
style: {
|
|
@@ -52,7 +52,7 @@ var Fe = ce({
|
|
|
52
52
|
onClick: u,
|
|
53
53
|
onMousedown: l,
|
|
54
54
|
onMouseup: v
|
|
55
|
-
}, [Y(t, "default")],
|
|
55
|
+
}, [Y(t, "default")], k.STYLE | k.CLASS | k.PROPS, ["onClick", "onMouseup", "onMousedown"]) : fe("div", {
|
|
56
56
|
class: e.overlayClass,
|
|
57
57
|
style: {
|
|
58
58
|
zIndex: e.zIndex,
|
|
@@ -108,7 +108,7 @@ const He = Fe, Ze = Symbol("dialogInjectionKey"), H = "dialog-fade", Ne = D({
|
|
|
108
108
|
default: "body"
|
|
109
109
|
},
|
|
110
110
|
beforeClose: {
|
|
111
|
-
type:
|
|
111
|
+
type: _(Function)
|
|
112
112
|
},
|
|
113
113
|
destroyOnClose: Boolean,
|
|
114
114
|
closeOnClickModal: {
|
|
@@ -156,7 +156,7 @@ const He = Fe, Ze = Symbol("dialogInjectionKey"), H = "dialog-fade", Ne = D({
|
|
|
156
156
|
default: "2"
|
|
157
157
|
},
|
|
158
158
|
transition: {
|
|
159
|
-
type:
|
|
159
|
+
type: _([String, Object]),
|
|
160
160
|
default: void 0
|
|
161
161
|
}
|
|
162
162
|
}), Qe = {
|
|
@@ -178,12 +178,12 @@ const He = Fe, Ze = Symbol("dialogInjectionKey"), H = "dialog-fade", Ne = D({
|
|
|
178
178
|
typeof document > "u" || u && document && (document.body.style.width = l, Se(document.body, f.value));
|
|
179
179
|
}, 200);
|
|
180
180
|
};
|
|
181
|
-
|
|
181
|
+
x(e, (y) => {
|
|
182
182
|
if (!y) {
|
|
183
183
|
v();
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
|
-
u = !$(document.body, f.value), u && (l = document.body.style.width, pe(document.body, f.value)), a =
|
|
186
|
+
u = !$(document.body, f.value), u && (l = document.body.style.width, pe(document.body, f.value)), a = Ae(s.namespace.value);
|
|
187
187
|
const i = document.documentElement.clientHeight < document.body.scrollHeight, m = he(document.body, "overflowY");
|
|
188
188
|
a > 0 && (i || m === "scroll") && u && (document.body.style.width = `calc(100% - ${a}px)`);
|
|
189
189
|
}), ye(() => v());
|
|
@@ -191,17 +191,17 @@ const He = Fe, Ze = Symbol("dialogInjectionKey"), H = "dialog-fade", Ne = D({
|
|
|
191
191
|
var s;
|
|
192
192
|
const a = me().emit, { nextZIndex: u } = Oe();
|
|
193
193
|
let l = "";
|
|
194
|
-
const v = G(), y = G(), i = S(!1), m = S(!1), C = S(!1),
|
|
194
|
+
const v = G(), y = G(), i = S(!1), m = S(!1), C = S(!1), E = S((s = e.zIndex) != null ? s : u());
|
|
195
195
|
let g, b;
|
|
196
|
-
const F =
|
|
196
|
+
const F = Le(), Q = d(() => {
|
|
197
197
|
var o, n;
|
|
198
|
-
return (n = (o = F.value) == null ? void 0 : o.namespace) != null ? n :
|
|
198
|
+
return (n = (o = F.value) == null ? void 0 : o.namespace) != null ? n : xe;
|
|
199
199
|
}), p = d(() => {
|
|
200
200
|
var o;
|
|
201
201
|
return (o = F.value) == null ? void 0 : o.dialog;
|
|
202
202
|
}), X = d(() => {
|
|
203
203
|
const o = {}, n = `--${Q.value}-dialog`;
|
|
204
|
-
return e.fullscreen || (e.top && (o[`${n}-margin-top`] = e.top), e.width && (o[`${n}-width`] =
|
|
204
|
+
return e.fullscreen || (e.top && (o[`${n}-margin-top`] = e.top), e.width && (o[`${n}-width`] = _e(e.width))), o;
|
|
205
205
|
}), R = d(() => {
|
|
206
206
|
var o, n, r;
|
|
207
207
|
return ((r = (n = e.draggable) != null ? n : (o = p.value) == null ? void 0 : o.draggable) != null ? r : !1) && !e.fullscreen;
|
|
@@ -213,19 +213,19 @@ const He = Fe, Ze = Symbol("dialogInjectionKey"), H = "dialog-fade", Ne = D({
|
|
|
213
213
|
return (r = (n = e.overflow) != null ? n : (o = p.value) == null ? void 0 : o.overflow) != null ? r : !1;
|
|
214
214
|
}), oe = d(() => N.value ? { display: "flex" } : {}), ne = d(() => {
|
|
215
215
|
var o, n, r;
|
|
216
|
-
const
|
|
217
|
-
name:
|
|
216
|
+
const L = (r = (n = e.transition) != null ? n : (o = p.value) == null ? void 0 : o.transition) != null ? r : H, re = {
|
|
217
|
+
name: L,
|
|
218
218
|
onAfterEnter: B,
|
|
219
219
|
onBeforeLeave: O,
|
|
220
220
|
onAfterLeave: w
|
|
221
221
|
};
|
|
222
|
-
if (
|
|
223
|
-
const c = { ...
|
|
222
|
+
if (Ee(L)) {
|
|
223
|
+
const c = { ...L }, M = (h, ie) => (V) => {
|
|
224
224
|
Be(h) ? h.forEach((U) => {
|
|
225
225
|
K(U) && U(V);
|
|
226
226
|
}) : K(h) && h(V), ie();
|
|
227
227
|
};
|
|
228
|
-
return c.onAfterEnter =
|
|
228
|
+
return c.onAfterEnter = M(c.onAfterEnter, B), c.onBeforeLeave = M(c.onBeforeLeave, O), c.onAfterLeave = M(c.onAfterLeave, w), c.name || (c.name = H), c;
|
|
229
229
|
}
|
|
230
230
|
return re;
|
|
231
231
|
});
|
|
@@ -242,7 +242,7 @@ const He = Fe, Ze = Symbol("dialogInjectionKey"), H = "dialog-fade", Ne = D({
|
|
|
242
242
|
b == null || b(), g == null || g(), e.openDelay && e.openDelay > 0 ? { stop: g } = W(() => j(), e.openDelay) : j();
|
|
243
243
|
}
|
|
244
244
|
function I() {
|
|
245
|
-
g == null || g(), b == null || b(), e.closeDelay && e.closeDelay > 0 ? { stop: b } = W(() =>
|
|
245
|
+
g == null || g(), b == null || b(), e.closeDelay && e.closeDelay > 0 ? { stop: b } = W(() => A(), e.closeDelay) : A();
|
|
246
246
|
}
|
|
247
247
|
function T() {
|
|
248
248
|
function o(n) {
|
|
@@ -256,7 +256,7 @@ const He = Fe, Ze = Symbol("dialogInjectionKey"), H = "dialog-fade", Ne = D({
|
|
|
256
256
|
function j() {
|
|
257
257
|
q && (i.value = !0);
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function A() {
|
|
260
260
|
i.value = !1;
|
|
261
261
|
}
|
|
262
262
|
function le() {
|
|
@@ -273,15 +273,15 @@ const He = Fe, Ze = Symbol("dialogInjectionKey"), H = "dialog-fade", Ne = D({
|
|
|
273
273
|
function ue() {
|
|
274
274
|
e.closeOnPressEscape && T();
|
|
275
275
|
}
|
|
276
|
-
return
|
|
276
|
+
return x(() => e.zIndex, () => {
|
|
277
277
|
var o;
|
|
278
|
-
|
|
279
|
-
}),
|
|
278
|
+
E.value = (o = e.zIndex) != null ? o : u();
|
|
279
|
+
}), x(() => e.modelValue, (o) => {
|
|
280
280
|
var n;
|
|
281
|
-
o ? (m.value = !1, z(), C.value = !0,
|
|
281
|
+
o ? (m.value = !1, z(), C.value = !0, E.value = (n = e.zIndex) != null ? n : u(), ge(() => {
|
|
282
282
|
a("open"), t.value && (t.value.parentElement.scrollTop = 0, t.value.parentElement.scrollLeft = 0, t.value.scrollTop = 0);
|
|
283
283
|
})) : i.value && I();
|
|
284
|
-
}),
|
|
284
|
+
}), x(() => e.fullscreen, (o) => {
|
|
285
285
|
t.value && (o ? (l = t.value.style.transform, t.value.style.transform = "") : t.value.style.transform = l);
|
|
286
286
|
}), be(() => {
|
|
287
287
|
e.modelValue && (i.value = !0, C.value = !0, z());
|
|
@@ -292,7 +292,7 @@ const He = Fe, Ze = Symbol("dialogInjectionKey"), H = "dialog-fade", Ne = D({
|
|
|
292
292
|
handleClose: T,
|
|
293
293
|
onModalClick: te,
|
|
294
294
|
close: I,
|
|
295
|
-
doClose:
|
|
295
|
+
doClose: A,
|
|
296
296
|
onOpenAutoFocus: le,
|
|
297
297
|
onCloseAutoFocus: ae,
|
|
298
298
|
onCloseRequested: ue,
|
|
@@ -304,7 +304,7 @@ const He = Fe, Ze = Symbol("dialogInjectionKey"), H = "dialog-fade", Ne = D({
|
|
|
304
304
|
overlayDialogStyle: oe,
|
|
305
305
|
rendered: C,
|
|
306
306
|
visible: i,
|
|
307
|
-
zIndex:
|
|
307
|
+
zIndex: E,
|
|
308
308
|
transitionConfig: ne,
|
|
309
309
|
_draggable: R,
|
|
310
310
|
_alignCenter: N,
|
|
@@ -313,12 +313,12 @@ const He = Fe, Ze = Symbol("dialogInjectionKey"), H = "dialog-fade", Ne = D({
|
|
|
313
313
|
};
|
|
314
314
|
export {
|
|
315
315
|
He as E,
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
316
|
+
Qe as a,
|
|
317
|
+
ze as b,
|
|
318
|
+
Me as c,
|
|
319
|
+
Je as d,
|
|
320
|
+
Ne as e,
|
|
321
|
+
qe as f,
|
|
322
|
+
Ze as g,
|
|
323
323
|
Xe as u
|
|
324
324
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),n=require("./base-ef747d02.cjs"),L=require("./vnode-b906ae6d.cjs"),V=require("./el-scrollbar-
|
|
1
|
+
"use strict";const t=require("vue"),n=require("./base-ef747d02.cjs"),L=require("./vnode-b906ae6d.cjs"),V=require("./el-scrollbar-2cac7413.cjs"),S=require("./el-popper-32eaad7d.cjs"),le=require("./scroll-b108dabd.cjs"),q=require("./index-9780a537.cjs"),ae=require("./use-global-config-878461f3.cjs"),K=e=>{if(!e)return{onClick:n.NOOP,onMousedown:n.NOOP,onMouseup:n.NOOP};let a=!1,r=!1;return{onClick:s=>{a&&r&&e(s),a=r=!1},onMousedown:s=>{a=s.target===s.currentTarget},onMouseup:s=>{r=s.target===s.currentTarget}}},se=n.buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:n.definePropType([String,Array,Object])},zIndex:{type:n.definePropType([String,Number])}}),ue={click:e=>e instanceof MouseEvent},re="overlay";var ie=t.defineComponent({name:"ElOverlay",props:se,emits:ue,setup(e,{slots:a,emit:r}){const v=n.useNamespace(re),u=m=>{r("click",m)},{onClick:i,onMousedown:s,onMouseup:y}=K(e.customMaskEvent?void 0:u);return()=>e.mask?t.createVNode("div",{class:[v.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:i,onMousedown:s,onMouseup:y},[t.renderSlot(a,"default")],L.PatchFlags.STYLE|L.PatchFlags.CLASS|L.PatchFlags.PROPS,["onClick","onMouseup","onMousedown"]):t.h("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[t.renderSlot(a,"default")])}});const ce=ie,de=Symbol("dialogInjectionKey"),j="dialog-fade",U=n.buildProps({center:Boolean,alignCenter:{type:Boolean,default:void 0},closeIcon:{type:V.iconPropType},draggable:{type:Boolean,default:void 0},overflow:{type:Boolean,default:void 0},fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),fe={close:()=>!0},ve=n.buildProps({...U,appendToBody:Boolean,appendTo:{type:S.teleportProps.to.type,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},modalPenetrable:Boolean,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"},transition:{type:n.definePropType([String,Object]),default:void 0}}),ye={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[S.UPDATE_MODEL_EVENT]:e=>n.isBoolean(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},Y=(e,a={})=>{t.isRef(e)||S.throwError("[useLockscreen]","You need to pass a ref param to this function");const r=a.ns||n.useNamespace("popup"),v=t.computed(()=>r.bm("parent","hidden"));if(!n.isClient||n.hasClass(document.body,v.value))return;let u=0,i=!1,s="0";const y=()=>{setTimeout(()=>{typeof document>"u"||i&&document&&(document.body.style.width=s,n.removeClass(document.body,v.value))},200)};t.watch(e,m=>{if(!m){y();return}i=!n.hasClass(document.body,v.value),i&&(s=document.body.style.width,n.addClass(document.body,v.value)),u=le.getScrollBarWidth(r.namespace.value);const d=document.documentElement.clientHeight<document.body.scrollHeight,g=n.getStyle(document.body,"overflowY");u>0&&(d||g==="scroll")&&i&&(document.body.style.width=`calc(100% - ${u}px)`)}),t.onScopeDispose(()=>y())},me=(e,a)=>{var r;const u=t.getCurrentInstance().emit,{nextZIndex:i}=V.useZIndex();let s="";const y=q.useId(),m=q.useId(),d=t.ref(!1),g=t.ref(!1),b=t.ref(!1),P=t.ref((r=e.zIndex)!=null?r:i());let p,C;const M=ae.useGlobalConfig(),$=t.computed(()=>{var o,l;return(l=(o=M.value)==null?void 0:o.namespace)!=null?l:n.defaultNamespace}),h=t.computed(()=>{var o;return(o=M.value)==null?void 0:o.dialog}),G=t.computed(()=>{const o={},l=`--${$.value}-dialog`;return e.fullscreen||(e.top&&(o[`${l}-margin-top`]=e.top),e.width&&(o[`${l}-width`]=n.addUnit(e.width))),o}),W=t.computed(()=>{var o,l,c;return((c=(l=e.draggable)!=null?l:(o=h.value)==null?void 0:o.draggable)!=null?c:!1)&&!e.fullscreen}),k=t.computed(()=>{var o,l,c;return(c=(l=e.alignCenter)!=null?l:(o=h.value)==null?void 0:o.alignCenter)!=null?c:!1}),H=t.computed(()=>{var o,l,c;return(c=(l=e.overflow)!=null?l:(o=h.value)==null?void 0:o.overflow)!=null?c:!1}),Z=t.computed(()=>k.value?{display:"flex"}:{}),J=t.computed(()=>{var o,l,c;const x=(c=(l=e.transition)!=null?l:(o=h.value)==null?void 0:o.transition)!=null?c:j,ne={name:x,onAfterEnter:O,onBeforeLeave:_,onAfterLeave:T};if(n.isObject(x)){const f={...x},A=(E,te)=>N=>{n.isArray(E)?E.forEach(z=>{n.isFunction(z)&&z(N)}):n.isFunction(E)&&E(N),te()};return f.onAfterEnter=A(f.onAfterEnter,O),f.onBeforeLeave=A(f.onBeforeLeave,_),f.onAfterLeave=A(f.onAfterLeave,T),f.name||(f.name=j),f}return ne});function O(){u("opened")}function T(){u("closed"),u(S.UPDATE_MODEL_EVENT,!1),e.destroyOnClose&&(b.value=!1)}function _(){u("close")}function D(){C==null||C(),p==null||p(),e.openDelay&&e.openDelay>0?{stop:p}=n.useTimeoutFn(()=>F(),e.openDelay):F()}function w(){p==null||p(),C==null||C(),e.closeDelay&&e.closeDelay>0?{stop:C}=n.useTimeoutFn(()=>I(),e.closeDelay):I()}function B(){function o(l){l||(g.value=!0,d.value=!1)}e.beforeClose?e.beforeClose(o):w()}function Q(){e.closeOnClickModal&&B()}function F(){n.isClient&&(d.value=!0)}function I(){d.value=!1}function X(){u("openAutoFocus")}function R(){u("closeAutoFocus")}function ee(o){var l;((l=o.detail)==null?void 0:l.focusReason)==="pointer"&&o.preventDefault()}e.lockScroll&&Y(d);function oe(){e.closeOnPressEscape&&B()}return t.watch(()=>e.zIndex,()=>{var o;P.value=(o=e.zIndex)!=null?o:i()}),t.watch(()=>e.modelValue,o=>{var l;o?(g.value=!1,D(),b.value=!0,P.value=(l=e.zIndex)!=null?l:i(),t.nextTick(()=>{u("open"),a.value&&(a.value.parentElement.scrollTop=0,a.value.parentElement.scrollLeft=0,a.value.scrollTop=0)})):d.value&&w()}),t.watch(()=>e.fullscreen,o=>{a.value&&(o?(s=a.value.style.transform,a.value.style.transform=""):a.value.style.transform=s)}),t.onMounted(()=>{e.modelValue&&(d.value=!0,b.value=!0,D())}),{afterEnter:O,afterLeave:T,beforeLeave:_,handleClose:B,onModalClick:Q,close:w,doClose:I,onOpenAutoFocus:X,onCloseAutoFocus:R,onCloseRequested:oe,onFocusoutPrevented:ee,titleId:y,bodyId:m,closed:g,style:G,overlayDialogStyle:Z,rendered:b,visible:d,zIndex:P,transitionConfig:J,_draggable:W,_alignCenter:k,_overflow:H}};exports.ElOverlay=ce;exports.dialogContentEmits=fe;exports.dialogContentProps=U;exports.dialogEmits=ye;exports.dialogInjectionKey=de;exports.dialogProps=ve;exports.useDialog=me;exports.useLockscreen=Y;exports.useSameTarget=K;
|