epic-designer-gold 0.0.22 → 0.0.23
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-B8JS7SiW.cjs → attributeView-8NOrqlS1.cjs} +1 -1
- package/dist/{attributeView-oIH3-2FN.js → attributeView-BHuhrlM5.js} +8 -8
- package/dist/{index-nhr7ps1e.js → index-8kRf0Tni.js} +1 -1
- package/dist/index-9bx0Eg0-.cjs +1 -0
- package/dist/index-BHkCN6Gc.cjs +1 -0
- package/dist/{index-CrGWYheb.js → index-BcAPkz_3.js} +1 -1
- package/dist/{index-DskzasEn.js → index-BcRau_iO.js} +74 -74
- package/dist/{index-rby8nugJ.cjs → index-BfV0-xlv.cjs} +1 -1
- package/dist/index-BfWxzrQ0.js +675 -0
- package/dist/{index-DitKpeDV.cjs → index-BqP4q7kG.cjs} +1 -1
- package/dist/{index-BUkdmwKe.cjs → index-CI-wApqh.cjs} +2 -2
- package/dist/{index-C5yhSYKA.js → index-CNRYixnW.js} +198 -212
- package/dist/{index-CwXlSYIH.cjs → index-CtqoFTv7.cjs} +1 -1
- package/dist/{index-Bts_xVeS.cjs → index-DAQnePGW.cjs} +1 -1
- package/dist/{index-DiMAGPRY.js → index-DLXCQOpE.js} +1 -1
- package/dist/index-DMO6svHk.js +4 -0
- package/dist/{index-Bwmb5sha.cjs → index-DPQrSg6e.cjs} +1 -1
- package/dist/index-DzGESDFj.cjs +1 -0
- package/dist/{index-C5XNe5wE.js → index-R1sGzPDh.js} +1 -1
- package/dist/index-zFyk0fsI.js +665 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{styleView-BDUqyY8T.cjs → styleView-DevMh4gy.cjs} +1 -1
- package/dist/{styleView-CtfATcTc.js → styleView-Dq9MseMf.js} +1 -1
- package/package.json +1 -1
- package/dist/core/components/designer/src/modules/attributeView/eventView.vue.d.ts +0 -2
- package/dist/core/components/designer/src/modules/outline/outline.vue.d.ts +0 -2
- package/dist/core/components/designer/src/modules/sourceCode/index.vue.d.ts +0 -2
- package/dist/eventView-BL4A2PVd.cjs +0 -1
- package/dist/eventView-Ed_9JLnx.js +0 -64
- package/dist/index-05ByfwQb.js +0 -432
- package/dist/index-Bt6BXCcr.cjs +0 -1
- package/dist/index-CjrdkSiN.js +0 -682
- package/dist/index-CqdmlJ1d.cjs +0 -1
- package/dist/index-DWW8LGvj.js +0 -41
- package/dist/index-DZIjd60A.js +0 -4
- package/dist/index-D_CH15dJ.cjs +0 -1
- package/dist/index-GJSr_nl7.cjs +0 -1
- package/dist/outline-CJSEUbgc.cjs +0 -1
- package/dist/outline-yy4pIEi3.js +0 -54
- package/dist/tree.vue_vue_type_script_setup_true_lang-RWTXU6lO.cjs +0 -1
- package/dist/tree.vue_vue_type_script_setup_true_lang-uR4G8wa_.js +0 -242
package/dist/index-05ByfwQb.js
DELETED
|
@@ -1,432 +0,0 @@
|
|
|
1
|
-
import { defineComponent as U, inject as L, openBlock as p, createElementBlock as g, Fragment as A, renderList as T, createElementVNode as i, toDisplayString as O, createVNode as C, unref as _, withCtx as R, createCommentVNode as G, createTextVNode as J, ref as E, computed as S, withDirectives as F, normalizeClass as j, vShow as P, reactive as H, createBlock as K, nextTick as Q, toRaw as z, watch as W } from "vue";
|
|
2
|
-
import { l as q, _ as X, k as Y, m as Z } from "./index-C5yhSYKA.js";
|
|
3
|
-
import { p as w } from "./axios-ITY6Uw7A.js";
|
|
4
|
-
import { _ as D } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
5
|
-
import { d as ee } from "./vuedraggable.umd-D2S7Eo7p.js";
|
|
6
|
-
import { _ as te } from "./tree.vue_vue_type_script_setup_true_lang-uR4G8wa_.js";
|
|
7
|
-
const ne = { class: "epic-event-info" }, oe = ["title"], le = { class: "epic-event-btn text-lg flex items-center text-$epic-text-secondary" }, ae = { class: "epic-action-editor-main" }, se = { class: "epic-editor-item rounded" }, ie = { class: "w-36px flex items-center text-lg" }, ce = { class: "flex-1" }, de = { key: 0 }, ue = { key: 1 }, re = { key: 2 }, pe = { class: "epic-action-box text-lg text-$epic-text-medium" }, me = ["onClick"], ve = ["onClick"], fe = /* @__PURE__ */ U({
|
|
8
|
-
__name: "EActionEditorItem",
|
|
9
|
-
props: {
|
|
10
|
-
itemEvents: {
|
|
11
|
-
type: Array,
|
|
12
|
-
default: () => []
|
|
13
|
-
},
|
|
14
|
-
allEvents: {
|
|
15
|
-
type: Array,
|
|
16
|
-
default: () => []
|
|
17
|
-
},
|
|
18
|
-
modelValue: {
|
|
19
|
-
type: Object,
|
|
20
|
-
default: () => []
|
|
21
|
-
},
|
|
22
|
-
events: {
|
|
23
|
-
type: Object,
|
|
24
|
-
default: () => ({})
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
emits: ["add", "edit", "update:modelValue"],
|
|
28
|
-
setup(b, { emit: k }) {
|
|
29
|
-
const m = b, x = k, f = L("pageSchema");
|
|
30
|
-
function V(v) {
|
|
31
|
-
x("add", v);
|
|
32
|
-
}
|
|
33
|
-
function h(v) {
|
|
34
|
-
return q(f.schemas, v).label;
|
|
35
|
-
}
|
|
36
|
-
function r(v, c) {
|
|
37
|
-
var e;
|
|
38
|
-
const l = n(c);
|
|
39
|
-
l[c] = m.events[c].filter(($, N) => v !== N), (e = l[c]) != null && e.length || delete l[c], x("update:modelValue", l);
|
|
40
|
-
}
|
|
41
|
-
function u(v, c, l) {
|
|
42
|
-
x("edit", v, c, l);
|
|
43
|
-
}
|
|
44
|
-
function n(v) {
|
|
45
|
-
const c = {};
|
|
46
|
-
return m.allEvents.forEach((l) => {
|
|
47
|
-
if (!m.events[l.type].length || l.type === v)
|
|
48
|
-
return !1;
|
|
49
|
-
c[l.type] = m.events[l.type];
|
|
50
|
-
}), c;
|
|
51
|
-
}
|
|
52
|
-
return (v, c) => (p(!0), g(A, null, T(b.itemEvents, (l) => (p(), g("div", {
|
|
53
|
-
key: l.type,
|
|
54
|
-
class: "epic-event-item"
|
|
55
|
-
}, [
|
|
56
|
-
i("div", ne, [
|
|
57
|
-
i("div", {
|
|
58
|
-
class: "epic-event-label",
|
|
59
|
-
title: l.describe
|
|
60
|
-
}, O(l.describe), 9, oe),
|
|
61
|
-
i("div", le, [
|
|
62
|
-
C(_(D), {
|
|
63
|
-
name: "icon--epic--add-rounded",
|
|
64
|
-
onClick: (e) => V(l.type)
|
|
65
|
-
}, null, 8, ["onClick"])
|
|
66
|
-
])
|
|
67
|
-
]),
|
|
68
|
-
i("div", ae, [
|
|
69
|
-
C(_(ee), {
|
|
70
|
-
modelValue: m.events[l.type],
|
|
71
|
-
"onUpdate:modelValue": (e) => m.events[l.type] = e,
|
|
72
|
-
"item-key": "id",
|
|
73
|
-
"component-data": {
|
|
74
|
-
type: "transition-group"
|
|
75
|
-
},
|
|
76
|
-
group: "option-list",
|
|
77
|
-
handle: ".handle",
|
|
78
|
-
animation: 200
|
|
79
|
-
}, {
|
|
80
|
-
item: R(({ element: e, index: $ }) => [
|
|
81
|
-
i("div", se, [
|
|
82
|
-
i("div", ie, [
|
|
83
|
-
C(_(D), {
|
|
84
|
-
class: "mr-2 text-lg cursor-move handle text-$epic-text-medium",
|
|
85
|
-
name: "icon--epic--drag"
|
|
86
|
-
})
|
|
87
|
-
]),
|
|
88
|
-
i("div", ce, [
|
|
89
|
-
e.type === "component" ? (p(), g("div", de, O(h(e.componentId)), 1)) : e.type === "custom" ? (p(), g("div", ue, " 自定义函数 ")) : e.type === "public" ? (p(), g("div", re, " 公共函数 ")) : G("", !0),
|
|
90
|
-
J(" " + O(e.methodName), 1)
|
|
91
|
-
]),
|
|
92
|
-
i("div", pe, [
|
|
93
|
-
i("div", {
|
|
94
|
-
class: "epic-edit-btn",
|
|
95
|
-
onClick: (N) => u($, l.type, e)
|
|
96
|
-
}, [
|
|
97
|
-
C(_(D), { name: "icon--epic--page-info-outline-rounded" })
|
|
98
|
-
], 8, me),
|
|
99
|
-
i("div", {
|
|
100
|
-
class: "epic-del-btn",
|
|
101
|
-
onClick: (N) => r($, l.type)
|
|
102
|
-
}, [
|
|
103
|
-
C(_(D), { name: "icon--epic--delete-outline-rounded" })
|
|
104
|
-
], 8, ve)
|
|
105
|
-
])
|
|
106
|
-
])
|
|
107
|
-
]),
|
|
108
|
-
_: 2
|
|
109
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])
|
|
110
|
-
])
|
|
111
|
-
]))), 128));
|
|
112
|
-
}
|
|
113
|
-
}), he = { class: "h-full flex flex-col" }, ge = /* @__PURE__ */ U({
|
|
114
|
-
__name: "EScriptEdit",
|
|
115
|
-
setup(b) {
|
|
116
|
-
const k = w.getComponent("monacoEditor"), m = {
|
|
117
|
-
theme: "vs-light",
|
|
118
|
-
selectOnLineNumbers: !0,
|
|
119
|
-
minimap: {
|
|
120
|
-
enabled: !1
|
|
121
|
-
}
|
|
122
|
-
}, x = E(null), f = L("pageSchema");
|
|
123
|
-
return (V, h) => (p(), g("div", he, [
|
|
124
|
-
h[1] || (h[1] = i("div", { class: "pb-2" }, " 自定义函数编辑 ", -1)),
|
|
125
|
-
C(_(k), {
|
|
126
|
-
ref_key: "monacoEditorRef",
|
|
127
|
-
ref: x,
|
|
128
|
-
autoToggleTheme: "",
|
|
129
|
-
modelValue: _(f).script,
|
|
130
|
-
"onUpdate:modelValue": h[0] || (h[0] = (r) => _(f).script = r),
|
|
131
|
-
class: "epic-editor flex-1",
|
|
132
|
-
config: m,
|
|
133
|
-
language: "javascript"
|
|
134
|
-
}, null, 8, ["modelValue"])
|
|
135
|
-
]));
|
|
136
|
-
}
|
|
137
|
-
}), _e = { class: "epic-attribute-view" }, ye = ["title"], xe = { class: "epic-attr-input" }, Ie = /* @__PURE__ */ U({
|
|
138
|
-
__name: "EArgsEditor",
|
|
139
|
-
props: {
|
|
140
|
-
modelValue: {},
|
|
141
|
-
actionArgsConfigs: {}
|
|
142
|
-
},
|
|
143
|
-
emits: ["update:modelValue"],
|
|
144
|
-
setup(b, { emit: k }) {
|
|
145
|
-
const m = b, x = k, f = S(() => m.modelValue ? JSON.parse(m.modelValue) : []);
|
|
146
|
-
function V(r) {
|
|
147
|
-
var u;
|
|
148
|
-
return typeof r.show == "boolean" ? r.show : typeof r.show == "function" ? (u = r.show) == null ? void 0 : u.call(r, { values: f.value }) : !0;
|
|
149
|
-
}
|
|
150
|
-
function h(r, u) {
|
|
151
|
-
const n = [
|
|
152
|
-
...JSON.parse(m.modelValue ?? "[]")
|
|
153
|
-
];
|
|
154
|
-
n[u] = r, x("update:modelValue", JSON.stringify(n));
|
|
155
|
-
}
|
|
156
|
-
return (r, u) => (p(), g("div", _e, [
|
|
157
|
-
(p(!0), g(A, null, T(m.actionArgsConfigs, (n) => (p(), g("div", {
|
|
158
|
-
key: n.field + n.type
|
|
159
|
-
}, [
|
|
160
|
-
F(i("div", {
|
|
161
|
-
class: j(["epic-attr-item", n.layout])
|
|
162
|
-
}, [
|
|
163
|
-
i("div", {
|
|
164
|
-
class: "epic-attr-label",
|
|
165
|
-
title: n.label
|
|
166
|
-
}, O(n.label), 9, ye),
|
|
167
|
-
i("div", xe, [
|
|
168
|
-
C(_(X), {
|
|
169
|
-
componentSchema: { ...n, componentProps: { ...n.componentProps, input: !1, field: void 0, hidden: !1 }, show: !0, noFormItem: !0 },
|
|
170
|
-
"model-value": f.value[n.field],
|
|
171
|
-
"onUpdate:modelValue": (v) => h(v, n.field)
|
|
172
|
-
}, null, 8, ["componentSchema", "model-value", "onUpdate:modelValue"])
|
|
173
|
-
])
|
|
174
|
-
], 2), [
|
|
175
|
-
[P, V(n)]
|
|
176
|
-
])
|
|
177
|
-
]))), 128))
|
|
178
|
-
]));
|
|
179
|
-
}
|
|
180
|
-
}), Ce = { class: "rounded epic-modal-action-main" }, Ve = { class: "epic-modal-left-panel h-full flex flex-col" }, ke = { class: "flex flex-1 h-0 flex-col" }, be = { class: "flex-1 h-0" }, Ee = { class: "epic-action-select h-30/100 flex flex-col" }, $e = { class: "flex-1 overflow-auto pr-8px" }, Ne = ["onClick"], Se = { class: "text-center pt-42px text-gray-400" }, we = { class: "epic-modal-right-panel" }, Oe = {
|
|
181
|
-
key: 1,
|
|
182
|
-
class: "text-center pt-42px text-gray-400"
|
|
183
|
-
}, Ae = /* @__PURE__ */ U({
|
|
184
|
-
__name: "EActionModal",
|
|
185
|
-
emits: ["add", "edit"],
|
|
186
|
-
setup(b, { expose: k, emit: m }) {
|
|
187
|
-
const x = w.getComponent("modal"), f = E(!0), V = L("pageSchema"), h = L("pageManager", {}), r = E(!1), u = E([]), n = E(null), v = m, c = S(() => {
|
|
188
|
-
var o;
|
|
189
|
-
return e.actionItem.type === "component" ? n.value ? (o = w.getComponentConfings()[n.value.type].config.action) == null ? void 0 : o.map((t) => ({
|
|
190
|
-
label: t.describe,
|
|
191
|
-
value: t.type
|
|
192
|
-
})) : [] : e.actionItem.type === "custom" ? Object.entries(h.funcs.value).filter(([t, I]) => typeof I == "function").map(([t]) => ({ label: t, value: t })) : e.actionItem.type === "public" ? Object.entries(w.publicMethods).map(([t]) => ({
|
|
193
|
-
label: t,
|
|
194
|
-
value: t
|
|
195
|
-
})) : [];
|
|
196
|
-
}), l = S(() => {
|
|
197
|
-
if (e.actionItem.type === "component" && n.value) {
|
|
198
|
-
const o = w.getComponentConfings()[n.value.type].config.action, t = o == null ? void 0 : o.find(
|
|
199
|
-
(I) => I.type === e.actionItem.methodName
|
|
200
|
-
);
|
|
201
|
-
if (t != null && t.argsConfigs) {
|
|
202
|
-
const I = t.argsConfigs.findIndex(
|
|
203
|
-
(y) => y.label === "设置数据"
|
|
204
|
-
);
|
|
205
|
-
I !== -1 && (t.argsConfigs[I] = {
|
|
206
|
-
...n.value,
|
|
207
|
-
label: "设置数据",
|
|
208
|
-
field: "0",
|
|
209
|
-
id: Y()
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
return (t == null ? void 0 : t.argsConfigs) ?? [];
|
|
213
|
-
}
|
|
214
|
-
return [];
|
|
215
|
-
}), e = H({
|
|
216
|
-
actionItem: {
|
|
217
|
-
type: "custom",
|
|
218
|
-
methodName: "test",
|
|
219
|
-
componentId: null
|
|
220
|
-
},
|
|
221
|
-
cacheData: {}
|
|
222
|
-
});
|
|
223
|
-
function $() {
|
|
224
|
-
var o;
|
|
225
|
-
r.value = !0, f.value = !0, e.actionItem.type = "custom", e.actionItem.componentId = null, (o = c.value) != null && o.length && d(c.value[0].value);
|
|
226
|
-
}
|
|
227
|
-
function N(o) {
|
|
228
|
-
if (r.value = !0, f.value = !1, n.value = null, o.componentId) {
|
|
229
|
-
const t = q(V.schemas, o.componentId);
|
|
230
|
-
n.value = t, u.value = [o.componentId];
|
|
231
|
-
}
|
|
232
|
-
Q(() => {
|
|
233
|
-
e.actionItem.componentId = o.componentId, e.actionItem.methodName = o.methodName, e.actionItem.type = o.type, e.actionItem.args = o.args;
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
function B() {
|
|
237
|
-
if (!e.actionItem.methodName) {
|
|
238
|
-
alert("请先选择动作方法");
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
v(f.value ? "add" : "edit", Z(z(e.actionItem))), M();
|
|
242
|
-
}
|
|
243
|
-
function M() {
|
|
244
|
-
r.value = !1, u.value = [], e.cacheData = {};
|
|
245
|
-
}
|
|
246
|
-
function s(o) {
|
|
247
|
-
var t;
|
|
248
|
-
e.actionItem.componentId = null, e.actionItem.type = o, n.value = null, e.actionItem.methodName = null, u.value = [], (t = c.value) != null && t.length && d(c.value[0].value);
|
|
249
|
-
}
|
|
250
|
-
function a(o) {
|
|
251
|
-
var t;
|
|
252
|
-
e.actionItem.args && (e.cacheData[e.actionItem.componentId + e.actionItem.methodName] = e.actionItem.args), e.actionItem.componentId = o.id, e.actionItem.type = "component", e.actionItem.methodName = null, n.value = o.componentSchema, (t = c.value) != null && t.length && d(c.value[0].value);
|
|
253
|
-
}
|
|
254
|
-
function d(o) {
|
|
255
|
-
e.actionItem.methodName = o, e.actionItem.args = e.cacheData[e.actionItem.componentId + e.actionItem.methodName];
|
|
256
|
-
}
|
|
257
|
-
return k({
|
|
258
|
-
handleOpen: $,
|
|
259
|
-
handleOpenEdit: N
|
|
260
|
-
}), (o, t) => (p(), K(_(x), {
|
|
261
|
-
modelValue: r.value,
|
|
262
|
-
"onUpdate:modelValue": t[4] || (t[4] = (I) => r.value = I),
|
|
263
|
-
class: "w-1200px",
|
|
264
|
-
width: "1200px",
|
|
265
|
-
onClose: M,
|
|
266
|
-
onOk: B,
|
|
267
|
-
title: "动作配置"
|
|
268
|
-
}, {
|
|
269
|
-
default: R(() => {
|
|
270
|
-
var I;
|
|
271
|
-
return [
|
|
272
|
-
i("div", Ce, [
|
|
273
|
-
i("div", Ve, [
|
|
274
|
-
i("div", ke, [
|
|
275
|
-
i("div", {
|
|
276
|
-
class: j(["fun-btn", { checked: e.actionItem.type === "custom" }]),
|
|
277
|
-
onClick: t[0] || (t[0] = (y) => s("custom"))
|
|
278
|
-
}, " 自定义函数 ", 2),
|
|
279
|
-
i("div", {
|
|
280
|
-
class: j(["fun-btn", { checked: e.actionItem.type === "public" }]),
|
|
281
|
-
onClick: t[1] || (t[1] = (y) => s("public"))
|
|
282
|
-
}, " 公共函数 ", 2),
|
|
283
|
-
t[5] || (t[5] = J(" 组件 ")),
|
|
284
|
-
i("div", be, [
|
|
285
|
-
C(_(te), {
|
|
286
|
-
selectedKeys: u.value,
|
|
287
|
-
"onUpdate:selectedKeys": t[2] || (t[2] = (y) => u.value = y),
|
|
288
|
-
options: _(V).schemas,
|
|
289
|
-
onNodeClick: a
|
|
290
|
-
}, null, 8, ["selectedKeys", "options"])
|
|
291
|
-
])
|
|
292
|
-
]),
|
|
293
|
-
i("div", Ee, [
|
|
294
|
-
t[6] || (t[6] = i("div", { class: "mb-2" }, "动作选择", -1)),
|
|
295
|
-
i("div", $e, [
|
|
296
|
-
(p(!0), g(A, null, T(c.value, (y) => (p(), g("div", {
|
|
297
|
-
class: j([{ checked: y.value === e.actionItem.methodName }, "epic-action-item"]),
|
|
298
|
-
onClick: (Ue) => d(y.value),
|
|
299
|
-
key: y.value
|
|
300
|
-
}, [
|
|
301
|
-
i("span", null, O(y.label), 1)
|
|
302
|
-
], 10, Ne))), 128)),
|
|
303
|
-
F(i("div", Se, " 当前组件暂无动作 ", 512), [
|
|
304
|
-
[P, !((I = c.value) != null && I.length)]
|
|
305
|
-
])
|
|
306
|
-
])
|
|
307
|
-
])
|
|
308
|
-
]),
|
|
309
|
-
i("div", we, [
|
|
310
|
-
e.actionItem.type === "custom" ? (p(), K(ge, { key: 0 })) : l.value.length === 0 ? (p(), g("div", Oe, " 暂无配置 ")) : (p(), K(Ie, {
|
|
311
|
-
key: 2,
|
|
312
|
-
modelValue: e.actionItem.args,
|
|
313
|
-
"onUpdate:modelValue": t[3] || (t[3] = (y) => e.actionItem.args = y),
|
|
314
|
-
actionArgsConfigs: l.value
|
|
315
|
-
}, null, 8, ["modelValue", "actionArgsConfigs"]))
|
|
316
|
-
])
|
|
317
|
-
])
|
|
318
|
-
];
|
|
319
|
-
}),
|
|
320
|
-
_: 1
|
|
321
|
-
}, 8, ["modelValue"]));
|
|
322
|
-
}
|
|
323
|
-
}), Te = /* @__PURE__ */ U({
|
|
324
|
-
__name: "index",
|
|
325
|
-
props: {
|
|
326
|
-
eventList: {
|
|
327
|
-
type: Array,
|
|
328
|
-
default: () => []
|
|
329
|
-
},
|
|
330
|
-
modelValue: {
|
|
331
|
-
type: Object
|
|
332
|
-
}
|
|
333
|
-
},
|
|
334
|
-
emits: ["update:modelValue"],
|
|
335
|
-
setup(b, { emit: k }) {
|
|
336
|
-
const m = w.getComponent("Collapse"), x = w.getComponent("CollapseItem"), f = E(null);
|
|
337
|
-
let V = 0;
|
|
338
|
-
const h = b, r = k, u = S({
|
|
339
|
-
get() {
|
|
340
|
-
return h.modelValue;
|
|
341
|
-
},
|
|
342
|
-
set(s) {
|
|
343
|
-
r("update:modelValue", s);
|
|
344
|
-
}
|
|
345
|
-
}), n = E([]), v = S(() => h.eventList.filter((s) => s.events.length)), c = S(() => h.eventList.map((s) => s.events).flat()), l = E({});
|
|
346
|
-
c.value.forEach((s) => {
|
|
347
|
-
l.value[s.type] = S({
|
|
348
|
-
get() {
|
|
349
|
-
var a;
|
|
350
|
-
return ((a = u.value) == null ? void 0 : a[s.type]) ?? [];
|
|
351
|
-
},
|
|
352
|
-
set(a) {
|
|
353
|
-
a && a.length ? u.value[s.type] = a.map((d) => z(d)) : delete u.value[s.type];
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
|
-
}), W(() => v.value, (s) => {
|
|
357
|
-
s.length && (n.value = s.filter((a) => {
|
|
358
|
-
for (let d = 0; d < a.events.length; d++) {
|
|
359
|
-
const o = a.events[d].type;
|
|
360
|
-
if (l.value[o].length)
|
|
361
|
-
return !0;
|
|
362
|
-
}
|
|
363
|
-
return !1;
|
|
364
|
-
}).map((a) => a.title));
|
|
365
|
-
}, {
|
|
366
|
-
// 配置选项
|
|
367
|
-
immediate: !0
|
|
368
|
-
// 立即执行一次回调函数
|
|
369
|
-
});
|
|
370
|
-
let e = "";
|
|
371
|
-
function $(s) {
|
|
372
|
-
var a;
|
|
373
|
-
(a = f.value) == null || a.handleOpen(), e = s;
|
|
374
|
-
}
|
|
375
|
-
function N(s, a, d) {
|
|
376
|
-
var o;
|
|
377
|
-
(o = f.value) == null || o.handleOpenEdit(d), V = s, e = a;
|
|
378
|
-
}
|
|
379
|
-
function B(s) {
|
|
380
|
-
l.value[e][V] = s, u.value[e] = [...l.value[e] ?? []];
|
|
381
|
-
}
|
|
382
|
-
function M(s) {
|
|
383
|
-
if (!u.value) {
|
|
384
|
-
u.value = { [e]: [...l.value[e] ?? [], s] };
|
|
385
|
-
return;
|
|
386
|
-
}
|
|
387
|
-
u.value[e] = [...l.value[e] ?? [], s];
|
|
388
|
-
}
|
|
389
|
-
return (s, a) => (p(), g(A, null, [
|
|
390
|
-
C(_(m), {
|
|
391
|
-
modelValue: n.value,
|
|
392
|
-
"onUpdate:modelValue": a[1] || (a[1] = (d) => n.value = d),
|
|
393
|
-
activeKey: n.value,
|
|
394
|
-
"onUpdate:activeKey": a[2] || (a[2] = (d) => n.value = d),
|
|
395
|
-
"expanded-names": n.value,
|
|
396
|
-
"onUpdate:expandedNames": a[3] || (a[3] = (d) => n.value = d)
|
|
397
|
-
}, {
|
|
398
|
-
default: R(() => [
|
|
399
|
-
(p(!0), g(A, null, T(v.value, (d) => (p(), K(_(x), {
|
|
400
|
-
key: d.title,
|
|
401
|
-
title: d.title,
|
|
402
|
-
header: d.title,
|
|
403
|
-
name: d.title
|
|
404
|
-
}, {
|
|
405
|
-
default: R(() => [
|
|
406
|
-
C(fe, {
|
|
407
|
-
modelValue: u.value,
|
|
408
|
-
"onUpdate:modelValue": a[0] || (a[0] = (o) => u.value = o),
|
|
409
|
-
"item-events": d.events,
|
|
410
|
-
"all-events": c.value,
|
|
411
|
-
events: l.value,
|
|
412
|
-
onAdd: $,
|
|
413
|
-
onEdit: N
|
|
414
|
-
}, null, 8, ["modelValue", "item-events", "all-events", "events"])
|
|
415
|
-
]),
|
|
416
|
-
_: 2
|
|
417
|
-
}, 1032, ["title", "header", "name"]))), 128))
|
|
418
|
-
]),
|
|
419
|
-
_: 1
|
|
420
|
-
}, 8, ["modelValue", "activeKey", "expanded-names"]),
|
|
421
|
-
C(Ae, {
|
|
422
|
-
ref_key: "EActionModalRef",
|
|
423
|
-
ref: f,
|
|
424
|
-
onAdd: M,
|
|
425
|
-
onEdit: B
|
|
426
|
-
}, null, 512)
|
|
427
|
-
], 64));
|
|
428
|
-
}
|
|
429
|
-
});
|
|
430
|
-
export {
|
|
431
|
-
Te as default
|
|
432
|
-
};
|
package/dist/index-Bt6BXCcr.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./axios-CYGTE3lR.cjs"),d=require("./index-BUkdmwKe.cjs"),f={class:"epic-sound-code"},p=e.defineComponent({__name:"index",setup(m){const s=u.pluginManager.getComponent("monacoEditor"),c=e.ref(null),t=e.inject("designer"),a=e.inject("designerProps");let r={};e.watch(()=>t.state.checkedNode,o=>{var n;d.deepEqual(r,e.toRaw(o))||(n=c.value)==null||n.setValue(JSON.stringify(o,null,2))},{deep:!0});const i=JSON.stringify(t.state.checkedNode,null,2);function l(o){try{if(!t.state.checkedNode)return!1;r=JSON.parse(o),d.deepCompareAndModify(t.state.checkedNode,r)}catch(n){console.warn("[epic-desinger:源码]异常:",n)}}return(o,n)=>(e.openBlock(),e.createElementBlock("div",f,[e.createVNode(e.unref(s),{ref_key:"monacoEditorRef",ref:c,autoToggleTheme:"",class:"epic-editor",readOnly:e.unref(a).sourceCodeReadOnly,"model-value":e.unref(i),lineNumbers:"off","onUpdate:modelValue":l},null,8,["readOnly","model-value"])]))}});exports.default=p;
|