jmash-core 0.1.17 → 0.1.19

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 (33) hide show
  1. package/dist/{401-B-xPz9LF.mjs → 401-CQMri0nX.mjs} +9 -9
  2. package/dist/{404-D6qLFrds.mjs → 404-CDfv-CCs.mjs} +4 -4
  3. package/dist/{BarChart-DUGSmZyQ.mjs → BarChart-CACxjw71.mjs} +6 -6
  4. package/dist/{index-CIsDsOWA.mjs → index-BD4Gujon.mjs} +9593 -9219
  5. package/dist/index-BLIB9EUa.mjs +2163 -0
  6. package/dist/{index-AwPbizZV.mjs → index-Dl15NUoZ.mjs} +21 -21
  7. package/dist/index-VxSky12H.mjs +257 -0
  8. package/dist/{index-DCziYkYK.mjs → index-dkuM7C9F.mjs} +14 -14
  9. package/dist/{index-CZJ3UhUM.mjs → index-gUMOTzZ1.mjs} +7 -7
  10. package/dist/index.mjs +61 -59
  11. package/dist/{profile-GQvC9C8o.mjs → profile-CeMFTyxu.mjs} +29 -29
  12. package/dist/{runAs-Dwg7Iuqd.mjs → runAs-CKJ26HTt.mjs} +1 -1
  13. package/dist/{runAs.vue_vue_type_script_setup_true_lang-BtQpSMZg.mjs → runAs.vue_vue_type_script_setup_true_lang-CIsxY_vn.mjs} +138 -138
  14. package/dist/style.css +1 -1
  15. package/dist/{types-BuuQJDxb.mjs → types-D9Z0uPWX.mjs} +10 -10
  16. package/dist/{updatePwd-5svDyP7G.mjs → updatePwd-D4kZMk8p.mjs} +1 -1
  17. package/dist/{updatePwd.vue_vue_type_script_setup_true_lang-C8rArYsn.mjs → updatePwd.vue_vue_type_script_setup_true_lang-C8mlen_N.mjs} +10 -10
  18. package/dts/src/api/auth/index.d.ts +2 -1
  19. package/dts/src/api/auth/types.d.ts +12 -0
  20. package/dts/src/api/change/index.d.ts +5 -0
  21. package/dts/src/api/change/types.d.ts +11 -5
  22. package/dts/src/components/ForgetPwd/index.vue.d.ts +6 -0
  23. package/dts/src/components/ForgotPwd/index.vue.d.ts +6 -0
  24. package/dts/src/components/GraphicValidate/index.vue.d.ts +8 -0
  25. package/dts/src/components/JmashMultiImageUpload/index.vue.d.ts +1 -1
  26. package/dts/src/components/NameValidate/index.vue.d.ts +63 -0
  27. package/dts/src/index.d.ts +4 -3
  28. package/dts/src/lang/package/zh-cn.d.ts +36 -1
  29. package/dts/src/layout/components/NavBar/components/ChangeWechatBind.vue.d.ts +6 -2
  30. package/dts/src/layout/components/NavBar/components/QrCode.vue.d.ts +18 -0
  31. package/package.json +1 -1
  32. package/dist/index-CNS2LvqZ.mjs +0 -244
  33. package/dist/index-Cb2jBye0.mjs +0 -1817
@@ -1,5 +1,5 @@
1
- import { createElementBlock as y, openBlock as k, createElementVNode as u, defineComponent as M, ref as I, reactive as f, resolveComponent as i, Fragment as $, createVNode as t, withCtx as l, createTextVNode as _, toDisplayString as C } from "vue";
2
- import { g as z, v, b as w, w as A, x as B } from "./index-CIsDsOWA.mjs";
1
+ import { createElementBlock as y, openBlock as k, createElementVNode as u, defineComponent as E, ref as I, reactive as f, resolveComponent as i, Fragment as F, createVNode as t, withCtx as l, createTextVNode as _, toDisplayString as C } from "vue";
2
+ import { A as M, v, a as w, B as $, C as z } from "./index-BD4Gujon.mjs";
3
3
  const N = {
4
4
  viewBox: "0 0 1024 1024",
5
5
  width: "1.2em",
@@ -17,7 +17,7 @@ function T(x, c) {
17
17
  }, null, -1)
18
18
  ]));
19
19
  }
20
- const q = { name: "ep-picture", render: T }, S = { class: "h-[40px]" }, L = { class: "image-slot" }, O = { class: "dialog-footer" }, Y = /* @__PURE__ */ M({
20
+ const q = { name: "ep-picture", render: T }, S = { class: "h-[40px]" }, L = { class: "image-slot" }, O = { class: "dialog-footer" }, Y = /* @__PURE__ */ E({
21
21
  __name: "types",
22
22
  setup(x) {
23
23
  const c = I(), m = f({
@@ -40,7 +40,7 @@ const q = { name: "ep-picture", render: T }, S = { class: "h-[40px]" }, L = { cl
40
40
  // ],
41
41
  });
42
42
  function b() {
43
- z().then(({ data: a }) => {
43
+ M().then(({ data: a }) => {
44
44
  o.captchaId = a.captchaId, c.value = a.base64Image, m.visible = !0, o.captchaCode = "";
45
45
  });
46
46
  }
@@ -61,7 +61,7 @@ const q = { name: "ep-picture", render: T }, S = { class: "h-[40px]" }, L = { cl
61
61
  directoryId: v.APP_DIRECTORY_ID,
62
62
  product: v.APP_PRODUCT
63
63
  };
64
- A(p).then(({ data: r }) => {
64
+ $(p).then(({ data: r }) => {
65
65
  console.log(r);
66
66
  const s = window.setInterval(() => {
67
67
  n.content = n.timers + "s后重新发送", n.timers--, n.disabled = !0, n.timers < 0 && (n.timers = 60, n.disabled = !1, n.content = "重新发送验证码", window.clearInterval(s));
@@ -79,13 +79,13 @@ const q = { name: "ep-picture", render: T }, S = { class: "h-[40px]" }, L = { cl
79
79
  clientId: v.APP_CLIENT_ID,
80
80
  scope: ""
81
81
  };
82
- B(a).then((e) => {
82
+ z(a).then((e) => {
83
83
  console.log(e);
84
84
  });
85
85
  }
86
86
  return (a, e) => {
87
- const p = i("el-input"), r = i("el-form-item"), s = i("el-button"), V = i("el-form"), U = q, E = i("el-image"), F = i("el-dialog");
88
- return k(), y($, null, [
87
+ const p = i("el-input"), r = i("el-form-item"), s = i("el-button"), V = i("el-form"), U = q, A = i("el-image"), B = i("el-dialog");
88
+ return k(), y(F, null, [
89
89
  t(V, {
90
90
  ref_key: "ruleFormRef",
91
91
  ref: g,
@@ -148,7 +148,7 @@ const q = { name: "ep-picture", render: T }, S = { class: "h-[40px]" }, L = { cl
148
148
  ]),
149
149
  _: 1
150
150
  }, 8, ["model", "rules"]),
151
- t(F, {
151
+ t(B, {
152
152
  title: "提示",
153
153
  modelValue: m.visible,
154
154
  "onUpdate:modelValue": e[4] || (e[4] = (d) => m.visible = d),
@@ -193,7 +193,7 @@ const q = { name: "ep-picture", render: T }, S = { class: "h-[40px]" }, L = { cl
193
193
  class: "w-[60%]"
194
194
  }, null, 8, ["modelValue", "placeholder"]),
195
195
  u("div", S, [
196
- t(E, {
196
+ t(A, {
197
197
  src: c.value,
198
198
  onClick: b,
199
199
  class: "w-[130px] h-[40px] cursor-pointer"
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./updatePwd.vue_vue_type_script_setup_true_lang-C8rArYsn.mjs";
1
+ import { _ as f } from "./updatePwd.vue_vue_type_script_setup_true_lang-C8mlen_N.mjs";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,8 +1,8 @@
1
- import { defineComponent as q, ref as v, toRefs as E, reactive as V, resolveComponent as i, createBlock as O, openBlock as A, unref as t, isRef as D, withCtx as n, createVNode as r, createElementVNode as U, createTextVNode as g, toDisplayString as _ } from "vue";
2
- import { ElMessage as B } from "element-plus";
3
- import { y as b, aD as I } from "./index-CIsDsOWA.mjs";
1
+ import { defineComponent as q, ref as v, toRefs as E, reactive as V, resolveComponent as i, createBlock as O, openBlock as A, unref as t, isRef as U, withCtx as n, createVNode as r, createElementVNode as B, createTextVNode as g, toDisplayString as _ } from "vue";
2
+ import { ElMessage as D } from "element-plus";
3
+ import { H as b, aJ as I } from "./index-BD4Gujon.mjs";
4
4
  import { useI18n as S } from "vue-i18n";
5
- const z = { class: "dialog-footer" }, G = /* @__PURE__ */ q({
5
+ const z = { class: "dialog-footer" }, T = /* @__PURE__ */ q({
6
6
  __name: "updatePwd",
7
7
  props: {
8
8
  pwdVisible: {
@@ -11,8 +11,8 @@ const z = { class: "dialog-footer" }, G = /* @__PURE__ */ q({
11
11
  }
12
12
  },
13
13
  emits: ["dialogActionChange"],
14
- setup(y, { emit: R }) {
15
- const { t: a } = S(), p = v(), N = y, { pwdVisible: u } = E(N), c = R;
14
+ setup(R, { emit: y }) {
15
+ const { t: a } = S(), p = v(), N = R, { pwdVisible: u } = E(N), c = y;
16
16
  let l = V({
17
17
  encodeOldPwd: "",
18
18
  encodeNewPwd: "",
@@ -34,7 +34,7 @@ const z = { class: "dialog-footer" }, G = /* @__PURE__ */ q({
34
34
  if (e) {
35
35
  let d = b(l.encodeOldPwd), w = b(l.encodeNewPwd);
36
36
  I(d, w).then((m) => {
37
- m.status === 200 && (B({
37
+ m.status === 200 && (D({
38
38
  message: a("password.successResetPwd"),
39
39
  type: "success"
40
40
  }), c("dialogActionChange", !1));
@@ -52,12 +52,12 @@ const z = { class: "dialog-footer" }, G = /* @__PURE__ */ q({
52
52
  return A(), O(C, {
53
53
  title: "修改密码",
54
54
  modelValue: t(u),
55
- "onUpdate:modelValue": e[3] || (e[3] = (s) => D(u) ? u.value = s : null),
55
+ "onUpdate:modelValue": e[3] || (e[3] = (s) => U(u) ? u.value = s : null),
56
56
  width: "500px",
57
57
  onClose: f
58
58
  }, {
59
59
  footer: n(() => [
60
- U("div", z, [
60
+ B("div", z, [
61
61
  r(P, { onClick: f }, {
62
62
  default: n(() => [
63
63
  g(_(o.$t("common.cancel")), 1)
@@ -142,5 +142,5 @@ const z = { class: "dialog-footer" }, G = /* @__PURE__ */ q({
142
142
  }
143
143
  });
144
144
  export {
145
- G as _
145
+ T as _
146
146
  };
@@ -1,5 +1,5 @@
1
1
  import type { AxiosPromise } from "axios";
2
- import type { CaptchaResult, LoginData, LoginResult, UserInfo, RolesPerms, LoginQrcodeResp, LoginQrcodeReq, MyOrganList, SendValidCodeReq, RegisterReq } from "./types";
2
+ import type { CaptchaResult, LoginData, LoginResult, UserInfo, RolesPerms, LoginQrcodeResp, LoginQrcodeReq, MyOrganList, SendValidCodeReq, RegisterReq, ForgotPhoneEmailReq } from "./types";
3
3
  /**
4
4
  * 登录API
5
5
  *
@@ -74,3 +74,4 @@ export declare function createLoginQrcode(): AxiosPromise<LoginQrcodeResp>;
74
74
  export declare function loginQrcode(data: LoginQrcodeReq): AxiosPromise<LoginResult>;
75
75
  export declare function loginOrganApi(data: string): AxiosPromise<LoginResult>;
76
76
  export declare function myorganList(): AxiosPromise<MyOrganList>;
77
+ export declare function forgotPhoneEmail(data: ForgotPhoneEmailReq): AxiosPromise<boolean>;
@@ -278,4 +278,16 @@ export interface SendValidCodeReq {
278
278
  product: string;
279
279
  sendValidCode: boolean;
280
280
  }
281
+ export interface ForgotPhoneEmailReq {
282
+ tenant?: string;
283
+ requestId: string;
284
+ directoryId?: string;
285
+ clientId?: string;
286
+ name: string;
287
+ validCode: string;
288
+ pwd: string;
289
+ repeatPwd: string;
290
+ captchaId?: string;
291
+ captchaCode?: string;
292
+ }
281
293
  export {};
@@ -2,6 +2,11 @@ import type { AxiosPromise } from "axios";
2
2
  import type { ChangeApi, PhoneEmailReq, WechatBindReq } from "./types";
3
3
  declare class ChangeApiImpl implements ChangeApi {
4
4
  phoneEmail(data: PhoneEmailReq): AxiosPromise<boolean>;
5
+ /**
6
+ * 绑定微信账号
7
+ * @param {WechatBindReq} data - 微信绑定请求参数
8
+ * @returns {AxiosPromise<boolean>} 返回绑定操作的结果Promise,成功时为true
9
+ */
5
10
  wechatBind(data: WechatBindReq): AxiosPromise<boolean>;
6
11
  }
7
12
  export declare const changeApi: ChangeApiImpl;
@@ -9,12 +9,18 @@ export interface PhoneEmailReq {
9
9
  oldValidCode: string;
10
10
  newName: string;
11
11
  newValidCode: string;
12
- captchaId: string;
13
- captchaCode: string;
12
+ oldName?: string;
13
+ oldCaptchaId?: string;
14
+ oldCaptchaCode?: string;
15
+ newCaptchaId?: string;
16
+ newCaptchaCode?: string;
14
17
  }
15
18
  export interface WechatBindReq {
16
19
  tenant?: string;
17
- requestId: string;
18
- validCode: string;
19
- authorizerAppid: string;
20
+ requestId?: string;
21
+ validCode?: string;
22
+ authorizerAppid?: string;
23
+ ticket?: string;
24
+ captchaId?: string;
25
+ captchaCode?: string;
20
26
  }
@@ -0,0 +1,6 @@
1
+ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
2
+ modelValue: globalThis.PropType<boolean>;
3
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
4
+ modelValue: globalThis.PropType<boolean>;
5
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ export default _default;
@@ -0,0 +1,6 @@
1
+ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
2
+ modelValue: globalThis.PropType<boolean>;
3
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
4
+ modelValue: globalThis.PropType<boolean>;
5
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ export default _default;
@@ -0,0 +1,8 @@
1
+ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
2
+ captchaId: globalThis.PropType<string>;
3
+ captchaCode: globalThis.PropType<string>;
4
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
5
+ captchaId: globalThis.PropType<string>;
6
+ captchaCode: globalThis.PropType<string>;
7
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ export default _default;
@@ -59,7 +59,7 @@ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropType
59
59
  width: number;
60
60
  pictureUrl: unknown[];
61
61
  height: number;
62
- listType: "picture" | "text" | "picture-card";
62
+ listType: "text" | "picture" | "picture-card";
63
63
  limit: number;
64
64
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
65
65
  export default _default;
@@ -0,0 +1,63 @@
1
+ import { type PropType } from "vue";
2
+ import type { FormInstance } from "element-plus";
3
+ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
4
+ modelValue: PropType<string>;
5
+ name: {
6
+ type: StringConstructor;
7
+ default: string;
8
+ };
9
+ captchaId: {
10
+ type: StringConstructor;
11
+ default: string;
12
+ };
13
+ captchaCode: {
14
+ type: StringConstructor;
15
+ default: string;
16
+ };
17
+ formRef: {
18
+ type: PropType<FormInstance>;
19
+ default: null;
20
+ };
21
+ placeholder: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ };
25
+ validateField: {
26
+ type: PropType<string[]>;
27
+ default: never[];
28
+ };
29
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
30
+ modelValue: PropType<string>;
31
+ name: {
32
+ type: StringConstructor;
33
+ default: string;
34
+ };
35
+ captchaId: {
36
+ type: StringConstructor;
37
+ default: string;
38
+ };
39
+ captchaCode: {
40
+ type: StringConstructor;
41
+ default: string;
42
+ };
43
+ formRef: {
44
+ type: PropType<FormInstance>;
45
+ default: null;
46
+ };
47
+ placeholder: {
48
+ type: StringConstructor;
49
+ default: string;
50
+ };
51
+ validateField: {
52
+ type: PropType<string[]>;
53
+ default: never[];
54
+ };
55
+ }>> & Readonly<{}>, {
56
+ validateField: string[];
57
+ name: string;
58
+ captchaId: string;
59
+ captchaCode: string;
60
+ formRef: FormInstance;
61
+ placeholder: string;
62
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
63
+ export default _default;
@@ -1,6 +1,6 @@
1
1
  export type { VueMetaEnv, TableColumn, TableSort, DialogRef, AppSettings, FileResponseReq, FilesReq, } from "./types";
2
2
  export type { EntityApi, EnumEntryReq, Entry, LayEntry, EntityReq, EntityModel, EntityList, EntityPage, EntityTotal, EntityKey, EntityKeyList, EntityCreateReq, EntityUpdateReq, EntityFormReq, EntityExportReq, EntityImportReq, } from "./api/types";
3
- export type { LoginData, LoginQrcodeResp, MyOrganList, MyOrganModel, RegisterReq, LoginResult, } from "./api/auth/types";
3
+ export type { LoginData, LoginQrcodeResp, MyOrganList, MyOrganModel, RegisterReq, LoginResult, LoginQrcodeReq, ForgotPhoneEmailReq, } from "./api/auth/types";
4
4
  import type { App } from "vue";
5
5
  export { menus, vueMetaEnv, imageUrl, defaultSettings, addViteMenus, addWebpackMenus, updateMetaEnv, updateViteMetaEnv, updateWebpackMetaEnv, addDynamicRoute, updateSettings, cssImageVar, } from "./settings";
6
6
  export { getQueryParams, clearEmpty, deepMerge } from "./utils/grpc";
@@ -9,7 +9,7 @@ export { request, axiosConfig };
9
9
  export { generateRandomKey, handlePreview } from "./utils/common";
10
10
  export { validatePhoneNumber, validatePhoneOrLandline, validateCreditCode, validateIDCard, validateEmail, } from "./utils/validation_utils";
11
11
  export { BizDict, BizLayDict, CustomBizDict, EnumDict, enumMapCache, EnableBizDict, } from "./api/index";
12
- export { getCaptchaApi, createLoginQrcode, selectDsdRoles, runAsUser, myorganList, loginOrganApi, registerApi, loginApi, } from "./api/auth";
12
+ export { getCaptchaApi, createLoginQrcode, selectDsdRoles, runAsUser, myorganList, loginOrganApi, registerApi, loginApi, forgotPhoneEmail, } from "./api/auth";
13
13
  export { netEncrypt } from "./utils/netsecret";
14
14
  export { fileApi } from "./api/file/index";
15
15
  export { routerUtil } from "./utils/route";
@@ -34,7 +34,8 @@ import "element-plus/theme-chalk/dark/css-vars.css";
34
34
  import "./styles/index.scss";
35
35
  import "uno.css";
36
36
  import RegisterForm from "./components/RegisterForm/index.vue";
37
- export { RegisterForm };
37
+ import ForgotPwd from "./components/ForgotPwd/index.vue";
38
+ export { RegisterForm, ForgotPwd };
38
39
  import type { IToolbarConfig, IEditorConfig, IDomEditor } from "@wangeditor-next/editor";
39
40
  export type { IToolbarConfig, IEditorConfig, IDomEditor };
40
41
  import "element-plus/theme-chalk/index.css";
@@ -160,7 +160,7 @@ declare const _default: {
160
160
  register: string;
161
161
  getValidCode: string;
162
162
  name: string;
163
- nemeMobileError: string;
163
+ phoneOrEmailError: string;
164
164
  nameRequired: string;
165
165
  captchaCode: string;
166
166
  captchaCodeRequired: string;
@@ -183,5 +183,40 @@ declare const _default: {
183
183
  pwdRules: string;
184
184
  comparePwd: string;
185
185
  };
186
+ change: {
187
+ oldName: string;
188
+ oldNameRequired: string;
189
+ oldCaptchaCode: string;
190
+ oldCaptchaCodeRequired: string;
191
+ oldValidCode: string;
192
+ oldValidCodeRequired: string;
193
+ newName: string;
194
+ newNameRequired: string;
195
+ newValidCode: string;
196
+ newValidCodeRequired: string;
197
+ nameError: string;
198
+ nameSuccess: string;
199
+ validCode: string;
200
+ validCodeRequired: string;
201
+ wechatBindSuccess: string;
202
+ pleaseScanCode: string;
203
+ };
204
+ forgot: {
205
+ forgot: string;
206
+ forgotSuccess: string;
207
+ name: string;
208
+ nameRequired: string;
209
+ captchaCode: string;
210
+ captchaCodeRequired: string;
211
+ validCode: string;
212
+ validCodeRequired: string;
213
+ nameError: string;
214
+ pwd: string;
215
+ pwdRequired: string;
216
+ repeatPwd: string;
217
+ repeatPwdRequired: string;
218
+ pwdRules: string;
219
+ comparePwd: string;
220
+ };
186
221
  };
187
222
  export default _default;
@@ -1,6 +1,10 @@
1
1
  declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
2
2
  modelValue: globalThis.PropType<boolean>;
3
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
3
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
+ next: (...args: any[]) => void;
5
+ }, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
4
6
  modelValue: globalThis.PropType<boolean>;
5
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
7
+ }>> & Readonly<{
8
+ onNext?: ((...args: any[]) => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
10
  export default _default;
@@ -0,0 +1,18 @@
1
+ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
2
+ modelValue: globalThis.PropType<boolean>;
3
+ validCode: {
4
+ type: StringConstructor;
5
+ required: true;
6
+ };
7
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ last: (...args: any[]) => void;
9
+ }, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
10
+ modelValue: globalThis.PropType<boolean>;
11
+ validCode: {
12
+ type: StringConstructor;
13
+ required: true;
14
+ };
15
+ }>> & Readonly<{
16
+ onLast?: ((...args: any[]) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
18
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jmash-core",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
4
4
  "private": false,
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dts/src/index.d.ts",
@@ -1,244 +0,0 @@
1
- import { v as b, u as g, b as H, o as F, e as G, h as J, y as X, g as Y, z as Z, i as ee } from "./index-CIsDsOWA.mjs";
2
- import { defineComponent as te, ref as c, computed as oe, watchEffect as le, resolveComponent as d, createElementBlock as se, openBlock as re, createElementVNode as o, createVNode as l, withDirectives as U, unref as k, withCtx as i, normalizeStyle as ae, vShow as D, withKeys as z, withModifiers as ne, createTextVNode as ie, toDisplayString as Q, normalizeClass as ue } from "vue";
3
- import ce from "./assets/0cda52992278af9e.png";
4
- import { useI18n as de } from "vue-i18n";
5
- import "element-plus";
6
- import { useRoute as pe, useRouter as me } from "vue-router";
7
- import fe from "./assets/09fcc36c527efda6.jpg";
8
- const ve = { class: "login-container" }, _e = { class: "absolute top-0 flex items-center justify-end px-5 h-20 w-full" }, ge = { class: "qrcode-container" }, he = ["src"], ye = { class: "flex justify-between items-center w-full" }, we = ["src"], Ce = { class: "bg-small" }, be = 992, ke = /* @__PURE__ */ te({
9
- __name: "index",
10
- setup(qe) {
11
- const { t: q } = de(), h = c(b.APP_ACTIVE), j = (e) => {
12
- e.props.name === "user" ? (C(), m()) : I(), h.value = e.props.name;
13
- }, s = c({
14
- scope: "",
15
- username: "",
16
- password: ""
17
- }), B = oe(() => {
18
- const e = g().language === "en" ? "Please enter " : "请输入";
19
- return {
20
- username: [
21
- {
22
- required: !0,
23
- trigger: "blur",
24
- message: `${e}${q("login.username")}`
25
- }
26
- ],
27
- password: [
28
- {
29
- required: !0,
30
- trigger: "blur",
31
- validator: (t, a, r) => {
32
- a.length < 5 ? r(new Error("The password can not be less than 5 digits")) : r();
33
- },
34
- message: `${e}${q("login.password")}`
35
- }
36
- ],
37
- captchaCode: [
38
- {
39
- required: !0,
40
- trigger: "blur",
41
- message: `${e}${q("login.captchaCode")}`
42
- }
43
- ]
44
- };
45
- }), V = c(!1), x = c(), P = pe(), E = me(), $ = H(), T = () => {
46
- var e;
47
- (e = x.value) == null || e.validate((t) => {
48
- t && (V.value = !0, $.login({ ...s.value, password: X(s.value.password) }).then(() => {
49
- const a = P.query, r = a.redirect ?? b.APP_REDIRECT, n = Object.keys(a).reduce(
50
- (p, _) => (_ !== "redirect" && (p[_] = a[_]), p),
51
- {}
52
- );
53
- E.push({ path: r, query: n }), m();
54
- }).catch(() => {
55
- m();
56
- }).finally(() => {
57
- V.value = !1;
58
- }));
59
- });
60
- }, R = c(""), m = () => {
61
- Y().then(({ data: e }) => {
62
- s.value.captchaKey = e.captchaId, R.value = e.base64Image;
63
- });
64
- };
65
- m();
66
- let y = setInterval(S, 3e3);
67
- const f = c({});
68
- function I() {
69
- Z().then(({ data: e }) => {
70
- f.value = e, v.value = !1, K(), y = setInterval(S, 3e3);
71
- });
72
- }
73
- h.value === "qrCode" && I();
74
- function S() {
75
- f.value.ticket && $.loginByQrcode({ ticket: f.value.ticket }).then(() => {
76
- C(), v.value = !1, f.value.qrcodeUrl = fe;
77
- const e = P.query, t = e.redirect ?? b.APP_REDIRECT, a = Object.keys(e).reduce(
78
- (r, n) => (n !== "redirect" && (r[n] = e[n]), r),
79
- {}
80
- );
81
- E.push({ path: t, query: a });
82
- });
83
- }
84
- let w = null;
85
- const v = c(!1);
86
- function C() {
87
- y && (clearInterval(y), y = null), w && (clearTimeout(w), w = null);
88
- }
89
- function K() {
90
- C(), w = setTimeout(() => {
91
- C(), v.value = !0;
92
- }, b.APP_TIMEOUT);
93
- }
94
- function L() {
95
- E.push({ path: "/register" });
96
- }
97
- const A = g(), { width: M } = F();
98
- return le(() => {
99
- M.value < be ? A.toggleDevice("mobile") : A.toggleDevice("desktop");
100
- }), (e, t) => {
101
- const a = G, r = d("el-tab-pane"), n = d("el-input"), p = d("el-form-item"), _ = d("el-button"), N = d("el-form"), O = d("el-tabs"), W = d("el-card");
102
- return re(), se("div", ve, [
103
- o("div", _e, [
104
- l(a, {
105
- class: "ml-2 cursor-pointer",
106
- style: { "font-size": "18px" }
107
- })
108
- ]),
109
- l(W, {
110
- device: k(g)().device,
111
- class: "z-1 !border-none w-100 !bg-transparent !rounded-4% <sm:w-83"
112
- }, {
113
- default: i(() => [
114
- l(O, {
115
- modelValue: h.value,
116
- "onUpdate:modelValue": t[3] || (t[3] = (u) => h.value = u),
117
- class: "demo-tabs",
118
- onTabClick: j
119
- }, {
120
- default: i(() => [
121
- l(r, {
122
- label: "扫码登录",
123
- name: "qrCode"
124
- }, {
125
- default: i(() => [
126
- o("div", ge, [
127
- o("img", {
128
- src: f.value.qrcodeUrl,
129
- style: ae({ opacity: v.value ? 0.02 : 1 }),
130
- alt: "二维码"
131
- }, null, 12, he),
132
- U(o("div", null, [
133
- t[4] || (t[4] = o("div", null, "二维码已过期", -1)),
134
- o("div", { onClick: I }, "点击刷新")
135
- ], 512), [
136
- [D, v.value]
137
- ])
138
- ]),
139
- t[5] || (t[5] = o("div", null, "微信扫一扫登录", -1))
140
- ]),
141
- _: 1,
142
- __: [5]
143
- }),
144
- l(r, {
145
- label: "账号登录",
146
- name: "user"
147
- }, {
148
- default: i(() => [
149
- l(N, {
150
- ref_key: "formRef",
151
- ref: x,
152
- model: s.value,
153
- rules: B.value
154
- }, {
155
- default: i(() => [
156
- l(p, { prop: "username" }, {
157
- default: i(() => [
158
- l(n, {
159
- modelValue: s.value.username,
160
- "onUpdate:modelValue": t[0] || (t[0] = (u) => s.value.username = u),
161
- placeholder: e.$t("login.username")
162
- }, null, 8, ["modelValue", "placeholder"])
163
- ]),
164
- _: 1
165
- }),
166
- l(p, { prop: "password" }, {
167
- default: i(() => [
168
- l(n, {
169
- modelValue: s.value.password,
170
- "onUpdate:modelValue": t[1] || (t[1] = (u) => s.value.password = u),
171
- placeholder: e.$t("login.password"),
172
- type: "password",
173
- "show-password": "",
174
- onKeyup: z(T, ["enter"])
175
- }, null, 8, ["modelValue", "placeholder"])
176
- ]),
177
- _: 1
178
- }),
179
- l(p, { prop: "captchaCode" }, {
180
- default: i(() => [
181
- o("div", ye, [
182
- l(n, {
183
- style: { width: "65%" },
184
- modelValue: s.value.captchaCode,
185
- "onUpdate:modelValue": t[2] || (t[2] = (u) => s.value.captchaCode = u),
186
- placeholder: e.$t("login.captchaCode"),
187
- onKeyup: z(T, ["enter"])
188
- }, null, 8, ["modelValue", "placeholder"]),
189
- o("img", {
190
- class: "flex-1 h-[40px] cursor-pointer ml-2",
191
- src: R.value,
192
- onClick: m,
193
- alt: "验证码"
194
- }, null, 8, we)
195
- ])
196
- ]),
197
- _: 1
198
- }),
199
- l(_, {
200
- loading: V.value,
201
- type: "primary",
202
- class: "w-full",
203
- onClick: ne(T, ["prevent"])
204
- }, {
205
- default: i(() => [
206
- ie(Q(e.$t("login.login")), 1)
207
- ]),
208
- _: 1
209
- }, 8, ["loading"])
210
- ]),
211
- _: 1
212
- }, 8, ["model", "rules"])
213
- ]),
214
- _: 1
215
- })
216
- ]),
217
- _: 1
218
- }, 8, ["modelValue"]),
219
- o("div", {
220
- class: "cursor-pointer register-btn",
221
- onClick: L
222
- }, " 没有密码,前往注册 ")
223
- ]),
224
- _: 1
225
- }, 8, ["device"]),
226
- U(o("div", Ce, [
227
- o("div", null, Q(k(J).title), 1),
228
- t[6] || (t[6] = o("img", {
229
- src: ce,
230
- alt: "login-bg-small"
231
- }, null, -1))
232
- ], 512), [
233
- [D, k(g)().device === "desktop"]
234
- ]),
235
- o("div", {
236
- class: ue(k(g)().device)
237
- }, " Copyright © 2018-2025 Apache 2.0 开源协议. ", 2)
238
- ]);
239
- };
240
- }
241
- }), Re = /* @__PURE__ */ ee(ke, [["__scopeId", "data-v-1469303e"]]);
242
- export {
243
- Re as default
244
- };