hlrender 0.0.140 → 0.0.141

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 (52) hide show
  1. package/{affix-widget-e7798066.js → affix-widget-a737c7ee.js} +2 -2
  2. package/{alert-widget-62aff3a6.js → alert-widget-8b1a3cb2.js} +2 -2
  3. package/{auto-complete-widget-9f4d5f7b.js → auto-complete-widget-657217e2.js} +1 -1
  4. package/{avatar-widget-952882d9.js → avatar-widget-ce107740.js} +2 -2
  5. package/{backtop-widget-cff373c8.js → backtop-widget-61864890.js} +2 -2
  6. package/{badge-widget-334d56fb.js → badge-widget-5b52c593.js} +2 -2
  7. package/{button-widget-fd0d1f85.js → button-widget-64411af8.js} +2 -2
  8. package/{card-widget-989a1469.js → card-widget-8ecd62ba.js} +1 -1
  9. package/{cont-cell-widget-ba7cd2a7.js → cont-cell-widget-a084ba96.js} +1 -1
  10. package/{cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-b6a750ee.js → cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-116cf90b.js} +1 -1
  11. package/{cont-widget-85f85933.js → cont-widget-885866dd.js} +1 -1
  12. package/{default-slot-widget-2293bd1d.js → default-slot-widget-16b715d3.js} +2 -2
  13. package/{default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-1f74e994.js → default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-5f96bf33.js} +1 -1
  14. package/{descriptions-widget-2e0c004c.js → descriptions-widget-90666a0c.js} +1 -1
  15. package/{dialog-widget-a369a3e6.js → dialog-widget-83153edb.js} +2 -2
  16. package/{divider-widget-2f432df7.js → divider-widget-a5380f12.js} +2 -2
  17. package/{drag-wrapper-a8450f3c.js → drag-wrapper-a41e4e4a.js} +1 -1
  18. package/{drawer-widget-1f000c3c.js → drawer-widget-74538cc8.js} +2 -2
  19. package/{dropdown-widget-d275b613.js → dropdown-widget-608c187a.js} +1 -1
  20. package/{empty-widget-a28f146d.js → empty-widget-39271da6.js} +2 -2
  21. package/{feedback-widget-2f35f513.js → feedback-widget-65b2ee5e.js} +2 -2
  22. package/{feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-13030f0c.js → feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-7674faf7.js} +1 -1
  23. package/{file-upload-widget-ea9b32c2.js → file-upload-widget-1c4b110f.js} +1 -1
  24. package/{form-widget-6f7eaf39.js → form-widget-cfe94be7.js} +1 -1
  25. package/{grid-col-widget-a0fba7ab.js → grid-col-widget-93e33bd4.js} +1 -1
  26. package/{grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-f42dc4d4.js → grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-309d2f9f.js} +1 -1
  27. package/{grid-widget-fa0867c3.js → grid-widget-3f8162fa.js} +1 -1
  28. package/{input-widget-0d3d3ee0.js → input-widget-fe3825ca.js} +1 -1
  29. package/{link-widget-843c1236.js → link-widget-eebc899d.js} +2 -2
  30. package/{ltable-col-widget-fbfab46e.js → ltable-col-widget-40a9d9e8.js} +1 -1
  31. package/{ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-58833baa.js → ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-e620be2a.js} +1 -1
  32. package/{ltable-widget-9a34d74f.js → ltable-widget-15f7b5cf.js} +1 -1
  33. package/{multirow-widget-b60b1428.js → multirow-widget-7f405b12.js} +1 -1
  34. package/package.json +1 -1
  35. package/{progress-widget-2acd7cd5.js → progress-widget-030ea367.js} +1 -1
  36. package/{range-widget-b807b64a.js → range-widget-40a76c41.js} +1 -1
  37. package/render.es.js +15 -15
  38. package/render.style.css +1 -1
  39. package/render.umd.js +1 -1
  40. package/{result-widget-84c65928.js → result-widget-715ac70b.js} +1 -1
  41. package/{tab-pane-widget-50780c7f.js → tab-pane-widget-8f0736df.js} +1 -1
  42. package/{tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-a16718fa.js → tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-aab8112c.js} +1 -1
  43. package/{table-col-widget-8a0d855a.js → table-col-widget-b8122cb3.js} +2 -2
  44. package/{table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-f5e913d7.js → table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-8ceae49b.js} +1 -1
  45. package/{table-widget-9a7dac8f.js → table-widget-fed98a7b.js} +2 -2
  46. package/{tabs-widget-7469b515.js → tabs-widget-6b989952.js} +1 -1
  47. package/{tag-widget-34f24c18.js → tag-widget-c025c651.js} +2 -2
  48. package/{text-widget-22b4e468.js → text-widget-468b9ac4.js} +2 -2
  49. package/{tmpl-widget-ae841f04.js → tmpl-widget-3f31c5c4.js} +1 -1
  50. package/verifycode-widget-5c78d538.js +167 -0
  51. package/{wrapper-widget-827d047f.js → wrapper-widget-59375ab9.js} +1 -1
  52. package/verifycode-widget-85b3d2b4.js +0 -163
@@ -0,0 +1,167 @@
1
+ import { defineComponent as g, ref as v, onMounted as N, watch as k, openBlock as w, createElementBlock as S, createElementVNode as x, computed as C, nextTick as H, createBlock as P, mergeProps as b, unref as u, withCtx as W, createVNode as I } from "vue";
2
+ import { w as V } from "./expression-8b6f7687.js";
3
+ import { I as z } from "./field-base-5547436d.js";
4
+ import { b as T } from "./share-field-400ac785.js";
5
+ import { _ as B } from "./widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-cb6e938b.js";
6
+ import { R as E } from "./enum-type-f3133577.js";
7
+ import { _ as R } from "./_plugin-vue_export-helper-dad06003.js";
8
+ import "./source-map-b04aec4a.js";
9
+ import "./uuid-4999945f.js";
10
+ import "./_commonjsHelpers-e7ea1525.js";
11
+ import "./esprima-e8d15055.js";
12
+ import "./widget-base-4c2d6265.js";
13
+ import "./multirow-58ad99da.js";
14
+ import "./baseImp-df7b65ff.js";
15
+ import "./enum-type-58e23005.js";
16
+ import "./icon-a0e0cdb0.js";
17
+ import "./dialog-9acc103b.js";
18
+ import "element-plus";
19
+ import "./index-979d8892.js";
20
+ import "./slot-6c074606.js";
21
+ import "./index-da0d157b.js";
22
+ import "./fieldobj-a02ef2e2.js";
23
+ const F = { class: "s-canvas" }, L = ["width", "height"], $ = /* @__PURE__ */ g({
24
+ __name: "_index",
25
+ props: {
26
+ identifyCode: {
27
+ type: String,
28
+ default: "1234"
29
+ },
30
+ fontSizeMin: {
31
+ type: Number,
32
+ default: 25
33
+ },
34
+ fontSizeMax: {
35
+ type: Number,
36
+ default: 35
37
+ },
38
+ backgroundColorMin: {
39
+ type: Number,
40
+ default: 255
41
+ },
42
+ backgroundColorMax: {
43
+ type: Number,
44
+ default: 255
45
+ },
46
+ colorMin: {
47
+ type: Number,
48
+ default: 0
49
+ },
50
+ colorMax: {
51
+ type: Number,
52
+ default: 160
53
+ },
54
+ lineColorMin: {
55
+ type: Number,
56
+ default: 40
57
+ },
58
+ lineColorMax: {
59
+ type: Number,
60
+ default: 180
61
+ },
62
+ dotColorMin: {
63
+ type: Number,
64
+ default: 0
65
+ },
66
+ dotColorMax: {
67
+ type: Number,
68
+ default: 255
69
+ },
70
+ contentWidth: {
71
+ type: Number,
72
+ default: 112
73
+ },
74
+ contentHeight: {
75
+ type: Number,
76
+ default: 40
77
+ }
78
+ },
79
+ setup(d) {
80
+ const t = d, m = v(), n = (e, o) => Math.floor(Math.random() * (o - e) + e), s = (e, o) => {
81
+ let i = n(e, o), l = n(e, o), f = n(e, o);
82
+ return "rgb(" + i + "," + l + "," + f + ")";
83
+ }, c = (e) => {
84
+ for (let o = 0; o < 5; o++)
85
+ e.strokeStyle = s(t.lineColorMin, t.lineColorMax), e.beginPath(), e.moveTo(n(0, t.contentWidth), n(0, t.contentHeight)), e.lineTo(n(0, t.contentWidth), n(0, t.contentHeight)), e.stroke();
86
+ }, _ = (e, o, i) => {
87
+ e.fillStyle = s(t.colorMin, t.colorMax), e.font = n(t.fontSizeMin, t.fontSizeMax) + "px SimHei";
88
+ let l = (i + 1) * (t.contentWidth / (t.identifyCode.length + 1)), f = n(t.fontSizeMax, t.contentHeight - 5);
89
+ var h = n(-45, 45);
90
+ e.translate(l, f), e.rotate(h * Math.PI / 180), e.fillText(o, 0, 0), e.rotate(-h * Math.PI / 180), e.translate(-l, -f);
91
+ }, y = (e) => {
92
+ for (let o = 0; o < 80; o++)
93
+ e.fillStyle = s(0, 255), e.beginPath(), e.arc(n(0, t.contentWidth), n(0, t.contentHeight), 1, 0, 2 * Math.PI), e.fill();
94
+ }, a = () => {
95
+ let e = m.value, o = e == null ? void 0 : e.getContext("2d");
96
+ o.textBaseline = "bottom", o.fillStyle = s(t.backgroundColorMin, t.backgroundColorMax), o.fillRect(0, 0, t.contentWidth, t.contentHeight);
97
+ for (let i = 0; i < t.identifyCode.length; i++)
98
+ _(o, t.identifyCode[i], i);
99
+ c(o), y(o);
100
+ };
101
+ return N(() => {
102
+ a();
103
+ }), k(
104
+ () => t.identifyCode,
105
+ (e) => {
106
+ e && a();
107
+ }
108
+ ), (e, o) => (w(), S("div", F, [
109
+ x("canvas", {
110
+ ref_key: "canavsRef",
111
+ ref: m,
112
+ width: t.contentWidth,
113
+ height: t.contentHeight
114
+ }, null, 8, L)
115
+ ]));
116
+ }
117
+ });
118
+ const j = /* @__PURE__ */ R($, [["__scopeId", "data-v-10737829"]]), A = (d, t) => (t = t + 1, Math.floor(Math.random() * (t - d) + d)), O = g({ componentName: V.FieldWidget }), pe = /* @__PURE__ */ g({
119
+ ...O,
120
+ __name: "verifycode-widget",
121
+ props: { ...z },
122
+ setup(d, { expose: t }) {
123
+ const m = d, { fieldEditor: n, exposed: s, extendAttrs: c, attrs: _, fieldObj: y } = T(m);
124
+ let a = v(""), e = C(() => {
125
+ var r;
126
+ return (r = c.value) == null ? void 0 : r.content;
127
+ }), o = C(() => {
128
+ var r;
129
+ return (r = c.value) == null ? void 0 : r.identifyCodeLen;
130
+ });
131
+ const i = (r, M) => {
132
+ for (let p = 0; p < M; p++)
133
+ a.value += r[A(0, r.length)];
134
+ }, l = () => {
135
+ a.value = "", i(e.value, o.value);
136
+ }, f = () => a.value, h = (r) => {
137
+ a.value = r;
138
+ };
139
+ return k(() => _.value, (r) => {
140
+ H(() => {
141
+ l();
142
+ });
143
+ }), N(() => {
144
+ l();
145
+ }), t({ ...s, refresh: l, getValue: f, setValue: h }), (r, M) => (w(), P(B, b(r.$props, {
146
+ "prop-options": { fieldObj: u(y) }
147
+ }), {
148
+ default: W(() => {
149
+ var p;
150
+ return [
151
+ I(j, b({
152
+ ref_key: "fieldEditor",
153
+ ref: n
154
+ }, u(_), {
155
+ "identify-code": u(a),
156
+ class: u(E)((p = u(c)) == null ? void 0 : p.customClass),
157
+ onClick: l
158
+ }), null, 16, ["identify-code", "class"])
159
+ ];
160
+ }),
161
+ _: 1
162
+ }, 16, ["prop-options"]));
163
+ }
164
+ });
165
+ export {
166
+ pe as default
167
+ };
@@ -1,6 +1,6 @@
1
1
  import { ref as y, watch as L, defineComponent as h, resolveDirective as j, openBlock as b, createBlock as D, mergeProps as W, unref as s, withCtx as O, withDirectives as P, createElementBlock as x, normalizeClass as z, createVNode as R, createCommentVNode as S } from "vue";
2
2
  import { I as k } from "./widget-base-4c2d6265.js";
3
- import { D as A } from "./drag-wrapper-a8450f3c.js";
3
+ import { D as A } from "./drag-wrapper-a41e4e4a.js";
4
4
  import { _ as B } from "./widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-cb6e938b.js";
5
5
  import { w as F } from "./expression-8b6f7687.js";
6
6
  import { W as v } from "./enum-type-58e23005.js";
@@ -1,163 +0,0 @@
1
- import { defineComponent as y, onMounted as k, watch as b, openBlock as v, createElementBlock as w, createElementVNode as S, ref as x, computed as M, nextTick as H, createBlock as P, mergeProps as C, unref as u, withCtx as W, createVNode as I } from "vue";
2
- import { w as V } from "./expression-8b6f7687.js";
3
- import { I as z } from "./field-base-5547436d.js";
4
- import { b as B } from "./share-field-400ac785.js";
5
- import { _ as E } from "./widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-cb6e938b.js";
6
- import { R as T } from "./enum-type-f3133577.js";
7
- import { _ as F } from "./_plugin-vue_export-helper-dad06003.js";
8
- import "./source-map-b04aec4a.js";
9
- import "./uuid-4999945f.js";
10
- import "./_commonjsHelpers-e7ea1525.js";
11
- import "./esprima-e8d15055.js";
12
- import "./widget-base-4c2d6265.js";
13
- import "./multirow-58ad99da.js";
14
- import "./baseImp-df7b65ff.js";
15
- import "./enum-type-58e23005.js";
16
- import "./icon-a0e0cdb0.js";
17
- import "./dialog-9acc103b.js";
18
- import "element-plus";
19
- import "./index-979d8892.js";
20
- import "./slot-6c074606.js";
21
- import "./index-da0d157b.js";
22
- import "./fieldobj-a02ef2e2.js";
23
- const L = { class: "s-canvas" }, $ = ["width", "height"], j = /* @__PURE__ */ y({
24
- __name: "_index",
25
- props: {
26
- identifyCode: {
27
- type: String,
28
- default: "1234"
29
- },
30
- fontSizeMin: {
31
- type: Number,
32
- default: 25
33
- },
34
- fontSizeMax: {
35
- type: Number,
36
- default: 35
37
- },
38
- backgroundColorMin: {
39
- type: Number,
40
- default: 255
41
- },
42
- backgroundColorMax: {
43
- type: Number,
44
- default: 255
45
- },
46
- colorMin: {
47
- type: Number,
48
- default: 0
49
- },
50
- colorMax: {
51
- type: Number,
52
- default: 160
53
- },
54
- lineColorMin: {
55
- type: Number,
56
- default: 40
57
- },
58
- lineColorMax: {
59
- type: Number,
60
- default: 180
61
- },
62
- dotColorMin: {
63
- type: Number,
64
- default: 0
65
- },
66
- dotColorMax: {
67
- type: Number,
68
- default: 255
69
- },
70
- contentWidth: {
71
- type: Number,
72
- default: 112
73
- },
74
- contentHeight: {
75
- type: Number,
76
- default: 40
77
- }
78
- },
79
- setup(a) {
80
- const t = a, n = (e, o) => Math.floor(Math.random() * (o - e) + e), d = (e, o) => {
81
- let i = n(e, o), s = n(e, o), l = n(e, o);
82
- return "rgb(" + i + "," + s + "," + l + ")";
83
- }, h = (e) => {
84
- for (let o = 0; o < 5; o++)
85
- e.strokeStyle = d(t.lineColorMin, t.lineColorMax), e.beginPath(), e.moveTo(n(0, t.contentWidth), n(0, t.contentHeight)), e.lineTo(n(0, t.contentWidth), n(0, t.contentHeight)), e.stroke();
86
- }, c = (e, o, i) => {
87
- e.fillStyle = d(t.colorMin, t.colorMax), e.font = n(t.fontSizeMin, t.fontSizeMax) + "px SimHei";
88
- let s = (i + 1) * (t.contentWidth / (t.identifyCode.length + 1)), l = n(t.fontSizeMax, t.contentHeight - 5);
89
- var _ = n(-45, 45);
90
- e.translate(s, l), e.rotate(_ * Math.PI / 180), e.fillText(o, 0, 0), e.rotate(-_ * Math.PI / 180), e.translate(-s, -l);
91
- }, p = (e) => {
92
- for (let o = 0; o < 80; o++)
93
- e.fillStyle = d(0, 255), e.beginPath(), e.arc(n(0, t.contentWidth), n(0, t.contentHeight), 1, 0, 2 * Math.PI), e.fill();
94
- }, m = () => {
95
- let e = document.getElementById("s-canvas"), o = e == null ? void 0 : e.getContext("2d");
96
- o.textBaseline = "bottom", o.fillStyle = d(t.backgroundColorMin, t.backgroundColorMax), o.fillRect(0, 0, t.contentWidth, t.contentHeight);
97
- for (let i = 0; i < t.identifyCode.length; i++)
98
- c(o, t.identifyCode[i], i);
99
- h(o), p(o);
100
- };
101
- return k(() => {
102
- m();
103
- }), b(
104
- () => t.identifyCode,
105
- () => {
106
- m();
107
- }
108
- ), (e, o) => (v(), w("div", L, [
109
- S("canvas", {
110
- id: "s-canvas",
111
- width: t.contentWidth,
112
- height: t.contentHeight
113
- }, null, 8, $)
114
- ]));
115
- }
116
- });
117
- const A = /* @__PURE__ */ F(j, [["__scopeId", "data-v-176289d1"]]), O = (a, t) => (t = t + 1, Math.floor(Math.random() * (t - a) + a)), R = y({ componentName: V.FieldWidget }), ue = /* @__PURE__ */ y({
118
- ...R,
119
- __name: "verifycode-widget",
120
- props: { ...z },
121
- setup(a, { expose: t }) {
122
- const n = a, { fieldEditor: d, exposed: h, extendAttrs: c, attrs: p, fieldObj: m } = B(n);
123
- let e = x(""), o = M(() => {
124
- var r;
125
- return (r = c.value) == null ? void 0 : r.content;
126
- }), i = M(() => {
127
- var r;
128
- return (r = c.value) == null ? void 0 : r.identifyCodeLen;
129
- });
130
- const s = (r, g) => {
131
- for (let f = 0; f < g; f++)
132
- e.value += r[O(0, r.length)];
133
- }, l = () => {
134
- e.value = "", s(o.value, i.value);
135
- }, _ = () => e.value, N = (r) => {
136
- e.value = r;
137
- };
138
- return b(() => p.value, (r) => {
139
- H(() => {
140
- l();
141
- });
142
- }, { immediate: !0 }), t({ ...h, refresh: l, getValue: _, setValue: N }), (r, g) => (v(), P(E, C(r.$props, {
143
- "prop-options": { fieldObj: u(m) }
144
- }), {
145
- default: W(() => {
146
- var f;
147
- return [
148
- I(A, C({
149
- ref_key: "fieldEditor",
150
- ref: d
151
- }, u(p), {
152
- "identify-code": u(e),
153
- class: u(T)((f = u(c)) == null ? void 0 : f.customClass)
154
- }), null, 16, ["identify-code", "class"])
155
- ];
156
- }),
157
- _: 1
158
- }, 16, ["prop-options"]));
159
- }
160
- });
161
- export {
162
- ue as default
163
- };