@opentiny/tiny-engine-setting-events 1.0.2-beta.0 → 1.0.3
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 +534 -505
- package/dist/style.css +1 -1
- package/package.json +21 -8
package/dist/index.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { ref as
|
|
3
|
-
import { Input as
|
|
4
|
-
import { useLayout as
|
|
5
|
-
import { VueMonaco as
|
|
6
|
-
import { iconYes as
|
|
7
|
-
import { theme as
|
|
8
|
-
import { string2Ast as Ve, ast2String as
|
|
9
|
-
import { PROP_DATA_TYPE as
|
|
10
|
-
import { updateRect as
|
|
11
|
-
import { constants as
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
for (const [e,
|
|
15
|
-
|
|
16
|
-
return
|
|
17
|
-
},
|
|
18
|
-
|
|
2
|
+
import { ref as K, reactive as te, watchEffect as Ce, resolveComponent as v, withDirectives as ce, openBlock as h, createBlock as U, withCtx as _, createElementVNode as o, createVNode as p, createTextVNode as M, createElementBlock as S, Fragment as G, renderList as de, normalizeClass as J, toDisplayString as L, createCommentVNode as H, vShow as re, nextTick as Be, pushScopeId as me, popScopeId as _e, unref as O, computed as W, withModifiers as Oe, watch as Ee } from "vue";
|
|
3
|
+
import { Input as pe, Button as ee, Search as Le, Popover as De, DialogBox as Ae, Switch as Te, Form as Ue, FormItem as ke, Tooltip as ze, Collapse as je, CollapseItem as xe } from "@opentiny/vue";
|
|
4
|
+
import { useLayout as Pe, useCanvas as ue, useHistory as $e, useBlock as Fe, useResource as Je, useModal as Re, useProperties as I } from "@opentiny/tiny-engine-controller";
|
|
5
|
+
import { VueMonaco as Xe, BlockLinkEvent as qe, SvgButton as He, MetaSwitch as Ke, MetaBindVariable as Ye, MetaInput as Qe, MetaCodeEditor as Ze } from "@opentiny/tiny-engine-common";
|
|
6
|
+
import { iconYes as Ge, iconHelpQuery as we, iconChevronDown as We } from "@opentiny/vue-icon";
|
|
7
|
+
import { theme as et, string2Obj as tt } from "@opentiny/tiny-engine-controller/adapter";
|
|
8
|
+
import { string2Ast as Ve, ast2String as ot } from "@opentiny/tiny-engine-common/js/ast";
|
|
9
|
+
import { PROP_DATA_TYPE as q } from "@opentiny/tiny-engine-controller/utils";
|
|
10
|
+
import { updateRect as nt } from "@opentiny/tiny-engine-canvas";
|
|
11
|
+
import { constants as it } from "@opentiny/tiny-engine-utils";
|
|
12
|
+
const oe = (l, i) => {
|
|
13
|
+
const b = l.__vccOpts || l;
|
|
14
|
+
for (const [e, c] of i)
|
|
15
|
+
b[e] = c;
|
|
16
|
+
return b;
|
|
17
|
+
}, ve = K(!1), st = () => {
|
|
18
|
+
ve.value = !0;
|
|
19
19
|
}, Ie = () => {
|
|
20
|
-
|
|
21
|
-
},
|
|
20
|
+
ve.value = !1;
|
|
21
|
+
}, Ne = "newMethod", at = /[^0-9a-zA-Z_$]/, lt = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/, F = {
|
|
22
22
|
default: "选择已有方法或者添加新方法(点击 确定 之后将在JS面板中创建一个该名称的新方法)",
|
|
23
23
|
exist: "方法名称已存在",
|
|
24
24
|
ruleInvalid: "请输入有效的方法名,可以由字母、数字、下划线、$ 符号组成,不能以数字开头",
|
|
25
25
|
empty: "方法名称不能为空"
|
|
26
|
-
},
|
|
26
|
+
}, ct = {
|
|
27
27
|
components: {
|
|
28
|
-
MonacoEditor:
|
|
29
|
-
TinyInput:
|
|
30
|
-
TinyButton:
|
|
31
|
-
TinySearch:
|
|
32
|
-
TinyPopover:
|
|
33
|
-
TinyDialogBox:
|
|
34
|
-
IconYes:
|
|
35
|
-
IconHelpQuery:
|
|
36
|
-
TinySwitch:
|
|
28
|
+
MonacoEditor: Xe,
|
|
29
|
+
TinyInput: pe,
|
|
30
|
+
TinyButton: ee,
|
|
31
|
+
TinySearch: Le,
|
|
32
|
+
TinyPopover: De,
|
|
33
|
+
TinyDialogBox: Ae,
|
|
34
|
+
IconYes: Ge(),
|
|
35
|
+
IconHelpQuery: we(),
|
|
36
|
+
TinySwitch: Te
|
|
37
37
|
},
|
|
38
38
|
inheritAttrs: !1,
|
|
39
39
|
props: {
|
|
@@ -42,13 +42,13 @@ const pe = (d, i) => {
|
|
|
42
42
|
default: () => ({})
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
|
-
setup(
|
|
46
|
-
const { PLUGIN_NAME: i, getPluginApi:
|
|
45
|
+
setup(l) {
|
|
46
|
+
const { PLUGIN_NAME: i, getPluginApi: b, activePlugin: e } = Pe(), { pageState: c } = ue(), { getMethodNameList: u, getMethods: w, saveMethod: y, highlightMethod: E } = b(i.PageController), x = K(null), n = te({
|
|
47
47
|
searchValue: "",
|
|
48
48
|
editorContent: "",
|
|
49
49
|
bindMethodInfo: {},
|
|
50
50
|
filterMethodList: [],
|
|
51
|
-
tip:
|
|
51
|
+
tip: F.default,
|
|
52
52
|
tipError: !1,
|
|
53
53
|
enableExtraParams: !1,
|
|
54
54
|
isValidParams: !0
|
|
@@ -59,138 +59,138 @@ const pe = (d, i) => {
|
|
|
59
59
|
language: "json",
|
|
60
60
|
formatOnPaste: !0,
|
|
61
61
|
tabSize: 2,
|
|
62
|
-
theme:
|
|
62
|
+
theme: et(),
|
|
63
63
|
lineNumbers: !1,
|
|
64
64
|
minimap: {
|
|
65
65
|
enabled: !1
|
|
66
66
|
}
|
|
67
|
-
},
|
|
68
|
-
const
|
|
69
|
-
var
|
|
70
|
-
return Number.parseInt((
|
|
71
|
-
}).sort((
|
|
72
|
-
let
|
|
73
|
-
return
|
|
67
|
+
}, a = (s, r) => {
|
|
68
|
+
const m = s.map((V) => {
|
|
69
|
+
var g;
|
|
70
|
+
return Number.parseInt((g = V.match(/\d+$/)) == null ? void 0 : g[0]) || 0;
|
|
71
|
+
}).sort((V, g) => V - g).pop();
|
|
72
|
+
let P = `${(r == null ? void 0 : r.replace(at, "_")) || ""}New`;
|
|
73
|
+
return m > -1 && (P += `${m + 1}`), P;
|
|
74
74
|
};
|
|
75
|
-
|
|
76
|
-
var
|
|
77
|
-
const s = (
|
|
75
|
+
Ce(() => {
|
|
76
|
+
var V, g;
|
|
77
|
+
const s = (V = l.eventBinding) == null ? void 0 : V.eventName, r = (u == null ? void 0 : u().filter((T) => T.indexOf(s) > -1)) || [], k = {
|
|
78
78
|
title: "添加新方法",
|
|
79
|
-
name:
|
|
80
|
-
type:
|
|
79
|
+
name: a(r, s),
|
|
80
|
+
type: Ne
|
|
81
81
|
};
|
|
82
|
-
(
|
|
83
|
-
name:
|
|
84
|
-
} :
|
|
85
|
-
const
|
|
86
|
-
|
|
82
|
+
(g = l.eventBinding) != null && g.ref ? n.bindMethodInfo = {
|
|
83
|
+
name: l.eventBinding.ref
|
|
84
|
+
} : n.bindMethodInfo = k;
|
|
85
|
+
const P = (u == null ? void 0 : u().filter((T) => T.indexOf(n.searchValue) > -1).map((T) => ({ name: T }))) || [];
|
|
86
|
+
n.filterMethodList = [k, ...P];
|
|
87
87
|
});
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
},
|
|
91
|
-
var
|
|
88
|
+
const C = (s) => {
|
|
89
|
+
n.bindMethodInfo = s;
|
|
90
|
+
}, N = (s) => {
|
|
91
|
+
var V, g;
|
|
92
92
|
if (!s)
|
|
93
93
|
return;
|
|
94
|
-
const
|
|
95
|
-
if (!c)
|
|
96
|
-
return;
|
|
97
|
-
const r = (v = m == null ? void 0 : m.currentSchema) == null ? void 0 : v.props;
|
|
94
|
+
const r = (V = l.eventBinding) == null ? void 0 : V.eventName;
|
|
98
95
|
if (!r)
|
|
99
96
|
return;
|
|
100
|
-
const
|
|
101
|
-
|
|
97
|
+
const m = (g = c == null ? void 0 : c.currentSchema) == null ? void 0 : g.props;
|
|
98
|
+
if (!m)
|
|
99
|
+
return;
|
|
100
|
+
const { name: k, extra: P } = s;
|
|
101
|
+
l[r] || (m[r] = {
|
|
102
102
|
type: "JSExpression",
|
|
103
103
|
value: ""
|
|
104
|
-
}),
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
},
|
|
108
|
-
const
|
|
109
|
-
{ validator:
|
|
110
|
-
{ validator:
|
|
111
|
-
{ validator:
|
|
104
|
+
}), P && n.enableExtraParams && (m[r].params = P), m[r].value = `this.${k}`, $e().addHistory();
|
|
105
|
+
}, d = () => {
|
|
106
|
+
n.tipError = !1, n.tip = F.default;
|
|
107
|
+
}, D = (s) => !s, X = (s) => u == null ? void 0 : u().includes(s), ne = (s) => !lt.test(s), f = (s) => {
|
|
108
|
+
const r = [
|
|
109
|
+
{ validator: D, tip: F.empty },
|
|
110
|
+
{ validator: X, tip: F.exist },
|
|
111
|
+
{ validator: ne, tip: F.ruleInvalid }
|
|
112
112
|
];
|
|
113
|
-
for (let
|
|
114
|
-
const
|
|
115
|
-
if (
|
|
116
|
-
|
|
113
|
+
for (let m = 0; m < r.length; m++) {
|
|
114
|
+
const k = r[m];
|
|
115
|
+
if (k.validator(s)) {
|
|
116
|
+
n.tipError = !0, n.tip = k.tip;
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
|
|
121
|
-
},
|
|
122
|
-
var
|
|
120
|
+
n.tipError = !1, n.tip = F.default;
|
|
121
|
+
}, A = () => {
|
|
122
|
+
var r;
|
|
123
123
|
let s = "";
|
|
124
|
-
if (
|
|
124
|
+
if (n.enableExtraParams)
|
|
125
125
|
try {
|
|
126
|
-
const
|
|
127
|
-
s = JSON.parse(
|
|
126
|
+
const m = (r = x.value) == null ? void 0 : r.getEditor().getValue();
|
|
127
|
+
s = JSON.parse(m), n.isValidParams = Array.isArray(s);
|
|
128
128
|
} catch {
|
|
129
|
-
|
|
129
|
+
n.isValidParams = !1;
|
|
130
130
|
}
|
|
131
131
|
return s;
|
|
132
|
-
},
|
|
133
|
-
var
|
|
134
|
-
let s = (
|
|
132
|
+
}, B = (s) => Array.from({ length: s.length }, (r, m) => `args${m}`).join(","), ie = () => {
|
|
133
|
+
var m, k, P, V;
|
|
134
|
+
let s = (k = (m = w()) == null ? void 0 : m[n.bindMethodInfo.name]) == null ? void 0 : k.value, r = "{}";
|
|
135
135
|
if (s) {
|
|
136
|
-
let
|
|
136
|
+
let g = {};
|
|
137
137
|
try {
|
|
138
|
-
|
|
138
|
+
g = Ve(s);
|
|
139
139
|
} catch {
|
|
140
|
-
s = s.replace("function", `function ${
|
|
140
|
+
s = s.replace("function", `function ${n.bindMethodInfo.name}`), g = Ve(s);
|
|
141
141
|
}
|
|
142
|
-
(
|
|
142
|
+
(V = (P = g == null ? void 0 : g.program) == null ? void 0 : P.body[0]) != null && V.body && (r = ot(g.program.body[0].body));
|
|
143
143
|
}
|
|
144
|
-
return
|
|
144
|
+
return r || `{
|
|
145
145
|
}`;
|
|
146
|
-
},
|
|
146
|
+
}, Z = () => {
|
|
147
147
|
e(i.PageController).then(() => {
|
|
148
|
-
|
|
148
|
+
Be(() => {
|
|
149
149
|
var s;
|
|
150
|
-
|
|
150
|
+
E && E((s = n.bindMethodInfo) == null ? void 0 : s.name);
|
|
151
151
|
});
|
|
152
152
|
});
|
|
153
153
|
};
|
|
154
154
|
return {
|
|
155
|
-
NEW_METHOD_TYPE:
|
|
156
|
-
state:
|
|
157
|
-
editor:
|
|
155
|
+
NEW_METHOD_TYPE: Ne,
|
|
156
|
+
state: n,
|
|
157
|
+
editor: x,
|
|
158
158
|
editorOptions: t,
|
|
159
|
-
dialogVisible:
|
|
160
|
-
change:
|
|
159
|
+
dialogVisible: ve,
|
|
160
|
+
change: f,
|
|
161
161
|
confirm: () => {
|
|
162
|
-
if (
|
|
162
|
+
if (n.tipError)
|
|
163
163
|
return;
|
|
164
|
-
let s = "event",
|
|
165
|
-
if (!
|
|
164
|
+
let s = "event", r = A(), m = s;
|
|
165
|
+
if (!n.isValidParams)
|
|
166
166
|
return;
|
|
167
|
-
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
name:
|
|
171
|
-
content:
|
|
172
|
-
}),
|
|
167
|
+
r && (s = r.join(","), m = B(r)), N({ ...n.bindMethodInfo, params: s, extra: r });
|
|
168
|
+
const k = ie();
|
|
169
|
+
y == null || y({
|
|
170
|
+
name: n.bindMethodInfo.name,
|
|
171
|
+
content: n.enableExtraParams ? `function (eventArgs,${m}) ${k}` : `function (${m}) ${k}`
|
|
172
|
+
}), Z(), Ie();
|
|
173
173
|
},
|
|
174
174
|
closeDialog: () => {
|
|
175
|
-
|
|
175
|
+
d(), Ie();
|
|
176
176
|
},
|
|
177
177
|
openedDialog: () => {
|
|
178
|
-
var s,
|
|
179
|
-
|
|
178
|
+
var s, r, m;
|
|
179
|
+
n.enableExtraParams = !!((r = (s = l.eventBinding) == null ? void 0 : s.params) != null && r.length), n.editorContent = JSON.stringify(((m = l.eventBinding) == null ? void 0 : m.params) || [], null, 2), d();
|
|
180
180
|
},
|
|
181
|
-
selectMethod:
|
|
181
|
+
selectMethod: C
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
},
|
|
184
|
+
}, R = (l) => (me("data-v-6a54279c"), l = l(), _e(), l), dt = { class: "bind-event-dialog-content" }, rt = { class: "dialog-content-left" }, pt = /* @__PURE__ */ R(() => /* @__PURE__ */ o("div", { class: "left-title" }, "响应方法", -1)), mt = { class: "left-list-wrap" }, _t = { class: "left-action-list" }, ut = { class: "action-list-wrap" }, vt = ["onClick"], ft = { class: "content-right" }, ht = /* @__PURE__ */ R(() => /* @__PURE__ */ o("div", { class: "content-right-title" }, "方法名称", -1)), gt = { class: "new-action-tip" }, bt = { class: "content-right-title" }, yt = /* @__PURE__ */ R(() => /* @__PURE__ */ o("span", { class: "set-params-tip" }, "扩展参数设置", -1)), Et = /* @__PURE__ */ R(() => /* @__PURE__ */ o("br", null, null, -1)), kt = /* @__PURE__ */ R(() => /* @__PURE__ */ o("span", null, "开启", -1)), xt = /* @__PURE__ */ R(() => /* @__PURE__ */ o("span", null, "关闭", -1)), Vt = { class: "content-right-monaco" }, It = {
|
|
185
185
|
key: 1,
|
|
186
186
|
class: "mark"
|
|
187
|
-
},
|
|
187
|
+
}, Nt = {
|
|
188
188
|
key: 0,
|
|
189
189
|
class: "params-tip"
|
|
190
|
-
},
|
|
191
|
-
function
|
|
192
|
-
const
|
|
193
|
-
return
|
|
190
|
+
}, Ct = { class: "bind-dialog-footer" };
|
|
191
|
+
function Dt(l, i, b, e, c, u) {
|
|
192
|
+
const w = v("tiny-search"), y = v("icon-yes"), E = v("tiny-input"), x = v("icon-help-query"), n = v("tiny-popover"), t = v("tiny-switch"), a = v("monaco-editor"), C = v("tiny-button"), N = v("tiny-dialog-box");
|
|
193
|
+
return ce((h(), U(N, {
|
|
194
194
|
title: "事件绑定",
|
|
195
195
|
width: "50%",
|
|
196
196
|
"append-to-body": !0,
|
|
@@ -198,129 +198,129 @@ function Mt(d, i, k, e, m, g) {
|
|
|
198
198
|
onOpened: e.openedDialog
|
|
199
199
|
}, {
|
|
200
200
|
footer: _(() => [
|
|
201
|
-
o("div",
|
|
202
|
-
|
|
201
|
+
o("div", Ct, [
|
|
202
|
+
p(C, {
|
|
203
203
|
type: "info",
|
|
204
204
|
onClick: e.confirm
|
|
205
205
|
}, {
|
|
206
206
|
default: _(() => [
|
|
207
|
-
|
|
207
|
+
M("确 定")
|
|
208
208
|
]),
|
|
209
209
|
_: 1
|
|
210
210
|
}, 8, ["onClick"]),
|
|
211
|
-
|
|
211
|
+
p(C, { onClick: e.closeDialog }, {
|
|
212
212
|
default: _(() => [
|
|
213
|
-
|
|
213
|
+
M("取 消")
|
|
214
214
|
]),
|
|
215
215
|
_: 1
|
|
216
216
|
}, 8, ["onClick"])
|
|
217
217
|
])
|
|
218
218
|
]),
|
|
219
219
|
default: _(() => [
|
|
220
|
-
o("div",
|
|
221
|
-
o("div",
|
|
222
|
-
|
|
223
|
-
o("div",
|
|
224
|
-
o("div",
|
|
225
|
-
|
|
220
|
+
o("div", dt, [
|
|
221
|
+
o("div", rt, [
|
|
222
|
+
pt,
|
|
223
|
+
o("div", mt, [
|
|
224
|
+
o("div", _t, [
|
|
225
|
+
p(w, {
|
|
226
226
|
modelValue: e.state.searchValue,
|
|
227
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
227
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => e.state.searchValue = d),
|
|
228
228
|
placeholder: "搜索"
|
|
229
229
|
}, null, 8, ["modelValue"]),
|
|
230
|
-
o("ul",
|
|
231
|
-
(
|
|
232
|
-
key:
|
|
233
|
-
onClick: (
|
|
230
|
+
o("ul", ut, [
|
|
231
|
+
(h(!0), S(G, null, de(e.state.filterMethodList, (d) => (h(), S("li", {
|
|
232
|
+
key: d.name,
|
|
233
|
+
onClick: (D) => e.selectMethod(d)
|
|
234
234
|
}, [
|
|
235
235
|
o("div", {
|
|
236
|
-
class:
|
|
236
|
+
class: J(["action-name", { active: d.name === e.state.bindMethodInfo.name }])
|
|
237
237
|
}, [
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
M(L(d.title || d.name) + " ", 1),
|
|
239
|
+
d.name === e.state.bindMethodInfo.name ? (h(), U(y, {
|
|
240
240
|
key: 0,
|
|
241
241
|
class: "action-selected-icon"
|
|
242
|
-
})) :
|
|
242
|
+
})) : H("", !0)
|
|
243
243
|
], 2)
|
|
244
|
-
], 8,
|
|
244
|
+
], 8, vt))), 128))
|
|
245
245
|
])
|
|
246
246
|
])
|
|
247
247
|
])
|
|
248
248
|
]),
|
|
249
|
-
o("div",
|
|
249
|
+
o("div", ft, [
|
|
250
250
|
o("div", {
|
|
251
|
-
class:
|
|
251
|
+
class: J(["content-right-top", { "tip-error": e.state.tipError }])
|
|
252
252
|
}, [
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
ht,
|
|
254
|
+
p(E, {
|
|
255
255
|
modelValue: e.state.bindMethodInfo.name,
|
|
256
256
|
"onUpdate:modelValue": [
|
|
257
|
-
i[1] || (i[1] = (
|
|
257
|
+
i[1] || (i[1] = (d) => e.state.bindMethodInfo.name = d),
|
|
258
258
|
e.change
|
|
259
259
|
],
|
|
260
260
|
disabled: e.state.bindMethodInfo.type !== e.NEW_METHOD_TYPE,
|
|
261
|
-
class:
|
|
261
|
+
class: J([{ "status-error": e.state.tipError }]),
|
|
262
262
|
placeholder: "请从左侧选择一个方法进行绑定,或者选择添加新方法,输入自定义方法名称。"
|
|
263
263
|
}, null, 8, ["modelValue", "disabled", "class", "onUpdate:modelValue"]),
|
|
264
|
-
o("div",
|
|
264
|
+
o("div", gt, L(e.state.tip), 1)
|
|
265
265
|
], 2),
|
|
266
266
|
o("div", {
|
|
267
|
-
class:
|
|
267
|
+
class: J(["content-right-bottom", { "tip-error": !e.state.isValidParams }])
|
|
268
268
|
}, [
|
|
269
|
-
o("div",
|
|
270
|
-
|
|
271
|
-
|
|
269
|
+
o("div", bt, [
|
|
270
|
+
yt,
|
|
271
|
+
p(n, {
|
|
272
272
|
placement: "top-start",
|
|
273
273
|
width: "350",
|
|
274
274
|
trigger: "hover"
|
|
275
275
|
}, {
|
|
276
276
|
reference: _(() => [
|
|
277
|
-
|
|
277
|
+
p(x)
|
|
278
278
|
]),
|
|
279
279
|
default: _(() => [
|
|
280
280
|
o("p", null, [
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
281
|
+
M(" 扩展参数:调用当前事件传入的真实参数,数组格式,追加在原有事件参数之后"),
|
|
282
|
+
Et,
|
|
283
|
+
M(" 如: " + L(e.state.bindMethodInfo.name) + "(eventArgs, extParam1, extParam2, ...) ", 1)
|
|
284
284
|
])
|
|
285
285
|
]),
|
|
286
286
|
_: 1
|
|
287
287
|
}),
|
|
288
|
-
|
|
288
|
+
p(t, {
|
|
289
289
|
modelValue: e.state.enableExtraParams,
|
|
290
|
-
"onUpdate:modelValue": i[2] || (i[2] = (
|
|
290
|
+
"onUpdate:modelValue": i[2] || (i[2] = (d) => e.state.enableExtraParams = d),
|
|
291
291
|
class: "set-switch",
|
|
292
292
|
"show-text": !0
|
|
293
293
|
}, {
|
|
294
294
|
open: _(() => [
|
|
295
|
-
|
|
295
|
+
kt
|
|
296
296
|
]),
|
|
297
297
|
close: _(() => [
|
|
298
|
-
|
|
298
|
+
xt
|
|
299
299
|
]),
|
|
300
300
|
_: 1
|
|
301
301
|
}, 8, ["modelValue"])
|
|
302
302
|
]),
|
|
303
|
-
o("div",
|
|
304
|
-
e.dialogVisible ? (
|
|
303
|
+
o("div", Vt, [
|
|
304
|
+
e.dialogVisible ? (h(), U(a, {
|
|
305
305
|
key: 0,
|
|
306
306
|
ref: "editor",
|
|
307
307
|
value: e.state.editorContent,
|
|
308
308
|
options: e.editorOptions,
|
|
309
309
|
class: "monaco-editor"
|
|
310
|
-
}, null, 8, ["value", "options"])) :
|
|
311
|
-
e.state.enableExtraParams ?
|
|
310
|
+
}, null, 8, ["value", "options"])) : H("", !0),
|
|
311
|
+
e.state.enableExtraParams ? H("", !0) : (h(), S("div", It))
|
|
312
312
|
]),
|
|
313
|
-
!e.state.isValidParams && e.state.enableExtraParams ? (
|
|
313
|
+
!e.state.isValidParams && e.state.enableExtraParams ? (h(), S("div", Nt, ' 请输入数组格式的参数,参数可以为表达式。例如:["extParam1", "item.status", 1, "getNames()"] ')) : H("", !0)
|
|
314
314
|
], 2)
|
|
315
315
|
])
|
|
316
316
|
])
|
|
317
317
|
]),
|
|
318
318
|
_: 1
|
|
319
319
|
}, 8, ["onClose", "onOpened"])), [
|
|
320
|
-
[
|
|
320
|
+
[re, e.dialogVisible]
|
|
321
321
|
]);
|
|
322
322
|
}
|
|
323
|
-
const
|
|
323
|
+
const At = /* @__PURE__ */ oe(ct, [["render", Dt], ["__scopeId", "data-v-6a54279c"]]), Pt = {
|
|
324
324
|
onClick: {
|
|
325
325
|
label: {
|
|
326
326
|
zh_CN: "鼠标单击时触发"
|
|
@@ -377,7 +377,7 @@ const St = /* @__PURE__ */ pe(pt, [["render", Mt], ["__scopeId", "data-v-6a54279
|
|
|
377
377
|
},
|
|
378
378
|
defaultValue: ""
|
|
379
379
|
}
|
|
380
|
-
},
|
|
380
|
+
}, wt = [
|
|
381
381
|
"onabort",
|
|
382
382
|
"onafterprint",
|
|
383
383
|
"onanimationend",
|
|
@@ -487,500 +487,529 @@ const St = /* @__PURE__ */ pe(pt, [["render", Mt], ["__scopeId", "data-v-6a54279
|
|
|
487
487
|
"onwebkitanimationstart",
|
|
488
488
|
"onwebkittransitionend",
|
|
489
489
|
"onwheel"
|
|
490
|
-
],
|
|
491
|
-
let e =
|
|
492
|
-
return `${
|
|
493
|
-
}).includes(
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
490
|
+
], Mt = (l) => !!wt.map((b) => {
|
|
491
|
+
let e = b[2].toUpperCase();
|
|
492
|
+
return `${b.substring(0, 2)}${e}${b.substring(3)}`;
|
|
493
|
+
}).includes(l);
|
|
494
|
+
const St = { class: "footer" }, Bt = {
|
|
495
|
+
__name: "AddEventsDialog",
|
|
496
|
+
props: {
|
|
497
|
+
visible: {
|
|
498
|
+
type: Boolean,
|
|
499
|
+
default: !1
|
|
500
|
+
},
|
|
501
|
+
componentEvents: {
|
|
502
|
+
type: Object,
|
|
503
|
+
default: () => ({})
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
emits: ["closeDialog", "addEvent"],
|
|
507
|
+
setup(l, { emit: i }) {
|
|
508
|
+
const b = l, e = i, c = te({
|
|
509
|
+
eventDescription: "",
|
|
510
|
+
eventName: ""
|
|
511
|
+
}), u = K(null), y = {
|
|
512
|
+
eventDescription: [
|
|
513
|
+
{
|
|
514
|
+
required: !0,
|
|
515
|
+
message: "必填"
|
|
516
|
+
}
|
|
517
|
+
],
|
|
518
|
+
eventName: [
|
|
519
|
+
{ required: !0, message: "必填" },
|
|
520
|
+
{
|
|
521
|
+
validator: (n, t, a) => {
|
|
522
|
+
if (b.componentEvents[c.eventName]) {
|
|
523
|
+
a(new Error("事件名已存在"));
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
526
|
+
if (!Mt(c.eventName)) {
|
|
527
|
+
a(new Error("请输入正确的浏览器事件名"));
|
|
528
|
+
return;
|
|
529
|
+
}
|
|
530
|
+
a();
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
]
|
|
534
|
+
}, E = () => {
|
|
535
|
+
e("closeDialog");
|
|
536
|
+
}, x = () => {
|
|
537
|
+
u.value && u.value.validate((n) => {
|
|
538
|
+
if (!n)
|
|
539
|
+
return;
|
|
540
|
+
const { eventName: t, eventDescription: a } = c;
|
|
541
|
+
e("addEvent", { eventName: t, eventDescription: a });
|
|
542
|
+
});
|
|
543
|
+
};
|
|
544
|
+
return (n, t) => (h(), U(O(Ae), {
|
|
545
|
+
visible: l.visible,
|
|
546
|
+
title: "添加自定义事件",
|
|
547
|
+
width: "400px",
|
|
548
|
+
"append-to-body": !0,
|
|
549
|
+
"close-on-click-modal": !1,
|
|
550
|
+
onClose: E
|
|
551
|
+
}, {
|
|
552
|
+
footer: _(() => [
|
|
553
|
+
o("div", St, [
|
|
554
|
+
p(O(ee), { onClick: E }, {
|
|
555
|
+
default: _(() => [
|
|
556
|
+
M(" 取消")
|
|
557
|
+
]),
|
|
558
|
+
_: 1
|
|
559
|
+
}),
|
|
560
|
+
p(O(ee), {
|
|
561
|
+
type: "primary",
|
|
562
|
+
onClick: x
|
|
563
|
+
}, {
|
|
564
|
+
default: _(() => [
|
|
565
|
+
M(" 确定")
|
|
566
|
+
]),
|
|
567
|
+
_: 1
|
|
568
|
+
})
|
|
569
|
+
])
|
|
570
|
+
]),
|
|
571
|
+
default: _(() => [
|
|
572
|
+
p(O(Ue), {
|
|
573
|
+
ref_key: "ruleForm",
|
|
574
|
+
ref: u,
|
|
575
|
+
model: c,
|
|
576
|
+
rules: y,
|
|
577
|
+
"label-width": "100px",
|
|
578
|
+
"inline-message": !0,
|
|
579
|
+
"validate-type": "text",
|
|
580
|
+
"label-position": "left",
|
|
581
|
+
class: "add-custom-event-form"
|
|
582
|
+
}, {
|
|
583
|
+
default: _(() => [
|
|
584
|
+
p(O(ke), {
|
|
585
|
+
label: "事件函数名",
|
|
586
|
+
prop: "eventName",
|
|
587
|
+
required: ""
|
|
588
|
+
}, {
|
|
589
|
+
default: _(() => [
|
|
590
|
+
p(O(pe), {
|
|
591
|
+
modelValue: c.eventName,
|
|
592
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => c.eventName = a),
|
|
593
|
+
placeholder: "小驼峰格式,如:onDrag"
|
|
594
|
+
}, null, 8, ["modelValue"])
|
|
595
|
+
]),
|
|
596
|
+
_: 1
|
|
597
|
+
}),
|
|
598
|
+
p(O(ke), {
|
|
599
|
+
label: "事件描述",
|
|
600
|
+
prop: "eventDescription",
|
|
601
|
+
required: ""
|
|
602
|
+
}, {
|
|
603
|
+
default: _(() => [
|
|
604
|
+
p(O(pe), {
|
|
605
|
+
modelValue: c.eventDescription,
|
|
606
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => c.eventDescription = a)
|
|
607
|
+
}, null, 8, ["modelValue"])
|
|
608
|
+
]),
|
|
609
|
+
_: 1
|
|
610
|
+
})
|
|
611
|
+
]),
|
|
612
|
+
_: 1
|
|
613
|
+
}, 8, ["model"])
|
|
614
|
+
]),
|
|
615
|
+
_: 1
|
|
616
|
+
}, 8, ["visible"]));
|
|
617
|
+
}
|
|
618
|
+
}, Ot = /* @__PURE__ */ oe(Bt, [["__scopeId", "data-v-932b189c"]]);
|
|
619
|
+
const Lt = {
|
|
498
620
|
components: {
|
|
499
|
-
BlockLinkEvent:
|
|
500
|
-
BindEventsDialog:
|
|
501
|
-
TinyPopover:
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
IconChevronDown: nt(),
|
|
508
|
-
SvgButton: Ze
|
|
621
|
+
BlockLinkEvent: qe,
|
|
622
|
+
BindEventsDialog: At,
|
|
623
|
+
TinyPopover: De,
|
|
624
|
+
TinyButton: ee,
|
|
625
|
+
IconHelpQuery: we(),
|
|
626
|
+
IconChevronDown: We(),
|
|
627
|
+
SvgButton: He,
|
|
628
|
+
AddEventsDialog: Ot
|
|
509
629
|
},
|
|
510
630
|
inheritAttrs: !1,
|
|
511
631
|
setup() {
|
|
512
|
-
const { PLUGIN_NAME:
|
|
513
|
-
methodDescription: [{ required: !0, message: "必填", trigger: "blur" }],
|
|
514
|
-
methodName: [{ required: !0, message: "必填", trigger: "blur" }]
|
|
515
|
-
}, t = $(null), n = de({
|
|
632
|
+
const { PLUGIN_NAME: l, activePlugin: i, getPluginApi: b } = Pe(), { pageState: e } = ue(), { getBlockEvents: c, getCurrentBlock: u, removeEventLink: w } = Fe(), { getMaterial: y } = Je(), { confirm: E } = Re(), { highlightMethod: x } = b(l.PageController), n = te({
|
|
516
633
|
eventName: "",
|
|
517
634
|
// 事件名称
|
|
518
635
|
eventBinding: null,
|
|
519
636
|
// 事件绑定的处理方法对象
|
|
520
637
|
componentEvent: {},
|
|
521
|
-
componentEvents:
|
|
638
|
+
componentEvents: Pt,
|
|
522
639
|
bindActions: {},
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
var v, L, ue;
|
|
536
|
-
if (fe.indexOf(E) > -1) {
|
|
537
|
-
const Se = U[E], { value: Be, params: he } = Se, Oe = !he && ((L = (v = Be.match(/\((.+)\)$/)) == null ? void 0 : v[1]) == null ? void 0 : L.split(",")) || he, T = {
|
|
538
|
-
eventName: E,
|
|
640
|
+
showBindEventDialog: !1
|
|
641
|
+
}), t = W(() => !!e.isBlock), a = W(() => Object.keys(n.bindActions).length === 0);
|
|
642
|
+
Ce(() => {
|
|
643
|
+
var Z, se, ae, le, s;
|
|
644
|
+
const f = (Z = e == null ? void 0 : e.currentSchema) == null ? void 0 : Z.componentName, A = y(f);
|
|
645
|
+
n.componentEvent = ((ae = (se = A == null ? void 0 : A.content) == null ? void 0 : se.schema) == null ? void 0 : ae.events) || ((le = A == null ? void 0 : A.schema) == null ? void 0 : le.events) || {}, Object.assign(n.componentEvents, n.componentEvent);
|
|
646
|
+
const B = ((s = e == null ? void 0 : e.currentSchema) == null ? void 0 : s.props) || {}, ie = Object.keys(B);
|
|
647
|
+
n.bindActions = {}, Object.entries(n.componentEvents).forEach(([r, m]) => {
|
|
648
|
+
var k, P, V;
|
|
649
|
+
if (ie.indexOf(r) > -1) {
|
|
650
|
+
const g = B[r], { value: T, params: fe } = g, Me = !fe && ((P = (k = T.match(/\((.+)\)$/)) == null ? void 0 : k[1]) == null ? void 0 : P.split(",")) || fe, z = {
|
|
651
|
+
eventName: r,
|
|
539
652
|
ref: "",
|
|
540
|
-
event:
|
|
541
|
-
params:
|
|
653
|
+
event: B[r],
|
|
654
|
+
params: Me
|
|
542
655
|
};
|
|
543
|
-
if (
|
|
544
|
-
|
|
545
|
-
const
|
|
546
|
-
ge &&
|
|
547
|
-
var
|
|
548
|
-
ge === ((
|
|
656
|
+
if (z.event.type === "JSExpression" && (z.ref = z.event.value.replace("this.", "").replace(/\(.*\)$/, "")), e.isBlock) {
|
|
657
|
+
z.metaEvent = m;
|
|
658
|
+
const he = c(u()), ge = (V = e == null ? void 0 : e.currentSchema) == null ? void 0 : V.id;
|
|
659
|
+
ge && he && Object.entries(he).forEach(([Se, j]) => {
|
|
660
|
+
var be, ye;
|
|
661
|
+
ge === ((be = j == null ? void 0 : j.linked) == null ? void 0 : be.id) && r === ((ye = j == null ? void 0 : j.linked) == null ? void 0 : ye.event) && (z.linked = j.linked, z.linkedEventName = Se);
|
|
549
662
|
});
|
|
550
663
|
}
|
|
551
|
-
n.bindActions[
|
|
664
|
+
n.bindActions[r] = z;
|
|
552
665
|
}
|
|
553
666
|
});
|
|
554
667
|
});
|
|
555
|
-
const
|
|
556
|
-
|
|
557
|
-
},
|
|
558
|
-
var
|
|
559
|
-
Object.keys(((
|
|
560
|
-
}, p = (h) => {
|
|
561
|
-
I({
|
|
562
|
-
title: "提示",
|
|
563
|
-
message: `您确定要删除事件 ${h.eventName} 吗?`,
|
|
564
|
-
exec() {
|
|
565
|
-
e.isBlock && S({ linked: h.linked }), J(h);
|
|
566
|
-
}
|
|
567
|
-
});
|
|
568
|
-
}, A = (h) => {
|
|
569
|
-
h && i(d.PageController).then(() => {
|
|
570
|
-
N && N(h.ref);
|
|
571
|
-
});
|
|
572
|
-
}, R = () => {
|
|
573
|
-
if (n.componentEvents[n.formData.methodName])
|
|
574
|
-
return Pe({
|
|
575
|
-
type: "error",
|
|
576
|
-
message: `${n.formData.methodName}事件函数名已存在`
|
|
577
|
-
}), !1;
|
|
578
|
-
Lt(n.formData.methodName) && (Object.assign(n.componentEvents, {
|
|
579
|
-
[n.formData.methodName]: {
|
|
580
|
-
label: {
|
|
581
|
-
zh_CN: n.formData.methodDescription
|
|
582
|
-
},
|
|
583
|
-
description: {
|
|
584
|
-
zh_CN: `${n.formData.methodDescription}的回调函数`
|
|
585
|
-
},
|
|
586
|
-
type: "event",
|
|
587
|
-
functionInfo: {
|
|
588
|
-
params: [],
|
|
589
|
-
returns: {}
|
|
590
|
-
},
|
|
591
|
-
defaultValue: ""
|
|
592
|
-
}
|
|
593
|
-
}), n.showEventAdditive = !n.showEventAdditive);
|
|
594
|
-
}, G = () => {
|
|
595
|
-
var h;
|
|
596
|
-
(h = t.value) == null || h.resetFields();
|
|
597
|
-
}, W = () => {
|
|
598
|
-
n.showEventAdditive = !1;
|
|
668
|
+
const C = (f, A) => {
|
|
669
|
+
A && n.bindActions[f.eventName] || (n.eventBinding = f, st());
|
|
670
|
+
}, N = (f) => {
|
|
671
|
+
var B;
|
|
672
|
+
Object.keys(((B = e == null ? void 0 : e.currentSchema) == null ? void 0 : B.props) || {}).indexOf(f.eventName) > -1 && delete e.currentSchema.props[f.eventName];
|
|
599
673
|
};
|
|
600
|
-
return
|
|
601
|
-
() => n.showEventAdditive,
|
|
602
|
-
(h) => {
|
|
603
|
-
h ? window.addEventListener("click", W) : window.removeEventListener("click", W);
|
|
604
|
-
}
|
|
605
|
-
), {
|
|
674
|
+
return {
|
|
606
675
|
state: n,
|
|
607
|
-
isBlock:
|
|
608
|
-
isEmpty:
|
|
609
|
-
delEvent:
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
676
|
+
isBlock: t,
|
|
677
|
+
isEmpty: a,
|
|
678
|
+
delEvent: (f) => {
|
|
679
|
+
E({
|
|
680
|
+
title: "提示",
|
|
681
|
+
message: `您确定要删除事件 ${f.eventName} 吗?`,
|
|
682
|
+
exec() {
|
|
683
|
+
e.isBlock && w({ linked: f.linked }), N(f);
|
|
684
|
+
}
|
|
685
|
+
});
|
|
686
|
+
},
|
|
687
|
+
openCodePanel: (f) => {
|
|
688
|
+
f && i(l.PageController).then(() => {
|
|
689
|
+
x && x(f.ref);
|
|
690
|
+
});
|
|
691
|
+
},
|
|
692
|
+
openActionDialog: C,
|
|
693
|
+
handleAddEvent: (f) => {
|
|
694
|
+
const { eventName: A, eventDescription: B } = f;
|
|
695
|
+
Object.assign(n.componentEvents, {
|
|
696
|
+
[A]: {
|
|
697
|
+
label: {
|
|
698
|
+
zh_CN: B
|
|
699
|
+
},
|
|
700
|
+
description: {
|
|
701
|
+
zh_CN: `${B}的回调函数`
|
|
702
|
+
},
|
|
703
|
+
type: "event",
|
|
704
|
+
functionInfo: {
|
|
705
|
+
params: [],
|
|
706
|
+
returns: {}
|
|
707
|
+
},
|
|
708
|
+
defaultValue: ""
|
|
709
|
+
}
|
|
710
|
+
}), n.showBindEventDialog = !1;
|
|
711
|
+
},
|
|
712
|
+
handleToggleAddEventDialog: (f) => {
|
|
713
|
+
n.showBindEventDialog = f;
|
|
714
|
+
}
|
|
616
715
|
};
|
|
617
716
|
}
|
|
618
|
-
},
|
|
619
|
-
/* @__PURE__ */
|
|
717
|
+
}, Y = (l) => (me("data-v-e09a30b7"), l = l(), _e(), l), Tt = { class: "bind-action-list" }, Ut = { class: "popover-head" }, zt = { class: "head-left" }, jt = /* @__PURE__ */ Y(() => /* @__PURE__ */ o("span", { class: "custom-event-button-text" }, "添加自定义事件", -1)), $t = /* @__PURE__ */ Y(() => /* @__PURE__ */ o("div", { class: "add-custom-event-tip" }, [
|
|
718
|
+
/* @__PURE__ */ M(" 支持添加原生 DOM 事件,添加后点击 "),
|
|
620
719
|
/* @__PURE__ */ o("span", { class: "event-tip-highlight" }, " 绑定事件 "),
|
|
621
|
-
/* @__PURE__ */
|
|
622
|
-
], -1)),
|
|
623
|
-
/* @__PURE__ */
|
|
720
|
+
/* @__PURE__ */ M(" 为画布中所选元素增加事件 ")
|
|
721
|
+
], -1)), Ft = /* @__PURE__ */ Y(() => /* @__PURE__ */ o("span", null, "绑定事件", -1)), Jt = { class: "bind-event-list" }, Rt = ["onClick"], Xt = { class: "bind-actions" }, qt = { class: "action-item bind-action-item" }, Ht = ["onClick"], Kt = { class: "event-bind" }, Yt = { class: "action-buttons" }, Qt = { class: "empty-action" }, Zt = { class: "icon" }, Gt = /* @__PURE__ */ Y(() => /* @__PURE__ */ o("div", { class: "center" }, "元素事件绑定", -1)), Wt = /* @__PURE__ */ Y(() => /* @__PURE__ */ o("span", { class: "text" }, [
|
|
722
|
+
/* @__PURE__ */ M(" 点击 "),
|
|
624
723
|
/* @__PURE__ */ o("span", { class: "empty-bind-event-tip" }, "绑定事件"),
|
|
625
|
-
/* @__PURE__ */
|
|
724
|
+
/* @__PURE__ */ M("为画布中所选元素增加事件")
|
|
626
725
|
], -1));
|
|
627
|
-
function
|
|
628
|
-
const
|
|
629
|
-
return
|
|
726
|
+
function eo(l, i, b, e, c, u) {
|
|
727
|
+
const w = v("icon-help-query"), y = v("tiny-popover"), E = v("tiny-button"), x = v("icon-chevron-down"), n = v("block-link-event"), t = v("svg-button"), a = v("svg-icon"), C = v("bind-events-dialog"), N = v("add-events-dialog");
|
|
728
|
+
return h(), S(G, null, [
|
|
630
729
|
o("div", Tt, [
|
|
631
|
-
o("div",
|
|
632
|
-
o("span",
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
"
|
|
636
|
-
|
|
637
|
-
placement: "bottom-end",
|
|
638
|
-
trigger: "manual",
|
|
639
|
-
onHide: e.clearFromData
|
|
730
|
+
o("div", Ut, [
|
|
731
|
+
o("span", zt, [
|
|
732
|
+
p(E, {
|
|
733
|
+
class: "title add-custom-event-button",
|
|
734
|
+
"reset-time": 0,
|
|
735
|
+
onClick: i[0] || (i[0] = Oe((d) => e.handleToggleAddEventDialog(!0), ["stop"]))
|
|
640
736
|
}, {
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
"
|
|
645
|
-
|
|
737
|
+
default: _(() => [
|
|
738
|
+
jt,
|
|
739
|
+
p(y, {
|
|
740
|
+
placement: "bottom-start",
|
|
741
|
+
trigger: "hover",
|
|
742
|
+
popperClass: "setting-advanced-add-custom-event-tip"
|
|
646
743
|
}, {
|
|
744
|
+
reference: _(() => [
|
|
745
|
+
p(w, { class: "icon-help" })
|
|
746
|
+
]),
|
|
647
747
|
default: _(() => [
|
|
648
|
-
|
|
649
|
-
l(V, {
|
|
650
|
-
placement: "bottom-start",
|
|
651
|
-
trigger: "hover",
|
|
652
|
-
popperClass: "setting-advanced-add-custom-event-tip"
|
|
653
|
-
}, {
|
|
654
|
-
reference: _(() => [
|
|
655
|
-
l(S, { class: "icon-help" })
|
|
656
|
-
]),
|
|
657
|
-
default: _(() => [
|
|
658
|
-
Jt
|
|
659
|
-
]),
|
|
660
|
-
_: 1
|
|
661
|
-
})
|
|
748
|
+
$t
|
|
662
749
|
]),
|
|
663
750
|
_: 1
|
|
664
751
|
})
|
|
665
752
|
]),
|
|
666
|
-
default: _(() => [
|
|
667
|
-
o("div", {
|
|
668
|
-
class: "custom-event",
|
|
669
|
-
onClick: i[4] || (i[4] = Ee(() => {
|
|
670
|
-
}, ["stop"]))
|
|
671
|
-
}, [
|
|
672
|
-
l(t, {
|
|
673
|
-
ref: "ruleForm",
|
|
674
|
-
model: e.state.formData,
|
|
675
|
-
rules: e.rules,
|
|
676
|
-
"label-width": "100px",
|
|
677
|
-
"inline-message": !0,
|
|
678
|
-
"validate-type": "text",
|
|
679
|
-
"label-position": "left"
|
|
680
|
-
}, {
|
|
681
|
-
default: _(() => [
|
|
682
|
-
l(a, {
|
|
683
|
-
label: "事件函数名",
|
|
684
|
-
prop: "methodName",
|
|
685
|
-
required: ""
|
|
686
|
-
}, {
|
|
687
|
-
default: _(() => [
|
|
688
|
-
l(N, {
|
|
689
|
-
modelValue: e.state.formData.methodName,
|
|
690
|
-
"onUpdate:modelValue": i[1] || (i[1] = (p) => e.state.formData.methodName = p),
|
|
691
|
-
placeholder: "小驼峰格式,如:onDrag"
|
|
692
|
-
}, null, 8, ["modelValue"])
|
|
693
|
-
]),
|
|
694
|
-
_: 1
|
|
695
|
-
}),
|
|
696
|
-
l(a, {
|
|
697
|
-
label: "事件描述",
|
|
698
|
-
prop: "methodDescription",
|
|
699
|
-
required: ""
|
|
700
|
-
}, {
|
|
701
|
-
default: _(() => [
|
|
702
|
-
l(N, {
|
|
703
|
-
modelValue: e.state.formData.methodDescription,
|
|
704
|
-
"onUpdate:modelValue": i[2] || (i[2] = (p) => e.state.formData.methodDescription = p)
|
|
705
|
-
}, null, 8, ["modelValue"])
|
|
706
|
-
]),
|
|
707
|
-
_: 1
|
|
708
|
-
}),
|
|
709
|
-
o("footer", null, [
|
|
710
|
-
l(I, { onClick: e.addMethod }, {
|
|
711
|
-
default: _(() => [
|
|
712
|
-
P(" 确定")
|
|
713
|
-
]),
|
|
714
|
-
_: 1
|
|
715
|
-
}, 8, ["onClick"]),
|
|
716
|
-
l(I, {
|
|
717
|
-
onClick: i[3] || (i[3] = (p) => e.state.showEventAdditive = !e.state.showEventAdditive)
|
|
718
|
-
}, {
|
|
719
|
-
default: _(() => [
|
|
720
|
-
P(" 取消")
|
|
721
|
-
]),
|
|
722
|
-
_: 1
|
|
723
|
-
})
|
|
724
|
-
])
|
|
725
|
-
]),
|
|
726
|
-
_: 1
|
|
727
|
-
}, 8, ["model", "rules"])
|
|
728
|
-
])
|
|
729
|
-
]),
|
|
730
753
|
_: 1
|
|
731
|
-
}
|
|
754
|
+
})
|
|
732
755
|
]),
|
|
733
|
-
|
|
756
|
+
p(y, {
|
|
734
757
|
popperClass: "option-popper setting-advanced-bind-event-list",
|
|
735
758
|
placement: "bottom-end",
|
|
736
759
|
trigger: "hover"
|
|
737
760
|
}, {
|
|
738
761
|
reference: _(() => [
|
|
739
|
-
|
|
762
|
+
p(E, { class: "bind-event-btn" }, {
|
|
740
763
|
default: _(() => [
|
|
741
|
-
|
|
742
|
-
|
|
764
|
+
Ft,
|
|
765
|
+
p(x, { class: "icon-chevron-down" })
|
|
743
766
|
]),
|
|
744
767
|
_: 1
|
|
745
768
|
})
|
|
746
769
|
]),
|
|
747
770
|
default: _(() => [
|
|
748
|
-
o("ul",
|
|
749
|
-
(
|
|
750
|
-
var
|
|
751
|
-
return
|
|
752
|
-
key:
|
|
753
|
-
class:
|
|
754
|
-
onClick: (
|
|
771
|
+
o("ul", Jt, [
|
|
772
|
+
(h(!0), S(G, null, de(e.state.componentEvents, (d, D) => {
|
|
773
|
+
var X;
|
|
774
|
+
return h(), S("li", {
|
|
775
|
+
key: D,
|
|
776
|
+
class: J(["bind-event-list-item", { "bind-event-list-item-notallow": e.state.bindActions[D] }]),
|
|
777
|
+
onClick: (ne) => e.openActionDialog({ eventName: D }, !0)
|
|
755
778
|
}, [
|
|
756
|
-
o("div", null,
|
|
757
|
-
], 10,
|
|
779
|
+
o("div", null, L(D) + " " + L(((X = d == null ? void 0 : d.label) == null ? void 0 : X.zh_CN) || D), 1)
|
|
780
|
+
], 10, Rt);
|
|
758
781
|
}), 128))
|
|
759
782
|
])
|
|
760
783
|
]),
|
|
761
784
|
_: 1
|
|
762
785
|
})
|
|
763
786
|
]),
|
|
764
|
-
|
|
765
|
-
(
|
|
766
|
-
key:
|
|
787
|
+
ce(o("ul", Xt, [
|
|
788
|
+
(h(!0), S(G, null, de(e.state.bindActions, (d) => (h(), S("li", {
|
|
789
|
+
key: d.eventName
|
|
767
790
|
}, [
|
|
768
|
-
o("div",
|
|
791
|
+
o("div", qt, [
|
|
769
792
|
o("div", {
|
|
770
793
|
class: "binding-name",
|
|
771
|
-
onClick: (
|
|
794
|
+
onClick: (D) => e.openActionDialog(d)
|
|
772
795
|
}, [
|
|
773
796
|
o("div", null, [
|
|
774
|
-
|
|
775
|
-
o("span", null,
|
|
797
|
+
M(L(d.eventName), 1),
|
|
798
|
+
o("span", null, L(e.state.componentEvents[d.eventName].label.zh_CN), 1)
|
|
776
799
|
]),
|
|
777
800
|
o("div", {
|
|
778
|
-
class:
|
|
779
|
-
},
|
|
780
|
-
o("span",
|
|
781
|
-
], 8,
|
|
782
|
-
o("div",
|
|
783
|
-
e.isBlock ? (
|
|
801
|
+
class: J({ linked: d.linked })
|
|
802
|
+
}, L(d.linkedEventName), 3),
|
|
803
|
+
o("span", Kt, L(d.ref), 1)
|
|
804
|
+
], 8, Ht),
|
|
805
|
+
o("div", Yt, [
|
|
806
|
+
e.isBlock ? (h(), U(n, {
|
|
784
807
|
key: 0,
|
|
785
|
-
data:
|
|
786
|
-
}, null, 8, ["data"])) :
|
|
787
|
-
|
|
808
|
+
data: d
|
|
809
|
+
}, null, 8, ["data"])) : H("", !0),
|
|
810
|
+
p(t, {
|
|
788
811
|
name: "plugin-icon-page-schema",
|
|
789
812
|
tips: "定位到代码",
|
|
790
813
|
placement: "top",
|
|
791
|
-
onClick: (
|
|
814
|
+
onClick: (D) => e.openCodePanel(d)
|
|
792
815
|
}, null, 8, ["onClick"]),
|
|
793
|
-
|
|
816
|
+
p(t, {
|
|
794
817
|
name: "setting",
|
|
795
818
|
tips: "设置",
|
|
796
819
|
placement: "top",
|
|
797
|
-
onClick: (
|
|
820
|
+
onClick: (D) => e.openActionDialog(d, !1)
|
|
798
821
|
}, null, 8, ["onClick"]),
|
|
799
|
-
|
|
822
|
+
p(t, {
|
|
800
823
|
name: "delete",
|
|
801
824
|
tips: "删除",
|
|
802
825
|
placement: "top",
|
|
803
|
-
onClick: (
|
|
826
|
+
onClick: (D) => e.delEvent(d)
|
|
804
827
|
}, null, 8, ["onClick"])
|
|
805
828
|
])
|
|
806
829
|
])
|
|
807
830
|
]))), 128))
|
|
808
831
|
], 512), [
|
|
809
|
-
[
|
|
832
|
+
[re, !e.isEmpty]
|
|
810
833
|
]),
|
|
811
|
-
|
|
812
|
-
o("div",
|
|
813
|
-
|
|
834
|
+
ce(o("div", Qt, [
|
|
835
|
+
o("div", Zt, [
|
|
836
|
+
p(a, {
|
|
814
837
|
name: "empty-action",
|
|
815
838
|
class: "empty-action-icon"
|
|
816
839
|
})
|
|
817
840
|
]),
|
|
818
|
-
|
|
819
|
-
|
|
841
|
+
Gt,
|
|
842
|
+
Wt
|
|
820
843
|
], 512), [
|
|
821
|
-
[
|
|
844
|
+
[re, e.isEmpty]
|
|
822
845
|
])
|
|
823
846
|
]),
|
|
824
|
-
|
|
847
|
+
p(C, {
|
|
825
848
|
eventBinding: e.state.eventBinding
|
|
826
|
-
}, null, 8, ["eventBinding"])
|
|
849
|
+
}, null, 8, ["eventBinding"]),
|
|
850
|
+
p(N, {
|
|
851
|
+
visible: e.state.showBindEventDialog,
|
|
852
|
+
componentEvents: e.state.componentEvents,
|
|
853
|
+
onCloseDialog: i[1] || (i[1] = (d) => e.handleToggleAddEventDialog(!1)),
|
|
854
|
+
onAddEvent: e.handleAddEvent
|
|
855
|
+
}, null, 8, ["visible", "componentEvents", "onAddEvent"])
|
|
827
856
|
], 64);
|
|
828
857
|
}
|
|
829
|
-
const
|
|
830
|
-
const { DEFAULT_LOOP_NAME:
|
|
858
|
+
const to = /* @__PURE__ */ oe(Lt, [["render", eo], ["__scopeId", "data-v-e09a30b7"]]);
|
|
859
|
+
const { DEFAULT_LOOP_NAME: $ } = it, oo = {
|
|
831
860
|
components: {
|
|
832
|
-
MetaSwitch:
|
|
833
|
-
TinyTooltip:
|
|
834
|
-
MetaBindVariable:
|
|
835
|
-
MetaInput:
|
|
836
|
-
MetaCodeEditor:
|
|
861
|
+
MetaSwitch: Ke,
|
|
862
|
+
TinyTooltip: ze,
|
|
863
|
+
MetaBindVariable: Ye,
|
|
864
|
+
MetaInput: Qe,
|
|
865
|
+
MetaCodeEditor: Ze
|
|
837
866
|
},
|
|
838
867
|
inheritAttrs: !1,
|
|
839
868
|
setup() {
|
|
840
|
-
const { pageState:
|
|
869
|
+
const { pageState: l } = ue(), i = K(!1), b = W(() => {
|
|
841
870
|
var t;
|
|
842
|
-
return ((t = i.value) == null ? void 0 : t.type) ===
|
|
871
|
+
return ((t = i.value) == null ? void 0 : t.type) === q.JSEXPRESSION;
|
|
843
872
|
}), e = () => {
|
|
844
|
-
var t,
|
|
845
|
-
return ((
|
|
846
|
-
},
|
|
873
|
+
var t, a;
|
|
874
|
+
return ((a = (t = I().getSchema()) == null ? void 0 : t.loopArgs) == null ? void 0 : a[1]) || $.INDEX;
|
|
875
|
+
}, c = te({
|
|
847
876
|
loopData: {
|
|
848
|
-
type:
|
|
877
|
+
type: q.JSEXPRESSION,
|
|
849
878
|
value: "[]"
|
|
850
879
|
},
|
|
851
880
|
loopItem: "item",
|
|
852
881
|
loopIndex: "index",
|
|
853
|
-
isLoop:
|
|
882
|
+
isLoop: W(() => {
|
|
854
883
|
var t;
|
|
855
|
-
return ((t =
|
|
884
|
+
return ((t = c.loopData) == null ? void 0 : t.type) === q.JSEXPRESSION;
|
|
856
885
|
}),
|
|
857
886
|
loopKey: "",
|
|
858
887
|
shouldUpdate: !1
|
|
859
888
|
});
|
|
860
|
-
|
|
861
|
-
() => [
|
|
889
|
+
Ee(
|
|
890
|
+
() => [l == null ? void 0 : l.currentSchema, c.shouldUpdate],
|
|
862
891
|
([t]) => {
|
|
863
|
-
var
|
|
864
|
-
i.value = (t == null ? void 0 : t.condition) === void 0 ? !0 : t == null ? void 0 : t.condition,
|
|
892
|
+
var a, C, N, d;
|
|
893
|
+
i.value = (t == null ? void 0 : t.condition) === void 0 ? !0 : t == null ? void 0 : t.condition, c.loopData = t == null ? void 0 : t.loop, c.loopItem = ((a = t == null ? void 0 : t.loopArgs) == null ? void 0 : a[0]) || "", c.loopIndex = ((C = t == null ? void 0 : t.loopArgs) == null ? void 0 : C[1]) || "", c.loopKey = ((d = (N = t == null ? void 0 : t.props) == null ? void 0 : N.key) == null ? void 0 : d.value) || "";
|
|
865
894
|
}
|
|
866
895
|
);
|
|
867
|
-
const
|
|
896
|
+
const u = (t = "") => {
|
|
868
897
|
t = t.replace(/\s*/g, "");
|
|
869
|
-
const
|
|
870
|
-
if (!
|
|
898
|
+
const a = I().getSchema();
|
|
899
|
+
if (!a)
|
|
871
900
|
return;
|
|
872
|
-
const
|
|
873
|
-
|
|
874
|
-
const
|
|
875
|
-
t && !
|
|
876
|
-
type:
|
|
901
|
+
const C = Number(t).toString() !== "NaN";
|
|
902
|
+
a.props = a.props || {};
|
|
903
|
+
const N = a.props;
|
|
904
|
+
t && !C && (N.key = {
|
|
905
|
+
type: q.JSEXPRESSION,
|
|
877
906
|
value: t
|
|
878
|
-
}), t || (
|
|
879
|
-
type:
|
|
907
|
+
}), t || (c.isLoop ? N.key = {
|
|
908
|
+
type: q.JSEXPRESSION,
|
|
880
909
|
value: e()
|
|
881
|
-
} : delete
|
|
910
|
+
} : delete N.key);
|
|
882
911
|
};
|
|
883
|
-
|
|
884
|
-
!
|
|
912
|
+
Ee([() => c.isLoop, () => c.loopIndex], () => {
|
|
913
|
+
!c.loopKey && c.isLoop && u(e()), c.isLoop || u("");
|
|
885
914
|
});
|
|
886
|
-
const
|
|
915
|
+
const w = () => {
|
|
887
916
|
var t;
|
|
888
|
-
|
|
889
|
-
},
|
|
890
|
-
|
|
891
|
-
},
|
|
892
|
-
|
|
917
|
+
c.loopData = (t = I().getSchema()) == null ? void 0 : t.loop;
|
|
918
|
+
}, y = (t) => {
|
|
919
|
+
I().getSchema() && (t === !1 || t != null && t.type ? I().getSchema().condition = t : delete I().getSchema().condition, nt(), i.value = t);
|
|
920
|
+
}, E = (t) => {
|
|
921
|
+
I().getSchema().loopArgs ? I().getSchema().loopArgs[1] = t || $.INDEX : I().getSchema().loopArgs = [$.ITEM, t];
|
|
893
922
|
};
|
|
894
923
|
return {
|
|
895
924
|
condition: i,
|
|
896
|
-
setConfig:
|
|
897
|
-
isBind:
|
|
898
|
-
state:
|
|
925
|
+
setConfig: y,
|
|
926
|
+
isBind: b,
|
|
927
|
+
state: c,
|
|
899
928
|
setLoop: (t) => {
|
|
900
|
-
t ? (
|
|
929
|
+
t ? (I().getSchema().loop = t != null && t.type ? t : tt(t), E($.INDEX)) : (u(), delete I().getSchema().loop, delete I().getSchema().loopArgs), c.shouldUpdate = !c.shouldUpdate;
|
|
901
930
|
},
|
|
902
931
|
setLoopItem: (t) => {
|
|
903
|
-
|
|
932
|
+
I().getSchema().loopArgs ? I().getSchema().loopArgs[0] = t || $.ITEM : I().getSchema().loopArgs = [t, $.INDEX];
|
|
904
933
|
},
|
|
905
|
-
DEFAULT_LOOP_NAME:
|
|
906
|
-
openEditor:
|
|
907
|
-
setLoopIndex:
|
|
908
|
-
setLoopKey:
|
|
934
|
+
DEFAULT_LOOP_NAME: $,
|
|
935
|
+
openEditor: w,
|
|
936
|
+
setLoopIndex: E,
|
|
937
|
+
setLoopKey: u,
|
|
909
938
|
getIndexName: e
|
|
910
939
|
};
|
|
911
940
|
}
|
|
912
|
-
},
|
|
941
|
+
}, Q = (l) => (me("data-v-ef405cbc"), l = l(), _e(), l), no = { class: "advanced-config-container" }, io = { class: "advnce-config" }, so = /* @__PURE__ */ Q(() => /* @__PURE__ */ o("label", { class: "text-ellipsis-multiple" }, "是否渲染", -1)), ao = { class: "advanced-config-form-item" }, lo = {
|
|
913
942
|
key: 1,
|
|
914
943
|
class: "binding-state"
|
|
915
|
-
},
|
|
944
|
+
}, co = { class: "advnce-config" }, ro = /* @__PURE__ */ Q(() => /* @__PURE__ */ o("label", { class: "text-ellipsis-multiple" }, "循环数据", -1)), po = { class: "advanced-config-form-item" }, mo = {
|
|
916
945
|
key: 1,
|
|
917
946
|
class: "binding-state text-ellipsis-multiple"
|
|
918
|
-
},
|
|
919
|
-
function
|
|
947
|
+
}, _o = { class: "advnce-config" }, uo = /* @__PURE__ */ Q(() => /* @__PURE__ */ o("label", { class: "text-ellipsis-multiple" }, "迭代变量名", -1)), vo = { class: "advanced-config-form-item" }, fo = { class: "advnce-config" }, ho = /* @__PURE__ */ Q(() => /* @__PURE__ */ o("label", { class: "text-ellipsis-multiple" }, "索引变量名", -1)), go = { class: "advanced-config-form-item" }, bo = { class: "advnce-config" }, yo = /* @__PURE__ */ Q(() => /* @__PURE__ */ o("label", { class: "text-ellipsis-multiple" }, "key", -1)), Eo = { class: "advanced-config-form-item" };
|
|
948
|
+
function ko(l, i, b, e, c, u) {
|
|
920
949
|
var t;
|
|
921
|
-
const
|
|
922
|
-
return
|
|
923
|
-
o("div",
|
|
924
|
-
|
|
925
|
-
o("div",
|
|
926
|
-
e.isBind ? (
|
|
950
|
+
const w = v("meta-switch"), y = v("meta-bind-variable"), E = v("meta-code-editor"), x = v("meta-input"), n = v("tiny-tooltip");
|
|
951
|
+
return h(), S("div", no, [
|
|
952
|
+
o("div", io, [
|
|
953
|
+
so,
|
|
954
|
+
o("div", ao, [
|
|
955
|
+
e.isBind ? (h(), S("div", lo, "已绑定:" + L(e.condition.value), 1)) : (h(), U(w, {
|
|
927
956
|
key: 0,
|
|
928
957
|
modelValue: e.condition,
|
|
929
958
|
"onUpdate:modelValue": e.setConfig
|
|
930
959
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])),
|
|
931
|
-
|
|
960
|
+
p(y, {
|
|
932
961
|
modelValue: e.condition,
|
|
933
962
|
"onUpdate:modelValue": [
|
|
934
|
-
i[0] || (i[0] = (
|
|
963
|
+
i[0] || (i[0] = (a) => e.condition = a),
|
|
935
964
|
e.setConfig
|
|
936
965
|
],
|
|
937
966
|
name: "advance"
|
|
938
967
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
939
968
|
])
|
|
940
969
|
]),
|
|
941
|
-
o("div",
|
|
942
|
-
|
|
970
|
+
o("div", co, [
|
|
971
|
+
ro,
|
|
943
972
|
o("div", po, [
|
|
944
|
-
e.state.isLoop ? (
|
|
973
|
+
e.state.isLoop ? (h(), S("div", mo, "已绑定:" + L((t = e.state.loopData) == null ? void 0 : t.value), 1)) : (h(), U(E, {
|
|
945
974
|
key: 0,
|
|
946
975
|
modelValue: e.state.loopData,
|
|
947
976
|
"onUpdate:modelValue": [
|
|
948
|
-
i[1] || (i[1] = (
|
|
977
|
+
i[1] || (i[1] = (a) => e.state.loopData = a),
|
|
949
978
|
e.setLoop
|
|
950
979
|
],
|
|
951
980
|
"data-type": "JSExpression",
|
|
952
981
|
onOpen: e.openEditor
|
|
953
982
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onOpen"])),
|
|
954
|
-
|
|
983
|
+
p(y, {
|
|
955
984
|
modelValue: e.state.loopData,
|
|
956
985
|
"onUpdate:modelValue": [
|
|
957
|
-
i[2] || (i[2] = (
|
|
986
|
+
i[2] || (i[2] = (a) => e.state.loopData = a),
|
|
958
987
|
e.setLoop
|
|
959
988
|
],
|
|
960
989
|
name: "advance"
|
|
961
990
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
962
991
|
])
|
|
963
992
|
]),
|
|
964
|
-
o("div",
|
|
993
|
+
o("div", _o, [
|
|
965
994
|
uo,
|
|
966
|
-
o("div",
|
|
967
|
-
|
|
995
|
+
o("div", vo, [
|
|
996
|
+
p(x, {
|
|
968
997
|
modelValue: e.state.loopItem,
|
|
969
998
|
"onUpdate:modelValue": [
|
|
970
|
-
i[3] || (i[3] = (
|
|
999
|
+
i[3] || (i[3] = (a) => e.state.loopItem = a),
|
|
971
1000
|
e.setLoopItem
|
|
972
1001
|
],
|
|
973
1002
|
placeholder: `默认值为:${e.DEFAULT_LOOP_NAME.ITEM}`
|
|
974
1003
|
}, null, 8, ["modelValue", "placeholder", "onUpdate:modelValue"])
|
|
975
1004
|
])
|
|
976
1005
|
]),
|
|
977
|
-
o("div",
|
|
978
|
-
|
|
979
|
-
o("div",
|
|
980
|
-
|
|
1006
|
+
o("div", fo, [
|
|
1007
|
+
ho,
|
|
1008
|
+
o("div", go, [
|
|
1009
|
+
p(x, {
|
|
981
1010
|
modelValue: e.state.loopIndex,
|
|
982
1011
|
"onUpdate:modelValue": [
|
|
983
|
-
i[4] || (i[4] = (
|
|
1012
|
+
i[4] || (i[4] = (a) => e.state.loopIndex = a),
|
|
984
1013
|
e.setLoopIndex
|
|
985
1014
|
],
|
|
986
1015
|
placeholder: `默认值为:${e.DEFAULT_LOOP_NAME.INDEX}`
|
|
@@ -988,14 +1017,14 @@ function Vo(d, i, k, e, m, g) {
|
|
|
988
1017
|
])
|
|
989
1018
|
]),
|
|
990
1019
|
o("div", bo, [
|
|
991
|
-
|
|
992
|
-
o("div",
|
|
993
|
-
|
|
1020
|
+
yo,
|
|
1021
|
+
o("div", Eo, [
|
|
1022
|
+
p(n, { content: "建议填写循环项中的唯一值(如item.id),如果填写为数字将不保存" }, {
|
|
994
1023
|
default: _(() => [
|
|
995
|
-
|
|
1024
|
+
p(x, {
|
|
996
1025
|
modelValue: e.state.loopKey,
|
|
997
1026
|
"onUpdate:modelValue": [
|
|
998
|
-
i[5] || (i[5] = (
|
|
1027
|
+
i[5] || (i[5] = (a) => e.state.loopKey = a),
|
|
999
1028
|
e.setLoopKey
|
|
1000
1029
|
],
|
|
1001
1030
|
placeholder: `默认为索引名:${e.getIndexName()}`
|
|
@@ -1007,30 +1036,30 @@ function Vo(d, i, k, e, m, g) {
|
|
|
1007
1036
|
])
|
|
1008
1037
|
]);
|
|
1009
1038
|
}
|
|
1010
|
-
const
|
|
1039
|
+
const xo = /* @__PURE__ */ oe(oo, [["render", ko], ["__scopeId", "data-v-ef405cbc"]]), Vo = {
|
|
1011
1040
|
__name: "Main",
|
|
1012
|
-
setup(
|
|
1013
|
-
const i =
|
|
1014
|
-
return (
|
|
1041
|
+
setup(l) {
|
|
1042
|
+
const i = K(["bindEvent", "advancedConfig"]);
|
|
1043
|
+
return (b, e) => (h(), U(O(je), {
|
|
1015
1044
|
modelValue: i.value,
|
|
1016
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
1045
|
+
"onUpdate:modelValue": e[0] || (e[0] = (c) => i.value = c)
|
|
1017
1046
|
}, {
|
|
1018
1047
|
default: _(() => [
|
|
1019
|
-
|
|
1048
|
+
p(O(xe), {
|
|
1020
1049
|
title: "事件绑定",
|
|
1021
1050
|
name: "bindEvent"
|
|
1022
1051
|
}, {
|
|
1023
1052
|
default: _(() => [
|
|
1024
|
-
|
|
1053
|
+
p(to)
|
|
1025
1054
|
]),
|
|
1026
1055
|
_: 1
|
|
1027
1056
|
}),
|
|
1028
|
-
|
|
1057
|
+
p(O(xe), {
|
|
1029
1058
|
title: "高级配置",
|
|
1030
1059
|
name: "advancedConfig"
|
|
1031
1060
|
}, {
|
|
1032
1061
|
default: _(() => [
|
|
1033
|
-
|
|
1062
|
+
p(xo)
|
|
1034
1063
|
]),
|
|
1035
1064
|
_: 1
|
|
1036
1065
|
})
|
|
@@ -1038,14 +1067,14 @@ const Io = /* @__PURE__ */ pe(no, [["render", Vo], ["__scopeId", "data-v-ef405cb
|
|
|
1038
1067
|
_: 1
|
|
1039
1068
|
}, 8, ["modelValue"]));
|
|
1040
1069
|
}
|
|
1041
|
-
},
|
|
1070
|
+
}, Lo = {
|
|
1042
1071
|
id: "SettingEvents",
|
|
1043
1072
|
name: "event",
|
|
1044
1073
|
title: "高级",
|
|
1045
1074
|
icon: "",
|
|
1046
1075
|
align: "left",
|
|
1047
|
-
component:
|
|
1076
|
+
component: Vo
|
|
1048
1077
|
};
|
|
1049
1078
|
export {
|
|
1050
|
-
|
|
1079
|
+
Lo as default
|
|
1051
1080
|
};
|