epic-designer-gold 0.0.11 → 0.0.13
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-DQTbBkx6.cjs → attributeView-CfMG9ANQ.cjs} +1 -1
- package/dist/{attributeView-d51qwAGc.js → attributeView-CqQCeL9p.js} +1 -1
- package/dist/{eventView-BaDIF66_.cjs → eventView-CSJb3Zam.cjs} +1 -1
- package/dist/{eventView-BxTwk3Gb.js → eventView-C_THyz3W.js} +1 -1
- package/dist/index-B3dTIoEC.cjs +1 -0
- package/dist/{index-Dw9ciL_n.js → index-BC_6e5pJ.js} +1 -1
- package/dist/{index-DTsLSMrJ.js → index-BMnsWYrT.js} +1 -1
- package/dist/{index-DAEaW6wH.cjs → index-Bd5nBb_T.cjs} +1 -1
- package/dist/{index-CExMQ6Fe.cjs → index-BnRo1212.cjs} +1 -1
- package/dist/{index-Czol3WHB.js → index-BqPDmqv7.js} +1 -1
- package/dist/{index-B5EYlO1t.cjs → index-CaIsXqm5.cjs} +1 -1
- package/dist/{index-lPBFjKuX.cjs → index-Ctr7oJRf.cjs} +1 -1
- package/dist/{index-B1j0JJjX.cjs → index-Cz47jN8A.cjs} +1 -1
- package/dist/{index-CwJDUfGd.js → index-DAWH9Tr_.js} +1 -1
- package/dist/{index-BCgW7lAq.cjs → index-DAk3CFkW.cjs} +1 -1
- package/dist/{index-8M1sB_Qf.js → index-DBj3eppg.js} +1 -1
- package/dist/{index-CUVYkkg8.cjs → index-DZ5RBl4U.cjs} +1 -1
- package/dist/{index-BtZq-ie5.js → index-Dm_60RQ9.js} +39 -39
- package/dist/{index-IMXHB1LW.js → index-DtXxkuvD.js} +1 -1
- package/dist/{index-YYBlBbdy.js → index-GtUWspi3.js} +1 -1
- package/dist/{index-B2lbc5lj.js → index-MwVOPR2b.js} +8 -8
- package/dist/{index-B8PVsPu_.js → index-S4XwR1vD.js} +78 -78
- package/dist/index-jsf_Tgj1.js +4 -0
- package/dist/index-mxP1Ba2T.cjs +1 -0
- package/dist/{index-Cs4lLl3Y.cjs → index-p6doDa9j.cjs} +2 -2
- package/dist/{index-BhKBVm6E.cjs → index-sZ9OfgE1.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{styleView-DozZ0ICs.cjs → styleView-0rthSdVL.cjs} +1 -1
- package/dist/{styleView-DrFifmTk.js → styleView-DX_XKKmF.js} +1 -1
- package/package.json +1 -1
- package/dist/index-CqlZ86sE.cjs +0 -1
- package/dist/index-D1mklGgR.cjs +0 -1
- package/dist/index-D62Ik4Dt.js +0 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as te, ref as O, reactive as oe, onMounted as ue, openBlock as m, createElementBlock as v, createVNode as a, unref as t, withCtx as n, createElementVNode as s, toDisplayString as R, Fragment as E, renderList as D, normalizeClass as de, normalizeStyle as ne, createTextVNode as b, createCommentVNode as F } from "vue";
|
|
2
2
|
import { p, E as J } from "./pluginManager-D8PM7ICc.js";
|
|
3
|
-
import { ElMessage as
|
|
3
|
+
import { ElMessage as _ } from "element-plus";
|
|
4
4
|
import { _ as g } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
5
5
|
import { a as se } from "./axios-CXDYiOMX.js";
|
|
6
6
|
const re = { class: "e-data-source" }, ie = { class: "icon-numbers" }, me = { class: "drawer-content" }, ve = { class: "drawer-content-left" }, pe = ["onClick"], ce = { class: "source-item-title" }, fe = ["onClick"], ye = { class: "drawer-content-right" }, be = { class: "content" }, ge = {
|
|
@@ -9,7 +9,7 @@ const re = { class: "e-data-source" }, ie = { class: "icon-numbers" }, me = { cl
|
|
|
9
9
|
}, he = {
|
|
10
10
|
key: 1,
|
|
11
11
|
class: "content-form"
|
|
12
|
-
}, Ve = { class: "form-flex" },
|
|
12
|
+
}, Ve = { class: "form-flex" }, _e = { class: "form-item" }, ke = { class: "form-item-title" }, Le = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "form-item-content"
|
|
15
15
|
}, Se = { class: "form-item" }, Ce = { class: "form-item-title" }, we = {
|
|
@@ -22,9 +22,9 @@ const re = { class: "e-data-source" }, ie = { class: "icon-numbers" }, me = { cl
|
|
|
22
22
|
__name: "index",
|
|
23
23
|
emits: ["update:modelValue", "update:sourceData"],
|
|
24
24
|
setup(De, { emit: Je }) {
|
|
25
|
-
const c = p.getComponent("button"), K = p.getComponent("Drawer"), N = p.getComponent("input"),
|
|
25
|
+
const c = p.getComponent("button"), K = p.getComponent("Drawer"), N = p.getComponent("input"), k = p.getComponent("FormItem"), j = p.getComponent("Form"), q = p.getComponent("RadioGroup"), U = p.getComponent("RadioButton"), L = p.getComponent("select");
|
|
26
26
|
p.getComponent("switch");
|
|
27
|
-
const
|
|
27
|
+
const P = O(), B = {
|
|
28
28
|
GET: "#67c23a",
|
|
29
29
|
POST: "#e6a23c",
|
|
30
30
|
PUT: "#409eff",
|
|
@@ -34,32 +34,32 @@ const re = { class: "e-data-source" }, ie = { class: "icon-numbers" }, me = { cl
|
|
|
34
34
|
url: [{ required: !0, message: "请输入请求地址", trigger: "blur" }],
|
|
35
35
|
dataKey: [{ required: !0, message: "请输入标签键名", trigger: "blur" }],
|
|
36
36
|
dataValue: [{ required: !0, message: "请输入值键名", trigger: "blur" }]
|
|
37
|
-
}),
|
|
37
|
+
}), T = O(!1), f = O([]), e = O(), S = [
|
|
38
38
|
{
|
|
39
39
|
label: "1",
|
|
40
40
|
value: "1"
|
|
41
41
|
}
|
|
42
42
|
];
|
|
43
|
-
function z() {
|
|
44
|
-
P.value = !0;
|
|
45
|
-
}
|
|
46
43
|
function G() {
|
|
44
|
+
T.value = !0;
|
|
45
|
+
}
|
|
46
|
+
function I() {
|
|
47
47
|
const o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
48
48
|
return o.charAt(Math.floor(Math.random() * o.length));
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function z(o) {
|
|
51
51
|
let l = "";
|
|
52
52
|
for (let u = 0; u < o; u++)
|
|
53
|
-
l +=
|
|
53
|
+
l += I();
|
|
54
54
|
return l;
|
|
55
55
|
}
|
|
56
56
|
function A() {
|
|
57
|
-
|
|
57
|
+
!e.value || e.value.id || !Object.keys(e.value).length ? (e.value = {
|
|
58
58
|
id: "",
|
|
59
59
|
url: "",
|
|
60
60
|
body: {},
|
|
61
61
|
bodyList: [],
|
|
62
|
-
apiName: `数据源_${
|
|
62
|
+
apiName: `数据源_${z(5)}`,
|
|
63
63
|
method: "get",
|
|
64
64
|
params: {},
|
|
65
65
|
paramsList: [],
|
|
@@ -68,11 +68,11 @@ const re = { class: "e-data-source" }, ie = { class: "icon-numbers" }, me = { cl
|
|
|
68
68
|
headerList: [],
|
|
69
69
|
dataPath: "",
|
|
70
70
|
dataValue: "id"
|
|
71
|
-
}, f.value.push(e.value)) : e.value.id ||
|
|
71
|
+
}, f.value.push(e.value)) : e.value.id || x();
|
|
72
72
|
}
|
|
73
73
|
function H(o) {
|
|
74
74
|
var l;
|
|
75
|
-
|
|
75
|
+
!e.value || e.value.id || !Object.keys(e.value).length ? (f.value = JSON.parse(JSON.stringify(p.getSourceData())), ((l = e.value) == null ? void 0 : l.id) === o ? e.value = {} : (e.value = f.value.find((u) => u.id === o), e.value.paramsList = Object.keys(JSON.parse(e.value.params)).map((u) => ({
|
|
76
76
|
label: u,
|
|
77
77
|
value: JSON.parse(e.value.params)[u]
|
|
78
78
|
})), e.value.bodyList = Object.keys(JSON.parse(e.value.body)).map((u) => ({
|
|
@@ -81,10 +81,10 @@ const re = { class: "e-data-source" }, ie = { class: "icon-numbers" }, me = { cl
|
|
|
81
81
|
})), e.value.headerList = Object.keys(JSON.parse(e.value.headers)).map((u) => ({
|
|
82
82
|
label: u,
|
|
83
83
|
value: JSON.parse(e.value.headers)[u]
|
|
84
|
-
})))) :
|
|
84
|
+
})))) : x();
|
|
85
85
|
}
|
|
86
86
|
function Q(o) {
|
|
87
|
-
o ? J.emit("deleteSourceData", o) : (f.value = f.value.filter((l) => l.id !== o), e.value = {});
|
|
87
|
+
o ? (J.emit("deleteSourceData", o), e.value = {}) : (f.value = f.value.filter((l) => l.id !== o), e.value = {});
|
|
88
88
|
}
|
|
89
89
|
function W() {
|
|
90
90
|
var o;
|
|
@@ -122,7 +122,7 @@ const re = { class: "e-data-source" }, ie = { class: "icon-numbers" }, me = { cl
|
|
|
122
122
|
f.value = JSON.parse(JSON.stringify(p.getSourceData()));
|
|
123
123
|
});
|
|
124
124
|
async function ae() {
|
|
125
|
-
|
|
125
|
+
P.value.validate(async (o) => {
|
|
126
126
|
if (o)
|
|
127
127
|
try {
|
|
128
128
|
const l = {};
|
|
@@ -148,35 +148,35 @@ const re = { class: "e-data-source" }, ie = { class: "icon-numbers" }, me = { cl
|
|
|
148
148
|
});
|
|
149
149
|
if (e.value.dataPath) {
|
|
150
150
|
const C = e.value.dataPath.split(".").reduce((V, d) => V[d], y.data);
|
|
151
|
-
C && C.length ?
|
|
151
|
+
C && C.length ? _({
|
|
152
152
|
message: C.map((V) => ({
|
|
153
153
|
label: V[e.value.dataKey],
|
|
154
154
|
value: V[e.value.dataValue]
|
|
155
155
|
}))
|
|
156
|
-
}) :
|
|
156
|
+
}) : _.info("配置错误");
|
|
157
157
|
} else
|
|
158
|
-
y.data && y.data.length ?
|
|
158
|
+
y.data && y.data.length ? _({
|
|
159
159
|
message: y.data.map((r) => ({
|
|
160
160
|
label: r[e.value.dataKey],
|
|
161
161
|
value: r[e.value.dataValue]
|
|
162
162
|
}))
|
|
163
|
-
}) :
|
|
163
|
+
}) : _.info("配置错误");
|
|
164
164
|
} catch {
|
|
165
|
-
|
|
165
|
+
_.error("请求失败");
|
|
166
166
|
} finally {
|
|
167
167
|
}
|
|
168
168
|
else
|
|
169
|
-
|
|
169
|
+
_.error("请填写必填项");
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
|
-
async function
|
|
172
|
+
async function x() {
|
|
173
173
|
e.value.body = e.value.bodyList.reduce((o, l) => (o[l.label] = l.value, o), {}), e.value.params = e.value.paramsList.reduce(
|
|
174
174
|
(o, l) => (o[l.label] = l.value, o),
|
|
175
175
|
{}
|
|
176
176
|
), e.value.headers = e.value.headerList.reduce(
|
|
177
177
|
(o, l) => (o[l.label] = l.value, o),
|
|
178
178
|
{}
|
|
179
|
-
),
|
|
179
|
+
), P.value.validate((o) => {
|
|
180
180
|
o ? e.value.id ? (J.emit("updateSourceData", {
|
|
181
181
|
...e.value,
|
|
182
182
|
body: JSON.stringify(e.value.body),
|
|
@@ -187,13 +187,13 @@ const re = { class: "e-data-source" }, ie = { class: "icon-numbers" }, me = { cl
|
|
|
187
187
|
body: JSON.stringify(e.value.body),
|
|
188
188
|
params: JSON.stringify(e.value.params),
|
|
189
189
|
headers: JSON.stringify(e.value.headers)
|
|
190
|
-
}), e.value = {}) :
|
|
190
|
+
}), e.value = {}) : _.warning("请先完善表单");
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
193
|
return (o, l) => (m(), v("div", re, [
|
|
194
194
|
a(t(c), {
|
|
195
195
|
class: "btn",
|
|
196
|
-
onClick:
|
|
196
|
+
onClick: G
|
|
197
197
|
}, {
|
|
198
198
|
default: n(() => [
|
|
199
199
|
a(t(g), {
|
|
@@ -207,8 +207,8 @@ const re = { class: "e-data-source" }, ie = { class: "icon-numbers" }, me = { cl
|
|
|
207
207
|
}),
|
|
208
208
|
a(t(K), {
|
|
209
209
|
size: 960,
|
|
210
|
-
modelValue:
|
|
211
|
-
"onUpdate:modelValue": l[7] || (l[7] = (u) =>
|
|
210
|
+
modelValue: T.value,
|
|
211
|
+
"onUpdate:modelValue": l[7] || (l[7] = (u) => T.value = u),
|
|
212
212
|
"append-to-body": "",
|
|
213
213
|
title: "数据源"
|
|
214
214
|
}, {
|
|
@@ -260,7 +260,7 @@ const re = { class: "e-data-source" }, ie = { class: "icon-numbers" }, me = { cl
|
|
|
260
260
|
!e.value || !Object.keys(e.value).length ? (m(), v("div", ge, "请选择数据源")) : (m(), v("div", he, [
|
|
261
261
|
a(t(j), {
|
|
262
262
|
ref_key: "ruleFormRef",
|
|
263
|
-
ref:
|
|
263
|
+
ref: P,
|
|
264
264
|
model: e.value,
|
|
265
265
|
"label-position": "top",
|
|
266
266
|
rules: $,
|
|
@@ -269,7 +269,7 @@ const re = { class: "e-data-source" }, ie = { class: "icon-numbers" }, me = { cl
|
|
|
269
269
|
default: n(() => {
|
|
270
270
|
var u, h, y, r, C, V;
|
|
271
271
|
return [
|
|
272
|
-
a(t(
|
|
272
|
+
a(t(k), {
|
|
273
273
|
prop: "apiName",
|
|
274
274
|
label: "接口名称"
|
|
275
275
|
}, {
|
|
@@ -283,7 +283,7 @@ const re = { class: "e-data-source" }, ie = { class: "icon-numbers" }, me = { cl
|
|
|
283
283
|
]),
|
|
284
284
|
_: 1
|
|
285
285
|
}),
|
|
286
|
-
a(t(
|
|
286
|
+
a(t(k), {
|
|
287
287
|
prop: "url",
|
|
288
288
|
label: "请求地址"
|
|
289
289
|
}, {
|
|
@@ -297,7 +297,7 @@ const re = { class: "e-data-source" }, ie = { class: "icon-numbers" }, me = { cl
|
|
|
297
297
|
]),
|
|
298
298
|
_: 1
|
|
299
299
|
}),
|
|
300
|
-
a(t(
|
|
300
|
+
a(t(k), {
|
|
301
301
|
label: "请求方法",
|
|
302
302
|
required: ""
|
|
303
303
|
}, {
|
|
@@ -350,7 +350,7 @@ const re = { class: "e-data-source" }, ie = { class: "icon-numbers" }, me = { cl
|
|
|
350
350
|
_: 1
|
|
351
351
|
}),
|
|
352
352
|
s("div", Ve, [
|
|
353
|
-
a(t(
|
|
353
|
+
a(t(k), {
|
|
354
354
|
prop: "dataKey",
|
|
355
355
|
style: { width: "30%" },
|
|
356
356
|
label: "标签键名"
|
|
@@ -365,7 +365,7 @@ const re = { class: "e-data-source" }, ie = { class: "icon-numbers" }, me = { cl
|
|
|
365
365
|
]),
|
|
366
366
|
_: 1
|
|
367
367
|
}),
|
|
368
|
-
a(t(
|
|
368
|
+
a(t(k), {
|
|
369
369
|
prop: "dataValue",
|
|
370
370
|
style: { width: "30%" },
|
|
371
371
|
label: "值键名"
|
|
@@ -380,7 +380,7 @@ const re = { class: "e-data-source" }, ie = { class: "icon-numbers" }, me = { cl
|
|
|
380
380
|
]),
|
|
381
381
|
_: 1
|
|
382
382
|
}),
|
|
383
|
-
a(t(
|
|
383
|
+
a(t(k), {
|
|
384
384
|
style: { width: "33%" },
|
|
385
385
|
label: "数据位置"
|
|
386
386
|
}, {
|
|
@@ -395,8 +395,8 @@ const re = { class: "e-data-source" }, ie = { class: "icon-numbers" }, me = { cl
|
|
|
395
395
|
_: 1
|
|
396
396
|
})
|
|
397
397
|
]),
|
|
398
|
-
s("div",
|
|
399
|
-
s("div",
|
|
398
|
+
s("div", _e, [
|
|
399
|
+
s("div", ke, [
|
|
400
400
|
l[15] || (l[15] = s("div", null, "请求参数", -1)),
|
|
401
401
|
a(t(c), {
|
|
402
402
|
onClick: W,
|
|
@@ -572,7 +572,7 @@ const re = { class: "e-data-source" }, ie = { class: "icon-numbers" }, me = { cl
|
|
|
572
572
|
}),
|
|
573
573
|
a(t(c), {
|
|
574
574
|
type: "primary",
|
|
575
|
-
onClick:
|
|
575
|
+
onClick: x
|
|
576
576
|
}, {
|
|
577
577
|
default: n(() => l[21] || (l[21] = [
|
|
578
578
|
b("保存")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as K, inject as L, ref as C, computed as j, watch as Y, openBlock as M, createElementBlock as W, Fragment as X, withDirectives as de, createElementVNode as w, normalizeClass as q, toDisplayString as _e, unref as h, createVNode as z, createCommentVNode as se, vShow as ue, createBlock as te, mergeProps as Se, withCtx as oe, useAttrs as we, provide as Ce, onUnmounted as ke, resolveComponent as Ne, createSlots as $e, renderList as ve, shallowRef as Re, watchEffect as Te, nextTick as pe, normalizeStyle as le, renderSlot as Be, onMounted as Oe } from "vue";
|
|
2
2
|
import { p as U } from "./pluginManager-D8PM7ICc.js";
|
|
3
|
-
import { u as fe, a as Me, f as me, g as Le, b as ae, _ as De, d as ce, c as He, e as Ve, h as We, i as ze, w as Ae, j as Pe } from "./index-
|
|
3
|
+
import { u as fe, a as Me, f as me, g as Le, b as ae, _ as De, d as ce, c as He, e as Ve, h as We, i as ze, w as Ae, j as Pe } from "./index-MwVOPR2b.js";
|
|
4
4
|
import { _ as ie } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
5
5
|
import { d as Ee } from "./vuedraggable.umd-D2S7Eo7p.js";
|
|
6
6
|
const Fe = { class: "epic-widget-action-item whitespace-nowrap" }, Ie = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as V, computed as k, openBlock as a, createElementBlock as l, Fragment as g, renderList as C, createVNode as p, unref as r, createElementVNode as c, createCommentVNode as y } from "vue";
|
|
2
2
|
import { p as U } from "./pluginManager-D8PM7ICc.js";
|
|
3
|
-
import { k as P } from "./index-
|
|
3
|
+
import { k as P } from "./index-MwVOPR2b.js";
|
|
4
4
|
import { _ as b } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
5
5
|
const E = {
|
|
6
6
|
key: 0,
|
|
@@ -1199,7 +1199,7 @@ const ht = { class: "min-w-750px rounded" }, vt = { class: "h-full rounded" }, y
|
|
|
1199
1199
|
"updateSourceData"
|
|
1200
1200
|
],
|
|
1201
1201
|
setup(e, { expose: a, emit: n }) {
|
|
1202
|
-
const o = q(() => import("./index-Ba0ZjQgI.js")), t = q(() => import("./index-M-hTLR0c.js")), s = q(() => import("./index-
|
|
1202
|
+
const o = q(() => import("./index-Ba0ZjQgI.js")), t = q(() => import("./index-M-hTLR0c.js")), s = q(() => import("./index-DtXxkuvD.js")), l = q(() => import("./index-uaq_HmHi.js")), i = q(() => import("./index-DgcFxYFp.js")), c = be(), w = Ue(), m = e;
|
|
1203
1203
|
let r = {
|
|
1204
1204
|
schemas: [
|
|
1205
1205
|
{
|
|
@@ -1387,7 +1387,7 @@ defineExpose({
|
|
|
1387
1387
|
})) : (R(), de("div", gt));
|
|
1388
1388
|
}
|
|
1389
1389
|
}), At = {
|
|
1390
|
-
component: async () => await import("./index-
|
|
1390
|
+
component: async () => await import("./index-BC_6e5pJ.js"),
|
|
1391
1391
|
defaultSchema: {
|
|
1392
1392
|
label: "代码编辑器",
|
|
1393
1393
|
type: "monacoEditor",
|
|
@@ -1437,16 +1437,16 @@ defineExpose({
|
|
|
1437
1437
|
}
|
|
1438
1438
|
};
|
|
1439
1439
|
function Dt(e) {
|
|
1440
|
-
e.component("EInputSize", async () => await import("./index-HM72iSCq.js")), e.component("EColEditor", async () => await import("./index-
|
|
1440
|
+
e.component("EInputSize", async () => await import("./index-HM72iSCq.js")), e.component("EColEditor", async () => await import("./index-GtUWspi3.js")), e.component("EActionEditor", async () => await import("./index-BMnsWYrT.js")), e.component("ERuleEditor", async () => await import("./index-DBj3eppg.js")), e.component("EOptionsEditor", async () => await import("./index-S4XwR1vD.js")), e.component("ENode", async () => await import("./index-jsf_Tgj1.js")), e.component("EDataSource", async () => await import("./index-Dm_60RQ9.js")), e.registerActivitybar({
|
|
1441
1441
|
id: "component_view",
|
|
1442
1442
|
title: "组件",
|
|
1443
1443
|
icon: "icon--epic--extension-outline",
|
|
1444
|
-
component: async () => await import("./index-
|
|
1444
|
+
component: async () => await import("./index-BqPDmqv7.js")
|
|
1445
1445
|
}), e.registerActivitybar({
|
|
1446
1446
|
id: "sound_code_view",
|
|
1447
1447
|
title: "源码",
|
|
1448
1448
|
icon: "icon--epic--sdk-outline-rounded",
|
|
1449
|
-
component: async () => await import("./index-
|
|
1449
|
+
component: async () => await import("./index-DAWH9Tr_.js")
|
|
1450
1450
|
}), e.registerActivitybar({
|
|
1451
1451
|
id: "outline_view",
|
|
1452
1452
|
title: "大纲",
|
|
@@ -1455,15 +1455,15 @@ function Dt(e) {
|
|
|
1455
1455
|
}), e.registerRightSidebar({
|
|
1456
1456
|
id: "attribute_view",
|
|
1457
1457
|
title: "属性",
|
|
1458
|
-
component: async () => await import("./attributeView-
|
|
1458
|
+
component: async () => await import("./attributeView-CqQCeL9p.js")
|
|
1459
1459
|
}), e.registerRightSidebar({
|
|
1460
1460
|
id: "style_view",
|
|
1461
1461
|
title: "样式",
|
|
1462
|
-
component: async () => await import("./styleView-
|
|
1462
|
+
component: async () => await import("./styleView-DX_XKKmF.js")
|
|
1463
1463
|
}), e.registerRightSidebar({
|
|
1464
1464
|
id: "event_view",
|
|
1465
1465
|
title: "事件",
|
|
1466
|
-
component: async () => await import("./eventView-
|
|
1466
|
+
component: async () => await import("./eventView-C_THyz3W.js")
|
|
1467
1467
|
}), [At, Et].forEach((n) => {
|
|
1468
1468
|
e.registerComponent(n);
|
|
1469
1469
|
});
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { defineComponent as B, inject as
|
|
1
|
+
import { defineComponent as B, inject as M, resolveComponent as j, openBlock as p, createBlock as N, unref as n, isRef as O, withCtx as z, createElementVNode as m, normalizeClass as A, createVNode as d, createCommentVNode as $, createElementBlock as g, ref as J, reactive as w, onMounted as K, watch as L, provide as P, Fragment as R, renderList as T, toDisplayString as F, withDirectives as q, vShow as G, createTextVNode as H } from "vue";
|
|
2
2
|
import { d as Q } from "./vuedraggable.umd-D2S7Eo7p.js";
|
|
3
|
-
import { p as
|
|
3
|
+
import { p as b, E as W } from "./pluginManager-D8PM7ICc.js";
|
|
4
4
|
import { _ as E } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
5
|
-
import { n as I } from "./index-
|
|
5
|
+
import { n as I } from "./index-MwVOPR2b.js";
|
|
6
6
|
import { ElMessage as X } from "element-plus";
|
|
7
7
|
import { a as Y } from "./axios-CXDYiOMX.js";
|
|
8
8
|
import { _ as Z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
9
|
const ee = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "pl-4"
|
|
12
|
-
},
|
|
12
|
+
}, le = /* @__PURE__ */ B({
|
|
13
13
|
name: "EOptionItem",
|
|
14
14
|
__name: "optionItem",
|
|
15
15
|
props: {
|
|
16
16
|
modelValue: {}
|
|
17
17
|
},
|
|
18
18
|
emits: ["update:modelValue"],
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
21
|
-
function
|
|
22
|
-
const
|
|
19
|
+
setup(C, { emit: U }) {
|
|
20
|
+
const S = C, x = b.getComponent("input"), c = M("tree", !1), u = I(S, "modelValue", U);
|
|
21
|
+
function y(l) {
|
|
22
|
+
const s = {
|
|
23
23
|
label: "",
|
|
24
24
|
value: ""
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
l.children ? l.children.push(s) : l.children = [s];
|
|
27
27
|
}
|
|
28
|
-
function i(
|
|
29
|
-
u.value = u.value.filter((
|
|
28
|
+
function i(l) {
|
|
29
|
+
u.value = u.value.filter((s, f) => f !== l);
|
|
30
30
|
}
|
|
31
|
-
return (
|
|
32
|
-
const f =
|
|
31
|
+
return (l, s) => {
|
|
32
|
+
const f = j("EOptionItem");
|
|
33
33
|
return p(), N(n(Q), {
|
|
34
34
|
modelValue: n(u),
|
|
35
|
-
"onUpdate:modelValue":
|
|
35
|
+
"onUpdate:modelValue": s[0] || (s[0] = (a) => O(u) ? u.value = a : null),
|
|
36
36
|
"item-key": "id",
|
|
37
37
|
"component-data": {
|
|
38
38
|
type: "transition-group"
|
|
@@ -41,45 +41,45 @@ const ee = {
|
|
|
41
41
|
handle: ".handle",
|
|
42
42
|
animation: 200
|
|
43
43
|
}, {
|
|
44
|
-
item:
|
|
44
|
+
item: z(({ element: a, index: h }) => [
|
|
45
45
|
m("div", null, [
|
|
46
46
|
m("div", {
|
|
47
|
-
class:
|
|
47
|
+
class: A([n(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
48
|
}, [
|
|
49
|
-
|
|
49
|
+
d(n(E), {
|
|
50
50
|
class: "mr-2 cursor-move handle",
|
|
51
51
|
name: "icon--epic--drag"
|
|
52
52
|
}),
|
|
53
|
-
|
|
54
|
-
modelValue:
|
|
55
|
-
"onUpdate:modelValue": (r) =>
|
|
56
|
-
value:
|
|
57
|
-
"onUpdate:value": (r) =>
|
|
53
|
+
d(n(x), {
|
|
54
|
+
modelValue: a.label,
|
|
55
|
+
"onUpdate:modelValue": (r) => a.label = r,
|
|
56
|
+
value: a.label,
|
|
57
|
+
"onUpdate:value": (r) => a.label = r,
|
|
58
58
|
placeholder: "label"
|
|
59
59
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "value", "onUpdate:value"]),
|
|
60
|
-
|
|
61
|
-
modelValue:
|
|
62
|
-
"onUpdate:modelValue": (r) =>
|
|
63
|
-
value:
|
|
64
|
-
"onUpdate:value": (r) =>
|
|
60
|
+
d(n(x), {
|
|
61
|
+
modelValue: a.value,
|
|
62
|
+
"onUpdate:modelValue": (r) => a.value = r,
|
|
63
|
+
value: a.value,
|
|
64
|
+
"onUpdate:value": (r) => a.value = r,
|
|
65
65
|
placeholder: "value"
|
|
66
66
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "value", "onUpdate:value"]),
|
|
67
67
|
n(c) ? (p(), N(n(E), {
|
|
68
68
|
key: 0,
|
|
69
69
|
class: "cursor-pointer text-lg!",
|
|
70
70
|
name: "icon--epic--add-rounded",
|
|
71
|
-
onClick: (r) =>
|
|
71
|
+
onClick: (r) => y(a)
|
|
72
72
|
}, null, 8, ["onClick"])) : $("", !0),
|
|
73
|
-
|
|
73
|
+
d(n(E), {
|
|
74
74
|
class: "hover:text-red cursor-pointer",
|
|
75
75
|
name: "icon--epic--delete-outline-rounded",
|
|
76
|
-
onClick: (r) => i(
|
|
76
|
+
onClick: (r) => i(h)
|
|
77
77
|
}, null, 8, ["onClick"])
|
|
78
78
|
], 2),
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
modelValue:
|
|
82
|
-
"onUpdate:modelValue": (r) =>
|
|
79
|
+
a.children ? (p(), g("div", ee, [
|
|
80
|
+
d(f, {
|
|
81
|
+
modelValue: a.children,
|
|
82
|
+
"onUpdate:modelValue": (r) => a.children = r
|
|
83
83
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
84
84
|
])) : $("", !0)
|
|
85
85
|
])
|
|
@@ -88,7 +88,7 @@ const ee = {
|
|
|
88
88
|
}, 8, ["modelValue"]);
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
|
-
}),
|
|
91
|
+
}), te = { class: "" }, ae = { class: "epic-tabs-box" }, oe = ["title", "onClick"], ne = { key: 0 }, re = { class: "py-4 my-2 text-center text-gray-400 bg-white" }, ie = { key: 1 }, ue = /* @__PURE__ */ B({
|
|
92
92
|
__name: "index",
|
|
93
93
|
props: {
|
|
94
94
|
tree: { type: Boolean },
|
|
@@ -97,31 +97,31 @@ const ee = {
|
|
|
97
97
|
type: {}
|
|
98
98
|
},
|
|
99
99
|
emits: ["update:modelValue", "update:EOptionsEditor"],
|
|
100
|
-
setup(
|
|
101
|
-
const
|
|
100
|
+
setup(C, { emit: U }) {
|
|
101
|
+
const S = b.getComponent("button"), x = b.getComponent("select"), c = J([]), v = w({
|
|
102
102
|
title: "静态"
|
|
103
|
-
}), u =
|
|
103
|
+
}), u = C, y = U;
|
|
104
104
|
W.on("updateSource", (t) => {
|
|
105
|
-
c.value =
|
|
105
|
+
c.value = b.sourceData.map((e) => ({
|
|
106
106
|
...e,
|
|
107
107
|
label: e.apiName,
|
|
108
108
|
value: e.id
|
|
109
|
-
}));
|
|
109
|
+
})), console.log("%c [ ]-79", "font-size:13px; background:pink; color:#bf2c9f;", l.value), h(l.value);
|
|
110
110
|
}), K(() => {
|
|
111
|
-
c.value =
|
|
111
|
+
c.value = b.sourceData.map((t) => ({
|
|
112
112
|
...t,
|
|
113
113
|
label: t.apiName,
|
|
114
114
|
value: t.id
|
|
115
|
-
}));
|
|
115
|
+
})), console.log("%c [ ]-89", "font-size:13px; background:pink; color:#bf2c9f;", l.value), h(l.value);
|
|
116
116
|
});
|
|
117
|
-
const i = I(u, "modelValue",
|
|
118
|
-
function
|
|
117
|
+
const i = I(u, "modelValue", y), l = I(u, "dynamicId", y);
|
|
118
|
+
function s(t) {
|
|
119
119
|
return t && Object.prototype.toString.call(t) === "[object Array]" ? t : (X.info("请检查数据位置是否配置准确"), []);
|
|
120
120
|
}
|
|
121
121
|
L(
|
|
122
|
-
() =>
|
|
122
|
+
() => l.value,
|
|
123
123
|
async () => {
|
|
124
|
-
|
|
124
|
+
l.value ? v.title = "动态" : v.title = "静态";
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
127
|
immediate: !0
|
|
@@ -135,12 +135,12 @@ const ee = {
|
|
|
135
135
|
title: "动态"
|
|
136
136
|
}
|
|
137
137
|
];
|
|
138
|
-
async function
|
|
139
|
-
v.title = t.title, t.title === "静态" && (
|
|
138
|
+
async function a(t) {
|
|
139
|
+
v.title = t.title, t.title === "静态" && (l.value = "");
|
|
140
140
|
}
|
|
141
|
-
async function
|
|
142
|
-
const e = c.value.find((
|
|
143
|
-
let
|
|
141
|
+
async function h(t) {
|
|
142
|
+
const e = c.value.find((o) => o.id === t);
|
|
143
|
+
let V = await Y({
|
|
144
144
|
method: (e == null ? void 0 : e.method) || "get",
|
|
145
145
|
url: e.url,
|
|
146
146
|
// url: "http://localhost:3333/users",
|
|
@@ -149,15 +149,15 @@ const ee = {
|
|
|
149
149
|
headers: e != null && e.header ? JSON.parse(e == null ? void 0 : e.header) : {}
|
|
150
150
|
});
|
|
151
151
|
if (e && (e != null && e.dataPath)) {
|
|
152
|
-
const
|
|
153
|
-
console.log("%c [ ]-148", "font-size:13px; background:pink; color:#bf2c9f;",
|
|
154
|
-
label:
|
|
155
|
-
value:
|
|
152
|
+
const k = e.dataPath.split(".").reduce((_, D) => _[D], V.data);
|
|
153
|
+
console.log("%c [ ]-148", "font-size:13px; background:pink; color:#bf2c9f;", k), i.value = s(k).map((_) => ({
|
|
154
|
+
label: _[e.dataKey],
|
|
155
|
+
value: _[e.dataValue]
|
|
156
156
|
}));
|
|
157
157
|
} else
|
|
158
|
-
i.value =
|
|
159
|
-
label:
|
|
160
|
-
value:
|
|
158
|
+
i.value = s(V.data).map((o) => ({
|
|
159
|
+
label: o[e.dataKey],
|
|
160
|
+
value: o[e.dataValue]
|
|
161
161
|
}));
|
|
162
162
|
}
|
|
163
163
|
u.modelValue, P("tree", u.tree);
|
|
@@ -169,47 +169,47 @@ const ee = {
|
|
|
169
169
|
i.value.length ? i.value = [...i.value, t] : i.value = [t];
|
|
170
170
|
}
|
|
171
171
|
return (t, e) => {
|
|
172
|
-
var
|
|
173
|
-
return p(),
|
|
172
|
+
var V;
|
|
173
|
+
return p(), g("div", te, [
|
|
174
174
|
m("div", null, [
|
|
175
175
|
m("div", ae, [
|
|
176
|
-
(p(),
|
|
177
|
-
class:
|
|
178
|
-
key:
|
|
179
|
-
title:
|
|
180
|
-
onClick: (
|
|
181
|
-
}, F(
|
|
176
|
+
(p(), g(R, null, T(f, (o, k) => m("div", {
|
|
177
|
+
class: A(["epic-tab cursor-pointer truncate", { checked: v.title === o.title }]),
|
|
178
|
+
key: k,
|
|
179
|
+
title: o.title,
|
|
180
|
+
onClick: (_) => a(o)
|
|
181
|
+
}, F(o.title), 11, oe)), 64))
|
|
182
182
|
]),
|
|
183
|
-
v.title === "静态" ? (p(),
|
|
183
|
+
v.title === "静态" ? (p(), g("div", ne, [
|
|
184
184
|
q(m("div", re, "暂无选项", 512), [
|
|
185
|
-
[G, !((
|
|
185
|
+
[G, !((V = n(i)) != null && V.length)]
|
|
186
186
|
]),
|
|
187
|
-
|
|
187
|
+
d(le, {
|
|
188
188
|
modelValue: n(i),
|
|
189
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
189
|
+
"onUpdate:modelValue": e[0] || (e[0] = (o) => O(i) ? i.value = o : null)
|
|
190
190
|
}, null, 8, ["modelValue"]),
|
|
191
|
-
|
|
192
|
-
default:
|
|
191
|
+
d(n(S), { onClick: r }, {
|
|
192
|
+
default: z(() => e[2] || (e[2] = [
|
|
193
193
|
H("添加选项")
|
|
194
194
|
])),
|
|
195
195
|
_: 1
|
|
196
196
|
})
|
|
197
|
-
])) : (p(),
|
|
197
|
+
])) : (p(), g("div", ie, [
|
|
198
198
|
e[3] || (e[3] = m("span", { style: { "font-size": "12px", "margin-bottom": "8px", display: "inline-block" } }, "数据源", -1)),
|
|
199
|
-
|
|
200
|
-
modelValue: n(
|
|
201
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
199
|
+
d(n(x), {
|
|
200
|
+
modelValue: n(l),
|
|
201
|
+
"onUpdate:modelValue": e[1] || (e[1] = (o) => O(l) ? l.value = o : null),
|
|
202
202
|
placeholder: "请选择数据源",
|
|
203
203
|
clearable: "",
|
|
204
204
|
options: c.value,
|
|
205
|
-
onChange:
|
|
205
|
+
onChange: h
|
|
206
206
|
}, null, 8, ["modelValue", "options"])
|
|
207
207
|
]))
|
|
208
208
|
])
|
|
209
209
|
]);
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
|
-
}), Ve = /* @__PURE__ */ Z(ue, [["__scopeId", "data-v-
|
|
212
|
+
}), Ve = /* @__PURE__ */ Z(ue, [["__scopeId", "data-v-a883f089"]]);
|
|
213
213
|
export {
|
|
214
214
|
Ve as default
|
|
215
215
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),E=require("./vuedraggable.umd-BqhSJIAi.cjs"),p=require("./pluginManager-itCTrGag.cjs"),y=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),C=require("./index-p6doDa9j.cjs"),B=require("element-plus"),S=require("./axios-tuVKNgv9.cjs"),U=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"pl-4"},O=e.defineComponent({name:"EOptionItem",__name:"optionItem",props:{modelValue:{}},emits:["update:modelValue"],setup(k,{emit:b}){const x=k,g=p.pluginManager.getComponent("input"),d=e.inject("tree",!1),s=b,c=C.useVModel(x,"modelValue",s);function _(t){const i={label:"",value:""};t.children?t.children.push(i):t.children=[i]}function u(t){c.value=c.value.filter((i,m)=>m!==t)}return(t,i)=>{const m=e.resolveComponent("EOptionItem");return e.openBlock(),e.createBlock(e.unref(E.draggable),{modelValue:e.unref(c),"onUpdate:modelValue":i[0]||(i[0]=a=>e.isRef(c)?c.value=a:null),"item-key":"id","component-data":{type:"transition-group"},group:"option-list",handle:".handle",animation:200},{item:e.withCtx(({element:a,index:v})=>[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(y._sfc_main),{class:"mr-2 cursor-move handle",name:"icon--epic--drag"}),e.createVNode(e.unref(g),{modelValue:a.label,"onUpdate:modelValue":r=>a.label=r,value:a.label,"onUpdate:value":r=>a.label=r,placeholder:"label"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.createVNode(e.unref(g),{modelValue:a.value,"onUpdate:modelValue":r=>a.value=r,value:a.value,"onUpdate:value":r=>a.value=r,placeholder:"value"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.unref(d)?(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{key:0,class:"cursor-pointer text-lg!",name:"icon--epic--add-rounded",onClick:r=>_(a)},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(e.unref(y._sfc_main),{class:"hover:text-red cursor-pointer",name:"icon--epic--delete-outline-rounded",onClick:r=>u(v)},null,8,["onClick"])],2),a.children?(e.openBlock(),e.createElementBlock("div",M,[e.createVNode(m,{modelValue:a.children,"onUpdate:modelValue":r=>a.children=r},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue"])}}}),I={class:""},q={class:"epic-tabs-box"},w=["title","onClick"],$={key:0},z={class:"py-4 my-2 text-center text-gray-400 bg-white"},j={key:1},A=e.defineComponent({__name:"index",props:{tree:{type:Boolean},modelValue:{},dynamicId:{},type:{}},emits:["update:modelValue","update:EOptionsEditor"],setup(k,{emit:b}){const x=p.pluginManager.getComponent("button"),g=p.pluginManager.getComponent("select"),d=e.ref([]),s=e.reactive({title:"静态"}),c=k,_=b;p.EventBus.on("updateSource",n=>{d.value=p.pluginManager.sourceData.map(l=>({...l,label:l.apiName,value:l.id})),console.log("%c [ ]-79","font-size:13px; background:pink; color:#bf2c9f;",t.value),v(t.value)}),e.onMounted(()=>{d.value=p.pluginManager.sourceData.map(n=>({...n,label:n.apiName,value:n.id})),console.log("%c [ ]-89","font-size:13px; background:pink; color:#bf2c9f;",t.value),v(t.value)});const u=C.useVModel(c,"modelValue",_),t=C.useVModel(c,"dynamicId",_);function i(n){return n&&Object.prototype.toString.call(n)==="[object Array]"?n:(B.ElMessage.info("请检查数据位置是否配置准确"),[])}e.watch(()=>t.value,async()=>{t.value?s.title="动态":s.title="静态"},{immediate:!0});const m=[{title:"静态"},{title:"动态"}];async function a(n){s.title=n.title,n.title==="静态"&&(t.value="")}async function v(n){const l=d.value.find(o=>o.id===n);let f=await S.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):{}});if(l&&(l!=null&&l.dataPath)){const h=l.dataPath.split(".").reduce((V,N)=>V[N],f.data);console.log("%c [ ]-148","font-size:13px; background:pink; color:#bf2c9f;",h),u.value=i(h).map(V=>({label:V[l.dataKey],value:V[l.dataValue]}))}else u.value=i(f.data).map(o=>({label:o[l.dataKey],value:o[l.dataValue]}))}c.modelValue,e.provide("tree",c.tree);function r(){const n=e.reactive({label:"",value:""});u.value.length?u.value=[...u.value,n]:u.value=[n]}return(n,l)=>{var f;return e.openBlock(),e.createElementBlock("div",I,[e.createElementVNode("div",null,[e.createElementVNode("div",q,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(m,(o,h)=>e.createElementVNode("div",{class:e.normalizeClass(["epic-tab cursor-pointer truncate",{checked:s.title===o.title}]),key:h,title:o.title,onClick:V=>a(o)},e.toDisplayString(o.title),11,w)),64))]),s.title==="静态"?(e.openBlock(),e.createElementBlock("div",$,[e.withDirectives(e.createElementVNode("div",z,"暂无选项",512),[[e.vShow,!((f=e.unref(u))!=null&&f.length)]]),e.createVNode(O,{modelValue:e.unref(u),"onUpdate:modelValue":l[0]||(l[0]=o=>e.isRef(u)?u.value=o:null)},null,8,["modelValue"]),e.createVNode(e.unref(x),{onClick:r},{default:e.withCtx(()=>l[2]||(l[2]=[e.createTextVNode("添加选项")])),_:1})])):(e.openBlock(),e.createElementBlock("div",j,[l[3]||(l[3]=e.createElementVNode("span",{style:{"font-size":"12px","margin-bottom":"8px",display:"inline-block"}},"数据源",-1)),e.createVNode(e.unref(g),{modelValue:e.unref(t),"onUpdate:modelValue":l[1]||(l[1]=o=>e.isRef(t)?t.value=o:null),placeholder:"请选择数据源",clearable:"",options:d.value,onChange:v},null,8,["modelValue","options"])]))])])}}}),D=U._export_sfc(A,[["__scopeId","data-v-a883f089"]]);exports.default=D;
|