jmash-core 0.1.18 → 0.1.20

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.
@@ -1,130 +0,0 @@
1
- import { defineComponent as y, ref as i, useModel as u, resolveComponent as p, createElementBlock as g, openBlock as r, createVNode as I, createElementVNode as x, mergeModels as w, createBlock as f, withCtx as h, createTextVNode as v, toDisplayString as _ } from "vue";
2
- import { z as b, e as k, v as C, a as M, A as E, E as S } from "./index-BrR5K1DU.mjs";
3
- const A = { class: "flex justify-between items-center w-full" }, P = ["src"], R = /* @__PURE__ */ y({
4
- __name: "index",
5
- props: {
6
- captchaId: {},
7
- captchaIdModifiers: {},
8
- captchaCode: {},
9
- captchaCodeModifiers: {}
10
- },
11
- emits: ["update:captchaId", "update:captchaCode"],
12
- setup(l) {
13
- const n = i(""), a = u(l, "captchaId"), e = u(l, "captchaCode"), o = () => {
14
- b().then(({ data: c }) => {
15
- a.value = c.captchaId, n.value = c.base64Image;
16
- });
17
- };
18
- return o(), (c, t) => {
19
- const d = p("el-input");
20
- return r(), g("div", A, [
21
- I(d, {
22
- style: { width: "65%" },
23
- modelValue: e.value,
24
- "onUpdate:modelValue": t[0] || (t[0] = (s) => e.value = s),
25
- placeholder: c.$t("register.captchaCode")
26
- }, null, 8, ["modelValue", "placeholder"]),
27
- x("img", {
28
- class: "flex-1 h-[40px] cursor-pointer ml-2",
29
- src: n.value,
30
- onClick: o,
31
- alt: "验证码"
32
- }, null, 8, P)
33
- ]);
34
- };
35
- }
36
- }), F = /* @__PURE__ */ k(R, [["__scopeId", "data-v-266fcb9d"]]), $ = { class: "flex justify-between items-center w-full" }, T = /* @__PURE__ */ y({
37
- __name: "index",
38
- props: /* @__PURE__ */ w({
39
- name: {
40
- type: String,
41
- default: ""
42
- },
43
- captchaId: {
44
- type: String,
45
- default: ""
46
- },
47
- captchaCode: {
48
- type: String,
49
- default: ""
50
- },
51
- formRef: {
52
- type: Object,
53
- default: null
54
- },
55
- placeholder: {
56
- type: String,
57
- default: ""
58
- },
59
- validateField: {
60
- type: Array,
61
- default: []
62
- }
63
- }, {
64
- modelValue: {},
65
- modelModifiers: {}
66
- }),
67
- emits: ["update:modelValue"],
68
- setup(l) {
69
- const n = u(l, "modelValue"), a = l, e = i(59), o = i(null), c = () => {
70
- var t;
71
- e.value === 59 && ((t = a.formRef) == null || t.validateField(a.validateField, async (d) => {
72
- if (!d) return;
73
- const s = {
74
- name: a.name,
75
- captchaId: a.captchaId,
76
- captchaCode: a.captchaCode,
77
- tenant: M().user.tenant,
78
- sendValidCode: !0,
79
- directoryId: C.APP_DIRECTORY_ID,
80
- product: C.APP_PRODUCT
81
- };
82
- await E(s), S.success("验证码发送成功,请注意查收!"), o.value = setInterval(() => {
83
- if (e.value <= 0 && o.value) {
84
- clearInterval(o.value), e.value = 59;
85
- return;
86
- }
87
- e.value--;
88
- }, 1e3);
89
- }));
90
- };
91
- return (t, d) => {
92
- const s = p("el-input"), m = p("el-button");
93
- return r(), g("div", $, [
94
- I(s, {
95
- style: { width: "65%" },
96
- modelValue: n.value,
97
- "onUpdate:modelValue": d[0] || (d[0] = (V) => n.value = V),
98
- placeholder: l.placeholder,
99
- "show-word-limit": "",
100
- clearable: ""
101
- }, null, 8, ["modelValue", "placeholder"]),
102
- e.value !== 59 ? (r(), f(m, {
103
- key: 0,
104
- class: "flex-1 h-[40px] cursor-pointer",
105
- type: "info",
106
- disabled: ""
107
- }, {
108
- default: h(() => [
109
- v(_(t.$t("register.validCodeTime", { time: e.value })), 1)
110
- ]),
111
- _: 1
112
- })) : (r(), f(m, {
113
- key: 1,
114
- class: "flex-1 h-[40px] cursor-pointer ml-2",
115
- type: "primary",
116
- onClick: c
117
- }, {
118
- default: h(() => [
119
- v(_(t.$t("register.getValidCode")), 1)
120
- ]),
121
- _: 1
122
- }))
123
- ]);
124
- };
125
- }
126
- });
127
- export {
128
- F as _,
129
- T as a
130
- };