epic-designer-gold 0.0.45 → 0.0.47

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 (45) hide show
  1. package/dist/{attributeView-DtpDKBv3.js → attributeView-C75ra3CN.js} +1 -1
  2. package/dist/{attributeView-NViG1QIW.cjs → attributeView-CA-6yB0k.cjs} +1 -1
  3. package/dist/{index-Cbdo388f.cjs → index-0RqJEjlH.cjs} +1 -1
  4. package/dist/{index-CEWzIISV.cjs → index-9VqDmCT_.cjs} +1 -1
  5. package/dist/{index-orcBQmhb.cjs → index-B-Uox2mn.cjs} +1 -1
  6. package/dist/{index-B0mkrnRU.cjs → index-BGT2-jZP.cjs} +1 -1
  7. package/dist/{index-QyL4F13K.js → index-BHWJ1KwT.js} +1 -1
  8. package/dist/index-BRZDZuxE.js +4 -0
  9. package/dist/index-BbCEtCJA.cjs +1 -0
  10. package/dist/{index-Cr0fs3qQ.cjs → index-Bdnc9TGH.cjs} +1 -1
  11. package/dist/{index-CeB5DFBE.js → index-BgTlZ9gW.js} +1 -1
  12. package/dist/{index-W-UeQAtk.js → index-Bgvfahgd.js} +532 -512
  13. package/dist/{index-B3SPoHbr.cjs → index-Bmo9n7ut.cjs} +1 -1
  14. package/dist/{index-Deui5A5E.js → index-C32P7cCc.js} +1 -1
  15. package/dist/{index-Xym112zw.js → index-CML-aVic.js} +1 -1
  16. package/dist/{index-DXzERji1.js → index-CvIjQtJw.js} +65 -63
  17. package/dist/index-DEPx91yu.cjs +1 -0
  18. package/dist/{index-D1mKcGjX.js → index-DwDY6KkH.js} +1 -1
  19. package/dist/index-ETJEJKM_.cjs +10 -0
  20. package/dist/{index-0zDuNn0Q.js → index-JhxJizMR.js} +171 -171
  21. package/dist/{index-CwevnKNM.js → index-M3HldxkA.js} +1 -1
  22. package/dist/{index-DgI4MFJ_.cjs → index-baUE53XK.cjs} +1 -1
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.js +1 -1
  25. package/dist/{sign-CJJd-ctq.js → sign-BRchUdJt.js} +29 -29
  26. package/dist/sign-CnQtsTLr.cjs +1 -0
  27. package/dist/style.css +1 -1
  28. package/dist/{styleView-BD_oQt7b.cjs → styleView-CXdgqy6O.cjs} +1 -1
  29. package/dist/{styleView-B-yx1iR4.js → styleView-cuoX6XX4.js} +1 -1
  30. package/dist/ui/elementPlus/index.cjs +1 -1
  31. package/dist/ui/elementPlus/index.js +3 -3
  32. package/dist/uploadFile-CYDDVa_x.js +76 -0
  33. package/dist/uploadFile-eWBMdZ9d.cjs +1 -0
  34. package/dist/uploadImage-742IA7ei.js +95 -0
  35. package/dist/uploadImage-BXcN2FA_.cjs +1 -0
  36. package/package.json +1 -1
  37. package/dist/index-BYMDoYaj.js +0 -4
  38. package/dist/index-BenbgJD8.cjs +0 -1
  39. package/dist/index-CLpKjuat.cjs +0 -10
  40. package/dist/index-zASDVLOl.cjs +0 -1
  41. package/dist/sign-Bfrdd-6m.cjs +0 -1
  42. package/dist/uploadFile-BU5cBhab.js +0 -67
  43. package/dist/uploadFile-z7Ko58XG.cjs +0 -1
  44. package/dist/uploadImage-tLXX1j6A.js +0 -88
  45. package/dist/uploadImage-xU0He_aO.cjs +0 -1
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as B, computed as P, inject as O, openBlock as r, createElementBlock as u, Fragment as c, renderList as k, createElementVNode as d, toDisplayString as U, createVNode as g, unref as y, createCommentVNode as $, ref as C, watchEffect as T, createBlock as I, withCtx as M, createTextVNode as N } from "vue";
2
2
  import { p as R } from "./js.cookie-oHpRFPCO.js";
3
- import { _ as j, n as F, m as q } from "./index-W-UeQAtk.js";
3
+ import { _ as j, n as F, m as q } from "./index-Bgvfahgd.js";
4
4
  import { _ as A } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
5
5
  const D = [
6
6
  { label: "string", value: "string" },
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./js.cookie-BH1G_HRi.cjs"),p=require("./index-CLpKjuat.cjs"),s=e.defineComponent({__name:"index",props:{modelValue:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(o,{emit:r}){const d=i.pluginManager.getComponent("number"),l=e.ref(0),a=o,m=r;return e.watch(()=>a.modelValue,()=>{l.value=a.modelValue.length},{immediate:!0}),e.watch(()=>l.value,u=>{let t=new Array(u).fill({}).map(n=>({type:"col",children:[],componentProps:{span:24/u},id:p.getUUID()}));m("update:modelValue",t)},{}),(u,t)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",null,[e.createVNode(e.unref(d),{value:l.value,"onUpdate:value":t[0]||(t[0]=n=>l.value=n),modelValue:l.value,"onUpdate:modelValue":t[1]||(t[1]=n=>l.value=n),style:{width:"100%"},min:1,max:24},null,8,["value","modelValue"])])]))}});exports.default=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./js.cookie-BH1G_HRi.cjs"),p=require("./index-ETJEJKM_.cjs"),s=e.defineComponent({__name:"index",props:{modelValue:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(o,{emit:r}){const d=i.pluginManager.getComponent("number"),l=e.ref(0),a=o,m=r;return e.watch(()=>a.modelValue,()=>{l.value=a.modelValue.length},{immediate:!0}),e.watch(()=>l.value,u=>{let t=new Array(u).fill({}).map(n=>({type:"col",children:[],componentProps:{span:24/u},id:p.getUUID()}));m("update:modelValue",t)},{}),(u,t)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",null,[e.createVNode(e.unref(d),{value:l.value,"onUpdate:value":t[0]||(t[0]=n=>l.value=n),modelValue:l.value,"onUpdate:modelValue":t[1]||(t[1]=n=>l.value=n),style:{width:"100%"},min:1,max:24},null,8,["value","modelValue"])])]))}});exports.default=s;
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CLpKjuat.cjs"),a=require("./js.cookie-BH1G_HRi.cjs");exports.EBuilder=e._sfc_main$1;exports.EDesigner=e._sfc_main$2;exports.ENode=e._sfc_main;exports.capitalizeFirstLetter=e.capitalizeFirstLetter;exports.convertKFormData=e.convertKFormData;exports.debounce=e.debounce;exports.deepClone=e.deepClone;exports.deepCompareAndModify=e.deepCompareAndModify;exports.deepEqual=e.deepEqual;exports.findSchemaById=e.findSchemaById;exports.findSchemaInfoById=e.findSchemaInfoById;exports.findSchemas=e.findSchemas;exports.generateNewSchema=e.generateNewSchema;exports.getDarkState=e.getDarkState;exports.getFormFields=e.getFormFields;exports.getFormSchemas=e.getFormSchemas;exports.getMatchedById=e.getMatchedById;exports.getUUID=e.getUUID;exports.getValueByPath=e.getValueByPath;exports.initStore=e.initStore;exports.mapSchemas=e.mapSchemas;exports.recursionConvertedNode=e.recursionConvertedNode;exports.setValueByPath=e.setValueByPath;exports.useDark=e.useDark;exports.useElementDrag=e.useElementDrag;exports.useElementZoom=e.useElementZoom;exports.useKeyPress=e.useKeyPress;exports.usePageManager=e.usePageManager;exports.useRevoke=e.useRevoke;exports.useStore=e.useStore;exports.useTheme=e.useTheme;exports.useTimedQuery=e.useTimedQuery;exports.EventBus=a.EventBus;exports.PluginManager=a.PluginManager;exports.loadAsyncComponent=a.loadAsyncComponent;exports.pluginManager=a.pluginManager;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-ETJEJKM_.cjs"),a=require("./js.cookie-BH1G_HRi.cjs");exports.EBuilder=e._sfc_main$1;exports.EDesigner=e._sfc_main$2;exports.ENode=e._sfc_main;exports.capitalizeFirstLetter=e.capitalizeFirstLetter;exports.convertKFormData=e.convertKFormData;exports.debounce=e.debounce;exports.deepClone=e.deepClone;exports.deepCompareAndModify=e.deepCompareAndModify;exports.deepEqual=e.deepEqual;exports.findSchemaById=e.findSchemaById;exports.findSchemaInfoById=e.findSchemaInfoById;exports.findSchemas=e.findSchemas;exports.generateNewSchema=e.generateNewSchema;exports.getDarkState=e.getDarkState;exports.getFormFields=e.getFormFields;exports.getFormSchemas=e.getFormSchemas;exports.getMatchedById=e.getMatchedById;exports.getUUID=e.getUUID;exports.getValueByPath=e.getValueByPath;exports.initStore=e.initStore;exports.mapSchemas=e.mapSchemas;exports.recursionConvertedNode=e.recursionConvertedNode;exports.setValueByPath=e.setValueByPath;exports.useDark=e.useDark;exports.useElementDrag=e.useElementDrag;exports.useElementZoom=e.useElementZoom;exports.useKeyPress=e.useKeyPress;exports.usePageManager=e.usePageManager;exports.useRevoke=e.useRevoke;exports.useStore=e.useStore;exports.useTheme=e.useTheme;exports.useTimedQuery=e.useTimedQuery;exports.EventBus=a.EventBus;exports.PluginManager=a.PluginManager;exports.loadAsyncComponent=a.loadAsyncComponent;exports.pluginManager=a.pluginManager;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { q as s, r as t, _ as r, E as o, c as n, j as d, m, d as u, x as i, l as g, f as l, B as c, g as p, H as h, z as y, A as E, y as S, k as f, o as B, I as D, C as F, D as I, s as P, G as v, e as C, i as M, F as k, t as x, v as A, u as N, p as q, a as z } from "./index-W-UeQAtk.js";
1
+ import { q as s, r as t, _ as r, E as o, c as n, j as d, m, d as u, x as i, l as g, f as l, B as c, g as p, H as h, z as y, A as E, y as S, k as f, o as B, I as D, C as F, D as I, s as P, G as v, e as C, i as M, F as k, t as x, v as A, u as N, p as q, a as z } from "./index-Bgvfahgd.js";
2
2
  import { E as T, P as U, l as V, p as b } from "./js.cookie-oHpRFPCO.js";
3
3
  export {
4
4
  s as EBuilder,
@@ -1,4 +1,4 @@
1
- import { inject as Y, watch as O, nextTick as U, ref as a, onMounted as H, onUnmounted as I, openBlock as N, createElementBlock as E, normalizeStyle as F, createElementVNode as r, createVNode as P, unref as v, withCtx as x, createTextVNode as w } from "vue";
1
+ import { inject as Y, watch as O, nextTick as U, ref as a, onMounted as H, onUnmounted as I, openBlock as N, createElementBlock as E, normalizeStyle as F, createElementVNode as r, createVNode as S, unref as v, withCtx as x, createTextVNode as w } from "vue";
2
2
  import { p as q, a as L, b as G } from "./js.cookie-oHpRFPCO.js";
3
3
  import { _ as J } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  const K = { class: "btn" }, Q = { class: "btns" }, Z = {
@@ -16,12 +16,12 @@ const K = { class: "btn" }, Q = { class: "btns" }, Z = {
16
16
  },
17
17
  emits: ["update:modelValue"],
18
18
  setup(k, { expose: _, emit: T }) {
19
- const g = q.getComponent("button"), C = T, o = k, i = Y("disabled", { value: !1 });
19
+ const g = q.getComponent("button"), C = T, n = k, i = Y("disabled", { value: !1 });
20
20
  O(
21
- () => o.componentSchema,
21
+ () => n.componentSchema,
22
22
  () => {
23
23
  U(() => {
24
- console.log("%c [ ]-23", "font-size:13px; background:pink; color:#bf2c9f;", o.componentSchema), f();
24
+ f();
25
25
  });
26
26
  },
27
27
  { deep: !0, immediate: !0 }
@@ -29,51 +29,51 @@ const K = { class: "btn" }, Q = { class: "btns" }, Z = {
29
29
  const D = new ResizeObserver((t) => {
30
30
  for (const e of t)
31
31
  e.target && e.target.clientWidth && e.target.clientHeight && f();
32
- }), l = a(null), s = a(null), n = a(), V = a("");
32
+ }), l = a(null), s = a(null), o = a(), V = a("");
33
33
  function f() {
34
34
  var t, e;
35
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, n.value = l.value.getContext("2d"), o.modelValue) {
36
+ if (l.value.height = s.value.clientHeight, l.value.width = s.value.clientWidth, o.value = l.value.getContext("2d"), n.modelValue) {
37
37
  let c = new Image();
38
- c.src = o.modelValue, c.setAttribute("crossOrigin", "anonymous"), c.onload = () => {
39
- n.value.fillStyle = n.value.createPattern(c, "repeat"), n.value.fillRect(0, 0, 1e3, 550);
38
+ c.src = n.modelValue, c.setAttribute("crossOrigin", "anonymous"), c.onload = () => {
39
+ o.value.fillStyle = o.value.createPattern(c, "repeat"), o.value.fillRect(0, 0, 1e3, 550);
40
40
  };
41
41
  }
42
- n.value.lineWidth = o.componentSchema.componentProps.lineWidth || 4, o.componentSchema && o.componentSchema.componentProps && o.componentSchema.componentProps.style && o.componentSchema.componentProps.style.color && (n.value.strokeStyle = o.componentSchema.componentProps.style.color), V.value = l.value.getBoundingClientRect();
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), V.value = l.value.getBoundingClientRect();
43
43
  }
44
44
  }
45
- const p = a(""), m = a(""), z = a(""), B = a(""), u = a([]), h = a(!1);
46
- function W(t) {
47
- if (i.value || o.componentSchema.componentProps.readonly || o.componentSchema.componentProps.disabled)
45
+ const p = a(""), m = a(""), B = a(""), W = a(""), u = a([]), h = a(!1);
46
+ function z(t) {
47
+ if (i.value || n.componentSchema.componentProps.readonly || n.componentSchema.componentProps.disabled)
48
48
  return;
49
49
  t = t || event, t.preventDefault();
50
50
  let e = {
51
51
  x: t.offsetX,
52
52
  y: t.offsetY
53
53
  };
54
- p.value = e.x, m.value = e.y, n.value.beginPath(), n.value.moveTo(e.x, e.y), n.value.lineTo(e.x, e.y), n.value.stroke(), n.value.closePath(), u.value.push(e), h.value = !0;
54
+ p.value = e.x, m.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(), u.value.push(e), h.value = !0;
55
55
  }
56
56
  function A(t) {
57
- if (!(i.value || o.componentSchema.componentProps.readonly || o.componentSchema.componentProps.disabled) && (t = t || event, t.preventDefault(), h.value)) {
57
+ if (!(i.value || n.componentSchema.componentProps.readonly || n.componentSchema.componentProps.disabled) && (t = t || event, t.preventDefault(), h.value)) {
58
58
  let e = {
59
59
  x: t.offsetX,
60
60
  y: t.offsetY
61
61
  };
62
- z.value = e.x, B.value = e.y, n.value.beginPath(), n.value.moveTo(p.value, m.value), n.value.lineTo(e.x, e.y), n.value.stroke(), n.value.closePath(), p.value = e.x, m.value = e.y, u.value.push(e);
62
+ B.value = e.x, W.value = e.y, o.value.beginPath(), o.value.moveTo(p.value, m.value), o.value.lineTo(e.x, e.y), o.value.stroke(), o.value.closePath(), p.value = e.x, m.value = e.y, u.value.push(e);
63
63
  }
64
64
  }
65
65
  function M(t) {
66
- if (i.value || o.componentSchema.componentProps.readonly || o.componentSchema.componentProps.disabled)
66
+ if (i.value || n.componentSchema.componentProps.readonly || n.componentSchema.componentProps.disabled)
67
67
  return;
68
68
  t = t || event, t.preventDefault();
69
69
  let e = {
70
70
  x: t.offsetX,
71
71
  y: t.offsetY
72
72
  };
73
- n.value.beginPath(), n.value.moveTo(p.value, m.value), n.value.lineTo(e.x, e.y), n.value.stroke(), n.value.closePath(), u.value.push(e), u.value.push({ x: -1, y: -1 }), h.value = !1;
73
+ o.value.beginPath(), o.value.moveTo(p.value, m.value), o.value.lineTo(e.x, e.y), o.value.stroke(), o.value.closePath(), u.value.push(e), u.value.push({ x: -1, y: -1 }), h.value = !1;
74
74
  }
75
75
  function b() {
76
- n.value.clearRect(0, 0, l.value.width, l.value.height), u.value = [];
76
+ o.value.clearRect(0, 0, l.value.width, l.value.height), u.value = [];
77
77
  }
78
78
  async function y() {
79
79
  let t = await j(l.value.toDataURL("image/png"));
@@ -83,11 +83,11 @@ const K = { class: "btn" }, Q = { class: "btns" }, Z = {
83
83
  let e = atob(t.split(",")[1]), c = new ArrayBuffer(e.length), R = new Uint8Array(c);
84
84
  for (let d = 0; d < e.length; d++)
85
85
  R[d] = e.charCodeAt(d);
86
- let X = new Blob([c], { type: "image/png" }), S = new FormData();
87
- return S.append("file", X, Date.now() + "png"), (await L({
86
+ let X = new Blob([c], { type: "image/png" }), P = new FormData();
87
+ return P.append("file", X, Date.now() + "png"), (await L({
88
88
  method: "post",
89
89
  url: "https://ess-ds.com/prod-api/center-file/file/upload",
90
- data: S,
90
+ data: P,
91
91
  headers: {
92
92
  "Content-Type": "multipart/form-data",
93
93
  Authorization: "Bearer " + G.get("Admin-Token")
@@ -102,8 +102,8 @@ const K = { class: "btn" }, Q = { class: "btns" }, Z = {
102
102
  }), (t, e) => (N(), E("div", {
103
103
  class: "sign",
104
104
  style: F({
105
- height: o.componentSchema.componentProps.style.height,
106
- width: o.componentSchema.componentProps.style.width || "100%"
105
+ height: n.componentSchema.componentProps.style.height,
106
+ width: n.componentSchema.componentProps.style.width || "100%"
107
107
  })
108
108
  }, [
109
109
  r("div", {
@@ -114,7 +114,7 @@ const K = { class: "btn" }, Q = { class: "btns" }, Z = {
114
114
  r("canvas", {
115
115
  ref_key: "canvas",
116
116
  ref: l,
117
- onMousedown: W,
117
+ onMousedown: z,
118
118
  onMousemove: A,
119
119
  onMouseup: M
120
120
  }, null, 544)
@@ -122,8 +122,8 @@ const K = { class: "btn" }, Q = { class: "btns" }, Z = {
122
122
  r("div", K, [
123
123
  e[2] || (e[2] = r("div", { class: "remark" }, null, -1)),
124
124
  r("div", Q, [
125
- P(v(g), {
126
- disabled: v(i) || o.componentSchema.componentProps.readonly || o.componentSchema.componentProps.disabled,
125
+ S(v(g), {
126
+ disabled: v(i) || n.componentSchema.componentProps.readonly || n.componentSchema.componentProps.disabled,
127
127
  type: "info",
128
128
  size: "mini",
129
129
  onClick: b,
@@ -134,8 +134,8 @@ const K = { class: "btn" }, Q = { class: "btns" }, Z = {
134
134
  ])),
135
135
  _: 1
136
136
  }, 8, ["disabled"]),
137
- P(v(g), {
138
- disabled: v(i) || o.componentSchema.componentProps.readonly || o.componentSchema.componentProps.disabled,
137
+ S(v(g), {
138
+ disabled: v(i) || n.componentSchema.componentProps.readonly || n.componentSchema.componentProps.disabled,
139
139
  type: "primary",
140
140
  size: "mini",
141
141
  onClick: y,
@@ -150,7 +150,7 @@ const K = { class: "btn" }, Q = { class: "btns" }, Z = {
150
150
  ])
151
151
  ], 4));
152
152
  }
153
- }, ne = /* @__PURE__ */ J(Z, [["__scopeId", "data-v-7f8a58af"]]);
153
+ }, ne = /* @__PURE__ */ J(Z, [["__scopeId", "data-v-ee5237db"]]);
154
154
  export {
155
155
  ne as default
156
156
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),h=require("./js.cookie-BH1G_HRi.cjs"),W=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),z={class:"btn"},A={class:"btns"},E={__name:"sign",props:{componentSchema:{type:Object,require:!0,default:()=>({})},modelValue:{type:String,default:""}},emits:["update:modelValue"],setup(S,{expose:P,emit:x}){const y=h.pluginManager.getComponent("button"),w=x,a=S,c=t.inject("disabled",{value:!1});t.watch(()=>a.componentSchema,()=>{t.nextTick(()=>{d()})},{deep:!0,immediate:!0});const V=new ResizeObserver(o=>{for(const e of o)e.target&&e.target.clientWidth&&e.target.clientHeight&&d()}),l=t.ref(null),s=t.ref(null),n=t.ref(),_=t.ref("");function d(){var o,e;if(s.value&&((o=s.value)!=null&&o.clientHeight)&&((e=s.value)!=null&&e.clientWidth)){if(l.value.height=s.value.clientHeight,l.value.width=s.value.clientWidth,n.value=l.value.getContext("2d"),a.modelValue){let r=new Image;r.src=a.modelValue,r.setAttribute("crossOrigin","anonymous"),r.onload=()=>{n.value.fillStyle=n.value.createPattern(r,"repeat"),n.value.fillRect(0,0,1e3,550)}}n.value.lineWidth=a.componentSchema.componentProps.lineWidth||4,a.componentSchema&&a.componentSchema.componentProps&&a.componentSchema.componentProps.style&&a.componentSchema.componentProps.style.color&&(n.value.strokeStyle=a.componentSchema.componentProps.style.color),_.value=l.value.getBoundingClientRect()}}const i=t.ref(""),p=t.ref(""),k=t.ref(""),T=t.ref(""),u=t.ref([]),v=t.ref(!1);function C(o){if(c.value||a.componentSchema.componentProps.readonly||a.componentSchema.componentProps.disabled)return;o=o||event,o.preventDefault();let e={x:o.offsetX,y:o.offsetY};i.value=e.x,p.value=e.y,n.value.beginPath(),n.value.moveTo(e.x,e.y),n.value.lineTo(e.x,e.y),n.value.stroke(),n.value.closePath(),u.value.push(e),v.value=!0}function N(o){if(!(c.value||a.componentSchema.componentProps.readonly||a.componentSchema.componentProps.disabled)&&(o=o||event,o.preventDefault(),v.value)){let e={x:o.offsetX,y:o.offsetY};k.value=e.x,T.value=e.y,n.value.beginPath(),n.value.moveTo(i.value,p.value),n.value.lineTo(e.x,e.y),n.value.stroke(),n.value.closePath(),i.value=e.x,p.value=e.y,u.value.push(e)}}function D(o){if(c.value||a.componentSchema.componentProps.readonly||a.componentSchema.componentProps.disabled)return;o=o||event,o.preventDefault();let e={x:o.offsetX,y:o.offsetY};n.value.beginPath(),n.value.moveTo(i.value,p.value),n.value.lineTo(e.x,e.y),n.value.stroke(),n.value.closePath(),u.value.push(e),u.value.push({x:-1,y:-1}),v.value=!1}function g(){n.value.clearRect(0,0,l.value.width,l.value.height),u.value=[]}async function f(){let o=await j(l.value.toDataURL("image/png"));w("update:modelValue",o)}async function j(o){let e=atob(o.split(",")[1]),r=new ArrayBuffer(e.length),B=new Uint8Array(r);for(let m=0;m<e.length;m++)B[m]=e.charCodeAt(m);let M=new Blob([r],{type:"image/png"}),b=new FormData;return b.append("file",M,Date.now()+"png"),(await h.axios({method:"post",url:"https://ess-ds.com/prod-api/center-file/file/upload",data:b,headers:{"Content-Type":"multipart/form-data",Authorization:"Bearer "+h.api.get("Admin-Token")}})).data.data.url}return t.onMounted(()=>{d(),V.observe(s.value)}),t.onUnmounted(()=>{}),P({surewrite:f}),(o,e)=>(t.openBlock(),t.createElementBlock("div",{class:"sign",style:t.normalizeStyle({height:a.componentSchema.componentProps.style.height,width:a.componentSchema.componentProps.style.width||"100%"})},[t.createElementVNode("div",{class:"canvas",ref_key:"canvasWrap",ref:s},[t.createElementVNode("canvas",{ref_key:"canvas",ref:l,onMousedown:C,onMousemove:N,onMouseup:D},null,544)],512),t.createElementVNode("div",z,[e[2]||(e[2]=t.createElementVNode("div",{class:"remark"},null,-1)),t.createElementVNode("div",A,[t.createVNode(t.unref(y),{disabled:t.unref(c)||a.componentSchema.componentProps.readonly||a.componentSchema.componentProps.disabled,type:"info",size:"mini",onClick:g,onTouch:g},{default:t.withCtx(()=>e[0]||(e[0]=[t.createTextVNode("重写")])),_:1},8,["disabled"]),t.createVNode(t.unref(y),{disabled:t.unref(c)||a.componentSchema.componentProps.readonly||a.componentSchema.componentProps.disabled,type:"primary",size:"mini",onClick:f,onTouch:f},{default:t.withCtx(()=>e[1]||(e[1]=[t.createTextVNode("确定")])),_:1},8,["disabled"])])])],4))}},O=W._export_sfc(E,[["__scopeId","data-v-ee5237db"]]);exports.default=O;