epic-designer-gold 0.0.41 → 0.0.42
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-B6yshoNY.cjs +1 -0
- package/dist/{attributeView-DPFdUi2O.js → attributeView-CAOGzcXM.js} +2 -2
- package/dist/form-6cUK-Ari.js +72 -0
- package/dist/form-CthzLIgs.cjs +1 -0
- package/dist/{index-C4sdhgF2.js → index-0GtpyUBx.js} +1 -1
- package/dist/{index-CCTMCqiz.js → index-0zDuNn0Q.js} +140 -137
- package/dist/{index-DeY6yw0s.cjs → index-1BndYxTQ.cjs} +1 -1
- package/dist/{index-98NOkcrB.cjs → index-B7QH_s16.cjs} +1 -1
- package/dist/{index-BnYEEWhA.js → index-BIPDvTGu.js} +263 -259
- package/dist/{index-C-XUgjda.js → index-BKDRMrcc.js} +1 -1
- package/dist/{index-Cd9n7QSg.js → index-BOfEIfM3.js} +3 -3
- package/dist/index-BSLudrcT.cjs +1 -0
- package/dist/{index-CbiXuuBq.js → index-BVceGSkj.js} +1 -1
- package/dist/index-BcocZhQo.js +4 -0
- package/dist/index-BenbgJD8.cjs +1 -0
- package/dist/index-Bf2Sxe2E.cjs +1 -0
- package/dist/index-BwdkCtpc.cjs +10 -0
- package/dist/{index-D9mE7-Ar.js → index-C4TbiUcL.js} +2 -2
- package/dist/index-CMCtBfv5.cjs +1 -0
- package/dist/index-CMwJOFFP.cjs +1 -0
- package/dist/index-CYfnscUn.cjs +1 -0
- package/dist/index-CcZa7MK_.cjs +1 -0
- package/dist/index-CucdgcqX.cjs +1 -0
- package/dist/{index-Bm_2TXSs.js → index-DDo1LIxZ.js} +64 -59
- package/dist/{index-ooVzYa5L.js → index-DNeYX6HK.js} +1 -1
- package/dist/{index-BdghL1e1.js → index-DR3BiPsn.js} +2 -2
- package/dist/index-DlubD1cY.cjs +1 -0
- package/dist/{index-fHt4-rMq.js → index-DmyFFubg.js} +2 -2
- package/dist/index-HNPgHrkl.cjs +1 -0
- package/dist/{index-B0pq3LvX.js → index-L6-BEKnU.js} +2 -2
- package/dist/{index-ASoFJnMl.js → index-XUQ1VGQg.js} +1 -1
- package/dist/index-sKJ91s0r.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/js.cookie-BH1G_HRi.cjs +6 -0
- package/dist/{axios-ITY6Uw7A.js → js.cookie-oHpRFPCO.js} +604 -532
- package/dist/outline-6Qt3qlWm.cjs +1 -0
- package/dist/{outline-yy4pIEi3.js → outline-CNayBNNC.js} +2 -2
- package/dist/sign-Bfrdd-6m.cjs +1 -0
- package/dist/{sign-DZvUIxel.js → sign-CJJd-ctq.js} +33 -32
- package/dist/style.css +1 -1
- package/dist/{styleView-BC3ElYAX.js → styleView-5U84Umnq.js} +2 -2
- package/dist/styleView-Ds-PuzkJ.cjs +1 -0
- package/dist/tree.vue_vue_type_script_setup_true_lang-BjjL_VlR.cjs +1 -0
- package/dist/{tree.vue_vue_type_script_setup_true_lang-uR4G8wa_.js → tree.vue_vue_type_script_setup_true_lang-BntCm43E.js} +1 -1
- package/dist/ui/elementPlus/index.cjs +1 -1
- package/dist/ui/elementPlus/index.js +2 -2
- package/package.json +1 -1
- package/dist/attributeView-BqbSwDZ-.cjs +0 -1
- package/dist/axios-CYGTE3lR.cjs +0 -6
- package/dist/form-2lbtG-zj.js +0 -74
- package/dist/form-BM53wx9g.cjs +0 -1
- package/dist/index-1afOcXnV.cjs +0 -1
- package/dist/index-B03W7FZR.cjs +0 -1
- package/dist/index-BJlPL6eL.cjs +0 -1
- package/dist/index-BMLwTmDA.cjs +0 -1
- package/dist/index-Bjg8-hj_.cjs +0 -1
- package/dist/index-C6ceZM1C.cjs +0 -1
- package/dist/index-CDp439PR.cjs +0 -10
- package/dist/index-CRSk-fAu.cjs +0 -1
- package/dist/index-DUwQsRO_.cjs +0 -1
- package/dist/index-DpzLP1Zp.cjs +0 -1
- package/dist/index-DqXlNyYv.js +0 -4
- package/dist/index-FyzG-Fup.cjs +0 -1
- package/dist/index-RaG5yFdp.cjs +0 -1
- package/dist/outline-CJSEUbgc.cjs +0 -1
- package/dist/sign-BS8owiJT.cjs +0 -1
- package/dist/styleView-DT4vsrXY.cjs +0 -1
- package/dist/tree.vue_vue_type_script_setup_true_lang-RWTXU6lO.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),_=require("./tree.vue_vue_type_script_setup_true_lang-BjjL_VlR.cjs"),f=require("./js.cookie-BH1G_HRi.cjs"),m=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),v={class:"epic-outline"},y=["onMouseenter"],g={class:"max-w-full truncate"},h={class:"epic-node-type-text flex-1 w-0 truncate"},k=e.defineComponent({__name:"outline",setup(N){const n=e.inject("designer"),l=e.inject("pageSchema"),a=e.computed(()=>{var s;const o=(s=n.state.checkedNode)==null?void 0:s.id;return o?[o]:[]});function u(o){n.setCheckedNode(o.componentSchema)}return(o,s)=>{var i;return e.openBlock(),e.createElementBlock("div",v,[e.createVNode(e.unref(_._sfc_main),{options:e.unref(l).schemas,draggable:"","selected-keys":a.value,"hover-key":(i=e.unref(n).state.hoverNode)==null?void 0:i.id,onNodeClick:u},{"tree-node":e.withCtx(({schema:t})=>{var r,c,d;return[e.createElementVNode("div",{class:e.normalizeClass(["epic-text-padding flex",{hidden:(r=t.componentProps)==null?void 0:r.hidden}]),onMouseenter:e.withModifiers(p=>e.unref(n).setHoverNode(t),["stop"]),onMouseleave:s[0]||(s[0]=e.withModifiers(p=>e.unref(n).setHoverNode(null),["stop"]))},[e.createElementVNode("span",g,[(c=t.componentProps)!=null&&c.hidden?(e.openBlock(),e.createBlock(e.unref(m._sfc_main),{key:0,name:"icon--epic--visibility-off-outline-rounded",class:"translate-y-2px"})):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.label??((d=e.unref(f.pluginManager).getComponentConfingByType(t.type))==null?void 0:d.defaultSchema.label)),1)]),e.createElementVNode("span",h,e.toDisplayString(t.id),1)],42,y)]}),_:1},8,["options","selected-keys","hover-key"])])}}});exports.default=k;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as g, inject as l, computed as k, openBlock as p, createElementBlock as v, createVNode as N, unref as e, withCtx as x, createElementVNode as i, normalizeClass as C, withModifiers as m, createBlock as M, createCommentVNode as S, createTextVNode as b, toDisplayString as u } from "vue";
|
|
2
|
-
import { _ as w } from "./tree.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { p as B } from "./
|
|
2
|
+
import { _ as w } from "./tree.vue_vue_type_script_setup_true_lang-BntCm43E.js";
|
|
3
|
+
import { p as B } from "./js.cookie-oHpRFPCO.js";
|
|
4
4
|
import { _ as V } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
5
5
|
const $ = { class: "epic-outline" }, E = ["onMouseenter"], H = { class: "max-w-full truncate" }, P = { class: "epic-node-type-text flex-1 w-0 truncate" }, q = /* @__PURE__ */ g({
|
|
6
6
|
__name: "outline",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),h=require("./js.cookie-BH1G_HRi.cjs"),M=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),W={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,n=S,c=t.inject("disabled",{value:!1});t.watch(()=>n.componentSchema,()=>{t.nextTick(()=>{console.log("%c [ ]-23","font-size:13px; background:pink; color:#bf2c9f;",n.componentSchema),d()})},{deep:!0,immediate:!0});const k=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),a=t.ref(),V=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,a.value=l.value.getContext("2d"),n.modelValue){let r=new Image;r.src=n.modelValue,r.setAttribute("crossOrigin","anonymous"),r.onload=()=>{a.value.fillStyle=a.value.createPattern(r,"repeat"),a.value.fillRect(0,0,1e3,550)}}a.value.lineWidth=n.componentSchema.componentProps.lineWidth||4,n.componentSchema&&n.componentSchema.componentProps&&n.componentSchema.componentProps.style&&n.componentSchema.componentProps.style.color&&(a.value.strokeStyle=n.componentSchema.componentProps.style.color),V.value=l.value.getBoundingClientRect()}}const i=t.ref(""),p=t.ref(""),_=t.ref(""),T=t.ref(""),u=t.ref([]),f=t.ref(!1);function C(o){if(c.value||n.componentSchema.componentProps.readonly||n.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,a.value.beginPath(),a.value.moveTo(e.x,e.y),a.value.lineTo(e.x,e.y),a.value.stroke(),a.value.closePath(),u.value.push(e),f.value=!0}function N(o){if(!(c.value||n.componentSchema.componentProps.readonly||n.componentSchema.componentProps.disabled)&&(o=o||event,o.preventDefault(),f.value)){let e={x:o.offsetX,y:o.offsetY};_.value=e.x,T.value=e.y,a.value.beginPath(),a.value.moveTo(i.value,p.value),a.value.lineTo(e.x,e.y),a.value.stroke(),a.value.closePath(),i.value=e.x,p.value=e.y,u.value.push(e)}}function D(o){if(c.value||n.componentSchema.componentProps.readonly||n.componentSchema.componentProps.disabled)return;o=o||event,o.preventDefault();let e={x:o.offsetX,y:o.offsetY};a.value.beginPath(),a.value.moveTo(i.value,p.value),a.value.lineTo(e.x,e.y),a.value.stroke(),a.value.closePath(),u.value.push(e),u.value.push({x:-1,y:-1}),f.value=!1}function g(){a.value.clearRect(0,0,l.value.width,l.value.height),u.value=[]}async function v(){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),z=new Uint8Array(r);for(let m=0;m<e.length;m++)z[m]=e.charCodeAt(m);let B=new Blob([r],{type:"image/png"}),b=new FormData;return b.append("file",B,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(),k.observe(s.value)}),t.onUnmounted(()=>{}),P({surewrite:v}),(o,e)=>(t.openBlock(),t.createElementBlock("div",{class:"sign",style:t.normalizeStyle({height:n.componentSchema.componentProps.style.height,width:n.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",W,[e[2]||(e[2]=t.createElementVNode("div",{class:"remark"},null,-1)),t.createElementVNode("div",A,[t.createVNode(t.unref(y),{disabled:t.unref(c)||n.componentSchema.componentProps.readonly||n.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)||n.componentSchema.componentProps.readonly||n.componentSchema.componentProps.disabled,type:"primary",size:"mini",onClick:v,onTouch:v},{default:t.withCtx(()=>e[1]||(e[1]=[t.createTextVNode("确定")])),_:1},8,["disabled"])])])],4))}},O=M._export_sfc(E,[["__scopeId","data-v-7f8a58af"]]);exports.default=O;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import { p as q, a as L } from "./
|
|
3
|
-
import { _ as
|
|
4
|
-
const
|
|
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";
|
|
2
|
+
import { p as q, a as L, b as G } from "./js.cookie-oHpRFPCO.js";
|
|
3
|
+
import { _ as J } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
const K = { class: "btn" }, Q = { class: "btns" }, Z = {
|
|
5
5
|
__name: "sign",
|
|
6
6
|
props: {
|
|
7
7
|
componentSchema: {
|
|
@@ -16,7 +16,7 @@ const J = { class: "btn" }, K = { class: "btns" }, Q = {
|
|
|
16
16
|
},
|
|
17
17
|
emits: ["update:modelValue"],
|
|
18
18
|
setup(k, { expose: _, emit: T }) {
|
|
19
|
-
const g = q.getComponent("button"), C = T, o = k,
|
|
19
|
+
const g = q.getComponent("button"), C = T, o = k, i = Y("disabled", { value: !1 });
|
|
20
20
|
O(
|
|
21
21
|
() => o.componentSchema,
|
|
22
22
|
() => {
|
|
@@ -42,54 +42,55 @@ const J = { class: "btn" }, K = { class: "btns" }, Q = {
|
|
|
42
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();
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
const p = a(""), m = a(""),
|
|
46
|
-
function
|
|
47
|
-
if (
|
|
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)
|
|
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(),
|
|
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;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
if (!(
|
|
56
|
+
function A(t) {
|
|
57
|
+
if (!(i.value || o.componentSchema.componentProps.readonly || o.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
|
-
|
|
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);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
if (
|
|
65
|
+
function M(t) {
|
|
66
|
+
if (i.value || o.componentSchema.componentProps.readonly || o.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(),
|
|
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;
|
|
74
74
|
}
|
|
75
75
|
function b() {
|
|
76
|
-
n.value.clearRect(0, 0, l.value.width, l.value.height),
|
|
76
|
+
n.value.clearRect(0, 0, l.value.width, l.value.height), u.value = [];
|
|
77
77
|
}
|
|
78
78
|
async function y() {
|
|
79
|
-
let t = await
|
|
79
|
+
let t = await j(l.value.toDataURL("image/png"));
|
|
80
80
|
C("update:modelValue", t);
|
|
81
81
|
}
|
|
82
|
-
async function
|
|
83
|
-
let e = atob(t.split(",")[1]), c = new ArrayBuffer(e.length),
|
|
82
|
+
async function j(t) {
|
|
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
|
-
|
|
86
|
-
let
|
|
87
|
-
return S.append("file",
|
|
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({
|
|
88
88
|
method: "post",
|
|
89
89
|
url: "https://ess-ds.com/prod-api/center-file/file/upload",
|
|
90
90
|
data: S,
|
|
91
91
|
headers: {
|
|
92
|
-
"Content-Type": "multipart/form-data"
|
|
92
|
+
"Content-Type": "multipart/form-data",
|
|
93
|
+
Authorization: "Bearer " + G.get("Admin-Token")
|
|
93
94
|
}
|
|
94
95
|
})).data.data.url;
|
|
95
96
|
}
|
|
@@ -113,16 +114,16 @@ const J = { class: "btn" }, K = { class: "btns" }, Q = {
|
|
|
113
114
|
r("canvas", {
|
|
114
115
|
ref_key: "canvas",
|
|
115
116
|
ref: l,
|
|
116
|
-
onMousedown:
|
|
117
|
-
onMousemove:
|
|
118
|
-
onMouseup:
|
|
117
|
+
onMousedown: W,
|
|
118
|
+
onMousemove: A,
|
|
119
|
+
onMouseup: M
|
|
119
120
|
}, null, 544)
|
|
120
121
|
], 512),
|
|
121
|
-
r("div",
|
|
122
|
+
r("div", K, [
|
|
122
123
|
e[2] || (e[2] = r("div", { class: "remark" }, null, -1)),
|
|
123
|
-
r("div",
|
|
124
|
+
r("div", Q, [
|
|
124
125
|
P(v(g), {
|
|
125
|
-
disabled: v(
|
|
126
|
+
disabled: v(i) || o.componentSchema.componentProps.readonly || o.componentSchema.componentProps.disabled,
|
|
126
127
|
type: "info",
|
|
127
128
|
size: "mini",
|
|
128
129
|
onClick: b,
|
|
@@ -134,7 +135,7 @@ const J = { class: "btn" }, K = { class: "btns" }, Q = {
|
|
|
134
135
|
_: 1
|
|
135
136
|
}, 8, ["disabled"]),
|
|
136
137
|
P(v(g), {
|
|
137
|
-
disabled: v(
|
|
138
|
+
disabled: v(i) || o.componentSchema.componentProps.readonly || o.componentSchema.componentProps.disabled,
|
|
138
139
|
type: "primary",
|
|
139
140
|
size: "mini",
|
|
140
141
|
onClick: y,
|
|
@@ -149,7 +150,7 @@ const J = { class: "btn" }, K = { class: "btns" }, Q = {
|
|
|
149
150
|
])
|
|
150
151
|
], 4));
|
|
151
152
|
}
|
|
152
|
-
},
|
|
153
|
+
}, ne = /* @__PURE__ */ J(Z, [["__scopeId", "data-v-7f8a58af"]]);
|
|
153
154
|
export {
|
|
154
|
-
|
|
155
|
+
ne as default
|
|
155
156
|
};
|