st-comp 0.0.148 → 0.0.150

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/components.d.ts +3 -0
  2. package/es/ChartLayout.cjs +1 -1
  3. package/es/ChartLayout.js +5 -4
  4. package/es/Dialog.cjs +1 -1
  5. package/es/Dialog.js +28 -24
  6. package/es/FactorWarning.cjs +1 -1
  7. package/es/FactorWarning.js +577 -631
  8. package/es/Kline.cjs +1 -0
  9. package/es/Kline.js +1903 -0
  10. package/es/KlineBasic.cjs +1 -1
  11. package/es/KlineBasic.js +677 -1428
  12. package/es/KlineNew.cjs +1 -3
  13. package/es/KlineNew.js +316 -2740
  14. package/es/Pagination.cjs +1 -1
  15. package/es/Pagination.js +60 -58
  16. package/es/PasswordPrompt.cjs +1 -0
  17. package/es/PasswordPrompt.js +13 -0
  18. package/es/Table.cjs +1 -1
  19. package/es/Table.js +102 -98
  20. package/es/User.cjs +1 -1
  21. package/es/User.js +397 -373
  22. package/es/VarietySearch.cjs +1 -1
  23. package/es/VarietySearch.js +2395 -1
  24. package/es/VirtualTable.cjs +5 -5
  25. package/es/VirtualTable.js +154 -151
  26. package/es/_initCloneObject-47814efa.cjs +1 -0
  27. package/es/{_initCloneObject-ec5c9523.js → _initCloneObject-e3d8a9ab.js} +13 -13
  28. package/es/base-0ca7c43a.cjs +5 -0
  29. package/es/base-19787dfb.js +303 -0
  30. package/es/{castArray-c770910d.js → castArray-8405000b.js} +1 -1
  31. package/es/castArray-a78ae889.cjs +1 -0
  32. package/es/{config-provider-feed0e8a.js → config-provider-0f6672af.js} +3 -3
  33. package/es/{config-provider-c87e277f.cjs → config-provider-cfbb9cd8.cjs} +1 -1
  34. package/es/{debounce-c64fb3b5.js → debounce-6cb0781f.js} +29 -29
  35. package/es/debounce-cf26af24.cjs +1 -0
  36. package/es/{dropdown-c9272ca3.js → dropdown-17b3ef6a.js} +4 -4
  37. package/es/{dropdown-6bdb3cf4.cjs → dropdown-790d31ea.cjs} +1 -1
  38. package/es/el-button-0bf1d532.js +236 -0
  39. package/es/el-button-62966947.cjs +1 -0
  40. package/es/el-checkbox-group-45247bbf.cjs +1 -0
  41. package/es/el-checkbox-group-d53bc316.js +67 -0
  42. package/es/el-empty-2ece1134.cjs +1 -0
  43. package/es/{el-empty-89a523ed.js → el-empty-bd5343a7.js} +10 -9
  44. package/es/{el-form-item-55d36086.js → el-form-item-05c0e335.js} +82 -81
  45. package/es/el-form-item-47e255d4.cjs +12 -0
  46. package/es/{el-input-cb528574.js → el-input-1e309239.js} +46 -45
  47. package/es/el-input-6a3805c5.cjs +1 -0
  48. package/es/{el-input-number-ce30bfa8.js → el-input-number-60ebc58f.js} +50 -48
  49. package/es/el-input-number-96ff2e47.cjs +1 -0
  50. package/es/el-menu-item-4c9eb7ad.cjs +1 -0
  51. package/es/el-menu-item-6c6236a1.js +772 -0
  52. package/es/{el-message-d51d032b.js → el-message-7d927756.js} +56 -55
  53. package/es/el-message-d5ed7a4f.cjs +1 -0
  54. package/es/el-overlay-26bf0945.js +521 -0
  55. package/es/el-overlay-41994f67.cjs +1 -0
  56. package/es/el-popover-17e2e66c.js +140 -0
  57. package/es/el-popover-7bd8a7c3.cjs +1 -0
  58. package/es/el-popper-7adbf1c6.cjs +1 -0
  59. package/es/{el-popper-f4b01f85.js → el-popper-b6527ae2.js} +217 -216
  60. package/es/{el-scrollbar-e8e93751.js → el-scrollbar-29bcab5f.js} +22 -22
  61. package/es/el-scrollbar-ac525239.cjs +1 -0
  62. package/es/el-select-31f8ac8a.cjs +1 -0
  63. package/es/{el-select-e71af2e6.js → el-select-7395562b.js} +42 -40
  64. package/es/el-table-column-47d80736.js +3804 -0
  65. package/es/el-table-column-bdc46568.cjs +14 -0
  66. package/es/{el-tag-d65768f4.js → el-tag-7414e0c7.js} +59 -58
  67. package/es/el-tag-9732314f.cjs +1 -0
  68. package/es/{index-da646183.cjs → index-1d85ba4b.cjs} +1 -1
  69. package/es/{index-92ba4292.js → index-273822d1.js} +26 -25
  70. package/es/index-2f958e56.cjs +3 -0
  71. package/es/index-375e8de4.cjs +5 -0
  72. package/es/{index-121e2861.js → index-621b092b.js} +3 -3
  73. package/es/index-657047bb.js +513 -0
  74. package/es/{index-18416440.cjs → index-65b4113e.cjs} +1 -1
  75. package/es/index-70372cdb.js +519 -0
  76. package/es/{use-form-common-props-4d37077d.js → index-72151b24.js} +151 -312
  77. package/es/index-9e6e8d03.cjs +1 -0
  78. package/es/index-ab96bbf4.js +156 -0
  79. package/es/index-afc88a4b.cjs +1 -0
  80. package/es/index-c066fe0d.js +82 -0
  81. package/es/index-ce3223db.cjs +1 -0
  82. package/es/{index-709675d5.js → index-dc22ffe4.js} +18 -18
  83. package/es/index-eea0bcb3.cjs +1 -0
  84. package/es/index.esm-8d9a2abe.js +2432 -0
  85. package/es/index.esm-94a95a2a.cjs +3 -0
  86. package/es/{raf-f55e0daa.js → raf-a532c514.js} +1 -1
  87. package/es/{raf-2d77cbbe.cjs → raf-f46caea0.cjs} +1 -1
  88. package/es/{scroll-c8ac196e.cjs → scroll-339681d4.cjs} +1 -1
  89. package/es/{scroll-ca84f80a.js → scroll-d787d648.js} +1 -1
  90. package/es/style.css +1 -1
  91. package/es/use-form-common-props-5ff2f51b.js +171 -0
  92. package/es/use-form-common-props-74a96df2.cjs +2 -0
  93. package/es/vnode-6a0c7411.js +14 -0
  94. package/es/vnode-b15eb11b.cjs +1 -0
  95. package/es/{zh-cn-414d7f0c.cjs → zh-cn-36f34912.cjs} +1 -1
  96. package/es/{zh-cn-23c8e0d1.js → zh-cn-f37255ae.js} +2 -2
  97. package/lib/bundle.js +1 -1
  98. package/lib/bundle.umd.cjs +206 -206
  99. package/lib/{index-ffeb163e.js → index-d0cb2fa2.js} +33754 -31705
  100. package/lib/{python-0ec8f68c.js → python-050ba5a4.js} +1 -1
  101. package/lib/style.css +1 -1
  102. package/package.json +1 -1
  103. package/packages/Kline/components/Contextmenu/index.vue +110 -0
  104. package/packages/Kline/components/Tips/index.vue +40 -0
  105. package/packages/Kline/componentsNew/KlineSlide/index.vue +155 -0
  106. package/packages/Kline/componentsNew/KlineSub/index.vue +297 -0
  107. package/packages/Kline/componentsNew/KlineTips/index.vue +66 -0
  108. package/packages/Kline/componentsNew/KlineUtils/index.vue +84 -0
  109. package/packages/Kline/componentsNew/Tips/index.vue +33 -0
  110. package/packages/Kline/formatKlineData.ts +109 -0
  111. package/packages/Kline/images/buy.svg +1 -0
  112. package/packages/Kline/images/pen.png +0 -0
  113. package/packages/Kline/images/sell.svg +1 -0
  114. package/packages/Kline/images/t.svg +1 -0
  115. package/packages/Kline/index.ts +16 -0
  116. package/packages/Kline/index.vue +891 -0
  117. package/packages/Kline/option.ts +539 -0
  118. package/packages/Kline/type.d.ts +219 -0
  119. package/packages/Kline/utils.ts +682 -0
  120. package/packages/PasswordPrompt/index.ts +8 -0
  121. package/packages/PasswordPrompt/index.vue +266 -0
  122. package/packages/User/index.vue +97 -58
  123. package/packages/index.ts +4 -0
  124. package/src/pages/Kline/index.vue +12 -0
  125. package/src/pages/PasswordPrompt/index.vue +12 -0
  126. package/src/router/routes.ts +10 -0
  127. package/es/_initCloneObject-476b02ce.cjs +0 -1
  128. package/es/base-6ccc8fc2.cjs +0 -9
  129. package/es/base-950bac7e.js +0 -816
  130. package/es/castArray-374558a5.cjs +0 -1
  131. package/es/debounce-a6b4f91b.cjs +0 -1
  132. package/es/el-button-b8f71c7d.cjs +0 -1
  133. package/es/el-button-d7b6eebd.js +0 -745
  134. package/es/el-empty-12eece57.cjs +0 -1
  135. package/es/el-form-item-ebbf096d.cjs +0 -12
  136. package/es/el-input-2c7e70a3.cjs +0 -1
  137. package/es/el-input-number-8e168e83.cjs +0 -1
  138. package/es/el-message-612c2346.cjs +0 -1
  139. package/es/el-overlay-07414277.js +0 -526
  140. package/es/el-overlay-fb255b83.cjs +0 -1
  141. package/es/el-popper-8360bd91.cjs +0 -1
  142. package/es/el-scrollbar-271142ad.cjs +0 -1
  143. package/es/el-select-2e71d4af.cjs +0 -1
  144. package/es/el-table-column-9fe79f05.cjs +0 -14
  145. package/es/el-table-column-dc562f14.js +0 -3933
  146. package/es/el-tag-930e7b32.cjs +0 -1
  147. package/es/index-0ed86daf.cjs +0 -3
  148. package/es/index-674d2fd7.cjs +0 -1
  149. package/es/index-aece600c.js +0 -81
  150. package/es/use-form-common-props-c1960844.cjs +0 -2
package/es/Table.js CHANGED
@@ -1,20 +1,24 @@
1
- import { b as ee, J as te, u as oe, y as ne, _ as le, L as re, w as ae, M as I, i as se, v as Y, O as A, P as F, H as Z, Q as ie } from "./base-950bac7e.js";
2
- import { z as ce, E as de } from "./zh-cn-23c8e0d1.js";
3
- import { E as ue, a as pe, b as fe } from "./el-table-column-dc562f14.js";
1
+ import { b as ee, c as te, u as oe, v as ne, _ as re, x as le, w as ae, r as I, h as se, i as J, y as A, m as H, f as Q, z as ie } from "./base-19787dfb.js";
2
+ import { z as ce, E as de } from "./zh-cn-f37255ae.js";
3
+ import { b as ue, c as pe } from "./el-table-column-47d80736.js";
4
4
  import "./el-tooltip-4ed993c7.js";
5
- import { u as K, a as x, E as ve } from "./el-popper-f4b01f85.js";
6
- import "./el-scrollbar-e8e93751.js";
7
- import "./el-tag-d65768f4.js";
5
+ import { a as K, b as x, E as fe } from "./el-popper-b6527ae2.js";
6
+ import "./el-scrollbar-29bcab5f.js";
7
+ import "./el-tag-7414e0c7.js";
8
+ import { E as ve } from "./el-popover-17e2e66c.js";
8
9
  import { defineComponent as S, computed as $, ref as q, unref as w, openBlock as d, createBlock as k, mergeProps as me, withCtx as m, createElementBlock as g, normalizeClass as be, toDisplayString as T, createCommentVNode as z, renderSlot as j, createTextVNode as M, reactive as ye, h as P, Transition as ge, withDirectives as X, createVNode as L, vShow as he, createApp as we, toRefs as Ce, nextTick as _, isRef as xe, Fragment as E, normalizeStyle as U, renderList as O, createSlots as ke } from "vue";
9
- import { x as $e, E as Ee } from "./use-form-common-props-4d37077d.js";
10
- import { E as Le } from "./el-button-d7b6eebd.js";
11
- import { d as R } from "./dropdown-c9272ca3.js";
12
- import { u as Se } from "./index-aece600c.js";
13
- import "./config-provider-feed0e8a.js";
14
- import "./_initCloneObject-ec5c9523.js";
15
- import "./debounce-c64fb3b5.js";
16
- import "./index-121e2861.js";
17
- import "./raf-f55e0daa.js";
10
+ import { c as $e, E as Ee } from "./index-72151b24.js";
11
+ import { E as Le } from "./el-button-0bf1d532.js";
12
+ import { d as R } from "./dropdown-17b3ef6a.js";
13
+ import { u as Se } from "./index-c066fe0d.js";
14
+ import "./config-provider-0f6672af.js";
15
+ import "./use-form-common-props-5ff2f51b.js";
16
+ import "./index-70372cdb.js";
17
+ import "./_initCloneObject-e3d8a9ab.js";
18
+ import "./debounce-6cb0781f.js";
19
+ import "./index-621b092b.js";
20
+ import "./raf-a532c514.js";
21
+ import "./index-657047bb.js";
18
22
  const Ae = ee({
19
23
  trigger: K.trigger,
20
24
  placement: R.placement,
@@ -80,17 +84,17 @@ const Ae = ee({
80
84
  props: Ae,
81
85
  emits: Pe,
82
86
  setup(e, { expose: t, emit: o }) {
83
- const n = e, s = $(() => n[Te]), r = oe("popover"), i = q(), c = $(() => {
84
- var l;
85
- return (l = w(i)) == null ? void 0 : l.popperRef;
87
+ const n = e, s = $(() => n[Te]), l = oe("popover"), i = q(), c = $(() => {
88
+ var r;
89
+ return (r = w(i)) == null ? void 0 : r.popperRef;
86
90
  }), y = $(() => [
87
91
  {
88
92
  width: ne(n.width)
89
93
  },
90
94
  n.popperStyle
91
- ]), u = $(() => [r.b(), n.popperClass, { [r.m("plain")]: !!n.content }]), h = $(() => n.transition === `${r.namespace.value}-fade-in-linear`), b = () => {
92
- var l;
93
- (l = i.value) == null || l.hide();
95
+ ]), u = $(() => [l.b(), n.popperClass, { [l.m("plain")]: !!n.content }]), h = $(() => n.transition === `${l.namespace.value}-fade-in-linear`), b = () => {
96
+ var r;
97
+ (r = i.value) == null || r.hide();
94
98
  }, a = () => {
95
99
  o("before-enter");
96
100
  }, f = () => {
@@ -103,30 +107,30 @@ const Ae = ee({
103
107
  return t({
104
108
  popperRef: c,
105
109
  hide: b
106
- }), (l, C) => (d(), k(w(ve), me({
110
+ }), (r, C) => (d(), k(w(fe), me({
107
111
  ref_key: "tooltipRef",
108
112
  ref: i
109
- }, l.$attrs, {
110
- trigger: l.trigger,
111
- placement: l.placement,
112
- disabled: l.disabled,
113
- visible: l.visible,
114
- transition: l.transition,
115
- "popper-options": l.popperOptions,
116
- tabindex: l.tabindex,
117
- content: l.content,
118
- offset: l.offset,
119
- "show-after": l.showAfter,
120
- "hide-after": l.hideAfter,
121
- "auto-close": l.autoClose,
122
- "show-arrow": l.showArrow,
123
- "aria-label": l.title,
124
- effect: l.effect,
125
- enterable: l.enterable,
113
+ }, r.$attrs, {
114
+ trigger: r.trigger,
115
+ placement: r.placement,
116
+ disabled: r.disabled,
117
+ visible: r.visible,
118
+ transition: r.transition,
119
+ "popper-options": r.popperOptions,
120
+ tabindex: r.tabindex,
121
+ content: r.content,
122
+ offset: r.offset,
123
+ "show-after": r.showAfter,
124
+ "hide-after": r.hideAfter,
125
+ "auto-close": r.autoClose,
126
+ "show-arrow": r.showArrow,
127
+ "aria-label": r.title,
128
+ effect: r.effect,
129
+ enterable: r.enterable,
126
130
  "popper-class": w(u),
127
131
  "popper-style": w(y),
128
- teleported: l.teleported,
129
- persistent: l.persistent,
132
+ teleported: r.teleported,
133
+ persistent: r.persistent,
130
134
  "gpu-acceleration": w(h),
131
135
  "onUpdate:visible": w(s),
132
136
  onBeforeShow: a,
@@ -135,23 +139,23 @@ const Ae = ee({
135
139
  onHide: p
136
140
  }), {
137
141
  content: m(() => [
138
- l.title ? (d(), g("div", {
142
+ r.title ? (d(), g("div", {
139
143
  key: 0,
140
- class: be(w(r).e("title")),
144
+ class: be(w(l).e("title")),
141
145
  role: "title"
142
- }, T(l.title), 3)) : z("v-if", !0),
143
- j(l.$slots, "default", {}, () => [
144
- M(T(l.content), 1)
146
+ }, T(r.title), 3)) : z("v-if", !0),
147
+ j(r.$slots, "default", {}, () => [
148
+ M(T(r.content), 1)
145
149
  ])
146
150
  ]),
147
151
  default: m(() => [
148
- l.$slots.reference ? j(l.$slots, "reference", { key: 0 }) : z("v-if", !0)
152
+ r.$slots.reference ? j(r.$slots, "reference", { key: 0 }) : z("v-if", !0)
149
153
  ]),
150
154
  _: 3
151
155
  }, 16, ["trigger", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "persistent", "gpu-acceleration", "onUpdate:visible"]));
152
156
  }
153
157
  });
154
- var Ie = /* @__PURE__ */ le(Ne, [["__file", "popover.vue"]]);
158
+ var Ie = /* @__PURE__ */ re(Ne, [["__file", "popover.vue"]]);
155
159
  const W = (e, t) => {
156
160
  const o = t.arg || t.value, n = o == null ? void 0 : o.popperRef;
157
161
  n && (n.triggerRef = e);
@@ -164,7 +168,7 @@ var Ve = {
164
168
  W(e, t);
165
169
  }
166
170
  };
167
- const Oe = "popover", Re = re(Ve, Oe), ze = ae(Ie, {
171
+ const Oe = "popover", Re = le(Ve, Oe), ze = ae(Ie, {
168
172
  directive: Re
169
173
  });
170
174
  function je(e) {
@@ -178,7 +182,7 @@ function je(e) {
178
182
  function s(a) {
179
183
  n.text = a;
180
184
  }
181
- function r() {
185
+ function l() {
182
186
  const a = n.parent, f = b.ns;
183
187
  if (!a.vLoadingAddClassList) {
184
188
  let v = a.getAttribute("loading-number");
@@ -198,7 +202,7 @@ function je(e) {
198
202
  if (!o.value)
199
203
  return;
200
204
  const a = n.parent;
201
- o.value = !1, a.vLoadingAddClassList = void 0, r();
205
+ o.value = !1, a.vLoadingAddClassList = void 0, l();
202
206
  }
203
207
  const u = S({
204
208
  name: "ElLoading",
@@ -208,10 +212,10 @@ function je(e) {
208
212
  ns: v,
209
213
  zIndex: p
210
214
  }), () => {
211
- const l = n.spinner || n.svg, C = P("svg", {
215
+ const r = n.spinner || n.svg, C = P("svg", {
212
216
  class: "circular",
213
217
  viewBox: n.svgViewBox ? n.svgViewBox : "0 0 50 50",
214
- ...l ? { innerHTML: l } : {}
218
+ ...r ? { innerHTML: r } : {}
215
219
  }, [
216
220
  P("circle", {
217
221
  class: "path",
@@ -276,21 +280,21 @@ const Me = function(e = {}) {
276
280
  return n ? n = `${Number.parseInt(n) + 1}` : n = "1", t.parent.setAttribute("loading-number", n), t.parent.appendChild(o.$el), _(() => o.visible.value = t.visible), t.fullscreen && (B = o), o;
277
281
  }, Ue = (e) => {
278
282
  var t, o, n, s;
279
- let r;
280
- return Y(e.target) ? r = (t = document.querySelector(e.target)) != null ? t : document.body : r = e.target || document.body, {
281
- parent: r === document.body || e.body ? document.body : r,
283
+ let l;
284
+ return J(e.target) ? l = (t = document.querySelector(e.target)) != null ? t : document.body : l = e.target || document.body, {
285
+ parent: l === document.body || e.body ? document.body : l,
282
286
  background: e.background || "",
283
287
  svg: e.svg || "",
284
288
  svgViewBox: e.svgViewBox || "",
285
289
  spinner: e.spinner || !1,
286
290
  text: e.text || "",
287
- fullscreen: r === document.body && ((o = e.fullscreen) != null ? o : !0),
291
+ fullscreen: l === document.body && ((o = e.fullscreen) != null ? o : !0),
288
292
  lock: (n = e.lock) != null ? n : !1,
289
293
  customClass: e.customClass || "",
290
294
  visible: (s = e.visible) != null ? s : !0,
291
295
  beforeClose: e.beforeClose,
292
296
  closed: e.closed,
293
- target: r
297
+ target: l
294
298
  };
295
299
  }, qe = async (e, t, o) => {
296
300
  const { nextZIndex: n } = o.vm.zIndex || o.vm._.exposed.zIndex, s = {};
@@ -298,23 +302,23 @@ const Me = function(e = {}) {
298
302
  o.originalPosition.value = A(document.body, "position"), o.originalOverflow.value = A(document.body, "overflow"), s.zIndex = n();
299
303
  else if (e.parent === document.body) {
300
304
  o.originalPosition.value = A(document.body, "position"), await _();
301
- for (const r of ["top", "left"]) {
302
- const i = r === "top" ? "scrollTop" : "scrollLeft";
303
- s[r] = `${e.target.getBoundingClientRect()[r] + document.body[i] + document.documentElement[i] - Number.parseInt(A(document.body, `margin-${r}`), 10)}px`;
305
+ for (const l of ["top", "left"]) {
306
+ const i = l === "top" ? "scrollTop" : "scrollLeft";
307
+ s[l] = `${e.target.getBoundingClientRect()[l] + document.body[i] + document.documentElement[i] - Number.parseInt(A(document.body, `margin-${l}`), 10)}px`;
304
308
  }
305
- for (const r of ["height", "width"])
306
- s[r] = `${e.target.getBoundingClientRect()[r]}px`;
309
+ for (const l of ["height", "width"])
310
+ s[l] = `${e.target.getBoundingClientRect()[l]}px`;
307
311
  } else
308
312
  o.originalPosition.value = A(t, "position");
309
- for (const [r, i] of Object.entries(s))
310
- o.$el.style[r] = i;
313
+ for (const [l, i] of Object.entries(s))
314
+ o.$el.style[l] = i;
311
315
  }, G = (e, t, o) => {
312
316
  const n = o.vm.ns || o.vm._.exposed.ns;
313
- ["absolute", "fixed", "sticky"].includes(o.originalPosition.value) ? I(t, n.bm("parent", "relative")) : F(t, n.bm("parent", "relative")), e.fullscreen && e.lock ? F(t, n.bm("parent", "hidden")) : I(t, n.bm("parent", "hidden"));
314
- }, N = Symbol("ElLoading"), J = (e, t) => {
315
- var o, n, s, r;
316
- const i = t.instance, c = (a) => Z(t.value) ? t.value[a] : void 0, y = (a) => {
317
- const f = Y(a) && (i == null ? void 0 : i[a]) || a;
317
+ ["absolute", "fixed", "sticky"].includes(o.originalPosition.value) ? I(t, n.bm("parent", "relative")) : H(t, n.bm("parent", "relative")), e.fullscreen && e.lock ? H(t, n.bm("parent", "hidden")) : I(t, n.bm("parent", "hidden"));
318
+ }, N = Symbol("ElLoading"), Y = (e, t) => {
319
+ var o, n, s, l;
320
+ const i = t.instance, c = (a) => Q(t.value) ? t.value[a] : void 0, y = (a) => {
321
+ const f = J(a) && (i == null ? void 0 : i[a]) || a;
318
322
  return f && q(f);
319
323
  }, u = (a) => y(c(a) || e.getAttribute(`element-loading-${ie(a)}`)), h = (o = c("fullscreen")) != null ? o : t.modifiers.fullscreen, b = {
320
324
  text: u("text"),
@@ -326,7 +330,7 @@ const Me = function(e = {}) {
326
330
  fullscreen: h,
327
331
  target: (n = c("target")) != null ? n : h ? void 0 : e,
328
332
  body: (s = c("body")) != null ? s : t.modifiers.body,
329
- lock: (r = c("lock")) != null ? r : t.modifiers.lock
333
+ lock: (l = c("lock")) != null ? l : t.modifiers.lock
330
334
  };
331
335
  e[N] = {
332
336
  options: b,
@@ -335,20 +339,20 @@ const Me = function(e = {}) {
335
339
  }, De = (e, t) => {
336
340
  for (const o of Object.keys(t))
337
341
  xe(t[o]) && (t[o].value = e[o]);
338
- }, He = {
342
+ }, Fe = {
339
343
  mounted(e, t) {
340
- t.value && J(e, t);
344
+ t.value && Y(e, t);
341
345
  },
342
346
  updated(e, t) {
343
347
  const o = e[N];
344
- t.oldValue !== t.value && (t.value && !t.oldValue ? J(e, t) : t.value && t.oldValue ? Z(t.value) && De(t.value, o.options) : o == null || o.instance.close());
348
+ t.oldValue !== t.value && (t.value && !t.oldValue ? Y(e, t) : t.value && t.oldValue ? Q(t.value) && De(t.value, o.options) : o == null || o.instance.close());
345
349
  },
346
350
  unmounted(e) {
347
351
  var t;
348
352
  (t = e[N]) == null || t.instance.close(), e[N] = null;
349
353
  }
350
354
  };
351
- const Q = /* @__PURE__ */ S({
355
+ const Z = /* @__PURE__ */ S({
352
356
  __name: "index",
353
357
  props: {
354
358
  option: {
@@ -370,7 +374,7 @@ const Q = /* @__PURE__ */ S({
370
374
  return typeof n.show == "function" ? n.show(s.row, s.$index) : n.show !== !1;
371
375
  });
372
376
  return (n, s) => {
373
- const r = Le, i = ue;
377
+ const l = Le, i = ve;
374
378
  return o.value ? (d(), g(E, { key: 0 }, [
375
379
  e.option.needCheck ? (d(), k(i, {
376
380
  key: 0,
@@ -378,7 +382,7 @@ const Q = /* @__PURE__ */ S({
378
382
  onConfirm: s[0] || (s[0] = (c) => e.option.onClick(e.scope.row, e.scope.$index))
379
383
  }, {
380
384
  reference: m(() => [
381
- L(r, {
385
+ L(l, {
382
386
  type: e.option.type,
383
387
  disabled: typeof e.option.disabled == "function" ? e.option.disabled(e.scope.row, e.scope.$index) : e.option.disabled,
384
388
  style: U({ marginTop: e.showMargin ? "10px" : 0 })
@@ -390,7 +394,7 @@ const Q = /* @__PURE__ */ S({
390
394
  }, 8, ["type", "disabled", "style"])
391
395
  ]),
392
396
  _: 1
393
- }, 8, ["title"])) : (d(), k(r, {
397
+ }, 8, ["title"])) : (d(), k(l, {
394
398
  key: 1,
395
399
  type: e.option.type,
396
400
  disabled: typeof e.option.disabled == "function" ? e.option.disabled(e.scope.row, e.scope.$index) : e.option.disabled,
@@ -405,7 +409,7 @@ const Q = /* @__PURE__ */ S({
405
409
  ], 64)) : (d(), g(E, { key: 1 }, [], 64));
406
410
  };
407
411
  }
408
- }), Fe = /* @__PURE__ */ S({
412
+ }), He = /* @__PURE__ */ S({
409
413
  __name: "index",
410
414
  props: {
411
415
  option: {
@@ -444,11 +448,11 @@ const Q = /* @__PURE__ */ S({
444
448
  },
445
449
  emits: ["sortChange"],
446
450
  setup(e, { emit: t }) {
447
- const o = t, n = e, s = $(() => n.column.filter((c) => c.show !== !1)), r = (c) => {
451
+ const o = t, n = e, s = $(() => n.column.filter((c) => c.show !== !1)), l = (c) => {
448
452
  o("sortChange", c);
449
453
  }, i = (c, y) => c.filter((u) => typeof u.show == "function" && u.show(y.row, y.$index) === !1 ? !1 : u.show !== !1);
450
454
  return (c, y) => {
451
- const u = Ee, h = ze, b = pe, a = fe, f = de, v = He;
455
+ const u = Ee, h = ze, b = ue, a = pe, f = de, v = Fe;
452
456
  return d(), k(f, { locale: w(ce) }, {
453
457
  default: m(() => [
454
458
  X((d(), k(a, {
@@ -456,7 +460,7 @@ const Q = /* @__PURE__ */ S({
456
460
  "empty-text": e.emptyText,
457
461
  stripe: "",
458
462
  style: { width: "100%" },
459
- onSortChange: r
463
+ onSortChange: l
460
464
  }, {
461
465
  default: m(() => [
462
466
  (d(!0), g(E, null, O(s.value, (p) => (d(), k(b, {
@@ -469,29 +473,29 @@ const Q = /* @__PURE__ */ S({
469
473
  }, ke({ _: 2 }, [
470
474
  p.type === "formatter" ? {
471
475
  name: "default",
472
- fn: m((l) => [
473
- L(Fe, {
476
+ fn: m((r) => [
477
+ L(He, {
474
478
  option: p,
475
- scope: l
479
+ scope: r
476
480
  }, null, 8, ["option", "scope"])
477
481
  ]),
478
482
  key: "0"
479
483
  } : p.type === "slot" ? {
480
484
  name: "default",
481
- fn: m((l) => [
485
+ fn: m((r) => [
482
486
  j(c.$slots, p.slot, {
483
- row: l.row
487
+ row: r.row
484
488
  })
485
489
  ]),
486
490
  key: "1"
487
491
  } : p.type === "btns" ? {
488
492
  name: "default",
489
- fn: m((l) => [
493
+ fn: m((r) => [
490
494
  (d(!0), g(E, null, O(p.btns, (C, V) => (d(), g(E, {
491
495
  key: `${C.text}-${V}`
492
496
  }, [
493
497
  C.children ? (d(), g(E, { key: 0 }, [
494
- i(C.children, l).length ? (d(), k(h, {
498
+ i(C.children, r).length ? (d(), k(h, {
495
499
  key: 0,
496
500
  placement: "bottom",
497
501
  trigger: "hover",
@@ -509,22 +513,22 @@ const Q = /* @__PURE__ */ S({
509
513
  })
510
514
  ]),
511
515
  default: m(() => [
512
- (d(!0), g(E, null, O(i(C.children, l), (D, H) => (d(), g("div", {
513
- key: `${D.text}-${H}`
516
+ (d(!0), g(E, null, O(i(C.children, r), (D, F) => (d(), g("div", {
517
+ key: `${D.text}-${F}`
514
518
  }, [
515
- L(Q, {
519
+ L(Z, {
516
520
  option: D,
517
- scope: l,
518
- showMargin: H !== 0
521
+ scope: r,
522
+ showMargin: F !== 0
519
523
  }, null, 8, ["option", "scope", "showMargin"])
520
524
  ]))), 128))
521
525
  ]),
522
526
  _: 2
523
527
  }, 1024)) : z("", !0)
524
- ], 64)) : (d(), k(Q, {
528
+ ], 64)) : (d(), k(Z, {
525
529
  key: 1,
526
530
  option: C,
527
- scope: l
531
+ scope: r
528
532
  }, null, 8, ["option", "scope"]))
529
533
  ], 64))), 128))
530
534
  ]),
@@ -541,11 +545,11 @@ const Q = /* @__PURE__ */ S({
541
545
  }, 8, ["locale"]);
542
546
  };
543
547
  }
544
- }), ct = {
548
+ }), ft = {
545
549
  install(e) {
546
550
  e.component("st-table", Ke);
547
551
  }
548
552
  };
549
553
  export {
550
- ct as default
554
+ ft as default
551
555
  };
package/es/User.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";const v=require("./base-6ccc8fc2.cjs"),A=require("./el-overlay-fb255b83.cjs"),G=require("./el-button-b8f71c7d.cjs"),J=require("./el-form-item-ebbf096d.cjs"),ne=require("./el-input-2c7e70a3.cjs"),I=require("./el-popper-8360bd91.cjs"),te=require("./el-scrollbar-271142ad.cjs"),e=require("vue"),S=require("./use-form-common-props-c1960844.cjs"),L=require("./index-a96158ae.cjs"),re=require("./_plugin-vue_export-helper-f246444f.cjs"),le=require("./el-message-612c2346.cjs"),k=require("./dropdown-6bdb3cf4.cjs"),V=require("./index-18416440.cjs"),se=require("./castArray-374558a5.cjs");require("./scroll-c8ac196e.cjs");require("./index-0ed86daf.cjs");require("./_initCloneObject-476b02ce.cjs");require("./typescript-b63f8e83.cjs");require("./index-da646183.cjs");require("./config-provider-c87e277f.cjs");const ie=v.buildProps({style:{type:v.definePropType([String,Array,Object])},currentTabId:{type:v.definePropType(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:v.definePropType(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:ae,ElCollectionItem:de,COLLECTION_INJECTION_KEY:q,COLLECTION_ITEM_INJECTION_KEY:ce}=k.createCollectionWithScope("RovingFocusGroup"),z=Symbol("elRovingFocusGroup"),X=Symbol("elRovingFocusGroupItem"),ue={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},pe=(o,t)=>{if(t!=="rtl")return o;switch(o){case V.EVENT_CODE.right:return V.EVENT_CODE.left;case V.EVENT_CODE.left:return V.EVENT_CODE.right;default:return o}},fe=(o,t,p)=>{const l=pe(o.code,p);if(!(t==="vertical"&&[V.EVENT_CODE.left,V.EVENT_CODE.right].includes(l))&&!(t==="horizontal"&&[V.EVENT_CODE.up,V.EVENT_CODE.down].includes(l)))return ue[l]},me=(o,t)=>o.map((p,l)=>o[(l+t)%o.length]),H=o=>{const{activeElement:t}=document;for(const p of o)if(p===t||(p.focus(),t!==document.activeElement))return},W="currentTabIdChange",Q="rovingFocusGroup.entryFocus",ve={bubbles:!1,cancelable:!0},we=e.defineComponent({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:ie,emits:[W,"entryFocus"],setup(o,{emit:t}){var p;const l=e.ref((p=o.currentTabId||o.defaultCurrentTabId)!=null?p:null),m=e.ref(!1),f=e.ref(!1),c=e.ref(null),{getItems:i}=e.inject(q,void 0),a=e.computed(()=>[{outline:"none"},o.style]),g=d=>{t(W,d)},E=()=>{m.value=!0},C=I.composeEventHandlers(d=>{var r;(r=o.onMousedown)==null||r.call(o,d)},()=>{f.value=!0}),h=I.composeEventHandlers(d=>{var r;(r=o.onFocus)==null||r.call(o,d)},d=>{const r=!e.unref(f),{target:b,currentTarget:y}=d;if(b===y&&r&&!e.unref(m)){const R=new Event(Q,ve);if(y==null||y.dispatchEvent(R),!R.defaultPrevented){const w=i().filter(P=>P.focusable),N=w.find(P=>P.active),_=w.find(P=>P.id===e.unref(l)),$=[N,_,...w].filter(Boolean).map(P=>P.ref);H($)}}f.value=!1}),n=I.composeEventHandlers(d=>{var r;(r=o.onBlur)==null||r.call(o,d)},()=>{m.value=!1}),u=(...d)=>{t("entryFocus",...d)};e.provide(z,{currentTabbedId:e.readonly(l),loop:e.toRef(o,"loop"),tabIndex:e.computed(()=>e.unref(m)?-1:0),rovingFocusGroupRef:c,rovingFocusGroupRootStyle:a,orientation:e.toRef(o,"orientation"),dir:e.toRef(o,"dir"),onItemFocus:g,onItemShiftTab:E,onBlur:n,onFocus:h,onMousedown:C}),e.watch(()=>o.currentTabId,d=>{l.value=d??null}),te.useEventListener(c,Q,u)}});function _e(o,t,p,l,m,f){return e.renderSlot(o.$slots,"default")}var ge=v._export_sfc(we,[["render",_e],["__file","roving-focus-group-impl.vue"]]);const Ee=e.defineComponent({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:ae,ElRovingFocusGroupImpl:ge}});function Ce(o,t,p,l,m,f){const c=e.resolveComponent("el-roving-focus-group-impl"),i=e.resolveComponent("el-focus-group-collection");return e.openBlock(),e.createBlock(i,null,{default:e.withCtx(()=>[e.createVNode(c,e.normalizeProps(e.guardReactiveProps(o.$attrs)),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16)]),_:3})}var he=v._export_sfc(Ee,[["render",Ce],["__file","roving-focus-group.vue"]]);const M=Symbol("elDropdown"),{ButtonGroup:be}=G.ElButton,Ie=e.defineComponent({name:"ElDropdown",components:{ElButton:G.ElButton,ElButtonGroup:be,ElScrollbar:I.ElScrollbar,ElDropdownCollection:k.ElCollection,ElTooltip:I.ElTooltip,ElRovingFocusGroup:he,ElOnlyChild:I.OnlyChild,ElIcon:S.ElIcon,ArrowDown:S.arrow_down_default},props:k.dropdownProps,emits:["visible-change","click","command"],setup(o,{emit:t}){const p=e.getCurrentInstance(),l=v.useNamespace("dropdown"),{t:m}=v.useLocale(),f=e.ref(),c=e.ref(),i=e.ref(null),a=e.ref(null),g=e.ref(null),E=e.ref(null),C=e.ref(!1),h=e.computed(()=>({maxHeight:v.addUnit(o.maxHeight)})),n=e.computed(()=>[l.m(w.value)]),u=e.computed(()=>se.castArray(o.trigger)),d=v.useId().value,r=e.computed(()=>o.id||d);e.watch([f,u],([s,F],[O])=>{var U,j,Y;(U=O==null?void 0:O.$el)!=null&&U.removeEventListener&&O.$el.removeEventListener("pointerenter",_),(j=s==null?void 0:s.$el)!=null&&j.removeEventListener&&s.$el.removeEventListener("pointerenter",_),(Y=s==null?void 0:s.$el)!=null&&Y.addEventListener&&F.includes("hover")&&s.$el.addEventListener("pointerenter",_)},{immediate:!0}),e.onBeforeUnmount(()=>{var s,F;(F=(s=f.value)==null?void 0:s.$el)!=null&&F.removeEventListener&&f.value.$el.removeEventListener("pointerenter",_)});function b(){y()}function y(){var s;(s=i.value)==null||s.onClose()}function R(){var s;(s=i.value)==null||s.onOpen()}const w=S.useFormSize();function N(...s){t("command",...s)}function _(){var s,F;(F=(s=f.value)==null?void 0:s.$el)==null||F.focus()}function B(){}function $(){const s=e.unref(a);u.value.includes("hover")&&(s==null||s.focus()),E.value=null}function P(s){E.value=s}function T(s){C.value||(s.preventDefault(),s.stopImmediatePropagation())}function K(){t("visible-change",!0)}function D(s){(s==null?void 0:s.type)==="keydown"&&a.value.focus()}function oe(){t("visible-change",!1)}return e.provide(M,{contentRef:a,role:e.computed(()=>o.role),triggerId:r,isUsingKeyboard:C,onItemEnter:B,onItemLeave:$}),e.provide("elDropdown",{instance:p,dropdownSize:w,handleClick:b,commandHandler:N,trigger:e.toRef(o,"trigger"),hideOnClick:e.toRef(o,"hideOnClick")}),{t:m,ns:l,scrollbar:g,wrapStyle:h,dropdownTriggerKls:n,dropdownSize:w,triggerId:r,currentTabId:E,handleCurrentTabIdChange:P,handlerMainButtonClick:s=>{t("click",s)},handleEntryFocus:T,handleClose:y,handleOpen:R,handleBeforeShowTooltip:K,handleShowTooltip:D,handleBeforeHideTooltip:oe,onFocusAfterTrapped:s=>{var F,O;s.preventDefault(),(O=(F=a.value)==null?void 0:F.focus)==null||O.call(F,{preventScroll:!0})},popperRef:i,contentRef:a,triggeringElementRef:f,referenceElementRef:c}}});function ye(o,t,p,l,m,f){var c;const i=e.resolveComponent("el-dropdown-collection"),a=e.resolveComponent("el-roving-focus-group"),g=e.resolveComponent("el-scrollbar"),E=e.resolveComponent("el-only-child"),C=e.resolveComponent("el-tooltip"),h=e.resolveComponent("el-button"),n=e.resolveComponent("arrow-down"),u=e.resolveComponent("el-icon"),d=e.resolveComponent("el-button-group");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([o.ns.b(),o.ns.is("disabled",o.disabled)])},[e.createVNode(C,{ref:"popperRef",role:o.role,effect:o.effect,"fallback-placements":["bottom","top"],"popper-options":o.popperOptions,"gpu-acceleration":!1,"hide-after":o.trigger==="hover"?o.hideTimeout:0,"manual-mode":!0,placement:o.placement,"popper-class":[o.ns.e("popper"),o.popperClass],"reference-element":(c=o.referenceElementRef)==null?void 0:c.$el,trigger:o.trigger,"trigger-keys":o.triggerKeys,"trigger-target-el":o.contentRef,"show-after":o.trigger==="hover"?o.showTimeout:0,"stop-popper-mouse-event":!1,"virtual-ref":o.triggeringElementRef,"virtual-triggering":o.splitButton,disabled:o.disabled,transition:`${o.ns.namespace.value}-zoom-in-top`,teleported:o.teleported,pure:"",persistent:"",onBeforeShow:o.handleBeforeShowTooltip,onShow:o.handleShowTooltip,onBeforeHide:o.handleBeforeHideTooltip},e.createSlots({content:e.withCtx(()=>[e.createVNode(g,{ref:"scrollbar","wrap-style":o.wrapStyle,tag:"div","view-class":o.ns.e("list")},{default:e.withCtx(()=>[e.createVNode(a,{loop:o.loop,"current-tab-id":o.currentTabId,orientation:"horizontal",onCurrentTabIdChange:o.handleCurrentTabIdChange,onEntryFocus:o.handleEntryFocus},{default:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.renderSlot(o.$slots,"dropdown")]),_:3})]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange","onEntryFocus"])]),_:3},8,["wrap-style","view-class"])]),_:2},[o.splitButton?void 0:{name:"default",fn:e.withCtx(()=>[e.createVNode(E,{id:o.triggerId,ref:"triggeringElementRef",role:"button",tabindex:o.tabindex},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["id","tabindex"])])}]),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"]),o.splitButton?(e.openBlock(),e.createBlock(d,{key:0},{default:e.withCtx(()=>[e.createVNode(h,e.mergeProps({ref:"referenceElementRef"},o.buttonProps,{size:o.dropdownSize,type:o.type,disabled:o.disabled,tabindex:o.tabindex,onClick:o.handlerMainButtonClick}),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),e.createVNode(h,e.mergeProps({id:o.triggerId,ref:"triggeringElementRef"},o.buttonProps,{role:"button",size:o.dropdownSize,type:o.type,class:o.ns.e("caret-button"),disabled:o.disabled,tabindex:o.tabindex,"aria-label":o.t("el.dropdown.toggleDropdown")}),{default:e.withCtx(()=>[e.createVNode(u,{class:e.normalizeClass(o.ns.e("icon"))},{default:e.withCtx(()=>[e.createVNode(n)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):e.createCommentVNode("v-if",!0)],2)}var Ne=v._export_sfc(Ie,[["render",ye],["__file","dropdown.vue"]]);const Te=e.defineComponent({components:{ElRovingFocusCollectionItem:de},props:{focusable:{type:Boolean,default:!0},active:{type:Boolean,default:!1}},emits:["mousedown","focus","keydown"],setup(o,{emit:t}){const{currentTabbedId:p,loop:l,onItemFocus:m,onItemShiftTab:f}=e.inject(z,void 0),{getItems:c}=e.inject(q,void 0),i=v.useId(),a=e.ref(null),g=I.composeEventHandlers(n=>{t("mousedown",n)},n=>{o.focusable?m(e.unref(i)):n.preventDefault()}),E=I.composeEventHandlers(n=>{t("focus",n)},()=>{m(e.unref(i))}),C=I.composeEventHandlers(n=>{t("keydown",n)},n=>{const{code:u,shiftKey:d,target:r,currentTarget:b}=n;if(u===V.EVENT_CODE.tab&&d){f();return}if(r!==b)return;const y=fe(n);if(y){n.preventDefault();let w=c().filter(N=>N.focusable).map(N=>N.ref);switch(y){case"last":{w.reverse();break}case"prev":case"next":{y==="prev"&&w.reverse();const N=w.indexOf(b);w=l.value?me(w,N+1):w.slice(N+1);break}}e.nextTick(()=>{H(w)})}}),h=e.computed(()=>p.value===e.unref(i));return e.provide(X,{rovingFocusGroupItemRef:a,tabIndex:e.computed(()=>e.unref(h)?0:-1),handleMousedown:g,handleFocus:E,handleKeydown:C}),{id:i,handleKeydown:C,handleFocus:E,handleMousedown:g}}});function Pe(o,t,p,l,m,f){const c=e.resolveComponent("el-roving-focus-collection-item");return e.openBlock(),e.createBlock(c,{id:o.id,focusable:o.focusable,active:o.active},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["id","focusable","active"])}var Ve=v._export_sfc(Te,[["render",Pe],["__file","roving-focus-item.vue"]]);const ke=e.defineComponent({name:"DropdownItemImpl",components:{ElIcon:S.ElIcon},props:k.dropdownItemProps,emits:["pointermove","pointerleave","click","clickimpl"],setup(o,{emit:t}){const p=v.useNamespace("dropdown"),{role:l}=e.inject(M,void 0),{collectionItemRef:m}=e.inject(k.COLLECTION_ITEM_INJECTION_KEY,void 0),{collectionItemRef:f}=e.inject(ce,void 0),{rovingFocusGroupItemRef:c,tabIndex:i,handleFocus:a,handleKeydown:g,handleMousedown:E}=e.inject(X,void 0),C=A.composeRefs(m,f,c),h=e.computed(()=>l.value==="menu"?"menuitem":l.value==="navigation"?"link":"button"),n=I.composeEventHandlers(u=>{if([V.EVENT_CODE.enter,V.EVENT_CODE.numpadEnter,V.EVENT_CODE.space].includes(u.code))return u.preventDefault(),u.stopImmediatePropagation(),t("clickimpl",u),!0},g);return{ns:p,itemRef:C,dataset:{[k.COLLECTION_ITEM_SIGN]:""},role:h,tabIndex:i,handleFocus:a,handleKeydown:n,handleMousedown:E}}});function Fe(o,t,p,l,m,f){const c=e.resolveComponent("el-icon");return e.openBlock(),e.createElementBlock(e.Fragment,null,[o.divided?(e.openBlock(),e.createElementBlock("li",{key:0,role:"separator",class:e.normalizeClass(o.ns.bem("menu","item","divided"))},null,2)):e.createCommentVNode("v-if",!0),e.createElementVNode("li",e.mergeProps({ref:o.itemRef},{...o.dataset,...o.$attrs},{"aria-disabled":o.disabled,class:[o.ns.be("menu","item"),o.ns.is("disabled",o.disabled)],tabindex:o.tabIndex,role:o.role,onClick:i=>o.$emit("clickimpl",i),onFocus:o.handleFocus,onKeydown:e.withModifiers(o.handleKeydown,["self"]),onMousedown:o.handleMousedown,onPointermove:i=>o.$emit("pointermove",i),onPointerleave:i=>o.$emit("pointerleave",i)}),[o.icon?(e.openBlock(),e.createBlock(c,{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.icon)))]),_:1})):e.createCommentVNode("v-if",!0),e.renderSlot(o.$slots,"default")],16,["aria-disabled","tabindex","role","onClick","onFocus","onKeydown","onMousedown","onPointermove","onPointerleave"])],64)}var $e=v._export_sfc(ke,[["render",Fe],["__file","dropdown-item-impl.vue"]]);const Z=()=>{const o=e.inject("elDropdown",{}),t=e.computed(()=>o==null?void 0:o.dropdownSize);return{elDropdown:o,_elDropdownSize:t}},Re=e.defineComponent({name:"ElDropdownItem",components:{ElDropdownCollectionItem:k.ElCollectionItem,ElRovingFocusItem:Ve,ElDropdownItemImpl:$e},inheritAttrs:!1,props:k.dropdownItemProps,emits:["pointermove","pointerleave","click"],setup(o,{emit:t,attrs:p}){const{elDropdown:l}=Z(),m=e.getCurrentInstance(),f=e.ref(null),c=e.computed(()=>{var n,u;return(u=(n=e.unref(f))==null?void 0:n.textContent)!=null?u:""}),{onItemEnter:i,onItemLeave:a}=e.inject(M,void 0),g=I.composeEventHandlers(n=>(t("pointermove",n),n.defaultPrevented),I.whenMouse(n=>{if(o.disabled){a(n);return}const u=n.currentTarget;u===document.activeElement||u.contains(document.activeElement)||(i(n),n.defaultPrevented||u==null||u.focus())})),E=I.composeEventHandlers(n=>(t("pointerleave",n),n.defaultPrevented),I.whenMouse(a)),C=I.composeEventHandlers(n=>{if(!o.disabled)return t("click",n),n.type!=="keydown"&&n.defaultPrevented},n=>{var u,d,r;if(o.disabled){n.stopImmediatePropagation();return}(u=l==null?void 0:l.hideOnClick)!=null&&u.value&&((d=l.handleClick)==null||d.call(l)),(r=l.commandHandler)==null||r.call(l,o.command,m,n)}),h=e.computed(()=>({...o,...p}));return{handleClick:C,handlePointerMove:g,handlePointerLeave:E,textContent:c,propsAndAttrs:h}}});function Be(o,t,p,l,m,f){var c;const i=e.resolveComponent("el-dropdown-item-impl"),a=e.resolveComponent("el-roving-focus-item"),g=e.resolveComponent("el-dropdown-collection-item");return e.openBlock(),e.createBlock(g,{disabled:o.disabled,"text-value":(c=o.textValue)!=null?c:o.textContent},{default:e.withCtx(()=>[e.createVNode(a,{focusable:!o.disabled},{default:e.withCtx(()=>[e.createVNode(i,e.mergeProps(o.propsAndAttrs,{onPointerleave:o.handlePointerLeave,onPointermove:o.handlePointerMove,onClickimpl:o.handleClick}),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])]),_:3},8,["disabled","text-value"])}var x=v._export_sfc(Re,[["render",Be],["__file","dropdown-item.vue"]]);const Se=e.defineComponent({name:"ElDropdownMenu",props:k.dropdownMenuProps,setup(o){const t=v.useNamespace("dropdown"),{_elDropdownSize:p}=Z(),l=p.value,{focusTrapRef:m,onKeydown:f}=e.inject(V.FOCUS_TRAP_INJECTION_KEY,void 0),{contentRef:c,role:i,triggerId:a}=e.inject(M,void 0),{collectionRef:g,getItems:E}=e.inject(k.COLLECTION_INJECTION_KEY,void 0),{rovingFocusGroupRef:C,rovingFocusGroupRootStyle:h,tabIndex:n,onBlur:u,onFocus:d,onMousedown:r}=e.inject(z,void 0),{collectionRef:b}=e.inject(q,void 0),y=e.computed(()=>[t.b("menu"),t.bm("menu",l==null?void 0:l.value)]),R=A.composeRefs(c,g,m,C,b),w=I.composeEventHandlers(_=>{var B;(B=o.onKeydown)==null||B.call(o,_)},_=>{const{currentTarget:B,code:$,target:P}=_;if(B.contains(P),V.EVENT_CODE.tab===$&&_.stopImmediatePropagation(),_.preventDefault(),P!==e.unref(c)||!k.FIRST_LAST_KEYS.includes($))return;const K=E().filter(D=>!D.disabled).map(D=>D.ref);k.LAST_KEYS.includes($)&&K.reverse(),H(K)});return{size:l,rovingFocusGroupRootStyle:h,tabIndex:n,dropdownKls:y,role:i,triggerId:a,dropdownListWrapperRef:R,handleKeydown:_=>{w(_),f(_)},onBlur:u,onFocus:d,onMousedown:r}}});function Oe(o,t,p,l,m,f){return e.openBlock(),e.createElementBlock("ul",{ref:o.dropdownListWrapperRef,class:e.normalizeClass(o.dropdownKls),style:e.normalizeStyle(o.rovingFocusGroupRootStyle),tabindex:-1,role:o.role,"aria-labelledby":o.triggerId,onBlur:o.onBlur,onFocus:o.onFocus,onKeydown:e.withModifiers(o.handleKeydown,["self"]),onMousedown:e.withModifiers(o.onMousedown,["self"])},[e.renderSlot(o.$slots,"default")],46,["role","aria-labelledby","onBlur","onFocus","onKeydown","onMousedown"])}var ee=v._export_sfc(Se,[["render",Oe],["__file","dropdown-menu.vue"]]);const De=v.withInstall(Ne,{DropdownItem:x,DropdownMenu:ee}),Ke=v.withNoopInstall(x),Me=v.withNoopInstall(ee);const Le={class:"user"},Ae={key:0},Ge={class:"user-msg"},qe={class:"dialog-footer"},ze={__name:"index",props:{config:{type:Object,default:()=>({})}},emits:["loginout"],setup(o,{emit:t}){const p=e.inject("stConfig"),l=L.V(),m=t,f=o,c=e.ref(null),i=e.ref(!1),a=e.ref({oldPassword:"",newPassword:"",confirmPassword:""}),g=(d,r,b)=>{r===""?b(new Error("请输入确认密码")):r!==a.value.newPassword?b(new Error("两次输入密码不一致!")):b()},E=e.ref({oldPassword:[{required:!0,message:"请输入原密码",trigger:"blur"},{min:6,max:18,trigger:"blur",message:"密码长度为6到18位"}],newPassword:[{required:!0,message:"请输入新密码",trigger:"blur"},{min:6,max:18,trigger:"blur",message:"密码长度为6到18位"}],confirmPassword:[{required:!0,message:"请输入确认密码",trigger:"blur"},{validator:g,trigger:"blur"},{min:6,max:18,trigger:"blur",message:"密码长度为6到18位"}]}),C=()=>{const{loginUrl:d}=f.config||{};L.A(d)},h=()=>{const{loginoutToLogin:d,loginoutUrl:r}=f.config||{};L.K(d,r),m("loginout")},n=()=>{c.value.validate(async(d,r)=>{d&&(await p.request.post("/invest/sys/user/password",{password:a.value.oldPassword,newPassword:a.value.newPassword,newPassword2:a.value.confirmPassword}),le.ElMessage.success("修改成功!"),i.value=!1)})},u=()=>{a.value={oldPassword:"",newPassword:"",confirmPassword:""},c.value.resetFields()};return(d,r)=>{const b=S.ElIcon,y=Ke,R=Me,w=De,N=ne.ElInput,_=J.ElFormItem,B=J.ElForm,$=G.ElButton,P=A.ElDialog;return e.openBlock(),e.createElementBlock("div",Le,[e.unref(l)?(e.openBlock(),e.createElementBlock("div",Ae,[e.createVNode(w,{placement:"bottom"},{dropdown:e.withCtx(()=>[e.createVNode(R,null,{default:e.withCtx(()=>[e.createVNode(y,{onClick:r[0]||(r[0]=T=>i.value=!0)},{default:e.withCtx(()=>[e.createTextVNode("修改密码")]),_:1}),e.createVNode(y,{onClick:h},{default:e.withCtx(()=>[e.createTextVNode("退出登录")]),_:1})]),_:1})]),default:e.withCtx(()=>{var T;return[e.createElementVNode("div",Ge,[e.createVNode(b,{class:"user-msg-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(S.user_filled_default))]),_:1}),e.createElementVNode("span",null,e.toDisplayString((T=e.unref(l))==null?void 0:T.username),1),e.createVNode(b,{class:"user-msg-arrow"},{default:e.withCtx(()=>[e.createVNode(e.unref(S.arrow_down_default))]),_:1})])]}),_:1})])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"user-login",onClick:C},[e.createTextVNode(" 前往登录 "),e.createVNode(b,{class:"user-login-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(S.right_default))]),_:1})])),e.createVNode(P,{modelValue:i.value,"onUpdate:modelValue":r[5]||(r[5]=T=>i.value=T),title:"修改密码",width:"500","z-index":200,onClosed:u},{footer:e.withCtx(()=>[e.createElementVNode("div",qe,[e.createVNode($,{onClick:r[4]||(r[4]=T=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode($,{type:"primary",onClick:n},{default:e.withCtx(()=>[e.createTextVNode(" 修改 ")]),_:1})])]),default:e.withCtx(()=>[e.createVNode(B,{ref_key:"changePasswordFormRef",ref:c,model:a.value,rules:E.value,onSubmit:e.withModifiers(n,["prevent"]),onKeyup:e.withKeys(n,["enter","native"]),"label-width":"auto"},{default:e.withCtx(()=>[e.createVNode(_,{label:"原密码",prop:"oldPassword"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:a.value.oldPassword,"onUpdate:modelValue":r[1]||(r[1]=T=>a.value.oldPassword=T),type:"password","show-password":!0},null,8,["modelValue"])]),_:1}),e.createVNode(_,{label:"新密码",prop:"newPassword"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:a.value.newPassword,"onUpdate:modelValue":r[2]||(r[2]=T=>a.value.newPassword=T),type:"password","show-password":!0},null,8,["modelValue"])]),_:1}),e.createVNode(_,{label:"确认密码",prop:"confirmPassword"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:a.value.confirmPassword,"onUpdate:modelValue":r[3]||(r[3]=T=>a.value.confirmPassword=T),type:"password","show-password":!0},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}}},He=re._export_sfc(ze,[["__scopeId","data-v-ca7165c7"]]),Ue={install(o){o.component("st-user",He)}};module.exports=Ue;
1
+ "use strict";const b=require("./base-0ca7c43a.cjs"),A=require("./el-overlay-41994f67.cjs"),G=require("./el-button-62966947.cjs"),W=require("./el-form-item-47e255d4.cjs"),te=require("./el-input-6a3805c5.cjs"),N=require("./el-popper-7adbf1c6.cjs"),re=require("./el-scrollbar-ac525239.cjs"),e=require("vue"),S=require("./index-afc88a4b.cjs"),L=require("./index-a96158ae.cjs"),le=require("./index-ce3223db.cjs"),se=require("./el-message-d5ed7a4f.cjs"),ie=require("./_plugin-vue_export-helper-f246444f.cjs"),$=require("./dropdown-790d31ea.cjs"),V=require("./index-65b4113e.cjs"),q=require("./index-375e8de4.cjs"),ae=require("./use-form-common-props-74a96df2.cjs"),de=require("./castArray-a78ae889.cjs");require("./vnode-b15eb11b.cjs");require("./scroll-339681d4.cjs");require("./index-2f958e56.cjs");require("./index-eea0bcb3.cjs");require("./_initCloneObject-47814efa.cjs");require("./typescript-b63f8e83.cjs");require("./index-1d85ba4b.cjs");require("./config-provider-cfbb9cd8.cjs");const ue=b.buildProps({style:{type:b.definePropType([String,Array,Object])},currentTabId:{type:b.definePropType(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:b.definePropType(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:ce,ElCollectionItem:pe,COLLECTION_INJECTION_KEY:z,COLLECTION_ITEM_INJECTION_KEY:fe}=$.createCollectionWithScope("RovingFocusGroup"),H=Symbol("elRovingFocusGroup"),X=Symbol("elRovingFocusGroupItem"),me={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},ve=(o,t)=>{if(t!=="rtl")return o;switch(o){case V.EVENT_CODE.right:return V.EVENT_CODE.left;case V.EVENT_CODE.left:return V.EVENT_CODE.right;default:return o}},we=(o,t,c)=>{const r=ve(o.code,c);if(!(t==="vertical"&&[V.EVENT_CODE.left,V.EVENT_CODE.right].includes(r))&&!(t==="horizontal"&&[V.EVENT_CODE.up,V.EVENT_CODE.down].includes(r)))return me[r]},_e=(o,t)=>o.map((c,r)=>o[(r+t)%o.length]),U=o=>{const{activeElement:t}=document;for(const c of o)if(c===t||(c.focus(),t!==document.activeElement))return},x="currentTabIdChange",Q="rovingFocusGroup.entryFocus",ge={bubbles:!1,cancelable:!0},Ee=e.defineComponent({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:ue,emits:[x,"entryFocus"],setup(o,{emit:t}){var c;const r=e.ref((c=o.currentTabId||o.defaultCurrentTabId)!=null?c:null),v=e.ref(!1),f=e.ref(!1),u=e.ref(null),{getItems:i}=e.inject(z,void 0),m=e.computed(()=>[{outline:"none"},o.style]),a=p=>{t(x,p)},_=()=>{v.value=!0},E=N.composeEventHandlers(p=>{var w;(w=o.onMousedown)==null||w.call(o,p)},()=>{f.value=!0}),y=N.composeEventHandlers(p=>{var w;(w=o.onFocus)==null||w.call(o,p)},p=>{const w=!e.unref(f),{target:h,currentTarget:l}=p;if(h===l&&w&&!e.unref(v)){const T=new Event(Q,ge);if(l==null||l.dispatchEvent(T),!T.defaultPrevented){const g=i().filter(P=>P.focusable),F=g.find(P=>P.active),I=g.find(P=>P.id===e.unref(r)),R=[F,I,...g].filter(Boolean).map(P=>P.ref);U(R)}}f.value=!1}),n=N.composeEventHandlers(p=>{var w;(w=o.onBlur)==null||w.call(o,p)},()=>{v.value=!1}),d=(...p)=>{t("entryFocus",...p)};e.provide(H,{currentTabbedId:e.readonly(r),loop:e.toRef(o,"loop"),tabIndex:e.computed(()=>e.unref(v)?-1:0),rovingFocusGroupRef:u,rovingFocusGroupRootStyle:m,orientation:e.toRef(o,"orientation"),dir:e.toRef(o,"dir"),onItemFocus:a,onItemShiftTab:_,onBlur:n,onFocus:y,onMousedown:E}),e.watch(()=>o.currentTabId,p=>{r.value=p??null}),re.useEventListener(u,Q,d)}});function Ce(o,t,c,r,v,f){return e.renderSlot(o.$slots,"default")}var he=b._export_sfc(Ee,[["render",Ce],["__file","roving-focus-group-impl.vue"]]);const be=e.defineComponent({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:ce,ElRovingFocusGroupImpl:he}});function Ie(o,t,c,r,v,f){const u=e.resolveComponent("el-roving-focus-group-impl"),i=e.resolveComponent("el-focus-group-collection");return e.openBlock(),e.createBlock(i,null,{default:e.withCtx(()=>[e.createVNode(u,e.normalizeProps(e.guardReactiveProps(o.$attrs)),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16)]),_:3})}var ye=b._export_sfc(be,[["render",Ie],["__file","roving-focus-group.vue"]]);const M=Symbol("elDropdown"),{ButtonGroup:Ne}=G.ElButton,Te=e.defineComponent({name:"ElDropdown",components:{ElButton:G.ElButton,ElButtonGroup:Ne,ElScrollbar:N.ElScrollbar,ElDropdownCollection:$.ElCollection,ElTooltip:N.ElTooltip,ElRovingFocusGroup:ye,ElOnlyChild:N.OnlyChild,ElIcon:S.ElIcon,ArrowDown:S.arrow_down_default},props:$.dropdownProps,emits:["visible-change","click","command"],setup(o,{emit:t}){const c=e.getCurrentInstance(),r=b.useNamespace("dropdown"),{t:v}=q.useLocale(),f=e.ref(),u=e.ref(),i=e.ref(null),m=e.ref(null),a=e.ref(null),_=e.ref(null),E=e.ref(!1),y=e.computed(()=>({maxHeight:b.addUnit(o.maxHeight)})),n=e.computed(()=>[r.m(g.value)]),d=e.computed(()=>de.castArray(o.trigger)),p=q.useId().value,w=e.computed(()=>o.id||p);e.watch([f,d],([s,B],[D])=>{var j,Y,J;(j=D==null?void 0:D.$el)!=null&&j.removeEventListener&&D.$el.removeEventListener("pointerenter",I),(Y=s==null?void 0:s.$el)!=null&&Y.removeEventListener&&s.$el.removeEventListener("pointerenter",I),(J=s==null?void 0:s.$el)!=null&&J.addEventListener&&B.includes("hover")&&s.$el.addEventListener("pointerenter",I)},{immediate:!0}),e.onBeforeUnmount(()=>{var s,B;(B=(s=f.value)==null?void 0:s.$el)!=null&&B.removeEventListener&&f.value.$el.removeEventListener("pointerenter",I)});function h(){l()}function l(){var s;(s=i.value)==null||s.onClose()}function T(){var s;(s=i.value)==null||s.onOpen()}const g=ae.useFormSize();function F(...s){t("command",...s)}function I(){var s,B;(B=(s=f.value)==null?void 0:s.$el)==null||B.focus()}function k(){}function R(){const s=e.unref(m);d.value.includes("hover")&&(s==null||s.focus()),_.value=null}function P(s){_.value=s}function K(s){E.value||(s.preventDefault(),s.stopImmediatePropagation())}function O(){t("visible-change",!0)}function C(s){(s==null?void 0:s.type)==="keydown"&&m.value.focus()}function ne(){t("visible-change",!1)}return e.provide(M,{contentRef:m,role:e.computed(()=>o.role),triggerId:w,isUsingKeyboard:E,onItemEnter:k,onItemLeave:R}),e.provide("elDropdown",{instance:c,dropdownSize:g,handleClick:h,commandHandler:F,trigger:e.toRef(o,"trigger"),hideOnClick:e.toRef(o,"hideOnClick")}),{t:v,ns:r,scrollbar:a,wrapStyle:y,dropdownTriggerKls:n,dropdownSize:g,triggerId:w,currentTabId:_,handleCurrentTabIdChange:P,handlerMainButtonClick:s=>{t("click",s)},handleEntryFocus:K,handleClose:l,handleOpen:T,handleBeforeShowTooltip:O,handleShowTooltip:C,handleBeforeHideTooltip:ne,onFocusAfterTrapped:s=>{var B,D;s.preventDefault(),(D=(B=m.value)==null?void 0:B.focus)==null||D.call(B,{preventScroll:!0})},popperRef:i,contentRef:m,triggeringElementRef:f,referenceElementRef:u}}});function Pe(o,t,c,r,v,f){var u;const i=e.resolveComponent("el-dropdown-collection"),m=e.resolveComponent("el-roving-focus-group"),a=e.resolveComponent("el-scrollbar"),_=e.resolveComponent("el-only-child"),E=e.resolveComponent("el-tooltip"),y=e.resolveComponent("el-button"),n=e.resolveComponent("arrow-down"),d=e.resolveComponent("el-icon"),p=e.resolveComponent("el-button-group");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([o.ns.b(),o.ns.is("disabled",o.disabled)])},[e.createVNode(E,{ref:"popperRef",role:o.role,effect:o.effect,"fallback-placements":["bottom","top"],"popper-options":o.popperOptions,"gpu-acceleration":!1,"hide-after":o.trigger==="hover"?o.hideTimeout:0,"manual-mode":!0,placement:o.placement,"popper-class":[o.ns.e("popper"),o.popperClass],"reference-element":(u=o.referenceElementRef)==null?void 0:u.$el,trigger:o.trigger,"trigger-keys":o.triggerKeys,"trigger-target-el":o.contentRef,"show-after":o.trigger==="hover"?o.showTimeout:0,"stop-popper-mouse-event":!1,"virtual-ref":o.triggeringElementRef,"virtual-triggering":o.splitButton,disabled:o.disabled,transition:`${o.ns.namespace.value}-zoom-in-top`,teleported:o.teleported,pure:"",persistent:"",onBeforeShow:o.handleBeforeShowTooltip,onShow:o.handleShowTooltip,onBeforeHide:o.handleBeforeHideTooltip},e.createSlots({content:e.withCtx(()=>[e.createVNode(a,{ref:"scrollbar","wrap-style":o.wrapStyle,tag:"div","view-class":o.ns.e("list")},{default:e.withCtx(()=>[e.createVNode(m,{loop:o.loop,"current-tab-id":o.currentTabId,orientation:"horizontal",onCurrentTabIdChange:o.handleCurrentTabIdChange,onEntryFocus:o.handleEntryFocus},{default:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.renderSlot(o.$slots,"dropdown")]),_:3})]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange","onEntryFocus"])]),_:3},8,["wrap-style","view-class"])]),_:2},[o.splitButton?void 0:{name:"default",fn:e.withCtx(()=>[e.createVNode(_,{id:o.triggerId,ref:"triggeringElementRef",role:"button",tabindex:o.tabindex},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["id","tabindex"])])}]),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"]),o.splitButton?(e.openBlock(),e.createBlock(p,{key:0},{default:e.withCtx(()=>[e.createVNode(y,e.mergeProps({ref:"referenceElementRef"},o.buttonProps,{size:o.dropdownSize,type:o.type,disabled:o.disabled,tabindex:o.tabindex,onClick:o.handlerMainButtonClick}),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),e.createVNode(y,e.mergeProps({id:o.triggerId,ref:"triggeringElementRef"},o.buttonProps,{role:"button",size:o.dropdownSize,type:o.type,class:o.ns.e("caret-button"),disabled:o.disabled,tabindex:o.tabindex,"aria-label":o.t("el.dropdown.toggleDropdown")}),{default:e.withCtx(()=>[e.createVNode(d,{class:e.normalizeClass(o.ns.e("icon"))},{default:e.withCtx(()=>[e.createVNode(n)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):e.createCommentVNode("v-if",!0)],2)}var Ve=b._export_sfc(Te,[["render",Pe],["__file","dropdown.vue"]]);const Fe=e.defineComponent({components:{ElRovingFocusCollectionItem:pe},props:{focusable:{type:Boolean,default:!0},active:{type:Boolean,default:!1}},emits:["mousedown","focus","keydown"],setup(o,{emit:t}){const{currentTabbedId:c,loop:r,onItemFocus:v,onItemShiftTab:f}=e.inject(H,void 0),{getItems:u}=e.inject(z,void 0),i=q.useId(),m=e.ref(null),a=N.composeEventHandlers(n=>{t("mousedown",n)},n=>{o.focusable?v(e.unref(i)):n.preventDefault()}),_=N.composeEventHandlers(n=>{t("focus",n)},()=>{v(e.unref(i))}),E=N.composeEventHandlers(n=>{t("keydown",n)},n=>{const{code:d,shiftKey:p,target:w,currentTarget:h}=n;if(d===V.EVENT_CODE.tab&&p){f();return}if(w!==h)return;const l=we(n);if(l){n.preventDefault();let g=u().filter(F=>F.focusable).map(F=>F.ref);switch(l){case"last":{g.reverse();break}case"prev":case"next":{l==="prev"&&g.reverse();const F=g.indexOf(h);g=r.value?_e(g,F+1):g.slice(F+1);break}}e.nextTick(()=>{U(g)})}}),y=e.computed(()=>c.value===e.unref(i));return e.provide(X,{rovingFocusGroupItemRef:m,tabIndex:e.computed(()=>e.unref(y)?0:-1),handleMousedown:a,handleFocus:_,handleKeydown:E}),{id:i,handleKeydown:E,handleFocus:_,handleMousedown:a}}});function $e(o,t,c,r,v,f){const u=e.resolveComponent("el-roving-focus-collection-item");return e.openBlock(),e.createBlock(u,{id:o.id,focusable:o.focusable,active:o.active},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["id","focusable","active"])}var ke=b._export_sfc(Fe,[["render",$e],["__file","roving-focus-item.vue"]]);const Re=e.defineComponent({name:"DropdownItemImpl",components:{ElIcon:S.ElIcon},props:$.dropdownItemProps,emits:["pointermove","pointerleave","click","clickimpl"],setup(o,{emit:t}){const c=b.useNamespace("dropdown"),{role:r}=e.inject(M,void 0),{collectionItemRef:v}=e.inject($.COLLECTION_ITEM_INJECTION_KEY,void 0),{collectionItemRef:f}=e.inject(fe,void 0),{rovingFocusGroupItemRef:u,tabIndex:i,handleFocus:m,handleKeydown:a,handleMousedown:_}=e.inject(X,void 0),E=A.composeRefs(v,f,u),y=e.computed(()=>r.value==="menu"?"menuitem":r.value==="navigation"?"link":"button"),n=N.composeEventHandlers(d=>{if([V.EVENT_CODE.enter,V.EVENT_CODE.numpadEnter,V.EVENT_CODE.space].includes(d.code))return d.preventDefault(),d.stopImmediatePropagation(),t("clickimpl",d),!0},a);return{ns:c,itemRef:E,dataset:{[$.COLLECTION_ITEM_SIGN]:""},role:y,tabIndex:i,handleFocus:m,handleKeydown:n,handleMousedown:_}}});function Be(o,t,c,r,v,f){const u=e.resolveComponent("el-icon");return e.openBlock(),e.createElementBlock(e.Fragment,null,[o.divided?(e.openBlock(),e.createElementBlock("li",{key:0,role:"separator",class:e.normalizeClass(o.ns.bem("menu","item","divided"))},null,2)):e.createCommentVNode("v-if",!0),e.createElementVNode("li",e.mergeProps({ref:o.itemRef},{...o.dataset,...o.$attrs},{"aria-disabled":o.disabled,class:[o.ns.be("menu","item"),o.ns.is("disabled",o.disabled)],tabindex:o.tabIndex,role:o.role,onClick:i=>o.$emit("clickimpl",i),onFocus:o.handleFocus,onKeydown:e.withModifiers(o.handleKeydown,["self"]),onMousedown:o.handleMousedown,onPointermove:i=>o.$emit("pointermove",i),onPointerleave:i=>o.$emit("pointerleave",i)}),[o.icon?(e.openBlock(),e.createBlock(u,{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.icon)))]),_:1})):e.createCommentVNode("v-if",!0),e.renderSlot(o.$slots,"default")],16,["aria-disabled","tabindex","role","onClick","onFocus","onKeydown","onMousedown","onPointermove","onPointerleave"])],64)}var Se=b._export_sfc(Re,[["render",Be],["__file","dropdown-item-impl.vue"]]);const Z=()=>{const o=e.inject("elDropdown",{}),t=e.computed(()=>o==null?void 0:o.dropdownSize);return{elDropdown:o,_elDropdownSize:t}},Oe=e.defineComponent({name:"ElDropdownItem",components:{ElDropdownCollectionItem:$.ElCollectionItem,ElRovingFocusItem:ke,ElDropdownItemImpl:Se},inheritAttrs:!1,props:$.dropdownItemProps,emits:["pointermove","pointerleave","click"],setup(o,{emit:t,attrs:c}){const{elDropdown:r}=Z(),v=e.getCurrentInstance(),f=e.ref(null),u=e.computed(()=>{var n,d;return(d=(n=e.unref(f))==null?void 0:n.textContent)!=null?d:""}),{onItemEnter:i,onItemLeave:m}=e.inject(M,void 0),a=N.composeEventHandlers(n=>(t("pointermove",n),n.defaultPrevented),N.whenMouse(n=>{if(o.disabled){m(n);return}const d=n.currentTarget;d===document.activeElement||d.contains(document.activeElement)||(i(n),n.defaultPrevented||d==null||d.focus())})),_=N.composeEventHandlers(n=>(t("pointerleave",n),n.defaultPrevented),N.whenMouse(m)),E=N.composeEventHandlers(n=>{if(!o.disabled)return t("click",n),n.type!=="keydown"&&n.defaultPrevented},n=>{var d,p,w;if(o.disabled){n.stopImmediatePropagation();return}(d=r==null?void 0:r.hideOnClick)!=null&&d.value&&((p=r.handleClick)==null||p.call(r)),(w=r.commandHandler)==null||w.call(r,o.command,v,n)}),y=e.computed(()=>({...o,...c}));return{handleClick:E,handlePointerMove:a,handlePointerLeave:_,textContent:u,propsAndAttrs:y}}});function De(o,t,c,r,v,f){var u;const i=e.resolveComponent("el-dropdown-item-impl"),m=e.resolveComponent("el-roving-focus-item"),a=e.resolveComponent("el-dropdown-collection-item");return e.openBlock(),e.createBlock(a,{disabled:o.disabled,"text-value":(u=o.textValue)!=null?u:o.textContent},{default:e.withCtx(()=>[e.createVNode(m,{focusable:!o.disabled},{default:e.withCtx(()=>[e.createVNode(i,e.mergeProps(o.propsAndAttrs,{onPointerleave:o.handlePointerLeave,onPointermove:o.handlePointerMove,onClickimpl:o.handleClick}),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])]),_:3},8,["disabled","text-value"])}var ee=b._export_sfc(Oe,[["render",De],["__file","dropdown-item.vue"]]);const Ke=e.defineComponent({name:"ElDropdownMenu",props:$.dropdownMenuProps,setup(o){const t=b.useNamespace("dropdown"),{_elDropdownSize:c}=Z(),r=c.value,{focusTrapRef:v,onKeydown:f}=e.inject(V.FOCUS_TRAP_INJECTION_KEY,void 0),{contentRef:u,role:i,triggerId:m}=e.inject(M,void 0),{collectionRef:a,getItems:_}=e.inject($.COLLECTION_INJECTION_KEY,void 0),{rovingFocusGroupRef:E,rovingFocusGroupRootStyle:y,tabIndex:n,onBlur:d,onFocus:p,onMousedown:w}=e.inject(H,void 0),{collectionRef:h}=e.inject(z,void 0),l=e.computed(()=>[t.b("menu"),t.bm("menu",r==null?void 0:r.value)]),T=A.composeRefs(u,a,v,E,h),g=N.composeEventHandlers(I=>{var k;(k=o.onKeydown)==null||k.call(o,I)},I=>{const{currentTarget:k,code:R,target:P}=I;if(k.contains(P),V.EVENT_CODE.tab===R&&I.stopImmediatePropagation(),I.preventDefault(),P!==e.unref(u)||!$.FIRST_LAST_KEYS.includes(R))return;const O=_().filter(C=>!C.disabled).map(C=>C.ref);$.LAST_KEYS.includes(R)&&O.reverse(),U(O)});return{size:r,rovingFocusGroupRootStyle:y,tabIndex:n,dropdownKls:l,role:i,triggerId:m,dropdownListWrapperRef:T,handleKeydown:I=>{g(I),f(I)},onBlur:d,onFocus:p,onMousedown:w}}});function Me(o,t,c,r,v,f){return e.openBlock(),e.createElementBlock("ul",{ref:o.dropdownListWrapperRef,class:e.normalizeClass(o.dropdownKls),style:e.normalizeStyle(o.rovingFocusGroupRootStyle),tabindex:-1,role:o.role,"aria-labelledby":o.triggerId,onBlur:o.onBlur,onFocus:o.onFocus,onKeydown:e.withModifiers(o.handleKeydown,["self"]),onMousedown:e.withModifiers(o.onMousedown,["self"])},[e.renderSlot(o.$slots,"default")],46,["role","aria-labelledby","onBlur","onFocus","onKeydown","onMousedown"])}var oe=b._export_sfc(Ke,[["render",Me],["__file","dropdown-menu.vue"]]);const Le=b.withInstall(Ve,{DropdownItem:ee,DropdownMenu:oe}),qe=b.withNoopInstall(ee),Ae=b.withNoopInstall(oe);const Ge={class:"user"},ze={key:0},He={class:"user-msg"},Ue={class:"dialog-footer"},je={__name:"index",props:{config:{type:Object,default:()=>({})}},emits:["loginout"],setup(o,{emit:t}){const c=e.inject("stConfig"),r=L.V(),v=e.ref(null),f=t,u=o,i=e.ref(null),m=e.ref(!1),a=e.ref({oldPassword:"",newPassword:"",confirmPassword:""}),_=e.ref({oldPassword:[{required:!0,message:"请输入原密码",trigger:"blur"},{min:6,max:18,trigger:"blur",message:"密码长度为6到18位"}],newPassword:[],confirmPassword:[{required:!0,message:"请输入确认密码",trigger:"blur"},{validator:(h,l,T)=>{l===""?T(new Error("请输入确认密码")):l!==a.value.newPassword?T(new Error("两次输入密码不一致!")):T()},trigger:"blur"},{min:6,max:18,trigger:"blur",message:"密码长度为6到18位"}]}),E=e.ref(!1),y=()=>{const{loginUrl:h}=u.config||{};L.A(h)},n=()=>{const{loginoutToLogin:h,loginoutUrl:l}=u.config||{};L.K(h,l),f("loginout")},d=()=>{i.value.validate(async(h,l)=>{h&&(await c.request.post("/invest/sys/user/password",{password:a.value.oldPassword,newPassword:a.value.newPassword,newPassword2:a.value.confirmPassword}),se.ElMessage.success("修改成功!"),m.value=!1)})},p=()=>{_.value.newPassword.length===0&&e.nextTick(()=>{var l;_.value.newPassword=(l=v.value)==null?void 0:l.ruleFormPassword;let h=setTimeout(()=>{i.value.resetFields(),clearTimeout(h)},0)})},w=()=>{a.value={oldPassword:"",newPassword:"",confirmPassword:""},i.value.resetFields()};return(h,l)=>{const T=S.ElIcon,g=qe,F=Ae,I=Le,k=te.ElInput,R=W.ElFormItem,P=W.ElForm,K=G.ElButton,O=A.ElDialog;return e.openBlock(),e.createElementBlock("div",Ge,[e.unref(r)?(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(I,{placement:"bottom"},{dropdown:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createVNode(g,{onClick:l[0]||(l[0]=C=>m.value=!0)},{default:e.withCtx(()=>[e.createTextVNode("修改密码")]),_:1}),e.createVNode(g,{onClick:n},{default:e.withCtx(()=>[e.createTextVNode("退出登录")]),_:1})]),_:1})]),default:e.withCtx(()=>{var C;return[e.createElementVNode("div",He,[e.createVNode(T,{class:"user-msg-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(S.user_filled_default))]),_:1}),e.createElementVNode("span",null,e.toDisplayString((C=e.unref(r))==null?void 0:C.username),1),e.createVNode(T,{class:"user-msg-arrow"},{default:e.withCtx(()=>[e.createVNode(e.unref(S.arrow_down_default))]),_:1})])]}),_:1})])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"user-login",onClick:y},[e.createTextVNode(" 前往登录 "),e.createVNode(T,{class:"user-login-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(S.right_default))]),_:1})])),e.createVNode(O,{modelValue:m.value,"onUpdate:modelValue":l[7]||(l[7]=C=>m.value=C),title:"修改密码",width:"500","z-index":200,onOpened:p,onClosed:w},{footer:e.withCtx(()=>[e.createElementVNode("div",Ue,[e.createVNode(K,{onClick:l[6]||(l[6]=C=>m.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(K,{type:"primary",onClick:d},{default:e.withCtx(()=>[e.createTextVNode(" 修改 ")]),_:1})])]),default:e.withCtx(()=>[e.createVNode(P,{ref_key:"changePasswordFormRef",ref:i,model:a.value,rules:_.value,onSubmit:e.withModifiers(d,["prevent"]),onKeyup:e.withKeys(d,["enter","native"]),"label-width":"auto"},{default:e.withCtx(()=>[e.createVNode(R,{label:"原密码",prop:"oldPassword"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:a.value.oldPassword,"onUpdate:modelValue":l[1]||(l[1]=C=>a.value.oldPassword=C),type:"password","show-password":!0},null,8,["modelValue"])]),_:1}),e.createVNode(R,{label:"新密码",prop:"newPassword"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:a.value.newPassword,"onUpdate:modelValue":l[2]||(l[2]=C=>a.value.newPassword=C),type:"password","show-password":!0,onFocus:l[3]||(l[3]=()=>{i.value.clearValidate(["newPassword"]),E.value=!0}),onBlur:l[4]||(l[4]=C=>E.value=!1)},null,8,["modelValue"]),e.createVNode(le.PasswordPrompt,{ref_key:"PasswordPromptRef",ref:v,value:a.value.newPassword,isFocus:E.value},null,8,["value","isFocus"])]),_:1}),e.createVNode(R,{label:"确认密码",prop:"confirmPassword"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:a.value.confirmPassword,"onUpdate:modelValue":l[5]||(l[5]=C=>a.value.confirmPassword=C),type:"password","show-password":!0},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}}},Ye=ie._export_sfc(je,[["__scopeId","data-v-7e945ac7"]]),Je={install(o){o.component("st-user",Ye)}};module.exports=Je;