@opentiny/tiny-engine-setting-events 2.5.0-alpha.0 → 2.5.0-alpha.2
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/index.js +652 -1742
- package/dist/style.css +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1,72 +1,34 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { ref as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import { SvgButton as
|
|
7
|
-
import { iconChevronDown as
|
|
8
|
-
import { string2Ast as
|
|
9
|
-
import { CodeConfigurator as
|
|
10
|
-
import { PROP_DATA_TYPE as
|
|
11
|
-
import { constants as
|
|
12
|
-
const
|
|
2
|
+
import { ref as F, reactive as K, provide as Ce, resolveComponent as k, createBlock as w, openBlock as b, withCtx as y, createElementVNode as t, resolveDynamicComponent as ge, createVNode as u, createTextVNode as j, nextTick as Se, unref as D, createElementBlock as A, Fragment as H, withDirectives as _e, renderList as ne, normalizeClass as R, toDisplayString as M, createCommentVNode as q, vShow as he, computed as $, watchEffect as Ve, watch as be, inject as Ne } from "vue";
|
|
3
|
+
import { DialogBox as Ae, Button as G, Form as Te, FormItem as Ee, Input as oe, Popover as Ue, Tooltip as je, Collapse as ze, CollapseItem as ye, Checkbox as Re, Search as Fe } from "@opentiny/vue";
|
|
4
|
+
import { getMergeMeta as De, useLayout as ie, useCanvas as L, getMetaApi as Y, META_APP as Z, getOptions as Je, useHistory as Xe, useBlock as $e, useMaterial as Ke, useModal as He, useMessage as qe, useProperties as T } from "@opentiny/tiny-engine-meta-register";
|
|
5
|
+
import Ge from "@opentiny/tiny-engine-common/js/i18n";
|
|
6
|
+
import { SvgButton as Ye, BlockLinkEvent as Ze, PluginPanel as We, VueMonaco as Qe } from "@opentiny/tiny-engine-common";
|
|
7
|
+
import { iconChevronDown as en } from "@opentiny/vue-icon";
|
|
8
|
+
import { string2Ast as xe, ast2String as nn } from "@opentiny/tiny-engine-common/js/ast";
|
|
9
|
+
import { CodeConfigurator as on, InputConfigurator as tn, VariableConfigurator as sn, SwitchConfigurator as an } from "@opentiny/tiny-engine-configurator";
|
|
10
|
+
import { PROP_DATA_TYPE as X } from "@opentiny/tiny-engine-common/js/constants";
|
|
11
|
+
import { constants as ln, utils as dn } from "@opentiny/tiny-engine-utils";
|
|
12
|
+
const te = {
|
|
13
13
|
id: "engine.setting.event",
|
|
14
14
|
title: "高级",
|
|
15
15
|
type: "setting",
|
|
16
16
|
align: "rightTop",
|
|
17
17
|
name: "event",
|
|
18
18
|
icon: "target"
|
|
19
|
-
},
|
|
20
|
-
const
|
|
21
|
-
for (const [e,
|
|
22
|
-
|
|
23
|
-
return
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
}, {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
ctx: () => ({
|
|
31
|
-
ast2String: H,
|
|
32
|
-
string2Ast: R,
|
|
33
|
-
getMergeMeta: M,
|
|
34
|
-
useCanvas: x,
|
|
35
|
-
useHistory: $,
|
|
36
|
-
useLayout: I,
|
|
37
|
-
getOptions: K,
|
|
38
|
-
getMetaApi: C,
|
|
39
|
-
META_APP: k,
|
|
40
|
-
meta: U,
|
|
41
|
-
dialogVisible: j,
|
|
42
|
-
open: w,
|
|
43
|
-
close: J
|
|
44
|
-
})
|
|
45
|
-
}), J = h(() => {
|
|
46
|
-
j.value = !1;
|
|
47
|
-
}, {
|
|
48
|
-
metaData: {
|
|
49
|
-
id: "engine.setting.event.close"
|
|
50
|
-
},
|
|
51
|
-
ctx: () => ({
|
|
52
|
-
ast2String: H,
|
|
53
|
-
string2Ast: R,
|
|
54
|
-
getMergeMeta: M,
|
|
55
|
-
useCanvas: x,
|
|
56
|
-
useHistory: $,
|
|
57
|
-
useLayout: I,
|
|
58
|
-
getOptions: K,
|
|
59
|
-
getMetaApi: C,
|
|
60
|
-
META_APP: k,
|
|
61
|
-
meta: U,
|
|
62
|
-
dialogVisible: j,
|
|
63
|
-
open: w,
|
|
64
|
-
close: J
|
|
65
|
-
})
|
|
66
|
-
}), _t = {
|
|
19
|
+
}, J = (v, o) => {
|
|
20
|
+
const a = v.__vccOpts || v;
|
|
21
|
+
for (const [e, r] of o)
|
|
22
|
+
a[e] = r;
|
|
23
|
+
return a;
|
|
24
|
+
}, se = F(!1), rn = () => {
|
|
25
|
+
se.value = !0;
|
|
26
|
+
}, ke = () => {
|
|
27
|
+
se.value = !1;
|
|
28
|
+
}, cn = {
|
|
67
29
|
components: {
|
|
68
|
-
TinyButton:
|
|
69
|
-
TinyDialogBox:
|
|
30
|
+
TinyButton: G,
|
|
31
|
+
TinyDialogBox: Ae
|
|
70
32
|
},
|
|
71
33
|
inheritAttrs: !1,
|
|
72
34
|
props: {
|
|
@@ -75,20 +37,8 @@ const U = {
|
|
|
75
37
|
default: () => ({})
|
|
76
38
|
}
|
|
77
39
|
},
|
|
78
|
-
setup(
|
|
79
|
-
const {
|
|
80
|
-
BindEventsDialogSidebar: t,
|
|
81
|
-
BindEventsDialogContent: o
|
|
82
|
-
} = M(U.id).components, {
|
|
83
|
-
PLUGIN_NAME: e,
|
|
84
|
-
activePlugin: i
|
|
85
|
-
} = I(), {
|
|
86
|
-
pageState: g
|
|
87
|
-
} = x(), {
|
|
88
|
-
getMethods: p,
|
|
89
|
-
saveMethod: s,
|
|
90
|
-
highlightMethod: r
|
|
91
|
-
} = C(k.Page), a = Ae({
|
|
40
|
+
setup(v) {
|
|
41
|
+
const { BindEventsDialogSidebar: o, BindEventsDialogContent: a } = De(te.id).components, { PLUGIN_NAME: e, activePlugin: r } = ie(), { pageState: _ } = L(), { getMethods: h, saveMethod: c, highlightMethod: p } = Y(Z.Page), s = K({
|
|
92
42
|
editorContent: "",
|
|
93
43
|
bindMethodInfo: {},
|
|
94
44
|
tip: "",
|
|
@@ -96,494 +46,91 @@ const U = {
|
|
|
96
46
|
enableExtraParams: !1,
|
|
97
47
|
isValidParams: !0
|
|
98
48
|
});
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
}, {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
ctx: () => ({
|
|
107
|
-
props: l,
|
|
108
|
-
BindEventsDialogSidebar: t,
|
|
109
|
-
BindEventsDialogContent: o,
|
|
110
|
-
PLUGIN_NAME: e,
|
|
111
|
-
activePlugin: i,
|
|
112
|
-
pageState: g,
|
|
113
|
-
getMethods: p,
|
|
114
|
-
saveMethod: s,
|
|
115
|
-
highlightMethod: r,
|
|
116
|
-
state: a,
|
|
117
|
-
selectMethod: u,
|
|
118
|
-
bindMethod: n,
|
|
119
|
-
resetTipError: c,
|
|
120
|
-
getExtraParams: d,
|
|
121
|
-
getFormatParams: m,
|
|
122
|
-
getFunctionBody: f,
|
|
123
|
-
activePagePlugin: y,
|
|
124
|
-
confirm: D,
|
|
125
|
-
openedDialog: A,
|
|
126
|
-
closeDialog: B,
|
|
127
|
-
ast2String: H,
|
|
128
|
-
string2Ast: R,
|
|
129
|
-
getMergeMeta: M,
|
|
130
|
-
useCanvas: x,
|
|
131
|
-
useHistory: $,
|
|
132
|
-
useLayout: I,
|
|
133
|
-
getOptions: K,
|
|
134
|
-
getMetaApi: C,
|
|
135
|
-
META_APP: k,
|
|
136
|
-
meta: U,
|
|
137
|
-
dialogVisible: j,
|
|
138
|
-
open: w,
|
|
139
|
-
close: J
|
|
140
|
-
})
|
|
141
|
-
}), n = h((b) => {
|
|
142
|
-
var Y, T;
|
|
143
|
-
if (!b)
|
|
49
|
+
Ce("context", s);
|
|
50
|
+
const x = (g) => {
|
|
51
|
+
s.bindMethodInfo = g;
|
|
52
|
+
}, n = (g) => {
|
|
53
|
+
var B, N;
|
|
54
|
+
if (!g)
|
|
144
55
|
return;
|
|
145
|
-
const
|
|
146
|
-
if (!
|
|
56
|
+
const m = (B = v.eventBinding) == null ? void 0 : B.eventName;
|
|
57
|
+
if (!m)
|
|
147
58
|
return;
|
|
148
|
-
const
|
|
149
|
-
if (!
|
|
59
|
+
const f = (N = _ == null ? void 0 : _.currentSchema) == null ? void 0 : N.props;
|
|
60
|
+
if (!f)
|
|
150
61
|
return;
|
|
151
|
-
const {
|
|
152
|
-
|
|
153
|
-
extra: G
|
|
154
|
-
} = b;
|
|
155
|
-
l[_] || (V[_] = {
|
|
62
|
+
const { name: C, extra: P } = g;
|
|
63
|
+
v[m] || (f[m] = {
|
|
156
64
|
type: "JSExpression",
|
|
157
65
|
value: ""
|
|
158
|
-
}),
|
|
159
|
-
}, {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
props: l,
|
|
165
|
-
BindEventsDialogSidebar: t,
|
|
166
|
-
BindEventsDialogContent: o,
|
|
167
|
-
PLUGIN_NAME: e,
|
|
168
|
-
activePlugin: i,
|
|
169
|
-
pageState: g,
|
|
170
|
-
getMethods: p,
|
|
171
|
-
saveMethod: s,
|
|
172
|
-
highlightMethod: r,
|
|
173
|
-
state: a,
|
|
174
|
-
selectMethod: u,
|
|
175
|
-
bindMethod: n,
|
|
176
|
-
resetTipError: c,
|
|
177
|
-
getExtraParams: d,
|
|
178
|
-
getFormatParams: m,
|
|
179
|
-
getFunctionBody: f,
|
|
180
|
-
activePagePlugin: y,
|
|
181
|
-
confirm: D,
|
|
182
|
-
openedDialog: A,
|
|
183
|
-
closeDialog: B,
|
|
184
|
-
ast2String: H,
|
|
185
|
-
string2Ast: R,
|
|
186
|
-
getMergeMeta: M,
|
|
187
|
-
useCanvas: x,
|
|
188
|
-
useHistory: $,
|
|
189
|
-
useLayout: I,
|
|
190
|
-
getOptions: K,
|
|
191
|
-
getMetaApi: C,
|
|
192
|
-
META_APP: k,
|
|
193
|
-
meta: U,
|
|
194
|
-
dialogVisible: j,
|
|
195
|
-
open: w,
|
|
196
|
-
close: J
|
|
197
|
-
})
|
|
198
|
-
}), c = h(() => {
|
|
199
|
-
a.tipError = !1, a.tip = "", a.isValidParams = !0;
|
|
200
|
-
}, {
|
|
201
|
-
metaData: {
|
|
202
|
-
id: "engine.setting.event.resetTipError"
|
|
203
|
-
},
|
|
204
|
-
ctx: () => ({
|
|
205
|
-
props: l,
|
|
206
|
-
BindEventsDialogSidebar: t,
|
|
207
|
-
BindEventsDialogContent: o,
|
|
208
|
-
PLUGIN_NAME: e,
|
|
209
|
-
activePlugin: i,
|
|
210
|
-
pageState: g,
|
|
211
|
-
getMethods: p,
|
|
212
|
-
saveMethod: s,
|
|
213
|
-
highlightMethod: r,
|
|
214
|
-
state: a,
|
|
215
|
-
selectMethod: u,
|
|
216
|
-
bindMethod: n,
|
|
217
|
-
resetTipError: c,
|
|
218
|
-
getExtraParams: d,
|
|
219
|
-
getFormatParams: m,
|
|
220
|
-
getFunctionBody: f,
|
|
221
|
-
activePagePlugin: y,
|
|
222
|
-
confirm: D,
|
|
223
|
-
openedDialog: A,
|
|
224
|
-
closeDialog: B,
|
|
225
|
-
ast2String: H,
|
|
226
|
-
string2Ast: R,
|
|
227
|
-
getMergeMeta: M,
|
|
228
|
-
useCanvas: x,
|
|
229
|
-
useHistory: $,
|
|
230
|
-
useLayout: I,
|
|
231
|
-
getOptions: K,
|
|
232
|
-
getMetaApi: C,
|
|
233
|
-
META_APP: k,
|
|
234
|
-
meta: U,
|
|
235
|
-
dialogVisible: j,
|
|
236
|
-
open: w,
|
|
237
|
-
close: J
|
|
238
|
-
})
|
|
239
|
-
}), d = h(() => {
|
|
240
|
-
let b = "";
|
|
241
|
-
if (a.enableExtraParams)
|
|
66
|
+
}), P && s.enableExtraParams && (f[m].params = P), f[m].value = `this.${C}`, Xe().addHistory();
|
|
67
|
+
}, l = () => {
|
|
68
|
+
s.tipError = !1, s.tip = "", s.isValidParams = !0;
|
|
69
|
+
}, i = () => {
|
|
70
|
+
let g = "";
|
|
71
|
+
if (s.enableExtraParams)
|
|
242
72
|
try {
|
|
243
|
-
|
|
73
|
+
g = JSON.parse(s.editorContent), s.isValidParams = Array.isArray(g);
|
|
244
74
|
} catch {
|
|
245
|
-
|
|
75
|
+
s.isValidParams = !1;
|
|
246
76
|
}
|
|
247
|
-
return
|
|
248
|
-
}, {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
props: l,
|
|
254
|
-
BindEventsDialogSidebar: t,
|
|
255
|
-
BindEventsDialogContent: o,
|
|
256
|
-
PLUGIN_NAME: e,
|
|
257
|
-
activePlugin: i,
|
|
258
|
-
pageState: g,
|
|
259
|
-
getMethods: p,
|
|
260
|
-
saveMethod: s,
|
|
261
|
-
highlightMethod: r,
|
|
262
|
-
state: a,
|
|
263
|
-
selectMethod: u,
|
|
264
|
-
bindMethod: n,
|
|
265
|
-
resetTipError: c,
|
|
266
|
-
getExtraParams: d,
|
|
267
|
-
getFormatParams: m,
|
|
268
|
-
getFunctionBody: f,
|
|
269
|
-
activePagePlugin: y,
|
|
270
|
-
confirm: D,
|
|
271
|
-
openedDialog: A,
|
|
272
|
-
closeDialog: B,
|
|
273
|
-
ast2String: H,
|
|
274
|
-
string2Ast: R,
|
|
275
|
-
getMergeMeta: M,
|
|
276
|
-
useCanvas: x,
|
|
277
|
-
useHistory: $,
|
|
278
|
-
useLayout: I,
|
|
279
|
-
getOptions: K,
|
|
280
|
-
getMetaApi: C,
|
|
281
|
-
META_APP: k,
|
|
282
|
-
meta: U,
|
|
283
|
-
dialogVisible: j,
|
|
284
|
-
open: w,
|
|
285
|
-
close: J
|
|
286
|
-
})
|
|
287
|
-
}), m = h((b) => Array.from({
|
|
288
|
-
length: b.length
|
|
289
|
-
}, (_, V) => `args${V}`).join(","), {
|
|
290
|
-
metaData: {
|
|
291
|
-
id: "engine.setting.event.getFormatParams"
|
|
292
|
-
},
|
|
293
|
-
ctx: () => ({
|
|
294
|
-
props: l,
|
|
295
|
-
BindEventsDialogSidebar: t,
|
|
296
|
-
BindEventsDialogContent: o,
|
|
297
|
-
PLUGIN_NAME: e,
|
|
298
|
-
activePlugin: i,
|
|
299
|
-
pageState: g,
|
|
300
|
-
getMethods: p,
|
|
301
|
-
saveMethod: s,
|
|
302
|
-
highlightMethod: r,
|
|
303
|
-
state: a,
|
|
304
|
-
selectMethod: u,
|
|
305
|
-
bindMethod: n,
|
|
306
|
-
resetTipError: c,
|
|
307
|
-
getExtraParams: d,
|
|
308
|
-
getFormatParams: m,
|
|
309
|
-
getFunctionBody: f,
|
|
310
|
-
activePagePlugin: y,
|
|
311
|
-
confirm: D,
|
|
312
|
-
openedDialog: A,
|
|
313
|
-
closeDialog: B,
|
|
314
|
-
ast2String: H,
|
|
315
|
-
string2Ast: R,
|
|
316
|
-
getMergeMeta: M,
|
|
317
|
-
useCanvas: x,
|
|
318
|
-
useHistory: $,
|
|
319
|
-
useLayout: I,
|
|
320
|
-
getOptions: K,
|
|
321
|
-
getMetaApi: C,
|
|
322
|
-
META_APP: k,
|
|
323
|
-
meta: U,
|
|
324
|
-
dialogVisible: j,
|
|
325
|
-
open: w,
|
|
326
|
-
close: J
|
|
327
|
-
})
|
|
328
|
-
}), f = h(() => {
|
|
329
|
-
var V, O, G, Y;
|
|
330
|
-
let b = (O = (V = p()) == null ? void 0 : V[a.bindMethodInfo.name]) == null ? void 0 : O.value, _ = "{}";
|
|
331
|
-
if (b) {
|
|
332
|
-
let T = {};
|
|
77
|
+
return g;
|
|
78
|
+
}, d = (g) => Array.from({ length: g.length }, (m, f) => `args${f}`).join(","), E = () => {
|
|
79
|
+
var f, C, P, B;
|
|
80
|
+
let g = (C = (f = h()) == null ? void 0 : f[s.bindMethodInfo.name]) == null ? void 0 : C.value, m = "{}";
|
|
81
|
+
if (g) {
|
|
82
|
+
let N = {};
|
|
333
83
|
try {
|
|
334
|
-
|
|
84
|
+
N = xe(g);
|
|
335
85
|
} catch {
|
|
336
|
-
|
|
86
|
+
g = g.replace("function", `function ${s.bindMethodInfo.name}`), N = xe(g);
|
|
337
87
|
}
|
|
338
|
-
(
|
|
88
|
+
(B = (P = N == null ? void 0 : N.program) == null ? void 0 : P.body[0]) != null && B.body && (m = nn(N.program.body[0].body));
|
|
339
89
|
}
|
|
340
|
-
return
|
|
90
|
+
return m || `{
|
|
341
91
|
}`;
|
|
342
|
-
}, {
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
props: l,
|
|
348
|
-
BindEventsDialogSidebar: t,
|
|
349
|
-
BindEventsDialogContent: o,
|
|
350
|
-
PLUGIN_NAME: e,
|
|
351
|
-
activePlugin: i,
|
|
352
|
-
pageState: g,
|
|
353
|
-
getMethods: p,
|
|
354
|
-
saveMethod: s,
|
|
355
|
-
highlightMethod: r,
|
|
356
|
-
state: a,
|
|
357
|
-
selectMethod: u,
|
|
358
|
-
bindMethod: n,
|
|
359
|
-
resetTipError: c,
|
|
360
|
-
getExtraParams: d,
|
|
361
|
-
getFormatParams: m,
|
|
362
|
-
getFunctionBody: f,
|
|
363
|
-
activePagePlugin: y,
|
|
364
|
-
confirm: D,
|
|
365
|
-
openedDialog: A,
|
|
366
|
-
closeDialog: B,
|
|
367
|
-
ast2String: H,
|
|
368
|
-
string2Ast: R,
|
|
369
|
-
getMergeMeta: M,
|
|
370
|
-
useCanvas: x,
|
|
371
|
-
useHistory: $,
|
|
372
|
-
useLayout: I,
|
|
373
|
-
getOptions: K,
|
|
374
|
-
getMetaApi: C,
|
|
375
|
-
META_APP: k,
|
|
376
|
-
meta: U,
|
|
377
|
-
dialogVisible: j,
|
|
378
|
-
open: w,
|
|
379
|
-
close: J
|
|
380
|
-
})
|
|
381
|
-
}), y = h(() => {
|
|
382
|
-
i(e.Page).then(() => {
|
|
383
|
-
rt(() => {
|
|
384
|
-
var b;
|
|
385
|
-
r && r((b = a.bindMethodInfo) == null ? void 0 : b.name);
|
|
92
|
+
}, V = () => {
|
|
93
|
+
r(e.Page).then(() => {
|
|
94
|
+
Se(() => {
|
|
95
|
+
var g;
|
|
96
|
+
p && p((g = s.bindMethodInfo) == null ? void 0 : g.name);
|
|
386
97
|
});
|
|
387
98
|
});
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
getFunctionBody: f,
|
|
409
|
-
activePagePlugin: y,
|
|
410
|
-
confirm: D,
|
|
411
|
-
openedDialog: A,
|
|
412
|
-
closeDialog: B,
|
|
413
|
-
ast2String: H,
|
|
414
|
-
string2Ast: R,
|
|
415
|
-
getMergeMeta: M,
|
|
416
|
-
useCanvas: x,
|
|
417
|
-
useHistory: $,
|
|
418
|
-
useLayout: I,
|
|
419
|
-
getOptions: K,
|
|
420
|
-
getMetaApi: C,
|
|
421
|
-
META_APP: k,
|
|
422
|
-
meta: U,
|
|
423
|
-
dialogVisible: j,
|
|
424
|
-
open: w,
|
|
425
|
-
close: J
|
|
426
|
-
})
|
|
427
|
-
}), D = h(async () => {
|
|
428
|
-
if (a.tipError)
|
|
429
|
-
return;
|
|
430
|
-
let b = "event";
|
|
431
|
-
const _ = d();
|
|
432
|
-
let V = b;
|
|
433
|
-
if (!a.isValidParams)
|
|
434
|
-
return;
|
|
435
|
-
_ && (b = _.join(","), V = m(_)), n({
|
|
436
|
-
...a.bindMethodInfo,
|
|
437
|
-
params: b,
|
|
438
|
-
extra: _
|
|
439
|
-
});
|
|
440
|
-
const O = f(), {
|
|
441
|
-
name: G
|
|
442
|
-
} = a.bindMethodInfo, Y = {
|
|
443
|
-
name: G,
|
|
444
|
-
content: a.enableExtraParams ? `function ${G}(eventArgs,${V}) ${O}` : `function ${G}(${V}) ${O}`
|
|
445
|
-
}, {
|
|
446
|
-
beforeSaveMethod: T
|
|
447
|
-
} = K(U.id);
|
|
448
|
-
typeof T == "function" && await T(Y, a.bindMethodInfo), s == null || s(Y), y(), J();
|
|
449
|
-
}, {
|
|
450
|
-
metaData: {
|
|
451
|
-
id: "engine.setting.event.confirm"
|
|
99
|
+
};
|
|
100
|
+
return {
|
|
101
|
+
BindEventsDialogSidebar: o,
|
|
102
|
+
BindEventsDialogContent: a,
|
|
103
|
+
state: s,
|
|
104
|
+
dialogVisible: se,
|
|
105
|
+
confirm: async () => {
|
|
106
|
+
if (s.tipError)
|
|
107
|
+
return;
|
|
108
|
+
let g = "event";
|
|
109
|
+
const m = i();
|
|
110
|
+
let f = g;
|
|
111
|
+
if (!s.isValidParams)
|
|
112
|
+
return;
|
|
113
|
+
m && (g = m.join(","), f = d(m)), n({ ...s.bindMethodInfo, extra: m });
|
|
114
|
+
const C = E(), { name: P } = s.bindMethodInfo, B = {
|
|
115
|
+
name: P,
|
|
116
|
+
content: s.enableExtraParams ? `function ${P}(eventArgs,${f}) ${C}` : `function ${P}(${f}) ${C}`
|
|
117
|
+
}, { beforeSaveMethod: N } = Je(te.id);
|
|
118
|
+
typeof N == "function" && await N(B, s.bindMethodInfo), c == null || c(B), V(), ke();
|
|
452
119
|
},
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
BindEventsDialogSidebar: t,
|
|
456
|
-
BindEventsDialogContent: o,
|
|
457
|
-
PLUGIN_NAME: e,
|
|
458
|
-
activePlugin: i,
|
|
459
|
-
pageState: g,
|
|
460
|
-
getMethods: p,
|
|
461
|
-
saveMethod: s,
|
|
462
|
-
highlightMethod: r,
|
|
463
|
-
state: a,
|
|
464
|
-
selectMethod: u,
|
|
465
|
-
bindMethod: n,
|
|
466
|
-
resetTipError: c,
|
|
467
|
-
getExtraParams: d,
|
|
468
|
-
getFormatParams: m,
|
|
469
|
-
getFunctionBody: f,
|
|
470
|
-
activePagePlugin: y,
|
|
471
|
-
confirm: D,
|
|
472
|
-
openedDialog: A,
|
|
473
|
-
closeDialog: B,
|
|
474
|
-
ast2String: H,
|
|
475
|
-
string2Ast: R,
|
|
476
|
-
getMergeMeta: M,
|
|
477
|
-
useCanvas: x,
|
|
478
|
-
useHistory: $,
|
|
479
|
-
useLayout: I,
|
|
480
|
-
getOptions: K,
|
|
481
|
-
getMetaApi: C,
|
|
482
|
-
META_APP: k,
|
|
483
|
-
meta: U,
|
|
484
|
-
dialogVisible: j,
|
|
485
|
-
open: w,
|
|
486
|
-
close: J
|
|
487
|
-
})
|
|
488
|
-
}), A = h(() => {
|
|
489
|
-
var b, _, V;
|
|
490
|
-
a.enableExtraParams = !!((_ = (b = l.eventBinding) == null ? void 0 : b.params) != null && _.length), a.editorContent = JSON.stringify(((V = l.eventBinding) == null ? void 0 : V.params) || [], null, 2), c();
|
|
491
|
-
}, {
|
|
492
|
-
metaData: {
|
|
493
|
-
id: "engine.setting.event.openedDialog"
|
|
120
|
+
closeDialog: () => {
|
|
121
|
+
l(), ke();
|
|
494
122
|
},
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
BindEventsDialogContent: o,
|
|
499
|
-
PLUGIN_NAME: e,
|
|
500
|
-
activePlugin: i,
|
|
501
|
-
pageState: g,
|
|
502
|
-
getMethods: p,
|
|
503
|
-
saveMethod: s,
|
|
504
|
-
highlightMethod: r,
|
|
505
|
-
state: a,
|
|
506
|
-
selectMethod: u,
|
|
507
|
-
bindMethod: n,
|
|
508
|
-
resetTipError: c,
|
|
509
|
-
getExtraParams: d,
|
|
510
|
-
getFormatParams: m,
|
|
511
|
-
getFunctionBody: f,
|
|
512
|
-
activePagePlugin: y,
|
|
513
|
-
confirm: D,
|
|
514
|
-
openedDialog: A,
|
|
515
|
-
closeDialog: B,
|
|
516
|
-
ast2String: H,
|
|
517
|
-
string2Ast: R,
|
|
518
|
-
getMergeMeta: M,
|
|
519
|
-
useCanvas: x,
|
|
520
|
-
useHistory: $,
|
|
521
|
-
useLayout: I,
|
|
522
|
-
getOptions: K,
|
|
523
|
-
getMetaApi: C,
|
|
524
|
-
META_APP: k,
|
|
525
|
-
meta: U,
|
|
526
|
-
dialogVisible: j,
|
|
527
|
-
open: w,
|
|
528
|
-
close: J
|
|
529
|
-
})
|
|
530
|
-
}), B = h(() => {
|
|
531
|
-
c(), J();
|
|
532
|
-
}, {
|
|
533
|
-
metaData: {
|
|
534
|
-
id: "engine.setting.event.closeDialog"
|
|
123
|
+
openedDialog: () => {
|
|
124
|
+
var g, m, f;
|
|
125
|
+
s.enableExtraParams = !!((m = (g = v.eventBinding) == null ? void 0 : g.params) != null && m.length), s.editorContent = JSON.stringify(((f = v.eventBinding) == null ? void 0 : f.params) || [], null, 2), l();
|
|
535
126
|
},
|
|
536
|
-
|
|
537
|
-
props: l,
|
|
538
|
-
BindEventsDialogSidebar: t,
|
|
539
|
-
BindEventsDialogContent: o,
|
|
540
|
-
PLUGIN_NAME: e,
|
|
541
|
-
activePlugin: i,
|
|
542
|
-
pageState: g,
|
|
543
|
-
getMethods: p,
|
|
544
|
-
saveMethod: s,
|
|
545
|
-
highlightMethod: r,
|
|
546
|
-
state: a,
|
|
547
|
-
selectMethod: u,
|
|
548
|
-
bindMethod: n,
|
|
549
|
-
resetTipError: c,
|
|
550
|
-
getExtraParams: d,
|
|
551
|
-
getFormatParams: m,
|
|
552
|
-
getFunctionBody: f,
|
|
553
|
-
activePagePlugin: y,
|
|
554
|
-
confirm: D,
|
|
555
|
-
openedDialog: A,
|
|
556
|
-
closeDialog: B,
|
|
557
|
-
ast2String: H,
|
|
558
|
-
string2Ast: R,
|
|
559
|
-
getMergeMeta: M,
|
|
560
|
-
useCanvas: x,
|
|
561
|
-
useHistory: $,
|
|
562
|
-
useLayout: I,
|
|
563
|
-
getOptions: K,
|
|
564
|
-
getMetaApi: C,
|
|
565
|
-
META_APP: k,
|
|
566
|
-
meta: U,
|
|
567
|
-
dialogVisible: j,
|
|
568
|
-
open: w,
|
|
569
|
-
close: J
|
|
570
|
-
})
|
|
571
|
-
});
|
|
572
|
-
return {
|
|
573
|
-
BindEventsDialogSidebar: t,
|
|
574
|
-
BindEventsDialogContent: o,
|
|
575
|
-
state: a,
|
|
576
|
-
dialogVisible: j,
|
|
577
|
-
confirm: D,
|
|
578
|
-
closeDialog: B,
|
|
579
|
-
openedDialog: A,
|
|
580
|
-
selectMethod: u
|
|
127
|
+
selectMethod: x
|
|
581
128
|
};
|
|
582
129
|
}
|
|
583
|
-
},
|
|
584
|
-
function
|
|
585
|
-
const
|
|
586
|
-
return
|
|
130
|
+
}, mn = { class: "bind-event-dialog-content" }, pn = { class: "bind-dialog-footer" };
|
|
131
|
+
function un(v, o, a, e, r, _) {
|
|
132
|
+
const h = k("tiny-button"), c = k("tiny-dialog-box");
|
|
133
|
+
return b(), w(c, {
|
|
587
134
|
visible: e.dialogVisible,
|
|
588
135
|
title: "事件绑定",
|
|
589
136
|
width: "50%",
|
|
@@ -593,39 +140,39 @@ function Et(l, t, o, e, i, g) {
|
|
|
593
140
|
onClose: e.closeDialog,
|
|
594
141
|
onOpened: e.openedDialog
|
|
595
142
|
}, {
|
|
596
|
-
footer:
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
default:
|
|
600
|
-
|
|
143
|
+
footer: y(() => [
|
|
144
|
+
t("div", pn, [
|
|
145
|
+
u(h, { onClick: e.closeDialog }, {
|
|
146
|
+
default: y(() => o[0] || (o[0] = [
|
|
147
|
+
j("取 消")
|
|
601
148
|
])),
|
|
602
149
|
_: 1
|
|
603
150
|
}, 8, ["onClick"]),
|
|
604
|
-
|
|
151
|
+
u(h, {
|
|
605
152
|
type: "info",
|
|
606
153
|
onClick: e.confirm
|
|
607
154
|
}, {
|
|
608
|
-
default:
|
|
609
|
-
|
|
155
|
+
default: y(() => o[1] || (o[1] = [
|
|
156
|
+
j("确 定")
|
|
610
157
|
])),
|
|
611
158
|
_: 1
|
|
612
159
|
}, 8, ["onClick"])
|
|
613
160
|
])
|
|
614
161
|
]),
|
|
615
|
-
default:
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
(
|
|
162
|
+
default: y(() => [
|
|
163
|
+
o[2] || (o[2] = t("div", { class: "bind-event-dialog-tip" }, " 选择已有方法或者添加新方法(点击 确定 之后将在JS面板中创建一个该名称的新方法)。 ", -1)),
|
|
164
|
+
t("div", mn, [
|
|
165
|
+
(b(), w(ge(e.BindEventsDialogSidebar), {
|
|
619
166
|
dialogVisible: e.dialogVisible,
|
|
620
|
-
eventBinding:
|
|
167
|
+
eventBinding: a.eventBinding
|
|
621
168
|
}, null, 8, ["dialogVisible", "eventBinding"])),
|
|
622
|
-
(
|
|
169
|
+
(b(), w(ge(e.BindEventsDialogContent), { dialogVisible: e.dialogVisible }, null, 8, ["dialogVisible"]))
|
|
623
170
|
])
|
|
624
171
|
]),
|
|
625
172
|
_: 1
|
|
626
173
|
}, 8, ["visible", "onClose", "onOpened"]);
|
|
627
174
|
}
|
|
628
|
-
const
|
|
175
|
+
const vn = /* @__PURE__ */ J(cn, [["render", un], ["__scopeId", "data-v-6b711ca9"]]), fn = {
|
|
629
176
|
onClick: {
|
|
630
177
|
label: {
|
|
631
178
|
zh_CN: "点击事件"
|
|
@@ -682,19 +229,120 @@ const _e = /* @__PURE__ */ Ce(_t, [["render", Et], ["__scopeId", "data-v-dd1772f
|
|
|
682
229
|
},
|
|
683
230
|
defaultValue: ""
|
|
684
231
|
}
|
|
685
|
-
},
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
232
|
+
}, gn = [
|
|
233
|
+
"onabort",
|
|
234
|
+
"onafterprint",
|
|
235
|
+
"onanimationend",
|
|
236
|
+
"onanimationiteration",
|
|
237
|
+
"onanimationstart",
|
|
238
|
+
"onappinstalled",
|
|
239
|
+
"onauxclick",
|
|
240
|
+
"onbeforeinstallprompt",
|
|
241
|
+
"onbeforeprint",
|
|
242
|
+
"onbeforeunload",
|
|
243
|
+
"onbeforexrselect",
|
|
244
|
+
"onblur",
|
|
245
|
+
"oncancel",
|
|
246
|
+
"oncanplay",
|
|
247
|
+
"oncanplaythrough",
|
|
248
|
+
"onchange",
|
|
249
|
+
"onclick",
|
|
250
|
+
"onclose",
|
|
251
|
+
"oncontextlost",
|
|
252
|
+
"oncontextmenu",
|
|
253
|
+
"oncontextrestored",
|
|
254
|
+
"oncuechange",
|
|
255
|
+
"ondblclick",
|
|
256
|
+
"ondrag",
|
|
257
|
+
"ondragend",
|
|
258
|
+
"ondragenter",
|
|
259
|
+
"ondragleave",
|
|
260
|
+
"ondragover",
|
|
261
|
+
"ondragstart",
|
|
262
|
+
"ondrop",
|
|
263
|
+
"ondurationchange",
|
|
264
|
+
"onemptied",
|
|
265
|
+
"onended",
|
|
266
|
+
"onerror",
|
|
267
|
+
"onfocus",
|
|
268
|
+
"onformdata",
|
|
269
|
+
"ongotpointercapture",
|
|
270
|
+
"onhashchange",
|
|
271
|
+
"oninput",
|
|
272
|
+
"oninvalid",
|
|
273
|
+
"onkeydown",
|
|
274
|
+
"onkeypress",
|
|
275
|
+
"onkeyup",
|
|
276
|
+
"onlanguagechange",
|
|
277
|
+
"onload",
|
|
278
|
+
"onloadeddata",
|
|
279
|
+
"onloadedmetadata",
|
|
280
|
+
"onloadstart",
|
|
281
|
+
"onlostpointercapture",
|
|
282
|
+
"onmessage",
|
|
283
|
+
"onmessageerror",
|
|
284
|
+
"onmousedown",
|
|
285
|
+
"onmouseenter",
|
|
286
|
+
"onmouseleave",
|
|
287
|
+
"onmousemove",
|
|
288
|
+
"onmouseout",
|
|
289
|
+
"onmouseover",
|
|
290
|
+
"onmouseup",
|
|
291
|
+
"onmousewheel",
|
|
292
|
+
"onoffline",
|
|
293
|
+
"ononline",
|
|
294
|
+
"onpagehide",
|
|
295
|
+
"onpageshow",
|
|
296
|
+
"onpause",
|
|
297
|
+
"onplay",
|
|
298
|
+
"onplaying",
|
|
299
|
+
"onpointercancel",
|
|
300
|
+
"onpointerdown",
|
|
301
|
+
"onpointerenter",
|
|
302
|
+
"onpointerleave",
|
|
303
|
+
"onpointermove",
|
|
304
|
+
"onpointerout",
|
|
305
|
+
"onpointerover",
|
|
306
|
+
"onpointerrawupdate",
|
|
307
|
+
"onpointerup",
|
|
308
|
+
"onpopstate",
|
|
309
|
+
"onprogress",
|
|
310
|
+
"onratechange",
|
|
311
|
+
"onrejectionhandled",
|
|
312
|
+
"onreset",
|
|
313
|
+
"onresize",
|
|
314
|
+
"onscroll",
|
|
315
|
+
"onsearch",
|
|
316
|
+
"onsecuritypolicyviolation",
|
|
317
|
+
"onseeked",
|
|
318
|
+
"onseeking",
|
|
319
|
+
"onselect",
|
|
320
|
+
"onselectionchange",
|
|
321
|
+
"onselectstart",
|
|
322
|
+
"onslotchange",
|
|
323
|
+
"onstalled",
|
|
324
|
+
"onstorage",
|
|
325
|
+
"onsubmit",
|
|
326
|
+
"onsuspend",
|
|
327
|
+
"ontimeupdate",
|
|
328
|
+
"ontoggle",
|
|
329
|
+
"ontransitioncancel",
|
|
330
|
+
"ontransitionend",
|
|
331
|
+
"ontransitionrun",
|
|
332
|
+
"ontransitionstart",
|
|
333
|
+
"onunhandledrejection",
|
|
334
|
+
"onunload",
|
|
335
|
+
"onvolumechange",
|
|
336
|
+
"onwaiting",
|
|
337
|
+
"onwebkitanimationend",
|
|
338
|
+
"onwebkitanimationiteration",
|
|
339
|
+
"onwebkitanimationstart",
|
|
340
|
+
"onwebkittransitionend",
|
|
341
|
+
"onwheel"
|
|
342
|
+
], _n = (v) => !!gn.map((a) => {
|
|
343
|
+
const e = a[2].toUpperCase();
|
|
344
|
+
return `${a.substring(0, 2)}${e}${a.substring(3)}`;
|
|
345
|
+
}).includes(v), hn = { class: "footer" }, bn = {
|
|
698
346
|
__name: "AddEventsDialog",
|
|
699
347
|
props: {
|
|
700
348
|
visible: {
|
|
@@ -707,155 +355,106 @@ const _e = /* @__PURE__ */ Ce(_t, [["render", Et], ["__scopeId", "data-v-dd1772f
|
|
|
707
355
|
}
|
|
708
356
|
},
|
|
709
357
|
emits: ["closeDialog", "addEvent"],
|
|
710
|
-
setup(
|
|
711
|
-
const
|
|
358
|
+
setup(v, { emit: o }) {
|
|
359
|
+
const a = v, e = o, r = K({
|
|
712
360
|
eventDescription: "",
|
|
713
361
|
eventName: ""
|
|
714
|
-
}),
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
})
|
|
739
|
-
}), s = {
|
|
740
|
-
eventDescription: [{
|
|
741
|
-
required: !0,
|
|
742
|
-
message: "必填"
|
|
743
|
-
}],
|
|
744
|
-
eventName: [{
|
|
745
|
-
required: !0,
|
|
746
|
-
message: "必填"
|
|
747
|
-
}, {
|
|
748
|
-
validator: p
|
|
749
|
-
}]
|
|
750
|
-
}, r = h(() => {
|
|
362
|
+
}), _ = F(null), c = {
|
|
363
|
+
eventDescription: [
|
|
364
|
+
{
|
|
365
|
+
required: !0,
|
|
366
|
+
message: "必填"
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
eventName: [
|
|
370
|
+
{ required: !0, message: "必填" },
|
|
371
|
+
{
|
|
372
|
+
validator: (x, n, l) => {
|
|
373
|
+
if (a.componentEvents[r.eventName]) {
|
|
374
|
+
l(new Error("事件名已存在"));
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
if (!_n(r.eventName)) {
|
|
378
|
+
l(new Error("请输入正确的浏览器事件名"));
|
|
379
|
+
return;
|
|
380
|
+
}
|
|
381
|
+
l();
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
]
|
|
385
|
+
}, p = () => {
|
|
751
386
|
e("closeDialog");
|
|
752
|
-
}, {
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
},
|
|
756
|
-
ctx: () => ({
|
|
757
|
-
checkEvent: Ve,
|
|
758
|
-
props: o,
|
|
759
|
-
emits: e,
|
|
760
|
-
formData: i,
|
|
761
|
-
ruleForm: g,
|
|
762
|
-
eventNameValidator: p,
|
|
763
|
-
rules: s,
|
|
764
|
-
closeDialog: r,
|
|
765
|
-
addMethod: a
|
|
766
|
-
})
|
|
767
|
-
}), a = h(() => {
|
|
768
|
-
g.value && g.value.validate((u) => {
|
|
769
|
-
if (!u)
|
|
387
|
+
}, s = () => {
|
|
388
|
+
_.value && _.value.validate((x) => {
|
|
389
|
+
if (!x)
|
|
770
390
|
return;
|
|
771
|
-
const {
|
|
772
|
-
|
|
773
|
-
eventDescription: c
|
|
774
|
-
} = i;
|
|
775
|
-
e("addEvent", {
|
|
776
|
-
eventName: n,
|
|
777
|
-
eventDescription: c
|
|
778
|
-
});
|
|
391
|
+
const { eventName: n, eventDescription: l } = r;
|
|
392
|
+
e("addEvent", { eventName: n, eventDescription: l });
|
|
779
393
|
});
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
},
|
|
784
|
-
ctx: () => ({
|
|
785
|
-
checkEvent: Ve,
|
|
786
|
-
props: o,
|
|
787
|
-
emits: e,
|
|
788
|
-
formData: i,
|
|
789
|
-
ruleForm: g,
|
|
790
|
-
eventNameValidator: p,
|
|
791
|
-
rules: s,
|
|
792
|
-
closeDialog: r,
|
|
793
|
-
addMethod: a
|
|
794
|
-
})
|
|
795
|
-
});
|
|
796
|
-
return (u, n) => (N(), Q(S(nt), {
|
|
797
|
-
visible: l.visible,
|
|
394
|
+
};
|
|
395
|
+
return (x, n) => (b(), w(D(Ae), {
|
|
396
|
+
visible: v.visible,
|
|
798
397
|
title: "添加新事件",
|
|
799
398
|
width: "400px",
|
|
800
399
|
"append-to-body": !0,
|
|
801
400
|
"close-on-click-modal": !1,
|
|
802
|
-
onClose:
|
|
401
|
+
onClose: p
|
|
803
402
|
}, {
|
|
804
|
-
footer:
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
default:
|
|
808
|
-
|
|
403
|
+
footer: y(() => [
|
|
404
|
+
t("div", hn, [
|
|
405
|
+
u(D(G), { onClick: p }, {
|
|
406
|
+
default: y(() => n[2] || (n[2] = [
|
|
407
|
+
j(" 取消")
|
|
809
408
|
])),
|
|
810
409
|
_: 1
|
|
811
|
-
}
|
|
812
|
-
|
|
410
|
+
}),
|
|
411
|
+
u(D(G), {
|
|
813
412
|
type: "primary",
|
|
814
|
-
onClick:
|
|
413
|
+
onClick: s
|
|
815
414
|
}, {
|
|
816
|
-
default:
|
|
817
|
-
|
|
415
|
+
default: y(() => n[3] || (n[3] = [
|
|
416
|
+
j(" 确定")
|
|
818
417
|
])),
|
|
819
418
|
_: 1
|
|
820
|
-
}
|
|
419
|
+
})
|
|
821
420
|
])
|
|
822
421
|
]),
|
|
823
|
-
default:
|
|
824
|
-
|
|
422
|
+
default: y(() => [
|
|
423
|
+
u(D(Te), {
|
|
825
424
|
ref_key: "ruleForm",
|
|
826
|
-
ref:
|
|
827
|
-
model:
|
|
828
|
-
rules:
|
|
425
|
+
ref: _,
|
|
426
|
+
model: r,
|
|
427
|
+
rules: c,
|
|
829
428
|
"label-width": "80px",
|
|
830
429
|
"inline-message": !0,
|
|
831
430
|
"validate-type": "text",
|
|
832
431
|
"label-position": "left",
|
|
833
432
|
class: "add-custom-event-form"
|
|
834
433
|
}, {
|
|
835
|
-
default:
|
|
836
|
-
|
|
434
|
+
default: y(() => [
|
|
435
|
+
u(D(Ee), {
|
|
837
436
|
label: "事件函数名",
|
|
838
437
|
prop: "eventName",
|
|
839
438
|
required: ""
|
|
840
439
|
}, {
|
|
841
|
-
default:
|
|
842
|
-
|
|
843
|
-
modelValue:
|
|
844
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
440
|
+
default: y(() => [
|
|
441
|
+
u(D(oe), {
|
|
442
|
+
modelValue: r.eventName,
|
|
443
|
+
"onUpdate:modelValue": n[0] || (n[0] = (l) => r.eventName = l),
|
|
845
444
|
placeholder: "小驼峰格式,如:onDrag"
|
|
846
445
|
}, null, 8, ["modelValue"])
|
|
847
446
|
]),
|
|
848
447
|
_: 1
|
|
849
448
|
}),
|
|
850
|
-
|
|
449
|
+
u(D(Ee), {
|
|
851
450
|
label: "事件描述",
|
|
852
451
|
prop: "eventDescription",
|
|
853
452
|
required: ""
|
|
854
453
|
}, {
|
|
855
|
-
default:
|
|
856
|
-
|
|
857
|
-
modelValue:
|
|
858
|
-
"onUpdate:modelValue": n[1] || (n[1] = (
|
|
454
|
+
default: y(() => [
|
|
455
|
+
u(D(oe), {
|
|
456
|
+
modelValue: r.eventDescription,
|
|
457
|
+
"onUpdate:modelValue": n[1] || (n[1] = (l) => r.eventDescription = l)
|
|
859
458
|
}, null, 8, ["modelValue"])
|
|
860
459
|
]),
|
|
861
460
|
_: 1
|
|
@@ -865,394 +464,114 @@ const _e = /* @__PURE__ */ Ce(_t, [["render", Et], ["__scopeId", "data-v-dd1772f
|
|
|
865
464
|
}, 8, ["model"])
|
|
866
465
|
]),
|
|
867
466
|
_: 1
|
|
868
|
-
}, 8, ["visible"
|
|
467
|
+
}, 8, ["visible"]));
|
|
869
468
|
}
|
|
870
|
-
},
|
|
469
|
+
}, En = /* @__PURE__ */ J(bn, [["__scopeId", "data-v-5033228a"]]), yn = {
|
|
871
470
|
components: {
|
|
872
|
-
BlockLinkEvent:
|
|
873
|
-
BindEventsDialog:
|
|
874
|
-
TinyPopover:
|
|
875
|
-
TinyButton:
|
|
876
|
-
IconChevronDown:
|
|
877
|
-
SvgButton:
|
|
878
|
-
AddEventsDialog:
|
|
471
|
+
BlockLinkEvent: Ze,
|
|
472
|
+
BindEventsDialog: vn,
|
|
473
|
+
TinyPopover: Ue,
|
|
474
|
+
TinyButton: G,
|
|
475
|
+
IconChevronDown: en(),
|
|
476
|
+
SvgButton: Ye,
|
|
477
|
+
AddEventsDialog: En
|
|
879
478
|
},
|
|
880
479
|
inheritAttrs: !1,
|
|
881
480
|
setup() {
|
|
882
|
-
const {
|
|
883
|
-
PLUGIN_NAME: l,
|
|
884
|
-
activePlugin: t
|
|
885
|
-
} = I(), {
|
|
886
|
-
pageState: o
|
|
887
|
-
} = x(), {
|
|
888
|
-
getBlockEvents: e,
|
|
889
|
-
getCurrentBlock: i,
|
|
890
|
-
removeEventLink: g
|
|
891
|
-
} = ce(), {
|
|
892
|
-
getMaterial: p
|
|
893
|
-
} = me(), {
|
|
894
|
-
confirm: s
|
|
895
|
-
} = pe(), r = ge.global.locale.value, {
|
|
896
|
-
highlightMethod: a
|
|
897
|
-
} = C(k.Page), {
|
|
898
|
-
commonEvents: u = {}
|
|
899
|
-
} = M("engine.setting.event").options, n = Ae({
|
|
481
|
+
const { PLUGIN_NAME: v, activePlugin: o } = ie(), { pageState: a } = L(), { getBlockEvents: e, getCurrentBlock: r, removeEventLink: _ } = $e(), { getMaterial: h } = Ke(), { confirm: c } = He(), p = Ge.global.locale.value, { highlightMethod: s } = Y(Z.Page), { commonEvents: x = {} } = De("engine.setting.event").options, n = K({
|
|
900
482
|
eventName: "",
|
|
901
483
|
// 事件名称
|
|
902
484
|
eventBinding: null,
|
|
903
485
|
// 事件绑定的处理方法对象
|
|
904
486
|
componentEvent: {},
|
|
905
|
-
customEvents:
|
|
487
|
+
customEvents: x,
|
|
906
488
|
bindActions: {},
|
|
907
489
|
showBindEventDialog: !1
|
|
908
|
-
}),
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
if (G.indexOf(Ee) > -1) {
|
|
920
|
-
const at = O[Ee], {
|
|
921
|
-
value: st,
|
|
922
|
-
params: Fe
|
|
923
|
-
} = at, lt = !Fe && ((je = (Ue = st.match(/\((.+)\)$/)) == null ? void 0 : Ue[1]) == null ? void 0 : je.split(",")) || Fe, de = {
|
|
924
|
-
eventName: Ee,
|
|
490
|
+
}), l = $(() => !!a.isBlock), i = $(() => Object.keys(n.bindActions).length === 0), d = $(() => ({ ...n.componentEvent, ...n.customEvents }));
|
|
491
|
+
Ve(() => {
|
|
492
|
+
var B, N, Q, ae, le;
|
|
493
|
+
const m = (B = a == null ? void 0 : a.currentSchema) == null ? void 0 : B.componentName, f = h(m);
|
|
494
|
+
n.componentEvent = ((Q = (N = f == null ? void 0 : f.content) == null ? void 0 : N.schema) == null ? void 0 : Q.events) || ((ae = f == null ? void 0 : f.schema) == null ? void 0 : ae.events) || {};
|
|
495
|
+
const C = ((le = a == null ? void 0 : a.currentSchema) == null ? void 0 : le.props) || {}, P = Object.keys(C);
|
|
496
|
+
n.bindActions = {}, Object.entries(d.value).forEach(([z, Be]) => {
|
|
497
|
+
var de, re, ce;
|
|
498
|
+
if (P.indexOf(z) > -1) {
|
|
499
|
+
const Me = C[z], { value: we, params: me } = Me, Le = !me && ((re = (de = we.match(/\((.+)\)$/)) == null ? void 0 : de[1]) == null ? void 0 : re.split(",")) || me, O = {
|
|
500
|
+
eventName: z,
|
|
925
501
|
ref: "",
|
|
926
|
-
event:
|
|
927
|
-
params:
|
|
502
|
+
event: C[z],
|
|
503
|
+
params: Le
|
|
928
504
|
};
|
|
929
|
-
if (
|
|
930
|
-
|
|
931
|
-
const
|
|
932
|
-
|
|
933
|
-
var
|
|
934
|
-
|
|
505
|
+
if (O.event.type === "JSExpression" && (O.ref = O.event.value.replace("this.", "").replace(/\(.*\)$/, "")), a.isBlock) {
|
|
506
|
+
O.metaEvent = Be;
|
|
507
|
+
const pe = e(r()), ue = (ce = a == null ? void 0 : a.currentSchema) == null ? void 0 : ce.id;
|
|
508
|
+
ue && pe && Object.entries(pe).forEach(([Oe, S]) => {
|
|
509
|
+
var ve, fe;
|
|
510
|
+
ue === ((ve = S == null ? void 0 : S.linked) == null ? void 0 : ve.id) && z === ((fe = S == null ? void 0 : S.linked) == null ? void 0 : fe.event) && (O.linked = S.linked, O.linkedEventName = Oe);
|
|
935
511
|
});
|
|
936
512
|
}
|
|
937
|
-
n.bindActions[
|
|
513
|
+
n.bindActions[z] = O;
|
|
938
514
|
}
|
|
939
515
|
});
|
|
940
516
|
});
|
|
941
|
-
const
|
|
942
|
-
|
|
943
|
-
}, {
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
state: n,
|
|
960
|
-
isBlock: c,
|
|
961
|
-
isEmpty: d,
|
|
962
|
-
renderEventList: m,
|
|
963
|
-
openActionDialog: f,
|
|
964
|
-
deleteAction: y,
|
|
965
|
-
delEvent: D,
|
|
966
|
-
openCodePanel: A,
|
|
967
|
-
handleToggleAddEventDialog: B,
|
|
968
|
-
handleAddEvent: b,
|
|
969
|
-
useModal: pe,
|
|
970
|
-
getMergeMeta: M,
|
|
971
|
-
useCanvas: x,
|
|
972
|
-
useLayout: I,
|
|
973
|
-
useBlock: ce,
|
|
974
|
-
useMaterial: me,
|
|
975
|
-
getMetaApi: C,
|
|
976
|
-
META_APP: k,
|
|
977
|
-
i18n: ge,
|
|
978
|
-
BlockLinkEvent: ue,
|
|
979
|
-
SvgButton: ve,
|
|
980
|
-
iconChevronDown: fe,
|
|
981
|
-
BindEventsDialog: _e,
|
|
982
|
-
openDialog: w,
|
|
983
|
-
AddEventsDialog: he
|
|
984
|
-
})
|
|
985
|
-
}), y = h((_) => {
|
|
986
|
-
var O;
|
|
987
|
-
Object.keys(((O = o == null ? void 0 : o.currentSchema) == null ? void 0 : O.props) || {}).indexOf(_.eventName) > -1 && delete o.currentSchema.props[_.eventName];
|
|
988
|
-
}, {
|
|
989
|
-
metaData: {
|
|
990
|
-
id: "engine.setting.event.deleteAction"
|
|
991
|
-
},
|
|
992
|
-
ctx: () => ({
|
|
993
|
-
PLUGIN_NAME: l,
|
|
994
|
-
activePlugin: t,
|
|
995
|
-
pageState: o,
|
|
996
|
-
getBlockEvents: e,
|
|
997
|
-
getCurrentBlock: i,
|
|
998
|
-
removeEventLink: g,
|
|
999
|
-
getMaterial: p,
|
|
1000
|
-
confirm: s,
|
|
1001
|
-
locale: r,
|
|
1002
|
-
highlightMethod: a,
|
|
1003
|
-
commonEvents: u,
|
|
1004
|
-
state: n,
|
|
1005
|
-
isBlock: c,
|
|
1006
|
-
isEmpty: d,
|
|
1007
|
-
renderEventList: m,
|
|
1008
|
-
openActionDialog: f,
|
|
1009
|
-
deleteAction: y,
|
|
1010
|
-
delEvent: D,
|
|
1011
|
-
openCodePanel: A,
|
|
1012
|
-
handleToggleAddEventDialog: B,
|
|
1013
|
-
handleAddEvent: b,
|
|
1014
|
-
useModal: pe,
|
|
1015
|
-
getMergeMeta: M,
|
|
1016
|
-
useCanvas: x,
|
|
1017
|
-
useLayout: I,
|
|
1018
|
-
useBlock: ce,
|
|
1019
|
-
useMaterial: me,
|
|
1020
|
-
getMetaApi: C,
|
|
1021
|
-
META_APP: k,
|
|
1022
|
-
i18n: ge,
|
|
1023
|
-
BlockLinkEvent: ue,
|
|
1024
|
-
SvgButton: ve,
|
|
1025
|
-
iconChevronDown: fe,
|
|
1026
|
-
BindEventsDialog: _e,
|
|
1027
|
-
openDialog: w,
|
|
1028
|
-
AddEventsDialog: he
|
|
1029
|
-
})
|
|
1030
|
-
}), D = h((_) => {
|
|
1031
|
-
s({
|
|
1032
|
-
title: "提示",
|
|
1033
|
-
message: `您确定要删除事件 ${_.eventName} 吗?`,
|
|
1034
|
-
exec() {
|
|
1035
|
-
o.isBlock && g({
|
|
1036
|
-
linked: _.linked
|
|
1037
|
-
}), y(_);
|
|
1038
|
-
}
|
|
1039
|
-
});
|
|
1040
|
-
}, {
|
|
1041
|
-
metaData: {
|
|
1042
|
-
id: "engine.setting.event.delEvent"
|
|
517
|
+
const E = (m, f) => {
|
|
518
|
+
f && n.bindActions[m.eventName] || (n.eventBinding = m, rn());
|
|
519
|
+
}, V = (m) => {
|
|
520
|
+
var C;
|
|
521
|
+
Object.keys(((C = a == null ? void 0 : a.currentSchema) == null ? void 0 : C.props) || {}).indexOf(m.eventName) > -1 && (delete a.currentSchema.props[m.eventName], qe().publish({ topic: "schemaChange", data: { props: a.currentSchema.props } }));
|
|
522
|
+
};
|
|
523
|
+
return {
|
|
524
|
+
state: n,
|
|
525
|
+
isBlock: l,
|
|
526
|
+
isEmpty: i,
|
|
527
|
+
delEvent: (m) => {
|
|
528
|
+
c({
|
|
529
|
+
title: "提示",
|
|
530
|
+
message: `您确定要删除事件 ${m.eventName} 吗?`,
|
|
531
|
+
exec() {
|
|
532
|
+
a.isBlock && _({ linked: m.linked }), V(m);
|
|
533
|
+
}
|
|
534
|
+
});
|
|
1043
535
|
},
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
getBlockEvents: e,
|
|
1049
|
-
getCurrentBlock: i,
|
|
1050
|
-
removeEventLink: g,
|
|
1051
|
-
getMaterial: p,
|
|
1052
|
-
confirm: s,
|
|
1053
|
-
locale: r,
|
|
1054
|
-
highlightMethod: a,
|
|
1055
|
-
commonEvents: u,
|
|
1056
|
-
state: n,
|
|
1057
|
-
isBlock: c,
|
|
1058
|
-
isEmpty: d,
|
|
1059
|
-
renderEventList: m,
|
|
1060
|
-
openActionDialog: f,
|
|
1061
|
-
deleteAction: y,
|
|
1062
|
-
delEvent: D,
|
|
1063
|
-
openCodePanel: A,
|
|
1064
|
-
handleToggleAddEventDialog: B,
|
|
1065
|
-
handleAddEvent: b,
|
|
1066
|
-
useModal: pe,
|
|
1067
|
-
getMergeMeta: M,
|
|
1068
|
-
useCanvas: x,
|
|
1069
|
-
useLayout: I,
|
|
1070
|
-
useBlock: ce,
|
|
1071
|
-
useMaterial: me,
|
|
1072
|
-
getMetaApi: C,
|
|
1073
|
-
META_APP: k,
|
|
1074
|
-
i18n: ge,
|
|
1075
|
-
BlockLinkEvent: ue,
|
|
1076
|
-
SvgButton: ve,
|
|
1077
|
-
iconChevronDown: fe,
|
|
1078
|
-
BindEventsDialog: _e,
|
|
1079
|
-
openDialog: w,
|
|
1080
|
-
AddEventsDialog: he
|
|
1081
|
-
})
|
|
1082
|
-
}), A = h((_) => {
|
|
1083
|
-
_ && t(l.Page).then(() => {
|
|
1084
|
-
a && a(_.ref);
|
|
1085
|
-
});
|
|
1086
|
-
}, {
|
|
1087
|
-
metaData: {
|
|
1088
|
-
id: "engine.setting.event.openCodePanel"
|
|
536
|
+
openCodePanel: (m) => {
|
|
537
|
+
m && o(v.Page).then(() => {
|
|
538
|
+
s && s(m.ref);
|
|
539
|
+
});
|
|
1089
540
|
},
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
openCodePanel: A,
|
|
1110
|
-
handleToggleAddEventDialog: B,
|
|
1111
|
-
handleAddEvent: b,
|
|
1112
|
-
useModal: pe,
|
|
1113
|
-
getMergeMeta: M,
|
|
1114
|
-
useCanvas: x,
|
|
1115
|
-
useLayout: I,
|
|
1116
|
-
useBlock: ce,
|
|
1117
|
-
useMaterial: me,
|
|
1118
|
-
getMetaApi: C,
|
|
1119
|
-
META_APP: k,
|
|
1120
|
-
i18n: ge,
|
|
1121
|
-
BlockLinkEvent: ue,
|
|
1122
|
-
SvgButton: ve,
|
|
1123
|
-
iconChevronDown: fe,
|
|
1124
|
-
BindEventsDialog: _e,
|
|
1125
|
-
openDialog: w,
|
|
1126
|
-
AddEventsDialog: he
|
|
1127
|
-
})
|
|
1128
|
-
}), B = h((_) => {
|
|
1129
|
-
n.showBindEventDialog = _;
|
|
1130
|
-
}, {
|
|
1131
|
-
metaData: {
|
|
1132
|
-
id: "engine.setting.event.handleToggleAddEventDialog"
|
|
541
|
+
openActionDialog: E,
|
|
542
|
+
handleAddEvent: (m) => {
|
|
543
|
+
const { eventName: f, eventDescription: C } = m;
|
|
544
|
+
Object.assign(n.customEvents, {
|
|
545
|
+
[f]: {
|
|
546
|
+
label: {
|
|
547
|
+
zh_CN: C
|
|
548
|
+
},
|
|
549
|
+
description: {
|
|
550
|
+
zh_CN: `${C}的回调函数`
|
|
551
|
+
},
|
|
552
|
+
type: "event",
|
|
553
|
+
functionInfo: {
|
|
554
|
+
params: [],
|
|
555
|
+
returns: {}
|
|
556
|
+
},
|
|
557
|
+
defaultValue: ""
|
|
558
|
+
}
|
|
559
|
+
}), n.showBindEventDialog = !1;
|
|
1133
560
|
},
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
activePlugin: t,
|
|
1137
|
-
pageState: o,
|
|
1138
|
-
getBlockEvents: e,
|
|
1139
|
-
getCurrentBlock: i,
|
|
1140
|
-
removeEventLink: g,
|
|
1141
|
-
getMaterial: p,
|
|
1142
|
-
confirm: s,
|
|
1143
|
-
locale: r,
|
|
1144
|
-
highlightMethod: a,
|
|
1145
|
-
commonEvents: u,
|
|
1146
|
-
state: n,
|
|
1147
|
-
isBlock: c,
|
|
1148
|
-
isEmpty: d,
|
|
1149
|
-
renderEventList: m,
|
|
1150
|
-
openActionDialog: f,
|
|
1151
|
-
deleteAction: y,
|
|
1152
|
-
delEvent: D,
|
|
1153
|
-
openCodePanel: A,
|
|
1154
|
-
handleToggleAddEventDialog: B,
|
|
1155
|
-
handleAddEvent: b,
|
|
1156
|
-
useModal: pe,
|
|
1157
|
-
getMergeMeta: M,
|
|
1158
|
-
useCanvas: x,
|
|
1159
|
-
useLayout: I,
|
|
1160
|
-
useBlock: ce,
|
|
1161
|
-
useMaterial: me,
|
|
1162
|
-
getMetaApi: C,
|
|
1163
|
-
META_APP: k,
|
|
1164
|
-
i18n: ge,
|
|
1165
|
-
BlockLinkEvent: ue,
|
|
1166
|
-
SvgButton: ve,
|
|
1167
|
-
iconChevronDown: fe,
|
|
1168
|
-
BindEventsDialog: _e,
|
|
1169
|
-
openDialog: w,
|
|
1170
|
-
AddEventsDialog: he
|
|
1171
|
-
})
|
|
1172
|
-
}), b = h((_) => {
|
|
1173
|
-
const {
|
|
1174
|
-
eventName: V,
|
|
1175
|
-
eventDescription: O
|
|
1176
|
-
} = _;
|
|
1177
|
-
Object.assign(n.customEvents, {
|
|
1178
|
-
[V]: {
|
|
1179
|
-
label: {
|
|
1180
|
-
zh_CN: O
|
|
1181
|
-
},
|
|
1182
|
-
description: {
|
|
1183
|
-
zh_CN: `${O}的回调函数`
|
|
1184
|
-
},
|
|
1185
|
-
type: "event",
|
|
1186
|
-
functionInfo: {
|
|
1187
|
-
params: [],
|
|
1188
|
-
returns: {}
|
|
1189
|
-
},
|
|
1190
|
-
defaultValue: ""
|
|
1191
|
-
}
|
|
1192
|
-
}), n.showBindEventDialog = !1;
|
|
1193
|
-
}, {
|
|
1194
|
-
metaData: {
|
|
1195
|
-
id: "engine.setting.event.handleAddEvent"
|
|
561
|
+
handleToggleAddEventDialog: (m) => {
|
|
562
|
+
n.showBindEventDialog = m;
|
|
1196
563
|
},
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
activePlugin: t,
|
|
1200
|
-
pageState: o,
|
|
1201
|
-
getBlockEvents: e,
|
|
1202
|
-
getCurrentBlock: i,
|
|
1203
|
-
removeEventLink: g,
|
|
1204
|
-
getMaterial: p,
|
|
1205
|
-
confirm: s,
|
|
1206
|
-
locale: r,
|
|
1207
|
-
highlightMethod: a,
|
|
1208
|
-
commonEvents: u,
|
|
1209
|
-
state: n,
|
|
1210
|
-
isBlock: c,
|
|
1211
|
-
isEmpty: d,
|
|
1212
|
-
renderEventList: m,
|
|
1213
|
-
openActionDialog: f,
|
|
1214
|
-
deleteAction: y,
|
|
1215
|
-
delEvent: D,
|
|
1216
|
-
openCodePanel: A,
|
|
1217
|
-
handleToggleAddEventDialog: B,
|
|
1218
|
-
handleAddEvent: b,
|
|
1219
|
-
useModal: pe,
|
|
1220
|
-
getMergeMeta: M,
|
|
1221
|
-
useCanvas: x,
|
|
1222
|
-
useLayout: I,
|
|
1223
|
-
useBlock: ce,
|
|
1224
|
-
useMaterial: me,
|
|
1225
|
-
getMetaApi: C,
|
|
1226
|
-
META_APP: k,
|
|
1227
|
-
i18n: ge,
|
|
1228
|
-
BlockLinkEvent: ue,
|
|
1229
|
-
SvgButton: ve,
|
|
1230
|
-
iconChevronDown: fe,
|
|
1231
|
-
BindEventsDialog: _e,
|
|
1232
|
-
openDialog: w,
|
|
1233
|
-
AddEventsDialog: he
|
|
1234
|
-
})
|
|
1235
|
-
});
|
|
1236
|
-
return {
|
|
1237
|
-
state: n,
|
|
1238
|
-
isBlock: c,
|
|
1239
|
-
isEmpty: d,
|
|
1240
|
-
delEvent: D,
|
|
1241
|
-
openCodePanel: A,
|
|
1242
|
-
openActionDialog: f,
|
|
1243
|
-
handleAddEvent: b,
|
|
1244
|
-
handleToggleAddEventDialog: B,
|
|
1245
|
-
renderEventList: m,
|
|
1246
|
-
locale: r
|
|
564
|
+
renderEventList: d,
|
|
565
|
+
locale: p
|
|
1247
566
|
};
|
|
1248
567
|
}
|
|
1249
|
-
},
|
|
1250
|
-
function
|
|
1251
|
-
const
|
|
1252
|
-
return
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
568
|
+
}, xn = { class: "bind-action-list" }, kn = { class: "popover-head" }, Cn = { class: "bind-event-list" }, Vn = ["onClick"], Nn = { class: "bind-actions" }, An = { class: "action-item bind-action-item" }, Dn = ["onClick"], In = { class: "event-bind" }, Pn = { class: "action-buttons" }, Bn = { class: "empty-action" }, Mn = { class: "icon" };
|
|
569
|
+
function wn(v, o, a, e, r, _) {
|
|
570
|
+
const h = k("icon-chevron-down"), c = k("tiny-button"), p = k("tiny-popover"), s = k("svg-icon"), x = k("block-link-event"), n = k("svg-button"), l = k("bind-events-dialog"), i = k("add-events-dialog");
|
|
571
|
+
return b(), A(H, null, [
|
|
572
|
+
t("div", xn, [
|
|
573
|
+
t("div", kn, [
|
|
574
|
+
u(p, {
|
|
1256
575
|
popperClass: "option-popper setting-advanced-bind-event-list",
|
|
1257
576
|
placement: "bottom-start",
|
|
1258
577
|
trigger: "hover",
|
|
@@ -1260,575 +579,316 @@ function Ot(l, t, o, e, i, g) {
|
|
|
1260
579
|
width: "256",
|
|
1261
580
|
"visible-arrow": !1
|
|
1262
581
|
}, {
|
|
1263
|
-
reference:
|
|
1264
|
-
|
|
1265
|
-
default:
|
|
1266
|
-
|
|
1267
|
-
|
|
582
|
+
reference: y(() => [
|
|
583
|
+
u(c, { class: "bind-event-btn" }, {
|
|
584
|
+
default: y(() => [
|
|
585
|
+
o[2] || (o[2] = t("span", null, "绑定事件", -1)),
|
|
586
|
+
u(h, { class: "icon-chevron-down bind-event-btn-icon" })
|
|
1268
587
|
]),
|
|
1269
588
|
_: 1
|
|
1270
589
|
})
|
|
1271
590
|
]),
|
|
1272
|
-
default:
|
|
1273
|
-
|
|
1274
|
-
(
|
|
1275
|
-
var
|
|
1276
|
-
return
|
|
1277
|
-
key:
|
|
1278
|
-
class:
|
|
1279
|
-
onClick: (
|
|
591
|
+
default: y(() => [
|
|
592
|
+
t("ul", Cn, [
|
|
593
|
+
(b(!0), A(H, null, ne(e.renderEventList, (d, E) => {
|
|
594
|
+
var V;
|
|
595
|
+
return b(), A("li", {
|
|
596
|
+
key: E,
|
|
597
|
+
class: R(["bind-event-list-item", { "bind-event-list-item-notallow": e.state.bindActions[E] }]),
|
|
598
|
+
onClick: (I) => e.openActionDialog({ eventName: E }, !0)
|
|
1280
599
|
}, [
|
|
1281
|
-
|
|
1282
|
-
], 10,
|
|
600
|
+
t("div", null, M(E) + " | " + M(((V = d == null ? void 0 : d.label) == null ? void 0 : V[e.locale]) || E), 1)
|
|
601
|
+
], 10, Vn);
|
|
1283
602
|
}), 128))
|
|
1284
603
|
])
|
|
1285
604
|
]),
|
|
1286
605
|
_: 1
|
|
1287
606
|
}),
|
|
1288
|
-
|
|
607
|
+
u(c, {
|
|
1289
608
|
class: "title add-custom-event-button bind-action-button-item",
|
|
1290
|
-
onClick:
|
|
609
|
+
onClick: o[0] || (o[0] = (d) => e.handleToggleAddEventDialog(!0))
|
|
1291
610
|
}, {
|
|
1292
|
-
default:
|
|
1293
|
-
|
|
611
|
+
default: y(() => [
|
|
612
|
+
u(s, {
|
|
1294
613
|
name: "add",
|
|
1295
614
|
class: "custom-event-button-icon"
|
|
1296
615
|
}),
|
|
1297
|
-
|
|
616
|
+
o[3] || (o[3] = t("span", { class: "custom-event-button-text" }, "添加新事件", -1))
|
|
1298
617
|
]),
|
|
1299
618
|
_: 1
|
|
1300
619
|
})
|
|
1301
620
|
]),
|
|
1302
|
-
|
|
1303
|
-
(
|
|
1304
|
-
var
|
|
1305
|
-
return
|
|
1306
|
-
key:
|
|
621
|
+
_e(t("ul", Nn, [
|
|
622
|
+
(b(!0), A(H, null, ne(e.state.bindActions, (d) => {
|
|
623
|
+
var E, V;
|
|
624
|
+
return b(), A("li", {
|
|
625
|
+
key: d.eventName
|
|
1307
626
|
}, [
|
|
1308
|
-
|
|
1309
|
-
|
|
627
|
+
t("div", An, [
|
|
628
|
+
t("div", {
|
|
1310
629
|
class: "binding-name",
|
|
1311
|
-
onClick: (
|
|
630
|
+
onClick: (I) => e.openActionDialog(d)
|
|
1312
631
|
}, [
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
632
|
+
t("div", null, [
|
|
633
|
+
j(M(d.eventName), 1),
|
|
634
|
+
t("span", null, M((V = (E = e.renderEventList[d.eventName]) == null ? void 0 : E.label) == null ? void 0 : V[e.locale]), 1)
|
|
1316
635
|
]),
|
|
1317
|
-
|
|
1318
|
-
class:
|
|
1319
|
-
},
|
|
1320
|
-
|
|
1321
|
-
], 8,
|
|
1322
|
-
|
|
1323
|
-
e.isBlock ? (
|
|
636
|
+
t("div", {
|
|
637
|
+
class: R({ linked: d.linked })
|
|
638
|
+
}, M(d.linkedEventName), 3),
|
|
639
|
+
t("span", In, M(d.ref), 1)
|
|
640
|
+
], 8, Dn),
|
|
641
|
+
t("div", Pn, [
|
|
642
|
+
e.isBlock ? (b(), w(x, {
|
|
1324
643
|
key: 0,
|
|
1325
|
-
data:
|
|
1326
|
-
}, null, 8, ["data"])) :
|
|
1327
|
-
|
|
644
|
+
data: d
|
|
645
|
+
}, null, 8, ["data"])) : q("", !0),
|
|
646
|
+
u(n, {
|
|
1328
647
|
name: "plugin-icon-page-schema",
|
|
1329
648
|
tips: "定位到代码",
|
|
1330
649
|
placement: "top",
|
|
1331
650
|
hoverBgColor: !1,
|
|
1332
|
-
onClick: (
|
|
651
|
+
onClick: (I) => e.openCodePanel(d)
|
|
1333
652
|
}, null, 8, ["onClick"]),
|
|
1334
|
-
|
|
653
|
+
u(n, {
|
|
1335
654
|
name: "setting",
|
|
1336
655
|
hoverBgColor: !1,
|
|
1337
|
-
onClick: (
|
|
656
|
+
onClick: (I) => e.openActionDialog(d, !1)
|
|
1338
657
|
}, null, 8, ["onClick"]),
|
|
1339
|
-
|
|
658
|
+
u(n, {
|
|
1340
659
|
name: "delete",
|
|
1341
660
|
hoverBgColor: !1,
|
|
1342
|
-
onClick: (
|
|
661
|
+
onClick: (I) => e.delEvent(d)
|
|
1343
662
|
}, null, 8, ["onClick"])
|
|
1344
663
|
])
|
|
1345
664
|
])
|
|
1346
665
|
]);
|
|
1347
666
|
}), 128))
|
|
1348
667
|
], 512), [
|
|
1349
|
-
[
|
|
668
|
+
[he, !e.isEmpty]
|
|
1350
669
|
]),
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
670
|
+
_e(t("div", Bn, [
|
|
671
|
+
t("div", Mn, [
|
|
672
|
+
u(s, {
|
|
1354
673
|
name: "empty-action",
|
|
1355
674
|
class: "empty-action-icon"
|
|
1356
675
|
})
|
|
1357
676
|
]),
|
|
1358
|
-
|
|
677
|
+
o[4] || (o[4] = t("div", { class: "center" }, "支持添加原生DOM事件,然后点击 绑定事件 为画布所选元素增加事件", -1))
|
|
1359
678
|
], 512), [
|
|
1360
|
-
[
|
|
679
|
+
[he, e.isEmpty]
|
|
1361
680
|
])
|
|
1362
681
|
]),
|
|
1363
|
-
|
|
682
|
+
u(l, {
|
|
1364
683
|
eventBinding: e.state.eventBinding
|
|
1365
684
|
}, null, 8, ["eventBinding"]),
|
|
1366
|
-
|
|
685
|
+
u(i, {
|
|
1367
686
|
visible: e.state.showBindEventDialog,
|
|
1368
687
|
componentEvents: e.renderEventList,
|
|
1369
|
-
onCloseDialog:
|
|
688
|
+
onCloseDialog: o[1] || (o[1] = (d) => e.handleToggleAddEventDialog(!1)),
|
|
1370
689
|
onAddEvent: e.handleAddEvent
|
|
1371
690
|
}, null, 8, ["visible", "componentEvents", "onAddEvent"])
|
|
1372
691
|
], 64);
|
|
1373
692
|
}
|
|
1374
|
-
const
|
|
1375
|
-
DEFAULT_LOOP_NAME: F
|
|
1376
|
-
} = se, {
|
|
1377
|
-
string2Obj: ie
|
|
1378
|
-
} = le, Tt = {
|
|
693
|
+
const Ln = /* @__PURE__ */ J(yn, [["render", wn], ["__scopeId", "data-v-3bfab6f4"]]), { DEFAULT_LOOP_NAME: U } = ln, { string2Obj: On } = dn, Sn = {
|
|
1379
694
|
components: {
|
|
1380
|
-
SwitchConfigurator:
|
|
1381
|
-
TinyTooltip:
|
|
1382
|
-
VariableConfigurator:
|
|
1383
|
-
InputConfigurator:
|
|
1384
|
-
CodeConfigurator:
|
|
695
|
+
SwitchConfigurator: an,
|
|
696
|
+
TinyTooltip: je,
|
|
697
|
+
VariableConfigurator: sn,
|
|
698
|
+
InputConfigurator: tn,
|
|
699
|
+
CodeConfigurator: on
|
|
1385
700
|
},
|
|
1386
701
|
inheritAttrs: !1,
|
|
1387
702
|
setup() {
|
|
1388
|
-
const {
|
|
1389
|
-
pageState: l
|
|
1390
|
-
} = x(), t = ke(!1), o = Ne(() => {
|
|
703
|
+
const { pageState: v } = L(), o = F(!1), a = $(() => {
|
|
1391
704
|
var n;
|
|
1392
|
-
return ((n =
|
|
1393
|
-
}), e =
|
|
1394
|
-
var n,
|
|
1395
|
-
return ((
|
|
1396
|
-
}, {
|
|
1397
|
-
metaData: {
|
|
1398
|
-
id: "engine.setting.event.getIndexName"
|
|
1399
|
-
},
|
|
1400
|
-
ctx: () => ({
|
|
1401
|
-
pageState: l,
|
|
1402
|
-
condition: t,
|
|
1403
|
-
isBind: o,
|
|
1404
|
-
getIndexName: e,
|
|
1405
|
-
state: i,
|
|
1406
|
-
setLoopKey: g,
|
|
1407
|
-
openEditor: p,
|
|
1408
|
-
setConfig: s,
|
|
1409
|
-
setLoopIndex: r,
|
|
1410
|
-
setLoop: a,
|
|
1411
|
-
setLoopItem: u,
|
|
1412
|
-
CodeConfigurator: ee,
|
|
1413
|
-
InputConfigurator: te,
|
|
1414
|
-
SwitchConfigurator: oe,
|
|
1415
|
-
VariableConfigurator: ne,
|
|
1416
|
-
useProperties: z,
|
|
1417
|
-
useCanvas: x,
|
|
1418
|
-
PROP_DATA_TYPE: q,
|
|
1419
|
-
constants: se,
|
|
1420
|
-
utils: le,
|
|
1421
|
-
DEFAULT_LOOP_NAME: F,
|
|
1422
|
-
string2Obj: ie
|
|
1423
|
-
})
|
|
1424
|
-
}), i = Ae({
|
|
705
|
+
return ((n = o.value) == null ? void 0 : n.type) === X.JSEXPRESSION;
|
|
706
|
+
}), e = () => {
|
|
707
|
+
var n, l;
|
|
708
|
+
return ((l = (n = T().getSchema()) == null ? void 0 : n.loopArgs) == null ? void 0 : l[1]) || U.INDEX;
|
|
709
|
+
}, r = K({
|
|
1425
710
|
loopData: {
|
|
1426
|
-
type:
|
|
711
|
+
type: X.JSEXPRESSION,
|
|
1427
712
|
value: "[]"
|
|
1428
713
|
},
|
|
1429
714
|
loopItem: "item",
|
|
1430
715
|
loopIndex: "index",
|
|
1431
|
-
isLoop:
|
|
716
|
+
isLoop: $(() => {
|
|
1432
717
|
var n;
|
|
1433
|
-
return ((n =
|
|
718
|
+
return ((n = r.loopData) == null ? void 0 : n.type) === X.JSEXPRESSION;
|
|
1434
719
|
}),
|
|
1435
720
|
loopKey: "",
|
|
1436
721
|
shouldUpdate: !1
|
|
1437
722
|
});
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
723
|
+
be(
|
|
724
|
+
() => [v == null ? void 0 : v.currentSchema, r.shouldUpdate],
|
|
725
|
+
([n]) => {
|
|
726
|
+
var l, i, d, E;
|
|
727
|
+
o.value = (n == null ? void 0 : n.condition) === void 0 ? !0 : n == null ? void 0 : n.condition, r.loopData = n == null ? void 0 : n.loop, r.loopItem = ((l = n == null ? void 0 : n.loopArgs) == null ? void 0 : l[0]) || "", r.loopIndex = ((i = n == null ? void 0 : n.loopArgs) == null ? void 0 : i[1]) || "", r.loopKey = ((E = (d = n == null ? void 0 : n.props) == null ? void 0 : d.key) == null ? void 0 : E.value) || "";
|
|
728
|
+
}
|
|
729
|
+
);
|
|
730
|
+
const _ = (n = "") => {
|
|
731
|
+
var I;
|
|
1444
732
|
n = n.replace(/\s*/g, "");
|
|
1445
|
-
const {
|
|
1446
|
-
|
|
1447
|
-
setProp: d
|
|
1448
|
-
} = z(), m = c();
|
|
1449
|
-
if (!m)
|
|
733
|
+
const { getSchema: l, setProp: i } = T(), d = l();
|
|
734
|
+
if (!d)
|
|
1450
735
|
return;
|
|
1451
|
-
const
|
|
1452
|
-
let
|
|
1453
|
-
n && !
|
|
1454
|
-
type:
|
|
736
|
+
const E = Number(n).toString() !== "NaN";
|
|
737
|
+
let V = (I = d.props) == null ? void 0 : I.key;
|
|
738
|
+
n && !E && (V = {
|
|
739
|
+
type: X.JSEXPRESSION,
|
|
1455
740
|
value: n
|
|
1456
|
-
}), n || (
|
|
1457
|
-
type:
|
|
741
|
+
}), n || (r.isLoop ? V = {
|
|
742
|
+
type: X.JSEXPRESSION,
|
|
1458
743
|
value: e()
|
|
1459
|
-
} :
|
|
1460
|
-
}
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
},
|
|
1464
|
-
ctx: () => ({
|
|
1465
|
-
pageState: l,
|
|
1466
|
-
condition: t,
|
|
1467
|
-
isBind: o,
|
|
1468
|
-
getIndexName: e,
|
|
1469
|
-
state: i,
|
|
1470
|
-
setLoopKey: g,
|
|
1471
|
-
openEditor: p,
|
|
1472
|
-
setConfig: s,
|
|
1473
|
-
setLoopIndex: r,
|
|
1474
|
-
setLoop: a,
|
|
1475
|
-
setLoopItem: u,
|
|
1476
|
-
CodeConfigurator: ee,
|
|
1477
|
-
InputConfigurator: te,
|
|
1478
|
-
SwitchConfigurator: oe,
|
|
1479
|
-
VariableConfigurator: ne,
|
|
1480
|
-
useProperties: z,
|
|
1481
|
-
useCanvas: x,
|
|
1482
|
-
PROP_DATA_TYPE: q,
|
|
1483
|
-
constants: se,
|
|
1484
|
-
utils: le,
|
|
1485
|
-
DEFAULT_LOOP_NAME: F,
|
|
1486
|
-
string2Obj: ie
|
|
1487
|
-
})
|
|
1488
|
-
});
|
|
1489
|
-
Ge([() => i.isLoop, () => i.loopIndex], () => {
|
|
1490
|
-
!i.loopKey && i.isLoop && g(e()), i.isLoop || g("");
|
|
744
|
+
} : V = ""), i("key", V);
|
|
745
|
+
};
|
|
746
|
+
be([() => r.isLoop, () => r.loopIndex], () => {
|
|
747
|
+
!r.loopKey && r.isLoop && _(e()), r.isLoop || _("");
|
|
1491
748
|
});
|
|
1492
|
-
const
|
|
749
|
+
const h = () => {
|
|
1493
750
|
var n;
|
|
1494
|
-
|
|
1495
|
-
}, {
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
},
|
|
1499
|
-
ctx: () => ({
|
|
1500
|
-
pageState: l,
|
|
1501
|
-
condition: t,
|
|
1502
|
-
isBind: o,
|
|
1503
|
-
getIndexName: e,
|
|
1504
|
-
state: i,
|
|
1505
|
-
setLoopKey: g,
|
|
1506
|
-
openEditor: p,
|
|
1507
|
-
setConfig: s,
|
|
1508
|
-
setLoopIndex: r,
|
|
1509
|
-
setLoop: a,
|
|
1510
|
-
setLoopItem: u,
|
|
1511
|
-
CodeConfigurator: ee,
|
|
1512
|
-
InputConfigurator: te,
|
|
1513
|
-
SwitchConfigurator: oe,
|
|
1514
|
-
VariableConfigurator: ne,
|
|
1515
|
-
useProperties: z,
|
|
1516
|
-
useCanvas: x,
|
|
1517
|
-
PROP_DATA_TYPE: q,
|
|
1518
|
-
constants: se,
|
|
1519
|
-
utils: le,
|
|
1520
|
-
DEFAULT_LOOP_NAME: F,
|
|
1521
|
-
string2Obj: ie
|
|
1522
|
-
})
|
|
1523
|
-
}), s = h((n) => {
|
|
1524
|
-
const {
|
|
1525
|
-
getSchema: c
|
|
1526
|
-
} = z(), d = c();
|
|
1527
|
-
if (!d)
|
|
751
|
+
r.loopData = (n = T().getSchema()) == null ? void 0 : n.loop;
|
|
752
|
+
}, c = (n) => {
|
|
753
|
+
const { getSchema: l } = T(), i = l();
|
|
754
|
+
if (!i)
|
|
1528
755
|
return;
|
|
1529
|
-
const {
|
|
1530
|
-
operateNode: m
|
|
1531
|
-
} = x();
|
|
756
|
+
const { operateNode: d } = L();
|
|
1532
757
|
if (n === !1 || n != null && n.type)
|
|
1533
|
-
|
|
1534
|
-
type: "updateAttributes",
|
|
1535
|
-
id: d.id,
|
|
1536
|
-
value: {
|
|
1537
|
-
condition: n
|
|
1538
|
-
}
|
|
1539
|
-
});
|
|
758
|
+
d({ type: "updateAttributes", id: i.id, value: { condition: n } });
|
|
1540
759
|
else {
|
|
1541
|
-
const {
|
|
1542
|
-
|
|
1543
|
-
children: y,
|
|
1544
|
-
...D
|
|
1545
|
-
} = d;
|
|
1546
|
-
m({
|
|
1547
|
-
type: "updateAttributes",
|
|
1548
|
-
id: d.id,
|
|
1549
|
-
value: {
|
|
1550
|
-
...D
|
|
1551
|
-
},
|
|
1552
|
-
overwrite: !0
|
|
1553
|
-
});
|
|
760
|
+
const { condition: E, children: V, ...I } = i;
|
|
761
|
+
d({ type: "updateAttributes", id: i.id, value: { ...I }, overwrite: !0 });
|
|
1554
762
|
}
|
|
1555
|
-
|
|
1556
|
-
}, {
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
}
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
useProperties: z,
|
|
1577
|
-
useCanvas: x,
|
|
1578
|
-
PROP_DATA_TYPE: q,
|
|
1579
|
-
constants: se,
|
|
1580
|
-
utils: le,
|
|
1581
|
-
DEFAULT_LOOP_NAME: F,
|
|
1582
|
-
string2Obj: ie
|
|
1583
|
-
})
|
|
1584
|
-
}), r = h((n) => {
|
|
1585
|
-
const c = z().getSchema();
|
|
1586
|
-
let d = c.loopArgs;
|
|
1587
|
-
const {
|
|
1588
|
-
operateNode: m
|
|
1589
|
-
} = x();
|
|
1590
|
-
d ? d[1] = n || F.INDEX : d = [F.ITEM, n], m({
|
|
1591
|
-
type: "updateAttributes",
|
|
1592
|
-
id: c.id,
|
|
1593
|
-
value: {
|
|
1594
|
-
loopArgs: d
|
|
763
|
+
L().canvasApi.value.updateRect(), o.value = n;
|
|
764
|
+
}, p = (n) => {
|
|
765
|
+
const l = T().getSchema();
|
|
766
|
+
let i = l.loopArgs;
|
|
767
|
+
const { operateNode: d } = L();
|
|
768
|
+
i ? i[1] = n || U.INDEX : i = [U.ITEM, n], d({ type: "updateAttributes", id: l.id, value: { loopArgs: i } });
|
|
769
|
+
};
|
|
770
|
+
return {
|
|
771
|
+
condition: o,
|
|
772
|
+
setConfig: c,
|
|
773
|
+
isBind: a,
|
|
774
|
+
state: r,
|
|
775
|
+
setLoop: (n) => {
|
|
776
|
+
const { operateNode: l } = L(), { getSchema: i } = T(), d = i();
|
|
777
|
+
if (n) {
|
|
778
|
+
const E = n != null && n.type ? n : On(n);
|
|
779
|
+
l({ type: "updateAttributes", id: d.id, value: { loop: E } }), p(U.INDEX);
|
|
780
|
+
} else {
|
|
781
|
+
_();
|
|
782
|
+
const { loop: E, loopArgs: V, children: I, ...W } = d;
|
|
783
|
+
l({ type: "updateAttributes", id: d.id, value: W, overwrite: !0 });
|
|
1595
784
|
}
|
|
1596
|
-
|
|
1597
|
-
}, {
|
|
1598
|
-
metaData: {
|
|
1599
|
-
id: "engine.setting.event.setLoopIndex"
|
|
785
|
+
r.shouldUpdate = !r.shouldUpdate;
|
|
1600
786
|
},
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
state: i,
|
|
1607
|
-
setLoopKey: g,
|
|
1608
|
-
openEditor: p,
|
|
1609
|
-
setConfig: s,
|
|
1610
|
-
setLoopIndex: r,
|
|
1611
|
-
setLoop: a,
|
|
1612
|
-
setLoopItem: u,
|
|
1613
|
-
CodeConfigurator: ee,
|
|
1614
|
-
InputConfigurator: te,
|
|
1615
|
-
SwitchConfigurator: oe,
|
|
1616
|
-
VariableConfigurator: ne,
|
|
1617
|
-
useProperties: z,
|
|
1618
|
-
useCanvas: x,
|
|
1619
|
-
PROP_DATA_TYPE: q,
|
|
1620
|
-
constants: se,
|
|
1621
|
-
utils: le,
|
|
1622
|
-
DEFAULT_LOOP_NAME: F,
|
|
1623
|
-
string2Obj: ie
|
|
1624
|
-
})
|
|
1625
|
-
}), a = h((n) => {
|
|
1626
|
-
const {
|
|
1627
|
-
operateNode: c
|
|
1628
|
-
} = x(), {
|
|
1629
|
-
getSchema: d
|
|
1630
|
-
} = z(), m = d();
|
|
1631
|
-
if (n) {
|
|
1632
|
-
const f = n != null && n.type ? n : ie(n);
|
|
1633
|
-
c({
|
|
1634
|
-
type: "updateAttributes",
|
|
1635
|
-
id: m.id,
|
|
1636
|
-
value: {
|
|
1637
|
-
loop: f
|
|
1638
|
-
}
|
|
1639
|
-
}), r(F.INDEX);
|
|
1640
|
-
} else {
|
|
1641
|
-
g();
|
|
1642
|
-
const {
|
|
1643
|
-
loop: f,
|
|
1644
|
-
loopArgs: y,
|
|
1645
|
-
children: D,
|
|
1646
|
-
...A
|
|
1647
|
-
} = m;
|
|
1648
|
-
c({
|
|
1649
|
-
type: "updateAttributes",
|
|
1650
|
-
id: m.id,
|
|
1651
|
-
value: A,
|
|
1652
|
-
overwrite: !0
|
|
1653
|
-
});
|
|
1654
|
-
}
|
|
1655
|
-
i.shouldUpdate = !i.shouldUpdate;
|
|
1656
|
-
}, {
|
|
1657
|
-
metaData: {
|
|
1658
|
-
id: "engine.setting.event.setLoop"
|
|
787
|
+
setLoopItem: (n) => {
|
|
788
|
+
const l = T().getSchema();
|
|
789
|
+
let i = l.loopArgs;
|
|
790
|
+
const { operateNode: d } = L();
|
|
791
|
+
i ? i[0] = n || U.ITEM : i = [n, U.INDEX], d({ type: "updateAttributes", id: l.id, value: { loopArgs: i } });
|
|
1659
792
|
},
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
getIndexName: e,
|
|
1665
|
-
state: i,
|
|
1666
|
-
setLoopKey: g,
|
|
1667
|
-
openEditor: p,
|
|
1668
|
-
setConfig: s,
|
|
1669
|
-
setLoopIndex: r,
|
|
1670
|
-
setLoop: a,
|
|
1671
|
-
setLoopItem: u,
|
|
1672
|
-
CodeConfigurator: ee,
|
|
1673
|
-
InputConfigurator: te,
|
|
1674
|
-
SwitchConfigurator: oe,
|
|
1675
|
-
VariableConfigurator: ne,
|
|
1676
|
-
useProperties: z,
|
|
1677
|
-
useCanvas: x,
|
|
1678
|
-
PROP_DATA_TYPE: q,
|
|
1679
|
-
constants: se,
|
|
1680
|
-
utils: le,
|
|
1681
|
-
DEFAULT_LOOP_NAME: F,
|
|
1682
|
-
string2Obj: ie
|
|
1683
|
-
})
|
|
1684
|
-
}), u = h((n) => {
|
|
1685
|
-
const c = z().getSchema();
|
|
1686
|
-
let d = c.loopArgs;
|
|
1687
|
-
const {
|
|
1688
|
-
operateNode: m
|
|
1689
|
-
} = x();
|
|
1690
|
-
d ? d[0] = n || F.ITEM : d = [n, F.INDEX], m({
|
|
1691
|
-
type: "updateAttributes",
|
|
1692
|
-
id: c.id,
|
|
1693
|
-
value: {
|
|
1694
|
-
loopArgs: d
|
|
1695
|
-
}
|
|
1696
|
-
});
|
|
1697
|
-
}, {
|
|
1698
|
-
metaData: {
|
|
1699
|
-
id: "engine.setting.event.setLoopItem"
|
|
1700
|
-
},
|
|
1701
|
-
ctx: () => ({
|
|
1702
|
-
pageState: l,
|
|
1703
|
-
condition: t,
|
|
1704
|
-
isBind: o,
|
|
1705
|
-
getIndexName: e,
|
|
1706
|
-
state: i,
|
|
1707
|
-
setLoopKey: g,
|
|
1708
|
-
openEditor: p,
|
|
1709
|
-
setConfig: s,
|
|
1710
|
-
setLoopIndex: r,
|
|
1711
|
-
setLoop: a,
|
|
1712
|
-
setLoopItem: u,
|
|
1713
|
-
CodeConfigurator: ee,
|
|
1714
|
-
InputConfigurator: te,
|
|
1715
|
-
SwitchConfigurator: oe,
|
|
1716
|
-
VariableConfigurator: ne,
|
|
1717
|
-
useProperties: z,
|
|
1718
|
-
useCanvas: x,
|
|
1719
|
-
PROP_DATA_TYPE: q,
|
|
1720
|
-
constants: se,
|
|
1721
|
-
utils: le,
|
|
1722
|
-
DEFAULT_LOOP_NAME: F,
|
|
1723
|
-
string2Obj: ie
|
|
1724
|
-
})
|
|
1725
|
-
});
|
|
1726
|
-
return {
|
|
1727
|
-
condition: t,
|
|
1728
|
-
setConfig: s,
|
|
1729
|
-
isBind: o,
|
|
1730
|
-
state: i,
|
|
1731
|
-
setLoop: a,
|
|
1732
|
-
setLoopItem: u,
|
|
1733
|
-
DEFAULT_LOOP_NAME: F,
|
|
1734
|
-
openEditor: p,
|
|
1735
|
-
setLoopIndex: r,
|
|
1736
|
-
setLoopKey: g,
|
|
793
|
+
DEFAULT_LOOP_NAME: U,
|
|
794
|
+
openEditor: h,
|
|
795
|
+
setLoopIndex: p,
|
|
796
|
+
setLoopKey: _,
|
|
1737
797
|
getIndexName: e
|
|
1738
798
|
};
|
|
1739
799
|
}
|
|
1740
|
-
},
|
|
1741
|
-
function
|
|
1742
|
-
var n,
|
|
1743
|
-
const
|
|
1744
|
-
return
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
e.isBind ? (
|
|
800
|
+
}, Tn = { class: "advanced-config-container" }, Un = { class: "advnce-config" }, jn = { class: "advanced-config-form-item" }, zn = ["title"], Rn = { class: "advnce-config loop-data-item" }, Fn = { class: "advanced-config-form-item" }, Jn = ["title"], Xn = { class: "advnce-config" }, $n = { class: "advanced-config-form-item" }, Kn = { class: "advnce-config" }, Hn = { class: "advanced-config-form-item" }, qn = { class: "advnce-config" }, Gn = { class: "advanced-config-form-item" };
|
|
801
|
+
function Yn(v, o, a, e, r, _) {
|
|
802
|
+
var n, l;
|
|
803
|
+
const h = k("switch-configurator"), c = k("variable-configurator"), p = k("code-configurator"), s = k("input-configurator"), x = k("tiny-tooltip");
|
|
804
|
+
return b(), A("div", Tn, [
|
|
805
|
+
t("div", Un, [
|
|
806
|
+
o[6] || (o[6] = t("label", { class: "text-ellipsis-multiple" }, "是否渲染", -1)),
|
|
807
|
+
t("div", jn, [
|
|
808
|
+
e.isBind ? (b(), A("div", {
|
|
1749
809
|
key: 1,
|
|
1750
810
|
class: "binding-state text-ellipsis-multiple",
|
|
1751
811
|
title: e.condition.value
|
|
1752
|
-
}, " 已绑定:" +
|
|
812
|
+
}, " 已绑定:" + M(e.condition.value), 9, zn)) : (b(), w(h, {
|
|
1753
813
|
key: 0,
|
|
1754
814
|
modelValue: e.condition,
|
|
1755
815
|
"onUpdate:modelValue": e.setConfig
|
|
1756
816
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])),
|
|
1757
|
-
|
|
817
|
+
u(c, {
|
|
1758
818
|
modelValue: e.condition,
|
|
1759
819
|
"onUpdate:modelValue": [
|
|
1760
|
-
|
|
820
|
+
o[0] || (o[0] = (i) => e.condition = i),
|
|
1761
821
|
e.setConfig
|
|
1762
822
|
],
|
|
1763
823
|
name: "advance"
|
|
1764
824
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
1765
825
|
])
|
|
1766
826
|
]),
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
e.state.isLoop ? (
|
|
827
|
+
t("div", Rn, [
|
|
828
|
+
o[7] || (o[7] = t("label", { class: "text-ellipsis-multiple" }, "循环数据", -1)),
|
|
829
|
+
t("div", Fn, [
|
|
830
|
+
e.state.isLoop ? (b(), A("div", {
|
|
1771
831
|
key: 1,
|
|
1772
832
|
class: "binding-state text-ellipsis-multiple",
|
|
1773
833
|
title: (n = e.state.loopData) == null ? void 0 : n.value
|
|
1774
|
-
}, " 已绑定:" +
|
|
834
|
+
}, " 已绑定:" + M((l = e.state.loopData) == null ? void 0 : l.value), 9, Jn)) : (b(), w(p, {
|
|
1775
835
|
key: 0,
|
|
1776
836
|
modelValue: e.state.loopData,
|
|
1777
837
|
"onUpdate:modelValue": [
|
|
1778
|
-
|
|
838
|
+
o[1] || (o[1] = (i) => e.state.loopData = i),
|
|
1779
839
|
e.setLoop
|
|
1780
840
|
],
|
|
1781
841
|
"data-type": "JSExpression",
|
|
1782
842
|
onOpen: e.openEditor
|
|
1783
843
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onOpen"])),
|
|
1784
|
-
|
|
844
|
+
u(c, {
|
|
1785
845
|
modelValue: e.state.loopData,
|
|
1786
846
|
"onUpdate:modelValue": [
|
|
1787
|
-
|
|
847
|
+
o[2] || (o[2] = (i) => e.state.loopData = i),
|
|
1788
848
|
e.setLoop
|
|
1789
849
|
],
|
|
1790
850
|
name: "advance"
|
|
1791
851
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
1792
852
|
])
|
|
1793
853
|
]),
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
854
|
+
t("div", Xn, [
|
|
855
|
+
o[8] || (o[8] = t("label", { class: "text-ellipsis-multiple" }, "迭代变量名", -1)),
|
|
856
|
+
t("div", $n, [
|
|
857
|
+
u(s, {
|
|
1798
858
|
modelValue: e.state.loopItem,
|
|
1799
859
|
"onUpdate:modelValue": [
|
|
1800
|
-
|
|
860
|
+
o[3] || (o[3] = (i) => e.state.loopItem = i),
|
|
1801
861
|
e.setLoopItem
|
|
1802
862
|
],
|
|
1803
863
|
placeholder: `默认值为:${e.DEFAULT_LOOP_NAME.ITEM}`
|
|
1804
864
|
}, null, 8, ["modelValue", "placeholder", "onUpdate:modelValue"])
|
|
1805
865
|
])
|
|
1806
866
|
]),
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
867
|
+
t("div", Kn, [
|
|
868
|
+
o[9] || (o[9] = t("label", { class: "text-ellipsis-multiple" }, "索引变量名", -1)),
|
|
869
|
+
t("div", Hn, [
|
|
870
|
+
u(s, {
|
|
1811
871
|
modelValue: e.state.loopIndex,
|
|
1812
872
|
"onUpdate:modelValue": [
|
|
1813
|
-
|
|
873
|
+
o[4] || (o[4] = (i) => e.state.loopIndex = i),
|
|
1814
874
|
e.setLoopIndex
|
|
1815
875
|
],
|
|
1816
876
|
placeholder: `默认值为:${e.DEFAULT_LOOP_NAME.INDEX}`
|
|
1817
877
|
}, null, 8, ["modelValue", "placeholder", "onUpdate:modelValue"])
|
|
1818
878
|
])
|
|
1819
879
|
]),
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
880
|
+
t("div", qn, [
|
|
881
|
+
o[10] || (o[10] = t("label", { class: "text-ellipsis-multiple" }, "key", -1)),
|
|
882
|
+
t("div", Gn, [
|
|
883
|
+
u(x, {
|
|
1824
884
|
content: "建议填写循环项中的唯一值(如item.id),如果填写为数字将不保存",
|
|
1825
885
|
effect: "light"
|
|
1826
886
|
}, {
|
|
1827
|
-
default:
|
|
1828
|
-
|
|
887
|
+
default: y(() => [
|
|
888
|
+
u(s, {
|
|
1829
889
|
modelValue: e.state.loopKey,
|
|
1830
890
|
"onUpdate:modelValue": [
|
|
1831
|
-
|
|
891
|
+
o[5] || (o[5] = (i) => e.state.loopKey = i),
|
|
1832
892
|
e.setLoopKey
|
|
1833
893
|
],
|
|
1834
894
|
placeholder: `默认为索引名:${e.getIndexName()}`
|
|
@@ -1840,46 +900,44 @@ function Zt(l, t, o, e, i, g) {
|
|
|
1840
900
|
])
|
|
1841
901
|
]);
|
|
1842
902
|
}
|
|
1843
|
-
const
|
|
903
|
+
const Zn = /* @__PURE__ */ J(Sn, [["render", Yn], ["__scopeId", "data-v-2254f006"]]), Wn = {
|
|
1844
904
|
__name: "Main",
|
|
1845
905
|
props: {
|
|
1846
906
|
fixedPanels: Array
|
|
1847
907
|
},
|
|
1848
908
|
emits: [],
|
|
1849
|
-
setup(
|
|
1850
|
-
const
|
|
1851
|
-
|
|
1852
|
-
} = I(), g = Ae({
|
|
1853
|
-
emitEvent: t
|
|
909
|
+
setup(v, { emit: o }) {
|
|
910
|
+
const a = F(["bindEvent", "advancedConfig"]), { PLUGIN_NAME: e } = ie(), _ = K({
|
|
911
|
+
emitEvent: o
|
|
1854
912
|
});
|
|
1855
|
-
return
|
|
913
|
+
return Ce("panelState", _), (h, c) => (b(), w(D(We), {
|
|
1856
914
|
title: "高级",
|
|
1857
|
-
"fixed-panels":
|
|
1858
|
-
"fixed-name":
|
|
915
|
+
"fixed-panels": v.fixedPanels,
|
|
916
|
+
"fixed-name": D(e).Event,
|
|
1859
917
|
"header-margin-bottom": 0,
|
|
1860
|
-
onClose:
|
|
918
|
+
onClose: c[1] || (c[1] = (p) => h.$emit("close"))
|
|
1861
919
|
}, {
|
|
1862
|
-
content:
|
|
1863
|
-
|
|
1864
|
-
modelValue:
|
|
1865
|
-
"onUpdate:modelValue":
|
|
920
|
+
content: y(() => [
|
|
921
|
+
u(D(ze), {
|
|
922
|
+
modelValue: a.value,
|
|
923
|
+
"onUpdate:modelValue": c[0] || (c[0] = (p) => a.value = p)
|
|
1866
924
|
}, {
|
|
1867
|
-
default:
|
|
1868
|
-
|
|
925
|
+
default: y(() => [
|
|
926
|
+
u(D(ye), {
|
|
1869
927
|
title: "事件绑定",
|
|
1870
928
|
name: "bindEvent"
|
|
1871
929
|
}, {
|
|
1872
|
-
default:
|
|
1873
|
-
|
|
930
|
+
default: y(() => [
|
|
931
|
+
u(Ln)
|
|
1874
932
|
]),
|
|
1875
933
|
_: 1
|
|
1876
934
|
}),
|
|
1877
|
-
|
|
935
|
+
u(D(ye), {
|
|
1878
936
|
title: "高级配置",
|
|
1879
937
|
name: "advancedConfig"
|
|
1880
938
|
}, {
|
|
1881
|
-
default:
|
|
1882
|
-
|
|
939
|
+
default: y(() => [
|
|
940
|
+
u(Zn)
|
|
1883
941
|
]),
|
|
1884
942
|
_: 1
|
|
1885
943
|
})
|
|
@@ -1890,221 +948,113 @@ const Wt = /* @__PURE__ */ Ce(Tt, [["render", Zt], ["__scopeId", "data-v-9775ff6
|
|
|
1890
948
|
_: 1
|
|
1891
949
|
}, 8, ["fixed-panels", "fixed-name"]));
|
|
1892
950
|
}
|
|
1893
|
-
},
|
|
1894
|
-
default: "选择已有方法或者添加新方法(点击 确定 之后将在JS面板中创建一个该名称的新方法)",
|
|
951
|
+
}, Ie = "newMethod", Qn = /[^0-9a-zA-Z_$]/, eo = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/, ee = {
|
|
1895
952
|
exist: "方法名称已存在",
|
|
1896
953
|
ruleInvalid: "请输入有效的方法名,可以由字母、数字、下划线、$ 符号组成,不能以数字开头",
|
|
1897
954
|
empty: "方法名称不能为空"
|
|
1898
|
-
},
|
|
955
|
+
}, no = {
|
|
1899
956
|
components: {
|
|
1900
|
-
MonacoEditor:
|
|
1901
|
-
TinyInput:
|
|
1902
|
-
TinyCheckbox:
|
|
957
|
+
MonacoEditor: Qe,
|
|
958
|
+
TinyInput: oe,
|
|
959
|
+
TinyCheckbox: Re
|
|
1903
960
|
},
|
|
1904
961
|
props: {
|
|
1905
962
|
dialogVisible: Boolean
|
|
1906
963
|
},
|
|
1907
964
|
setup() {
|
|
1908
|
-
const {
|
|
1909
|
-
getMethodNameList: l
|
|
1910
|
-
} = C(k.Page), t = tt("context"), o = {
|
|
965
|
+
const { getMethodNameList: v } = Y(Z.Page), o = Ne("context"), a = {
|
|
1911
966
|
language: "json",
|
|
1912
967
|
lineNumbers: !1,
|
|
1913
968
|
minimap: {
|
|
1914
969
|
enabled: !1
|
|
1915
970
|
}
|
|
1916
|
-
}, e =
|
|
1917
|
-
|
|
1918
|
-
},
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
NEW_METHOD_TYPE: W,
|
|
1936
|
-
VALID_VARNAME_RE: ye
|
|
1937
|
-
})
|
|
1938
|
-
}), i = h((r) => !r, {
|
|
1939
|
-
metaData: {
|
|
1940
|
-
id: "engine.setting.event.validMethodNameEmpty"
|
|
1941
|
-
},
|
|
1942
|
-
ctx: () => ({
|
|
1943
|
-
getMethodNameList: l,
|
|
1944
|
-
context: t,
|
|
1945
|
-
editorOptions: o,
|
|
1946
|
-
editorContentChange: e,
|
|
1947
|
-
validMethodNameEmpty: i,
|
|
1948
|
-
validMethodNameExist: g,
|
|
1949
|
-
invalidMethodName: p,
|
|
1950
|
-
change: s,
|
|
1951
|
-
VueMonaco: xe,
|
|
1952
|
-
getMetaApi: C,
|
|
1953
|
-
META_APP: k,
|
|
1954
|
-
METHOD_TIPS_MAP: ae,
|
|
1955
|
-
NEW_METHOD_TYPE: W,
|
|
1956
|
-
VALID_VARNAME_RE: ye
|
|
1957
|
-
})
|
|
1958
|
-
}), g = h((r) => l == null ? void 0 : l().includes(r), {
|
|
1959
|
-
metaData: {
|
|
1960
|
-
id: "engine.setting.event.validMethodNameExist"
|
|
1961
|
-
},
|
|
1962
|
-
ctx: () => ({
|
|
1963
|
-
getMethodNameList: l,
|
|
1964
|
-
context: t,
|
|
1965
|
-
editorOptions: o,
|
|
1966
|
-
editorContentChange: e,
|
|
1967
|
-
validMethodNameEmpty: i,
|
|
1968
|
-
validMethodNameExist: g,
|
|
1969
|
-
invalidMethodName: p,
|
|
1970
|
-
change: s,
|
|
1971
|
-
VueMonaco: xe,
|
|
1972
|
-
getMetaApi: C,
|
|
1973
|
-
META_APP: k,
|
|
1974
|
-
METHOD_TIPS_MAP: ae,
|
|
1975
|
-
NEW_METHOD_TYPE: W,
|
|
1976
|
-
VALID_VARNAME_RE: ye
|
|
1977
|
-
})
|
|
1978
|
-
}), p = h((r) => !ye.test(r), {
|
|
1979
|
-
metaData: {
|
|
1980
|
-
id: "engine.setting.event.invalidMethodName"
|
|
1981
|
-
},
|
|
1982
|
-
ctx: () => ({
|
|
1983
|
-
getMethodNameList: l,
|
|
1984
|
-
context: t,
|
|
1985
|
-
editorOptions: o,
|
|
1986
|
-
editorContentChange: e,
|
|
1987
|
-
validMethodNameEmpty: i,
|
|
1988
|
-
validMethodNameExist: g,
|
|
1989
|
-
invalidMethodName: p,
|
|
1990
|
-
change: s,
|
|
1991
|
-
VueMonaco: xe,
|
|
1992
|
-
getMetaApi: C,
|
|
1993
|
-
META_APP: k,
|
|
1994
|
-
METHOD_TIPS_MAP: ae,
|
|
1995
|
-
NEW_METHOD_TYPE: W,
|
|
1996
|
-
VALID_VARNAME_RE: ye
|
|
1997
|
-
})
|
|
1998
|
-
}), s = h((r) => {
|
|
1999
|
-
const a = [{
|
|
2000
|
-
validator: i,
|
|
2001
|
-
tip: ae.empty
|
|
2002
|
-
}, {
|
|
2003
|
-
validator: g,
|
|
2004
|
-
tip: ae.exist
|
|
2005
|
-
}, {
|
|
2006
|
-
validator: p,
|
|
2007
|
-
tip: ae.ruleInvalid
|
|
2008
|
-
}];
|
|
2009
|
-
for (let u = 0; u < a.length; u++) {
|
|
2010
|
-
const n = a[u];
|
|
2011
|
-
if (n.validator(r)) {
|
|
2012
|
-
t.tipError = !0, t.tip = n.tip;
|
|
2013
|
-
return;
|
|
971
|
+
}, e = (p) => {
|
|
972
|
+
o.editorContent = p;
|
|
973
|
+
}, r = (p) => !p, _ = (p) => v == null ? void 0 : v().includes(p), h = (p) => !eo.test(p);
|
|
974
|
+
return {
|
|
975
|
+
NEW_METHOD_TYPE: Ie,
|
|
976
|
+
context: o,
|
|
977
|
+
editorOptions: a,
|
|
978
|
+
change: (p) => {
|
|
979
|
+
const s = [
|
|
980
|
+
{ validator: r, tip: ee.empty },
|
|
981
|
+
{ validator: _, tip: ee.exist },
|
|
982
|
+
{ validator: h, tip: ee.ruleInvalid }
|
|
983
|
+
];
|
|
984
|
+
for (let x = 0; x < s.length; x++) {
|
|
985
|
+
const n = s[x];
|
|
986
|
+
if (n.validator(p)) {
|
|
987
|
+
o.tipError = !0, o.tip = n.tip;
|
|
988
|
+
return;
|
|
989
|
+
}
|
|
2014
990
|
}
|
|
2015
|
-
|
|
2016
|
-
t.tipError = !1, t.tip = "";
|
|
2017
|
-
}, {
|
|
2018
|
-
metaData: {
|
|
2019
|
-
id: "engine.setting.event.change"
|
|
991
|
+
o.tipError = !1, o.tip = "";
|
|
2020
992
|
},
|
|
2021
|
-
ctx: () => ({
|
|
2022
|
-
getMethodNameList: l,
|
|
2023
|
-
context: t,
|
|
2024
|
-
editorOptions: o,
|
|
2025
|
-
editorContentChange: e,
|
|
2026
|
-
validMethodNameEmpty: i,
|
|
2027
|
-
validMethodNameExist: g,
|
|
2028
|
-
invalidMethodName: p,
|
|
2029
|
-
change: s,
|
|
2030
|
-
VueMonaco: xe,
|
|
2031
|
-
getMetaApi: C,
|
|
2032
|
-
META_APP: k,
|
|
2033
|
-
METHOD_TIPS_MAP: ae,
|
|
2034
|
-
NEW_METHOD_TYPE: W,
|
|
2035
|
-
VALID_VARNAME_RE: ye
|
|
2036
|
-
})
|
|
2037
|
-
});
|
|
2038
|
-
return {
|
|
2039
|
-
NEW_METHOD_TYPE: W,
|
|
2040
|
-
context: t,
|
|
2041
|
-
editorOptions: o,
|
|
2042
|
-
change: s,
|
|
2043
993
|
editorContentChange: e
|
|
2044
994
|
};
|
|
2045
995
|
}
|
|
2046
|
-
},
|
|
996
|
+
}, oo = { class: "content-right" }, to = { class: "new-action-tip" }, io = { class: "content-right-title" }, so = { class: "set-params-tip" }, ao = { class: "content-right-monaco" }, lo = {
|
|
2047
997
|
key: 1,
|
|
2048
998
|
class: "mark"
|
|
2049
|
-
},
|
|
999
|
+
}, ro = {
|
|
2050
1000
|
key: 0,
|
|
2051
1001
|
class: "params-tip"
|
|
2052
1002
|
};
|
|
2053
|
-
function
|
|
2054
|
-
const
|
|
2055
|
-
return
|
|
2056
|
-
|
|
2057
|
-
class:
|
|
1003
|
+
function co(v, o, a, e, r, _) {
|
|
1004
|
+
const h = k("tiny-input"), c = k("tiny-checkbox"), p = k("monaco-editor");
|
|
1005
|
+
return b(), A("div", oo, [
|
|
1006
|
+
t("div", {
|
|
1007
|
+
class: R(["content-right-top", { "tip-error": e.context.tipError }])
|
|
2058
1008
|
}, [
|
|
2059
|
-
|
|
2060
|
-
|
|
1009
|
+
o[2] || (o[2] = t("div", { class: "content-right-title" }, "方法名称", -1)),
|
|
1010
|
+
u(h, {
|
|
2061
1011
|
modelValue: e.context.bindMethodInfo.name,
|
|
2062
1012
|
"onUpdate:modelValue": [
|
|
2063
|
-
|
|
1013
|
+
o[0] || (o[0] = (s) => e.context.bindMethodInfo.name = s),
|
|
2064
1014
|
e.change
|
|
2065
1015
|
],
|
|
2066
1016
|
disabled: e.context.bindMethodInfo.type !== e.NEW_METHOD_TYPE,
|
|
2067
|
-
class:
|
|
1017
|
+
class: R([{ "status-error": e.context.tipError }]),
|
|
2068
1018
|
placeholder: "请从左侧选择一个方法进行绑定,或者选择添加新方法,输入自定义方法名称。"
|
|
2069
1019
|
}, null, 8, ["modelValue", "disabled", "class", "onUpdate:modelValue"]),
|
|
2070
|
-
|
|
1020
|
+
t("div", to, M(e.context.tip), 1)
|
|
2071
1021
|
], 2),
|
|
2072
|
-
|
|
2073
|
-
class:
|
|
1022
|
+
t("div", {
|
|
1023
|
+
class: R(["content-right-bottom", { "tip-error": !e.context.isValidParams }])
|
|
2074
1024
|
}, [
|
|
2075
|
-
|
|
2076
|
-
|
|
1025
|
+
t("div", io, [
|
|
1026
|
+
u(c, {
|
|
2077
1027
|
modelValue: e.context.enableExtraParams,
|
|
2078
|
-
"onUpdate:modelValue":
|
|
1028
|
+
"onUpdate:modelValue": o[1] || (o[1] = (s) => e.context.enableExtraParams = s),
|
|
2079
1029
|
name: "tiny-checkbox"
|
|
2080
1030
|
}, {
|
|
2081
|
-
default:
|
|
2082
|
-
|
|
1031
|
+
default: y(() => o[3] || (o[3] = [
|
|
1032
|
+
j("扩展参数设置")
|
|
2083
1033
|
])),
|
|
2084
1034
|
_: 1
|
|
2085
1035
|
}, 8, ["modelValue"]),
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
1036
|
+
t("div", so, [
|
|
1037
|
+
o[4] || (o[4] = t("div", null, "扩展参数:调用当前事件传入的真实参数,数组格式,追加在原有事件参数之后", -1)),
|
|
1038
|
+
j(" 如: " + M(e.context.bindMethodInfo.name) + "(eventArgs, extParam1, extParam2, ...) ", 1)
|
|
2089
1039
|
])
|
|
2090
1040
|
]),
|
|
2091
|
-
|
|
2092
|
-
|
|
1041
|
+
t("div", ao, [
|
|
1042
|
+
a.dialogVisible ? (b(), w(p, {
|
|
2093
1043
|
key: 0,
|
|
2094
1044
|
value: e.context.editorContent,
|
|
2095
1045
|
options: e.editorOptions,
|
|
2096
1046
|
onChange: e.editorContentChange,
|
|
2097
1047
|
class: "monaco-editor"
|
|
2098
|
-
}, null, 8, ["value", "options", "onChange"])) :
|
|
2099
|
-
e.context.enableExtraParams ?
|
|
1048
|
+
}, null, 8, ["value", "options", "onChange"])) : q("", !0),
|
|
1049
|
+
e.context.enableExtraParams ? q("", !0) : (b(), A("div", lo))
|
|
2100
1050
|
]),
|
|
2101
|
-
!e.context.isValidParams && e.context.enableExtraParams ? (
|
|
1051
|
+
!e.context.isValidParams && e.context.enableExtraParams ? (b(), A("div", ro, ' 请输入数组格式的参数,参数可以为表达式。例如:["extParam1", "item.status", 1, "getNames()"] ')) : q("", !0)
|
|
2102
1052
|
], 2)
|
|
2103
1053
|
]);
|
|
2104
1054
|
}
|
|
2105
|
-
const
|
|
1055
|
+
const mo = /* @__PURE__ */ J(no, [["render", co], ["__scopeId", "data-v-f2c9b5af"]]), po = {
|
|
2106
1056
|
components: {
|
|
2107
|
-
TinySearch:
|
|
1057
|
+
TinySearch: Fe
|
|
2108
1058
|
},
|
|
2109
1059
|
props: {
|
|
2110
1060
|
eventBinding: {
|
|
@@ -2112,109 +1062,69 @@ const cn = /* @__PURE__ */ Ce(en, [["render", rn], ["__scopeId", "data-v-f458a3c
|
|
|
2112
1062
|
default: () => ({})
|
|
2113
1063
|
}
|
|
2114
1064
|
},
|
|
2115
|
-
setup(
|
|
2116
|
-
const {
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
}
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
ctx: () => ({
|
|
2130
|
-
props: l,
|
|
2131
|
-
getMethodNameList: t,
|
|
2132
|
-
searchValue: o,
|
|
2133
|
-
filteredMethodList: e,
|
|
2134
|
-
context: i,
|
|
2135
|
-
generateMethodName: g,
|
|
2136
|
-
selectMethod: p,
|
|
2137
|
-
getMetaApi: C,
|
|
2138
|
-
META_APP: k,
|
|
2139
|
-
INVALID_VARNAME_CHAR_RE: we,
|
|
2140
|
-
NEW_METHOD_TYPE: W
|
|
2141
|
-
})
|
|
2142
|
-
}), p = h((s) => {
|
|
2143
|
-
i.bindMethodInfo = s;
|
|
2144
|
-
}, {
|
|
2145
|
-
metaData: {
|
|
2146
|
-
id: "engine.setting.event.selectMethod"
|
|
2147
|
-
},
|
|
2148
|
-
ctx: () => ({
|
|
2149
|
-
props: l,
|
|
2150
|
-
getMethodNameList: t,
|
|
2151
|
-
searchValue: o,
|
|
2152
|
-
filteredMethodList: e,
|
|
2153
|
-
context: i,
|
|
2154
|
-
generateMethodName: g,
|
|
2155
|
-
selectMethod: p,
|
|
2156
|
-
getMetaApi: C,
|
|
2157
|
-
META_APP: k,
|
|
2158
|
-
INVALID_VARNAME_CHAR_RE: we,
|
|
2159
|
-
NEW_METHOD_TYPE: W
|
|
2160
|
-
})
|
|
2161
|
-
});
|
|
2162
|
-
return et(() => {
|
|
2163
|
-
var c, d;
|
|
2164
|
-
const s = (c = l.eventBinding) == null ? void 0 : c.eventName, r = (t == null ? void 0 : t().filter((m) => m.includes(s))) || [], u = {
|
|
1065
|
+
setup(v) {
|
|
1066
|
+
const { getMethodNameList: o } = Y(Z.Page), a = F(""), e = F([]), r = Ne("context"), _ = (c, p) => {
|
|
1067
|
+
const s = c.map((l) => {
|
|
1068
|
+
var i;
|
|
1069
|
+
return Number.parseInt((i = l.match(/\d+$/)) == null ? void 0 : i[0]) || 0;
|
|
1070
|
+
}).sort((l, i) => l - i).pop();
|
|
1071
|
+
let n = `${(p == null ? void 0 : p.replace(Qn, "_")) || ""}New`;
|
|
1072
|
+
return s > -1 && (n += `${s + 1}`), n;
|
|
1073
|
+
}, h = (c) => {
|
|
1074
|
+
r.bindMethodInfo = c;
|
|
1075
|
+
};
|
|
1076
|
+
return Ve(() => {
|
|
1077
|
+
var l, i;
|
|
1078
|
+
const c = (l = v.eventBinding) == null ? void 0 : l.eventName, p = (o == null ? void 0 : o().filter((d) => d.includes(c))) || [], x = {
|
|
2165
1079
|
title: "添加新方法",
|
|
2166
|
-
name:
|
|
2167
|
-
type:
|
|
1080
|
+
name: _(p, c),
|
|
1081
|
+
type: Ie
|
|
2168
1082
|
};
|
|
2169
|
-
(
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
const n = (t == null ? void 0 : t().filter((m) => m.includes(o.value)).map((m) => ({
|
|
2173
|
-
name: m
|
|
2174
|
-
}))) || [];
|
|
2175
|
-
e.value = [u, ...n];
|
|
1083
|
+
(i = v.eventBinding) != null && i.ref ? h({ name: v.eventBinding.ref }) : h(x);
|
|
1084
|
+
const n = (o == null ? void 0 : o().filter((d) => d.includes(a.value)).map((d) => ({ name: d }))) || [];
|
|
1085
|
+
e.value = [x, ...n];
|
|
2176
1086
|
}), {
|
|
2177
|
-
context:
|
|
2178
|
-
searchValue:
|
|
1087
|
+
context: r,
|
|
1088
|
+
searchValue: a,
|
|
2179
1089
|
filteredMethodList: e,
|
|
2180
|
-
selectMethod:
|
|
1090
|
+
selectMethod: h
|
|
2181
1091
|
};
|
|
2182
1092
|
}
|
|
2183
|
-
},
|
|
2184
|
-
function
|
|
2185
|
-
const
|
|
2186
|
-
return
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
1093
|
+
}, uo = { class: "dialog-content-left" }, vo = { class: "left-list-wrap" }, fo = { class: "left-action-list" }, go = { class: "action-list-wrap" }, _o = ["onClick"];
|
|
1094
|
+
function ho(v, o, a, e, r, _) {
|
|
1095
|
+
const h = k("tiny-search");
|
|
1096
|
+
return b(), A("div", uo, [
|
|
1097
|
+
o[1] || (o[1] = t("div", { class: "left-title" }, "响应方法", -1)),
|
|
1098
|
+
t("div", vo, [
|
|
1099
|
+
t("div", fo, [
|
|
1100
|
+
u(h, {
|
|
2191
1101
|
modelValue: e.searchValue,
|
|
2192
|
-
"onUpdate:modelValue":
|
|
1102
|
+
"onUpdate:modelValue": o[0] || (o[0] = (c) => e.searchValue = c),
|
|
2193
1103
|
placeholder: "搜索"
|
|
2194
1104
|
}, null, 8, ["modelValue"]),
|
|
2195
|
-
|
|
2196
|
-
(
|
|
2197
|
-
key:
|
|
2198
|
-
onClick: (
|
|
1105
|
+
t("ul", go, [
|
|
1106
|
+
(b(!0), A(H, null, ne(e.filteredMethodList, (c) => (b(), A("li", {
|
|
1107
|
+
key: c.name,
|
|
1108
|
+
onClick: (p) => e.selectMethod(c)
|
|
2199
1109
|
}, [
|
|
2200
|
-
|
|
2201
|
-
class:
|
|
2202
|
-
},
|
|
2203
|
-
], 8,
|
|
1110
|
+
t("div", {
|
|
1111
|
+
class: R(["action-name", { active: c.name === e.context.bindMethodInfo.name }])
|
|
1112
|
+
}, M(c.title || c.name), 3)
|
|
1113
|
+
], 8, _o))), 128))
|
|
2204
1114
|
])
|
|
2205
1115
|
])
|
|
2206
1116
|
])
|
|
2207
1117
|
]);
|
|
2208
1118
|
}
|
|
2209
|
-
const
|
|
2210
|
-
...
|
|
2211
|
-
entry:
|
|
2212
|
-
options: { commonEvents:
|
|
1119
|
+
const bo = /* @__PURE__ */ J(po, [["render", ho], ["__scopeId", "data-v-0859add1"]]), Bo = {
|
|
1120
|
+
...te,
|
|
1121
|
+
entry: Wn,
|
|
1122
|
+
options: { commonEvents: fn },
|
|
2213
1123
|
components: {
|
|
2214
|
-
BindEventsDialogSidebar:
|
|
2215
|
-
BindEventsDialogContent:
|
|
1124
|
+
BindEventsDialogSidebar: bo,
|
|
1125
|
+
BindEventsDialogContent: mo
|
|
2216
1126
|
}
|
|
2217
1127
|
};
|
|
2218
1128
|
export {
|
|
2219
|
-
|
|
1129
|
+
Bo as default
|
|
2220
1130
|
};
|