epic-designer-gold 0.0.38 → 0.0.40
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/dist/{attributeView-CWoguTGM.cjs → attributeView-BjvAO4_R.cjs} +1 -1
- package/dist/{attributeView-CGtxobMF.js → attributeView-PbDEjn8T.js} +1 -1
- package/dist/form-2lbtG-zj.js +74 -0
- package/dist/form-BM53wx9g.cjs +1 -0
- package/dist/{index-DBRz4gi5.js → index-5datIIzJ.js} +1 -1
- package/dist/{index-DCoUYKRW.cjs → index-BUBtVoa0.cjs} +1 -1
- package/dist/{index-Bj6zKw82.js → index-BZQLip5V.js} +443 -440
- package/dist/{index-B7Uy532l.cjs → index-C2ioP4Qy.cjs} +1 -1
- package/dist/{index-BBNxCX9U.cjs → index-C3hWImRT.cjs} +1 -1
- package/dist/{index-DFP-9KaA.js → index-C95DVYrN.js} +1 -1
- package/dist/{index-wxDrmXkw.js → index-CE7JKdc3.js} +1 -1
- package/dist/index-Cpm-oLdy.js +4 -0
- package/dist/{index-F-tQsU_8.cjs → index-CzOycR7-.cjs} +1 -1
- package/dist/index-D3RJLUGU.cjs +10 -0
- package/dist/{index-Dan8DnTn.cjs → index-DHHX2mwy.cjs} +1 -1
- package/dist/{index-ChGNJr_v.cjs → index-DQjDcBV5.cjs} +1 -1
- package/dist/{index-DU0OYNvy.cjs → index-Da3mrdHZ.cjs} +1 -1
- package/dist/{index-CDzXkVHK.js → index-Da8OPaOM.js} +2 -2
- package/dist/{index-C7VY8nRX.js → index-DxkPriDk.js} +1 -1
- package/dist/{index-DWKirflC.js → index-l1DO3QH_.js} +1 -1
- package/dist/{index-9xlsE_Mf.cjs → index-l4brKgI9.cjs} +1 -1
- package/dist/{index-BALf0q8e.js → index-laQFS5Nd.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/sign-BS8owiJT.cjs +1 -0
- package/dist/sign-DZvUIxel.js +155 -0
- package/dist/style.css +1 -1
- package/dist/{styleView-BHaWjsLQ.js → styleView-LX_E7EFf.js} +1 -1
- package/dist/{styleView-BgoSZRkZ.cjs → styleView-oaDQbGne.cjs} +1 -1
- package/dist/ui/antd/index.cjs +2 -2
- package/dist/ui/antd/index.js +2 -2
- package/dist/ui/elementPlus/index.cjs +1 -1
- package/dist/ui/elementPlus/index.js +14 -14
- package/dist/ui/naiveUi/index.cjs +1 -1
- package/dist/ui/naiveUi/index.js +13 -13
- package/dist/{uploadImage-CYV7X1sG.js → uploadImage-tLXX1j6A.js} +12 -12
- package/package.json +1 -1
- package/dist/form-6cUK-Ari.js +0 -72
- package/dist/form-CthzLIgs.cjs +0 -1
- package/dist/index-9eiypGfJ.cjs +0 -10
- package/dist/index-By5d6rRB.js +0 -4
- package/dist/sign-BCmA2v-3.cjs +0 -1
- package/dist/sign-CSv8hClp.js +0 -149
package/dist/sign-CSv8hClp.js
DELETED
|
@@ -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
|
-
};
|