epic-designer-gold 0.0.49 → 1.0.0
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-DvYRuXDB.js → attributeView-BhPj8bSe.js} +1 -1
- package/dist/{attributeView-CMbZBZIS.cjs → attributeView-C9gY9X-c.cjs} +1 -1
- package/dist/{index-WBW2xl-M.js → index-3ndHV3fl.js} +1 -1
- package/dist/index-B45xlt7e.js +4 -0
- package/dist/{index-BIfS14i1.cjs → index-BA5cmAC5.cjs} +1 -1
- package/dist/{index-2_PG24En.cjs → index-BmqAqj29.cjs} +1 -1
- package/dist/{index-CtK_8YxJ.cjs → index-C2HMY2I2.cjs} +2 -2
- package/dist/{index-C8eSqkwT.cjs → index-CE9DjYAW.cjs} +1 -1
- package/dist/{index-Bjj1uygU.js → index-CshPxldv.js} +1 -1
- package/dist/{index-FUj4O0Wm.cjs → index-CvF1WVts.cjs} +1 -1
- package/dist/{index-D0xByXxW.js → index-Cw3VVR9A.js} +1 -1
- package/dist/{index-SmoMBzHL.js → index-DMDLjlCJ.js} +1 -1
- package/dist/{index-Dy65ngnp.js → index-DNuLy9hB.js} +6 -6
- package/dist/{index-BsyFZeFI.cjs → index-DpitV6qp.cjs} +1 -1
- package/dist/{index-ijn3b5rF.js → index-DtWX93JN.js} +1 -1
- package/dist/{index-3oFTJubt.cjs → index-F6atymcD.cjs} +1 -1
- package/dist/index-G-yqaciQ.cjs +1 -0
- package/dist/{index-BizWKLWZ.js → index-N_JBxsiO.js} +1 -1
- package/dist/index-efmvTLGJ.js +194 -0
- package/dist/{index-zyeRTxj7.cjs → index-iQ5ZEvrv.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{styleView-CF34Ddn9.cjs → styleView-Dew56dxa.cjs} +1 -1
- package/dist/{styleView-BbQxI-Nr.js → styleView-SPW99MRS.js} +1 -1
- package/package.json +1 -1
- package/dist/index-CqirvAEP.js +0 -4
- package/dist/index-DiYy4kUz.js +0 -228
- package/dist/index-YV7i1gyI.cjs +0 -1
package/dist/index-DiYy4kUz.js
DELETED
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import { defineComponent as D, inject as j, resolveComponent as J, openBlock as v, createBlock as I, unref as r, isRef as E, withCtx as z, createElementVNode as p, normalizeClass as M, createVNode as m, createCommentVNode as A, createElementBlock as g, ref as K, reactive as B, onMounted as L, watch as P, provide as R, Fragment as F, renderList as q, toDisplayString as G, withDirectives as H, vShow as Q, createTextVNode as W } from "vue";
|
|
2
|
-
import { d as X } from "./vuedraggable.umd-D2S7Eo7p.js";
|
|
3
|
-
import { p as f, E as $, a as Y, b as w } from "./js.cookie-oHpRFPCO.js";
|
|
4
|
-
import { _ as S } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
5
|
-
import { n as N } from "./index-Dy65ngnp.js";
|
|
6
|
-
import { ElMessage as Z } from "element-plus";
|
|
7
|
-
import { _ as ee } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
-
const le = {
|
|
9
|
-
key: 0,
|
|
10
|
-
class: "pl-4"
|
|
11
|
-
}, te = /* @__PURE__ */ D({
|
|
12
|
-
name: "EOptionItem",
|
|
13
|
-
__name: "optionItem",
|
|
14
|
-
props: {
|
|
15
|
-
modelValue: {}
|
|
16
|
-
},
|
|
17
|
-
emits: ["update:modelValue"],
|
|
18
|
-
setup(y, { emit: k }) {
|
|
19
|
-
const C = y, b = f.getComponent("input"), c = j("tree", !1), s = N(C, "modelValue", k);
|
|
20
|
-
function x(t) {
|
|
21
|
-
const d = {
|
|
22
|
-
label: "",
|
|
23
|
-
value: ""
|
|
24
|
-
};
|
|
25
|
-
t.children ? t.children.push(d) : t.children = [d];
|
|
26
|
-
}
|
|
27
|
-
function o(t) {
|
|
28
|
-
s.value = s.value.filter((d, V) => V !== t);
|
|
29
|
-
}
|
|
30
|
-
return (t, d) => {
|
|
31
|
-
const V = J("EOptionItem");
|
|
32
|
-
return v(), I(r(X), {
|
|
33
|
-
modelValue: r(s),
|
|
34
|
-
"onUpdate:modelValue": d[0] || (d[0] = (n) => E(s) ? s.value = n : null),
|
|
35
|
-
"item-key": "id",
|
|
36
|
-
"component-data": {
|
|
37
|
-
type: "transition-group"
|
|
38
|
-
},
|
|
39
|
-
group: "option-list",
|
|
40
|
-
handle: ".handle",
|
|
41
|
-
animation: 200
|
|
42
|
-
}, {
|
|
43
|
-
item: z(({ element: n, index: _ }) => [
|
|
44
|
-
p("div", null, [
|
|
45
|
-
p("div", {
|
|
46
|
-
class: M([r(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"])
|
|
47
|
-
}, [
|
|
48
|
-
m(r(S), {
|
|
49
|
-
class: "mr-2 cursor-move handle",
|
|
50
|
-
name: "icon--epic--drag"
|
|
51
|
-
}),
|
|
52
|
-
m(r(b), {
|
|
53
|
-
modelValue: n.label,
|
|
54
|
-
"onUpdate:modelValue": (i) => n.label = i,
|
|
55
|
-
value: n.label,
|
|
56
|
-
"onUpdate:value": (i) => n.label = i,
|
|
57
|
-
placeholder: "label"
|
|
58
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "value", "onUpdate:value"]),
|
|
59
|
-
m(r(b), {
|
|
60
|
-
modelValue: n.value,
|
|
61
|
-
"onUpdate:modelValue": (i) => n.value = i,
|
|
62
|
-
value: n.value,
|
|
63
|
-
"onUpdate:value": (i) => n.value = i,
|
|
64
|
-
placeholder: "value"
|
|
65
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "value", "onUpdate:value"]),
|
|
66
|
-
r(c) ? (v(), I(r(S), {
|
|
67
|
-
key: 0,
|
|
68
|
-
class: "cursor-pointer text-lg!",
|
|
69
|
-
name: "icon--epic--add-rounded",
|
|
70
|
-
onClick: (i) => x(n)
|
|
71
|
-
}, null, 8, ["onClick"])) : A("", !0),
|
|
72
|
-
m(r(S), {
|
|
73
|
-
class: "hover:text-red cursor-pointer",
|
|
74
|
-
name: "icon--epic--delete-outline-rounded",
|
|
75
|
-
onClick: (i) => o(_)
|
|
76
|
-
}, null, 8, ["onClick"])
|
|
77
|
-
], 2),
|
|
78
|
-
n.children ? (v(), g("div", le, [
|
|
79
|
-
m(V, {
|
|
80
|
-
modelValue: n.children,
|
|
81
|
-
"onUpdate:modelValue": (i) => n.children = i
|
|
82
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
83
|
-
])) : A("", !0)
|
|
84
|
-
])
|
|
85
|
-
]),
|
|
86
|
-
_: 1
|
|
87
|
-
}, 8, ["modelValue"]);
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
}), ae = { class: "" }, ne = { class: "epic-tabs-box" }, oe = ["title", "onClick"], re = { key: 0 }, ie = { class: "py-4 my-2 text-center text-gray-400 bg-white" }, ue = { key: 1 }, se = /* @__PURE__ */ D({
|
|
91
|
-
__name: "index",
|
|
92
|
-
props: {
|
|
93
|
-
tree: { type: Boolean },
|
|
94
|
-
modelValue: {},
|
|
95
|
-
dynamicId: {},
|
|
96
|
-
type: {}
|
|
97
|
-
},
|
|
98
|
-
emits: ["update:modelValue", "update:EOptionsEditor"],
|
|
99
|
-
setup(y, { emit: k }) {
|
|
100
|
-
const C = f.getComponent("button"), b = f.getComponent("select"), c = K([]), h = B({
|
|
101
|
-
title: "静态"
|
|
102
|
-
}), s = y, x = k;
|
|
103
|
-
$.on("deleteSourceData", (l) => {
|
|
104
|
-
t.value === l && (t.value = "", o.value = []);
|
|
105
|
-
}), $.on("updateSource", (l) => {
|
|
106
|
-
c.value = f.sourceData.map((e) => ({
|
|
107
|
-
...e,
|
|
108
|
-
label: e.apiName,
|
|
109
|
-
value: e.id
|
|
110
|
-
})), _(t.value);
|
|
111
|
-
}), L(() => {
|
|
112
|
-
c.value = f.sourceData.map((l) => ({
|
|
113
|
-
...l,
|
|
114
|
-
label: l.apiName,
|
|
115
|
-
value: l.id
|
|
116
|
-
})), _(t.value);
|
|
117
|
-
});
|
|
118
|
-
const o = N(s, "modelValue", x), t = N(s, "dynamicId", x);
|
|
119
|
-
function d(l, e, u) {
|
|
120
|
-
return l && Object.prototype.toString.call(l) === "[object Array]" ? l.map((a) => a.children && a.children.length ? {
|
|
121
|
-
label: a[e],
|
|
122
|
-
value: a[u] + "",
|
|
123
|
-
children: d(a.children, e, u)
|
|
124
|
-
} : {
|
|
125
|
-
label: a[e],
|
|
126
|
-
value: a[u] + ""
|
|
127
|
-
}) : (Z.info("请检查数据位置是否配置准确"), []);
|
|
128
|
-
}
|
|
129
|
-
P(
|
|
130
|
-
() => t.value,
|
|
131
|
-
async () => {
|
|
132
|
-
t.value ? h.title = "动态" : h.title = "静态";
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
immediate: !0
|
|
136
|
-
}
|
|
137
|
-
);
|
|
138
|
-
const V = [
|
|
139
|
-
{
|
|
140
|
-
title: "静态"
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
title: "动态"
|
|
144
|
-
}
|
|
145
|
-
];
|
|
146
|
-
async function n(l) {
|
|
147
|
-
h.title = l.title, l.title === "静态" ? (o.value = [], t.value = "") : (o.value = [], c.value = f.sourceData.map((e) => ({
|
|
148
|
-
...e,
|
|
149
|
-
label: e.apiName,
|
|
150
|
-
value: e.id
|
|
151
|
-
})));
|
|
152
|
-
}
|
|
153
|
-
async function _(l) {
|
|
154
|
-
const e = c.value.find((u) => u.id === l);
|
|
155
|
-
if (e && e.url) {
|
|
156
|
-
let u = await Y({
|
|
157
|
-
method: (e == null ? void 0 : e.method) || "get",
|
|
158
|
-
url: e.url,
|
|
159
|
-
// url: "http://localhost:3333/users",
|
|
160
|
-
params: e != null && e.params ? JSON.parse(e == null ? void 0 : e.params) : {},
|
|
161
|
-
data: e != null && e.data ? JSON.parse(e == null ? void 0 : e.data) : {},
|
|
162
|
-
headers: e != null && e.header ? {
|
|
163
|
-
...JSON.parse(e == null ? void 0 : e.header),
|
|
164
|
-
Authorization: "Bearer " + w.get("Admin-Token")
|
|
165
|
-
} : {
|
|
166
|
-
Authorization: "Bearer " + w.get("Admin-Token")
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
if (e && (e != null && e.dataPath)) {
|
|
170
|
-
const U = e.dataPath.split(".").reduce((O, T) => O[T], u.data);
|
|
171
|
-
o.value = d(U, e.dataKey, e.dataValue);
|
|
172
|
-
} else
|
|
173
|
-
o.value = d(u.data, e.dataKey, e.dataValue);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
s.modelValue, R("tree", s.tree);
|
|
177
|
-
function i() {
|
|
178
|
-
const l = B({
|
|
179
|
-
label: "",
|
|
180
|
-
value: ""
|
|
181
|
-
});
|
|
182
|
-
o.value.length ? o.value = [...o.value, l] : o.value = [l];
|
|
183
|
-
}
|
|
184
|
-
return (l, e) => {
|
|
185
|
-
var u;
|
|
186
|
-
return v(), g("div", ae, [
|
|
187
|
-
p("div", null, [
|
|
188
|
-
p("div", ne, [
|
|
189
|
-
(v(), g(F, null, q(V, (a, U) => p("div", {
|
|
190
|
-
class: M(["epic-tab cursor-pointer truncate", { checked: h.title === a.title }]),
|
|
191
|
-
key: U,
|
|
192
|
-
title: a.title,
|
|
193
|
-
onClick: (O) => n(a)
|
|
194
|
-
}, G(a.title), 11, oe)), 64))
|
|
195
|
-
]),
|
|
196
|
-
h.title === "静态" ? (v(), g("div", re, [
|
|
197
|
-
H(p("div", ie, "暂无选项", 512), [
|
|
198
|
-
[Q, !((u = r(o)) != null && u.length)]
|
|
199
|
-
]),
|
|
200
|
-
m(te, {
|
|
201
|
-
modelValue: r(o),
|
|
202
|
-
"onUpdate:modelValue": e[0] || (e[0] = (a) => E(o) ? o.value = a : null)
|
|
203
|
-
}, null, 8, ["modelValue"]),
|
|
204
|
-
m(r(C), { onClick: i }, {
|
|
205
|
-
default: z(() => e[2] || (e[2] = [
|
|
206
|
-
W("添加选项")
|
|
207
|
-
])),
|
|
208
|
-
_: 1
|
|
209
|
-
})
|
|
210
|
-
])) : (v(), g("div", ue, [
|
|
211
|
-
e[3] || (e[3] = p("span", { style: { "font-size": "12px", "margin-bottom": "8px", display: "inline-block" } }, "数据源", -1)),
|
|
212
|
-
m(r(b), {
|
|
213
|
-
modelValue: r(t),
|
|
214
|
-
"onUpdate:modelValue": e[1] || (e[1] = (a) => E(t) ? t.value = a : null),
|
|
215
|
-
placeholder: "请选择数据源",
|
|
216
|
-
clearable: "",
|
|
217
|
-
options: c.value,
|
|
218
|
-
onChange: _
|
|
219
|
-
}, null, 8, ["modelValue", "options"])
|
|
220
|
-
]))
|
|
221
|
-
])
|
|
222
|
-
]);
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
}), Ve = /* @__PURE__ */ ee(se, [["__scopeId", "data-v-5a353824"]]);
|
|
226
|
-
export {
|
|
227
|
-
Ve as default
|
|
228
|
-
};
|
package/dist/index-YV7i1gyI.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),B=require("./vuedraggable.umd-BqhSJIAi.cjs"),c=require("./js.cookie-BH1G_HRi.cjs"),b=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),x=require("./index-CtK_8YxJ.cjs"),E=require("element-plus"),S=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),U={key:0,class:"pl-4"},M=e.defineComponent({name:"EOptionItem",__name:"optionItem",props:{modelValue:{}},emits:["update:modelValue"],setup(h,{emit:g}){const k=h,f=c.pluginManager.getComponent("input"),p=e.inject("tree",!1),m=g,d=x.useVModel(k,"modelValue",m);function _(n){const s={label:"",value:""};n.children?n.children.push(s):n.children=[s]}function r(n){d.value=d.value.filter((s,v)=>v!==n)}return(n,s)=>{const v=e.resolveComponent("EOptionItem");return e.openBlock(),e.createBlock(e.unref(B.draggable),{modelValue:e.unref(d),"onUpdate:modelValue":s[0]||(s[0]=o=>e.isRef(d)?d.value=o:null),"item-key":"id","component-data":{type:"transition-group"},group:"option-list",handle:".handle",animation:200},{item:e.withCtx(({element:o,index:V})=>[e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass([e.unref(p)?"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(b._sfc_main),{class:"mr-2 cursor-move handle",name:"icon--epic--drag"}),e.createVNode(e.unref(f),{modelValue:o.label,"onUpdate:modelValue":u=>o.label=u,value:o.label,"onUpdate:value":u=>o.label=u,placeholder:"label"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.createVNode(e.unref(f),{modelValue:o.value,"onUpdate:modelValue":u=>o.value=u,value:o.value,"onUpdate:value":u=>o.value=u,placeholder:"value"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.unref(p)?(e.openBlock(),e.createBlock(e.unref(b._sfc_main),{key:0,class:"cursor-pointer text-lg!",name:"icon--epic--add-rounded",onClick:u=>_(o)},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(e.unref(b._sfc_main),{class:"hover:text-red cursor-pointer",name:"icon--epic--delete-outline-rounded",onClick:u=>r(V)},null,8,["onClick"])],2),o.children?(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(v,{modelValue:o.children,"onUpdate:modelValue":u=>o.children=u},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue"])}}}),O={class:""},I={class:"epic-tabs-box"},A=["title","onClick"],q={key:0},w={class:"py-4 my-2 text-center text-gray-400 bg-white"},$={key:1},D=e.defineComponent({__name:"index",props:{tree:{type:Boolean},modelValue:{},dynamicId:{},type:{}},emits:["update:modelValue","update:EOptionsEditor"],setup(h,{emit:g}){const k=c.pluginManager.getComponent("button"),f=c.pluginManager.getComponent("select"),p=e.ref([]),m=e.reactive({title:"静态"}),d=h,_=g;c.EventBus.on("deleteSourceData",t=>{n.value===t&&(n.value="",r.value=[])}),c.EventBus.on("updateSource",t=>{p.value=c.pluginManager.sourceData.map(l=>({...l,label:l.apiName,value:l.id})),V(n.value)}),e.onMounted(()=>{p.value=c.pluginManager.sourceData.map(t=>({...t,label:t.apiName,value:t.id})),V(n.value)});const r=x.useVModel(d,"modelValue",_),n=x.useVModel(d,"dynamicId",_);function s(t,l,i){return t&&Object.prototype.toString.call(t)==="[object Array]"?t.map(a=>a.children&&a.children.length?{label:a[l],value:a[i]+"",children:s(a.children,l,i)}:{label:a[l],value:a[i]+""}):(E.ElMessage.info("请检查数据位置是否配置准确"),[])}e.watch(()=>n.value,async()=>{n.value?m.title="动态":m.title="静态"},{immediate:!0});const v=[{title:"静态"},{title:"动态"}];async function o(t){m.title=t.title,t.title==="静态"?(r.value=[],n.value=""):(r.value=[],p.value=c.pluginManager.sourceData.map(l=>({...l,label:l.apiName,value:l.id})))}async function V(t){const l=p.value.find(i=>i.id===t);if(l&&l.url){let i=await c.axios({method:(l==null?void 0:l.method)||"get",url:l.url,params:l!=null&&l.params?JSON.parse(l==null?void 0:l.params):{},data:l!=null&&l.data?JSON.parse(l==null?void 0:l.data):{},headers:l!=null&&l.header?{...JSON.parse(l==null?void 0:l.header),Authorization:"Bearer "+c.api.get("Admin-Token")}:{Authorization:"Bearer "+c.api.get("Admin-Token")}});if(l&&(l!=null&&l.dataPath)){const y=l.dataPath.split(".").reduce((N,C)=>N[C],i.data);r.value=s(y,l.dataKey,l.dataValue)}else r.value=s(i.data,l.dataKey,l.dataValue)}}d.modelValue,e.provide("tree",d.tree);function u(){const t=e.reactive({label:"",value:""});r.value.length?r.value=[...r.value,t]:r.value=[t]}return(t,l)=>{var i;return e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("div",null,[e.createElementVNode("div",I,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(v,(a,y)=>e.createElementVNode("div",{class:e.normalizeClass(["epic-tab cursor-pointer truncate",{checked:m.title===a.title}]),key:y,title:a.title,onClick:N=>o(a)},e.toDisplayString(a.title),11,A)),64))]),m.title==="静态"?(e.openBlock(),e.createElementBlock("div",q,[e.withDirectives(e.createElementVNode("div",w,"暂无选项",512),[[e.vShow,!((i=e.unref(r))!=null&&i.length)]]),e.createVNode(M,{modelValue:e.unref(r),"onUpdate:modelValue":l[0]||(l[0]=a=>e.isRef(r)?r.value=a:null)},null,8,["modelValue"]),e.createVNode(e.unref(k),{onClick:u},{default:e.withCtx(()=>l[2]||(l[2]=[e.createTextVNode("添加选项")])),_:1})])):(e.openBlock(),e.createElementBlock("div",$,[l[3]||(l[3]=e.createElementVNode("span",{style:{"font-size":"12px","margin-bottom":"8px",display:"inline-block"}},"数据源",-1)),e.createVNode(e.unref(f),{modelValue:e.unref(n),"onUpdate:modelValue":l[1]||(l[1]=a=>e.isRef(n)?n.value=a:null),placeholder:"请选择数据源",clearable:"",options:p.value,onChange:V},null,8,["modelValue","options"])]))])])}}}),j=S._export_sfc(D,[["__scopeId","data-v-5a353824"]]);exports.default=j;
|