jmash-core 0.0.59 → 0.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{401-DE-TXzCc.mjs → 401-Da_FRa8F.mjs} +2 -2
- package/dist/{404-bKhkditH.mjs → 404-B-yLqgzc.mjs} +1 -1
- package/dist/{BarChart-DGjS_f26.mjs → BarChart-C4cVigGd.mjs} +2 -2
- package/dist/{PieChart-D66O_XMl.mjs → PieChart-DXAeeKov.mjs} +1 -1
- package/dist/{PieChart.vue_vue_type_script_setup_true_lang--HJAxB0M.mjs → PieChart.vue_vue_type_script_setup_true_lang-DeO-_Zu_.mjs} +2 -2
- package/dist/{RadarChart-BbEYnVIB.mjs → RadarChart-CWmASBqH.mjs} +1 -1
- package/dist/{RadarChart.vue_vue_type_script_setup_true_lang-BaKQP2dk.mjs → RadarChart.vue_vue_type_script_setup_true_lang-CPfyBKlD.mjs} +2 -2
- package/dist/{el-card-BFMPAwA0.mjs → el-card-BC8c6Nqv.mjs} +1 -1
- package/dist/{el-col-DFVyNU5b.mjs → el-col-DzruSagK.mjs} +1 -1
- package/dist/{el-form-item-Dv464MKF.mjs → el-form-item-FH0FWnW5.mjs} +1 -1
- package/dist/{index-DGsBiCbV.mjs → index-BEcfFlyz.mjs} +6 -6
- package/dist/{index-B_6ikcFI.mjs → index-BJJPA_t4.mjs} +5 -5
- package/dist/{index-DEBaC_jU.mjs → index-BduP3zhq.mjs} +4 -4
- package/dist/{index-otAWIrpX.mjs → index-CXNg2AIY.mjs} +1 -1
- package/dist/{index-BIgjgL-a.mjs → index-RCy_bVl2.mjs} +7 -3
- package/dist/index.mjs +1 -1
- package/dist/{picture-D2hiMs9J.mjs → picture-Be_t0ujg.mjs} +2 -2
- package/dist/{position-CHQrk0lU.mjs → position-Dr7Dp1AA.mjs} +1 -1
- package/dist/{profile-CCJwsEtq.mjs → profile-B7kK9yO3.mjs} +4 -4
- package/dist/{runAs-C8suolP2.mjs → runAs-B0C3T4Rq.mjs} +1 -1
- package/dist/runAs.vue_vue_type_script_setup_true_lang-D24xjdze.mjs +645 -0
- package/dist/{types-DXRor_zc.mjs → types-CQh1KdEj.mjs} +3 -3
- package/dist/{updatePwd-CgWThOVr.mjs → updatePwd-BZwEBKIy.mjs} +1 -1
- package/dist/{updatePwd.vue_vue_type_script_setup_true_lang-CLY6hMmO.mjs → updatePwd.vue_vue_type_script_setup_true_lang-CcqYxpvS.mjs} +2 -2
- package/dts/src/api/types.d.ts +32 -32
- package/dts/src/hooks/table.d.ts +14 -14
- package/dts/src/lang/package/en.d.ts +2 -0
- package/dts/src/lang/package/zh-cn.d.ts +2 -0
- package/package.json +1 -1
- package/dist/runAs.vue_vue_type_script_setup_true_lang-BZBTd_j_.mjs +0 -610
|
@@ -0,0 +1,645 @@
|
|
|
1
|
+
import { A as we, t as Be, I as Te, s as ke, H as Ie, E as Me, bg as Se, bh as Ae, bi as Ve, bj as ne, bk as oe, bl as Re, bm as $e, _ as Le, bn as Oe, c as Ne, g as de, j as te, V as Pe, a_ as ze, al as se, aN as ae, z as De, a2 as R, bo as Ue, bp as Fe, bq as He, X as Ke, Y as qe, br as je, aq as Xe } from "./index-RCy_bVl2.mjs";
|
|
2
|
+
import { nextTick as D, defineComponent as ce, computed as M, ref as T, reactive as fe, watch as le, onMounted as Ge, onBeforeUnmount as We, toRefs as Ye, resolveComponent as $, openBlock as m, createBlock as h, Transition as Ze, withCtx as p, withDirectives as L, createVNode as g, createElementVNode as y, normalizeClass as c, normalizeStyle as re, withModifiers as j, createElementBlock as U, resolveDynamicComponent as X, createCommentVNode as k, toDisplayString as C, withKeys as G, renderSlot as Je, createTextVNode as S, vShow as F, isVNode as me, render as pe, useModel as Qe, resolveDirective as _e, unref as z } from "vue";
|
|
3
|
+
const xe = 'a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])', en = (e) => process.env.NODE_ENV === "test" ? !0 : getComputedStyle(e).position === "fixed" ? !1 : e.offsetParent !== null, ie = (e) => Array.from(e.querySelectorAll(xe)).filter((n) => nn(n) && en(n)), nn = (e) => {
|
|
4
|
+
if (e.tabIndex > 0 || e.tabIndex === 0 && e.getAttribute("tabIndex") !== null)
|
|
5
|
+
return !0;
|
|
6
|
+
if (e.disabled)
|
|
7
|
+
return !1;
|
|
8
|
+
switch (e.nodeName) {
|
|
9
|
+
case "A":
|
|
10
|
+
return !!e.href && e.rel !== "ignore";
|
|
11
|
+
case "INPUT":
|
|
12
|
+
return !(e.type === "hidden" || e.type === "file");
|
|
13
|
+
case "BUTTON":
|
|
14
|
+
case "SELECT":
|
|
15
|
+
case "TEXTAREA":
|
|
16
|
+
return !0;
|
|
17
|
+
default:
|
|
18
|
+
return !1;
|
|
19
|
+
}
|
|
20
|
+
}, wn = function(e, n, ...t) {
|
|
21
|
+
let s;
|
|
22
|
+
n.includes("mouse") || n.includes("click") ? s = "MouseEvents" : n.includes("key") ? s = "KeyboardEvent" : s = "HTMLEvents";
|
|
23
|
+
const a = document.createEvent(s);
|
|
24
|
+
return a.initEvent(n, ...t), e.dispatchEvent(a), e;
|
|
25
|
+
}, Y = "_trap-focus-children", A = [], ue = (e) => {
|
|
26
|
+
var n;
|
|
27
|
+
if (A.length === 0)
|
|
28
|
+
return;
|
|
29
|
+
const t = A[A.length - 1][Y];
|
|
30
|
+
if (t.length > 0 && e.code === we.tab) {
|
|
31
|
+
if (t.length === 1) {
|
|
32
|
+
e.preventDefault(), document.activeElement !== t[0] && t[0].focus();
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const s = e.shiftKey, a = e.target === t[0], l = e.target === t[t.length - 1];
|
|
36
|
+
if (a && s && (e.preventDefault(), t[t.length - 1].focus()), l && !s && (e.preventDefault(), t[0].focus()), process.env.NODE_ENV === "test") {
|
|
37
|
+
const u = t.indexOf(e.target);
|
|
38
|
+
u !== -1 && ((n = t[s ? u - 1 : u + 1]) == null || n.focus());
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}, on = {
|
|
42
|
+
beforeMount(e) {
|
|
43
|
+
e[Y] = ie(e), A.push(e), A.length <= 1 && document.addEventListener("keydown", ue);
|
|
44
|
+
},
|
|
45
|
+
updated(e) {
|
|
46
|
+
D(() => {
|
|
47
|
+
e[Y] = ie(e);
|
|
48
|
+
});
|
|
49
|
+
},
|
|
50
|
+
unmounted() {
|
|
51
|
+
A.shift(), A.length === 0 && document.removeEventListener("keydown", ue);
|
|
52
|
+
}
|
|
53
|
+
}, tn = ce({
|
|
54
|
+
name: "ElMessageBox",
|
|
55
|
+
directives: {
|
|
56
|
+
TrapFocus: on
|
|
57
|
+
},
|
|
58
|
+
components: {
|
|
59
|
+
ElButton: Be,
|
|
60
|
+
ElFocusTrap: Te,
|
|
61
|
+
ElInput: ke,
|
|
62
|
+
ElOverlay: Ie,
|
|
63
|
+
ElIcon: Me,
|
|
64
|
+
...Se
|
|
65
|
+
},
|
|
66
|
+
inheritAttrs: !1,
|
|
67
|
+
props: {
|
|
68
|
+
buttonSize: {
|
|
69
|
+
type: String,
|
|
70
|
+
validator: Ae
|
|
71
|
+
},
|
|
72
|
+
modal: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: !0
|
|
75
|
+
},
|
|
76
|
+
lockScroll: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: !0
|
|
79
|
+
},
|
|
80
|
+
showClose: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: !0
|
|
83
|
+
},
|
|
84
|
+
closeOnClickModal: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: !0
|
|
87
|
+
},
|
|
88
|
+
closeOnPressEscape: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: !0
|
|
91
|
+
},
|
|
92
|
+
closeOnHashChange: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
default: !0
|
|
95
|
+
},
|
|
96
|
+
center: Boolean,
|
|
97
|
+
draggable: Boolean,
|
|
98
|
+
overflow: Boolean,
|
|
99
|
+
roundButton: {
|
|
100
|
+
default: !1,
|
|
101
|
+
type: Boolean
|
|
102
|
+
},
|
|
103
|
+
container: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: "body"
|
|
106
|
+
},
|
|
107
|
+
boxType: {
|
|
108
|
+
type: String,
|
|
109
|
+
default: ""
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
emits: ["vanish", "action"],
|
|
113
|
+
setup(e, { emit: n }) {
|
|
114
|
+
const {
|
|
115
|
+
locale: t,
|
|
116
|
+
zIndex: s,
|
|
117
|
+
ns: a,
|
|
118
|
+
size: l
|
|
119
|
+
} = Ve("message-box", M(() => e.buttonSize)), { t: u } = t, { nextZIndex: v } = s, f = T(!1), o = fe({
|
|
120
|
+
autofocus: !0,
|
|
121
|
+
beforeClose: null,
|
|
122
|
+
callback: null,
|
|
123
|
+
cancelButtonText: "",
|
|
124
|
+
cancelButtonClass: "",
|
|
125
|
+
confirmButtonText: "",
|
|
126
|
+
confirmButtonClass: "",
|
|
127
|
+
customClass: "",
|
|
128
|
+
customStyle: {},
|
|
129
|
+
dangerouslyUseHTMLString: !1,
|
|
130
|
+
distinguishCancelAndClose: !1,
|
|
131
|
+
icon: "",
|
|
132
|
+
inputPattern: null,
|
|
133
|
+
inputPlaceholder: "",
|
|
134
|
+
inputType: "text",
|
|
135
|
+
inputValue: null,
|
|
136
|
+
inputValidator: null,
|
|
137
|
+
inputErrorMessage: "",
|
|
138
|
+
message: null,
|
|
139
|
+
modalFade: !0,
|
|
140
|
+
modalClass: "",
|
|
141
|
+
showCancelButton: !1,
|
|
142
|
+
showConfirmButton: !0,
|
|
143
|
+
type: "",
|
|
144
|
+
title: void 0,
|
|
145
|
+
showInput: !1,
|
|
146
|
+
action: "",
|
|
147
|
+
confirmButtonLoading: !1,
|
|
148
|
+
cancelButtonLoading: !1,
|
|
149
|
+
confirmButtonDisabled: !1,
|
|
150
|
+
editorErrorMessage: "",
|
|
151
|
+
validateError: !1,
|
|
152
|
+
zIndex: v()
|
|
153
|
+
}), E = M(() => {
|
|
154
|
+
const i = o.type;
|
|
155
|
+
return { [a.bm("icon", i)]: i && ne[i] };
|
|
156
|
+
}), I = oe(), d = oe(), W = M(() => o.icon || ne[o.type] || ""), r = M(() => !!o.message), b = T(), Z = T(), N = T(), K = T(), J = T(), ve = M(() => o.confirmButtonClass);
|
|
157
|
+
le(() => o.inputValue, async (i) => {
|
|
158
|
+
await D(), e.boxType === "prompt" && i !== null && _();
|
|
159
|
+
}, { immediate: !0 }), le(() => f.value, (i) => {
|
|
160
|
+
var w, V;
|
|
161
|
+
i && (e.boxType !== "prompt" && (o.autofocus ? N.value = (V = (w = J.value) == null ? void 0 : w.$el) != null ? V : b.value : N.value = b.value), o.zIndex = v()), e.boxType === "prompt" && (i ? D().then(() => {
|
|
162
|
+
var ee;
|
|
163
|
+
K.value && K.value.$el && (o.autofocus ? N.value = (ee = Ce()) != null ? ee : b.value : N.value = b.value);
|
|
164
|
+
}) : (o.editorErrorMessage = "", o.validateError = !1));
|
|
165
|
+
});
|
|
166
|
+
const ge = M(() => e.draggable), be = M(() => e.overflow);
|
|
167
|
+
Re(b, Z, ge, be), Ge(async () => {
|
|
168
|
+
await D(), e.closeOnHashChange && window.addEventListener("hashchange", P);
|
|
169
|
+
}), We(() => {
|
|
170
|
+
e.closeOnHashChange && window.removeEventListener("hashchange", P);
|
|
171
|
+
});
|
|
172
|
+
function P() {
|
|
173
|
+
f.value && (f.value = !1, D(() => {
|
|
174
|
+
o.action && n("action", o.action);
|
|
175
|
+
}));
|
|
176
|
+
}
|
|
177
|
+
const Q = () => {
|
|
178
|
+
e.closeOnClickModal && q(o.distinguishCancelAndClose ? "close" : "cancel");
|
|
179
|
+
}, ye = Oe(Q), he = (i) => {
|
|
180
|
+
if (o.inputType !== "textarea")
|
|
181
|
+
return i.preventDefault(), q("confirm");
|
|
182
|
+
}, q = (i) => {
|
|
183
|
+
var w;
|
|
184
|
+
e.boxType === "prompt" && i === "confirm" && !_() || (o.action = i, o.beforeClose ? (w = o.beforeClose) == null || w.call(o, i, o, P) : P());
|
|
185
|
+
}, _ = () => {
|
|
186
|
+
if (e.boxType === "prompt") {
|
|
187
|
+
const i = o.inputPattern;
|
|
188
|
+
if (i && !i.test(o.inputValue || ""))
|
|
189
|
+
return o.editorErrorMessage = o.inputErrorMessage || u("el.messagebox.error"), o.validateError = !0, !1;
|
|
190
|
+
const w = o.inputValidator;
|
|
191
|
+
if (typeof w == "function") {
|
|
192
|
+
const V = w(o.inputValue);
|
|
193
|
+
if (V === !1)
|
|
194
|
+
return o.editorErrorMessage = o.inputErrorMessage || u("el.messagebox.error"), o.validateError = !0, !1;
|
|
195
|
+
if (typeof V == "string")
|
|
196
|
+
return o.editorErrorMessage = V, o.validateError = !0, !1;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return o.editorErrorMessage = "", o.validateError = !1, !0;
|
|
200
|
+
}, Ce = () => {
|
|
201
|
+
const i = K.value.$refs;
|
|
202
|
+
return i.input || i.textarea;
|
|
203
|
+
}, x = () => {
|
|
204
|
+
q("close");
|
|
205
|
+
}, Ee = () => {
|
|
206
|
+
e.closeOnPressEscape && x();
|
|
207
|
+
};
|
|
208
|
+
return e.lockScroll && $e(f), {
|
|
209
|
+
...Ye(o),
|
|
210
|
+
ns: a,
|
|
211
|
+
overlayEvent: ye,
|
|
212
|
+
visible: f,
|
|
213
|
+
hasMessage: r,
|
|
214
|
+
typeClass: E,
|
|
215
|
+
contentId: I,
|
|
216
|
+
inputId: d,
|
|
217
|
+
btnSize: l,
|
|
218
|
+
iconComponent: W,
|
|
219
|
+
confirmButtonClasses: ve,
|
|
220
|
+
rootRef: b,
|
|
221
|
+
focusStartRef: N,
|
|
222
|
+
headerRef: Z,
|
|
223
|
+
inputRef: K,
|
|
224
|
+
confirmRef: J,
|
|
225
|
+
doClose: P,
|
|
226
|
+
handleClose: x,
|
|
227
|
+
onCloseRequested: Ee,
|
|
228
|
+
handleWrapperClick: Q,
|
|
229
|
+
handleInputEnter: he,
|
|
230
|
+
handleAction: q,
|
|
231
|
+
t: u
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
}), sn = ["aria-label", "aria-describedby"], an = ["aria-label"], ln = ["id"];
|
|
235
|
+
function rn(e, n, t, s, a, l) {
|
|
236
|
+
const u = $("el-icon"), v = $("close"), f = $("el-input"), o = $("el-button"), E = $("el-focus-trap"), I = $("el-overlay");
|
|
237
|
+
return m(), h(Ze, {
|
|
238
|
+
name: "fade-in-linear",
|
|
239
|
+
onAfterLeave: n[11] || (n[11] = (d) => e.$emit("vanish")),
|
|
240
|
+
persisted: ""
|
|
241
|
+
}, {
|
|
242
|
+
default: p(() => [
|
|
243
|
+
L(g(I, {
|
|
244
|
+
"z-index": e.zIndex,
|
|
245
|
+
"overlay-class": [e.ns.is("message-box"), e.modalClass],
|
|
246
|
+
mask: e.modal
|
|
247
|
+
}, {
|
|
248
|
+
default: p(() => [
|
|
249
|
+
y("div", {
|
|
250
|
+
role: "dialog",
|
|
251
|
+
"aria-label": e.title,
|
|
252
|
+
"aria-modal": "true",
|
|
253
|
+
"aria-describedby": e.showInput ? void 0 : e.contentId,
|
|
254
|
+
class: c(`${e.ns.namespace.value}-overlay-message-box`),
|
|
255
|
+
onClick: n[8] || (n[8] = (...d) => e.overlayEvent.onClick && e.overlayEvent.onClick(...d)),
|
|
256
|
+
onMousedown: n[9] || (n[9] = (...d) => e.overlayEvent.onMousedown && e.overlayEvent.onMousedown(...d)),
|
|
257
|
+
onMouseup: n[10] || (n[10] = (...d) => e.overlayEvent.onMouseup && e.overlayEvent.onMouseup(...d))
|
|
258
|
+
}, [
|
|
259
|
+
g(E, {
|
|
260
|
+
loop: "",
|
|
261
|
+
trapped: e.visible,
|
|
262
|
+
"focus-trap-el": e.rootRef,
|
|
263
|
+
"focus-start-el": e.focusStartRef,
|
|
264
|
+
onReleaseRequested: e.onCloseRequested
|
|
265
|
+
}, {
|
|
266
|
+
default: p(() => [
|
|
267
|
+
y("div", {
|
|
268
|
+
ref: "rootRef",
|
|
269
|
+
class: c([
|
|
270
|
+
e.ns.b(),
|
|
271
|
+
e.customClass,
|
|
272
|
+
e.ns.is("draggable", e.draggable),
|
|
273
|
+
{ [e.ns.m("center")]: e.center }
|
|
274
|
+
]),
|
|
275
|
+
style: re(e.customStyle),
|
|
276
|
+
tabindex: "-1",
|
|
277
|
+
onClick: n[7] || (n[7] = j(() => {
|
|
278
|
+
}, ["stop"]))
|
|
279
|
+
}, [
|
|
280
|
+
e.title !== null && e.title !== void 0 ? (m(), U("div", {
|
|
281
|
+
key: 0,
|
|
282
|
+
ref: "headerRef",
|
|
283
|
+
class: c([e.ns.e("header"), { "show-close": e.showClose }])
|
|
284
|
+
}, [
|
|
285
|
+
y("div", {
|
|
286
|
+
class: c(e.ns.e("title"))
|
|
287
|
+
}, [
|
|
288
|
+
e.iconComponent && e.center ? (m(), h(u, {
|
|
289
|
+
key: 0,
|
|
290
|
+
class: c([e.ns.e("status"), e.typeClass])
|
|
291
|
+
}, {
|
|
292
|
+
default: p(() => [
|
|
293
|
+
(m(), h(X(e.iconComponent)))
|
|
294
|
+
]),
|
|
295
|
+
_: 1
|
|
296
|
+
}, 8, ["class"])) : k("v-if", !0),
|
|
297
|
+
y("span", null, C(e.title), 1)
|
|
298
|
+
], 2),
|
|
299
|
+
e.showClose ? (m(), U("button", {
|
|
300
|
+
key: 0,
|
|
301
|
+
type: "button",
|
|
302
|
+
class: c(e.ns.e("headerbtn")),
|
|
303
|
+
"aria-label": e.t("el.messagebox.close"),
|
|
304
|
+
onClick: n[0] || (n[0] = (d) => e.handleAction(e.distinguishCancelAndClose ? "close" : "cancel")),
|
|
305
|
+
onKeydown: n[1] || (n[1] = G(j((d) => e.handleAction(e.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"]))
|
|
306
|
+
}, [
|
|
307
|
+
g(u, {
|
|
308
|
+
class: c(e.ns.e("close"))
|
|
309
|
+
}, {
|
|
310
|
+
default: p(() => [
|
|
311
|
+
g(v)
|
|
312
|
+
]),
|
|
313
|
+
_: 1
|
|
314
|
+
}, 8, ["class"])
|
|
315
|
+
], 42, an)) : k("v-if", !0)
|
|
316
|
+
], 2)) : k("v-if", !0),
|
|
317
|
+
y("div", {
|
|
318
|
+
id: e.contentId,
|
|
319
|
+
class: c(e.ns.e("content"))
|
|
320
|
+
}, [
|
|
321
|
+
y("div", {
|
|
322
|
+
class: c(e.ns.e("container"))
|
|
323
|
+
}, [
|
|
324
|
+
e.iconComponent && !e.center && e.hasMessage ? (m(), h(u, {
|
|
325
|
+
key: 0,
|
|
326
|
+
class: c([e.ns.e("status"), e.typeClass])
|
|
327
|
+
}, {
|
|
328
|
+
default: p(() => [
|
|
329
|
+
(m(), h(X(e.iconComponent)))
|
|
330
|
+
]),
|
|
331
|
+
_: 1
|
|
332
|
+
}, 8, ["class"])) : k("v-if", !0),
|
|
333
|
+
e.hasMessage ? (m(), U("div", {
|
|
334
|
+
key: 1,
|
|
335
|
+
class: c(e.ns.e("message"))
|
|
336
|
+
}, [
|
|
337
|
+
Je(e.$slots, "default", {}, () => [
|
|
338
|
+
e.dangerouslyUseHTMLString ? (m(), h(X(e.showInput ? "label" : "p"), {
|
|
339
|
+
key: 1,
|
|
340
|
+
for: e.showInput ? e.inputId : void 0,
|
|
341
|
+
innerHTML: e.message
|
|
342
|
+
}, null, 8, ["for", "innerHTML"])) : (m(), h(X(e.showInput ? "label" : "p"), {
|
|
343
|
+
key: 0,
|
|
344
|
+
for: e.showInput ? e.inputId : void 0
|
|
345
|
+
}, {
|
|
346
|
+
default: p(() => [
|
|
347
|
+
S(C(e.dangerouslyUseHTMLString ? "" : e.message), 1)
|
|
348
|
+
]),
|
|
349
|
+
_: 1
|
|
350
|
+
}, 8, ["for"]))
|
|
351
|
+
])
|
|
352
|
+
], 2)) : k("v-if", !0)
|
|
353
|
+
], 2),
|
|
354
|
+
L(y("div", {
|
|
355
|
+
class: c(e.ns.e("input"))
|
|
356
|
+
}, [
|
|
357
|
+
g(f, {
|
|
358
|
+
id: e.inputId,
|
|
359
|
+
ref: "inputRef",
|
|
360
|
+
modelValue: e.inputValue,
|
|
361
|
+
"onUpdate:modelValue": n[2] || (n[2] = (d) => e.inputValue = d),
|
|
362
|
+
type: e.inputType,
|
|
363
|
+
placeholder: e.inputPlaceholder,
|
|
364
|
+
"aria-invalid": e.validateError,
|
|
365
|
+
class: c({ invalid: e.validateError }),
|
|
366
|
+
onKeydown: G(e.handleInputEnter, ["enter"])
|
|
367
|
+
}, null, 8, ["id", "modelValue", "type", "placeholder", "aria-invalid", "class", "onKeydown"]),
|
|
368
|
+
y("div", {
|
|
369
|
+
class: c(e.ns.e("errormsg")),
|
|
370
|
+
style: re({
|
|
371
|
+
visibility: e.editorErrorMessage ? "visible" : "hidden"
|
|
372
|
+
})
|
|
373
|
+
}, C(e.editorErrorMessage), 7)
|
|
374
|
+
], 2), [
|
|
375
|
+
[F, e.showInput]
|
|
376
|
+
])
|
|
377
|
+
], 10, ln),
|
|
378
|
+
y("div", {
|
|
379
|
+
class: c(e.ns.e("btns"))
|
|
380
|
+
}, [
|
|
381
|
+
e.showCancelButton ? (m(), h(o, {
|
|
382
|
+
key: 0,
|
|
383
|
+
loading: e.cancelButtonLoading,
|
|
384
|
+
class: c([e.cancelButtonClass]),
|
|
385
|
+
round: e.roundButton,
|
|
386
|
+
size: e.btnSize,
|
|
387
|
+
onClick: n[3] || (n[3] = (d) => e.handleAction("cancel")),
|
|
388
|
+
onKeydown: n[4] || (n[4] = G(j((d) => e.handleAction("cancel"), ["prevent"]), ["enter"]))
|
|
389
|
+
}, {
|
|
390
|
+
default: p(() => [
|
|
391
|
+
S(C(e.cancelButtonText || e.t("el.messagebox.cancel")), 1)
|
|
392
|
+
]),
|
|
393
|
+
_: 1
|
|
394
|
+
}, 8, ["loading", "class", "round", "size"])) : k("v-if", !0),
|
|
395
|
+
L(g(o, {
|
|
396
|
+
ref: "confirmRef",
|
|
397
|
+
type: "primary",
|
|
398
|
+
loading: e.confirmButtonLoading,
|
|
399
|
+
class: c([e.confirmButtonClasses]),
|
|
400
|
+
round: e.roundButton,
|
|
401
|
+
disabled: e.confirmButtonDisabled,
|
|
402
|
+
size: e.btnSize,
|
|
403
|
+
onClick: n[5] || (n[5] = (d) => e.handleAction("confirm")),
|
|
404
|
+
onKeydown: n[6] || (n[6] = G(j((d) => e.handleAction("confirm"), ["prevent"]), ["enter"]))
|
|
405
|
+
}, {
|
|
406
|
+
default: p(() => [
|
|
407
|
+
S(C(e.confirmButtonText || e.t("el.messagebox.confirm")), 1)
|
|
408
|
+
]),
|
|
409
|
+
_: 1
|
|
410
|
+
}, 8, ["loading", "class", "round", "disabled", "size"]), [
|
|
411
|
+
[F, e.showConfirmButton]
|
|
412
|
+
])
|
|
413
|
+
], 2)
|
|
414
|
+
], 6)
|
|
415
|
+
]),
|
|
416
|
+
_: 3
|
|
417
|
+
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"])
|
|
418
|
+
], 42, sn)
|
|
419
|
+
]),
|
|
420
|
+
_: 3
|
|
421
|
+
}, 8, ["z-index", "overlay-class", "mask"]), [
|
|
422
|
+
[F, e.visible]
|
|
423
|
+
])
|
|
424
|
+
]),
|
|
425
|
+
_: 3
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
var un = /* @__PURE__ */ Le(tn, [["render", rn], ["__file", "index.vue"]]);
|
|
429
|
+
const H = /* @__PURE__ */ new Map(), dn = (e) => {
|
|
430
|
+
let n = document.body;
|
|
431
|
+
return e.appendTo && (de(e.appendTo) && (n = document.querySelector(e.appendTo)), ae(e.appendTo) && (n = e.appendTo), ae(n) || (De("ElMessageBox", "the appendTo option is not an HTMLElement. Falling back to document.body."), n = document.body)), n;
|
|
432
|
+
}, cn = (e, n, t = null) => {
|
|
433
|
+
const s = g(un, e, se(e.message) || me(e.message) ? {
|
|
434
|
+
default: se(e.message) ? e.message : () => e.message
|
|
435
|
+
} : null);
|
|
436
|
+
return s.appContext = t, pe(s, n), dn(e).appendChild(n.firstElementChild), s.component;
|
|
437
|
+
}, fn = () => document.createElement("div"), mn = (e, n) => {
|
|
438
|
+
const t = fn();
|
|
439
|
+
e.onVanish = () => {
|
|
440
|
+
pe(null, t), H.delete(a);
|
|
441
|
+
}, e.onAction = (l) => {
|
|
442
|
+
const u = H.get(a);
|
|
443
|
+
let v;
|
|
444
|
+
e.showInput ? v = { value: a.inputValue, action: l } : v = l, e.callback ? e.callback(v, s.proxy) : l === "cancel" || l === "close" ? e.distinguishCancelAndClose && l !== "cancel" ? u.reject("close") : u.reject("cancel") : u.resolve(v);
|
|
445
|
+
};
|
|
446
|
+
const s = cn(e, t, n), a = s.proxy;
|
|
447
|
+
for (const l in e)
|
|
448
|
+
te(e, l) && !te(a.$props, l) && (a[l] = e[l]);
|
|
449
|
+
return a.visible = !0, a;
|
|
450
|
+
};
|
|
451
|
+
function O(e, n = null) {
|
|
452
|
+
if (!Ne)
|
|
453
|
+
return Promise.reject();
|
|
454
|
+
let t;
|
|
455
|
+
return de(e) || me(e) ? e = {
|
|
456
|
+
message: e
|
|
457
|
+
} : t = e.callback, new Promise((s, a) => {
|
|
458
|
+
const l = mn(e, n ?? O._context);
|
|
459
|
+
H.set(l, {
|
|
460
|
+
options: e,
|
|
461
|
+
callback: t,
|
|
462
|
+
resolve: s,
|
|
463
|
+
reject: a
|
|
464
|
+
});
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
const pn = ["alert", "confirm", "prompt"], vn = {
|
|
468
|
+
alert: { closeOnPressEscape: !1, closeOnClickModal: !1 },
|
|
469
|
+
confirm: { showCancelButton: !0 },
|
|
470
|
+
prompt: { showCancelButton: !0, showInput: !0 }
|
|
471
|
+
};
|
|
472
|
+
pn.forEach((e) => {
|
|
473
|
+
O[e] = gn(e);
|
|
474
|
+
});
|
|
475
|
+
function gn(e) {
|
|
476
|
+
return (n, t, s, a) => {
|
|
477
|
+
let l = "";
|
|
478
|
+
return Pe(t) ? (s = t, l = "") : ze(t) ? l = "" : l = t, O(Object.assign({
|
|
479
|
+
title: l,
|
|
480
|
+
message: n,
|
|
481
|
+
type: "",
|
|
482
|
+
...vn[e]
|
|
483
|
+
}, s, {
|
|
484
|
+
boxType: e
|
|
485
|
+
}), a);
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
O.close = () => {
|
|
489
|
+
H.forEach((e, n) => {
|
|
490
|
+
n.doClose();
|
|
491
|
+
}), H.clear();
|
|
492
|
+
};
|
|
493
|
+
O._context = null;
|
|
494
|
+
const B = O;
|
|
495
|
+
B.install = (e) => {
|
|
496
|
+
B._context = e._context, e.config.globalProperties.$msgbox = B, e.config.globalProperties.$messageBox = B, e.config.globalProperties.$alert = B.alert, e.config.globalProperties.$confirm = B.confirm, e.config.globalProperties.$prompt = B.prompt;
|
|
497
|
+
};
|
|
498
|
+
const bn = B, yn = {
|
|
499
|
+
key: 0,
|
|
500
|
+
class: "distance-left"
|
|
501
|
+
}, hn = ["onClick"], Bn = /* @__PURE__ */ ce({
|
|
502
|
+
__name: "runAs",
|
|
503
|
+
props: {
|
|
504
|
+
modelValue: { type: Boolean },
|
|
505
|
+
modelModifiers: {}
|
|
506
|
+
},
|
|
507
|
+
emits: ["update:modelValue"],
|
|
508
|
+
setup(e) {
|
|
509
|
+
const n = T(!1), t = T([]), s = R().user, a = Qe(e, "modelValue"), l = fe([
|
|
510
|
+
{
|
|
511
|
+
label: "用户名",
|
|
512
|
+
prop: "loginName",
|
|
513
|
+
width: "100",
|
|
514
|
+
sortable: !0,
|
|
515
|
+
isColumn: !0
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
label: "用户昵称",
|
|
519
|
+
prop: "nickName",
|
|
520
|
+
width: "100",
|
|
521
|
+
isColumn: !0
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
label: "手机号",
|
|
525
|
+
prop: "mobilePhone",
|
|
526
|
+
slotName: "mobilePhone",
|
|
527
|
+
columnType: "slot",
|
|
528
|
+
width: "120",
|
|
529
|
+
isColumn: !0,
|
|
530
|
+
sortable: !0
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
label: "邮箱",
|
|
534
|
+
prop: "email",
|
|
535
|
+
width: "180",
|
|
536
|
+
slotName: "email",
|
|
537
|
+
columnType: "slot",
|
|
538
|
+
isColumn: !0,
|
|
539
|
+
sortable: !0
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
label: "状态",
|
|
543
|
+
width: "101",
|
|
544
|
+
slotName: "status",
|
|
545
|
+
columnType: "slot",
|
|
546
|
+
isColumn: !0
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
label: "操作",
|
|
550
|
+
width: "100",
|
|
551
|
+
slotName: "operation",
|
|
552
|
+
columnType: "slot",
|
|
553
|
+
fixed: "right",
|
|
554
|
+
isColumn: !0
|
|
555
|
+
}
|
|
556
|
+
]);
|
|
557
|
+
n.value = !0;
|
|
558
|
+
function u(f) {
|
|
559
|
+
f.showEncrypt = !f.showEncrypt;
|
|
560
|
+
}
|
|
561
|
+
Ue().then(({ data: f }) => {
|
|
562
|
+
n.value = !1, t.value = f.results;
|
|
563
|
+
});
|
|
564
|
+
function v(f) {
|
|
565
|
+
bn.confirm("确定切换用户身份吗?", "提示", {
|
|
566
|
+
confirmButtonText: "确定",
|
|
567
|
+
cancelButtonText: "取消",
|
|
568
|
+
type: "warning"
|
|
569
|
+
}).then(() => {
|
|
570
|
+
console.log(R()), Fe(f.userId).then(async (o) => {
|
|
571
|
+
if (o.status === 200) {
|
|
572
|
+
R().user.roleCodes = [], R().user.permCodes = [];
|
|
573
|
+
const { roleCodes: E } = await R().getRoleInfo(), I = await R().getUserInfo();
|
|
574
|
+
await He().generateRoutes(E, I), Ke({
|
|
575
|
+
message: "切换成功",
|
|
576
|
+
type: "success"
|
|
577
|
+
}), a.value = !1, location.reload();
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
return (f, o) => {
|
|
583
|
+
const E = qe, I = je, d = Xe, W = _e("hasRole");
|
|
584
|
+
return m(), h(d, {
|
|
585
|
+
title: "切换身份",
|
|
586
|
+
modelValue: a.value,
|
|
587
|
+
"onUpdate:modelValue": o[0] || (o[0] = (r) => a.value = r),
|
|
588
|
+
width: "800px"
|
|
589
|
+
}, {
|
|
590
|
+
default: p(() => [
|
|
591
|
+
g(I, {
|
|
592
|
+
class: "table-top",
|
|
593
|
+
ref: "multipleTableRef",
|
|
594
|
+
"row-keys": "userId",
|
|
595
|
+
"list-loading": z(n),
|
|
596
|
+
"table-data": z(t),
|
|
597
|
+
"table-label": z(l)
|
|
598
|
+
}, {
|
|
599
|
+
mobilePhone: p((r) => [
|
|
600
|
+
S(C(r.data.row.showEncrypt ? r.data.row.mobilePhone : r.data.row.mobilePhoneIns), 1)
|
|
601
|
+
]),
|
|
602
|
+
email: p((r) => [
|
|
603
|
+
S(C(r.data.row.showEncrypt ? r.data.row.email : r.data.row.emailIns), 1)
|
|
604
|
+
]),
|
|
605
|
+
status: p((r) => [
|
|
606
|
+
S(C(r.data.row.runAs ? "原身份" : "") + " " + C(r.data.row.userId === z(s).userId ? "当前身份" : ""), 1)
|
|
607
|
+
]),
|
|
608
|
+
operation: p((r) => [
|
|
609
|
+
r.data.row.mobilePhoneIns ? (m(), U("span", yn, [
|
|
610
|
+
L(g(E, {
|
|
611
|
+
"icon-class": "close-eye",
|
|
612
|
+
onClick: (b) => u(r.data.row)
|
|
613
|
+
}, null, 8, ["onClick"]), [
|
|
614
|
+
[F, !r.data.row.showEncrypt]
|
|
615
|
+
]),
|
|
616
|
+
L(g(E, {
|
|
617
|
+
"icon-class": "eye-open",
|
|
618
|
+
onClick: (b) => u(r.data.row)
|
|
619
|
+
}, null, 8, ["onClick"]), [
|
|
620
|
+
[F, r.data.row.showEncrypt]
|
|
621
|
+
])
|
|
622
|
+
])) : k("", !0),
|
|
623
|
+
r.data.row.userId !== z(s).userId ? L((m(), U("span", {
|
|
624
|
+
key: 1,
|
|
625
|
+
class: "el-button-color",
|
|
626
|
+
onClick: (b) => v(r.data.row)
|
|
627
|
+
}, [
|
|
628
|
+
S(" 切换 ")
|
|
629
|
+
], 8, hn)), [
|
|
630
|
+
[W, ["tester"]]
|
|
631
|
+
]) : k("", !0)
|
|
632
|
+
]),
|
|
633
|
+
_: 1
|
|
634
|
+
}, 8, ["list-loading", "table-data", "table-label"])
|
|
635
|
+
]),
|
|
636
|
+
_: 1
|
|
637
|
+
}, 8, ["modelValue"]);
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
});
|
|
641
|
+
export {
|
|
642
|
+
bn as E,
|
|
643
|
+
Bn as _,
|
|
644
|
+
wn as t
|
|
645
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ar as x, a2 as b, as as D, at as U, au as B, s as N, t as $, aq as q } from "./index-
|
|
2
|
-
import { _ as R, E as S } from "./picture-
|
|
3
|
-
import { E as z, a as A } from "./el-form-item-
|
|
1
|
+
import { ar as x, a2 as b, as as D, at as U, au as B, s as N, t as $, aq as q } from "./index-RCy_bVl2.mjs";
|
|
2
|
+
import { _ as R, E as S } from "./picture-Be_t0ujg.mjs";
|
|
3
|
+
import { E as z, a as A } from "./el-form-item-FH0FWnW5.mjs";
|
|
4
4
|
import { defineComponent as M, ref as I, reactive as m, openBlock as P, createElementBlock as T, Fragment as j, createVNode as e, withCtx as a, createTextVNode as p, toDisplayString as u, createElementVNode as f } from "vue";
|
|
5
5
|
const L = { class: "h-[40px]" }, G = { class: "image-slot" }, H = { class: "dialog-footer" }, X = /* @__PURE__ */ M({
|
|
6
6
|
__name: "types",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ax as f, bs as C, s as h, t as v, aq as x } from "./index-
|
|
2
|
-
import { E as O, a as A } from "./el-form-item-
|
|
1
|
+
import { ax as f, bs as C, s as h, t as v, aq as x } from "./index-RCy_bVl2.mjs";
|
|
2
|
+
import { E as O, a as A } from "./el-form-item-FH0FWnW5.mjs";
|
|
3
3
|
import { defineComponent as q, ref as B, toRefs as F, reactive as P, openBlock as I, createBlock as R, unref as r, isRef as U, withCtx as n, createElementVNode as D, createVNode as t, createTextVNode as _ } from "vue";
|
|
4
4
|
import { ElMessage as $ } from "element-plus";
|
|
5
5
|
const z = { class: "dialog-footer" }, G = /* @__PURE__ */ q({
|