epic-designer-gold 0.0.39 → 0.0.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 (39) hide show
  1. package/dist/{attributeView-CWoguTGM.cjs → attributeView-BqbSwDZ-.cjs} +1 -1
  2. package/dist/{attributeView-CGtxobMF.js → attributeView-DPFdUi2O.js} +1 -1
  3. package/dist/form-2lbtG-zj.js +74 -0
  4. package/dist/form-BM53wx9g.cjs +1 -0
  5. package/dist/{index-F-tQsU_8.cjs → index-98NOkcrB.cjs} +1 -1
  6. package/dist/{index-C7VY8nRX.js → index-B0pq3LvX.js} +1 -1
  7. package/dist/{index-9xlsE_Mf.cjs → index-BMLwTmDA.cjs} +1 -1
  8. package/dist/{index-DBRz4gi5.js → index-BdghL1e1.js} +1 -1
  9. package/dist/{index-BBNxCX9U.cjs → index-Bjg8-hj_.cjs} +1 -1
  10. package/dist/{index-wxDrmXkw.js → index-Bm_2TXSs.js} +1 -1
  11. package/dist/{index-Bj6zKw82.js → index-BnYEEWhA.js} +351 -349
  12. package/dist/index-CDp439PR.cjs +10 -0
  13. package/dist/{index-Dan8DnTn.cjs → index-CRSk-fAu.cjs} +1 -1
  14. package/dist/{index-DFP-9KaA.js → index-CbiXuuBq.js} +1 -1
  15. package/dist/{index-DWKirflC.js → index-Cd9n7QSg.js} +1 -1
  16. package/dist/{index-CDzXkVHK.js → index-D9mE7-Ar.js} +2 -2
  17. package/dist/{index-ChGNJr_v.cjs → index-DUwQsRO_.cjs} +1 -1
  18. package/dist/{index-B7Uy532l.cjs → index-DeY6yw0s.cjs} +1 -1
  19. package/dist/index-DqXlNyYv.js +4 -0
  20. package/dist/{index-DCoUYKRW.cjs → index-FyzG-Fup.cjs} +1 -1
  21. package/dist/{index-DU0OYNvy.cjs → index-RaG5yFdp.cjs} +1 -1
  22. package/dist/{index-BALf0q8e.js → index-fHt4-rMq.js} +1 -1
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.js +1 -1
  25. package/dist/sign-BS8owiJT.cjs +1 -0
  26. package/dist/sign-DZvUIxel.js +155 -0
  27. package/dist/style.css +1 -1
  28. package/dist/{styleView-BHaWjsLQ.js → styleView-BC3ElYAX.js} +1 -1
  29. package/dist/{styleView-BgoSZRkZ.cjs → styleView-DT4vsrXY.cjs} +1 -1
  30. package/dist/ui/elementPlus/index.cjs +1 -1
  31. package/dist/ui/elementPlus/index.js +8 -8
  32. package/dist/{uploadImage-CYV7X1sG.js → uploadImage-tLXX1j6A.js} +12 -12
  33. package/package.json +1 -1
  34. package/dist/form-6cUK-Ari.js +0 -72
  35. package/dist/form-CthzLIgs.cjs +0 -1
  36. package/dist/index-9eiypGfJ.cjs +0 -10
  37. package/dist/index-By5d6rRB.js +0 -4
  38. package/dist/sign-BCmA2v-3.cjs +0 -1
  39. package/dist/sign-CSv8hClp.js +0 -149
@@ -1,149 +0,0 @@
1
- import { watch as j, nextTick as A, ref as a, onMounted as O, onUnmounted as U, openBlock as H, createElementBlock as I, normalizeStyle as N, createElementVNode as r, createVNode as x, unref as b, withCtx as w, createTextVNode as P } from "vue";
2
- import { p as E, a as F } from "./axios-ITY6Uw7A.js";
3
- import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- const L = { class: "btn" }, G = { class: "btns" }, J = {
5
- __name: "sign",
6
- props: {
7
- componentSchema: {
8
- type: Object,
9
- require: !0,
10
- default: () => ({})
11
- },
12
- modelValue: {
13
- type: String,
14
- default: ""
15
- }
16
- },
17
- emits: ["update:modelValue"],
18
- setup(S, { expose: _, emit: k }) {
19
- const h = E.getComponent("button"), T = k, n = S;
20
- j(
21
- () => n.componentSchema,
22
- () => {
23
- A(() => {
24
- v();
25
- });
26
- },
27
- { deep: !0, immediate: !0 }
28
- );
29
- const C = new ResizeObserver((t) => {
30
- for (const e of t)
31
- e.target && e.target.clientWidth && e.target.clientHeight && v();
32
- }), l = a(null), s = a(null), o = a(), D = a("");
33
- function v() {
34
- var t, e;
35
- if (s.value && ((t = s.value) != null && t.clientHeight) && ((e = s.value) != null && e.clientWidth)) {
36
- if (l.value.height = s.value.clientHeight, l.value.width = s.value.clientWidth, o.value = l.value.getContext("2d"), n.modelValue) {
37
- let u = new Image();
38
- u.src = n.modelValue, u.setAttribute("crossOrigin", "anonymous"), u.onload = () => {
39
- o.value.fillStyle = o.value.createPattern(u, "repeat"), o.value.fillRect(0, 0, 1e3, 550);
40
- };
41
- }
42
- o.value.lineWidth = n.componentSchema.componentProps.lineWidth || 4, n.componentSchema && n.componentSchema.componentProps && n.componentSchema.componentProps.style && n.componentSchema.componentProps.style.color && (o.value.strokeStyle = n.componentSchema.componentProps.style.color), D.value = l.value.getBoundingClientRect();
43
- }
44
- }
45
- const c = a(""), p = a(""), V = a(""), W = a(""), i = a([]), f = a(!1);
46
- function B(t) {
47
- t = t || event, t.preventDefault();
48
- let e = {
49
- x: t.offsetX,
50
- y: t.offsetY
51
- };
52
- c.value = e.x, p.value = e.y, o.value.beginPath(), o.value.moveTo(e.x, e.y), o.value.lineTo(e.x, e.y), o.value.stroke(), o.value.closePath(), i.value.push(e), f.value = !0;
53
- }
54
- function M(t) {
55
- if (t = t || event, t.preventDefault(), f.value) {
56
- let e = {
57
- x: t.offsetX,
58
- y: t.offsetY
59
- };
60
- V.value = e.x, W.value = e.y, o.value.beginPath(), o.value.moveTo(c.value, p.value), o.value.lineTo(e.x, e.y), o.value.stroke(), o.value.closePath(), c.value = e.x, p.value = e.y, i.value.push(e);
61
- }
62
- }
63
- function z(t) {
64
- t = t || event, t.preventDefault();
65
- let e = {
66
- x: t.offsetX,
67
- y: t.offsetY
68
- };
69
- o.value.beginPath(), o.value.moveTo(c.value, p.value), o.value.lineTo(e.x, e.y), o.value.stroke(), o.value.closePath(), i.value.push(e), i.value.push({ x: -1, y: -1 }), f.value = !1;
70
- }
71
- function y() {
72
- o.value.clearRect(0, 0, l.value.width, l.value.height), i.value = [];
73
- }
74
- async function d() {
75
- let t = await R(l.value.toDataURL("image/png"));
76
- T("update:modelValue", t);
77
- }
78
- async function R(t) {
79
- let e = atob(t.split(",")[1]), u = new ArrayBuffer(e.length), X = new Uint8Array(u);
80
- for (let m = 0; m < e.length; m++)
81
- X[m] = e.charCodeAt(m);
82
- let Y = new Blob([u], { type: "image/png" }), g = new FormData();
83
- return g.append("file", Y, Date.now() + "png"), (await F({
84
- method: "post",
85
- url: "https://ess-ds.com/prod-api/center-file/file/upload",
86
- data: g,
87
- headers: {
88
- "Content-Type": "multipart/form-data"
89
- }
90
- })).data.data.url;
91
- }
92
- return O(() => {
93
- v(), C.observe(s.value);
94
- }), U(() => {
95
- }), _({
96
- surewrite: d
97
- }), (t, e) => (H(), I("div", {
98
- class: "sign",
99
- style: N({
100
- height: n.componentSchema.componentProps.style.height,
101
- width: n.componentSchema.componentProps.style.width || "100%"
102
- })
103
- }, [
104
- r("div", {
105
- class: "canvas",
106
- ref_key: "canvasWrap",
107
- ref: s
108
- }, [
109
- r("canvas", {
110
- ref_key: "canvas",
111
- ref: l,
112
- onMousedown: B,
113
- onMousemove: M,
114
- onMouseup: z
115
- }, null, 544)
116
- ], 512),
117
- r("div", L, [
118
- e[2] || (e[2] = r("div", { class: "remark" }, null, -1)),
119
- r("div", G, [
120
- x(b(h), {
121
- type: "info",
122
- size: "mini",
123
- onClick: y,
124
- onTouch: y
125
- }, {
126
- default: w(() => e[0] || (e[0] = [
127
- P("重写")
128
- ])),
129
- _: 1
130
- }),
131
- x(b(h), {
132
- type: "primary",
133
- size: "mini",
134
- onClick: d,
135
- onTouch: d
136
- }, {
137
- default: w(() => e[1] || (e[1] = [
138
- P("确定")
139
- ])),
140
- _: 1
141
- })
142
- ])
143
- ])
144
- ], 4));
145
- }
146
- }, ee = /* @__PURE__ */ q(J, [["__scopeId", "data-v-e6820cdc"]]);
147
- export {
148
- ee as default
149
- };