epic-designer-gold 0.0.8 → 0.0.9
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-Dk2EmHZW.js → attributeView-C5p72pi9.js} +1 -1
- package/dist/{attributeView-DYltJe-a.cjs → attributeView-D6GDDwJd.cjs} +1 -1
- package/dist/{eventView-Ba0hP27z.js → eventView-B1SO_b3U.js} +1 -1
- package/dist/{eventView-BoaACVjO.cjs → eventView-C-nPJeal.cjs} +1 -1
- package/dist/{index-BY7CyvD0.cjs → index-8Z_BUSpi.cjs} +1 -1
- package/dist/{index-MEVHj2X7.cjs → index-B0tIuwC4.cjs} +1 -1
- package/dist/{index-B0o9Uauj.cjs → index-B4QCUzmC.cjs} +1 -1
- package/dist/{index-BVhjDWdX.cjs → index-B4_pfSXd.cjs} +1 -1
- package/dist/{index-CFXmvMyl.js → index-BRfHHwGt.js} +1 -1
- package/dist/{index-CsXf1tm6.js → index-BWsouAX1.js} +1 -1
- package/dist/index-Bk1B4RlV.cjs +1 -0
- package/dist/{index-B70ZM-RH.js → index-Blx2W6GS.js} +1 -1
- package/dist/{index-DHblJXI8.js → index-BnfqRlhk.js} +1 -1
- package/dist/index-BosPwufD.cjs +1 -0
- package/dist/{index-J_nNkP8R.js → index-Bvq0Bx84.js} +1 -1
- package/dist/{index-YpOtOenY.cjs → index-CW5-2m8M.cjs} +1 -1
- package/dist/index-ChrX-B9g.js +4 -0
- package/dist/{index-DDJ5D8mV.js → index-CphLWdDE.js} +1 -1
- package/dist/{index-BeuOcsj8.cjs → index-CtG-fCHj.cjs} +1 -1
- package/dist/{index-DF9HRIW0.js → index-D0g3u-k9.js} +8 -8
- package/dist/index-Dd4gCjAw.js +209 -0
- package/dist/{index-DVWvjN5E.cjs → index-DjpnzTAe.cjs} +1 -1
- package/dist/{index-Bnxp-82r.js → index-DskGuw3e.js} +1 -1
- package/dist/{index-NhfJlz-p.cjs → index-DuC_aA96.cjs} +2 -2
- package/dist/{index-CZaokqYw.js → index-FHuEonxg.js} +215 -193
- package/dist/{index-CZVWdeNF.cjs → index-xS4C1Uqo.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{styleView-AFQHYzcB.cjs → styleView-BZV97I57.cjs} +1 -1
- package/dist/{styleView-t3KSRoDD.js → styleView-D8NW8ZDL.js} +1 -1
- package/package.json +1 -1
- package/dist/index-BeWY4egz.js +0 -4
- package/dist/index-CmtFrV57.cjs +0 -1
- package/dist/index-D0L7sZbE.cjs +0 -1
- package/dist/index-Khkd8Z00.js +0 -205
package/dist/index-D0L7sZbE.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("./vuedraggable.umd-BqhSJIAi.cjs"),p=require("./pluginManager-itCTrGag.cjs"),x=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),y=require("./index-NhfJlz-p.cjs"),N=require("element-plus"),E=require("./axios-tuVKNgv9.cjs"),B=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={key:0,class:"pl-4"},U=e.defineComponent({name:"EOptionItem",__name:"optionItem",props:{modelValue:{}},emits:["update:modelValue"],setup(_,{emit:g}){const h=_,V=p.pluginManager.getComponent("input"),d=e.inject("tree",!1),s=g,u=y.useVModel(h,"modelValue",s);function f(o){const c={label:"",value:""};o.children?o.children.push(c):o.children=[c]}function r(o){u.value=u.value.filter((c,m)=>m!==o)}return(o,c)=>{const m=e.resolveComponent("EOptionItem");return e.openBlock(),e.createBlock(e.unref(C.draggable),{modelValue:e.unref(u),"onUpdate:modelValue":c[0]||(c[0]=n=>e.isRef(u)?u.value=n:null),"item-key":"id","component-data":{type:"transition-group"},group:"option-list",handle:".handle",animation:200},{item:e.withCtx(({element:n,index:k})=>[e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass([e.unref(d)?"grid-cols-[16px_auto_auto_16px_16px]":"grid-cols-[16px_auto_auto_16px]","option-item text-16px grid text-$epic-text-secondary gap-2 items-center mb-2"])},[e.createVNode(e.unref(x._sfc_main),{class:"mr-2 cursor-move handle",name:"icon--epic--drag"}),e.createVNode(e.unref(V),{modelValue:n.label,"onUpdate:modelValue":a=>n.label=a,value:n.label,"onUpdate:value":a=>n.label=a,placeholder:"label"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.createVNode(e.unref(V),{modelValue:n.value,"onUpdate:modelValue":a=>n.value=a,value:n.value,"onUpdate:value":a=>n.value=a,placeholder:"value"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.unref(d)?(e.openBlock(),e.createBlock(e.unref(x._sfc_main),{key:0,class:"cursor-pointer text-lg!",name:"icon--epic--add-rounded",onClick:a=>f(n)},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(e.unref(x._sfc_main),{class:"hover:text-red cursor-pointer",name:"icon--epic--delete-outline-rounded",onClick:a=>r(k)},null,8,["onClick"])],2),n.children?(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(m,{modelValue:n.children,"onUpdate:modelValue":a=>n.children=a},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue"])}}}),M={class:""},O={class:"epic-tabs-box"},I=["title","onClick"],q={key:0},w={class:"py-4 my-2 text-center text-gray-400 bg-white"},$={key:1},j=e.defineComponent({__name:"index",props:{tree:{type:Boolean},modelValue:{},dynamicId:{},type:{}},emits:["update:modelValue","update:EOptionsEditor"],setup(_,{emit:g}){const h=p.pluginManager.getComponent("button"),V=p.pluginManager.getComponent("select"),d=e.ref([]),s=e.reactive({title:"静态"}),u=_,f=g;p.EventBus.on("updateSource",l=>{d.value=p.pluginManager.sourceData.map(t=>({...t,label:t.apiName,value:t.id}))}),e.onMounted(()=>{d.value=p.pluginManager.sourceData.map(l=>({...l,label:l.apiName,value:l.id}))});const r=y.useVModel(u,"modelValue",f),o=y.useVModel(u,"dynamicId",f);function c(l){return l&&Object.prototype.toString.call(l)==="[object Array]"?l:(N.ElMessage.info("请检查数据位置是否配置准确"),[])}e.watch(()=>o.value,async()=>{o.value?s.title="动态":s.title="静态"},{immediate:!0});const m=[{title:"静态"},{title:"动态"}];async function n(l){s.title=l.title,l.title==="静态"&&(o.value="")}async function k(l){const t=d.value.find(i=>i.id===l);let v=await E.axios({method:(t==null?void 0:t.method)||"get",url:"http://localhost:3333/users",params:t!=null&&t.params?JSON.parse(t==null?void 0:t.params):{},data:t!=null&&t.data?JSON.parse(t==null?void 0:t.data):{},headers:t!=null&&t.header?JSON.parse(t==null?void 0:t.header):{}});t&&(t!=null&&t.dataPath)?r.value=c(v.data[t.dataPath]):r.value=c(v.data)}u.modelValue,e.provide("tree",u.tree);function a(){const l=e.reactive({label:"",value:""});r.value.length?r.value=[...r.value,l]:r.value=[l]}return(l,t)=>{var v;return e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",null,[e.createElementVNode("div",O,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(m,(i,b)=>e.createElementVNode("div",{class:e.normalizeClass(["epic-tab cursor-pointer truncate",{checked:s.title===i.title}]),key:b,title:i.title,onClick:D=>n(i)},e.toDisplayString(i.title),11,I)),64))]),s.title==="静态"?(e.openBlock(),e.createElementBlock("div",q,[e.withDirectives(e.createElementVNode("div",w,"暂无选项",512),[[e.vShow,!((v=e.unref(r))!=null&&v.length)]]),e.createVNode(U,{modelValue:e.unref(r),"onUpdate:modelValue":t[0]||(t[0]=i=>e.isRef(r)?r.value=i:null)},null,8,["modelValue"]),e.createVNode(e.unref(h),{onClick:a},{default:e.withCtx(()=>t[2]||(t[2]=[e.createTextVNode("添加选项")])),_:1})])):(e.openBlock(),e.createElementBlock("div",$,[t[3]||(t[3]=e.createElementVNode("span",{style:{"font-size":"12px","margin-bottom":"8px",display:"inline-block"}},"数据源",-1)),e.createVNode(e.unref(V),{modelValue:e.unref(o),"onUpdate:modelValue":t[1]||(t[1]=i=>e.isRef(o)?o.value=i:null),placeholder:"请选择数据源",clearable:"",options:d.value,onChange:k},null,8,["modelValue","options"])]))])])}}}),A=B._export_sfc(j,[["__scopeId","data-v-9004c684"]]);exports.default=A;
|
package/dist/index-Khkd8Z00.js
DELETED
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import { defineComponent as $, inject as D, resolveComponent as M, openBlock as p, createBlock as O, unref as a, isRef as S, withCtx as w, createElementVNode as m, normalizeClass as B, createVNode as d, createCommentVNode as I, createElementBlock as V, ref as j, reactive as N, onMounted as J, watch as z, provide as L, Fragment as P, renderList as R, toDisplayString as T, withDirectives as F, vShow as q, createTextVNode as G } from "vue";
|
|
2
|
-
import { d as H } from "./vuedraggable.umd-D2S7Eo7p.js";
|
|
3
|
-
import { p as _, E as K } from "./pluginManager-D8PM7ICc.js";
|
|
4
|
-
import { _ as U } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
5
|
-
import { n as E } from "./index-DF9HRIW0.js";
|
|
6
|
-
import { ElMessage as Q } from "element-plus";
|
|
7
|
-
import { a as W } from "./axios-CXDYiOMX.js";
|
|
8
|
-
import { _ as X } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
-
const Y = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "pl-4"
|
|
12
|
-
}, Z = /* @__PURE__ */ $({
|
|
13
|
-
name: "EOptionItem",
|
|
14
|
-
__name: "optionItem",
|
|
15
|
-
props: {
|
|
16
|
-
modelValue: {}
|
|
17
|
-
},
|
|
18
|
-
emits: ["update:modelValue"],
|
|
19
|
-
setup(y, { emit: b }) {
|
|
20
|
-
const k = y, g = _.getComponent("input"), c = D("tree", !1), r = E(k, "modelValue", b);
|
|
21
|
-
function x(o) {
|
|
22
|
-
const s = {
|
|
23
|
-
label: "",
|
|
24
|
-
value: ""
|
|
25
|
-
};
|
|
26
|
-
o.children ? o.children.push(s) : o.children = [s];
|
|
27
|
-
}
|
|
28
|
-
function i(o) {
|
|
29
|
-
r.value = r.value.filter((s, h) => h !== o);
|
|
30
|
-
}
|
|
31
|
-
return (o, s) => {
|
|
32
|
-
const h = M("EOptionItem");
|
|
33
|
-
return p(), O(a(H), {
|
|
34
|
-
modelValue: a(r),
|
|
35
|
-
"onUpdate:modelValue": s[0] || (s[0] = (l) => S(r) ? r.value = l : null),
|
|
36
|
-
"item-key": "id",
|
|
37
|
-
"component-data": {
|
|
38
|
-
type: "transition-group"
|
|
39
|
-
},
|
|
40
|
-
group: "option-list",
|
|
41
|
-
handle: ".handle",
|
|
42
|
-
animation: 200
|
|
43
|
-
}, {
|
|
44
|
-
item: w(({ element: l, index: C }) => [
|
|
45
|
-
m("div", null, [
|
|
46
|
-
m("div", {
|
|
47
|
-
class: B([a(c) ? "grid-cols-[16px_auto_auto_16px_16px]" : "grid-cols-[16px_auto_auto_16px]", "option-item text-16px grid text-$epic-text-secondary gap-2 items-center mb-2"])
|
|
48
|
-
}, [
|
|
49
|
-
d(a(U), {
|
|
50
|
-
class: "mr-2 cursor-move handle",
|
|
51
|
-
name: "icon--epic--drag"
|
|
52
|
-
}),
|
|
53
|
-
d(a(g), {
|
|
54
|
-
modelValue: l.label,
|
|
55
|
-
"onUpdate:modelValue": (n) => l.label = n,
|
|
56
|
-
value: l.label,
|
|
57
|
-
"onUpdate:value": (n) => l.label = n,
|
|
58
|
-
placeholder: "label"
|
|
59
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "value", "onUpdate:value"]),
|
|
60
|
-
d(a(g), {
|
|
61
|
-
modelValue: l.value,
|
|
62
|
-
"onUpdate:modelValue": (n) => l.value = n,
|
|
63
|
-
value: l.value,
|
|
64
|
-
"onUpdate:value": (n) => l.value = n,
|
|
65
|
-
placeholder: "value"
|
|
66
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "value", "onUpdate:value"]),
|
|
67
|
-
a(c) ? (p(), O(a(U), {
|
|
68
|
-
key: 0,
|
|
69
|
-
class: "cursor-pointer text-lg!",
|
|
70
|
-
name: "icon--epic--add-rounded",
|
|
71
|
-
onClick: (n) => x(l)
|
|
72
|
-
}, null, 8, ["onClick"])) : I("", !0),
|
|
73
|
-
d(a(U), {
|
|
74
|
-
class: "hover:text-red cursor-pointer",
|
|
75
|
-
name: "icon--epic--delete-outline-rounded",
|
|
76
|
-
onClick: (n) => i(C)
|
|
77
|
-
}, null, 8, ["onClick"])
|
|
78
|
-
], 2),
|
|
79
|
-
l.children ? (p(), V("div", Y, [
|
|
80
|
-
d(h, {
|
|
81
|
-
modelValue: l.children,
|
|
82
|
-
"onUpdate:modelValue": (n) => l.children = n
|
|
83
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
84
|
-
])) : I("", !0)
|
|
85
|
-
])
|
|
86
|
-
]),
|
|
87
|
-
_: 1
|
|
88
|
-
}, 8, ["modelValue"]);
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
}), ee = { class: "" }, te = { class: "epic-tabs-box" }, le = ["title", "onClick"], ae = { key: 0 }, oe = { class: "py-4 my-2 text-center text-gray-400 bg-white" }, ne = { key: 1 }, ie = /* @__PURE__ */ $({
|
|
92
|
-
__name: "index",
|
|
93
|
-
props: {
|
|
94
|
-
tree: { type: Boolean },
|
|
95
|
-
modelValue: {},
|
|
96
|
-
dynamicId: {},
|
|
97
|
-
type: {}
|
|
98
|
-
},
|
|
99
|
-
emits: ["update:modelValue", "update:EOptionsEditor"],
|
|
100
|
-
setup(y, { emit: b }) {
|
|
101
|
-
const k = _.getComponent("button"), g = _.getComponent("select"), c = j([]), v = N({
|
|
102
|
-
title: "静态"
|
|
103
|
-
}), r = y, x = b;
|
|
104
|
-
K.on("updateSource", (t) => {
|
|
105
|
-
c.value = _.sourceData.map((e) => ({
|
|
106
|
-
...e,
|
|
107
|
-
label: e.apiName,
|
|
108
|
-
value: e.id
|
|
109
|
-
}));
|
|
110
|
-
}), J(() => {
|
|
111
|
-
c.value = _.sourceData.map((t) => ({
|
|
112
|
-
...t,
|
|
113
|
-
label: t.apiName,
|
|
114
|
-
value: t.id
|
|
115
|
-
}));
|
|
116
|
-
});
|
|
117
|
-
const i = E(r, "modelValue", x), o = E(r, "dynamicId", x);
|
|
118
|
-
function s(t) {
|
|
119
|
-
return t && Object.prototype.toString.call(t) === "[object Array]" ? t : (Q.info("请检查数据位置是否配置准确"), []);
|
|
120
|
-
}
|
|
121
|
-
z(
|
|
122
|
-
() => o.value,
|
|
123
|
-
async () => {
|
|
124
|
-
o.value ? v.title = "动态" : v.title = "静态";
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
immediate: !0
|
|
128
|
-
}
|
|
129
|
-
);
|
|
130
|
-
const h = [
|
|
131
|
-
{
|
|
132
|
-
title: "静态"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
title: "动态"
|
|
136
|
-
}
|
|
137
|
-
];
|
|
138
|
-
async function l(t) {
|
|
139
|
-
v.title = t.title, t.title === "静态" && (o.value = "");
|
|
140
|
-
}
|
|
141
|
-
async function C(t) {
|
|
142
|
-
const e = c.value.find((u) => u.id === t);
|
|
143
|
-
let f = await W({
|
|
144
|
-
method: (e == null ? void 0 : e.method) || "get",
|
|
145
|
-
// url: "/test" + data.url,
|
|
146
|
-
url: "http://localhost:3333/users",
|
|
147
|
-
params: e != null && e.params ? JSON.parse(e == null ? void 0 : e.params) : {},
|
|
148
|
-
data: e != null && e.data ? JSON.parse(e == null ? void 0 : e.data) : {},
|
|
149
|
-
headers: e != null && e.header ? JSON.parse(e == null ? void 0 : e.header) : {}
|
|
150
|
-
});
|
|
151
|
-
e && (e != null && e.dataPath) ? i.value = s(f.data[e.dataPath]) : i.value = s(f.data);
|
|
152
|
-
}
|
|
153
|
-
r.modelValue, L("tree", r.tree);
|
|
154
|
-
function n() {
|
|
155
|
-
const t = N({
|
|
156
|
-
label: "",
|
|
157
|
-
value: ""
|
|
158
|
-
});
|
|
159
|
-
i.value.length ? i.value = [...i.value, t] : i.value = [t];
|
|
160
|
-
}
|
|
161
|
-
return (t, e) => {
|
|
162
|
-
var f;
|
|
163
|
-
return p(), V("div", ee, [
|
|
164
|
-
m("div", null, [
|
|
165
|
-
m("div", te, [
|
|
166
|
-
(p(), V(P, null, R(h, (u, A) => m("div", {
|
|
167
|
-
class: B(["epic-tab cursor-pointer truncate", { checked: v.title === u.title }]),
|
|
168
|
-
key: A,
|
|
169
|
-
title: u.title,
|
|
170
|
-
onClick: (re) => l(u)
|
|
171
|
-
}, T(u.title), 11, le)), 64))
|
|
172
|
-
]),
|
|
173
|
-
v.title === "静态" ? (p(), V("div", ae, [
|
|
174
|
-
F(m("div", oe, "暂无选项", 512), [
|
|
175
|
-
[q, !((f = a(i)) != null && f.length)]
|
|
176
|
-
]),
|
|
177
|
-
d(Z, {
|
|
178
|
-
modelValue: a(i),
|
|
179
|
-
"onUpdate:modelValue": e[0] || (e[0] = (u) => S(i) ? i.value = u : null)
|
|
180
|
-
}, null, 8, ["modelValue"]),
|
|
181
|
-
d(a(k), { onClick: n }, {
|
|
182
|
-
default: w(() => e[2] || (e[2] = [
|
|
183
|
-
G("添加选项")
|
|
184
|
-
])),
|
|
185
|
-
_: 1
|
|
186
|
-
})
|
|
187
|
-
])) : (p(), V("div", ne, [
|
|
188
|
-
e[3] || (e[3] = m("span", { style: { "font-size": "12px", "margin-bottom": "8px", display: "inline-block" } }, "数据源", -1)),
|
|
189
|
-
d(a(g), {
|
|
190
|
-
modelValue: a(o),
|
|
191
|
-
"onUpdate:modelValue": e[1] || (e[1] = (u) => S(o) ? o.value = u : null),
|
|
192
|
-
placeholder: "请选择数据源",
|
|
193
|
-
clearable: "",
|
|
194
|
-
options: c.value,
|
|
195
|
-
onChange: C
|
|
196
|
-
}, null, 8, ["modelValue", "options"])
|
|
197
|
-
]))
|
|
198
|
-
])
|
|
199
|
-
]);
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
}), fe = /* @__PURE__ */ X(ie, [["__scopeId", "data-v-9004c684"]]);
|
|
203
|
-
export {
|
|
204
|
-
fe as default
|
|
205
|
-
};
|