yuang-framework-ui-pc 1.1.146 → 1.1.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/core-components.d.ts +1 -0
- package/es/yu-framework-image-captcha-input/components/CaptchaIcon.d.ts +2 -0
- package/es/yu-framework-image-captcha-input/components/CaptchaIcon.js +36 -0
- package/es/yu-framework-image-captcha-input/index.d.ts +12 -0
- package/es/yu-framework-image-captcha-input/index.js +79 -0
- package/es/yu-framework-image-captcha-input/style.css +45 -0
- package/es/yu-framework-short-message-captcha-input/components/CaptchaIcon.d.ts +2 -0
- package/es/yu-framework-short-message-captcha-input/components/CaptchaIcon.js +36 -0
- package/es/yu-framework-short-message-captcha-input/index.d.ts +42 -0
- package/es/yu-framework-short-message-captcha-input/index.js +209 -0
- package/es/yu-framework-short-message-captcha-input/style/index.d.ts +1 -0
- package/es/yu-framework-short-message-captcha-input/style/index.js +1 -0
- package/es/yu-framework-short-message-captcha-input/style/index.scss +2 -0
- package/es/yu-framework-short-message-captcha-input/style.css +82 -0
- package/es/yu-framework-slider-captcha-dialog/components/SliderCaptcha.js +3 -4
- package/lib/core-components.d.ts +1 -0
- package/lib/yu-framework-image-captcha-input/components/CaptchaIcon.cjs +35 -0
- package/lib/yu-framework-image-captcha-input/components/CaptchaIcon.d.ts +2 -0
- package/lib/yu-framework-image-captcha-input/index.cjs +78 -0
- package/lib/yu-framework-image-captcha-input/index.d.ts +12 -0
- package/lib/yu-framework-image-captcha-input/style.css +45 -0
- package/lib/yu-framework-short-message-captcha-input/components/CaptchaIcon.cjs +35 -0
- package/lib/yu-framework-short-message-captcha-input/components/CaptchaIcon.d.ts +2 -0
- package/lib/yu-framework-short-message-captcha-input/index.cjs +208 -0
- package/lib/yu-framework-short-message-captcha-input/index.d.ts +42 -0
- package/lib/yu-framework-short-message-captcha-input/style/index.cjs +2 -0
- package/lib/yu-framework-short-message-captcha-input/style/index.d.ts +1 -0
- package/lib/yu-framework-short-message-captcha-input/style/index.scss +2 -0
- package/lib/yu-framework-short-message-captcha-input/style.css +82 -0
- package/lib/yu-framework-slider-captcha-dialog/components/SliderCaptcha.cjs +3 -4
- package/package.json +1 -1
package/es/core-components.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export { default as EleWatermark } from './ele-watermark/index';
|
|
|
53
53
|
export { default as EleTest } from './ele-test/index';
|
|
54
54
|
export { default as YuTest } from './yu-test/index';
|
|
55
55
|
export { default as YuFrameworkSliderCaptchaDialog } from './yu-framework-slider-captcha-dialog/index';
|
|
56
|
+
export { default as YuFrameworkShortMessageCaptchaINput } from './yu-framework-short-message-captcha-input/index';
|
|
56
57
|
export { default as YuFrameworkAttachmentUpload } from './yu-framework-attachment-upload/index';
|
|
57
58
|
export { default as YuUimsUserDialog } from './yu-uims-user-dialog/index';
|
|
58
59
|
export { default as YuUimsOrganizationDialog } from './yu-uims-organization-dialog/index';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createElementBlock, openBlock, createElementVNode } from "vue";
|
|
2
|
+
const _export_sfc = (sfc, props) => {
|
|
3
|
+
const target = sfc.__vccOpts || sfc;
|
|
4
|
+
for (const [key, val] of props) {
|
|
5
|
+
target[key] = val;
|
|
6
|
+
}
|
|
7
|
+
return target;
|
|
8
|
+
};
|
|
9
|
+
const _sfc_main = {};
|
|
10
|
+
const _hoisted_1 = {
|
|
11
|
+
t: "1781452980012",
|
|
12
|
+
class: "icon",
|
|
13
|
+
viewBox: "0 0 1024 1024",
|
|
14
|
+
version: "1.1",
|
|
15
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16
|
+
"p-id": "1662",
|
|
17
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
18
|
+
width: "32",
|
|
19
|
+
height: "32"
|
|
20
|
+
};
|
|
21
|
+
function _sfc_render(_ctx, _cache) {
|
|
22
|
+
return openBlock(), createElementBlock("svg", _hoisted_1, _cache[0] || (_cache[0] = [
|
|
23
|
+
createElementVNode("path", {
|
|
24
|
+
d: "M943.1 172c-2.4-0.2-245.1-25.3-413.8-147.8-5.1-3.7-11-5.6-17.3-5.6-6.2 0-12.2 1.9-17.3 5.6C326.9 146 83.3 171.8 80.9 172c-15.2 1.4-26.6 14.1-26.6 29.3 0 6.7 0.6 165.8 54.8 344.4 32.1 105.8 76.4 196.4 131.9 269.2 70.3 92.3 158.5 156 262 189.2 2.9 0.9 5.9 1.4 9 1.4s6.1-0.5 8.9-1.4c103.6-33.2 191.7-96.8 262-189.2 55.4-72.7 99.8-163.2 131.9-269.2 54.1-178.6 54.8-337.7 54.8-344.4C969.7 186.1 958.3 173.5 943.1 172zM910.1 227.2l-0.1 1.6c-2.9 58.1-13.4 174.4-51.4 299.9-66.7 220.1-183.1 360.1-346 416.1L512 945l-0.6-0.2C349 888.9 232.7 749.4 165.8 530.1c-39.8-130.5-49.4-254.2-51.8-301.4l-0.1-1.6 1.5-0.2c70.6-10.3 250.5-44.8 395.5-142.4l0.9-0.7 1 0.7C658 182.1 837.9 216.6 908.5 227L910.1 227.2z",
|
|
25
|
+
"p-id": "1663"
|
|
26
|
+
}, null, -1),
|
|
27
|
+
createElementVNode("path", {
|
|
28
|
+
d: "M641.8 351 467 580.3l-89-76.1c-5.3-4.5-12.1-7-19.1-7-8.6 0-16.8 3.7-22.4 10.3-10.5 12.3-9.1 31 3.3 41.5l112.7 96.4c5.2 4.4 12.4 7 19.6 7 0.9 0 1.8 0 2.7-0.1 8-0.8 15.4-5 20.3-11.4l193.7-254c4.8-6.3 6.8-14 5.7-21.8-1-7.8-5.1-14.7-11.3-19.5C670.1 335.6 651.6 338.1 641.8 351z",
|
|
29
|
+
"p-id": "1664"
|
|
30
|
+
}, null, -1)
|
|
31
|
+
]));
|
|
32
|
+
}
|
|
33
|
+
const CaptchaIcon = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
34
|
+
export {
|
|
35
|
+
CaptchaIcon as default
|
|
36
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {
|
|
2
|
+
changeImageCaptcha: () => void;
|
|
3
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
4
|
+
"update:modelValue": (...args: any[]) => void;
|
|
5
|
+
initSuccess: (...args: any[]) => void;
|
|
6
|
+
change: (...args: any[]) => void;
|
|
7
|
+
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
8
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
9
|
+
onInitSuccess?: ((...args: any[]) => any) | undefined;
|
|
10
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { defineComponent, ref, onMounted, watch, resolveComponent, createElementBlock, openBlock, createVNode, createElementVNode, createCommentVNode } from "vue";
|
|
2
|
+
import { http } from "yuang-framework-ui-common/lib/config/httpConfig";
|
|
3
|
+
import CaptchaIcon from "./components/CaptchaIcon";
|
|
4
|
+
const _hoisted_1 = { class: "yu-framework-image-captcha-group" };
|
|
5
|
+
const _hoisted_2 = ["src"];
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
...{ name: "YuFrameworkImageCaptchaInput" },
|
|
8
|
+
__name: "index",
|
|
9
|
+
emits: ["update:modelValue", "initSuccess", "change"],
|
|
10
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
11
|
+
const emit = __emit;
|
|
12
|
+
const imageCaptchaSrc = ref("");
|
|
13
|
+
const imageCaptchaForm = ref({
|
|
14
|
+
key: "",
|
|
15
|
+
captcha: ""
|
|
16
|
+
});
|
|
17
|
+
onMounted(() => {
|
|
18
|
+
init();
|
|
19
|
+
});
|
|
20
|
+
const init = () => {
|
|
21
|
+
changeImageCaptcha();
|
|
22
|
+
emit("initSuccess", {});
|
|
23
|
+
};
|
|
24
|
+
const changeImageCaptcha = () => {
|
|
25
|
+
imageCaptchaForm.value.captcha = "";
|
|
26
|
+
imageCaptchaSrc.value = "";
|
|
27
|
+
http.post("/framework-api/core/framework-captcha/createImageCaptcha").then((res) => {
|
|
28
|
+
imageCaptchaSrc.value = res.data.data.imageSrc;
|
|
29
|
+
imageCaptchaForm.value.key = res.data.data.key;
|
|
30
|
+
emit("change", { key: res.data.data.key });
|
|
31
|
+
}).catch((ex) => {
|
|
32
|
+
console.error(ex.message);
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
watch(
|
|
36
|
+
() => imageCaptchaForm.value.captcha,
|
|
37
|
+
(val) => {
|
|
38
|
+
emit("update:modelValue", val);
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
__expose({
|
|
42
|
+
changeImageCaptcha
|
|
43
|
+
});
|
|
44
|
+
return (_ctx, _cache) => {
|
|
45
|
+
const _component_el_input = resolveComponent("el-input");
|
|
46
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
47
|
+
createVNode(_component_el_input, {
|
|
48
|
+
ref: "captchaRef",
|
|
49
|
+
modelValue: imageCaptchaForm.value.captcha,
|
|
50
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => imageCaptchaForm.value.captcha = $event),
|
|
51
|
+
size: "large",
|
|
52
|
+
placeholder: "请输入验证码",
|
|
53
|
+
"prefix-icon": CaptchaIcon,
|
|
54
|
+
clearable: ""
|
|
55
|
+
}, null, 8, ["modelValue"]),
|
|
56
|
+
createElementVNode("div", {
|
|
57
|
+
class: "image-captcha",
|
|
58
|
+
onClick: changeImageCaptcha
|
|
59
|
+
}, [
|
|
60
|
+
imageCaptchaSrc.value ? (openBlock(), createElementBlock("img", {
|
|
61
|
+
key: 0,
|
|
62
|
+
src: imageCaptchaSrc.value
|
|
63
|
+
}, null, 8, _hoisted_2)) : createCommentVNode("", true)
|
|
64
|
+
])
|
|
65
|
+
]);
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
const _export_sfc = (sfc, props) => {
|
|
70
|
+
const target = sfc.__vccOpts || sfc;
|
|
71
|
+
for (const [key, val] of props) {
|
|
72
|
+
target[key] = val;
|
|
73
|
+
}
|
|
74
|
+
return target;
|
|
75
|
+
};
|
|
76
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-590b7861"]]);
|
|
77
|
+
export {
|
|
78
|
+
index as default
|
|
79
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
/* 验证码 */
|
|
3
|
+
.yu-framework-image-captcha-group {
|
|
4
|
+
&[data-v-590b7861] {
|
|
5
|
+
width: 100%;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
}
|
|
9
|
+
[data-v-590b7861] .el-input {
|
|
10
|
+
flex: 1;
|
|
11
|
+
}
|
|
12
|
+
[data-v-590b7861] .el-input__wrapper {
|
|
13
|
+
border-top-right-radius: 0px;
|
|
14
|
+
border-bottom-right-radius: 0px;
|
|
15
|
+
}
|
|
16
|
+
.image-captcha {
|
|
17
|
+
&[data-v-590b7861] {
|
|
18
|
+
flex-shrink: 0;
|
|
19
|
+
width: 108px;
|
|
20
|
+
height: 40px;
|
|
21
|
+
/*margin-left: 8px;*/
|
|
22
|
+
border-radius: var(--el-border-radius-base);
|
|
23
|
+
border: 1px solid var(--el-border-color);
|
|
24
|
+
|
|
25
|
+
border-top-left-radius: 0px;
|
|
26
|
+
border-bottom-left-radius: 0px;
|
|
27
|
+
border-left-color: #fff;
|
|
28
|
+
|
|
29
|
+
transition: border 0.2s;
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
background: #fff;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
}
|
|
35
|
+
img[data-v-590b7861] {
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 100%;
|
|
38
|
+
object-fit: contain;
|
|
39
|
+
display: block;
|
|
40
|
+
}
|
|
41
|
+
&[data-v-590b7861]:hover {
|
|
42
|
+
border-color: var(--el-color-primary);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createElementBlock, openBlock, createElementVNode } from "vue";
|
|
2
|
+
const _export_sfc = (sfc, props) => {
|
|
3
|
+
const target = sfc.__vccOpts || sfc;
|
|
4
|
+
for (const [key, val] of props) {
|
|
5
|
+
target[key] = val;
|
|
6
|
+
}
|
|
7
|
+
return target;
|
|
8
|
+
};
|
|
9
|
+
const _sfc_main = {};
|
|
10
|
+
const _hoisted_1 = {
|
|
11
|
+
t: "1781452980012",
|
|
12
|
+
class: "icon",
|
|
13
|
+
viewBox: "0 0 1024 1024",
|
|
14
|
+
version: "1.1",
|
|
15
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16
|
+
"p-id": "1662",
|
|
17
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
18
|
+
width: "32",
|
|
19
|
+
height: "32"
|
|
20
|
+
};
|
|
21
|
+
function _sfc_render(_ctx, _cache) {
|
|
22
|
+
return openBlock(), createElementBlock("svg", _hoisted_1, _cache[0] || (_cache[0] = [
|
|
23
|
+
createElementVNode("path", {
|
|
24
|
+
d: "M943.1 172c-2.4-0.2-245.1-25.3-413.8-147.8-5.1-3.7-11-5.6-17.3-5.6-6.2 0-12.2 1.9-17.3 5.6C326.9 146 83.3 171.8 80.9 172c-15.2 1.4-26.6 14.1-26.6 29.3 0 6.7 0.6 165.8 54.8 344.4 32.1 105.8 76.4 196.4 131.9 269.2 70.3 92.3 158.5 156 262 189.2 2.9 0.9 5.9 1.4 9 1.4s6.1-0.5 8.9-1.4c103.6-33.2 191.7-96.8 262-189.2 55.4-72.7 99.8-163.2 131.9-269.2 54.1-178.6 54.8-337.7 54.8-344.4C969.7 186.1 958.3 173.5 943.1 172zM910.1 227.2l-0.1 1.6c-2.9 58.1-13.4 174.4-51.4 299.9-66.7 220.1-183.1 360.1-346 416.1L512 945l-0.6-0.2C349 888.9 232.7 749.4 165.8 530.1c-39.8-130.5-49.4-254.2-51.8-301.4l-0.1-1.6 1.5-0.2c70.6-10.3 250.5-44.8 395.5-142.4l0.9-0.7 1 0.7C658 182.1 837.9 216.6 908.5 227L910.1 227.2z",
|
|
25
|
+
"p-id": "1663"
|
|
26
|
+
}, null, -1),
|
|
27
|
+
createElementVNode("path", {
|
|
28
|
+
d: "M641.8 351 467 580.3l-89-76.1c-5.3-4.5-12.1-7-19.1-7-8.6 0-16.8 3.7-22.4 10.3-10.5 12.3-9.1 31 3.3 41.5l112.7 96.4c5.2 4.4 12.4 7 19.6 7 0.9 0 1.8 0 2.7-0.1 8-0.8 15.4-5 20.3-11.4l193.7-254c4.8-6.3 6.8-14 5.7-21.8-1-7.8-5.1-14.7-11.3-19.5C670.1 335.6 651.6 338.1 641.8 351z",
|
|
29
|
+
"p-id": "1664"
|
|
30
|
+
}, null, -1)
|
|
31
|
+
]));
|
|
32
|
+
}
|
|
33
|
+
const CaptchaIcon = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
34
|
+
export {
|
|
35
|
+
CaptchaIcon as default
|
|
36
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
modelValue: String;
|
|
3
|
+
param?: Object;
|
|
4
|
+
}>, {
|
|
5
|
+
modelValue: string;
|
|
6
|
+
param: {};
|
|
7
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
"update:modelValue": (...args: any[]) => void;
|
|
9
|
+
initSuccess: (...args: any[]) => void;
|
|
10
|
+
change: (...args: any[]) => void;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
12
|
+
modelValue: String;
|
|
13
|
+
param?: Object;
|
|
14
|
+
}>, {
|
|
15
|
+
modelValue: string;
|
|
16
|
+
param: {};
|
|
17
|
+
}>>> & Readonly<{
|
|
18
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
onInitSuccess?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
param: Object;
|
|
23
|
+
modelValue: String;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
27
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
28
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
29
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
30
|
+
} : {
|
|
31
|
+
type: import('vue').PropType<T[K]>;
|
|
32
|
+
required: true;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
type __VLS_WithDefaults<P, D> = {
|
|
36
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
37
|
+
default: D[K];
|
|
38
|
+
}> : P[K];
|
|
39
|
+
};
|
|
40
|
+
type __VLS_Prettify<T> = {
|
|
41
|
+
[K in keyof T]: T[K];
|
|
42
|
+
} & {};
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { defineComponent, computed, ref, onMounted, watch, resolveComponent, createElementBlock, openBlock, createElementVNode, createVNode, normalizeClass, createBlock, withCtx, createTextVNode, toDisplayString, withDirectives, vShow, withKeys } from "vue";
|
|
2
|
+
import { ElMessage } from "element-plus";
|
|
3
|
+
import CaptchaIcon from "./components/CaptchaIcon";
|
|
4
|
+
import { http } from "yuang-framework-ui-common/lib/config/httpConfig";
|
|
5
|
+
const _hoisted_1 = { class: "captcha-container" };
|
|
6
|
+
const _hoisted_2 = { class: "captcha-card" };
|
|
7
|
+
const _hoisted_3 = ["src"];
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
...{ name: "YuFrameworkShortMessageCaptchaInput" },
|
|
10
|
+
__name: "index",
|
|
11
|
+
props: {
|
|
12
|
+
modelValue: { default: "" },
|
|
13
|
+
param: { default: {} }
|
|
14
|
+
},
|
|
15
|
+
emits: ["update:modelValue", "initSuccess", "change"],
|
|
16
|
+
setup(__props, { emit: __emit }) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
const emit = __emit;
|
|
19
|
+
const componentParam = computed(() => ({
|
|
20
|
+
type: "type",
|
|
21
|
+
inputSize: "large",
|
|
22
|
+
isShowIcon: true,
|
|
23
|
+
isShowInput: true,
|
|
24
|
+
...props.param
|
|
25
|
+
}));
|
|
26
|
+
const captchaRules = ref([{ required: true, message: "请输入验证码" }]);
|
|
27
|
+
const isShowCaptcha = ref(false);
|
|
28
|
+
const imageSrc = ref("");
|
|
29
|
+
const captchaTimes = ref(0);
|
|
30
|
+
const inputCaptcha = ref("");
|
|
31
|
+
const imageCaptchaForm = ref({
|
|
32
|
+
key: "",
|
|
33
|
+
captcha: ""
|
|
34
|
+
});
|
|
35
|
+
onMounted(() => {
|
|
36
|
+
init();
|
|
37
|
+
});
|
|
38
|
+
watch(inputCaptcha, (val) => {
|
|
39
|
+
emit("update:modelValue", val);
|
|
40
|
+
});
|
|
41
|
+
const init = () => {
|
|
42
|
+
if (!["large", "medium"].includes(componentParam.value.inputSize)) {
|
|
43
|
+
ElMessage.error(`参数[inputSize]值[${componentParam.value.inputSize}]未知`);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
emit("initSuccess", {});
|
|
47
|
+
};
|
|
48
|
+
const showCaptcha = () => {
|
|
49
|
+
inputCaptcha.value = "";
|
|
50
|
+
imageCaptchaForm.value.captcha = "";
|
|
51
|
+
const mobile = componentParam.value.mobile;
|
|
52
|
+
if (!mobile) {
|
|
53
|
+
return ElMessage.error("请输入手机号码");
|
|
54
|
+
}
|
|
55
|
+
if (mobile.trim().length !== 11) {
|
|
56
|
+
return ElMessage.error("手机号码格式不正确");
|
|
57
|
+
}
|
|
58
|
+
changeCaptcha();
|
|
59
|
+
isShowCaptcha.value = true;
|
|
60
|
+
};
|
|
61
|
+
const changeCaptcha = () => {
|
|
62
|
+
imageCaptchaForm.value.captcha = "";
|
|
63
|
+
imageSrc.value = "";
|
|
64
|
+
http.post("/framework-api/core/framework-captcha/createImageCaptcha").then((res) => {
|
|
65
|
+
imageSrc.value = res.data.data.imageSrc;
|
|
66
|
+
imageCaptchaForm.value.key = res.data.data.key;
|
|
67
|
+
}).catch((ex) => {
|
|
68
|
+
console.error(ex.message);
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
const callCaptchaTimes = () => {
|
|
72
|
+
if (captchaTimes.value !== 0) return;
|
|
73
|
+
captchaTimes.value = 60;
|
|
74
|
+
startCaptchaTimes();
|
|
75
|
+
};
|
|
76
|
+
const startCaptchaTimes = () => {
|
|
77
|
+
if (captchaTimes.value > 0) {
|
|
78
|
+
captchaTimes.value--;
|
|
79
|
+
setTimeout(startCaptchaTimes, 1e3);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
const sendShortMessageCaptcha = () => {
|
|
83
|
+
if (!imageCaptchaForm.value.captcha) {
|
|
84
|
+
return ElMessage.error("请输入图形验证码");
|
|
85
|
+
}
|
|
86
|
+
let data = {
|
|
87
|
+
mobile: componentParam.value.mobile,
|
|
88
|
+
imageCaptcha: imageCaptchaForm.value
|
|
89
|
+
};
|
|
90
|
+
http.post(`/framework-api/core/framework-captcha/createShortMessageCaptcha`, data).then((res) => {
|
|
91
|
+
callCaptchaTimes();
|
|
92
|
+
emit("change", { key: res.data.data.key });
|
|
93
|
+
ElMessage.success(res.data.message);
|
|
94
|
+
isShowCaptcha.value = false;
|
|
95
|
+
}).catch((ex) => {
|
|
96
|
+
imageCaptchaForm.value.captcha = "";
|
|
97
|
+
changeCaptcha();
|
|
98
|
+
console.error(ex.message);
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
return (_ctx, _cache) => {
|
|
102
|
+
const _component_el_input = resolveComponent("el-input");
|
|
103
|
+
const _component_el_button = resolveComponent("el-button");
|
|
104
|
+
const _component_ele_dialog = resolveComponent("ele-dialog");
|
|
105
|
+
return openBlock(), createElementBlock("div", null, [
|
|
106
|
+
createElementVNode("div", {
|
|
107
|
+
class: normalizeClass(`mis-form-item-${componentParam.value.inputSize}-group`)
|
|
108
|
+
}, [
|
|
109
|
+
createVNode(_component_el_input, {
|
|
110
|
+
name: "验证码",
|
|
111
|
+
placeholder: "请输入验证码",
|
|
112
|
+
modelValue: inputCaptcha.value,
|
|
113
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputCaptcha.value = $event),
|
|
114
|
+
"prefix-icon": componentParam.value.isShowIcon ? CaptchaIcon : "",
|
|
115
|
+
rules: captchaRules.value,
|
|
116
|
+
autocomplete: "off"
|
|
117
|
+
}, null, 8, ["modelValue", "prefix-icon", "rules"]),
|
|
118
|
+
captchaTimes.value === 0 ? (openBlock(), createBlock(_component_el_button, {
|
|
119
|
+
type: "primary",
|
|
120
|
+
key: "can-click",
|
|
121
|
+
class: normalizeClass(`show-captcha-${componentParam.value.inputSize}`),
|
|
122
|
+
onClick: showCaptcha
|
|
123
|
+
}, {
|
|
124
|
+
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
125
|
+
createTextVNode(" 发送验证码 ")
|
|
126
|
+
])),
|
|
127
|
+
_: 1,
|
|
128
|
+
__: [4]
|
|
129
|
+
}, 8, ["class"])) : (openBlock(), createBlock(_component_el_button, {
|
|
130
|
+
type: "primary",
|
|
131
|
+
size: "small",
|
|
132
|
+
disabled: "",
|
|
133
|
+
key: "forbidden-click",
|
|
134
|
+
class: normalizeClass(`show-captcha-times-${componentParam.value.inputSize}`)
|
|
135
|
+
}, {
|
|
136
|
+
default: withCtx(() => [
|
|
137
|
+
createTextVNode(toDisplayString(captchaTimes.value) + "秒后再次发送 ", 1)
|
|
138
|
+
]),
|
|
139
|
+
_: 1
|
|
140
|
+
}, 8, ["class"]))
|
|
141
|
+
], 2),
|
|
142
|
+
createVNode(_component_ele_dialog, {
|
|
143
|
+
modelValue: isShowCaptcha.value,
|
|
144
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isShowCaptcha.value = $event),
|
|
145
|
+
title: "发送验证码",
|
|
146
|
+
width: "400px"
|
|
147
|
+
}, {
|
|
148
|
+
footer: withCtx(() => [
|
|
149
|
+
createVNode(_component_el_button, {
|
|
150
|
+
onClick: _cache[2] || (_cache[2] = ($event) => isShowCaptcha.value = false)
|
|
151
|
+
}, {
|
|
152
|
+
default: withCtx(() => _cache[5] || (_cache[5] = [
|
|
153
|
+
createTextVNode("取消")
|
|
154
|
+
])),
|
|
155
|
+
_: 1,
|
|
156
|
+
__: [5]
|
|
157
|
+
}),
|
|
158
|
+
createVNode(_component_el_button, {
|
|
159
|
+
type: "primary",
|
|
160
|
+
onClick: sendShortMessageCaptcha
|
|
161
|
+
}, {
|
|
162
|
+
default: withCtx(() => _cache[6] || (_cache[6] = [
|
|
163
|
+
createTextVNode("立即发送")
|
|
164
|
+
])),
|
|
165
|
+
_: 1,
|
|
166
|
+
__: [6]
|
|
167
|
+
})
|
|
168
|
+
]),
|
|
169
|
+
default: withCtx(() => [
|
|
170
|
+
createElementVNode("div", _hoisted_1, [
|
|
171
|
+
createElementVNode("div", _hoisted_2, [
|
|
172
|
+
withDirectives(createElementVNode("img", {
|
|
173
|
+
src: imageSrc.value,
|
|
174
|
+
onClick: changeCaptcha,
|
|
175
|
+
class: "captcha-image",
|
|
176
|
+
alt: "验证码加载中"
|
|
177
|
+
}, null, 8, _hoisted_3), [
|
|
178
|
+
[vShow, imageSrc.value]
|
|
179
|
+
])
|
|
180
|
+
]),
|
|
181
|
+
createVNode(_component_el_input, {
|
|
182
|
+
modelValue: imageCaptchaForm.value.captcha,
|
|
183
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => imageCaptchaForm.value.captcha = $event),
|
|
184
|
+
class: "captcha-input",
|
|
185
|
+
label: "图形验证码",
|
|
186
|
+
clearable: "",
|
|
187
|
+
placeholder: "请输入图形验证码",
|
|
188
|
+
required: "",
|
|
189
|
+
onKeyup: withKeys(changeCaptcha, ["enter"])
|
|
190
|
+
}, null, 8, ["modelValue"])
|
|
191
|
+
])
|
|
192
|
+
]),
|
|
193
|
+
_: 1
|
|
194
|
+
}, 8, ["modelValue"])
|
|
195
|
+
]);
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
const _export_sfc = (sfc, props) => {
|
|
200
|
+
const target = sfc.__vccOpts || sfc;
|
|
201
|
+
for (const [key, val] of props) {
|
|
202
|
+
target[key] = val;
|
|
203
|
+
}
|
|
204
|
+
return target;
|
|
205
|
+
};
|
|
206
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-07f77e18"]]);
|
|
207
|
+
export {
|
|
208
|
+
index as default
|
|
209
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.scss";
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
.mis-form-item-group[data-v-07f77e18] input {
|
|
2
|
+
border: 0px;
|
|
3
|
+
}
|
|
4
|
+
.show-captcha-large[data-v-07f77e18] {
|
|
5
|
+
height: 32px;
|
|
6
|
+
line-height: 0px;
|
|
7
|
+
width: 140px;
|
|
8
|
+
margin-right: 3px;
|
|
9
|
+
text-align: center;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
font-size: 12px;
|
|
12
|
+
font-weight: 400;
|
|
13
|
+
}
|
|
14
|
+
.show-captcha-times-large[data-v-07f77e18] {
|
|
15
|
+
height: 32px;
|
|
16
|
+
width: 140px;
|
|
17
|
+
margin-right: 3px;
|
|
18
|
+
text-align: center;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
font-size: 12px;
|
|
21
|
+
}
|
|
22
|
+
.show-captcha-medium[data-v-07f77e18] {
|
|
23
|
+
height: 30px;
|
|
24
|
+
width: 140px;
|
|
25
|
+
margin-right: 2px;
|
|
26
|
+
text-align: center;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
font-size: 12px;
|
|
29
|
+
font-weight: 400;
|
|
30
|
+
}
|
|
31
|
+
.show-captcha-times-medium[data-v-07f77e18] {
|
|
32
|
+
height: 30px;
|
|
33
|
+
width: 140px;
|
|
34
|
+
margin-right: 3px;
|
|
35
|
+
text-align: center;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
font-size: 12px;
|
|
38
|
+
}
|
|
39
|
+
.captcha-container[data-v-07f77e18] {
|
|
40
|
+
height: 170px;
|
|
41
|
+
width: 250px;
|
|
42
|
+
margin: 10px auto;
|
|
43
|
+
}
|
|
44
|
+
.captcha-container .captcha-card[data-v-07f77e18] {
|
|
45
|
+
height: 50px;
|
|
46
|
+
width: 100%;
|
|
47
|
+
margin: 32px 0px;
|
|
48
|
+
text-align: center;
|
|
49
|
+
}
|
|
50
|
+
.captcha-container .captcha-image[data-v-07f77e18] {
|
|
51
|
+
height: 50px;
|
|
52
|
+
width: 100%;
|
|
53
|
+
border-radius: 4px;
|
|
54
|
+
border: 1px solid #dcdfe6;
|
|
55
|
+
text-align: center;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
}
|
|
58
|
+
.captcha-container .captcha-input[data-v-07f77e18] .el-input__inner {
|
|
59
|
+
height: 50px;
|
|
60
|
+
font-size: 16px;
|
|
61
|
+
}
|
|
62
|
+
.icon-validate-code[data-v-07f77e18] {
|
|
63
|
+
margin-left: 4px;
|
|
64
|
+
}
|
|
65
|
+
.mis-form-item-large-group[data-v-07f77e18] {
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
}
|
|
69
|
+
.mis-form-item-large-group[data-v-07f77e18] .el-input__wrapper {
|
|
70
|
+
border-top-right-radius: 0px;
|
|
71
|
+
border-bottom-right-radius: 0px;
|
|
72
|
+
}
|
|
73
|
+
.mis-form-item-large-group[data-v-07f77e18] .el-input__inner {
|
|
74
|
+
border: 0px;
|
|
75
|
+
}
|
|
76
|
+
.mis-form-item-large-group[data-v-07f77e18] .el-button {
|
|
77
|
+
border-top-left-radius: 0px;
|
|
78
|
+
border-bottom-left-radius: 0px;
|
|
79
|
+
}
|
|
80
|
+
.mis-form-item-medium-group[data-v-07f77e18] .el-input__inner {
|
|
81
|
+
border: 0px;
|
|
82
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, onMounted, nextTick, createElementBlock, openBlock, createElementVNode, createTextVNode, createVNode, unref, normalizeStyle, createCommentVNode, normalizeClass, toDisplayString, createBlock } from "vue";
|
|
2
2
|
import { http } from "yuang-framework-ui-common/lib/config/httpConfig";
|
|
3
|
-
import { application } from "yuang-framework-ui-common/lib/config/applicationConfig";
|
|
4
3
|
import { RefreshRight, CircleClose } from "@element-plus/icons-vue";
|
|
5
4
|
import { SliderArrowStatic, SliderArrowSlide } from "../../icons";
|
|
6
5
|
const _hoisted_1 = { class: "yu-framework-slider-captcha" };
|
|
@@ -55,7 +54,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
55
54
|
getCaptcha();
|
|
56
55
|
};
|
|
57
56
|
const getCaptcha = () => {
|
|
58
|
-
http.
|
|
57
|
+
http.post(`/framework-api/core/framework-captcha/createSliderCaptcha`, {}).then((res) => {
|
|
59
58
|
key.value = res.data.data.key;
|
|
60
59
|
block.value.src = res.data.data.blockSrc;
|
|
61
60
|
block.value.style.top = res.data.data.blockY + "px";
|
|
@@ -144,11 +143,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
144
143
|
if (!turingTest()) {
|
|
145
144
|
verifyFailEvent();
|
|
146
145
|
} else {
|
|
147
|
-
let
|
|
146
|
+
let data = {
|
|
148
147
|
key: key.value,
|
|
149
148
|
captcha: moveLength
|
|
150
149
|
};
|
|
151
|
-
http.
|
|
150
|
+
http.post(`/framework-api/core/framework-captcha/validateSliderCaptcha`, data).then((res) => {
|
|
152
151
|
verifySuccessEvent();
|
|
153
152
|
setTimeout(() => {
|
|
154
153
|
emit("success", { key: key.value, value: moveLength });
|
package/lib/core-components.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export { default as EleWatermark } from './ele-watermark/index';
|
|
|
53
53
|
export { default as EleTest } from './ele-test/index';
|
|
54
54
|
export { default as YuTest } from './yu-test/index';
|
|
55
55
|
export { default as YuFrameworkSliderCaptchaDialog } from './yu-framework-slider-captcha-dialog/index';
|
|
56
|
+
export { default as YuFrameworkShortMessageCaptchaINput } from './yu-framework-short-message-captcha-input/index';
|
|
56
57
|
export { default as YuFrameworkAttachmentUpload } from './yu-framework-attachment-upload/index';
|
|
57
58
|
export { default as YuUimsUserDialog } from './yu-uims-user-dialog/index';
|
|
58
59
|
export { default as YuUimsOrganizationDialog } from './yu-uims-organization-dialog/index';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const _export_sfc = (sfc, props) => {
|
|
4
|
+
const target = sfc.__vccOpts || sfc;
|
|
5
|
+
for (const [key, val] of props) {
|
|
6
|
+
target[key] = val;
|
|
7
|
+
}
|
|
8
|
+
return target;
|
|
9
|
+
};
|
|
10
|
+
const _sfc_main = {};
|
|
11
|
+
const _hoisted_1 = {
|
|
12
|
+
t: "1781452980012",
|
|
13
|
+
class: "icon",
|
|
14
|
+
viewBox: "0 0 1024 1024",
|
|
15
|
+
version: "1.1",
|
|
16
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17
|
+
"p-id": "1662",
|
|
18
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
19
|
+
width: "32",
|
|
20
|
+
height: "32"
|
|
21
|
+
};
|
|
22
|
+
function _sfc_render(_ctx, _cache) {
|
|
23
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1, _cache[0] || (_cache[0] = [
|
|
24
|
+
vue.createElementVNode("path", {
|
|
25
|
+
d: "M943.1 172c-2.4-0.2-245.1-25.3-413.8-147.8-5.1-3.7-11-5.6-17.3-5.6-6.2 0-12.2 1.9-17.3 5.6C326.9 146 83.3 171.8 80.9 172c-15.2 1.4-26.6 14.1-26.6 29.3 0 6.7 0.6 165.8 54.8 344.4 32.1 105.8 76.4 196.4 131.9 269.2 70.3 92.3 158.5 156 262 189.2 2.9 0.9 5.9 1.4 9 1.4s6.1-0.5 8.9-1.4c103.6-33.2 191.7-96.8 262-189.2 55.4-72.7 99.8-163.2 131.9-269.2 54.1-178.6 54.8-337.7 54.8-344.4C969.7 186.1 958.3 173.5 943.1 172zM910.1 227.2l-0.1 1.6c-2.9 58.1-13.4 174.4-51.4 299.9-66.7 220.1-183.1 360.1-346 416.1L512 945l-0.6-0.2C349 888.9 232.7 749.4 165.8 530.1c-39.8-130.5-49.4-254.2-51.8-301.4l-0.1-1.6 1.5-0.2c70.6-10.3 250.5-44.8 395.5-142.4l0.9-0.7 1 0.7C658 182.1 837.9 216.6 908.5 227L910.1 227.2z",
|
|
26
|
+
"p-id": "1663"
|
|
27
|
+
}, null, -1),
|
|
28
|
+
vue.createElementVNode("path", {
|
|
29
|
+
d: "M641.8 351 467 580.3l-89-76.1c-5.3-4.5-12.1-7-19.1-7-8.6 0-16.8 3.7-22.4 10.3-10.5 12.3-9.1 31 3.3 41.5l112.7 96.4c5.2 4.4 12.4 7 19.6 7 0.9 0 1.8 0 2.7-0.1 8-0.8 15.4-5 20.3-11.4l193.7-254c4.8-6.3 6.8-14 5.7-21.8-1-7.8-5.1-14.7-11.3-19.5C670.1 335.6 651.6 338.1 641.8 351z",
|
|
30
|
+
"p-id": "1664"
|
|
31
|
+
}, null, -1)
|
|
32
|
+
]));
|
|
33
|
+
}
|
|
34
|
+
const CaptchaIcon = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
35
|
+
module.exports = CaptchaIcon;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const httpConfig = require("yuang-framework-ui-common/lib/config/httpConfig");
|
|
4
|
+
const CaptchaIcon = require("./components/CaptchaIcon");
|
|
5
|
+
const _hoisted_1 = { class: "yu-framework-image-captcha-group" };
|
|
6
|
+
const _hoisted_2 = ["src"];
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
8
|
+
...{ name: "YuFrameworkImageCaptchaInput" },
|
|
9
|
+
__name: "index",
|
|
10
|
+
emits: ["update:modelValue", "initSuccess", "change"],
|
|
11
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
12
|
+
const emit = __emit;
|
|
13
|
+
const imageCaptchaSrc = vue.ref("");
|
|
14
|
+
const imageCaptchaForm = vue.ref({
|
|
15
|
+
key: "",
|
|
16
|
+
captcha: ""
|
|
17
|
+
});
|
|
18
|
+
vue.onMounted(() => {
|
|
19
|
+
init();
|
|
20
|
+
});
|
|
21
|
+
const init = () => {
|
|
22
|
+
changeImageCaptcha();
|
|
23
|
+
emit("initSuccess", {});
|
|
24
|
+
};
|
|
25
|
+
const changeImageCaptcha = () => {
|
|
26
|
+
imageCaptchaForm.value.captcha = "";
|
|
27
|
+
imageCaptchaSrc.value = "";
|
|
28
|
+
httpConfig.http.post("/framework-api/core/framework-captcha/createImageCaptcha").then((res) => {
|
|
29
|
+
imageCaptchaSrc.value = res.data.data.imageSrc;
|
|
30
|
+
imageCaptchaForm.value.key = res.data.data.key;
|
|
31
|
+
emit("change", { key: res.data.data.key });
|
|
32
|
+
}).catch((ex) => {
|
|
33
|
+
console.error(ex.message);
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
vue.watch(
|
|
37
|
+
() => imageCaptchaForm.value.captcha,
|
|
38
|
+
(val) => {
|
|
39
|
+
emit("update:modelValue", val);
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
__expose({
|
|
43
|
+
changeImageCaptcha
|
|
44
|
+
});
|
|
45
|
+
return (_ctx, _cache) => {
|
|
46
|
+
const _component_el_input = vue.resolveComponent("el-input");
|
|
47
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
48
|
+
vue.createVNode(_component_el_input, {
|
|
49
|
+
ref: "captchaRef",
|
|
50
|
+
modelValue: imageCaptchaForm.value.captcha,
|
|
51
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => imageCaptchaForm.value.captcha = $event),
|
|
52
|
+
size: "large",
|
|
53
|
+
placeholder: "请输入验证码",
|
|
54
|
+
"prefix-icon": CaptchaIcon,
|
|
55
|
+
clearable: ""
|
|
56
|
+
}, null, 8, ["modelValue"]),
|
|
57
|
+
vue.createElementVNode("div", {
|
|
58
|
+
class: "image-captcha",
|
|
59
|
+
onClick: changeImageCaptcha
|
|
60
|
+
}, [
|
|
61
|
+
imageCaptchaSrc.value ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
62
|
+
key: 0,
|
|
63
|
+
src: imageCaptchaSrc.value
|
|
64
|
+
}, null, 8, _hoisted_2)) : vue.createCommentVNode("", true)
|
|
65
|
+
])
|
|
66
|
+
]);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
const _export_sfc = (sfc, props) => {
|
|
71
|
+
const target = sfc.__vccOpts || sfc;
|
|
72
|
+
for (const [key, val] of props) {
|
|
73
|
+
target[key] = val;
|
|
74
|
+
}
|
|
75
|
+
return target;
|
|
76
|
+
};
|
|
77
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-590b7861"]]);
|
|
78
|
+
module.exports = index;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {
|
|
2
|
+
changeImageCaptcha: () => void;
|
|
3
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
4
|
+
"update:modelValue": (...args: any[]) => void;
|
|
5
|
+
initSuccess: (...args: any[]) => void;
|
|
6
|
+
change: (...args: any[]) => void;
|
|
7
|
+
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
8
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
9
|
+
onInitSuccess?: ((...args: any[]) => any) | undefined;
|
|
10
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
/* 验证码 */
|
|
3
|
+
.yu-framework-image-captcha-group {
|
|
4
|
+
&[data-v-590b7861] {
|
|
5
|
+
width: 100%;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
}
|
|
9
|
+
[data-v-590b7861] .el-input {
|
|
10
|
+
flex: 1;
|
|
11
|
+
}
|
|
12
|
+
[data-v-590b7861] .el-input__wrapper {
|
|
13
|
+
border-top-right-radius: 0px;
|
|
14
|
+
border-bottom-right-radius: 0px;
|
|
15
|
+
}
|
|
16
|
+
.image-captcha {
|
|
17
|
+
&[data-v-590b7861] {
|
|
18
|
+
flex-shrink: 0;
|
|
19
|
+
width: 108px;
|
|
20
|
+
height: 40px;
|
|
21
|
+
/*margin-left: 8px;*/
|
|
22
|
+
border-radius: var(--el-border-radius-base);
|
|
23
|
+
border: 1px solid var(--el-border-color);
|
|
24
|
+
|
|
25
|
+
border-top-left-radius: 0px;
|
|
26
|
+
border-bottom-left-radius: 0px;
|
|
27
|
+
border-left-color: #fff;
|
|
28
|
+
|
|
29
|
+
transition: border 0.2s;
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
background: #fff;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
}
|
|
35
|
+
img[data-v-590b7861] {
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 100%;
|
|
38
|
+
object-fit: contain;
|
|
39
|
+
display: block;
|
|
40
|
+
}
|
|
41
|
+
&[data-v-590b7861]:hover {
|
|
42
|
+
border-color: var(--el-color-primary);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const _export_sfc = (sfc, props) => {
|
|
4
|
+
const target = sfc.__vccOpts || sfc;
|
|
5
|
+
for (const [key, val] of props) {
|
|
6
|
+
target[key] = val;
|
|
7
|
+
}
|
|
8
|
+
return target;
|
|
9
|
+
};
|
|
10
|
+
const _sfc_main = {};
|
|
11
|
+
const _hoisted_1 = {
|
|
12
|
+
t: "1781452980012",
|
|
13
|
+
class: "icon",
|
|
14
|
+
viewBox: "0 0 1024 1024",
|
|
15
|
+
version: "1.1",
|
|
16
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17
|
+
"p-id": "1662",
|
|
18
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
19
|
+
width: "32",
|
|
20
|
+
height: "32"
|
|
21
|
+
};
|
|
22
|
+
function _sfc_render(_ctx, _cache) {
|
|
23
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1, _cache[0] || (_cache[0] = [
|
|
24
|
+
vue.createElementVNode("path", {
|
|
25
|
+
d: "M943.1 172c-2.4-0.2-245.1-25.3-413.8-147.8-5.1-3.7-11-5.6-17.3-5.6-6.2 0-12.2 1.9-17.3 5.6C326.9 146 83.3 171.8 80.9 172c-15.2 1.4-26.6 14.1-26.6 29.3 0 6.7 0.6 165.8 54.8 344.4 32.1 105.8 76.4 196.4 131.9 269.2 70.3 92.3 158.5 156 262 189.2 2.9 0.9 5.9 1.4 9 1.4s6.1-0.5 8.9-1.4c103.6-33.2 191.7-96.8 262-189.2 55.4-72.7 99.8-163.2 131.9-269.2 54.1-178.6 54.8-337.7 54.8-344.4C969.7 186.1 958.3 173.5 943.1 172zM910.1 227.2l-0.1 1.6c-2.9 58.1-13.4 174.4-51.4 299.9-66.7 220.1-183.1 360.1-346 416.1L512 945l-0.6-0.2C349 888.9 232.7 749.4 165.8 530.1c-39.8-130.5-49.4-254.2-51.8-301.4l-0.1-1.6 1.5-0.2c70.6-10.3 250.5-44.8 395.5-142.4l0.9-0.7 1 0.7C658 182.1 837.9 216.6 908.5 227L910.1 227.2z",
|
|
26
|
+
"p-id": "1663"
|
|
27
|
+
}, null, -1),
|
|
28
|
+
vue.createElementVNode("path", {
|
|
29
|
+
d: "M641.8 351 467 580.3l-89-76.1c-5.3-4.5-12.1-7-19.1-7-8.6 0-16.8 3.7-22.4 10.3-10.5 12.3-9.1 31 3.3 41.5l112.7 96.4c5.2 4.4 12.4 7 19.6 7 0.9 0 1.8 0 2.7-0.1 8-0.8 15.4-5 20.3-11.4l193.7-254c4.8-6.3 6.8-14 5.7-21.8-1-7.8-5.1-14.7-11.3-19.5C670.1 335.6 651.6 338.1 641.8 351z",
|
|
30
|
+
"p-id": "1664"
|
|
31
|
+
}, null, -1)
|
|
32
|
+
]));
|
|
33
|
+
}
|
|
34
|
+
const CaptchaIcon = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
35
|
+
module.exports = CaptchaIcon;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const elementPlus = require("element-plus");
|
|
4
|
+
const CaptchaIcon = require("./components/CaptchaIcon");
|
|
5
|
+
const httpConfig = require("yuang-framework-ui-common/lib/config/httpConfig");
|
|
6
|
+
const _hoisted_1 = { class: "captcha-container" };
|
|
7
|
+
const _hoisted_2 = { class: "captcha-card" };
|
|
8
|
+
const _hoisted_3 = ["src"];
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
10
|
+
...{ name: "YuFrameworkShortMessageCaptchaInput" },
|
|
11
|
+
__name: "index",
|
|
12
|
+
props: {
|
|
13
|
+
modelValue: { default: "" },
|
|
14
|
+
param: { default: {} }
|
|
15
|
+
},
|
|
16
|
+
emits: ["update:modelValue", "initSuccess", "change"],
|
|
17
|
+
setup(__props, { emit: __emit }) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const emit = __emit;
|
|
20
|
+
const componentParam = vue.computed(() => ({
|
|
21
|
+
type: "type",
|
|
22
|
+
inputSize: "large",
|
|
23
|
+
isShowIcon: true,
|
|
24
|
+
isShowInput: true,
|
|
25
|
+
...props.param
|
|
26
|
+
}));
|
|
27
|
+
const captchaRules = vue.ref([{ required: true, message: "请输入验证码" }]);
|
|
28
|
+
const isShowCaptcha = vue.ref(false);
|
|
29
|
+
const imageSrc = vue.ref("");
|
|
30
|
+
const captchaTimes = vue.ref(0);
|
|
31
|
+
const inputCaptcha = vue.ref("");
|
|
32
|
+
const imageCaptchaForm = vue.ref({
|
|
33
|
+
key: "",
|
|
34
|
+
captcha: ""
|
|
35
|
+
});
|
|
36
|
+
vue.onMounted(() => {
|
|
37
|
+
init();
|
|
38
|
+
});
|
|
39
|
+
vue.watch(inputCaptcha, (val) => {
|
|
40
|
+
emit("update:modelValue", val);
|
|
41
|
+
});
|
|
42
|
+
const init = () => {
|
|
43
|
+
if (!["large", "medium"].includes(componentParam.value.inputSize)) {
|
|
44
|
+
elementPlus.ElMessage.error(`参数[inputSize]值[${componentParam.value.inputSize}]未知`);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
emit("initSuccess", {});
|
|
48
|
+
};
|
|
49
|
+
const showCaptcha = () => {
|
|
50
|
+
inputCaptcha.value = "";
|
|
51
|
+
imageCaptchaForm.value.captcha = "";
|
|
52
|
+
const mobile = componentParam.value.mobile;
|
|
53
|
+
if (!mobile) {
|
|
54
|
+
return elementPlus.ElMessage.error("请输入手机号码");
|
|
55
|
+
}
|
|
56
|
+
if (mobile.trim().length !== 11) {
|
|
57
|
+
return elementPlus.ElMessage.error("手机号码格式不正确");
|
|
58
|
+
}
|
|
59
|
+
changeCaptcha();
|
|
60
|
+
isShowCaptcha.value = true;
|
|
61
|
+
};
|
|
62
|
+
const changeCaptcha = () => {
|
|
63
|
+
imageCaptchaForm.value.captcha = "";
|
|
64
|
+
imageSrc.value = "";
|
|
65
|
+
httpConfig.http.post("/framework-api/core/framework-captcha/createImageCaptcha").then((res) => {
|
|
66
|
+
imageSrc.value = res.data.data.imageSrc;
|
|
67
|
+
imageCaptchaForm.value.key = res.data.data.key;
|
|
68
|
+
}).catch((ex) => {
|
|
69
|
+
console.error(ex.message);
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
const callCaptchaTimes = () => {
|
|
73
|
+
if (captchaTimes.value !== 0) return;
|
|
74
|
+
captchaTimes.value = 60;
|
|
75
|
+
startCaptchaTimes();
|
|
76
|
+
};
|
|
77
|
+
const startCaptchaTimes = () => {
|
|
78
|
+
if (captchaTimes.value > 0) {
|
|
79
|
+
captchaTimes.value--;
|
|
80
|
+
setTimeout(startCaptchaTimes, 1e3);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
const sendShortMessageCaptcha = () => {
|
|
84
|
+
if (!imageCaptchaForm.value.captcha) {
|
|
85
|
+
return elementPlus.ElMessage.error("请输入图形验证码");
|
|
86
|
+
}
|
|
87
|
+
let data = {
|
|
88
|
+
mobile: componentParam.value.mobile,
|
|
89
|
+
imageCaptcha: imageCaptchaForm.value
|
|
90
|
+
};
|
|
91
|
+
httpConfig.http.post(`/framework-api/core/framework-captcha/createShortMessageCaptcha`, data).then((res) => {
|
|
92
|
+
callCaptchaTimes();
|
|
93
|
+
emit("change", { key: res.data.data.key });
|
|
94
|
+
elementPlus.ElMessage.success(res.data.message);
|
|
95
|
+
isShowCaptcha.value = false;
|
|
96
|
+
}).catch((ex) => {
|
|
97
|
+
imageCaptchaForm.value.captcha = "";
|
|
98
|
+
changeCaptcha();
|
|
99
|
+
console.error(ex.message);
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
return (_ctx, _cache) => {
|
|
103
|
+
const _component_el_input = vue.resolveComponent("el-input");
|
|
104
|
+
const _component_el_button = vue.resolveComponent("el-button");
|
|
105
|
+
const _component_ele_dialog = vue.resolveComponent("ele-dialog");
|
|
106
|
+
return vue.openBlock(), vue.createElementBlock("div", null, [
|
|
107
|
+
vue.createElementVNode("div", {
|
|
108
|
+
class: vue.normalizeClass(`mis-form-item-${componentParam.value.inputSize}-group`)
|
|
109
|
+
}, [
|
|
110
|
+
vue.createVNode(_component_el_input, {
|
|
111
|
+
name: "验证码",
|
|
112
|
+
placeholder: "请输入验证码",
|
|
113
|
+
modelValue: inputCaptcha.value,
|
|
114
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputCaptcha.value = $event),
|
|
115
|
+
"prefix-icon": componentParam.value.isShowIcon ? CaptchaIcon : "",
|
|
116
|
+
rules: captchaRules.value,
|
|
117
|
+
autocomplete: "off"
|
|
118
|
+
}, null, 8, ["modelValue", "prefix-icon", "rules"]),
|
|
119
|
+
captchaTimes.value === 0 ? (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
120
|
+
type: "primary",
|
|
121
|
+
key: "can-click",
|
|
122
|
+
class: vue.normalizeClass(`show-captcha-${componentParam.value.inputSize}`),
|
|
123
|
+
onClick: showCaptcha
|
|
124
|
+
}, {
|
|
125
|
+
default: vue.withCtx(() => _cache[4] || (_cache[4] = [
|
|
126
|
+
vue.createTextVNode(" 发送验证码 ")
|
|
127
|
+
])),
|
|
128
|
+
_: 1,
|
|
129
|
+
__: [4]
|
|
130
|
+
}, 8, ["class"])) : (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
131
|
+
type: "primary",
|
|
132
|
+
size: "small",
|
|
133
|
+
disabled: "",
|
|
134
|
+
key: "forbidden-click",
|
|
135
|
+
class: vue.normalizeClass(`show-captcha-times-${componentParam.value.inputSize}`)
|
|
136
|
+
}, {
|
|
137
|
+
default: vue.withCtx(() => [
|
|
138
|
+
vue.createTextVNode(vue.toDisplayString(captchaTimes.value) + "秒后再次发送 ", 1)
|
|
139
|
+
]),
|
|
140
|
+
_: 1
|
|
141
|
+
}, 8, ["class"]))
|
|
142
|
+
], 2),
|
|
143
|
+
vue.createVNode(_component_ele_dialog, {
|
|
144
|
+
modelValue: isShowCaptcha.value,
|
|
145
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isShowCaptcha.value = $event),
|
|
146
|
+
title: "发送验证码",
|
|
147
|
+
width: "400px"
|
|
148
|
+
}, {
|
|
149
|
+
footer: vue.withCtx(() => [
|
|
150
|
+
vue.createVNode(_component_el_button, {
|
|
151
|
+
onClick: _cache[2] || (_cache[2] = ($event) => isShowCaptcha.value = false)
|
|
152
|
+
}, {
|
|
153
|
+
default: vue.withCtx(() => _cache[5] || (_cache[5] = [
|
|
154
|
+
vue.createTextVNode("取消")
|
|
155
|
+
])),
|
|
156
|
+
_: 1,
|
|
157
|
+
__: [5]
|
|
158
|
+
}),
|
|
159
|
+
vue.createVNode(_component_el_button, {
|
|
160
|
+
type: "primary",
|
|
161
|
+
onClick: sendShortMessageCaptcha
|
|
162
|
+
}, {
|
|
163
|
+
default: vue.withCtx(() => _cache[6] || (_cache[6] = [
|
|
164
|
+
vue.createTextVNode("立即发送")
|
|
165
|
+
])),
|
|
166
|
+
_: 1,
|
|
167
|
+
__: [6]
|
|
168
|
+
})
|
|
169
|
+
]),
|
|
170
|
+
default: vue.withCtx(() => [
|
|
171
|
+
vue.createElementVNode("div", _hoisted_1, [
|
|
172
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
173
|
+
vue.withDirectives(vue.createElementVNode("img", {
|
|
174
|
+
src: imageSrc.value,
|
|
175
|
+
onClick: changeCaptcha,
|
|
176
|
+
class: "captcha-image",
|
|
177
|
+
alt: "验证码加载中"
|
|
178
|
+
}, null, 8, _hoisted_3), [
|
|
179
|
+
[vue.vShow, imageSrc.value]
|
|
180
|
+
])
|
|
181
|
+
]),
|
|
182
|
+
vue.createVNode(_component_el_input, {
|
|
183
|
+
modelValue: imageCaptchaForm.value.captcha,
|
|
184
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => imageCaptchaForm.value.captcha = $event),
|
|
185
|
+
class: "captcha-input",
|
|
186
|
+
label: "图形验证码",
|
|
187
|
+
clearable: "",
|
|
188
|
+
placeholder: "请输入图形验证码",
|
|
189
|
+
required: "",
|
|
190
|
+
onKeyup: vue.withKeys(changeCaptcha, ["enter"])
|
|
191
|
+
}, null, 8, ["modelValue"])
|
|
192
|
+
])
|
|
193
|
+
]),
|
|
194
|
+
_: 1
|
|
195
|
+
}, 8, ["modelValue"])
|
|
196
|
+
]);
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
const _export_sfc = (sfc, props) => {
|
|
201
|
+
const target = sfc.__vccOpts || sfc;
|
|
202
|
+
for (const [key, val] of props) {
|
|
203
|
+
target[key] = val;
|
|
204
|
+
}
|
|
205
|
+
return target;
|
|
206
|
+
};
|
|
207
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-07f77e18"]]);
|
|
208
|
+
module.exports = index;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
modelValue: String;
|
|
3
|
+
param?: Object;
|
|
4
|
+
}>, {
|
|
5
|
+
modelValue: string;
|
|
6
|
+
param: {};
|
|
7
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
"update:modelValue": (...args: any[]) => void;
|
|
9
|
+
initSuccess: (...args: any[]) => void;
|
|
10
|
+
change: (...args: any[]) => void;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
12
|
+
modelValue: String;
|
|
13
|
+
param?: Object;
|
|
14
|
+
}>, {
|
|
15
|
+
modelValue: string;
|
|
16
|
+
param: {};
|
|
17
|
+
}>>> & Readonly<{
|
|
18
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
onInitSuccess?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
param: Object;
|
|
23
|
+
modelValue: String;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
27
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
28
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
29
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
30
|
+
} : {
|
|
31
|
+
type: import('vue').PropType<T[K]>;
|
|
32
|
+
required: true;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
type __VLS_WithDefaults<P, D> = {
|
|
36
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
37
|
+
default: D[K];
|
|
38
|
+
}> : P[K];
|
|
39
|
+
};
|
|
40
|
+
type __VLS_Prettify<T> = {
|
|
41
|
+
[K in keyof T]: T[K];
|
|
42
|
+
} & {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
.mis-form-item-group[data-v-07f77e18] input {
|
|
2
|
+
border: 0px;
|
|
3
|
+
}
|
|
4
|
+
.show-captcha-large[data-v-07f77e18] {
|
|
5
|
+
height: 32px;
|
|
6
|
+
line-height: 0px;
|
|
7
|
+
width: 140px;
|
|
8
|
+
margin-right: 3px;
|
|
9
|
+
text-align: center;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
font-size: 12px;
|
|
12
|
+
font-weight: 400;
|
|
13
|
+
}
|
|
14
|
+
.show-captcha-times-large[data-v-07f77e18] {
|
|
15
|
+
height: 32px;
|
|
16
|
+
width: 140px;
|
|
17
|
+
margin-right: 3px;
|
|
18
|
+
text-align: center;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
font-size: 12px;
|
|
21
|
+
}
|
|
22
|
+
.show-captcha-medium[data-v-07f77e18] {
|
|
23
|
+
height: 30px;
|
|
24
|
+
width: 140px;
|
|
25
|
+
margin-right: 2px;
|
|
26
|
+
text-align: center;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
font-size: 12px;
|
|
29
|
+
font-weight: 400;
|
|
30
|
+
}
|
|
31
|
+
.show-captcha-times-medium[data-v-07f77e18] {
|
|
32
|
+
height: 30px;
|
|
33
|
+
width: 140px;
|
|
34
|
+
margin-right: 3px;
|
|
35
|
+
text-align: center;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
font-size: 12px;
|
|
38
|
+
}
|
|
39
|
+
.captcha-container[data-v-07f77e18] {
|
|
40
|
+
height: 170px;
|
|
41
|
+
width: 250px;
|
|
42
|
+
margin: 10px auto;
|
|
43
|
+
}
|
|
44
|
+
.captcha-container .captcha-card[data-v-07f77e18] {
|
|
45
|
+
height: 50px;
|
|
46
|
+
width: 100%;
|
|
47
|
+
margin: 32px 0px;
|
|
48
|
+
text-align: center;
|
|
49
|
+
}
|
|
50
|
+
.captcha-container .captcha-image[data-v-07f77e18] {
|
|
51
|
+
height: 50px;
|
|
52
|
+
width: 100%;
|
|
53
|
+
border-radius: 4px;
|
|
54
|
+
border: 1px solid #dcdfe6;
|
|
55
|
+
text-align: center;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
}
|
|
58
|
+
.captcha-container .captcha-input[data-v-07f77e18] .el-input__inner {
|
|
59
|
+
height: 50px;
|
|
60
|
+
font-size: 16px;
|
|
61
|
+
}
|
|
62
|
+
.icon-validate-code[data-v-07f77e18] {
|
|
63
|
+
margin-left: 4px;
|
|
64
|
+
}
|
|
65
|
+
.mis-form-item-large-group[data-v-07f77e18] {
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
}
|
|
69
|
+
.mis-form-item-large-group[data-v-07f77e18] .el-input__wrapper {
|
|
70
|
+
border-top-right-radius: 0px;
|
|
71
|
+
border-bottom-right-radius: 0px;
|
|
72
|
+
}
|
|
73
|
+
.mis-form-item-large-group[data-v-07f77e18] .el-input__inner {
|
|
74
|
+
border: 0px;
|
|
75
|
+
}
|
|
76
|
+
.mis-form-item-large-group[data-v-07f77e18] .el-button {
|
|
77
|
+
border-top-left-radius: 0px;
|
|
78
|
+
border-bottom-left-radius: 0px;
|
|
79
|
+
}
|
|
80
|
+
.mis-form-item-medium-group[data-v-07f77e18] .el-input__inner {
|
|
81
|
+
border: 0px;
|
|
82
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const vue = require("vue");
|
|
3
3
|
const httpConfig = require("yuang-framework-ui-common/lib/config/httpConfig");
|
|
4
|
-
const applicationConfig = require("yuang-framework-ui-common/lib/config/applicationConfig");
|
|
5
4
|
const iconsVue = require("@element-plus/icons-vue");
|
|
6
5
|
const icons = require("../../icons");
|
|
7
6
|
const _hoisted_1 = { class: "yu-framework-slider-captcha" };
|
|
@@ -56,7 +55,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
56
55
|
getCaptcha();
|
|
57
56
|
};
|
|
58
57
|
const getCaptcha = () => {
|
|
59
|
-
httpConfig.http.
|
|
58
|
+
httpConfig.http.post(`/framework-api/core/framework-captcha/createSliderCaptcha`, {}).then((res) => {
|
|
60
59
|
key.value = res.data.data.key;
|
|
61
60
|
block.value.src = res.data.data.blockSrc;
|
|
62
61
|
block.value.style.top = res.data.data.blockY + "px";
|
|
@@ -145,11 +144,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
145
144
|
if (!turingTest()) {
|
|
146
145
|
verifyFailEvent();
|
|
147
146
|
} else {
|
|
148
|
-
let
|
|
147
|
+
let data = {
|
|
149
148
|
key: key.value,
|
|
150
149
|
captcha: moveLength
|
|
151
150
|
};
|
|
152
|
-
httpConfig.http.
|
|
151
|
+
httpConfig.http.post(`/framework-api/core/framework-captcha/validateSliderCaptcha`, data).then((res) => {
|
|
153
152
|
verifySuccessEvent();
|
|
154
153
|
setTimeout(() => {
|
|
155
154
|
emit("success", { key: key.value, value: moveLength });
|