st-comp 0.0.158 → 0.0.159

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/User.js CHANGED
@@ -1,30 +1,30 @@
1
- import { b as Te, d as oe, _ as V, u as te, v as Re, w as Se, s as ve } from "./base-19787dfb.js";
2
- import { d as we, E as ke } from "./el-overlay-26bf0945.js";
3
- import { E as re } from "./el-button-0bf1d532.js";
4
- import { E as Oe, a as De } from "./el-form-item-05c0e335.js";
5
- import { E as Ne } from "./el-input-1e309239.js";
6
- import { c as M, d as Ke, E as Be, O as Le, w as pe } from "./el-popper-b6527ae2.js";
7
- import { b as Me } from "./el-scrollbar-29bcab5f.js";
8
- import { defineComponent as U, ref as C, inject as R, computed as k, provide as Q, readonly as Ge, toRef as j, unref as $, watch as ge, renderSlot as G, resolveComponent as F, openBlock as D, createBlock as H, withCtx as i, createVNode as a, normalizeProps as Ae, guardReactiveProps as Ve, getCurrentInstance as _e, onBeforeUnmount as Ue, createElementBlock as A, normalizeClass as X, createSlots as ze, mergeProps as Z, createCommentVNode as ne, nextTick as be, Fragment as Ye, createElementVNode as q, withModifiers as x, resolveDynamicComponent as He, normalizeStyle as Je, createTextVNode as W, toDisplayString as We, withKeys as je } from "vue";
9
- import { E as le, a as Ee, u as qe, r as Qe } from "./index-72151b24.js";
10
- import { V as Xe, A as Ze, K as xe } from "./index-8542fe24.js";
11
- import { P as eo } from "./index-75cce588.js";
12
- import { E as oo } from "./el-message-7d927756.js";
13
- import { _ as no } from "./_plugin-vue_export-helper-dad06003.js";
14
- import { c as to, E as ro, d as lo, a as Ie, C as so, b as ao, e as io, f as uo, g as co, F as po, L as fo } from "./dropdown-17b3ef6a.js";
15
- import { E as N, F as mo } from "./index-621b092b.js";
16
- import { a as vo, u as he } from "./index-70372cdb.js";
17
- import { a as wo } from "./use-form-common-props-5ff2f51b.js";
18
- import { c as go } from "./castArray-8405000b.js";
19
- import "./vnode-6a0c7411.js";
20
- import "./scroll-d787d648.js";
1
+ import { b as Ke, d as oe, _ as U, u as re, v as Ve, w as Le, s as _e } from "./base-19787dfb.js";
2
+ import { E as x } from "./el-button-0bf1d532.js";
3
+ import { c as N, d as Me, E as Ge, O as Ae, w as me } from "./el-popper-b6527ae2.js";
4
+ import { b as Ue } from "./el-scrollbar-29bcab5f.js";
5
+ import { defineComponent as z, ref as I, inject as h, computed as R, provide as Q, readonly as ze, toRef as J, unref as k, watch as ge, renderSlot as K, resolveComponent as $, openBlock as C, createBlock as V, withCtx as a, createVNode as s, normalizeProps as Ye, guardReactiveProps as He, getCurrentInstance as be, onBeforeUnmount as Je, createElementBlock as M, normalizeClass as X, createSlots as je, mergeProps as Z, createCommentVNode as ne, nextTick as le, Fragment as qe, createElementVNode as te, withModifiers as j, resolveDynamicComponent as We, normalizeStyle as Qe, reactive as q, createTextVNode as L, withKeys as Ee, toDisplayString as Xe } from "vue";
6
+ import { E as se, a as Ie, u as Ze, r as xe } from "./index-72151b24.js";
7
+ import { V as eo, A as oo, K as no, R as to } from "./index-7ed0999e.js";
8
+ import { d as ye, E as Pe } from "./el-overlay-26bf0945.js";
9
+ import { E as Ce, a as $e } from "./el-form-item-05c0e335.js";
10
+ import { E as he } from "./el-input-1e309239.js";
11
+ import { P as Fe } from "./index-75cce588.js";
12
+ import { E as Te } from "./el-message-7d927756.js";
13
+ import { _ as ro } from "./_plugin-vue_export-helper-dad06003.js";
14
+ import { c as lo, E as so, d as ao, a as Re, C as io, b as uo, e as co, f as po, g as fo, F as mo, L as vo } from "./dropdown-17b3ef6a.js";
15
+ import { E as S, F as wo } from "./index-621b092b.js";
16
+ import { a as _o, u as ke } from "./index-70372cdb.js";
17
+ import { a as go } from "./use-form-common-props-5ff2f51b.js";
18
+ import { c as bo } from "./castArray-8405000b.js";
21
19
  import "./index-c066fe0d.js";
22
20
  import "./index-657047bb.js";
21
+ import "./vnode-6a0c7411.js";
22
+ import "./scroll-d787d648.js";
23
23
  import "./_initCloneObject-e3d8a9ab.js";
24
24
  import "./typescript-7ae59c4c.js";
25
25
  import "./index-dc22ffe4.js";
26
26
  import "./config-provider-0f6672af.js";
27
- const _o = Te({
27
+ const Eo = Ke({
28
28
  style: { type: oe([String, Array, Object]) },
29
29
  currentTabId: {
30
30
  type: oe(String)
@@ -43,11 +43,11 @@ const _o = Te({
43
43
  onFocus: Function,
44
44
  onMousedown: Function
45
45
  }), {
46
- ElCollection: bo,
47
- ElCollectionItem: Eo,
48
- COLLECTION_INJECTION_KEY: se,
49
- COLLECTION_ITEM_INJECTION_KEY: Io
50
- } = to("RovingFocusGroup"), ae = Symbol("elRovingFocusGroup"), Ce = Symbol("elRovingFocusGroupItem"), ho = {
46
+ ElCollection: Io,
47
+ ElCollectionItem: yo,
48
+ COLLECTION_INJECTION_KEY: ae,
49
+ COLLECTION_ITEM_INJECTION_KEY: Po
50
+ } = lo("RovingFocusGroup"), ie = Symbol("elRovingFocusGroup"), Se = Symbol("elRovingFocusGroupItem"), Co = {
51
51
  ArrowLeft: "prev",
52
52
  ArrowUp: "prev",
53
53
  ArrowRight: "next",
@@ -56,104 +56,104 @@ const _o = Te({
56
56
  Home: "first",
57
57
  PageDown: "last",
58
58
  End: "last"
59
- }, Co = (e, n) => {
60
- if (n !== "rtl")
59
+ }, $o = (e, r) => {
60
+ if (r !== "rtl")
61
61
  return e;
62
62
  switch (e) {
63
- case N.right:
64
- return N.left;
65
- case N.left:
66
- return N.right;
63
+ case S.right:
64
+ return S.left;
65
+ case S.left:
66
+ return S.right;
67
67
  default:
68
68
  return e;
69
69
  }
70
- }, yo = (e, n, p) => {
71
- const t = Co(e.code, p);
72
- if (!(n === "vertical" && [N.left, N.right].includes(t)) && !(n === "horizontal" && [N.up, N.down].includes(t)))
73
- return ho[t];
74
- }, Po = (e, n) => e.map((p, t) => e[(t + n) % e.length]), ie = (e) => {
75
- const { activeElement: n } = document;
76
- for (const p of e)
77
- if (p === n || (p.focus(), n !== document.activeElement))
70
+ }, ho = (e, r, _) => {
71
+ const l = $o(e.code, _);
72
+ if (!(r === "vertical" && [S.left, S.right].includes(l)) && !(r === "horizontal" && [S.up, S.down].includes(l)))
73
+ return Co[l];
74
+ }, Fo = (e, r) => e.map((_, l) => e[(l + r) % e.length]), de = (e) => {
75
+ const { activeElement: r } = document;
76
+ for (const _ of e)
77
+ if (_ === r || (_.focus(), r !== document.activeElement))
78
78
  return;
79
- }, fe = "currentTabIdChange", me = "rovingFocusGroup.entryFocus", Fo = { bubbles: !1, cancelable: !0 }, $o = U({
79
+ }, ve = "currentTabIdChange", we = "rovingFocusGroup.entryFocus", To = { bubbles: !1, cancelable: !0 }, Ro = z({
80
80
  name: "ElRovingFocusGroupImpl",
81
81
  inheritAttrs: !1,
82
- props: _o,
83
- emits: [fe, "entryFocus"],
84
- setup(e, { emit: n }) {
85
- var p;
86
- const t = C((p = e.currentTabId || e.defaultCurrentTabId) != null ? p : null), w = C(!1), m = C(!1), c = C(null), { getItems: s } = R(se, void 0), v = k(() => [
82
+ props: Eo,
83
+ emits: [ve, "entryFocus"],
84
+ setup(e, { emit: r }) {
85
+ var _;
86
+ const l = I((_ = e.currentTabId || e.defaultCurrentTabId) != null ? _ : null), d = I(!1), p = I(!1), t = I(null), { getItems: i } = h(ae, void 0), c = R(() => [
87
87
  {
88
88
  outline: "none"
89
89
  },
90
90
  e.style
91
- ]), d = (f) => {
92
- n(fe, f);
93
- }, _ = () => {
94
- w.value = !0;
95
- }, E = M((f) => {
96
- var g;
97
- (g = e.onMousedown) == null || g.call(e, f);
91
+ ]), b = (w) => {
92
+ r(ve, w);
93
+ }, v = () => {
94
+ d.value = !0;
95
+ }, n = N((w) => {
96
+ var E;
97
+ (E = e.onMousedown) == null || E.call(e, w);
98
98
  }, () => {
99
- m.value = !0;
100
- }), P = M((f) => {
101
- var g;
102
- (g = e.onFocus) == null || g.call(e, f);
103
- }, (f) => {
104
- const g = !$(m), { target: I, currentTarget: r } = f;
105
- if (I === r && g && !$(w)) {
106
- const T = new Event(me, Fo);
107
- if (r == null || r.dispatchEvent(T), !T.defaultPrevented) {
108
- const b = s().filter((S) => S.focusable), O = b.find((S) => S.active), y = b.find((S) => S.id === $(t)), B = [O, y, ...b].filter(Boolean).map((S) => S.ref);
109
- ie(B);
99
+ p.value = !0;
100
+ }), m = N((w) => {
101
+ var E;
102
+ (E = e.onFocus) == null || E.call(e, w);
103
+ }, (w) => {
104
+ const E = !k(p), { target: g, currentTarget: T } = w;
105
+ if (g === T && E && !k(d)) {
106
+ const y = new Event(we, To);
107
+ if (T == null || T.dispatchEvent(y), !y.defaultPrevented) {
108
+ const P = i().filter((O) => O.focusable), D = P.find((O) => O.active), F = P.find((O) => O.id === k(l)), A = [D, F, ...P].filter(Boolean).map((O) => O.ref);
109
+ de(A);
110
110
  }
111
111
  }
112
- m.value = !1;
113
- }), o = M((f) => {
114
- var g;
115
- (g = e.onBlur) == null || g.call(e, f);
112
+ p.value = !1;
113
+ }), o = N((w) => {
114
+ var E;
115
+ (E = e.onBlur) == null || E.call(e, w);
116
116
  }, () => {
117
- w.value = !1;
118
- }), u = (...f) => {
119
- n("entryFocus", ...f);
117
+ d.value = !1;
118
+ }), u = (...w) => {
119
+ r("entryFocus", ...w);
120
120
  };
121
- Q(ae, {
122
- currentTabbedId: Ge(t),
123
- loop: j(e, "loop"),
124
- tabIndex: k(() => $(w) ? -1 : 0),
125
- rovingFocusGroupRef: c,
126
- rovingFocusGroupRootStyle: v,
127
- orientation: j(e, "orientation"),
128
- dir: j(e, "dir"),
129
- onItemFocus: d,
130
- onItemShiftTab: _,
121
+ Q(ie, {
122
+ currentTabbedId: ze(l),
123
+ loop: J(e, "loop"),
124
+ tabIndex: R(() => k(d) ? -1 : 0),
125
+ rovingFocusGroupRef: t,
126
+ rovingFocusGroupRootStyle: c,
127
+ orientation: J(e, "orientation"),
128
+ dir: J(e, "dir"),
129
+ onItemFocus: b,
130
+ onItemShiftTab: v,
131
131
  onBlur: o,
132
- onFocus: P,
133
- onMousedown: E
134
- }), ge(() => e.currentTabId, (f) => {
135
- t.value = f ?? null;
136
- }), Me(c, me, u);
132
+ onFocus: m,
133
+ onMousedown: n
134
+ }), ge(() => e.currentTabId, (w) => {
135
+ l.value = w ?? null;
136
+ }), Ue(t, we, u);
137
137
  }
138
138
  });
139
- function To(e, n, p, t, w, m) {
140
- return G(e.$slots, "default");
139
+ function ko(e, r, _, l, d, p) {
140
+ return K(e.$slots, "default");
141
141
  }
142
- var Ro = /* @__PURE__ */ V($o, [["render", To], ["__file", "roving-focus-group-impl.vue"]]);
143
- const So = U({
142
+ var So = /* @__PURE__ */ U(Ro, [["render", ko], ["__file", "roving-focus-group-impl.vue"]]);
143
+ const Oo = z({
144
144
  name: "ElRovingFocusGroup",
145
145
  components: {
146
- ElFocusGroupCollection: bo,
147
- ElRovingFocusGroupImpl: Ro
146
+ ElFocusGroupCollection: Io,
147
+ ElRovingFocusGroupImpl: So
148
148
  }
149
149
  });
150
- function ko(e, n, p, t, w, m) {
151
- const c = F("el-roving-focus-group-impl"), s = F("el-focus-group-collection");
152
- return D(), H(s, null, {
153
- default: i(() => [
154
- a(c, Ae(Ve(e.$attrs)), {
155
- default: i(() => [
156
- G(e.$slots, "default")
150
+ function Do(e, r, _, l, d, p) {
151
+ const t = $("el-roving-focus-group-impl"), i = $("el-focus-group-collection");
152
+ return C(), V(i, null, {
153
+ default: a(() => [
154
+ s(t, Ye(He(e.$attrs)), {
155
+ default: a(() => [
156
+ K(e.$slots, "default")
157
157
  ]),
158
158
  _: 3
159
159
  }, 16)
@@ -161,126 +161,126 @@ function ko(e, n, p, t, w, m) {
161
161
  _: 3
162
162
  });
163
163
  }
164
- var Oo = /* @__PURE__ */ V(So, [["render", ko], ["__file", "roving-focus-group.vue"]]);
165
- const ee = Symbol("elDropdown"), { ButtonGroup: Do } = re, No = U({
164
+ var Bo = /* @__PURE__ */ U(Oo, [["render", Do], ["__file", "roving-focus-group.vue"]]);
165
+ const ee = Symbol("elDropdown"), { ButtonGroup: No } = x, Ko = z({
166
166
  name: "ElDropdown",
167
167
  components: {
168
- ElButton: re,
169
- ElButtonGroup: Do,
170
- ElScrollbar: Ke,
171
- ElDropdownCollection: ro,
172
- ElTooltip: Be,
173
- ElRovingFocusGroup: Oo,
174
- ElOnlyChild: Le,
175
- ElIcon: le,
176
- ArrowDown: Ee
168
+ ElButton: x,
169
+ ElButtonGroup: No,
170
+ ElScrollbar: Me,
171
+ ElDropdownCollection: so,
172
+ ElTooltip: Ge,
173
+ ElRovingFocusGroup: Bo,
174
+ ElOnlyChild: Ae,
175
+ ElIcon: se,
176
+ ArrowDown: Ie
177
177
  },
178
- props: lo,
178
+ props: ao,
179
179
  emits: ["visible-change", "click", "command"],
180
- setup(e, { emit: n }) {
181
- const p = _e(), t = te("dropdown"), { t: w } = vo(), m = C(), c = C(), s = C(null), v = C(null), d = C(null), _ = C(null), E = C(!1), P = k(() => ({
182
- maxHeight: Re(e.maxHeight)
183
- })), o = k(() => [t.m(b.value)]), u = k(() => go(e.trigger)), f = he().value, g = k(() => e.id || f);
184
- ge([m, u], ([l, L], [Y]) => {
185
- var de, ue, ce;
186
- (de = Y == null ? void 0 : Y.$el) != null && de.removeEventListener && Y.$el.removeEventListener("pointerenter", y), (ue = l == null ? void 0 : l.$el) != null && ue.removeEventListener && l.$el.removeEventListener("pointerenter", y), (ce = l == null ? void 0 : l.$el) != null && ce.addEventListener && L.includes("hover") && l.$el.addEventListener("pointerenter", y);
187
- }, { immediate: !0 }), Ue(() => {
188
- var l, L;
189
- (L = (l = m.value) == null ? void 0 : l.$el) != null && L.removeEventListener && m.value.$el.removeEventListener("pointerenter", y);
180
+ setup(e, { emit: r }) {
181
+ const _ = be(), l = re("dropdown"), { t: d } = _o(), p = I(), t = I(), i = I(null), c = I(null), b = I(null), v = I(null), n = I(!1), m = R(() => ({
182
+ maxHeight: Ve(e.maxHeight)
183
+ })), o = R(() => [l.m(P.value)]), u = R(() => bo(e.trigger)), w = ke().value, E = R(() => e.id || w);
184
+ ge([p, u], ([f, B], [Y]) => {
185
+ var ce, pe, fe;
186
+ (ce = Y == null ? void 0 : Y.$el) != null && ce.removeEventListener && Y.$el.removeEventListener("pointerenter", F), (pe = f == null ? void 0 : f.$el) != null && pe.removeEventListener && f.$el.removeEventListener("pointerenter", F), (fe = f == null ? void 0 : f.$el) != null && fe.addEventListener && B.includes("hover") && f.$el.addEventListener("pointerenter", F);
187
+ }, { immediate: !0 }), Je(() => {
188
+ var f, B;
189
+ (B = (f = p.value) == null ? void 0 : f.$el) != null && B.removeEventListener && p.value.$el.removeEventListener("pointerenter", F);
190
190
  });
191
- function I() {
192
- r();
193
- }
194
- function r() {
195
- var l;
196
- (l = s.value) == null || l.onClose();
191
+ function g() {
192
+ T();
197
193
  }
198
194
  function T() {
199
- var l;
200
- (l = s.value) == null || l.onOpen();
201
- }
202
- const b = wo();
203
- function O(...l) {
204
- n("command", ...l);
195
+ var f;
196
+ (f = i.value) == null || f.onClose();
205
197
  }
206
198
  function y() {
207
- var l, L;
208
- (L = (l = m.value) == null ? void 0 : l.$el) == null || L.focus();
199
+ var f;
200
+ (f = i.value) == null || f.onOpen();
201
+ }
202
+ const P = go();
203
+ function D(...f) {
204
+ r("command", ...f);
209
205
  }
210
- function K() {
206
+ function F() {
207
+ var f, B;
208
+ (B = (f = p.value) == null ? void 0 : f.$el) == null || B.focus();
211
209
  }
212
- function B() {
213
- const l = $(v);
214
- u.value.includes("hover") && (l == null || l.focus()), _.value = null;
210
+ function G() {
215
211
  }
216
- function S(l) {
217
- _.value = l;
212
+ function A() {
213
+ const f = k(c);
214
+ u.value.includes("hover") && (f == null || f.focus()), v.value = null;
218
215
  }
219
- function J(l) {
220
- E.value || (l.preventDefault(), l.stopImmediatePropagation());
216
+ function O(f) {
217
+ v.value = f;
221
218
  }
222
- function z() {
223
- n("visible-change", !0);
219
+ function ue(f) {
220
+ n.value || (f.preventDefault(), f.stopImmediatePropagation());
224
221
  }
225
- function h(l) {
226
- (l == null ? void 0 : l.type) === "keydown" && v.value.focus();
222
+ function W() {
223
+ r("visible-change", !0);
227
224
  }
228
- function $e() {
229
- n("visible-change", !1);
225
+ function H(f) {
226
+ (f == null ? void 0 : f.type) === "keydown" && c.value.focus();
227
+ }
228
+ function Ne() {
229
+ r("visible-change", !1);
230
230
  }
231
231
  return Q(ee, {
232
- contentRef: v,
233
- role: k(() => e.role),
234
- triggerId: g,
235
- isUsingKeyboard: E,
236
- onItemEnter: K,
237
- onItemLeave: B
232
+ contentRef: c,
233
+ role: R(() => e.role),
234
+ triggerId: E,
235
+ isUsingKeyboard: n,
236
+ onItemEnter: G,
237
+ onItemLeave: A
238
238
  }), Q("elDropdown", {
239
- instance: p,
240
- dropdownSize: b,
241
- handleClick: I,
242
- commandHandler: O,
243
- trigger: j(e, "trigger"),
244
- hideOnClick: j(e, "hideOnClick")
239
+ instance: _,
240
+ dropdownSize: P,
241
+ handleClick: g,
242
+ commandHandler: D,
243
+ trigger: J(e, "trigger"),
244
+ hideOnClick: J(e, "hideOnClick")
245
245
  }), {
246
- t: w,
247
- ns: t,
248
- scrollbar: d,
249
- wrapStyle: P,
246
+ t: d,
247
+ ns: l,
248
+ scrollbar: b,
249
+ wrapStyle: m,
250
250
  dropdownTriggerKls: o,
251
- dropdownSize: b,
252
- triggerId: g,
253
- currentTabId: _,
254
- handleCurrentTabIdChange: S,
255
- handlerMainButtonClick: (l) => {
256
- n("click", l);
251
+ dropdownSize: P,
252
+ triggerId: E,
253
+ currentTabId: v,
254
+ handleCurrentTabIdChange: O,
255
+ handlerMainButtonClick: (f) => {
256
+ r("click", f);
257
257
  },
258
- handleEntryFocus: J,
259
- handleClose: r,
260
- handleOpen: T,
261
- handleBeforeShowTooltip: z,
262
- handleShowTooltip: h,
263
- handleBeforeHideTooltip: $e,
264
- onFocusAfterTrapped: (l) => {
265
- var L, Y;
266
- l.preventDefault(), (Y = (L = v.value) == null ? void 0 : L.focus) == null || Y.call(L, {
258
+ handleEntryFocus: ue,
259
+ handleClose: T,
260
+ handleOpen: y,
261
+ handleBeforeShowTooltip: W,
262
+ handleShowTooltip: H,
263
+ handleBeforeHideTooltip: Ne,
264
+ onFocusAfterTrapped: (f) => {
265
+ var B, Y;
266
+ f.preventDefault(), (Y = (B = c.value) == null ? void 0 : B.focus) == null || Y.call(B, {
267
267
  preventScroll: !0
268
268
  });
269
269
  },
270
- popperRef: s,
271
- contentRef: v,
272
- triggeringElementRef: m,
273
- referenceElementRef: c
270
+ popperRef: i,
271
+ contentRef: c,
272
+ triggeringElementRef: p,
273
+ referenceElementRef: t
274
274
  };
275
275
  }
276
276
  });
277
- function Ko(e, n, p, t, w, m) {
278
- var c;
279
- const s = F("el-dropdown-collection"), v = F("el-roving-focus-group"), d = F("el-scrollbar"), _ = F("el-only-child"), E = F("el-tooltip"), P = F("el-button"), o = F("arrow-down"), u = F("el-icon"), f = F("el-button-group");
280
- return D(), A("div", {
277
+ function Vo(e, r, _, l, d, p) {
278
+ var t;
279
+ const i = $("el-dropdown-collection"), c = $("el-roving-focus-group"), b = $("el-scrollbar"), v = $("el-only-child"), n = $("el-tooltip"), m = $("el-button"), o = $("arrow-down"), u = $("el-icon"), w = $("el-button-group");
280
+ return C(), M("div", {
281
281
  class: X([e.ns.b(), e.ns.is("disabled", e.disabled)])
282
282
  }, [
283
- a(E, {
283
+ s(n, {
284
284
  ref: "popperRef",
285
285
  role: e.role,
286
286
  effect: e.effect,
@@ -291,7 +291,7 @@ function Ko(e, n, p, t, w, m) {
291
291
  "manual-mode": !0,
292
292
  placement: e.placement,
293
293
  "popper-class": [e.ns.e("popper"), e.popperClass],
294
- "reference-element": (c = e.referenceElementRef) == null ? void 0 : c.$el,
294
+ "reference-element": (t = e.referenceElementRef) == null ? void 0 : t.$el,
295
295
  trigger: e.trigger,
296
296
  "trigger-keys": e.triggerKeys,
297
297
  "trigger-target-el": e.contentRef,
@@ -307,26 +307,26 @@ function Ko(e, n, p, t, w, m) {
307
307
  onBeforeShow: e.handleBeforeShowTooltip,
308
308
  onShow: e.handleShowTooltip,
309
309
  onBeforeHide: e.handleBeforeHideTooltip
310
- }, ze({
311
- content: i(() => [
312
- a(d, {
310
+ }, je({
311
+ content: a(() => [
312
+ s(b, {
313
313
  ref: "scrollbar",
314
314
  "wrap-style": e.wrapStyle,
315
315
  tag: "div",
316
316
  "view-class": e.ns.e("list")
317
317
  }, {
318
- default: i(() => [
319
- a(v, {
318
+ default: a(() => [
319
+ s(c, {
320
320
  loop: e.loop,
321
321
  "current-tab-id": e.currentTabId,
322
322
  orientation: "horizontal",
323
323
  onCurrentTabIdChange: e.handleCurrentTabIdChange,
324
324
  onEntryFocus: e.handleEntryFocus
325
325
  }, {
326
- default: i(() => [
327
- a(s, null, {
328
- default: i(() => [
329
- G(e.$slots, "dropdown")
326
+ default: a(() => [
327
+ s(i, null, {
328
+ default: a(() => [
329
+ K(e.$slots, "dropdown")
330
330
  ]),
331
331
  _: 3
332
332
  })
@@ -341,36 +341,36 @@ function Ko(e, n, p, t, w, m) {
341
341
  }, [
342
342
  e.splitButton ? void 0 : {
343
343
  name: "default",
344
- fn: i(() => [
345
- a(_, {
344
+ fn: a(() => [
345
+ s(v, {
346
346
  id: e.triggerId,
347
347
  ref: "triggeringElementRef",
348
348
  role: "button",
349
349
  tabindex: e.tabindex
350
350
  }, {
351
- default: i(() => [
352
- G(e.$slots, "default")
351
+ default: a(() => [
352
+ K(e.$slots, "default")
353
353
  ]),
354
354
  _: 3
355
355
  }, 8, ["id", "tabindex"])
356
356
  ])
357
357
  }
358
358
  ]), 1032, ["role", "effect", "popper-options", "hide-after", "placement", "popper-class", "reference-element", "trigger", "trigger-keys", "trigger-target-el", "show-after", "virtual-ref", "virtual-triggering", "disabled", "transition", "teleported", "onBeforeShow", "onShow", "onBeforeHide"]),
359
- e.splitButton ? (D(), H(f, { key: 0 }, {
360
- default: i(() => [
361
- a(P, Z({ ref: "referenceElementRef" }, e.buttonProps, {
359
+ e.splitButton ? (C(), V(w, { key: 0 }, {
360
+ default: a(() => [
361
+ s(m, Z({ ref: "referenceElementRef" }, e.buttonProps, {
362
362
  size: e.dropdownSize,
363
363
  type: e.type,
364
364
  disabled: e.disabled,
365
365
  tabindex: e.tabindex,
366
366
  onClick: e.handlerMainButtonClick
367
367
  }), {
368
- default: i(() => [
369
- G(e.$slots, "default")
368
+ default: a(() => [
369
+ K(e.$slots, "default")
370
370
  ]),
371
371
  _: 3
372
372
  }, 16, ["size", "type", "disabled", "tabindex", "onClick"]),
373
- a(P, Z({
373
+ s(m, Z({
374
374
  id: e.triggerId,
375
375
  ref: "triggeringElementRef"
376
376
  }, e.buttonProps, {
@@ -382,12 +382,12 @@ function Ko(e, n, p, t, w, m) {
382
382
  tabindex: e.tabindex,
383
383
  "aria-label": e.t("el.dropdown.toggleDropdown")
384
384
  }), {
385
- default: i(() => [
386
- a(u, {
385
+ default: a(() => [
386
+ s(u, {
387
387
  class: X(e.ns.e("icon"))
388
388
  }, {
389
- default: i(() => [
390
- a(o)
389
+ default: a(() => [
390
+ s(o)
391
391
  ]),
392
392
  _: 1
393
393
  }, 8, ["class"])
@@ -399,10 +399,10 @@ function Ko(e, n, p, t, w, m) {
399
399
  })) : ne("v-if", !0)
400
400
  ], 2);
401
401
  }
402
- var Bo = /* @__PURE__ */ V(No, [["render", Ko], ["__file", "dropdown.vue"]]);
403
- const Lo = U({
402
+ var Lo = /* @__PURE__ */ U(Ko, [["render", Vo], ["__file", "dropdown.vue"]]);
403
+ const Mo = z({
404
404
  components: {
405
- ElRovingFocusCollectionItem: Eo
405
+ ElRovingFocusCollectionItem: yo
406
406
  },
407
407
  props: {
408
408
  focusable: {
@@ -415,204 +415,204 @@ const Lo = U({
415
415
  }
416
416
  },
417
417
  emits: ["mousedown", "focus", "keydown"],
418
- setup(e, { emit: n }) {
419
- const { currentTabbedId: p, loop: t, onItemFocus: w, onItemShiftTab: m } = R(ae, void 0), { getItems: c } = R(se, void 0), s = he(), v = C(null), d = M((o) => {
420
- n("mousedown", o);
418
+ setup(e, { emit: r }) {
419
+ const { currentTabbedId: _, loop: l, onItemFocus: d, onItemShiftTab: p } = h(ie, void 0), { getItems: t } = h(ae, void 0), i = ke(), c = I(null), b = N((o) => {
420
+ r("mousedown", o);
421
421
  }, (o) => {
422
- e.focusable ? w($(s)) : o.preventDefault();
423
- }), _ = M((o) => {
424
- n("focus", o);
422
+ e.focusable ? d(k(i)) : o.preventDefault();
423
+ }), v = N((o) => {
424
+ r("focus", o);
425
425
  }, () => {
426
- w($(s));
427
- }), E = M((o) => {
428
- n("keydown", o);
426
+ d(k(i));
427
+ }), n = N((o) => {
428
+ r("keydown", o);
429
429
  }, (o) => {
430
- const { code: u, shiftKey: f, target: g, currentTarget: I } = o;
431
- if (u === N.tab && f) {
432
- m();
430
+ const { code: u, shiftKey: w, target: E, currentTarget: g } = o;
431
+ if (u === S.tab && w) {
432
+ p();
433
433
  return;
434
434
  }
435
- if (g !== I)
435
+ if (E !== g)
436
436
  return;
437
- const r = yo(o);
438
- if (r) {
437
+ const T = ho(o);
438
+ if (T) {
439
439
  o.preventDefault();
440
- let b = c().filter((O) => O.focusable).map((O) => O.ref);
441
- switch (r) {
440
+ let P = t().filter((D) => D.focusable).map((D) => D.ref);
441
+ switch (T) {
442
442
  case "last": {
443
- b.reverse();
443
+ P.reverse();
444
444
  break;
445
445
  }
446
446
  case "prev":
447
447
  case "next": {
448
- r === "prev" && b.reverse();
449
- const O = b.indexOf(I);
450
- b = t.value ? Po(b, O + 1) : b.slice(O + 1);
448
+ T === "prev" && P.reverse();
449
+ const D = P.indexOf(g);
450
+ P = l.value ? Fo(P, D + 1) : P.slice(D + 1);
451
451
  break;
452
452
  }
453
453
  }
454
- be(() => {
455
- ie(b);
454
+ le(() => {
455
+ de(P);
456
456
  });
457
457
  }
458
- }), P = k(() => p.value === $(s));
459
- return Q(Ce, {
460
- rovingFocusGroupItemRef: v,
461
- tabIndex: k(() => $(P) ? 0 : -1),
462
- handleMousedown: d,
463
- handleFocus: _,
464
- handleKeydown: E
458
+ }), m = R(() => _.value === k(i));
459
+ return Q(Se, {
460
+ rovingFocusGroupItemRef: c,
461
+ tabIndex: R(() => k(m) ? 0 : -1),
462
+ handleMousedown: b,
463
+ handleFocus: v,
464
+ handleKeydown: n
465
465
  }), {
466
- id: s,
467
- handleKeydown: E,
468
- handleFocus: _,
469
- handleMousedown: d
466
+ id: i,
467
+ handleKeydown: n,
468
+ handleFocus: v,
469
+ handleMousedown: b
470
470
  };
471
471
  }
472
472
  });
473
- function Mo(e, n, p, t, w, m) {
474
- const c = F("el-roving-focus-collection-item");
475
- return D(), H(c, {
473
+ function Go(e, r, _, l, d, p) {
474
+ const t = $("el-roving-focus-collection-item");
475
+ return C(), V(t, {
476
476
  id: e.id,
477
477
  focusable: e.focusable,
478
478
  active: e.active
479
479
  }, {
480
- default: i(() => [
481
- G(e.$slots, "default")
480
+ default: a(() => [
481
+ K(e.$slots, "default")
482
482
  ]),
483
483
  _: 3
484
484
  }, 8, ["id", "focusable", "active"]);
485
485
  }
486
- var Go = /* @__PURE__ */ V(Lo, [["render", Mo], ["__file", "roving-focus-item.vue"]]);
487
- const Ao = U({
486
+ var Ao = /* @__PURE__ */ U(Mo, [["render", Go], ["__file", "roving-focus-item.vue"]]);
487
+ const Uo = z({
488
488
  name: "DropdownItemImpl",
489
489
  components: {
490
- ElIcon: le
490
+ ElIcon: se
491
491
  },
492
- props: Ie,
492
+ props: Re,
493
493
  emits: ["pointermove", "pointerleave", "click", "clickimpl"],
494
- setup(e, { emit: n }) {
495
- const p = te("dropdown"), { role: t } = R(ee, void 0), { collectionItemRef: w } = R(so, void 0), { collectionItemRef: m } = R(Io, void 0), {
496
- rovingFocusGroupItemRef: c,
497
- tabIndex: s,
498
- handleFocus: v,
499
- handleKeydown: d,
500
- handleMousedown: _
501
- } = R(Ce, void 0), E = we(w, m, c), P = k(() => t.value === "menu" ? "menuitem" : t.value === "navigation" ? "link" : "button"), o = M((u) => {
502
- if ([N.enter, N.numpadEnter, N.space].includes(u.code))
503
- return u.preventDefault(), u.stopImmediatePropagation(), n("clickimpl", u), !0;
504
- }, d);
494
+ setup(e, { emit: r }) {
495
+ const _ = re("dropdown"), { role: l } = h(ee, void 0), { collectionItemRef: d } = h(io, void 0), { collectionItemRef: p } = h(Po, void 0), {
496
+ rovingFocusGroupItemRef: t,
497
+ tabIndex: i,
498
+ handleFocus: c,
499
+ handleKeydown: b,
500
+ handleMousedown: v
501
+ } = h(Se, void 0), n = ye(d, p, t), m = R(() => l.value === "menu" ? "menuitem" : l.value === "navigation" ? "link" : "button"), o = N((u) => {
502
+ if ([S.enter, S.numpadEnter, S.space].includes(u.code))
503
+ return u.preventDefault(), u.stopImmediatePropagation(), r("clickimpl", u), !0;
504
+ }, b);
505
505
  return {
506
- ns: p,
507
- itemRef: E,
506
+ ns: _,
507
+ itemRef: n,
508
508
  dataset: {
509
- [ao]: ""
509
+ [uo]: ""
510
510
  },
511
- role: P,
512
- tabIndex: s,
513
- handleFocus: v,
511
+ role: m,
512
+ tabIndex: i,
513
+ handleFocus: c,
514
514
  handleKeydown: o,
515
- handleMousedown: _
515
+ handleMousedown: v
516
516
  };
517
517
  }
518
518
  });
519
- function Vo(e, n, p, t, w, m) {
520
- const c = F("el-icon");
521
- return D(), A(Ye, null, [
522
- e.divided ? (D(), A("li", {
519
+ function zo(e, r, _, l, d, p) {
520
+ const t = $("el-icon");
521
+ return C(), M(qe, null, [
522
+ e.divided ? (C(), M("li", {
523
523
  key: 0,
524
524
  role: "separator",
525
525
  class: X(e.ns.bem("menu", "item", "divided"))
526
526
  }, null, 2)) : ne("v-if", !0),
527
- q("li", Z({ ref: e.itemRef }, { ...e.dataset, ...e.$attrs }, {
527
+ te("li", Z({ ref: e.itemRef }, { ...e.dataset, ...e.$attrs }, {
528
528
  "aria-disabled": e.disabled,
529
529
  class: [e.ns.be("menu", "item"), e.ns.is("disabled", e.disabled)],
530
530
  tabindex: e.tabIndex,
531
531
  role: e.role,
532
- onClick: (s) => e.$emit("clickimpl", s),
532
+ onClick: (i) => e.$emit("clickimpl", i),
533
533
  onFocus: e.handleFocus,
534
- onKeydown: x(e.handleKeydown, ["self"]),
534
+ onKeydown: j(e.handleKeydown, ["self"]),
535
535
  onMousedown: e.handleMousedown,
536
- onPointermove: (s) => e.$emit("pointermove", s),
537
- onPointerleave: (s) => e.$emit("pointerleave", s)
536
+ onPointermove: (i) => e.$emit("pointermove", i),
537
+ onPointerleave: (i) => e.$emit("pointerleave", i)
538
538
  }), [
539
- e.icon ? (D(), H(c, { key: 0 }, {
540
- default: i(() => [
541
- (D(), H(He(e.icon)))
539
+ e.icon ? (C(), V(t, { key: 0 }, {
540
+ default: a(() => [
541
+ (C(), V(We(e.icon)))
542
542
  ]),
543
543
  _: 1
544
544
  })) : ne("v-if", !0),
545
- G(e.$slots, "default")
545
+ K(e.$slots, "default")
546
546
  ], 16, ["aria-disabled", "tabindex", "role", "onClick", "onFocus", "onKeydown", "onMousedown", "onPointermove", "onPointerleave"])
547
547
  ], 64);
548
548
  }
549
- var Uo = /* @__PURE__ */ V(Ao, [["render", Vo], ["__file", "dropdown-item-impl.vue"]]);
550
- const ye = () => {
551
- const e = R("elDropdown", {}), n = k(() => e == null ? void 0 : e.dropdownSize);
549
+ var Yo = /* @__PURE__ */ U(Uo, [["render", zo], ["__file", "dropdown-item-impl.vue"]]);
550
+ const Oe = () => {
551
+ const e = h("elDropdown", {}), r = R(() => e == null ? void 0 : e.dropdownSize);
552
552
  return {
553
553
  elDropdown: e,
554
- _elDropdownSize: n
554
+ _elDropdownSize: r
555
555
  };
556
- }, zo = U({
556
+ }, Ho = z({
557
557
  name: "ElDropdownItem",
558
558
  components: {
559
- ElDropdownCollectionItem: io,
560
- ElRovingFocusItem: Go,
561
- ElDropdownItemImpl: Uo
559
+ ElDropdownCollectionItem: co,
560
+ ElRovingFocusItem: Ao,
561
+ ElDropdownItemImpl: Yo
562
562
  },
563
563
  inheritAttrs: !1,
564
- props: Ie,
564
+ props: Re,
565
565
  emits: ["pointermove", "pointerleave", "click"],
566
- setup(e, { emit: n, attrs: p }) {
567
- const { elDropdown: t } = ye(), w = _e(), m = C(null), c = k(() => {
566
+ setup(e, { emit: r, attrs: _ }) {
567
+ const { elDropdown: l } = Oe(), d = be(), p = I(null), t = R(() => {
568
568
  var o, u;
569
- return (u = (o = $(m)) == null ? void 0 : o.textContent) != null ? u : "";
570
- }), { onItemEnter: s, onItemLeave: v } = R(ee, void 0), d = M((o) => (n("pointermove", o), o.defaultPrevented), pe((o) => {
569
+ return (u = (o = k(p)) == null ? void 0 : o.textContent) != null ? u : "";
570
+ }), { onItemEnter: i, onItemLeave: c } = h(ee, void 0), b = N((o) => (r("pointermove", o), o.defaultPrevented), me((o) => {
571
571
  if (e.disabled) {
572
- v(o);
572
+ c(o);
573
573
  return;
574
574
  }
575
575
  const u = o.currentTarget;
576
- u === document.activeElement || u.contains(document.activeElement) || (s(o), o.defaultPrevented || u == null || u.focus());
577
- })), _ = M((o) => (n("pointerleave", o), o.defaultPrevented), pe(v)), E = M((o) => {
576
+ u === document.activeElement || u.contains(document.activeElement) || (i(o), o.defaultPrevented || u == null || u.focus());
577
+ })), v = N((o) => (r("pointerleave", o), o.defaultPrevented), me(c)), n = N((o) => {
578
578
  if (!e.disabled)
579
- return n("click", o), o.type !== "keydown" && o.defaultPrevented;
579
+ return r("click", o), o.type !== "keydown" && o.defaultPrevented;
580
580
  }, (o) => {
581
- var u, f, g;
581
+ var u, w, E;
582
582
  if (e.disabled) {
583
583
  o.stopImmediatePropagation();
584
584
  return;
585
585
  }
586
- (u = t == null ? void 0 : t.hideOnClick) != null && u.value && ((f = t.handleClick) == null || f.call(t)), (g = t.commandHandler) == null || g.call(t, e.command, w, o);
587
- }), P = k(() => ({ ...e, ...p }));
586
+ (u = l == null ? void 0 : l.hideOnClick) != null && u.value && ((w = l.handleClick) == null || w.call(l)), (E = l.commandHandler) == null || E.call(l, e.command, d, o);
587
+ }), m = R(() => ({ ...e, ..._ }));
588
588
  return {
589
- handleClick: E,
590
- handlePointerMove: d,
591
- handlePointerLeave: _,
592
- textContent: c,
593
- propsAndAttrs: P
589
+ handleClick: n,
590
+ handlePointerMove: b,
591
+ handlePointerLeave: v,
592
+ textContent: t,
593
+ propsAndAttrs: m
594
594
  };
595
595
  }
596
596
  });
597
- function Yo(e, n, p, t, w, m) {
598
- var c;
599
- const s = F("el-dropdown-item-impl"), v = F("el-roving-focus-item"), d = F("el-dropdown-collection-item");
600
- return D(), H(d, {
597
+ function Jo(e, r, _, l, d, p) {
598
+ var t;
599
+ const i = $("el-dropdown-item-impl"), c = $("el-roving-focus-item"), b = $("el-dropdown-collection-item");
600
+ return C(), V(b, {
601
601
  disabled: e.disabled,
602
- "text-value": (c = e.textValue) != null ? c : e.textContent
602
+ "text-value": (t = e.textValue) != null ? t : e.textContent
603
603
  }, {
604
- default: i(() => [
605
- a(v, {
604
+ default: a(() => [
605
+ s(c, {
606
606
  focusable: !e.disabled
607
607
  }, {
608
- default: i(() => [
609
- a(s, Z(e.propsAndAttrs, {
608
+ default: a(() => [
609
+ s(i, Z(e.propsAndAttrs, {
610
610
  onPointerleave: e.handlePointerLeave,
611
611
  onPointermove: e.handlePointerMove,
612
612
  onClickimpl: e.handleClick
613
613
  }), {
614
- default: i(() => [
615
- G(e.$slots, "default")
614
+ default: a(() => [
615
+ K(e.$slots, "default")
616
616
  ]),
617
617
  _: 3
618
618
  }, 16, ["onPointerleave", "onPointermove", "onClickimpl"])
@@ -623,268 +623,315 @@ function Yo(e, n, p, t, w, m) {
623
623
  _: 3
624
624
  }, 8, ["disabled", "text-value"]);
625
625
  }
626
- var Pe = /* @__PURE__ */ V(zo, [["render", Yo], ["__file", "dropdown-item.vue"]]);
627
- const Ho = U({
626
+ var De = /* @__PURE__ */ U(Ho, [["render", Jo], ["__file", "dropdown-item.vue"]]);
627
+ const jo = z({
628
628
  name: "ElDropdownMenu",
629
- props: uo,
629
+ props: po,
630
630
  setup(e) {
631
- const n = te("dropdown"), { _elDropdownSize: p } = ye(), t = p.value, { focusTrapRef: w, onKeydown: m } = R(mo, void 0), { contentRef: c, role: s, triggerId: v } = R(ee, void 0), { collectionRef: d, getItems: _ } = R(co, void 0), {
632
- rovingFocusGroupRef: E,
633
- rovingFocusGroupRootStyle: P,
631
+ const r = re("dropdown"), { _elDropdownSize: _ } = Oe(), l = _.value, { focusTrapRef: d, onKeydown: p } = h(wo, void 0), { contentRef: t, role: i, triggerId: c } = h(ee, void 0), { collectionRef: b, getItems: v } = h(fo, void 0), {
632
+ rovingFocusGroupRef: n,
633
+ rovingFocusGroupRootStyle: m,
634
634
  tabIndex: o,
635
635
  onBlur: u,
636
- onFocus: f,
637
- onMousedown: g
638
- } = R(ae, void 0), { collectionRef: I } = R(se, void 0), r = k(() => [n.b("menu"), n.bm("menu", t == null ? void 0 : t.value)]), T = we(c, d, w, E, I), b = M((y) => {
639
- var K;
640
- (K = e.onKeydown) == null || K.call(e, y);
641
- }, (y) => {
642
- const { currentTarget: K, code: B, target: S } = y;
643
- if (K.contains(S), N.tab === B && y.stopImmediatePropagation(), y.preventDefault(), S !== $(c) || !po.includes(B))
636
+ onFocus: w,
637
+ onMousedown: E
638
+ } = h(ie, void 0), { collectionRef: g } = h(ae, void 0), T = R(() => [r.b("menu"), r.bm("menu", l == null ? void 0 : l.value)]), y = ye(t, b, d, n, g), P = N((F) => {
639
+ var G;
640
+ (G = e.onKeydown) == null || G.call(e, F);
641
+ }, (F) => {
642
+ const { currentTarget: G, code: A, target: O } = F;
643
+ if (G.contains(O), S.tab === A && F.stopImmediatePropagation(), F.preventDefault(), O !== k(t) || !mo.includes(A))
644
644
  return;
645
- const z = _().filter((h) => !h.disabled).map((h) => h.ref);
646
- fo.includes(B) && z.reverse(), ie(z);
645
+ const W = v().filter((H) => !H.disabled).map((H) => H.ref);
646
+ vo.includes(A) && W.reverse(), de(W);
647
647
  });
648
648
  return {
649
- size: t,
650
- rovingFocusGroupRootStyle: P,
649
+ size: l,
650
+ rovingFocusGroupRootStyle: m,
651
651
  tabIndex: o,
652
- dropdownKls: r,
653
- role: s,
654
- triggerId: v,
655
- dropdownListWrapperRef: T,
656
- handleKeydown: (y) => {
657
- b(y), m(y);
652
+ dropdownKls: T,
653
+ role: i,
654
+ triggerId: c,
655
+ dropdownListWrapperRef: y,
656
+ handleKeydown: (F) => {
657
+ P(F), p(F);
658
658
  },
659
659
  onBlur: u,
660
- onFocus: f,
661
- onMousedown: g
660
+ onFocus: w,
661
+ onMousedown: E
662
662
  };
663
663
  }
664
664
  });
665
- function Jo(e, n, p, t, w, m) {
666
- return D(), A("ul", {
665
+ function qo(e, r, _, l, d, p) {
666
+ return C(), M("ul", {
667
667
  ref: e.dropdownListWrapperRef,
668
668
  class: X(e.dropdownKls),
669
- style: Je(e.rovingFocusGroupRootStyle),
669
+ style: Qe(e.rovingFocusGroupRootStyle),
670
670
  tabindex: -1,
671
671
  role: e.role,
672
672
  "aria-labelledby": e.triggerId,
673
673
  onBlur: e.onBlur,
674
674
  onFocus: e.onFocus,
675
- onKeydown: x(e.handleKeydown, ["self"]),
676
- onMousedown: x(e.onMousedown, ["self"])
675
+ onKeydown: j(e.handleKeydown, ["self"]),
676
+ onMousedown: j(e.onMousedown, ["self"])
677
677
  }, [
678
- G(e.$slots, "default")
678
+ K(e.$slots, "default")
679
679
  ], 46, ["role", "aria-labelledby", "onBlur", "onFocus", "onKeydown", "onMousedown"]);
680
680
  }
681
- var Fe = /* @__PURE__ */ V(Ho, [["render", Jo], ["__file", "dropdown-menu.vue"]]);
682
- const Wo = Se(Bo, {
683
- DropdownItem: Pe,
684
- DropdownMenu: Fe
685
- }), jo = ve(Pe), qo = ve(Fe);
686
- const Qo = { class: "user" }, Xo = { key: 0 }, Zo = { class: "user-msg" }, xo = { class: "dialog-footer" }, en = {
687
- __name: "index",
688
- props: {
689
- config: {
690
- type: Object,
691
- default: () => ({})
692
- // loginUrl: 登录后的跳转地址 loginoutToLogin: 是否跳转到登录页 loginoutUrl: 退出登录后的跳转地址
693
- }
694
- },
695
- emits: ["loginout"],
696
- setup(e, { emit: n }) {
697
- const p = R("stConfig"), t = Xe(), w = C(null), m = n, c = e, s = C(null), v = C(!1), d = C({
698
- oldPassword: "",
681
+ var Be = /* @__PURE__ */ U(jo, [["render", qo], ["__file", "dropdown-menu.vue"]]);
682
+ const Wo = Le(Lo, {
683
+ DropdownItem: De,
684
+ DropdownMenu: Be
685
+ }), Qo = _e(De), Xo = _e(Be);
686
+ const Zo = { class: "set-password" }, xo = {
687
+ __name: "SetPasswordDialog",
688
+ emits: ["callBack"],
689
+ setup(e, { expose: r, emit: _ }) {
690
+ const l = h("stConfig"), d = _, p = I(null), t = I(!1), i = I(), c = q({
699
691
  newPassword: "",
700
- confirmPassword: ""
701
- }), _ = C({
702
- oldPassword: [{ required: !0, message: "请输入原密码", trigger: "blur" }],
692
+ newPassword2: ""
693
+ }), b = q({
703
694
  newPassword: [],
704
- confirmPassword: [
695
+ newPassword2: [
705
696
  { required: !0, message: "请输入确认密码", trigger: "blur" },
706
697
  {
707
- validator: (I, r, T) => {
708
- r === "" ? T(new Error("请输入确认密码")) : r !== d.value.newPassword ? T(new Error("两次输入密码不一致!")) : T();
698
+ validator: (m, o, u) => {
699
+ o === "" ? u(new Error("请输入确认密码")) : o !== c.newPassword ? u(new Error("两次输入密码不一致!")) : u();
709
700
  },
710
701
  trigger: "blur"
711
702
  }
712
703
  ]
713
- }), E = C(!1), P = () => {
714
- const { loginUrl: I } = c.config || {};
715
- Ze(I);
716
- }, o = () => {
717
- const { loginoutToLogin: I, loginoutUrl: r } = c.config || {};
718
- xe(I, r), m("loginout");
719
- }, u = () => {
720
- s.value.validate(async (I, r) => {
721
- I && (await p.request.post("/invest/sys/user/password", {
722
- password: d.value.oldPassword,
723
- newPassword: d.value.newPassword,
724
- newPassword2: d.value.confirmPassword
725
- }), oo.success("修改成功!"), v.value = !1);
726
- });
727
- }, f = () => {
728
- _.value.newPassword.length === 0 && be(() => {
729
- var I;
730
- _.value.newPassword = (I = w.value) == null ? void 0 : I.ruleFormPassword;
704
+ }), v = I(!1), n = (m) => {
705
+ m && m.validate(async (o) => {
706
+ if (!o)
707
+ return !1;
708
+ await l.request.post("/invest/sys/user/setPassword", { newPassword: c.newPassword }), Te.success("密码设置成功!"), t.value = !1, d("callBack");
731
709
  });
732
- }, g = () => {
733
- d.value = {
734
- oldPassword: "",
735
- newPassword: "",
736
- confirmPassword: ""
737
- }, s.value.resetFields();
738
710
  };
739
- return (I, r) => {
740
- const T = le, b = jo, O = qo, y = Wo, K = Ne, B = Oe, S = De, J = re, z = ke;
741
- return D(), A("div", Qo, [
742
- $(t) ? (D(), A("div", Xo, [
743
- a(y, { placement: "bottom" }, {
744
- dropdown: i(() => [
745
- a(O, null, {
746
- default: i(() => [
747
- a(b, {
748
- onClick: r[0] || (r[0] = (h) => v.value = !0)
749
- }, {
750
- default: i(() => [
751
- W("修改密码")
752
- ]),
753
- _: 1
754
- }),
755
- a(b, { onClick: o }, {
756
- default: i(() => [
757
- W("退出登录")
758
- ]),
759
- _: 1
760
- })
761
- ]),
762
- _: 1
763
- })
764
- ]),
765
- default: i(() => {
766
- var h;
767
- return [
768
- q("div", Zo, [
769
- a(T, { class: "user-msg-icon" }, {
770
- default: i(() => [
771
- a($(qe))
772
- ]),
773
- _: 1
774
- }),
775
- q("span", null, We((h = $(t)) == null ? void 0 : h.username), 1),
776
- a(T, { class: "user-msg-arrow" }, {
777
- default: i(() => [
778
- a($(Ee))
779
- ]),
780
- _: 1
781
- })
782
- ])
783
- ];
711
+ return r({
712
+ open: () => {
713
+ Object.assign(c, {
714
+ newPassword: "",
715
+ newPassword2: ""
716
+ }), t.value = !0, le(() => {
717
+ var m, o;
718
+ (m = b.newPassword) != null && m.length || (b.newPassword = (o = p.value) == null ? void 0 : o.ruleFormPassword);
719
+ });
720
+ }
721
+ }), (m, o) => {
722
+ const u = he, w = Ce, E = $e, g = x, T = Pe;
723
+ return C(), M("div", Zo, [
724
+ s(T, {
725
+ modelValue: t.value,
726
+ "onUpdate:modelValue": o[8] || (o[8] = (y) => t.value = y),
727
+ title: "设置密码",
728
+ width: "460",
729
+ "destroy-on-close": "",
730
+ "z-index": 200
731
+ }, {
732
+ footer: a(() => [
733
+ s(g, {
734
+ onClick: o[6] || (o[6] = (y) => t.value = !1)
735
+ }, {
736
+ default: a(() => [
737
+ L(" 取消 ")
738
+ ]),
739
+ _: 1
784
740
  }),
785
- _: 1
786
- })
787
- ])) : (D(), A("div", {
788
- key: 1,
789
- class: "user-login",
790
- onClick: P
791
- }, [
792
- W(" 前往登录 "),
793
- a(T, { class: "user-login-icon" }, {
794
- default: i(() => [
795
- a($(Qe))
796
- ]),
797
- _: 1
798
- })
799
- ])),
800
- a(z, {
801
- modelValue: v.value,
802
- "onUpdate:modelValue": r[7] || (r[7] = (h) => v.value = h),
741
+ s(g, {
742
+ type: "primary",
743
+ onClick: o[7] || (o[7] = (y) => n(i.value))
744
+ }, {
745
+ default: a(() => [
746
+ L(" 确认 ")
747
+ ]),
748
+ _: 1
749
+ })
750
+ ]),
751
+ default: a(() => [
752
+ s(E, {
753
+ ref_key: "ruleFormRef",
754
+ ref: i,
755
+ rules: b,
756
+ model: c,
757
+ "label-width": "auto",
758
+ "validate-on-rule-change": !1,
759
+ onSubmit: o[4] || (o[4] = j((y) => n(i.value), ["prevent"])),
760
+ onKeyup: o[5] || (o[5] = Ee((y) => n(i.value), ["enter", "native"]))
761
+ }, {
762
+ default: a(() => [
763
+ s(w, {
764
+ label: "密码",
765
+ prop: "newPassword"
766
+ }, {
767
+ default: a(() => [
768
+ s(u, {
769
+ modelValue: c.newPassword,
770
+ "onUpdate:modelValue": o[0] || (o[0] = (y) => c.newPassword = y),
771
+ type: "password",
772
+ "show-password": !0,
773
+ onFocus: o[1] || (o[1] = () => {
774
+ i.value.clearValidate(["newPassword"]), v.value = !0;
775
+ }),
776
+ onBlur: o[2] || (o[2] = (y) => v.value = !1)
777
+ }, null, 8, ["modelValue"]),
778
+ s(Fe, {
779
+ ref_key: "PasswordPromptRef",
780
+ ref: p,
781
+ value: c.newPassword,
782
+ isFocus: v.value
783
+ }, null, 8, ["value", "isFocus"])
784
+ ]),
785
+ _: 1
786
+ }),
787
+ s(w, {
788
+ label: "确认密码",
789
+ prop: "newPassword2"
790
+ }, {
791
+ default: a(() => [
792
+ s(u, {
793
+ modelValue: c.newPassword2,
794
+ "onUpdate:modelValue": o[3] || (o[3] = (y) => c.newPassword2 = y),
795
+ type: "password",
796
+ "show-password": !0
797
+ }, null, 8, ["modelValue"])
798
+ ]),
799
+ _: 1
800
+ })
801
+ ]),
802
+ _: 1
803
+ }, 8, ["rules", "model"])
804
+ ]),
805
+ _: 1
806
+ }, 8, ["modelValue"])
807
+ ]);
808
+ };
809
+ }
810
+ }, en = { class: "edit-password" }, on = {
811
+ __name: "EditPasswordDialog",
812
+ setup(e, { expose: r }) {
813
+ const _ = h("stConfig"), l = I(null), d = I(!1), p = I(), t = q({
814
+ password: "",
815
+ newPassword: "",
816
+ newPassword2: ""
817
+ }), i = q({
818
+ password: [{ required: !0, message: "请输入原密码", trigger: "blur" }],
819
+ newPassword: [],
820
+ newPassword2: [
821
+ { required: !0, message: "请输入确认密码", trigger: "blur" },
822
+ {
823
+ validator: (v, n, m) => {
824
+ n === "" ? m(new Error("请输入确认密码")) : n !== t.newPassword ? m(new Error("两次输入密码不一致!")) : m();
825
+ },
826
+ trigger: "blur"
827
+ }
828
+ ]
829
+ }), c = I(!1), b = (v) => {
830
+ v && v.validate(async (n) => {
831
+ if (!n)
832
+ return !1;
833
+ await _.request.post("/invest/sys/user/password", t), Te.success("密码修改成功!"), d.value = !1;
834
+ });
835
+ };
836
+ return r({
837
+ open: () => {
838
+ Object.assign(t, {
839
+ password: "",
840
+ newPassword: "",
841
+ newPassword2: ""
842
+ }), d.value = !0, le(() => {
843
+ var v, n;
844
+ (v = i.newPassword) != null && v.length || (i.newPassword = (n = l.value) == null ? void 0 : n.ruleFormPassword);
845
+ });
846
+ }
847
+ }), (v, n) => {
848
+ const m = he, o = Ce, u = $e, w = x, E = Pe;
849
+ return C(), M("div", en, [
850
+ s(E, {
851
+ modelValue: d.value,
852
+ "onUpdate:modelValue": n[9] || (n[9] = (g) => d.value = g),
803
853
  title: "修改密码",
804
- width: "500",
805
- "z-index": 200,
806
- onOpened: f,
807
- onClosed: g
854
+ width: "460",
855
+ "destroy-on-close": "",
856
+ "z-index": 200
808
857
  }, {
809
- footer: i(() => [
810
- q("div", xo, [
811
- a(J, {
812
- onClick: r[6] || (r[6] = (h) => v.value = !1)
813
- }, {
814
- default: i(() => [
815
- W("取消")
816
- ]),
817
- _: 1
818
- }),
819
- a(J, {
820
- type: "primary",
821
- onClick: u
822
- }, {
823
- default: i(() => [
824
- W(" 修改 ")
825
- ]),
826
- _: 1
827
- })
828
- ])
858
+ footer: a(() => [
859
+ s(w, {
860
+ onClick: n[7] || (n[7] = (g) => d.value = !1)
861
+ }, {
862
+ default: a(() => [
863
+ L(" 取消 ")
864
+ ]),
865
+ _: 1
866
+ }),
867
+ s(w, {
868
+ type: "primary",
869
+ onClick: n[8] || (n[8] = (g) => b(p.value))
870
+ }, {
871
+ default: a(() => [
872
+ L(" 确认 ")
873
+ ]),
874
+ _: 1
875
+ })
829
876
  ]),
830
- default: i(() => [
831
- a(S, {
832
- ref_key: "changePasswordFormRef",
833
- ref: s,
834
- model: d.value,
835
- rules: _.value,
877
+ default: a(() => [
878
+ s(u, {
879
+ ref_key: "ruleFormRef",
880
+ ref: p,
881
+ rules: i,
882
+ model: t,
883
+ "label-width": "auto",
836
884
  "validate-on-rule-change": !1,
837
- onSubmit: x(u, ["prevent"]),
838
- onKeyup: je(u, ["enter", "native"]),
839
- "label-width": "auto"
885
+ onSubmit: n[5] || (n[5] = j((g) => b(p.value), ["prevent"])),
886
+ onKeyup: n[6] || (n[6] = Ee((g) => b(p.value), ["enter", "native"]))
840
887
  }, {
841
- default: i(() => [
842
- a(B, {
888
+ default: a(() => [
889
+ s(o, {
843
890
  label: "原密码",
844
- prop: "oldPassword"
891
+ prop: "password"
845
892
  }, {
846
- default: i(() => [
847
- a(K, {
848
- modelValue: d.value.oldPassword,
849
- "onUpdate:modelValue": r[1] || (r[1] = (h) => d.value.oldPassword = h),
893
+ default: a(() => [
894
+ s(m, {
895
+ modelValue: t.password,
896
+ "onUpdate:modelValue": n[0] || (n[0] = (g) => t.password = g),
850
897
  type: "password",
851
898
  "show-password": !0
852
899
  }, null, 8, ["modelValue"])
853
900
  ]),
854
901
  _: 1
855
902
  }),
856
- a(B, {
903
+ s(o, {
857
904
  label: "新密码",
858
905
  prop: "newPassword"
859
906
  }, {
860
- default: i(() => [
861
- a(K, {
862
- modelValue: d.value.newPassword,
863
- "onUpdate:modelValue": r[2] || (r[2] = (h) => d.value.newPassword = h),
907
+ default: a(() => [
908
+ s(m, {
909
+ modelValue: t.newPassword,
910
+ "onUpdate:modelValue": n[1] || (n[1] = (g) => t.newPassword = g),
864
911
  type: "password",
865
912
  "show-password": !0,
866
- onFocus: r[3] || (r[3] = () => {
867
- s.value.clearValidate(["newPassword"]), E.value = !0;
913
+ onFocus: n[2] || (n[2] = () => {
914
+ p.value.clearValidate(["newPassword"]), c.value = !0;
868
915
  }),
869
- onBlur: r[4] || (r[4] = (h) => E.value = !1)
916
+ onBlur: n[3] || (n[3] = (g) => c.value = !1)
870
917
  }, null, 8, ["modelValue"]),
871
- a(eo, {
918
+ s(Fe, {
872
919
  ref_key: "PasswordPromptRef",
873
- ref: w,
874
- value: d.value.newPassword,
875
- isFocus: E.value
920
+ ref: l,
921
+ value: t.newPassword,
922
+ isFocus: c.value
876
923
  }, null, 8, ["value", "isFocus"])
877
924
  ]),
878
925
  _: 1
879
926
  }),
880
- a(B, {
927
+ s(o, {
881
928
  label: "确认密码",
882
- prop: "confirmPassword"
929
+ prop: "newPassword2"
883
930
  }, {
884
- default: i(() => [
885
- a(K, {
886
- modelValue: d.value.confirmPassword,
887
- "onUpdate:modelValue": r[5] || (r[5] = (h) => d.value.confirmPassword = h),
931
+ default: a(() => [
932
+ s(m, {
933
+ modelValue: t.newPassword2,
934
+ "onUpdate:modelValue": n[4] || (n[4] = (g) => t.newPassword2 = g),
888
935
  type: "password",
889
936
  "show-password": !0
890
937
  }, null, 8, ["modelValue"])
@@ -893,18 +940,125 @@ const Qo = { class: "user" }, Xo = { key: 0 }, Zo = { class: "user-msg" }, xo =
893
940
  })
894
941
  ]),
895
942
  _: 1
896
- }, 8, ["model", "rules"])
943
+ }, 8, ["rules", "model"])
897
944
  ]),
898
945
  _: 1
899
946
  }, 8, ["modelValue"])
900
947
  ]);
901
948
  };
902
949
  }
903
- }, on = /* @__PURE__ */ no(en, [["__scopeId", "data-v-8b90a07a"]]), kn = {
950
+ };
951
+ const nn = { class: "user" }, tn = { class: "user-msg" }, rn = {
952
+ __name: "index",
953
+ props: {
954
+ config: {
955
+ type: Object,
956
+ default: () => ({})
957
+ // loginUrl: 登录后的跳转地址 loginoutToLogin: 是否跳转到登录页 loginoutUrl: 退出登录后的跳转地址
958
+ }
959
+ },
960
+ emits: ["loginout"],
961
+ setup(e, { emit: r }) {
962
+ const _ = I(null), l = I(null), d = q(eo()), p = r, t = e, i = () => {
963
+ const { loginUrl: v } = t.config || {};
964
+ oo(v);
965
+ }, c = () => {
966
+ const { loginoutToLogin: v, loginoutUrl: n } = t.config || {};
967
+ no(v, n), p("loginout");
968
+ }, b = () => {
969
+ d.canSet = !1, to(d);
970
+ };
971
+ return (v, n) => {
972
+ const m = se, o = Qo, u = Xo, w = Wo;
973
+ return C(), M("div", nn, [
974
+ d ? (C(), V(w, {
975
+ key: 0,
976
+ placement: "bottom"
977
+ }, {
978
+ dropdown: a(() => [
979
+ s(u, null, {
980
+ default: a(() => [
981
+ d.canSet ? (C(), V(o, {
982
+ key: 0,
983
+ onClick: n[0] || (n[0] = (E) => {
984
+ var g;
985
+ return (g = _.value) == null ? void 0 : g.open();
986
+ })
987
+ }, {
988
+ default: a(() => [
989
+ L(" 设置密码 ")
990
+ ]),
991
+ _: 1
992
+ })) : (C(), V(o, {
993
+ key: 1,
994
+ onClick: n[1] || (n[1] = (E) => {
995
+ var g;
996
+ return (g = l.value) == null ? void 0 : g.open();
997
+ })
998
+ }, {
999
+ default: a(() => [
1000
+ L(" 修改密码 ")
1001
+ ]),
1002
+ _: 1
1003
+ })),
1004
+ s(o, { onClick: c }, {
1005
+ default: a(() => [
1006
+ L("退出登录")
1007
+ ]),
1008
+ _: 1
1009
+ })
1010
+ ]),
1011
+ _: 1
1012
+ })
1013
+ ]),
1014
+ default: a(() => [
1015
+ te("div", tn, [
1016
+ s(m, { class: "user-msg-icon" }, {
1017
+ default: a(() => [
1018
+ s(k(Ze))
1019
+ ]),
1020
+ _: 1
1021
+ }),
1022
+ te("span", null, Xe(d == null ? void 0 : d.username), 1),
1023
+ s(m, { class: "user-msg-arrow" }, {
1024
+ default: a(() => [
1025
+ s(k(Ie))
1026
+ ]),
1027
+ _: 1
1028
+ })
1029
+ ])
1030
+ ]),
1031
+ _: 1
1032
+ })) : (C(), M("div", {
1033
+ key: 1,
1034
+ class: "user-login",
1035
+ onClick: i
1036
+ }, [
1037
+ L(" 前往登录 "),
1038
+ s(m, { class: "user-login-icon" }, {
1039
+ default: a(() => [
1040
+ s(k(xe))
1041
+ ]),
1042
+ _: 1
1043
+ })
1044
+ ])),
1045
+ s(xo, {
1046
+ ref_key: "SetPasswordDialogRef",
1047
+ ref: _,
1048
+ onCallBack: b
1049
+ }, null, 512),
1050
+ s(on, {
1051
+ ref_key: "EditPasswordDialogRef",
1052
+ ref: l
1053
+ }, null, 512)
1054
+ ]);
1055
+ };
1056
+ }
1057
+ }, ln = /* @__PURE__ */ ro(rn, [["__scopeId", "data-v-e34cf962"]]), Nn = {
904
1058
  install(e) {
905
- e.component("st-user", on);
1059
+ e.component("st-user", ln);
906
1060
  }
907
1061
  };
908
1062
  export {
909
- kn as default
1063
+ Nn as default
910
1064
  };