st-comp 0.0.200 → 0.0.201

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 (148) hide show
  1. package/components.d.ts +3 -0
  2. package/es/ChartLayout.js +4 -4
  3. package/es/ConfigProvider.cjs +1 -1
  4. package/es/ConfigProvider.js +1 -1
  5. package/es/CustomFunction.cjs +1 -1
  6. package/es/CustomFunction.js +46 -42
  7. package/es/FactorWarning.cjs +1 -1
  8. package/es/FactorWarning.js +82 -77
  9. package/es/Kline.cjs +1 -1
  10. package/es/Kline.js +21 -19
  11. package/es/KlineBasic.cjs +1 -1
  12. package/es/KlineBasic.js +30 -28
  13. package/es/KlineConfig.cjs +1 -1
  14. package/es/KlineConfig.js +25 -23
  15. package/es/KlineNew.cjs +1 -1
  16. package/es/KlineNew.js +20 -18
  17. package/es/KlinePlus.cjs +3 -3
  18. package/es/KlinePlus.js +274 -269
  19. package/es/MonacoEditor.cjs +1 -1
  20. package/es/MonacoEditor.js +2 -2
  21. package/es/Pagination.cjs +1 -1
  22. package/es/Pagination.js +74 -72
  23. package/es/PasswordPrompt.cjs +1 -1
  24. package/es/PasswordPrompt.js +9 -157
  25. package/es/Pie.cjs +1 -1
  26. package/es/Pie.js +1 -1
  27. package/es/Table.cjs +1 -1
  28. package/es/Table.js +53 -50
  29. package/es/User.cjs +1 -1
  30. package/es/User.js +1313 -1
  31. package/es/VarSelectDialog.cjs +1 -1
  32. package/es/VarSelectDialog.js +28 -26
  33. package/es/VarietyAutoComplete.cjs +1 -1
  34. package/es/VarietyAutoComplete.js +19 -18
  35. package/es/VarietySearch.cjs +7 -7
  36. package/es/VarietySearch.js +703 -697
  37. package/es/VarietyTextCopy.cjs +1 -1
  38. package/es/VarietyTextCopy.js +12 -12
  39. package/es/VirtualTable.cjs +1 -1
  40. package/es/VirtualTable.js +80 -79
  41. package/es/{el-popover-5421d52a.cjs → _initCloneObject-52b6a510.cjs} +1 -1
  42. package/es/{el-popover-7a1c6412.js → _initCloneObject-eaef9418.js} +9 -9
  43. package/es/{base-8348063b.js → base-a5af3db3.js} +38 -38
  44. package/es/{castArray-3f45c3ec.js → castArray-7741a212.js} +1 -1
  45. package/es/{config-provider-eb0460f1.cjs → config-provider-a584d81e.cjs} +1 -1
  46. package/es/{config-provider-1a687690.js → config-provider-b16efd62.js} +6 -6
  47. package/es/debounce-62f5b6e8.cjs +1 -0
  48. package/es/debounce-8d53f4dd.js +83 -0
  49. package/es/dropdown-071c5d7e.cjs +1 -0
  50. package/es/dropdown-a59bba73.js +178 -0
  51. package/es/el-autocomplete-a07e9439.cjs +1 -0
  52. package/es/{el-autocomplete-d4cd96cd.js → el-autocomplete-ba808eb6.js} +16 -16
  53. package/es/{el-button-2e680390.js → el-button-c95adb85.js} +33 -33
  54. package/es/{el-button-4ccd7122.cjs → el-button-eec58cff.cjs} +1 -1
  55. package/es/el-checkbox-group-0ea8fbf8.cjs +1 -0
  56. package/es/el-checkbox-group-4ed993c7.js +1 -0
  57. package/es/{el-dialog-bafc4b2b.js → el-dialog-41ab8417.js} +7 -6
  58. package/es/{el-dialog-6413b4af.cjs → el-dialog-ae86edb8.cjs} +1 -1
  59. package/es/{el-divider-93b0ee21.js → el-divider-4e059794.js} +1 -1
  60. package/es/{el-empty-56783dca.js → el-empty-33cb66f1.js} +3 -3
  61. package/es/el-form-item-c3fe189b.cjs +12 -0
  62. package/es/el-form-item-c53c374d.js +1269 -0
  63. package/es/{el-input-735575f4.js → el-input-2f75c4ba.js} +34 -34
  64. package/es/{el-input-6c5ac889.cjs → el-input-7fd293af.cjs} +1 -1
  65. package/es/{el-input-number-d5770776.cjs → el-input-number-22e21d16.cjs} +1 -1
  66. package/es/{el-input-number-6634a6ea.js → el-input-number-5193fe6d.js} +35 -35
  67. package/es/{el-loading-98dcebee.cjs → el-loading-cfd86c15.cjs} +1 -1
  68. package/es/{el-loading-049dacc5.js → el-loading-f6022062.js} +5 -5
  69. package/es/{el-menu-item-828bc6fa.cjs → el-menu-item-17dc717e.cjs} +1 -1
  70. package/es/{el-menu-item-8a210e21.js → el-menu-item-7e881203.js} +22 -22
  71. package/es/{el-message-a1ac37d4.cjs → el-message-5e6a6be9.cjs} +1 -1
  72. package/es/el-message-box-a93d2f6a.js +489 -0
  73. package/es/el-message-box-c10adb52.cjs +1 -0
  74. package/es/{el-message-def216ae.js → el-message-e544a8f5.js} +24 -24
  75. package/es/{el-overlay-4ea38eab.js → el-overlay-09ad71cd.js} +51 -51
  76. package/es/{el-overlay-69dfacb6.cjs → el-overlay-9e34965f.cjs} +1 -1
  77. package/es/{el-popconfirm-bdeceeb7.cjs → el-popconfirm-70a976bf.cjs} +1 -1
  78. package/es/{el-popconfirm-aace1104.js → el-popconfirm-81dcd202.js} +20 -20
  79. package/es/el-popover-0ea8fbf8.cjs +1 -0
  80. package/es/el-popover-4ed993c7.js +1 -0
  81. package/es/{el-popper-986a8371.js → el-popper-b4f97157.js} +115 -112
  82. package/es/{el-popper-b962125f.cjs → el-popper-b6c99b28.cjs} +1 -1
  83. package/es/el-scrollbar-323542e7.js +34 -0
  84. package/es/el-scrollbar-bc3f790d.cjs +1 -0
  85. package/es/{el-segmented-f892ec18.js → el-segmented-b868d074.js} +8 -8
  86. package/es/{el-segmented-6b057ed5.cjs → el-segmented-f8fce9ac.cjs} +1 -1
  87. package/es/{el-select-2189a8ac.js → el-select-95627997.js} +42 -41
  88. package/es/el-select-d8d91db1.cjs +1 -0
  89. package/es/el-table-column-079b76f5.cjs +14 -0
  90. package/es/{el-table-column-91d69c86.js → el-table-column-72c50d58.js} +14 -14
  91. package/es/{el-tag-75a7573a.js → el-tag-66cab138.js} +16 -16
  92. package/es/{el-tag-a15520b3.cjs → el-tag-a33c4b22.cjs} +1 -1
  93. package/es/{el-checkbox-group-e26a4533.js → el-text-ac60d0f2.js} +16 -16
  94. package/es/{el-checkbox-group-dfdad075.cjs → el-text-c20a9f48.cjs} +1 -1
  95. package/es/{index-1fb95601.cjs → index-098c2447.cjs} +1 -1
  96. package/es/{index-16802b35.cjs → index-11547a0c.cjs} +1 -1
  97. package/es/index-1f7d4f70.js +157 -0
  98. package/es/{index-680be212.cjs → index-298075cf.cjs} +1 -1
  99. package/es/index-57672682.js +113 -0
  100. package/es/{index-9cfb6ccf.js → index-7ed0999e.js} +2 -0
  101. package/es/{index-f3a86049.js → index-844bdd85.js} +29 -29
  102. package/es/index-88546436.js +163 -0
  103. package/es/{index-cc200b99.cjs → index-8901a38c.cjs} +1 -1
  104. package/es/{index-e00ee015.js → index-960806da.js} +36 -36
  105. package/es/index-9b9ef5dd.cjs +1 -0
  106. package/es/{index-847d58bc.js → index-a871c3eb.js} +92 -62
  107. package/es/{index-780e7fd2.js → index-bc8e277e.js} +2 -2
  108. package/es/{index-5e0314ac.cjs → index-c108567d.cjs} +1 -1
  109. package/es/{index-78381381.cjs → index-d725fef6.cjs} +2 -2
  110. package/es/{index-14c88a1a.js → index-d77a7336.js} +1 -1
  111. package/es/{index-f45c2897.js → index-d91dc23f.js} +20 -20
  112. package/es/{index-c94b9543.js → index-e5566b94.js} +43 -43
  113. package/es/index-f3562b52.cjs +1 -0
  114. package/es/index-f967d6c1.cjs +1 -0
  115. package/es/{python-2e916d28.cjs → python-c27ba105.cjs} +1 -1
  116. package/es/{python-7cf0b6ba.js → python-ecde9ff2.js} +2 -2
  117. package/es/{raf-8e5f0699.js → raf-80ef0c0a.js} +1 -1
  118. package/es/{scroll-c43468ab.js → scroll-679bd6bf.js} +1 -1
  119. package/es/style.css +1 -1
  120. package/es/{use-form-common-props-e6cba60f.js → use-form-common-props-815d48a6.js} +69 -69
  121. package/es/{use-form-common-props-d8866dc6.cjs → use-form-common-props-fd9b61a0.cjs} +1 -1
  122. package/es/{use-global-config-72d50e62.cjs → use-global-config-30d7d8ce.cjs} +1 -1
  123. package/es/{use-global-config-76ff2e3e.js → use-global-config-b5e9d3d5.js} +14 -14
  124. package/es/{validator-e759d43d.cjs → validator-1b8a6128.cjs} +1 -1
  125. package/es/{validator-220652c5.js → validator-764a9db0.js} +1 -1
  126. package/es/vnode-5ddb7ed1.js +14 -0
  127. package/es/vnode-b906ae6d.cjs +1 -0
  128. package/es/{zh-cn-33e7aee6.cjs → zh-cn-90317f62.cjs} +1 -1
  129. package/es/{zh-cn-c7fa42ea.js → zh-cn-e963c628.js} +2 -2
  130. package/lib/bundle.js +1 -1
  131. package/lib/bundle.umd.cjs +21 -21
  132. package/lib/{index-410c490f.js → index-c0ce50bc.js} +736 -733
  133. package/lib/{python-589861d2.js → python-9dae326e.js} +1 -1
  134. package/lib/style.css +1 -1
  135. package/package.json +1 -1
  136. package/packages/KlinePlus/index.vue +17 -7
  137. package/src/pages/KlinePlus/index.vue +6 -5
  138. package/es/el-autocomplete-86c0d989.cjs +0 -1
  139. package/es/el-form-item-41becb31.js +0 -1749
  140. package/es/el-form-item-95476197.cjs +0 -12
  141. package/es/el-scrollbar-139aa96d.cjs +0 -1
  142. package/es/el-scrollbar-cdadd788.js +0 -115
  143. package/es/el-select-e1046cc6.cjs +0 -1
  144. package/es/el-table-column-f1c4af89.cjs +0 -14
  145. package/es/index-56ea97a9.js +0 -122
  146. package/es/index-8583c047.cjs +0 -1
  147. package/es/index-ce63356a.cjs +0 -1
  148. package/es/index-db1e1861.js +0 -318
package/es/User.js CHANGED
@@ -1 +1,1313 @@
1
-
1
+ import { b as Be, e as ae, _ as z, u as ue, n as Me, w as Ae, l as Ee } from "./base-a5af3db3.js";
2
+ import { E as H } from "./el-button-c95adb85.js";
3
+ import { a as k, h as O, E as Ue, O as Ge, w as be, F as ze } from "./el-popper-b4f97157.js";
4
+ import "./el-scrollbar-323542e7.js";
5
+ import { defineComponent as L, ref as y, inject as C, computed as T, provide as j, readonly as Le, toRef as q, unref as $, watch as Ye, renderSlot as V, resolveComponent as h, openBlock as P, createBlock as K, withCtx as s, createVNode as l, normalizeProps as He, guardReactiveProps as Je, getCurrentInstance as Ce, createElementBlock as B, normalizeClass as Q, createSlots as qe, mergeProps as X, createCommentVNode as ie, nextTick as de, Fragment as Pe, createElementVNode as x, withModifiers as W, resolveDynamicComponent as je, normalizeStyle as We, reactive as M, createTextVNode as R, toDisplayString as ee, withKeys as Fe } from "vue";
6
+ import { E as ce, f as $e, u as Ze, r as Qe } from "./index-a871c3eb.js";
7
+ import { R as pe, V as Xe, A as xe, K as eo } from "./index-7ed0999e.js";
8
+ import { c as he, E as oe } from "./el-dialog-41ab8417.js";
9
+ import "./el-overlay-09ad71cd.js";
10
+ import { a as ne, E as te } from "./el-form-item-c53c374d.js";
11
+ import { E as le } from "./el-input-2f75c4ba.js";
12
+ import { E as Re } from "./el-text-ac60d0f2.js";
13
+ import { E as re } from "./el-message-e544a8f5.js";
14
+ import { _ as me } from "./_plugin-vue_export-helper-dad06003.js";
15
+ import { P as Te } from "./index-1f7d4f70.js";
16
+ import { E as oo } from "./index-844bdd85.js";
17
+ import { c as no, e as to } from "./use-form-common-props-815d48a6.js";
18
+ import { c as lo, E as ro, d as so, a as ke, C as ao, b as io, e as uo, f as co, g as po, F as mo, L as fo } from "./dropdown-a59bba73.js";
19
+ import { u as vo } from "./index-d77a7336.js";
20
+ import { u as Se } from "./index-960806da.js";
21
+ import { c as _o } from "./castArray-7741a212.js";
22
+ import "./index-2e331d74.js";
23
+ import "./use-global-config-b5e9d3d5.js";
24
+ import "./index-e5566b94.js";
25
+ import "./index-657047bb.js";
26
+ import "./vnode-5ddb7ed1.js";
27
+ import "./scroll-679bd6bf.js";
28
+ import "./_initCloneObject-eaef9418.js";
29
+ import "./typescript-7ae59c4c.js";
30
+ import "./index-d91dc23f.js";
31
+ import "./config-provider-b16efd62.js";
32
+ const wo = Be({
33
+ style: { type: ae([String, Array, Object]) },
34
+ currentTabId: {
35
+ type: ae(String)
36
+ },
37
+ defaultCurrentTabId: String,
38
+ loop: Boolean,
39
+ dir: {
40
+ type: String,
41
+ values: ["ltr", "rtl"],
42
+ default: "ltr"
43
+ },
44
+ orientation: {
45
+ type: ae(String)
46
+ },
47
+ onBlur: Function,
48
+ onFocus: Function,
49
+ onMousedown: Function
50
+ }), {
51
+ ElCollection: go,
52
+ ElCollectionItem: bo,
53
+ COLLECTION_INJECTION_KEY: fe,
54
+ COLLECTION_ITEM_INJECTION_KEY: yo
55
+ } = lo("RovingFocusGroup"), ve = Symbol("elRovingFocusGroup"), De = Symbol("elRovingFocusGroupItem"), Io = {
56
+ ArrowLeft: "prev",
57
+ ArrowUp: "prev",
58
+ ArrowRight: "next",
59
+ ArrowDown: "next",
60
+ PageUp: "first",
61
+ Home: "first",
62
+ PageDown: "last",
63
+ End: "last"
64
+ }, Eo = (e, d) => {
65
+ if (d !== "rtl")
66
+ return e;
67
+ switch (e) {
68
+ case k.right:
69
+ return k.left;
70
+ case k.left:
71
+ return k.right;
72
+ default:
73
+ return e;
74
+ }
75
+ }, Co = (e, d, f) => {
76
+ const a = Eo(e.code, f);
77
+ if (!(d === "vertical" && [k.left, k.right].includes(a)) && !(d === "horizontal" && [k.up, k.down].includes(a)))
78
+ return Io[a];
79
+ }, Po = (e, d) => e.map((f, a) => e[(a + d) % e.length]), _e = (e) => {
80
+ const { activeElement: d } = document;
81
+ for (const f of e)
82
+ if (f === d || (f.focus(), d !== document.activeElement))
83
+ return;
84
+ }, ye = "currentTabIdChange", Ie = "rovingFocusGroup.entryFocus", Fo = { bubbles: !1, cancelable: !0 }, $o = L({
85
+ name: "ElRovingFocusGroupImpl",
86
+ inheritAttrs: !1,
87
+ props: wo,
88
+ emits: [ye, "entryFocus"],
89
+ setup(e, { emit: d }) {
90
+ var f;
91
+ const a = y((f = e.currentTabId || e.defaultCurrentTabId) != null ? f : null), p = y(!1), c = y(!1), i = y(), { getItems: u } = C(fe, void 0), g = T(() => [
92
+ {
93
+ outline: "none"
94
+ },
95
+ e.style
96
+ ]), w = (v) => {
97
+ d(ye, v);
98
+ }, n = () => {
99
+ p.value = !0;
100
+ }, o = O((v) => {
101
+ var b;
102
+ (b = e.onMousedown) == null || b.call(e, v);
103
+ }, () => {
104
+ c.value = !0;
105
+ }), r = O((v) => {
106
+ var b;
107
+ (b = e.onFocus) == null || b.call(e, v);
108
+ }, (v) => {
109
+ const b = !$(c), { target: m, currentTarget: E } = v;
110
+ if (m === E && b && !$(p)) {
111
+ const A = new Event(Ie, Fo);
112
+ if (E == null || E.dispatchEvent(A), !A.defaultPrevented) {
113
+ const F = u().filter((D) => D.focusable), N = F.find((D) => D.active), S = F.find((D) => D.id === $(a)), G = [N, S, ...F].filter(Boolean).map((D) => D.ref);
114
+ _e(G);
115
+ }
116
+ }
117
+ c.value = !1;
118
+ }), t = O((v) => {
119
+ var b;
120
+ (b = e.onBlur) == null || b.call(e, v);
121
+ }, () => {
122
+ p.value = !1;
123
+ }), _ = (...v) => {
124
+ d("entryFocus", ...v);
125
+ };
126
+ j(ve, {
127
+ currentTabbedId: Le(a),
128
+ loop: q(e, "loop"),
129
+ tabIndex: T(() => $(p) ? -1 : 0),
130
+ rovingFocusGroupRef: i,
131
+ rovingFocusGroupRootStyle: g,
132
+ orientation: q(e, "orientation"),
133
+ dir: q(e, "dir"),
134
+ onItemFocus: w,
135
+ onItemShiftTab: n,
136
+ onBlur: t,
137
+ onFocus: r,
138
+ onMousedown: o
139
+ }), Ye(() => e.currentTabId, (v) => {
140
+ a.value = v ?? null;
141
+ }), no(i, Ie, _);
142
+ }
143
+ });
144
+ function ho(e, d, f, a, p, c) {
145
+ return V(e.$slots, "default");
146
+ }
147
+ var Ro = /* @__PURE__ */ z($o, [["render", ho], ["__file", "roving-focus-group-impl.vue"]]);
148
+ const To = L({
149
+ name: "ElRovingFocusGroup",
150
+ components: {
151
+ ElFocusGroupCollection: go,
152
+ ElRovingFocusGroupImpl: Ro
153
+ }
154
+ });
155
+ function ko(e, d, f, a, p, c) {
156
+ const i = h("el-roving-focus-group-impl"), u = h("el-focus-group-collection");
157
+ return P(), K(u, null, {
158
+ default: s(() => [
159
+ l(i, He(Je(e.$attrs)), {
160
+ default: s(() => [
161
+ V(e.$slots, "default")
162
+ ]),
163
+ _: 3
164
+ }, 16)
165
+ ]),
166
+ _: 3
167
+ });
168
+ }
169
+ var So = /* @__PURE__ */ z(To, [["render", ko], ["__file", "roving-focus-group.vue"]]);
170
+ const se = Symbol("elDropdown"), Ne = "elDropdown", { ButtonGroup: Do } = H, No = L({
171
+ name: "ElDropdown",
172
+ components: {
173
+ ElButton: H,
174
+ ElButtonGroup: Do,
175
+ ElScrollbar: oo,
176
+ ElDropdownCollection: ro,
177
+ ElTooltip: Ue,
178
+ ElRovingFocusGroup: So,
179
+ ElOnlyChild: Ge,
180
+ ElIcon: ce,
181
+ ArrowDown: $e
182
+ },
183
+ props: so,
184
+ emits: ["visible-change", "click", "command"],
185
+ setup(e, { emit: d }) {
186
+ const f = Ce(), a = ue("dropdown"), { t: p } = vo(), c = y(), i = y(), u = y(), g = y(), w = y(null), n = y(null), o = y(!1), r = T(() => ({
187
+ maxHeight: Me(e.maxHeight)
188
+ })), t = T(() => [a.m(F.value)]), _ = T(() => _o(e.trigger)), v = Se().value, b = T(() => e.id || v);
189
+ function m() {
190
+ var I;
191
+ (I = u.value) == null || I.onClose(void 0, 0);
192
+ }
193
+ function E() {
194
+ var I;
195
+ (I = u.value) == null || I.onClose();
196
+ }
197
+ function A() {
198
+ var I;
199
+ (I = u.value) == null || I.onOpen();
200
+ }
201
+ const F = to();
202
+ function N(...I) {
203
+ d("command", ...I);
204
+ }
205
+ function S() {
206
+ }
207
+ function U() {
208
+ const I = $(g);
209
+ _.value.includes("hover") && (I == null || I.focus({
210
+ preventScroll: !0
211
+ })), n.value = null;
212
+ }
213
+ function G(I) {
214
+ n.value = I;
215
+ }
216
+ function D(I) {
217
+ o.value || (I.preventDefault(), I.stopImmediatePropagation());
218
+ }
219
+ function we() {
220
+ d("visible-change", !0);
221
+ }
222
+ function Z(I) {
223
+ var Y;
224
+ (I == null ? void 0 : I.type) === "keydown" && ((Y = g.value) == null || Y.focus());
225
+ }
226
+ function J() {
227
+ d("visible-change", !1);
228
+ }
229
+ return j(se, {
230
+ contentRef: g,
231
+ role: T(() => e.role),
232
+ triggerId: b,
233
+ isUsingKeyboard: o,
234
+ onItemEnter: S,
235
+ onItemLeave: U
236
+ }), j(Ne, {
237
+ instance: f,
238
+ dropdownSize: F,
239
+ handleClick: m,
240
+ commandHandler: N,
241
+ trigger: q(e, "trigger"),
242
+ hideOnClick: q(e, "hideOnClick")
243
+ }), {
244
+ t: p,
245
+ ns: a,
246
+ scrollbar: w,
247
+ wrapStyle: r,
248
+ dropdownTriggerKls: t,
249
+ dropdownSize: F,
250
+ triggerId: b,
251
+ currentTabId: n,
252
+ handleCurrentTabIdChange: G,
253
+ handlerMainButtonClick: (I) => {
254
+ d("click", I);
255
+ },
256
+ handleEntryFocus: D,
257
+ handleClose: E,
258
+ handleOpen: A,
259
+ handleBeforeShowTooltip: we,
260
+ handleShowTooltip: Z,
261
+ handleBeforeHideTooltip: J,
262
+ onFocusAfterTrapped: (I) => {
263
+ var Y, ge;
264
+ I.preventDefault(), (ge = (Y = g.value) == null ? void 0 : Y.focus) == null || ge.call(Y, {
265
+ preventScroll: !0
266
+ });
267
+ },
268
+ popperRef: u,
269
+ contentRef: g,
270
+ triggeringElementRef: c,
271
+ referenceElementRef: i
272
+ };
273
+ }
274
+ });
275
+ function Oo(e, d, f, a, p, c) {
276
+ var i, u;
277
+ const g = h("el-dropdown-collection"), w = h("el-roving-focus-group"), n = h("el-scrollbar"), o = h("el-only-child"), r = h("el-tooltip"), t = h("el-button"), _ = h("arrow-down"), v = h("el-icon"), b = h("el-button-group");
278
+ return P(), B("div", {
279
+ class: Q([e.ns.b(), e.ns.is("disabled", e.disabled)])
280
+ }, [
281
+ l(r, {
282
+ ref: "popperRef",
283
+ role: e.role,
284
+ effect: e.effect,
285
+ "fallback-placements": ["bottom", "top"],
286
+ "popper-options": e.popperOptions,
287
+ "gpu-acceleration": !1,
288
+ "manual-mode": !0,
289
+ placement: e.placement,
290
+ "popper-class": [e.ns.e("popper"), e.popperClass],
291
+ "reference-element": (i = e.referenceElementRef) == null ? void 0 : i.$el,
292
+ trigger: e.trigger,
293
+ "trigger-keys": e.triggerKeys,
294
+ "trigger-target-el": e.contentRef,
295
+ "show-arrow": e.showArrow,
296
+ "show-after": e.trigger === "hover" ? e.showTimeout : 0,
297
+ "hide-after": e.trigger === "hover" ? e.hideTimeout : 0,
298
+ "stop-popper-mouse-event": !1,
299
+ "virtual-ref": (u = e.virtualRef) != null ? u : e.triggeringElementRef,
300
+ "virtual-triggering": e.virtualTriggering || e.splitButton,
301
+ disabled: e.disabled,
302
+ transition: `${e.ns.namespace.value}-zoom-in-top`,
303
+ teleported: e.teleported,
304
+ pure: "",
305
+ "focus-on-target": "",
306
+ persistent: e.persistent,
307
+ onBeforeShow: e.handleBeforeShowTooltip,
308
+ onShow: e.handleShowTooltip,
309
+ onBeforeHide: e.handleBeforeHideTooltip
310
+ }, qe({
311
+ content: s(() => [
312
+ l(n, {
313
+ ref: "scrollbar",
314
+ "wrap-style": e.wrapStyle,
315
+ tag: "div",
316
+ "view-class": e.ns.e("list")
317
+ }, {
318
+ default: s(() => [
319
+ l(w, {
320
+ loop: e.loop,
321
+ "current-tab-id": e.currentTabId,
322
+ orientation: "horizontal",
323
+ onCurrentTabIdChange: e.handleCurrentTabIdChange,
324
+ onEntryFocus: e.handleEntryFocus
325
+ }, {
326
+ default: s(() => [
327
+ l(g, null, {
328
+ default: s(() => [
329
+ V(e.$slots, "dropdown")
330
+ ]),
331
+ _: 3
332
+ })
333
+ ]),
334
+ _: 3
335
+ }, 8, ["loop", "current-tab-id", "onCurrentTabIdChange", "onEntryFocus"])
336
+ ]),
337
+ _: 3
338
+ }, 8, ["wrap-style", "view-class"])
339
+ ]),
340
+ _: 2
341
+ }, [
342
+ e.splitButton ? void 0 : {
343
+ name: "default",
344
+ fn: s(() => [
345
+ l(o, {
346
+ id: e.triggerId,
347
+ ref: "triggeringElementRef",
348
+ role: "button",
349
+ tabindex: e.tabindex
350
+ }, {
351
+ default: s(() => [
352
+ V(e.$slots, "default")
353
+ ]),
354
+ _: 3
355
+ }, 8, ["id", "tabindex"])
356
+ ])
357
+ }
358
+ ]), 1032, ["role", "effect", "popper-options", "placement", "popper-class", "reference-element", "trigger", "trigger-keys", "trigger-target-el", "show-arrow", "show-after", "hide-after", "virtual-ref", "virtual-triggering", "disabled", "transition", "teleported", "persistent", "onBeforeShow", "onShow", "onBeforeHide"]),
359
+ e.splitButton ? (P(), K(b, { key: 0 }, {
360
+ default: s(() => [
361
+ l(t, X({ ref: "referenceElementRef" }, e.buttonProps, {
362
+ size: e.dropdownSize,
363
+ type: e.type,
364
+ disabled: e.disabled,
365
+ tabindex: e.tabindex,
366
+ onClick: e.handlerMainButtonClick
367
+ }), {
368
+ default: s(() => [
369
+ V(e.$slots, "default")
370
+ ]),
371
+ _: 3
372
+ }, 16, ["size", "type", "disabled", "tabindex", "onClick"]),
373
+ l(t, X({
374
+ id: e.triggerId,
375
+ ref: "triggeringElementRef"
376
+ }, e.buttonProps, {
377
+ role: "button",
378
+ size: e.dropdownSize,
379
+ type: e.type,
380
+ class: e.ns.e("caret-button"),
381
+ disabled: e.disabled,
382
+ tabindex: e.tabindex,
383
+ "aria-label": e.t("el.dropdown.toggleDropdown")
384
+ }), {
385
+ default: s(() => [
386
+ l(v, {
387
+ class: Q(e.ns.e("icon"))
388
+ }, {
389
+ default: s(() => [
390
+ l(_)
391
+ ]),
392
+ _: 1
393
+ }, 8, ["class"])
394
+ ]),
395
+ _: 1
396
+ }, 16, ["id", "size", "type", "class", "disabled", "tabindex", "aria-label"])
397
+ ]),
398
+ _: 3
399
+ })) : ie("v-if", !0)
400
+ ], 2);
401
+ }
402
+ var Vo = /* @__PURE__ */ z(No, [["render", Oo], ["__file", "dropdown.vue"]]);
403
+ const Ko = L({
404
+ components: {
405
+ ElRovingFocusCollectionItem: bo
406
+ },
407
+ props: {
408
+ focusable: {
409
+ type: Boolean,
410
+ default: !0
411
+ },
412
+ active: Boolean
413
+ },
414
+ emits: ["mousedown", "focus", "keydown"],
415
+ setup(e, { emit: d }) {
416
+ const { currentTabbedId: f, loop: a, onItemFocus: p, onItemShiftTab: c } = C(ve, void 0), { getItems: i } = C(fe, void 0), u = Se(), g = y(), w = O((t) => {
417
+ d("mousedown", t);
418
+ }, (t) => {
419
+ e.focusable ? p($(u)) : t.preventDefault();
420
+ }), n = O((t) => {
421
+ d("focus", t);
422
+ }, () => {
423
+ p($(u));
424
+ }), o = O((t) => {
425
+ d("keydown", t);
426
+ }, (t) => {
427
+ const { code: _, shiftKey: v, target: b, currentTarget: m } = t;
428
+ if (_ === k.tab && v) {
429
+ c();
430
+ return;
431
+ }
432
+ if (b !== m)
433
+ return;
434
+ const E = Co(t);
435
+ if (E) {
436
+ t.preventDefault();
437
+ let F = i().filter((N) => N.focusable).map((N) => N.ref);
438
+ switch (E) {
439
+ case "last": {
440
+ F.reverse();
441
+ break;
442
+ }
443
+ case "prev":
444
+ case "next": {
445
+ E === "prev" && F.reverse();
446
+ const N = F.indexOf(m);
447
+ F = a.value ? Po(F, N + 1) : F.slice(N + 1);
448
+ break;
449
+ }
450
+ }
451
+ de(() => {
452
+ _e(F);
453
+ });
454
+ }
455
+ }), r = T(() => f.value === $(u));
456
+ return j(De, {
457
+ rovingFocusGroupItemRef: g,
458
+ tabIndex: T(() => $(r) ? 0 : -1),
459
+ handleMousedown: w,
460
+ handleFocus: n,
461
+ handleKeydown: o
462
+ }), {
463
+ id: u,
464
+ handleKeydown: o,
465
+ handleFocus: n,
466
+ handleMousedown: w
467
+ };
468
+ }
469
+ });
470
+ function Bo(e, d, f, a, p, c) {
471
+ const i = h("el-roving-focus-collection-item");
472
+ return P(), K(i, {
473
+ id: e.id,
474
+ focusable: e.focusable,
475
+ active: e.active
476
+ }, {
477
+ default: s(() => [
478
+ V(e.$slots, "default")
479
+ ]),
480
+ _: 3
481
+ }, 8, ["id", "focusable", "active"]);
482
+ }
483
+ var Mo = /* @__PURE__ */ z(Ko, [["render", Bo], ["__file", "roving-focus-item.vue"]]);
484
+ const Ao = L({
485
+ name: "DropdownItemImpl",
486
+ components: {
487
+ ElIcon: ce
488
+ },
489
+ props: ke,
490
+ emits: ["pointermove", "pointerleave", "click", "clickimpl"],
491
+ setup(e, { emit: d }) {
492
+ const f = ue("dropdown"), { role: a } = C(se, void 0), { collectionItemRef: p } = C(ao, void 0), { collectionItemRef: c } = C(yo, void 0), {
493
+ rovingFocusGroupItemRef: i,
494
+ tabIndex: u,
495
+ handleFocus: g,
496
+ handleKeydown: w,
497
+ handleMousedown: n
498
+ } = C(De, void 0), o = he(p, c, i), r = T(() => a.value === "menu" ? "menuitem" : a.value === "navigation" ? "link" : "button"), t = O((_) => {
499
+ if ([k.enter, k.numpadEnter, k.space].includes(_.code))
500
+ return _.preventDefault(), _.stopImmediatePropagation(), d("clickimpl", _), !0;
501
+ }, w);
502
+ return {
503
+ ns: f,
504
+ itemRef: o,
505
+ dataset: {
506
+ [io]: ""
507
+ },
508
+ role: r,
509
+ tabIndex: u,
510
+ handleFocus: g,
511
+ handleKeydown: t,
512
+ handleMousedown: n
513
+ };
514
+ }
515
+ });
516
+ function Uo(e, d, f, a, p, c) {
517
+ const i = h("el-icon");
518
+ return P(), B(Pe, null, [
519
+ e.divided ? (P(), B("li", {
520
+ key: 0,
521
+ role: "separator",
522
+ class: Q(e.ns.bem("menu", "item", "divided"))
523
+ }, null, 2)) : ie("v-if", !0),
524
+ x("li", X({ ref: e.itemRef }, { ...e.dataset, ...e.$attrs }, {
525
+ "aria-disabled": e.disabled,
526
+ class: [e.ns.be("menu", "item"), e.ns.is("disabled", e.disabled)],
527
+ tabindex: e.tabIndex,
528
+ role: e.role,
529
+ onClick: (u) => e.$emit("clickimpl", u),
530
+ onFocus: e.handleFocus,
531
+ onKeydown: W(e.handleKeydown, ["self"]),
532
+ onMousedown: e.handleMousedown,
533
+ onPointermove: (u) => e.$emit("pointermove", u),
534
+ onPointerleave: (u) => e.$emit("pointerleave", u)
535
+ }), [
536
+ e.icon ? (P(), K(i, { key: 0 }, {
537
+ default: s(() => [
538
+ (P(), K(je(e.icon)))
539
+ ]),
540
+ _: 1
541
+ })) : ie("v-if", !0),
542
+ V(e.$slots, "default")
543
+ ], 16, ["aria-disabled", "tabindex", "role", "onClick", "onFocus", "onKeydown", "onMousedown", "onPointermove", "onPointerleave"])
544
+ ], 64);
545
+ }
546
+ var Go = /* @__PURE__ */ z(Ao, [["render", Uo], ["__file", "dropdown-item-impl.vue"]]);
547
+ const Oe = () => {
548
+ const e = C(Ne, {}), d = T(() => e == null ? void 0 : e.dropdownSize);
549
+ return {
550
+ elDropdown: e,
551
+ _elDropdownSize: d
552
+ };
553
+ }, zo = L({
554
+ name: "ElDropdownItem",
555
+ components: {
556
+ ElDropdownCollectionItem: uo,
557
+ ElRovingFocusItem: Mo,
558
+ ElDropdownItemImpl: Go
559
+ },
560
+ inheritAttrs: !1,
561
+ props: ke,
562
+ emits: ["pointermove", "pointerleave", "click"],
563
+ setup(e, { emit: d, attrs: f }) {
564
+ const { elDropdown: a } = Oe(), p = Ce(), c = y(null), i = T(() => {
565
+ var t, _;
566
+ return (_ = (t = $(c)) == null ? void 0 : t.textContent) != null ? _ : "";
567
+ }), { onItemEnter: u, onItemLeave: g } = C(se, void 0), w = O((t) => (d("pointermove", t), t.defaultPrevented), be((t) => {
568
+ if (e.disabled) {
569
+ g(t);
570
+ return;
571
+ }
572
+ const _ = t.currentTarget;
573
+ _ === document.activeElement || _.contains(document.activeElement) || (u(t), t.defaultPrevented || _ == null || _.focus({
574
+ preventScroll: !0
575
+ }));
576
+ })), n = O((t) => (d("pointerleave", t), t.defaultPrevented), be(g)), o = O((t) => {
577
+ if (!e.disabled)
578
+ return d("click", t), t.type !== "keydown" && t.defaultPrevented;
579
+ }, (t) => {
580
+ var _, v, b;
581
+ if (e.disabled) {
582
+ t.stopImmediatePropagation();
583
+ return;
584
+ }
585
+ (_ = a == null ? void 0 : a.hideOnClick) != null && _.value && ((v = a.handleClick) == null || v.call(a)), (b = a.commandHandler) == null || b.call(a, e.command, p, t);
586
+ }), r = T(() => ({ ...e, ...f }));
587
+ return {
588
+ handleClick: o,
589
+ handlePointerMove: w,
590
+ handlePointerLeave: n,
591
+ textContent: i,
592
+ propsAndAttrs: r
593
+ };
594
+ }
595
+ });
596
+ function Lo(e, d, f, a, p, c) {
597
+ var i;
598
+ const u = h("el-dropdown-item-impl"), g = h("el-roving-focus-item"), w = h("el-dropdown-collection-item");
599
+ return P(), K(w, {
600
+ disabled: e.disabled,
601
+ "text-value": (i = e.textValue) != null ? i : e.textContent
602
+ }, {
603
+ default: s(() => [
604
+ l(g, {
605
+ focusable: !e.disabled
606
+ }, {
607
+ default: s(() => [
608
+ l(u, X(e.propsAndAttrs, {
609
+ onPointerleave: e.handlePointerLeave,
610
+ onPointermove: e.handlePointerMove,
611
+ onClickimpl: e.handleClick
612
+ }), {
613
+ default: s(() => [
614
+ V(e.$slots, "default")
615
+ ]),
616
+ _: 3
617
+ }, 16, ["onPointerleave", "onPointermove", "onClickimpl"])
618
+ ]),
619
+ _: 3
620
+ }, 8, ["focusable"])
621
+ ]),
622
+ _: 3
623
+ }, 8, ["disabled", "text-value"]);
624
+ }
625
+ var Ve = /* @__PURE__ */ z(zo, [["render", Lo], ["__file", "dropdown-item.vue"]]);
626
+ const Yo = L({
627
+ name: "ElDropdownMenu",
628
+ props: co,
629
+ setup(e) {
630
+ const d = ue("dropdown"), { _elDropdownSize: f } = Oe(), a = f.value, { focusTrapRef: p, onKeydown: c } = C(ze, void 0), { contentRef: i, role: u, triggerId: g } = C(se, void 0), { collectionRef: w, getItems: n } = C(po, void 0), {
631
+ rovingFocusGroupRef: o,
632
+ rovingFocusGroupRootStyle: r,
633
+ tabIndex: t,
634
+ onBlur: _,
635
+ onFocus: v,
636
+ onMousedown: b
637
+ } = C(ve, void 0), { collectionRef: m } = C(fe, void 0), E = T(() => [d.b("menu"), d.bm("menu", a == null ? void 0 : a.value)]), A = he(i, w, p, o, m), F = O((S) => {
638
+ var U;
639
+ (U = e.onKeydown) == null || U.call(e, S);
640
+ }, (S) => {
641
+ const { currentTarget: U, code: G, target: D } = S;
642
+ if (U.contains(D), k.tab === G && S.stopImmediatePropagation(), S.preventDefault(), D !== $(i) || !mo.includes(G))
643
+ return;
644
+ const Z = n().filter((J) => !J.disabled).map((J) => J.ref);
645
+ fo.includes(G) && Z.reverse(), _e(Z);
646
+ });
647
+ return {
648
+ size: a,
649
+ rovingFocusGroupRootStyle: r,
650
+ tabIndex: t,
651
+ dropdownKls: E,
652
+ role: u,
653
+ triggerId: g,
654
+ dropdownListWrapperRef: A,
655
+ handleKeydown: (S) => {
656
+ F(S), c(S);
657
+ },
658
+ onBlur: _,
659
+ onFocus: v,
660
+ onMousedown: b
661
+ };
662
+ }
663
+ });
664
+ function Ho(e, d, f, a, p, c) {
665
+ return P(), B("ul", {
666
+ ref: e.dropdownListWrapperRef,
667
+ class: Q(e.dropdownKls),
668
+ style: We(e.rovingFocusGroupRootStyle),
669
+ tabindex: -1,
670
+ role: e.role,
671
+ "aria-labelledby": e.triggerId,
672
+ onBlur: e.onBlur,
673
+ onFocus: e.onFocus,
674
+ onKeydown: W(e.handleKeydown, ["self"]),
675
+ onMousedown: W(e.onMousedown, ["self"])
676
+ }, [
677
+ V(e.$slots, "default")
678
+ ], 46, ["role", "aria-labelledby", "onBlur", "onFocus", "onKeydown", "onMousedown"]);
679
+ }
680
+ var Ke = /* @__PURE__ */ z(Yo, [["render", Ho], ["__file", "dropdown-menu.vue"]]);
681
+ const Jo = Ae(Vo, {
682
+ DropdownItem: Ve,
683
+ DropdownMenu: Ke
684
+ }), qo = Ee(Ve), jo = Ee(Ke);
685
+ const Wo = { class: "mobile" }, Zo = {
686
+ __name: "Mobile",
687
+ setup(e) {
688
+ const d = C("stConfig"), f = C("userData"), a = y(!1), p = y(), c = M({
689
+ mobile: ""
690
+ }), i = M({
691
+ mobile: [
692
+ { required: !0, message: "请输入手机号", trigger: "blur" },
693
+ {
694
+ validator: (w, n, o) => {
695
+ const r = /^1[3-9]\d{9}$/;
696
+ n === f.mobile ? o("新手机号与旧手机号相同") : r.test(n) ? o() : o("手机号格式错误");
697
+ },
698
+ trigger: "blur"
699
+ }
700
+ ]
701
+ }), u = () => {
702
+ c.mobile = "", a.value = !0;
703
+ }, g = () => {
704
+ p.value && p.value.validate(async (w) => {
705
+ if (!w)
706
+ return !1;
707
+ const n = {
708
+ ...c,
709
+ userId: f.id,
710
+ username: f.username
711
+ };
712
+ await d.request.post("/invest/sys/user/updateUserInfo", n), re.success("手机号修改成功!"), a.value = !1, f.mobile = c.mobile, pe(f);
713
+ });
714
+ };
715
+ return (w, n) => {
716
+ const o = Re, r = le, t = ne, _ = te, v = H, b = oe;
717
+ return P(), B(Pe, null, [
718
+ x("div", Wo, [
719
+ l(o, { type: "info" }, {
720
+ default: s(() => [
721
+ R(ee($(f).mobile ?? "暂无"), 1)
722
+ ]),
723
+ _: 1
724
+ }),
725
+ l(o, {
726
+ class: "btn",
727
+ size: "small",
728
+ type: "primary",
729
+ onClick: u
730
+ }, {
731
+ default: s(() => [
732
+ R(ee($(f).mobile ? "更换手机号" : "立即绑定"), 1)
733
+ ]),
734
+ _: 1
735
+ })
736
+ ]),
737
+ l(b, {
738
+ modelValue: a.value,
739
+ "onUpdate:modelValue": n[2] || (n[2] = (m) => a.value = m),
740
+ width: "460",
741
+ title: "手机号绑定",
742
+ "append-to-body": "",
743
+ "destroy-on-close": ""
744
+ }, {
745
+ footer: s(() => [
746
+ l(v, {
747
+ onClick: n[1] || (n[1] = (m) => a.value = !1)
748
+ }, {
749
+ default: s(() => [
750
+ R(" 取消 ")
751
+ ]),
752
+ _: 1
753
+ }),
754
+ l(v, {
755
+ type: "primary",
756
+ onClick: g
757
+ }, {
758
+ default: s(() => [
759
+ R(" 确认 ")
760
+ ]),
761
+ _: 1
762
+ })
763
+ ]),
764
+ default: s(() => [
765
+ l(_, {
766
+ ref_key: "ruleFormRef",
767
+ ref: p,
768
+ rules: i,
769
+ model: c
770
+ }, {
771
+ default: s(() => [
772
+ l(t, {
773
+ label: "新手机",
774
+ prop: "mobile"
775
+ }, {
776
+ default: s(() => [
777
+ l(r, {
778
+ modelValue: c.mobile,
779
+ "onUpdate:modelValue": n[0] || (n[0] = (m) => c.mobile = m)
780
+ }, null, 8, ["modelValue"])
781
+ ]),
782
+ _: 1
783
+ })
784
+ ]),
785
+ _: 1
786
+ }, 8, ["rules", "model"])
787
+ ]),
788
+ _: 1
789
+ }, 8, ["modelValue"])
790
+ ], 64);
791
+ };
792
+ }
793
+ }, Qo = /* @__PURE__ */ me(Zo, [["__scopeId", "data-v-a169945b"]]);
794
+ const Xo = {
795
+ __name: "index",
796
+ setup(e, { expose: d }) {
797
+ const f = C("stConfig"), a = C("userData"), p = y(!1), c = y(), i = M({
798
+ nickName: "",
799
+ email: ""
800
+ }), u = M({
801
+ nickName: [
802
+ {
803
+ validator: (w, n, o) => {
804
+ n ? /[\s@<>&%]/.test(n) ? o("昵称不能包含空格、@、<、>、&、%等特殊字符") : n && n.length > 12 ? o("昵称长度不能超过12个字符") : o() : o();
805
+ },
806
+ trigger: "blur"
807
+ }
808
+ ],
809
+ email: [
810
+ {
811
+ validator: (w, n, o) => {
812
+ n && !/^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test(n) ? o("邮箱格式错误") : o();
813
+ },
814
+ trigger: "blur"
815
+ }
816
+ ]
817
+ }), g = () => {
818
+ c.value && c.value.validate(async (w) => {
819
+ if (!w)
820
+ return !1;
821
+ const n = {
822
+ ...i,
823
+ userId: a.id,
824
+ username: a.username
825
+ };
826
+ n.nickName === a.nickName && delete n.nickName, n.email === a.email && delete n.email, await f.request.post("/invest/sys/user/updateUserInfo", n), re.success("资料修改成功!"), p.value = !1, Object.assign(a, i), pe(a);
827
+ });
828
+ };
829
+ return d({
830
+ open: () => {
831
+ Object.assign(i, {
832
+ nickName: a.nickName,
833
+ email: a.email
834
+ }), p.value = !0;
835
+ }
836
+ }), (w, n) => {
837
+ const o = Re, r = ne, t = le, _ = te, v = H, b = oe;
838
+ return P(), K(b, {
839
+ "modal-class": "edit-info",
840
+ modelValue: p.value,
841
+ "onUpdate:modelValue": n[3] || (n[3] = (m) => p.value = m),
842
+ title: "设置资料",
843
+ width: "460",
844
+ "destroy-on-close": "",
845
+ "z-index": 200
846
+ }, {
847
+ footer: s(() => [
848
+ l(v, {
849
+ onClick: n[2] || (n[2] = (m) => p.value = !1)
850
+ }, {
851
+ default: s(() => [
852
+ R(" 取消 ")
853
+ ]),
854
+ _: 1
855
+ }),
856
+ l(v, {
857
+ type: "primary",
858
+ onClick: g
859
+ }, {
860
+ default: s(() => [
861
+ R(" 确认 ")
862
+ ]),
863
+ _: 1
864
+ })
865
+ ]),
866
+ default: s(() => [
867
+ l(_, {
868
+ ref_key: "ruleFormRef",
869
+ ref: c,
870
+ rules: u,
871
+ model: i
872
+ }, {
873
+ default: s(() => [
874
+ l(r, { label: "用户名" }, {
875
+ default: s(() => [
876
+ l(o, { type: "info" }, {
877
+ default: s(() => [
878
+ R(ee($(a).username), 1)
879
+ ]),
880
+ _: 1
881
+ })
882
+ ]),
883
+ _: 1
884
+ }),
885
+ l(r, { label: "手机号" }, {
886
+ default: s(() => [
887
+ l(Qo)
888
+ ]),
889
+ _: 1
890
+ }),
891
+ l(r, {
892
+ label: "昵称",
893
+ prop: "nickName"
894
+ }, {
895
+ default: s(() => [
896
+ l(t, {
897
+ modelValue: i.nickName,
898
+ "onUpdate:modelValue": n[0] || (n[0] = (m) => i.nickName = m)
899
+ }, null, 8, ["modelValue"])
900
+ ]),
901
+ _: 1
902
+ }),
903
+ l(r, {
904
+ label: "邮箱",
905
+ prop: "email"
906
+ }, {
907
+ default: s(() => [
908
+ l(t, {
909
+ modelValue: i.email,
910
+ "onUpdate:modelValue": n[1] || (n[1] = (m) => i.email = m)
911
+ }, null, 8, ["modelValue"])
912
+ ]),
913
+ _: 1
914
+ })
915
+ ]),
916
+ _: 1
917
+ }, 8, ["rules", "model"])
918
+ ]),
919
+ _: 1
920
+ }, 8, ["modelValue"]);
921
+ };
922
+ }
923
+ }, xo = /* @__PURE__ */ me(Xo, [["__scopeId", "data-v-b7b637e7"]]), en = { class: "set-password" }, on = {
924
+ __name: "SetPasswordDialog",
925
+ setup(e, { expose: d }) {
926
+ const f = y(null), a = C("stConfig"), p = C("userData"), c = y(!1), i = y(), u = M({
927
+ newPassword: "",
928
+ newPassword2: ""
929
+ }), g = M({
930
+ newPassword: [],
931
+ newPassword2: [
932
+ { required: !0, message: "请输入确认密码", trigger: "blur" },
933
+ {
934
+ validator: (o, r, t) => {
935
+ r === "" ? t(new Error("请输入确认密码")) : r !== u.newPassword ? t(new Error("两次输入密码不一致!")) : t();
936
+ },
937
+ trigger: "blur"
938
+ }
939
+ ]
940
+ }), w = y(!1), n = (o) => {
941
+ o && o.validate(async (r) => {
942
+ if (!r)
943
+ return !1;
944
+ await a.request.post("/invest/sys/user/setPassword", { newPassword: u.newPassword }), re.success("密码设置成功!"), c.value = !1, p.canSet = !1, pe(p);
945
+ });
946
+ };
947
+ return d({
948
+ open: () => {
949
+ Object.assign(u, {
950
+ newPassword: "",
951
+ newPassword2: ""
952
+ }), c.value = !0, de(() => {
953
+ var o, r;
954
+ (o = g.newPassword) != null && o.length || (g.newPassword = (r = f.value) == null ? void 0 : r.ruleFormPassword);
955
+ });
956
+ }
957
+ }), (o, r) => {
958
+ const t = le, _ = ne, v = te, b = H, m = oe;
959
+ return P(), B("div", en, [
960
+ l(m, {
961
+ modelValue: c.value,
962
+ "onUpdate:modelValue": r[8] || (r[8] = (E) => c.value = E),
963
+ title: "设置密码",
964
+ width: "460",
965
+ "destroy-on-close": "",
966
+ "z-index": 200
967
+ }, {
968
+ footer: s(() => [
969
+ l(b, {
970
+ onClick: r[6] || (r[6] = (E) => c.value = !1)
971
+ }, {
972
+ default: s(() => [
973
+ R(" 取消 ")
974
+ ]),
975
+ _: 1
976
+ }),
977
+ l(b, {
978
+ type: "primary",
979
+ onClick: r[7] || (r[7] = (E) => n(i.value))
980
+ }, {
981
+ default: s(() => [
982
+ R(" 确认 ")
983
+ ]),
984
+ _: 1
985
+ })
986
+ ]),
987
+ default: s(() => [
988
+ l(v, {
989
+ ref_key: "ruleFormRef",
990
+ ref: i,
991
+ rules: g,
992
+ model: u,
993
+ "label-width": "auto",
994
+ "validate-on-rule-change": !1,
995
+ onSubmit: r[4] || (r[4] = W((E) => n(i.value), ["prevent"])),
996
+ onKeyup: r[5] || (r[5] = Fe((E) => n(i.value), ["enter", "native"]))
997
+ }, {
998
+ default: s(() => [
999
+ l(_, {
1000
+ label: "密码",
1001
+ prop: "newPassword"
1002
+ }, {
1003
+ default: s(() => [
1004
+ l(t, {
1005
+ modelValue: u.newPassword,
1006
+ "onUpdate:modelValue": r[0] || (r[0] = (E) => u.newPassword = E),
1007
+ type: "password",
1008
+ "show-password": !0,
1009
+ onFocus: r[1] || (r[1] = () => {
1010
+ i.value.clearValidate(["newPassword"]), w.value = !0;
1011
+ }),
1012
+ onBlur: r[2] || (r[2] = (E) => w.value = !1)
1013
+ }, null, 8, ["modelValue"]),
1014
+ l(Te, {
1015
+ ref_key: "PasswordPromptRef",
1016
+ ref: f,
1017
+ value: u.newPassword,
1018
+ isFocus: w.value
1019
+ }, null, 8, ["value", "isFocus"])
1020
+ ]),
1021
+ _: 1
1022
+ }),
1023
+ l(_, {
1024
+ label: "确认密码",
1025
+ prop: "newPassword2"
1026
+ }, {
1027
+ default: s(() => [
1028
+ l(t, {
1029
+ modelValue: u.newPassword2,
1030
+ "onUpdate:modelValue": r[3] || (r[3] = (E) => u.newPassword2 = E),
1031
+ type: "password",
1032
+ "show-password": !0
1033
+ }, null, 8, ["modelValue"])
1034
+ ]),
1035
+ _: 1
1036
+ })
1037
+ ]),
1038
+ _: 1
1039
+ }, 8, ["rules", "model"])
1040
+ ]),
1041
+ _: 1
1042
+ }, 8, ["modelValue"])
1043
+ ]);
1044
+ };
1045
+ }
1046
+ }, nn = { class: "edit-password" }, tn = {
1047
+ __name: "EditPasswordDialog",
1048
+ setup(e, { expose: d }) {
1049
+ const f = C("stConfig"), a = y(null), p = y(!1), c = y(), i = M({
1050
+ password: "",
1051
+ newPassword: "",
1052
+ newPassword2: ""
1053
+ }), u = M({
1054
+ password: [{ required: !0, message: "请输入原密码", trigger: "blur" }],
1055
+ newPassword: [],
1056
+ newPassword2: [
1057
+ { required: !0, message: "请输入确认密码", trigger: "blur" },
1058
+ {
1059
+ validator: (n, o, r) => {
1060
+ o === "" ? r(new Error("请输入确认密码")) : o !== i.newPassword ? r(new Error("两次输入密码不一致!")) : r();
1061
+ },
1062
+ trigger: "blur"
1063
+ }
1064
+ ]
1065
+ }), g = y(!1), w = (n) => {
1066
+ n && n.validate(async (o) => {
1067
+ if (!o)
1068
+ return !1;
1069
+ await f.request.post("/invest/sys/user/password", i), re.success("密码修改成功!"), p.value = !1;
1070
+ });
1071
+ };
1072
+ return d({
1073
+ open: () => {
1074
+ Object.assign(i, {
1075
+ password: "",
1076
+ newPassword: "",
1077
+ newPassword2: ""
1078
+ }), p.value = !0, de(() => {
1079
+ var n, o;
1080
+ (n = u.newPassword) != null && n.length || (u.newPassword = (o = a.value) == null ? void 0 : o.ruleFormPassword);
1081
+ });
1082
+ }
1083
+ }), (n, o) => {
1084
+ const r = le, t = ne, _ = te, v = H, b = oe;
1085
+ return P(), B("div", nn, [
1086
+ l(b, {
1087
+ modelValue: p.value,
1088
+ "onUpdate:modelValue": o[9] || (o[9] = (m) => p.value = m),
1089
+ title: "修改密码",
1090
+ width: "460",
1091
+ "destroy-on-close": "",
1092
+ "z-index": 200
1093
+ }, {
1094
+ footer: s(() => [
1095
+ l(v, {
1096
+ onClick: o[7] || (o[7] = (m) => p.value = !1)
1097
+ }, {
1098
+ default: s(() => [
1099
+ R(" 取消 ")
1100
+ ]),
1101
+ _: 1
1102
+ }),
1103
+ l(v, {
1104
+ type: "primary",
1105
+ onClick: o[8] || (o[8] = (m) => w(c.value))
1106
+ }, {
1107
+ default: s(() => [
1108
+ R(" 确认 ")
1109
+ ]),
1110
+ _: 1
1111
+ })
1112
+ ]),
1113
+ default: s(() => [
1114
+ l(_, {
1115
+ ref_key: "ruleFormRef",
1116
+ ref: c,
1117
+ rules: u,
1118
+ model: i,
1119
+ "label-width": "auto",
1120
+ "validate-on-rule-change": !1,
1121
+ onSubmit: o[5] || (o[5] = W((m) => w(c.value), ["prevent"])),
1122
+ onKeyup: o[6] || (o[6] = Fe((m) => w(c.value), ["enter", "native"]))
1123
+ }, {
1124
+ default: s(() => [
1125
+ l(t, {
1126
+ label: "原密码",
1127
+ prop: "password"
1128
+ }, {
1129
+ default: s(() => [
1130
+ l(r, {
1131
+ modelValue: i.password,
1132
+ "onUpdate:modelValue": o[0] || (o[0] = (m) => i.password = m),
1133
+ type: "password",
1134
+ "show-password": !0
1135
+ }, null, 8, ["modelValue"])
1136
+ ]),
1137
+ _: 1
1138
+ }),
1139
+ l(t, {
1140
+ label: "新密码",
1141
+ prop: "newPassword"
1142
+ }, {
1143
+ default: s(() => [
1144
+ l(r, {
1145
+ modelValue: i.newPassword,
1146
+ "onUpdate:modelValue": o[1] || (o[1] = (m) => i.newPassword = m),
1147
+ type: "password",
1148
+ "show-password": !0,
1149
+ onFocus: o[2] || (o[2] = () => {
1150
+ c.value.clearValidate(["newPassword"]), g.value = !0;
1151
+ }),
1152
+ onBlur: o[3] || (o[3] = (m) => g.value = !1)
1153
+ }, null, 8, ["modelValue"]),
1154
+ l(Te, {
1155
+ ref_key: "PasswordPromptRef",
1156
+ ref: a,
1157
+ value: i.newPassword,
1158
+ isFocus: g.value
1159
+ }, null, 8, ["value", "isFocus"])
1160
+ ]),
1161
+ _: 1
1162
+ }),
1163
+ l(t, {
1164
+ label: "确认密码",
1165
+ prop: "newPassword2"
1166
+ }, {
1167
+ default: s(() => [
1168
+ l(r, {
1169
+ modelValue: i.newPassword2,
1170
+ "onUpdate:modelValue": o[4] || (o[4] = (m) => i.newPassword2 = m),
1171
+ type: "password",
1172
+ "show-password": !0
1173
+ }, null, 8, ["modelValue"])
1174
+ ]),
1175
+ _: 1
1176
+ })
1177
+ ]),
1178
+ _: 1
1179
+ }, 8, ["rules", "model"])
1180
+ ]),
1181
+ _: 1
1182
+ }, 8, ["modelValue"])
1183
+ ]);
1184
+ };
1185
+ }
1186
+ };
1187
+ const ln = { class: "user" }, rn = { class: "user-msg" }, sn = {
1188
+ __name: "index",
1189
+ props: {
1190
+ config: {
1191
+ type: Object,
1192
+ default: () => ({})
1193
+ // loginUrl: 登录后的跳转地址 loginoutToLogin: 是否跳转到登录页 loginoutUrl: 退出登录后的跳转地址
1194
+ }
1195
+ },
1196
+ emits: ["loginout"],
1197
+ setup(e, { emit: d }) {
1198
+ const f = y(null), a = y(null), p = y(null), c = M(Xe()), i = d, u = e, g = () => {
1199
+ const { loginUrl: n } = u.config || {};
1200
+ xe(n);
1201
+ }, w = () => {
1202
+ const { loginoutToLogin: n, loginoutUrl: o } = u.config || {};
1203
+ eo(n, o), i("loginout");
1204
+ };
1205
+ return j("userData", c), (n, o) => {
1206
+ const r = ce, t = qo, _ = jo, v = Jo;
1207
+ return P(), B("div", ln, [
1208
+ c ? (P(), K(v, {
1209
+ key: 0,
1210
+ placement: "bottom"
1211
+ }, {
1212
+ dropdown: s(() => [
1213
+ l(_, null, {
1214
+ default: s(() => [
1215
+ V(n.$slots, "dropdown-items", {}, void 0, !0),
1216
+ l(t, {
1217
+ onClick: o[0] || (o[0] = (b) => {
1218
+ var m;
1219
+ return (m = f.value) == null ? void 0 : m.open();
1220
+ })
1221
+ }, {
1222
+ default: s(() => [
1223
+ R("设置资料")
1224
+ ]),
1225
+ _: 1
1226
+ }),
1227
+ c.canSet ? (P(), K(t, {
1228
+ key: 0,
1229
+ onClick: o[1] || (o[1] = (b) => {
1230
+ var m;
1231
+ return (m = a.value) == null ? void 0 : m.open();
1232
+ })
1233
+ }, {
1234
+ default: s(() => [
1235
+ R(" 设置密码 ")
1236
+ ]),
1237
+ _: 1
1238
+ })) : (P(), K(t, {
1239
+ key: 1,
1240
+ onClick: o[2] || (o[2] = (b) => {
1241
+ var m;
1242
+ return (m = p.value) == null ? void 0 : m.open();
1243
+ })
1244
+ }, {
1245
+ default: s(() => [
1246
+ R(" 修改密码 ")
1247
+ ]),
1248
+ _: 1
1249
+ })),
1250
+ l(t, { onClick: w }, {
1251
+ default: s(() => [
1252
+ R("退出登录")
1253
+ ]),
1254
+ _: 1
1255
+ })
1256
+ ]),
1257
+ _: 3
1258
+ })
1259
+ ]),
1260
+ default: s(() => [
1261
+ x("div", rn, [
1262
+ l(r, { class: "user-msg-icon" }, {
1263
+ default: s(() => [
1264
+ l($(Ze))
1265
+ ]),
1266
+ _: 1
1267
+ }),
1268
+ x("span", null, ee(c.nickName || c.username), 1),
1269
+ l(r, { class: "user-msg-arrow" }, {
1270
+ default: s(() => [
1271
+ l($($e))
1272
+ ]),
1273
+ _: 1
1274
+ })
1275
+ ])
1276
+ ]),
1277
+ _: 3
1278
+ })) : (P(), B("div", {
1279
+ key: 1,
1280
+ class: "user-login",
1281
+ onClick: g
1282
+ }, [
1283
+ R(" 前往登录 "),
1284
+ l(r, { class: "user-login-icon" }, {
1285
+ default: s(() => [
1286
+ l($(Qe))
1287
+ ]),
1288
+ _: 1
1289
+ })
1290
+ ])),
1291
+ l(xo, {
1292
+ ref_key: "EditInfoDialogRef",
1293
+ ref: f
1294
+ }, null, 512),
1295
+ l(on, {
1296
+ ref_key: "SetPasswordDialogRef",
1297
+ ref: a
1298
+ }, null, 512),
1299
+ l(tn, {
1300
+ ref_key: "EditPasswordDialogRef",
1301
+ ref: p
1302
+ }, null, 512)
1303
+ ]);
1304
+ };
1305
+ }
1306
+ }, an = /* @__PURE__ */ me(sn, [["__scopeId", "data-v-8631f578"]]), zn = {
1307
+ install(e) {
1308
+ e.component("st-user", an);
1309
+ }
1310
+ };
1311
+ export {
1312
+ zn as default
1313
+ };