yuang-framework-ui-pc 1.1.40 → 1.1.41

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 (25) hide show
  1. package/es/core-components.d.ts +1 -1
  2. package/es/core-components.js +1 -1
  3. package/es/style/plus.scss +1 -1
  4. package/es/yu-framework-attachment-image-upload/index.d.ts +16 -0
  5. package/es/yu-framework-attachment-image-upload/index.js +164 -0
  6. package/es/{yu-slider-captcha-dialog → yu-framework-slider-captcha-dialog}/SliderCaptcha.js +16 -15
  7. package/es/{yu-slider-captcha-dialog → yu-framework-slider-captcha-dialog}/index.js +6 -6
  8. package/es/{yu-slider-captcha-dialog → yu-framework-slider-captcha-dialog}/style/index.scss +32 -32
  9. package/lib/core-components.cjs +1 -1
  10. package/lib/core-components.d.ts +1 -1
  11. package/lib/style/plus.scss +1 -1
  12. package/lib/yu-framework-attachment-image-upload/index.cjs +163 -0
  13. package/lib/yu-framework-attachment-image-upload/index.d.ts +16 -0
  14. package/lib/{yu-slider-captcha-dialog → yu-framework-slider-captcha-dialog}/SliderCaptcha.cjs +16 -15
  15. package/lib/{yu-slider-captcha-dialog → yu-framework-slider-captcha-dialog}/index.cjs +6 -6
  16. package/lib/{yu-slider-captcha-dialog → yu-framework-slider-captcha-dialog}/style/index.scss +32 -32
  17. package/package.json +1 -1
  18. /package/es/{yu-slider-captcha-dialog → yu-framework-slider-captcha-dialog}/SliderCaptcha.d.ts +0 -0
  19. /package/es/{yu-slider-captcha-dialog → yu-framework-slider-captcha-dialog}/index.d.ts +0 -0
  20. /package/es/{yu-slider-captcha-dialog → yu-framework-slider-captcha-dialog}/style/index.d.ts +0 -0
  21. /package/es/{yu-slider-captcha-dialog → yu-framework-slider-captcha-dialog}/style/index.js +0 -0
  22. /package/lib/{yu-slider-captcha-dialog → yu-framework-slider-captcha-dialog}/SliderCaptcha.d.ts +0 -0
  23. /package/lib/{yu-slider-captcha-dialog → yu-framework-slider-captcha-dialog}/index.d.ts +0 -0
  24. /package/lib/{yu-slider-captcha-dialog → yu-framework-slider-captcha-dialog}/style/index.cjs +0 -0
  25. /package/lib/{yu-slider-captcha-dialog → yu-framework-slider-captcha-dialog}/style/index.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { default as YuSliderCaptchaDialog } from './yu-slider-captcha-dialog/index';
1
+ import { default as YuSliderCaptchaDialog } from './yu-framework-slider-captcha-dialog/index';
2
2
  export { default as EleAdminLayout } from './ele-admin-layout/index';
3
3
  export { default as EleAlert } from './ele-alert/index';
4
4
  export { default as EleApp } from './ele-app/index';
@@ -52,7 +52,7 @@ import { default as default52 } from "./ele-virtual-table/index";
52
52
  import { default as default53 } from "./ele-watermark/index";
53
53
  import { default as default54 } from "./ele-test/index";
54
54
  import { default as default55 } from "./yu-test/index";
55
- import { default as default56 } from "./yu-slider-captcha-dialog/index";
55
+ import { default as default56 } from "./yu-framework-slider-captcha-dialog/index";
56
56
  export {
57
57
  default2 as EleAdminLayout,
58
58
  default3 as EleAlert,
@@ -45,4 +45,4 @@
45
45
  @use '../ele-virtual-table/style/index.scss' as virtualTable;
46
46
 
47
47
 
48
- @use '../yu-slider-captcha-dialog/style/index.scss' as sliderCaptchaDialog;
48
+ @use '../yu-framework-slider-captcha-dialog/style/index.scss' as sliderCaptchaDialog;
@@ -0,0 +1,16 @@
1
+ import { ComponentParam } from '@/model/component/param';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ modelValue: import('vue').PropType<any>;
5
+ param: {
6
+ type: import('vue').PropType<ComponentParam>;
7
+ required: true;
8
+ };
9
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
10
+ modelValue: import('vue').PropType<any>;
11
+ param: {
12
+ type: import('vue').PropType<ComponentParam>;
13
+ required: true;
14
+ };
15
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
16
+ export default _default;
@@ -0,0 +1,164 @@
1
+ import { defineComponent, mergeModels, ref, useModel, onMounted, resolveComponent, createElementBlock, openBlock, createVNode } from "vue";
2
+ import { ElMessageBox } from "element-plus/es";
3
+ import { http } from "yuang-framework-ui-common/lib/config/httpConfig";
4
+ import { getShortUuid } from "yuang-framework-ui-common/lib/utils/uuidUtils";
5
+ import { application } from "yuang-framework-ui-common/lib/config/applicationConfig";
6
+ import { EleMessage } from "../../es/components";
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ ...{ name: "YuFrameworkAttachmentFileUpload" },
9
+ __name: "index",
10
+ props: /* @__PURE__ */ mergeModels({
11
+ modelValue: {},
12
+ param: {}
13
+ }, {
14
+ "modelValue": {},
15
+ "modelModifiers": {}
16
+ }),
17
+ emits: ["update:modelValue"],
18
+ setup(__props) {
19
+ const images = ref([]);
20
+ const isLoading = ref(false);
21
+ const checkFile = (file) => {
22
+ if (!file) {
23
+ return;
24
+ }
25
+ if (!file.type.startsWith("image")) {
26
+ EleMessage.error("只能选择图片");
27
+ return;
28
+ }
29
+ if (file.size / 1024 / 1024 > 2) {
30
+ EleMessage.error("大小不能超过 2MB");
31
+ return;
32
+ }
33
+ return true;
34
+ };
35
+ const model = useModel(__props, "modelValue");
36
+ model.value = model.value ?? getShortUuid();
37
+ onMounted(() => {
38
+ http.post(`${application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/selectPage`, { code: model.value, pageSize: 100 }).then((res) => {
39
+ let attachemtList = res.data.data.records;
40
+ for (let i = 0; i < attachemtList.length; i++) {
41
+ images.value.push({
42
+ key: attachemtList[i].id,
43
+ url: attachemtList[i].fullUrl,
44
+ status: "done"
45
+ });
46
+ }
47
+ });
48
+ });
49
+ const handleUpload = (uploadItem2, retry) => {
50
+ if (!checkFile(uploadItem2.file)) {
51
+ return;
52
+ }
53
+ if (!retry) {
54
+ images.value.push({ ...uploadItem2 });
55
+ }
56
+ const item = images.value.find((t) => t.key === uploadItem2.key);
57
+ console.log(JSON.parse(JSON.stringify(item)));
58
+ if (!item) {
59
+ return;
60
+ }
61
+ item.status = "uploading";
62
+ item.progress = 0;
63
+ let formData = new FormData();
64
+ formData.append("code", model.value);
65
+ formData.append("multipartFile", uploadItem2.file, uploadItem2.file.name);
66
+ http({
67
+ url: `${application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/uploadAttachment`,
68
+ method: "post",
69
+ headers: {
70
+ "Content-Type": "multipart/form-data"
71
+ },
72
+ data: formData
73
+ }).then((res) => {
74
+ EleMessage.success(res.data.message);
75
+ item.progress = 100;
76
+ item.status = "done";
77
+ item.url = res.data.data.fullUrl;
78
+ }).catch((e) => {
79
+ item.status = "exception";
80
+ EleMessage.error(e.message);
81
+ });
82
+ };
83
+ const handleEditUpload = ({ item, newItem }) => {
84
+ if (!checkFile(newItem.file)) {
85
+ return;
86
+ }
87
+ const oldItem = images.value.find((t) => t.key === item.key);
88
+ if (oldItem) {
89
+ oldItem.url = void 0;
90
+ oldItem.name = newItem.name;
91
+ oldItem.file = newItem.file;
92
+ oldItem.status = void 0;
93
+ oldItem.progress = 0;
94
+ }
95
+ };
96
+ const handleRemove = (item) => {
97
+ ElMessageBox.confirm("确定要删除吗?", "系统提示", {
98
+ type: "warning",
99
+ draggable: true
100
+ }).then(() => {
101
+ images.value.splice(images.value.indexOf(item), 1);
102
+ }).catch(() => {
103
+ });
104
+ };
105
+ const uploadItem = (item) => {
106
+ item.status = "uploading";
107
+ if (item.progress == null) {
108
+ item.progress = 20;
109
+ }
110
+ const timer = setInterval(
111
+ () => {
112
+ if (Math.round(Math.random() * 10) < 3) {
113
+ item.status = "exception";
114
+ EleMessage.error("上传失败, 服务器繁忙,请重试");
115
+ clearInterval(timer);
116
+ return;
117
+ }
118
+ if (item.progress == null) {
119
+ item.progress = 20;
120
+ } else {
121
+ item.progress += 20;
122
+ }
123
+ if (item.progress === 100) {
124
+ item.status = "done";
125
+ clearInterval(timer);
126
+ if (checkDone()) {
127
+ submitForm();
128
+ }
129
+ }
130
+ },
131
+ Math.round(Math.random() * 2500) + 500
132
+ );
133
+ };
134
+ const checkDone = () => {
135
+ return !images.value.some((d) => d.status !== "done");
136
+ };
137
+ const submitForm = () => {
138
+ EleMessage.success("已全部上传完毕");
139
+ console.log(JSON.parse(JSON.stringify(images.value)));
140
+ isLoading.value = false;
141
+ };
142
+ return (_ctx, _cache) => {
143
+ const _component_ele_upload_list = resolveComponent("ele-upload-list");
144
+ return openBlock(), createElementBlock("div", null, [
145
+ createVNode(_component_ele_upload_list, {
146
+ drag: true,
147
+ tools: true,
148
+ modelValue: images.value,
149
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => images.value = $event),
150
+ readonly: isLoading.value,
151
+ disabled: _ctx.param.type != "edit",
152
+ sortable: { forceFallback: true },
153
+ onUpload: handleUpload,
154
+ onRetry: uploadItem,
155
+ onRemove: handleRemove,
156
+ onEditUpload: handleEditUpload
157
+ }, null, 8, ["modelValue", "readonly", "disabled"])
158
+ ]);
159
+ };
160
+ }
161
+ });
162
+ export {
163
+ _sfc_main as default
164
+ };
@@ -1,9 +1,10 @@
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";
3
4
  import { RefreshRight, CircleClose } from "@element-plus/icons-vue";
4
5
  import { SliderArrowStatic, SliderArrowSlide } from "../icons";
5
- const _hoisted_1 = { class: "yu-slider-captcha" };
6
- const _hoisted_2 = { class: "yu-slider-captcha-title" };
6
+ const _hoisted_1 = { class: "yu-framework-slider-captcha" };
7
+ const _hoisted_2 = { class: "yu-framework-slider-captcha-title" };
7
8
  const _hoisted_3 = ["width", "height"];
8
9
  const _hoisted_4 = { class: "slider-hint" };
9
10
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -54,7 +55,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
54
55
  getCaptcha();
55
56
  };
56
57
  const getCaptcha = () => {
57
- http.get("/sso-api/core/framework-captcha/getSliderCaptcha", { params: {} }).then((res) => {
58
+ http.get(`${application.gatewayServerBaseUrl}/framework-api/core/framework-captcha/getSliderCaptcha`, { params: {} }).then((res) => {
58
59
  key.value = res.data.data.key;
59
60
  block.value.src = res.data.data.blockSrc;
60
61
  block.value.style.top = res.data.data.blockY + "px";
@@ -147,7 +148,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
147
148
  key: key.value,
148
149
  captcha: moveLength
149
150
  };
150
- http.get("/sso-api/core/framework-captcha/validateSliderCaptcha", { params }).then((res) => {
151
+ http.get(`${application.gatewayServerBaseUrl}/framework-api/core/framework-captcha/validateSliderCaptcha`, { params }).then((res) => {
151
152
  verifySuccessEvent();
152
153
  setTimeout(() => {
153
154
  emit("success", { key: key.value, value: moveLength });
@@ -212,25 +213,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
212
213
  _cache[0] || (_cache[0] = createTextVNode(" 完成拼图验证 ")),
213
214
  createElementVNode("div", {
214
215
  onClick: refresh,
215
- class: "yu-slider-captcha-refresh-icon"
216
+ class: "yu-framework-slider-captcha-refresh-icon"
216
217
  }, [
217
218
  createVNode(unref(RefreshRight))
218
219
  ]),
219
220
  createElementVNode("div", {
220
221
  onClick: close,
221
- class: "yu-slider-captcha-close-icon"
222
+ class: "yu-framework-slider-captcha-close-icon"
222
223
  }, [
223
224
  createVNode(unref(CircleClose))
224
225
  ])
225
226
  ]),
226
227
  createElementVNode("div", {
227
- class: "yu-slider-captcha",
228
+ class: "yu-framework-slider-captcha",
228
229
  style: normalizeStyle({ width: _ctx.canvasWidth + "px" }),
229
230
  onselectstart: "return false;"
230
231
  }, [
231
232
  isLoading.value ? (openBlock(), createElementBlock("div", {
232
233
  key: 0,
233
- class: normalizeClass({ "yu-slider-captcha-img-loading": isLoading.value }),
234
+ class: normalizeClass({ "yu-framework-slider-captcha-img-loading": isLoading.value }),
234
235
  style: normalizeStyle({ height: _ctx.canvasHeight + "px" })
235
236
  }, null, 6)) : createCommentVNode("", true),
236
237
  isVerifySuccess.value ? (openBlock(), createElementBlock("div", {
@@ -241,33 +242,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
241
242
  createElementVNode("img", {
242
243
  ref_key: "canvas",
243
244
  ref: canvas,
244
- class: "yu-slider-captcha-canvas",
245
+ class: "yu-framework-slider-captcha-canvas",
245
246
  width: _ctx.canvasWidth,
246
247
  height: _ctx.canvasHeight
247
248
  }, null, 8, _hoisted_3),
248
249
  createElementVNode("img", {
249
250
  ref_key: "block",
250
251
  ref: block,
251
- class: normalizeClass(["yu-slider-captcha-block", { "is-verify-fail": isVerifyFail.value }])
252
+ class: normalizeClass(["yu-framework-slider-captcha-block", { "is-verify-fail": isVerifyFail.value }])
252
253
  }, null, 2),
253
254
  createElementVNode("div", {
254
- class: normalizeClass(["yu-slider-captcha-slider", { "is-verify-active": isVerifyActive.value, "is-verify-success": isVerifySuccess.value, "is-verify-fail": isVerifyFail.value }])
255
+ class: normalizeClass(["yu-framework-slider-captcha-slider", { "is-verify-active": isVerifyActive.value, "is-verify-success": isVerifySuccess.value, "is-verify-fail": isVerifyFail.value }])
255
256
  }, [
256
257
  createElementVNode("div", {
257
- class: "yu-slider-captcha-slider-box",
258
+ class: "yu-framework-slider-captcha-slider-box",
258
259
  style: normalizeStyle({ width: sliderBoxWidth.value + "px" })
259
260
  }, [
260
261
  createElementVNode("div", {
261
- class: "yu-slider-captcha-slider-button",
262
+ class: "yu-framework-slider-captcha-slider-button",
262
263
  id: "slider-button",
263
264
  style: normalizeStyle({ left: sliderButtonLeft.value + "px" })
264
265
  }, [
265
266
  !isSliderSlide.value ? (openBlock(), createBlock(unref(SliderArrowStatic), {
266
267
  key: 0,
267
- class: "yu-slider-captcha-slider-button-icon yu-color-primary"
268
+ class: "yu-framework-slider-captcha-slider-button-icon yu-color-primary"
268
269
  })) : (openBlock(), createBlock(unref(SliderArrowSlide), {
269
270
  key: 1,
270
- class: "yu-slider-captcha-slider-button-icon yu-color-primary"
271
+ class: "yu-framework-slider-captcha-slider-button-icon yu-color-primary"
271
272
  }))
272
273
  ], 4)
273
274
  ], 4),
@@ -2,13 +2,13 @@ import { defineComponent, ref, createElementBlock, createCommentVNode, openBlock
2
2
  import SliderCaptcha from "./SliderCaptcha";
3
3
  const _hoisted_1 = {
4
4
  key: 0,
5
- class: "yu-slider-captcha-dialog"
5
+ class: "yu-framework-slider-captcha-dialog"
6
6
  };
7
- const _hoisted_2 = { class: "yu-slider-captcha-dialog-wrapper" };
8
- const _hoisted_3 = { class: "yu-slider-captcha-dialog yu-slider-captcha-slide-up" };
9
- const _hoisted_4 = { class: "yu-slider-captcha" };
7
+ const _hoisted_2 = { class: "yu-framework-slider-captcha-dialog-wrapper" };
8
+ const _hoisted_3 = { class: "yu-framework-slider-captcha-dialog yu-framework-slider-captcha-slide-up" };
9
+ const _hoisted_4 = { class: "yu-framework-slider-captcha" };
10
10
  const _sfc_main = /* @__PURE__ */ defineComponent({
11
- ...{ name: "YuSliderCaptchaDialog" },
11
+ ...{ name: "YuFrameworkSliderCaptchaDialog" },
12
12
  __name: "index",
13
13
  emits: ["success", "fail", "close"],
14
14
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -42,7 +42,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
42
42
  });
43
43
  return (_ctx, _cache) => {
44
44
  return isShowSliderCaptcha.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
45
- _cache[0] || (_cache[0] = createElementVNode("div", { class: "yu-slider-captcha-dialog-modal" }, null, -1)),
45
+ _cache[0] || (_cache[0] = createElementVNode("div", { class: "yu-framework-slider-captcha-dialog-modal" }, null, -1)),
46
46
  createElementVNode("div", _hoisted_2, [
47
47
  createElementVNode("div", _hoisted_3, [
48
48
  createElementVNode("div", _hoisted_4, [
@@ -2,8 +2,8 @@
2
2
  @use '../../style/default.scss' as *;
3
3
 
4
4
  /* 滑块验证码弹出框 */
5
- .yu-slider-captcha-dialog {
6
- .yu-slider-captcha-dialog-modal {
5
+ .yu-framework-slider-captcha-dialog {
6
+ .yu-framework-slider-captcha-dialog-modal {
7
7
  position: fixed;
8
8
  left: 0;
9
9
  top: 0;
@@ -15,7 +15,7 @@
15
15
  z-index: 1000;
16
16
  }
17
17
 
18
- .yu-slider-captcha-dialog-wrapper {
18
+ .yu-framework-slider-captcha-dialog-wrapper {
19
19
  position: fixed;
20
20
  top: 0;
21
21
  right: 0;
@@ -26,7 +26,7 @@
26
26
 
27
27
  z-index: 1001;
28
28
 
29
- .yu-slider-captcha-dialog {
29
+ .yu-framework-slider-captcha-dialog {
30
30
  // 在移动端禁止上下滑动,添加position: fixed;
31
31
  position: fixed;
32
32
  background: #fff;
@@ -47,15 +47,15 @@
47
47
 
48
48
  border-radius: 4px;
49
49
 
50
- .yu-slider-captcha {
50
+ .yu-framework-slider-captcha {
51
51
  }
52
52
  }
53
53
 
54
- .yu-slider-captcha-slide-up {
55
- animation: yu-slider-captcha-slide-up-animation 0.5s ease;
54
+ .yu-framework-slider-captcha-slide-up {
55
+ animation: yu-framework-slider-captcha-slide-up-animation 0.5s ease;
56
56
  }
57
57
 
58
- @keyframes yu-slider-captcha-slide-up-animation {
58
+ @keyframes yu-framework-slider-captcha-slide-up-animation {
59
59
  0% {
60
60
  transform: translate(-50%, 100%);
61
61
  }
@@ -70,18 +70,18 @@
70
70
 
71
71
 
72
72
  /* 滑块验证码弹容器 */
73
- .yu-slider-captcha {
74
- .yu-slider-captcha {
73
+ .yu-framework-slider-captcha {
74
+ .yu-framework-slider-captcha {
75
75
  position: relative;
76
76
  }
77
77
 
78
- .yu-slider-captcha-title {
78
+ .yu-framework-slider-captcha-title {
79
79
  position: relative;
80
80
  height: 30px;
81
81
  font-size: 16px;
82
82
  }
83
83
 
84
- .yu-slider-captcha-refresh-icon {
84
+ .yu-framework-slider-captcha-refresh-icon {
85
85
  position: absolute;
86
86
  right: 30px;
87
87
  top: 0;
@@ -94,11 +94,11 @@
94
94
  opacity: 0.7;
95
95
  }
96
96
 
97
- .yu-slider-captcha-refresh-icon:hover {
97
+ .yu-framework-slider-captcha-refresh-icon:hover {
98
98
  opacity: 1;
99
99
  }
100
100
 
101
- .yu-slider-captcha-close-icon {
101
+ .yu-framework-slider-captcha-close-icon {
102
102
  position: absolute;
103
103
  right: 0;
104
104
  top: 0;
@@ -111,20 +111,20 @@
111
111
  opacity: 0.7;
112
112
  }
113
113
 
114
- .yu-slider-captcha-close-icon:hover {
114
+ .yu-framework-slider-captcha-close-icon:hover {
115
115
  opacity: 1;
116
116
  }
117
117
  }
118
118
 
119
119
  /*图片加载样式*/
120
- .yu-slider-captcha-img-loading {
120
+ .yu-framework-slider-captcha-img-loading {
121
121
  position: absolute;
122
122
  top: 0;
123
123
  right: 0;
124
124
  left: 0;
125
125
  bottom: 0;
126
126
  z-index: 999;
127
- animation: yu-slider-captcha-loading 1.5s infinite;
127
+ animation: yu-framework-slider-captcha-loading 1.5s infinite;
128
128
  background-image: url(../images/loading.svg);
129
129
  background-repeat: no-repeat;
130
130
  background-position: center center;
@@ -133,7 +133,7 @@
133
133
  //border-radius: 5px;
134
134
  }
135
135
 
136
- @keyframes yu-slider-captcha-loading {
136
+ @keyframes yu-framework-slider-captcha-loading {
137
137
  0% {
138
138
  opacity: 0.7;
139
139
  }
@@ -170,12 +170,12 @@
170
170
  //}
171
171
 
172
172
  /*验证图片*/
173
- .yu-slider-captcha-canvas {
173
+ .yu-framework-slider-captcha-canvas {
174
174
  //border-radius: 5px;
175
175
  }
176
176
 
177
177
  /*阻塞块*/
178
- .yu-slider-captcha-block {
178
+ .yu-framework-slider-captcha-block {
179
179
  position: absolute;
180
180
  left: 0;
181
181
  top: 0;
@@ -184,12 +184,12 @@
184
184
  }
185
185
 
186
186
  /*校验失败时的阻塞块样式*/
187
- .yu-slider-captcha-block.is-verify-fail {
187
+ .yu-framework-slider-captcha-block.is-verify-fail {
188
188
  transition: left 0.5s linear;
189
189
  }
190
190
 
191
191
  /*滑动条*/
192
- .yu-slider-captcha-slider {
192
+ .yu-framework-slider-captcha-slider {
193
193
  position: relative;
194
194
  text-align: center;
195
195
  width: 100%;
@@ -206,7 +206,7 @@
206
206
  }
207
207
 
208
208
  /*滑动盒子*/
209
- .yu-slider-captcha-slider-box {
209
+ .yu-framework-slider-captcha-slider-box {
210
210
  position: absolute;
211
211
  left: 0;
212
212
  top: 0;
@@ -219,7 +219,7 @@
219
219
  }
220
220
 
221
221
  /*滑动按钮*/
222
- .yu-slider-captcha-slider-button {
222
+ .yu-framework-slider-captcha-slider-button {
223
223
  background-color: rgb(255, 255, 255);
224
224
  color: white;
225
225
  text-align: center;
@@ -240,17 +240,17 @@
240
240
  }
241
241
 
242
242
  /*鼠标悬浮时的按钮样式*/
243
- .yu-slider-captcha-slider-button:hover {
243
+ .yu-framework-slider-captcha-slider-button:hover {
244
244
  //background: #1991FA
245
245
  cursor: pointer;
246
246
  }
247
247
 
248
248
  /*鼠标悬浮时的按钮图标样式*/
249
- .yu-slider-captcha-slider-button:hover .yu-slider-captcha-slider-button-icon {
249
+ .yu-framework-slider-captcha-slider-button:hover .yu-framework-slider-captcha-slider-button-icon {
250
250
  }
251
251
 
252
252
  /*滑动按钮图标*/
253
- .yu-slider-captcha-slider-button-icon {
253
+ .yu-framework-slider-captcha-slider-button-icon {
254
254
  width: 32px;
255
255
  height: 32px;
256
256
  font-size: 24px;
@@ -266,13 +266,13 @@
266
266
  }
267
267
 
268
268
  /*校验时的滑动箱样式*/
269
- .is-verify-active .yu-slider-captcha-slider-box {
269
+ .is-verify-active .yu-framework-slider-captcha-slider-box {
270
270
  height: 40px;
271
271
  border-width: 1px;
272
272
  }
273
273
 
274
274
  /*校验成功时的滑动箱样式*/
275
- .is-verify-success .yu-slider-captcha-slider-box {
275
+ .is-verify-success .yu-framework-slider-captcha-slider-box {
276
276
  height: 40px;
277
277
  }
278
278
 
@@ -281,12 +281,12 @@
281
281
  }
282
282
 
283
283
  /*校验成功时的按钮图标样式*/
284
- .is-verify-success .yu-slider-captcha-slider-button-icon {
284
+ .is-verify-success .yu-framework-slider-captcha-slider-button-icon {
285
285
  background-position: 0 0 !important;
286
286
  }
287
287
 
288
288
  /*校验失败时的滑动箱样式*/
289
- .is-verify-fail .yu-slider-captcha-slider-box {
289
+ .is-verify-fail .yu-framework-slider-captcha-slider-box {
290
290
  transition: width 0.5s linear;
291
291
  }
292
292
 
@@ -296,5 +296,5 @@
296
296
  }
297
297
 
298
298
  /*校验失败时的按钮图标样式*/
299
- .is-verify-fail .yu-slider-captcha-slider-button-icon {
299
+ .is-verify-fail .yu-framework-slider-captcha-slider-button-icon {
300
300
  }
@@ -54,7 +54,7 @@ const index$P = require("./ele-virtual-table/index");
54
54
  const index$Q = require("./ele-watermark/index");
55
55
  const index$R = require("./ele-test/index");
56
56
  const index$S = require("./yu-test/index");
57
- const index = require("./yu-slider-captcha-dialog/index");
57
+ const index = require("./yu-framework-slider-captcha-dialog/index");
58
58
  exports.EleAdminLayout = index$1;
59
59
  exports.EleAlert = index$2;
60
60
  exports.EleApp = index$3;
@@ -1,4 +1,4 @@
1
- import { default as YuSliderCaptchaDialog } from './yu-slider-captcha-dialog/index';
1
+ import { default as YuSliderCaptchaDialog } from './yu-framework-slider-captcha-dialog/index';
2
2
  export { default as EleAdminLayout } from './ele-admin-layout/index';
3
3
  export { default as EleAlert } from './ele-alert/index';
4
4
  export { default as EleApp } from './ele-app/index';
@@ -45,4 +45,4 @@
45
45
  @use '../ele-virtual-table/style/index.scss' as virtualTable;
46
46
 
47
47
 
48
- @use '../yu-slider-captcha-dialog/style/index.scss' as sliderCaptchaDialog;
48
+ @use '../yu-framework-slider-captcha-dialog/style/index.scss' as sliderCaptchaDialog;
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+ const vue = require("vue");
3
+ const es = require("element-plus/es");
4
+ const httpConfig = require("yuang-framework-ui-common/lib/config/httpConfig");
5
+ const uuidUtils = require("yuang-framework-ui-common/lib/utils/uuidUtils");
6
+ const applicationConfig = require("yuang-framework-ui-common/lib/config/applicationConfig");
7
+ const components = require("../../es/components");
8
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
9
+ ...{ name: "YuFrameworkAttachmentFileUpload" },
10
+ __name: "index",
11
+ props: /* @__PURE__ */ vue.mergeModels({
12
+ modelValue: {},
13
+ param: {}
14
+ }, {
15
+ "modelValue": {},
16
+ "modelModifiers": {}
17
+ }),
18
+ emits: ["update:modelValue"],
19
+ setup(__props) {
20
+ const images = vue.ref([]);
21
+ const isLoading = vue.ref(false);
22
+ const checkFile = (file) => {
23
+ if (!file) {
24
+ return;
25
+ }
26
+ if (!file.type.startsWith("image")) {
27
+ components.EleMessage.error("只能选择图片");
28
+ return;
29
+ }
30
+ if (file.size / 1024 / 1024 > 2) {
31
+ components.EleMessage.error("大小不能超过 2MB");
32
+ return;
33
+ }
34
+ return true;
35
+ };
36
+ const model = vue.useModel(__props, "modelValue");
37
+ model.value = model.value ?? uuidUtils.getShortUuid();
38
+ vue.onMounted(() => {
39
+ httpConfig.http.post(`${applicationConfig.application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/selectPage`, { code: model.value, pageSize: 100 }).then((res) => {
40
+ let attachemtList = res.data.data.records;
41
+ for (let i = 0; i < attachemtList.length; i++) {
42
+ images.value.push({
43
+ key: attachemtList[i].id,
44
+ url: attachemtList[i].fullUrl,
45
+ status: "done"
46
+ });
47
+ }
48
+ });
49
+ });
50
+ const handleUpload = (uploadItem2, retry) => {
51
+ if (!checkFile(uploadItem2.file)) {
52
+ return;
53
+ }
54
+ if (!retry) {
55
+ images.value.push({ ...uploadItem2 });
56
+ }
57
+ const item = images.value.find((t) => t.key === uploadItem2.key);
58
+ console.log(JSON.parse(JSON.stringify(item)));
59
+ if (!item) {
60
+ return;
61
+ }
62
+ item.status = "uploading";
63
+ item.progress = 0;
64
+ let formData = new FormData();
65
+ formData.append("code", model.value);
66
+ formData.append("multipartFile", uploadItem2.file, uploadItem2.file.name);
67
+ httpConfig.http({
68
+ url: `${applicationConfig.application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/uploadAttachment`,
69
+ method: "post",
70
+ headers: {
71
+ "Content-Type": "multipart/form-data"
72
+ },
73
+ data: formData
74
+ }).then((res) => {
75
+ components.EleMessage.success(res.data.message);
76
+ item.progress = 100;
77
+ item.status = "done";
78
+ item.url = res.data.data.fullUrl;
79
+ }).catch((e) => {
80
+ item.status = "exception";
81
+ components.EleMessage.error(e.message);
82
+ });
83
+ };
84
+ const handleEditUpload = ({ item, newItem }) => {
85
+ if (!checkFile(newItem.file)) {
86
+ return;
87
+ }
88
+ const oldItem = images.value.find((t) => t.key === item.key);
89
+ if (oldItem) {
90
+ oldItem.url = void 0;
91
+ oldItem.name = newItem.name;
92
+ oldItem.file = newItem.file;
93
+ oldItem.status = void 0;
94
+ oldItem.progress = 0;
95
+ }
96
+ };
97
+ const handleRemove = (item) => {
98
+ es.ElMessageBox.confirm("确定要删除吗?", "系统提示", {
99
+ type: "warning",
100
+ draggable: true
101
+ }).then(() => {
102
+ images.value.splice(images.value.indexOf(item), 1);
103
+ }).catch(() => {
104
+ });
105
+ };
106
+ const uploadItem = (item) => {
107
+ item.status = "uploading";
108
+ if (item.progress == null) {
109
+ item.progress = 20;
110
+ }
111
+ const timer = setInterval(
112
+ () => {
113
+ if (Math.round(Math.random() * 10) < 3) {
114
+ item.status = "exception";
115
+ components.EleMessage.error("上传失败, 服务器繁忙,请重试");
116
+ clearInterval(timer);
117
+ return;
118
+ }
119
+ if (item.progress == null) {
120
+ item.progress = 20;
121
+ } else {
122
+ item.progress += 20;
123
+ }
124
+ if (item.progress === 100) {
125
+ item.status = "done";
126
+ clearInterval(timer);
127
+ if (checkDone()) {
128
+ submitForm();
129
+ }
130
+ }
131
+ },
132
+ Math.round(Math.random() * 2500) + 500
133
+ );
134
+ };
135
+ const checkDone = () => {
136
+ return !images.value.some((d) => d.status !== "done");
137
+ };
138
+ const submitForm = () => {
139
+ components.EleMessage.success("已全部上传完毕");
140
+ console.log(JSON.parse(JSON.stringify(images.value)));
141
+ isLoading.value = false;
142
+ };
143
+ return (_ctx, _cache) => {
144
+ const _component_ele_upload_list = vue.resolveComponent("ele-upload-list");
145
+ return vue.openBlock(), vue.createElementBlock("div", null, [
146
+ vue.createVNode(_component_ele_upload_list, {
147
+ drag: true,
148
+ tools: true,
149
+ modelValue: images.value,
150
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => images.value = $event),
151
+ readonly: isLoading.value,
152
+ disabled: _ctx.param.type != "edit",
153
+ sortable: { forceFallback: true },
154
+ onUpload: handleUpload,
155
+ onRetry: uploadItem,
156
+ onRemove: handleRemove,
157
+ onEditUpload: handleEditUpload
158
+ }, null, 8, ["modelValue", "readonly", "disabled"])
159
+ ]);
160
+ };
161
+ }
162
+ });
163
+ module.exports = _sfc_main;
@@ -0,0 +1,16 @@
1
+ import { ComponentParam } from '@/model/component/param';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ modelValue: import('vue').PropType<any>;
5
+ param: {
6
+ type: import('vue').PropType<ComponentParam>;
7
+ required: true;
8
+ };
9
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
10
+ modelValue: import('vue').PropType<any>;
11
+ param: {
12
+ type: import('vue').PropType<ComponentParam>;
13
+ required: true;
14
+ };
15
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
16
+ export default _default;
@@ -1,10 +1,11 @@
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");
4
5
  const iconsVue = require("@element-plus/icons-vue");
5
6
  const icons = require("../icons");
6
- const _hoisted_1 = { class: "yu-slider-captcha" };
7
- const _hoisted_2 = { class: "yu-slider-captcha-title" };
7
+ const _hoisted_1 = { class: "yu-framework-slider-captcha" };
8
+ const _hoisted_2 = { class: "yu-framework-slider-captcha-title" };
8
9
  const _hoisted_3 = ["width", "height"];
9
10
  const _hoisted_4 = { class: "slider-hint" };
10
11
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
@@ -55,7 +56,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
55
56
  getCaptcha();
56
57
  };
57
58
  const getCaptcha = () => {
58
- httpConfig.http.get("/sso-api/core/framework-captcha/getSliderCaptcha", { params: {} }).then((res) => {
59
+ httpConfig.http.get(`${applicationConfig.application.gatewayServerBaseUrl}/framework-api/core/framework-captcha/getSliderCaptcha`, { params: {} }).then((res) => {
59
60
  key.value = res.data.data.key;
60
61
  block.value.src = res.data.data.blockSrc;
61
62
  block.value.style.top = res.data.data.blockY + "px";
@@ -148,7 +149,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
148
149
  key: key.value,
149
150
  captcha: moveLength
150
151
  };
151
- httpConfig.http.get("/sso-api/core/framework-captcha/validateSliderCaptcha", { params }).then((res) => {
152
+ httpConfig.http.get(`${applicationConfig.application.gatewayServerBaseUrl}/framework-api/core/framework-captcha/validateSliderCaptcha`, { params }).then((res) => {
152
153
  verifySuccessEvent();
153
154
  setTimeout(() => {
154
155
  emit("success", { key: key.value, value: moveLength });
@@ -213,25 +214,25 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
213
214
  _cache[0] || (_cache[0] = vue.createTextVNode(" 完成拼图验证 ")),
214
215
  vue.createElementVNode("div", {
215
216
  onClick: refresh,
216
- class: "yu-slider-captcha-refresh-icon"
217
+ class: "yu-framework-slider-captcha-refresh-icon"
217
218
  }, [
218
219
  vue.createVNode(vue.unref(iconsVue.RefreshRight))
219
220
  ]),
220
221
  vue.createElementVNode("div", {
221
222
  onClick: close,
222
- class: "yu-slider-captcha-close-icon"
223
+ class: "yu-framework-slider-captcha-close-icon"
223
224
  }, [
224
225
  vue.createVNode(vue.unref(iconsVue.CircleClose))
225
226
  ])
226
227
  ]),
227
228
  vue.createElementVNode("div", {
228
- class: "yu-slider-captcha",
229
+ class: "yu-framework-slider-captcha",
229
230
  style: vue.normalizeStyle({ width: _ctx.canvasWidth + "px" }),
230
231
  onselectstart: "return false;"
231
232
  }, [
232
233
  isLoading.value ? (vue.openBlock(), vue.createElementBlock("div", {
233
234
  key: 0,
234
- class: vue.normalizeClass({ "yu-slider-captcha-img-loading": isLoading.value }),
235
+ class: vue.normalizeClass({ "yu-framework-slider-captcha-img-loading": isLoading.value }),
235
236
  style: vue.normalizeStyle({ height: _ctx.canvasHeight + "px" })
236
237
  }, null, 6)) : vue.createCommentVNode("", true),
237
238
  isVerifySuccess.value ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -242,33 +243,33 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
242
243
  vue.createElementVNode("img", {
243
244
  ref_key: "canvas",
244
245
  ref: canvas,
245
- class: "yu-slider-captcha-canvas",
246
+ class: "yu-framework-slider-captcha-canvas",
246
247
  width: _ctx.canvasWidth,
247
248
  height: _ctx.canvasHeight
248
249
  }, null, 8, _hoisted_3),
249
250
  vue.createElementVNode("img", {
250
251
  ref_key: "block",
251
252
  ref: block,
252
- class: vue.normalizeClass(["yu-slider-captcha-block", { "is-verify-fail": isVerifyFail.value }])
253
+ class: vue.normalizeClass(["yu-framework-slider-captcha-block", { "is-verify-fail": isVerifyFail.value }])
253
254
  }, null, 2),
254
255
  vue.createElementVNode("div", {
255
- class: vue.normalizeClass(["yu-slider-captcha-slider", { "is-verify-active": isVerifyActive.value, "is-verify-success": isVerifySuccess.value, "is-verify-fail": isVerifyFail.value }])
256
+ class: vue.normalizeClass(["yu-framework-slider-captcha-slider", { "is-verify-active": isVerifyActive.value, "is-verify-success": isVerifySuccess.value, "is-verify-fail": isVerifyFail.value }])
256
257
  }, [
257
258
  vue.createElementVNode("div", {
258
- class: "yu-slider-captcha-slider-box",
259
+ class: "yu-framework-slider-captcha-slider-box",
259
260
  style: vue.normalizeStyle({ width: sliderBoxWidth.value + "px" })
260
261
  }, [
261
262
  vue.createElementVNode("div", {
262
- class: "yu-slider-captcha-slider-button",
263
+ class: "yu-framework-slider-captcha-slider-button",
263
264
  id: "slider-button",
264
265
  style: vue.normalizeStyle({ left: sliderButtonLeft.value + "px" })
265
266
  }, [
266
267
  !isSliderSlide.value ? (vue.openBlock(), vue.createBlock(vue.unref(icons.SliderArrowStatic), {
267
268
  key: 0,
268
- class: "yu-slider-captcha-slider-button-icon yu-color-primary"
269
+ class: "yu-framework-slider-captcha-slider-button-icon yu-color-primary"
269
270
  })) : (vue.openBlock(), vue.createBlock(vue.unref(icons.SliderArrowSlide), {
270
271
  key: 1,
271
- class: "yu-slider-captcha-slider-button-icon yu-color-primary"
272
+ class: "yu-framework-slider-captcha-slider-button-icon yu-color-primary"
272
273
  }))
273
274
  ], 4)
274
275
  ], 4),
@@ -3,13 +3,13 @@ const vue = require("vue");
3
3
  const SliderCaptcha = require("./SliderCaptcha");
4
4
  const _hoisted_1 = {
5
5
  key: 0,
6
- class: "yu-slider-captcha-dialog"
6
+ class: "yu-framework-slider-captcha-dialog"
7
7
  };
8
- const _hoisted_2 = { class: "yu-slider-captcha-dialog-wrapper" };
9
- const _hoisted_3 = { class: "yu-slider-captcha-dialog yu-slider-captcha-slide-up" };
10
- const _hoisted_4 = { class: "yu-slider-captcha" };
8
+ const _hoisted_2 = { class: "yu-framework-slider-captcha-dialog-wrapper" };
9
+ const _hoisted_3 = { class: "yu-framework-slider-captcha-dialog yu-framework-slider-captcha-slide-up" };
10
+ const _hoisted_4 = { class: "yu-framework-slider-captcha" };
11
11
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
12
- ...{ name: "YuSliderCaptchaDialog" },
12
+ ...{ name: "YuFrameworkSliderCaptchaDialog" },
13
13
  __name: "index",
14
14
  emits: ["success", "fail", "close"],
15
15
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -43,7 +43,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
43
43
  });
44
44
  return (_ctx, _cache) => {
45
45
  return isShowSliderCaptcha.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
46
- _cache[0] || (_cache[0] = vue.createElementVNode("div", { class: "yu-slider-captcha-dialog-modal" }, null, -1)),
46
+ _cache[0] || (_cache[0] = vue.createElementVNode("div", { class: "yu-framework-slider-captcha-dialog-modal" }, null, -1)),
47
47
  vue.createElementVNode("div", _hoisted_2, [
48
48
  vue.createElementVNode("div", _hoisted_3, [
49
49
  vue.createElementVNode("div", _hoisted_4, [
@@ -2,8 +2,8 @@
2
2
  @use '../../style/default.scss' as *;
3
3
 
4
4
  /* 滑块验证码弹出框 */
5
- .yu-slider-captcha-dialog {
6
- .yu-slider-captcha-dialog-modal {
5
+ .yu-framework-slider-captcha-dialog {
6
+ .yu-framework-slider-captcha-dialog-modal {
7
7
  position: fixed;
8
8
  left: 0;
9
9
  top: 0;
@@ -15,7 +15,7 @@
15
15
  z-index: 1000;
16
16
  }
17
17
 
18
- .yu-slider-captcha-dialog-wrapper {
18
+ .yu-framework-slider-captcha-dialog-wrapper {
19
19
  position: fixed;
20
20
  top: 0;
21
21
  right: 0;
@@ -26,7 +26,7 @@
26
26
 
27
27
  z-index: 1001;
28
28
 
29
- .yu-slider-captcha-dialog {
29
+ .yu-framework-slider-captcha-dialog {
30
30
  // 在移动端禁止上下滑动,添加position: fixed;
31
31
  position: fixed;
32
32
  background: #fff;
@@ -47,15 +47,15 @@
47
47
 
48
48
  border-radius: 4px;
49
49
 
50
- .yu-slider-captcha {
50
+ .yu-framework-slider-captcha {
51
51
  }
52
52
  }
53
53
 
54
- .yu-slider-captcha-slide-up {
55
- animation: yu-slider-captcha-slide-up-animation 0.5s ease;
54
+ .yu-framework-slider-captcha-slide-up {
55
+ animation: yu-framework-slider-captcha-slide-up-animation 0.5s ease;
56
56
  }
57
57
 
58
- @keyframes yu-slider-captcha-slide-up-animation {
58
+ @keyframes yu-framework-slider-captcha-slide-up-animation {
59
59
  0% {
60
60
  transform: translate(-50%, 100%);
61
61
  }
@@ -70,18 +70,18 @@
70
70
 
71
71
 
72
72
  /* 滑块验证码弹容器 */
73
- .yu-slider-captcha {
74
- .yu-slider-captcha {
73
+ .yu-framework-slider-captcha {
74
+ .yu-framework-slider-captcha {
75
75
  position: relative;
76
76
  }
77
77
 
78
- .yu-slider-captcha-title {
78
+ .yu-framework-slider-captcha-title {
79
79
  position: relative;
80
80
  height: 30px;
81
81
  font-size: 16px;
82
82
  }
83
83
 
84
- .yu-slider-captcha-refresh-icon {
84
+ .yu-framework-slider-captcha-refresh-icon {
85
85
  position: absolute;
86
86
  right: 30px;
87
87
  top: 0;
@@ -94,11 +94,11 @@
94
94
  opacity: 0.7;
95
95
  }
96
96
 
97
- .yu-slider-captcha-refresh-icon:hover {
97
+ .yu-framework-slider-captcha-refresh-icon:hover {
98
98
  opacity: 1;
99
99
  }
100
100
 
101
- .yu-slider-captcha-close-icon {
101
+ .yu-framework-slider-captcha-close-icon {
102
102
  position: absolute;
103
103
  right: 0;
104
104
  top: 0;
@@ -111,20 +111,20 @@
111
111
  opacity: 0.7;
112
112
  }
113
113
 
114
- .yu-slider-captcha-close-icon:hover {
114
+ .yu-framework-slider-captcha-close-icon:hover {
115
115
  opacity: 1;
116
116
  }
117
117
  }
118
118
 
119
119
  /*图片加载样式*/
120
- .yu-slider-captcha-img-loading {
120
+ .yu-framework-slider-captcha-img-loading {
121
121
  position: absolute;
122
122
  top: 0;
123
123
  right: 0;
124
124
  left: 0;
125
125
  bottom: 0;
126
126
  z-index: 999;
127
- animation: yu-slider-captcha-loading 1.5s infinite;
127
+ animation: yu-framework-slider-captcha-loading 1.5s infinite;
128
128
  background-image: url(../images/loading.svg);
129
129
  background-repeat: no-repeat;
130
130
  background-position: center center;
@@ -133,7 +133,7 @@
133
133
  //border-radius: 5px;
134
134
  }
135
135
 
136
- @keyframes yu-slider-captcha-loading {
136
+ @keyframes yu-framework-slider-captcha-loading {
137
137
  0% {
138
138
  opacity: 0.7;
139
139
  }
@@ -170,12 +170,12 @@
170
170
  //}
171
171
 
172
172
  /*验证图片*/
173
- .yu-slider-captcha-canvas {
173
+ .yu-framework-slider-captcha-canvas {
174
174
  //border-radius: 5px;
175
175
  }
176
176
 
177
177
  /*阻塞块*/
178
- .yu-slider-captcha-block {
178
+ .yu-framework-slider-captcha-block {
179
179
  position: absolute;
180
180
  left: 0;
181
181
  top: 0;
@@ -184,12 +184,12 @@
184
184
  }
185
185
 
186
186
  /*校验失败时的阻塞块样式*/
187
- .yu-slider-captcha-block.is-verify-fail {
187
+ .yu-framework-slider-captcha-block.is-verify-fail {
188
188
  transition: left 0.5s linear;
189
189
  }
190
190
 
191
191
  /*滑动条*/
192
- .yu-slider-captcha-slider {
192
+ .yu-framework-slider-captcha-slider {
193
193
  position: relative;
194
194
  text-align: center;
195
195
  width: 100%;
@@ -206,7 +206,7 @@
206
206
  }
207
207
 
208
208
  /*滑动盒子*/
209
- .yu-slider-captcha-slider-box {
209
+ .yu-framework-slider-captcha-slider-box {
210
210
  position: absolute;
211
211
  left: 0;
212
212
  top: 0;
@@ -219,7 +219,7 @@
219
219
  }
220
220
 
221
221
  /*滑动按钮*/
222
- .yu-slider-captcha-slider-button {
222
+ .yu-framework-slider-captcha-slider-button {
223
223
  background-color: rgb(255, 255, 255);
224
224
  color: white;
225
225
  text-align: center;
@@ -240,17 +240,17 @@
240
240
  }
241
241
 
242
242
  /*鼠标悬浮时的按钮样式*/
243
- .yu-slider-captcha-slider-button:hover {
243
+ .yu-framework-slider-captcha-slider-button:hover {
244
244
  //background: #1991FA
245
245
  cursor: pointer;
246
246
  }
247
247
 
248
248
  /*鼠标悬浮时的按钮图标样式*/
249
- .yu-slider-captcha-slider-button:hover .yu-slider-captcha-slider-button-icon {
249
+ .yu-framework-slider-captcha-slider-button:hover .yu-framework-slider-captcha-slider-button-icon {
250
250
  }
251
251
 
252
252
  /*滑动按钮图标*/
253
- .yu-slider-captcha-slider-button-icon {
253
+ .yu-framework-slider-captcha-slider-button-icon {
254
254
  width: 32px;
255
255
  height: 32px;
256
256
  font-size: 24px;
@@ -266,13 +266,13 @@
266
266
  }
267
267
 
268
268
  /*校验时的滑动箱样式*/
269
- .is-verify-active .yu-slider-captcha-slider-box {
269
+ .is-verify-active .yu-framework-slider-captcha-slider-box {
270
270
  height: 40px;
271
271
  border-width: 1px;
272
272
  }
273
273
 
274
274
  /*校验成功时的滑动箱样式*/
275
- .is-verify-success .yu-slider-captcha-slider-box {
275
+ .is-verify-success .yu-framework-slider-captcha-slider-box {
276
276
  height: 40px;
277
277
  }
278
278
 
@@ -281,12 +281,12 @@
281
281
  }
282
282
 
283
283
  /*校验成功时的按钮图标样式*/
284
- .is-verify-success .yu-slider-captcha-slider-button-icon {
284
+ .is-verify-success .yu-framework-slider-captcha-slider-button-icon {
285
285
  background-position: 0 0 !important;
286
286
  }
287
287
 
288
288
  /*校验失败时的滑动箱样式*/
289
- .is-verify-fail .yu-slider-captcha-slider-box {
289
+ .is-verify-fail .yu-framework-slider-captcha-slider-box {
290
290
  transition: width 0.5s linear;
291
291
  }
292
292
 
@@ -296,5 +296,5 @@
296
296
  }
297
297
 
298
298
  /*校验失败时的按钮图标样式*/
299
- .is-verify-fail .yu-slider-captcha-slider-button-icon {
299
+ .is-verify-fail .yu-framework-slider-captcha-slider-button-icon {
300
300
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yuang-framework-ui-pc",
3
- "version": "1.1.40",
3
+ "version": "1.1.41",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite --host --config vite.global.ts --mode dev",