epic-designer-gold 1.0.35 → 1.0.37
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-CDOlTCej.cjs → attributeView-BTH9azyB.cjs} +1 -1
- package/dist/{attributeView-BsBiqVGu.js → attributeView-CDem_ES8.js} +1 -1
- package/dist/form-BcyswgAo.cjs +1 -0
- package/dist/{form-BaNhucdK.js → form-CcUK0W1z.js} +73 -69
- package/dist/{index-lkwgM-Nx.js → index-B-CXu5E4.js} +1 -1
- package/dist/{index-CBKTyKT5.cjs → index-B9Wg0OhT.cjs} +1 -1
- package/dist/{index-C0sL_Cow.cjs → index-BEh2QNCv.cjs} +1 -1
- package/dist/{index-u1-3v7J4.js → index-BcqJCHqF.js} +1 -1
- package/dist/{index-zxpOBir-.js → index-BtHv1yZo.js} +1 -1
- package/dist/{index-CqmYHiDr.cjs → index-C9azM5P0.cjs} +1 -1
- package/dist/{index-Ch0kn_uQ.js → index-CTeq7qi8.js} +1 -1
- package/dist/index-CXkyECv6.cjs +10 -0
- package/dist/{index-Bv6UOkMb.cjs → index-C_yxhoSP.cjs} +1 -1
- package/dist/{index-BCfsLh0H.js → index-CjRCetGY.js} +237 -238
- package/dist/{index-PjUZVUx6.cjs → index-DCixZvy_.cjs} +1 -1
- package/dist/{index-D8diDndG.js → index-DWNK2WbN.js} +1 -1
- package/dist/{index-EU7IKyES.cjs → index-DYItQsu1.cjs} +1 -1
- package/dist/{index-wjKD4mBu.cjs → index-Dgm8C1cw.cjs} +1 -1
- package/dist/{index-BelKUDOu.js → index-DhC_pgAC.js} +1 -1
- package/dist/{index-Dh-5bgQx.cjs → index-Dk-o3v2v.cjs} +1 -1
- package/dist/{index-BK6ipjbo.cjs → index-Dz2rmUzG.cjs} +1 -1
- package/dist/{index-6ehvFk8m.js → index-PJBBvGIL.js} +1 -1
- package/dist/{index-CP9mOhqZ.cjs → index-U1_FTPaZ.cjs} +1 -1
- package/dist/{index-57Jo44dB.js → index-Zf435cWW.js} +1 -1
- package/dist/{index-nvc1uY17.js → index-aPG4tpxN.js} +1 -1
- package/dist/index-edBSFxZI.js +4 -0
- package/dist/{index-Ce2UbX3P.cjs → index-i1OdHmT9.cjs} +1 -1
- package/dist/{index-BQGUEUhF.js → index-q9yvq5KO.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/ocrUpload-CBzBe8ro.cjs +1 -0
- package/dist/{ocrUpload-Cxxs1GtD.js → ocrUpload-DVHm3yls.js} +54 -52
- package/dist/{sign-B1wFFef_.cjs → sign-BWCF3Rru.cjs} +1 -1
- package/dist/{sign-mjic2rIw.js → sign-D5uFYJi9.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styleView-sZrNBCuS.cjs → styleView-BgS1xwp3.cjs} +1 -1
- package/dist/{styleView-DXePdHW5.js → styleView-NkYOpZPH.js} +1 -1
- package/dist/ui/elementPlus/index.cjs +1 -1
- package/dist/ui/elementPlus/index.js +3 -3
- package/package.json +1 -1
- package/dist/form-DvdMrtVG.cjs +0 -1
- package/dist/index-4NyY4OrM.cjs +0 -10
- package/dist/index-BNgMDVXO.js +0 -4
- package/dist/ocrUpload-CMskfGHX.cjs +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as _, ref as w, watch as W, inject as N, computed as O, h as n, nextTick as T } from "vue";
|
|
2
|
-
import { ElUpload as $, ElButton as H, ElImageViewer as q, ElMessage as
|
|
2
|
+
import { ElUpload as $, ElButton as H, ElImageViewer as q, ElMessage as h } from "element-plus";
|
|
3
3
|
import { a as G, u as J } from "./index-B1s67XDZ.js";
|
|
4
|
-
const { t:
|
|
4
|
+
const { t: P } = J(), Y = _({
|
|
5
5
|
props: {
|
|
6
6
|
modelValue: {
|
|
7
7
|
type: Array,
|
|
@@ -16,7 +16,7 @@ const { t: z } = J(), Y = _({
|
|
|
16
16
|
W(s, (o) => {
|
|
17
17
|
I("update:modelValue", o);
|
|
18
18
|
});
|
|
19
|
-
const
|
|
19
|
+
const p = N("disabled", { value: !1 });
|
|
20
20
|
W(
|
|
21
21
|
() => E.modelValue,
|
|
22
22
|
(o) => {
|
|
@@ -27,27 +27,27 @@ const { t: z } = J(), Y = _({
|
|
|
27
27
|
},
|
|
28
28
|
{ deep: !0, immediate: !0 }
|
|
29
29
|
);
|
|
30
|
-
const R = (o,
|
|
30
|
+
const R = (o, t) => {
|
|
31
31
|
T(() => {
|
|
32
|
-
k ? (s.value =
|
|
33
|
-
(
|
|
32
|
+
k ? (s.value = t.filter(
|
|
33
|
+
(l) => {
|
|
34
34
|
var c, i;
|
|
35
|
-
return ((c =
|
|
35
|
+
return ((c = l == null ? void 0 : l.response) == null ? void 0 : c.code) === 200 || ((i = l == null ? void 0 : l.response) == null ? void 0 : i.code) === 201;
|
|
36
36
|
}
|
|
37
|
-
), k = !1) : s.value =
|
|
37
|
+
), k = !1) : s.value = t;
|
|
38
38
|
});
|
|
39
39
|
}, B = (o) => {
|
|
40
|
-
var d,
|
|
41
|
-
let
|
|
42
|
-
if (!
|
|
43
|
-
const
|
|
44
|
-
i ? (v.value =
|
|
40
|
+
var d, u, f;
|
|
41
|
+
let t = o.url || ((u = (d = o == null ? void 0 : o.response) == null ? void 0 : d.data) == null ? void 0 : u.url);
|
|
42
|
+
if (!t) return;
|
|
43
|
+
const l = [".jpg", ".jpeg", ".png", ".gif", ".svg", ".bmp", ".webp"], c = ((f = o.name) == null ? void 0 : f.toLowerCase()) || "", i = l.some((g) => c.endsWith(g)), m = c.endsWith(".pdf");
|
|
44
|
+
i ? (v.value = t, C.value = !1, y(!0)) : m ? (v.value = t, C.value = !0, y(!0)) : window.open(t);
|
|
45
45
|
}, L = (o) => {
|
|
46
|
-
var i, m, d,
|
|
47
|
-
const
|
|
48
|
-
if (
|
|
49
|
-
const
|
|
50
|
-
if (!
|
|
46
|
+
var i, m, d, u, f;
|
|
47
|
+
const t = (m = (i = e.componentSchema) == null ? void 0 : i.componentProps) == null ? void 0 : m.accept;
|
|
48
|
+
if (t) {
|
|
49
|
+
const g = t.split(",").map((r) => r.trim().toLowerCase()).filter((r) => r), x = (((d = o.name) == null ? void 0 : d.toLowerCase()) || "").split("."), b = x.length > 1 ? "." + x.pop() : "", a = o.type || "";
|
|
50
|
+
if (!g.some((r) => {
|
|
51
51
|
if (r === "*/*")
|
|
52
52
|
return !0;
|
|
53
53
|
if (r.startsWith("."))
|
|
@@ -57,36 +57,36 @@ const { t: z } = J(), Y = _({
|
|
|
57
57
|
return a.startsWith(A + "/");
|
|
58
58
|
} else return r.includes("/") ? a === r || a.startsWith(r + "/") : b === "." + r;
|
|
59
59
|
}))
|
|
60
|
-
return
|
|
60
|
+
return h.error(`只能上传${t}类型的文件!`), !1;
|
|
61
61
|
}
|
|
62
|
-
const
|
|
63
|
-
return o.size / 1024 / 1024 <
|
|
62
|
+
const l = +(((f = (u = e.componentSchema) == null ? void 0 : u.componentProps) == null ? void 0 : f.maxSize) ?? 10);
|
|
63
|
+
return o.size / 1024 / 1024 < l ? !0 : (h.error(`文件大小不能超过 ${l}MB!`), !1);
|
|
64
64
|
};
|
|
65
65
|
let k = !1;
|
|
66
|
-
const D = (o,
|
|
67
|
-
o.code !== 200 && o.code !== 201 && (
|
|
68
|
-
}, U = (o,
|
|
69
|
-
|
|
70
|
-
}, F = (o,
|
|
71
|
-
let { limit:
|
|
72
|
-
|
|
66
|
+
const D = (o, t, l) => {
|
|
67
|
+
o.code !== 200 && o.code !== 201 && (h.error(P("uploadFailed")), k = !0), console.log(l);
|
|
68
|
+
}, U = (o, t, l) => {
|
|
69
|
+
h.error(P("uploadFailed")), console.error(o);
|
|
70
|
+
}, F = (o, t) => {
|
|
71
|
+
let { limit: l } = e;
|
|
72
|
+
h.warning(`最多只能上传 ${l} 个文件`);
|
|
73
73
|
}, M = () => {
|
|
74
|
-
var o,
|
|
74
|
+
var o, t;
|
|
75
75
|
if (s.value.length === 0) {
|
|
76
|
-
|
|
76
|
+
h.warning("请先上传文件");
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
79
|
if (!(e != null && e.callBackUrl)) {
|
|
80
|
-
|
|
80
|
+
h.warning("请先配置回填接口地址");
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
83
|
I("update:ocrData", {
|
|
84
|
-
url: s.value.map((
|
|
84
|
+
url: s.value.map((l) => {
|
|
85
85
|
var c, i;
|
|
86
|
-
return (i = (c =
|
|
86
|
+
return (i = (c = l.response) == null ? void 0 : c.data) == null ? void 0 : i.url;
|
|
87
87
|
}),
|
|
88
88
|
field: (o = e.componentSchema) == null ? void 0 : o.field,
|
|
89
|
-
label: (
|
|
89
|
+
label: (t = e.componentSchema) == null ? void 0 : t.label,
|
|
90
90
|
callBackUrl: e == null ? void 0 : e.callBackUrl,
|
|
91
91
|
callBackMethod: e == null ? void 0 : e.callBackMethod,
|
|
92
92
|
callBackField: e == null ? void 0 : e.callBackField,
|
|
@@ -97,7 +97,9 @@ const { t: z } = J(), Y = _({
|
|
|
97
97
|
...e.componentSchema.componentProps,
|
|
98
98
|
hasAlreadyOcr: !0
|
|
99
99
|
};
|
|
100
|
-
}
|
|
100
|
+
};
|
|
101
|
+
console.log("%c [ ]-199", "font-size:13px; background:pink; color:#bf2c9f;", e);
|
|
102
|
+
const V = O(() => ({
|
|
101
103
|
...e,
|
|
102
104
|
"file-list": s.value,
|
|
103
105
|
beforeUpload: L,
|
|
@@ -121,10 +123,10 @@ const { t: z } = J(), Y = _({
|
|
|
121
123
|
},
|
|
122
124
|
{
|
|
123
125
|
default: () => {
|
|
124
|
-
var o,
|
|
126
|
+
var o, t, l, c;
|
|
125
127
|
return [
|
|
126
128
|
// 提示文案
|
|
127
|
-
e.disabled ||
|
|
129
|
+
e.disabled || p.value ? null : n(
|
|
128
130
|
"div",
|
|
129
131
|
{
|
|
130
132
|
style: {
|
|
@@ -164,7 +166,7 @@ const { t: z } = J(), Y = _({
|
|
|
164
166
|
},
|
|
165
167
|
listType: "picture-card",
|
|
166
168
|
style: {
|
|
167
|
-
marginBottom: e.disabled ||
|
|
169
|
+
marginBottom: e.disabled || p.value ? "0" : "20px"
|
|
168
170
|
}
|
|
169
171
|
},
|
|
170
172
|
{
|
|
@@ -179,8 +181,8 @@ const { t: z } = J(), Y = _({
|
|
|
179
181
|
justifyContent: "center",
|
|
180
182
|
width: "100%",
|
|
181
183
|
height: "100%",
|
|
182
|
-
cursor: e.disabled ||
|
|
183
|
-
opacity: e.disabled ||
|
|
184
|
+
cursor: e.disabled || p.value ? "not-allowed" : "pointer",
|
|
185
|
+
opacity: e.disabled || p.value ? 0.6 : 1,
|
|
184
186
|
transition: "all 0.3s ease",
|
|
185
187
|
borderRadius: "6px",
|
|
186
188
|
backgroundColor: "#fafafa"
|
|
@@ -206,7 +208,7 @@ const { t: z } = J(), Y = _({
|
|
|
206
208
|
marginBottom: "4px"
|
|
207
209
|
}
|
|
208
210
|
},
|
|
209
|
-
|
|
211
|
+
P("fileUpload")
|
|
210
212
|
),
|
|
211
213
|
n(
|
|
212
214
|
"span",
|
|
@@ -223,7 +225,7 @@ const { t: z } = J(), Y = _({
|
|
|
223
225
|
],
|
|
224
226
|
file: ({ file: i }) => {
|
|
225
227
|
var S, x, b;
|
|
226
|
-
const m = [".jpg", ".jpeg", ".png", ".gif", ".svg", ".bmp", ".webp"], d = ((S = i.name) == null ? void 0 : S.toLowerCase()) || "",
|
|
228
|
+
const m = [".jpg", ".jpeg", ".png", ".gif", ".svg", ".bmp", ".webp"], d = ((S = i.name) == null ? void 0 : S.toLowerCase()) || "", u = m.some((a) => d.endsWith(a)), f = d.endsWith(".pdf"), g = i.url || ((b = (x = i == null ? void 0 : i.response) == null ? void 0 : x.data) == null ? void 0 : b.url);
|
|
227
229
|
return n(
|
|
228
230
|
"div",
|
|
229
231
|
{
|
|
@@ -242,7 +244,7 @@ const { t: z } = J(), Y = _({
|
|
|
242
244
|
},
|
|
243
245
|
[
|
|
244
246
|
// 删除按钮
|
|
245
|
-
n(
|
|
247
|
+
e.disabled || p.value ? null : n(
|
|
246
248
|
"button",
|
|
247
249
|
{
|
|
248
250
|
type: "button",
|
|
@@ -267,8 +269,8 @@ const { t: z } = J(), Y = _({
|
|
|
267
269
|
},
|
|
268
270
|
onClick: (a) => {
|
|
269
271
|
a.stopPropagation();
|
|
270
|
-
const
|
|
271
|
-
|
|
272
|
+
const z = s.value.findIndex((r) => r.uid === i.uid);
|
|
273
|
+
z !== -1 && s.value.splice(z, 1);
|
|
272
274
|
},
|
|
273
275
|
onMouseenter: (a) => {
|
|
274
276
|
a.target && (a.target.style.backgroundColor = "#ff4d4f", a.target.style.transform = "scale(1.1)");
|
|
@@ -294,14 +296,14 @@ const { t: z } = J(), Y = _({
|
|
|
294
296
|
}
|
|
295
297
|
},
|
|
296
298
|
[
|
|
297
|
-
|
|
298
|
-
src:
|
|
299
|
+
u && g ? n("img", {
|
|
300
|
+
src: g,
|
|
299
301
|
style: {
|
|
300
302
|
width: "100%",
|
|
301
303
|
height: "100%",
|
|
302
304
|
objectFit: "contain"
|
|
303
305
|
}
|
|
304
|
-
}) :
|
|
306
|
+
}) : f && g ? n(
|
|
305
307
|
"div",
|
|
306
308
|
{
|
|
307
309
|
style: {
|
|
@@ -374,10 +376,10 @@ const { t: z } = J(), Y = _({
|
|
|
374
376
|
}
|
|
375
377
|
),
|
|
376
378
|
// 回填数据按钮
|
|
377
|
-
e.disabled ||
|
|
379
|
+
e.disabled || p.value ? null : n(
|
|
378
380
|
H,
|
|
379
381
|
{
|
|
380
|
-
disabled: e.disabled ||
|
|
382
|
+
disabled: e.disabled || p.value,
|
|
381
383
|
onClick: M,
|
|
382
384
|
style: {
|
|
383
385
|
marginTop: "0",
|
|
@@ -420,10 +422,10 @@ const { t: z } = J(), Y = _({
|
|
|
420
422
|
fontWeight: 500,
|
|
421
423
|
textAlign: "left",
|
|
422
424
|
boxShadow: "0 2px 8px rgba(255, 77, 79, 0.3)",
|
|
423
|
-
display: (
|
|
425
|
+
display: (t = e.model) != null && t[((o = e.componentSchema) == null ? void 0 : o.field) + "-orcWarningInfo"] ? "block" : "none"
|
|
424
426
|
}
|
|
425
427
|
},
|
|
426
|
-
((c = e.model) == null ? void 0 : c[((
|
|
428
|
+
((c = e.model) == null ? void 0 : c[((l = e.componentSchema) == null ? void 0 : l.field) + "-orcWarningInfo"]) || ""
|
|
427
429
|
),
|
|
428
430
|
// 预览器
|
|
429
431
|
(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),k=require("./pluginManager-C8aQylGX.cjs"),p=require("element-plus"),T=require("./_plugin-vue_export-helper-NUO0U1Az.cjs"),w=require("./index-BoL2PSBk.cjs"),Y={class:"sign-main"},F=["src"],O={class:"sign",style:{height:"100%",width:"100%"}},H=["id"],L={class:"btn"},$={class:"btns"},Z={__name:"sign",props:{componentSchema:{type:Object,require:!0,default:()=>({})},modelValue:{type:String,default:""}},emits:["update:modelValue"],setup(B,{expose:C,emit:D}){const{t:l}=w.useLocale(),S=k.pluginManager.getComponent("button"),E=k.pluginManager.getComponent("Dialog"),M=D,o=B,d=e.inject("disabled",{value:!1});e.watch(()=>o.componentSchema,()=>{e.nextTick(()=>{h.value=o.modelValue})},{deep:!0,immediate:!0});const s=e.ref(null),i=e.ref(null),a=e.ref(),N=e.ref("");function A(){var n,t,u,g;if(i.value&&((n=i.value)!=null&&n.clientHeight)&&((t=i.value)!=null&&t.clientWidth)){if(s.value=document.getElementById(`canvas${o.componentSchema.field}`),s.value.height=((u=i.value)==null?void 0:u.clientHeight)||600,s.value.width=(g=i.value)==null?void 0:g.clientWidth,a.value=s.value.getContext("2d"),o.modelValue){let m=new Image;m.src=o.modelValue,m.setAttribute("crossOrigin","anonymous"),m.onload=()=>{a.value.fillStyle=a.value.createPattern(m,"repeat"),a.value.fillRect(0,0,1e3,550)}}a.value.lineWidth=o.componentSchema.componentProps.lineWidth||4,o.componentSchema&&o.componentSchema.componentProps&&o.componentSchema.componentProps.style&&o.componentSchema.componentProps.style.color&&(a.value.strokeStyle=o.componentSchema.componentProps.style.color),N.value=s.value.getBoundingClientRect()}}const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),k=require("./pluginManager-C8aQylGX.cjs"),p=require("element-plus"),T=require("./_plugin-vue_export-helper-NUO0U1Az.cjs"),w=require("./index-BoL2PSBk.cjs"),Y={class:"sign-main"},F=["src"],O={class:"sign",style:{height:"100%",width:"100%"}},H=["id"],L={class:"btn"},$={class:"btns"},Z={__name:"sign",props:{componentSchema:{type:Object,require:!0,default:()=>({})},modelValue:{type:String,default:""}},emits:["update:modelValue"],setup(B,{expose:C,emit:D}){const{t:l}=w.useLocale(),S=k.pluginManager.getComponent("button"),E=k.pluginManager.getComponent("Dialog"),M=D,o=B,d=e.inject("disabled",{value:!1});e.watch(()=>o.componentSchema,()=>{e.nextTick(()=>{h.value=o.modelValue})},{deep:!0,immediate:!0});const s=e.ref(null),i=e.ref(null),a=e.ref(),N=e.ref("");function A(){var n,t,u,g;if(i.value&&((n=i.value)!=null&&n.clientHeight)&&((t=i.value)!=null&&t.clientWidth)){if(s.value=document.getElementById(`canvas${o.componentSchema.field}`),s.value.height=((u=i.value)==null?void 0:u.clientHeight)||600,s.value.width=(g=i.value)==null?void 0:g.clientWidth,a.value=s.value.getContext("2d"),o.modelValue){let m=new Image;m.src=o.modelValue,m.setAttribute("crossOrigin","anonymous"),m.onload=()=>{a.value.fillStyle=a.value.createPattern(m,"repeat"),a.value.fillRect(0,0,1e3,550)}}a.value.lineWidth=o.componentSchema.componentProps.lineWidth||4,o.componentSchema&&o.componentSchema.componentProps&&o.componentSchema.componentProps.style&&o.componentSchema.componentProps.style.color&&(a.value.strokeStyle=o.componentSchema.componentProps.style.color),N.value=s.value.getBoundingClientRect()}}const f=e.ref(""),v=e.ref(""),W=e.ref(""),j=e.ref(""),c=e.ref([]),x=e.ref(!1);function q(n){if(d.value||o.componentSchema.componentProps.readonly||o.componentSchema.componentProps.disabled)return;n=n||event,n.preventDefault();let t={x:n.offsetX,y:n.offsetY};f.value=t.x,v.value=t.y,a.value.beginPath(),a.value.moveTo(t.x,t.y),a.value.lineTo(t.x,t.y),a.value.stroke(),a.value.closePath(),c.value.push(t),x.value=!0}function R(n){if(!(d.value||o.componentSchema.componentProps.readonly||o.componentSchema.componentProps.disabled)&&(n=n||event,n.preventDefault(),x.value)){let t={x:n.offsetX,y:n.offsetY};W.value=t.x,j.value=t.y,a.value.beginPath(),a.value.moveTo(f.value,v.value),a.value.lineTo(t.x,t.y),a.value.stroke(),a.value.closePath(),f.value=t.x,v.value=t.y,c.value.push(t)}}function z(n){if(d.value||o.componentSchema.componentProps.readonly||o.componentSchema.componentProps.disabled)return;n=n||event,n.preventDefault();let t={x:n.offsetX,y:n.offsetY};a.value.beginPath(),a.value.moveTo(f.value,v.value),a.value.lineTo(t.x,t.y),a.value.stroke(),a.value.closePath(),c.value.push(t),c.value.push({x:-1,y:-1}),x.value=!1}function P(){p.ElMessageBox.confirm(l("rewriteWillClearCanvas"),l("warning"),{confirmButtonText:l("confirm"),cancelButtonText:l("cancel"),type:"warning"}).then(()=>{a.value.clearRect(0,0,s.value.width,s.value.height),c.value=[],p.ElMessage({type:"info",message:l("clearSuccess")})}).catch(()=>{})}const h=e.ref("");async function b(){let n=await I(s.value.toDataURL("image/png"));h.value=n,M("update:modelValue",n)}async function I(n){try{let t=atob(n.split(",")[1]),u=new ArrayBuffer(t.length),g=new Uint8Array(u);for(let y=0;y<t.length;y++)g[y]=t.charCodeAt(y);let m=new Blob([u],{type:"image/png"}),V=new FormData;V.append("file",m,Date.now()+"png");let X=await T.axios({method:"post",url:"https://ess-ds.com/prod-api/center-file/file/upload",data:V,headers:{"Content-Type":"multipart/form-data",Authorization:"Bearer "+w.api.get("Admin-Token"),lang:w.api.get("saas-locale")||"zh-CN",zone:Intl.DateTimeFormat().resolvedOptions().timeZone}});return p.ElMessage({type:"success",message:l("uploadSuccess")}),X.data.data.url}catch{p.ElMessage({type:"warning",message:l("uploadFailed")}),r.value=!1}finally{r.value=!1}}const r=e.ref(!1);function U(){p.ElMessageBox.confirm(l("confirmAbandonSignature"),l("warning"),{confirmButtonText:l("confirm"),cancelButtonText:l("cancel"),type:"warning"}).then(()=>{a.value.clearRect(0,0,s.value.width,s.value.height),c.value=[],r.value=!1}).catch(()=>!1)}function _(){d.value||o.componentSchema.componentProps.readonly||o.componentSchema.componentProps.disabled||(r.value=!0,a.value&&(a.value.clearRect(0,0,s.value.width,s.value.height),c.value=[]),e.nextTick(()=>{A()}))}return e.onMounted(()=>{}),e.onUnmounted(()=>{}),C({surewrite:b}),(n,t)=>(e.openBlock(),e.createElementBlock("div",Y,[h.value?(e.openBlock(),e.createElementBlock("img",{key:1,class:"sign-board",src:h.value,alt:"",onClick:_},null,8,F)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"sign-board",onClick:_},e.toDisplayString(e.unref(l)("signaturePad")),1)),e.createVNode(e.unref(E),{modelValue:r.value,"onUpdate:modelValue":t[0]||(t[0]=u=>r.value=u),title:e.unref(l)("signaturePad"),class:"w-860px",width:"860px",style:{height:"600px"},"before-close":U,draggable:!1,modal:""},{default:e.withCtx(()=>[e.createElementVNode("div",O,[e.createElementVNode("div",{class:"canvas",ref_key:"canvasWrap",ref:i},[e.createElementVNode("canvas",{id:`canvas${o.componentSchema.field}`,onMousedown:q,onMousemove:R,onMouseup:z},null,40,H)],512),e.createElementVNode("div",L,[t[1]||(t[1]=e.createElementVNode("div",{class:"remark"},null,-1)),e.createElementVNode("div",$,[e.createVNode(e.unref(S),{type:"info",size:"mini",onClick:P,onTouch:P},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("rewrite")),1)]),_:1}),e.createVNode(e.unref(S),{type:"primary",size:"mini",onClick:b,onTouch:b},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("confirm")),1)]),_:1})])])])]),_:1},8,["modelValue","title"])]))}},G=T._export_sfc(Z,[["__scopeId","data-v-f8f7b654"]]);exports.default=G;
|
|
@@ -217,7 +217,7 @@ const le = { class: "sign-main" }, se = ["src"], ce = {
|
|
|
217
217
|
}, 8, ["modelValue", "title"])
|
|
218
218
|
]));
|
|
219
219
|
}
|
|
220
|
-
}, ge = /* @__PURE__ */ ae(me, [["__scopeId", "data-v-
|
|
220
|
+
}, ge = /* @__PURE__ */ ae(me, [["__scopeId", "data-v-f8f7b654"]]);
|
|
221
221
|
export {
|
|
222
222
|
ge as default
|
|
223
223
|
};
|