devject-design 0.1.1 → 0.1.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/README.md +35 -0
- package/dist/index.es.js +1275 -1242
- package/dist/index.umd.js +1 -1
- package/dist/pages/FormDesigner.d.ts +6 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { ElMessage as
|
|
3
|
-
import * as
|
|
4
|
-
function
|
|
1
|
+
import { ref as I, computed as $, reactive as ul, watch as q, defineComponent as J, createElementBlock as f, openBlock as a, normalizeClass as Be, resolveComponent as w, withModifiers as Ye, createElementVNode as y, createVNode as o, withCtx as i, createTextVNode as z, toDisplayString as te, normalizeStyle as He, Fragment as D, renderList as B, createCommentVNode as Q, createBlock as x, resolveDynamicComponent as rl, onMounted as Xe, unref as ye } from "vue";
|
|
2
|
+
import { ElMessage as ge } from "element-plus";
|
|
3
|
+
import * as Ce from "xlsx";
|
|
4
|
+
function j(e) {
|
|
5
5
|
if (typeof crypto < "u" && "randomUUID" in crypto)
|
|
6
6
|
return `${e}_${crypto.randomUUID()}`;
|
|
7
7
|
const l = Math.random().toString(16).slice(2), t = Date.now().toString(16);
|
|
8
8
|
return `${e}_${t}_${l}`;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function il() {
|
|
11
11
|
return {
|
|
12
12
|
version: 1,
|
|
13
13
|
root: {
|
|
@@ -15,7 +15,7 @@ function rl() {
|
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Ue() {
|
|
19
19
|
const e = (/* @__PURE__ */ new Date()).toISOString();
|
|
20
20
|
return {
|
|
21
21
|
createdAt: e,
|
|
@@ -23,59 +23,59 @@ function ke() {
|
|
|
23
23
|
style: {}
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function K(e) {
|
|
27
27
|
return JSON.parse(JSON.stringify(e));
|
|
28
28
|
}
|
|
29
29
|
function dl(e) {
|
|
30
30
|
if (e === "flexRow") {
|
|
31
|
-
const t =
|
|
31
|
+
const t = j("row"), r = 2;
|
|
32
32
|
return {
|
|
33
33
|
id: t,
|
|
34
34
|
type: "flexRow",
|
|
35
|
-
meta:
|
|
35
|
+
meta: Ue(),
|
|
36
36
|
props: {
|
|
37
37
|
cols: r,
|
|
38
38
|
gap: 12
|
|
39
39
|
},
|
|
40
|
-
columns: new Array(r).fill(0).map((
|
|
41
|
-
id:
|
|
40
|
+
columns: new Array(r).fill(0).map((m, h) => ({
|
|
41
|
+
id: j(`col${h + 1}`),
|
|
42
42
|
children: []
|
|
43
43
|
}))
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
if (e === "collapse")
|
|
47
47
|
return {
|
|
48
|
-
id:
|
|
48
|
+
id: j("collapse"),
|
|
49
49
|
type: "collapse",
|
|
50
|
-
meta:
|
|
50
|
+
meta: Ue(),
|
|
51
51
|
props: {
|
|
52
52
|
accordion: !1
|
|
53
53
|
},
|
|
54
54
|
items: [
|
|
55
|
-
{ id:
|
|
56
|
-
{ id:
|
|
55
|
+
{ id: j("item"), title: "面板 1", name: j("val"), children: [] },
|
|
56
|
+
{ id: j("item"), title: "面板 2", name: j("val"), children: [] }
|
|
57
57
|
]
|
|
58
58
|
};
|
|
59
59
|
if (e === "tabs")
|
|
60
60
|
return {
|
|
61
|
-
id:
|
|
61
|
+
id: j("tabs"),
|
|
62
62
|
type: "tabs",
|
|
63
|
-
meta:
|
|
63
|
+
meta: Ue(),
|
|
64
64
|
props: {
|
|
65
65
|
type: "card"
|
|
66
66
|
},
|
|
67
67
|
tabs: [
|
|
68
|
-
{ id:
|
|
69
|
-
{ id:
|
|
68
|
+
{ id: j("tab"), label: "标签页 1", children: [] },
|
|
69
|
+
{ id: j("tab"), label: "标签页 2", children: [] }
|
|
70
70
|
]
|
|
71
71
|
};
|
|
72
72
|
const l = {
|
|
73
|
-
id:
|
|
73
|
+
id: j(e),
|
|
74
74
|
type: e,
|
|
75
|
-
meta:
|
|
75
|
+
meta: Ue(),
|
|
76
76
|
props: {
|
|
77
77
|
label: "字段",
|
|
78
|
-
field:
|
|
78
|
+
field: j("field"),
|
|
79
79
|
placeholder: "请输入",
|
|
80
80
|
required: !1
|
|
81
81
|
}
|
|
@@ -126,15 +126,15 @@ function dl(e) {
|
|
|
126
126
|
limit: 3
|
|
127
127
|
}
|
|
128
128
|
} : e === "table" ? {
|
|
129
|
-
id:
|
|
129
|
+
id: j("table"),
|
|
130
130
|
type: "table",
|
|
131
|
-
meta:
|
|
131
|
+
meta: Ue(),
|
|
132
132
|
props: {
|
|
133
133
|
label: "表格",
|
|
134
|
-
field:
|
|
134
|
+
field: j("table-field"),
|
|
135
135
|
columns: [
|
|
136
|
-
{ id:
|
|
137
|
-
{ id:
|
|
136
|
+
{ id: j("col"), label: "列1", prop: "col1", type: "text" },
|
|
137
|
+
{ id: j("col"), label: "列2", prop: "col2", type: "number" }
|
|
138
138
|
],
|
|
139
139
|
pagination: !0,
|
|
140
140
|
pageSize: 10,
|
|
@@ -149,75 +149,75 @@ function dl(e) {
|
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
|
-
function
|
|
153
|
-
function t(r,
|
|
154
|
-
const h = r.findIndex((
|
|
155
|
-
if (h >= 0) return { node: r[h], loc: { ...
|
|
156
|
-
for (const
|
|
157
|
-
if (
|
|
158
|
-
for (let u = 0; u <
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
152
|
+
function we(e, l) {
|
|
153
|
+
function t(r, m) {
|
|
154
|
+
const h = r.findIndex((V) => V.id === l);
|
|
155
|
+
if (h >= 0) return { node: r[h], loc: { ...m, index: h } };
|
|
156
|
+
for (const V of r)
|
|
157
|
+
if (V.type === "flexRow")
|
|
158
|
+
for (let u = 0; u < V.columns.length; u += 1) {
|
|
159
|
+
const b = t(V.columns[u].children, { kind: "flexCol", rowId: V.id, colIndex: u, index: 0 });
|
|
160
|
+
if (b) return b;
|
|
161
161
|
}
|
|
162
|
-
else if (
|
|
163
|
-
for (const u of
|
|
164
|
-
const
|
|
165
|
-
if (
|
|
162
|
+
else if (V.type === "collapse")
|
|
163
|
+
for (const u of V.items) {
|
|
164
|
+
const b = t(u.children, { kind: "collapse", collapseId: V.id, itemId: u.id, index: 0 });
|
|
165
|
+
if (b) return b;
|
|
166
166
|
}
|
|
167
|
-
else if (
|
|
168
|
-
for (const u of
|
|
169
|
-
const
|
|
170
|
-
if (
|
|
167
|
+
else if (V.type === "tabs")
|
|
168
|
+
for (const u of V.tabs) {
|
|
169
|
+
const b = t(u.children, { kind: "tab", tabsId: V.id, tabId: u.id, index: 0 });
|
|
170
|
+
if (b) return b;
|
|
171
171
|
}
|
|
172
172
|
return null;
|
|
173
173
|
}
|
|
174
174
|
return t(e.root.children, { kind: "root", index: 0 });
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
const t =
|
|
176
|
+
function Ke(e, l) {
|
|
177
|
+
const t = we(e, l);
|
|
178
178
|
if (!t) return null;
|
|
179
|
-
const r = cl(e, t.loc), [
|
|
180
|
-
return
|
|
179
|
+
const r = cl(e, t.loc), [m] = r.splice(t.loc.index, 1);
|
|
180
|
+
return m ?? null;
|
|
181
181
|
}
|
|
182
182
|
function Ge(e, l, t) {
|
|
183
|
-
const r = pl(e, l),
|
|
184
|
-
r.splice(
|
|
183
|
+
const r = pl(e, l), m = Math.max(0, Math.min(l.insertIndex, r.length));
|
|
184
|
+
r.splice(m, 0, t);
|
|
185
185
|
}
|
|
186
186
|
function sl(e, l, t) {
|
|
187
|
-
const r =
|
|
187
|
+
const r = Ke(e, l);
|
|
188
188
|
r && (r.meta.updatedAt = (/* @__PURE__ */ new Date()).toISOString(), Ge(e, t, r));
|
|
189
189
|
}
|
|
190
190
|
function pl(e, l) {
|
|
191
|
-
var
|
|
191
|
+
var m, h, V, u;
|
|
192
192
|
if (l.kind === "root") return e.root.children;
|
|
193
193
|
if (l.kind === "flexCol") {
|
|
194
|
-
const
|
|
195
|
-
return !
|
|
194
|
+
const b = (m = we(e, l.rowId)) == null ? void 0 : m.node;
|
|
195
|
+
return !b || b.type !== "flexRow" ? e.root.children : ((h = b.columns[l.colIndex]) == null ? void 0 : h.children) ?? b.columns[0].children;
|
|
196
196
|
}
|
|
197
197
|
if (l.kind === "collapse") {
|
|
198
|
-
const
|
|
199
|
-
return !
|
|
198
|
+
const b = (V = we(e, l.collapseId)) == null ? void 0 : V.node;
|
|
199
|
+
return !b || b.type !== "collapse" ? e.root.children : (b.items.find((E) => E.id === l.itemId) ?? b.items[0]).children;
|
|
200
200
|
}
|
|
201
|
-
const t = (u =
|
|
202
|
-
return !t || t.type !== "tabs" ? e.root.children : (t.tabs.find((
|
|
201
|
+
const t = (u = we(e, l.tabsId)) == null ? void 0 : u.node;
|
|
202
|
+
return !t || t.type !== "tabs" ? e.root.children : (t.tabs.find((b) => b.id === l.tabId) ?? t.tabs[0]).children;
|
|
203
203
|
}
|
|
204
204
|
function cl(e, l) {
|
|
205
|
-
var
|
|
205
|
+
var m, h, V, u;
|
|
206
206
|
if (l.kind === "root") return e.root.children;
|
|
207
207
|
if (l.kind === "flexCol") {
|
|
208
|
-
const
|
|
209
|
-
return !
|
|
208
|
+
const b = (m = we(e, l.rowId)) == null ? void 0 : m.node;
|
|
209
|
+
return !b || b.type !== "flexRow" ? e.root.children : ((h = b.columns[l.colIndex]) == null ? void 0 : h.children) ?? b.columns[0].children;
|
|
210
210
|
}
|
|
211
211
|
if (l.kind === "collapse") {
|
|
212
|
-
const
|
|
213
|
-
return !
|
|
212
|
+
const b = (V = we(e, l.collapseId)) == null ? void 0 : V.node;
|
|
213
|
+
return !b || b.type !== "collapse" ? e.root.children : (b.items.find((E) => E.id === l.itemId) ?? b.items[0]).children;
|
|
214
214
|
}
|
|
215
|
-
const t = (u =
|
|
216
|
-
return !t || t.type !== "tabs" ? e.root.children : (t.tabs.find((
|
|
215
|
+
const t = (u = we(e, l.tabsId)) == null ? void 0 : u.node;
|
|
216
|
+
return !t || t.type !== "tabs" ? e.root.children : (t.tabs.find((b) => b.id === l.tabId) ?? t.tabs[0]).children;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
const
|
|
220
|
-
return r.kind === "root" || u === "flexRow" ?
|
|
218
|
+
function Je(e, l, t, r) {
|
|
219
|
+
const m = t === "input" || t === "textarea" || t === "select" || t === "radio" || t === "checkbox" || t === "switch" || t === "image-upload" || t === "file-upload" || t === "table" || t === "title", h = t === "collapse" || t === "tabs", V = t === "flexRow", u = ml(e, r);
|
|
220
|
+
return r.kind === "root" || u === "flexRow" ? V || h || m : u === "collapse" || u === "tabs" ? m || V : !1;
|
|
221
221
|
}
|
|
222
222
|
function ml(e, l) {
|
|
223
223
|
return l.kind === "root" ? "root" : l.kind === "flexCol" ? "flexRow" : l.kind === "collapse" ? "collapse" : "tabs";
|
|
@@ -228,17 +228,17 @@ function fl(e) {
|
|
|
228
228
|
if (l.version !== 1) throw new Error("invalid");
|
|
229
229
|
if (!l.root || !Array.isArray(l.root.children)) throw new Error("invalid");
|
|
230
230
|
for (const t of l.root.children)
|
|
231
|
-
|
|
231
|
+
Re(t);
|
|
232
232
|
return l;
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function Re(e) {
|
|
235
235
|
if (!e || typeof e != "object") throw new Error("invalid");
|
|
236
|
-
if ((!e.meta || typeof e.meta != "object") && (e.meta =
|
|
236
|
+
if ((!e.meta || typeof e.meta != "object") && (e.meta = Ue()), typeof e.meta.createdAt != "string" && (e.meta.createdAt = (/* @__PURE__ */ new Date()).toISOString()), typeof e.meta.updatedAt != "string" && (e.meta.updatedAt = e.meta.createdAt), (!e.meta.style || typeof e.meta.style != "object") && (e.meta.style = {}), e.type === "flexRow") {
|
|
237
237
|
Array.isArray(e.columns) || (e.columns = []);
|
|
238
238
|
for (const l of e.columns)
|
|
239
239
|
if (!(!l || typeof l != "object")) {
|
|
240
240
|
Array.isArray(l.children) || (l.children = []);
|
|
241
|
-
for (const t of l.children)
|
|
241
|
+
for (const t of l.children) Re(t);
|
|
242
242
|
}
|
|
243
243
|
return;
|
|
244
244
|
}
|
|
@@ -247,7 +247,7 @@ function $e(e) {
|
|
|
247
247
|
for (const l of e.items)
|
|
248
248
|
if (!(!l || typeof l != "object")) {
|
|
249
249
|
Array.isArray(l.children) || (l.children = []);
|
|
250
|
-
for (const t of l.children)
|
|
250
|
+
for (const t of l.children) Re(t);
|
|
251
251
|
}
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
@@ -256,7 +256,7 @@ function $e(e) {
|
|
|
256
256
|
for (const l of e.tabs)
|
|
257
257
|
if (!(!l || typeof l != "object")) {
|
|
258
258
|
Array.isArray(l.children) || (l.children = []);
|
|
259
|
-
for (const t of l.children)
|
|
259
|
+
for (const t of l.children) Re(t);
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
}
|
|
@@ -264,187 +264,187 @@ function vl(e) {
|
|
|
264
264
|
return {
|
|
265
265
|
version: e.version,
|
|
266
266
|
root: {
|
|
267
|
-
children: e.root.children.map((l) =>
|
|
267
|
+
children: e.root.children.map((l) => K(l))
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
270
|
}
|
|
271
271
|
function bl(e) {
|
|
272
|
-
const l =
|
|
273
|
-
function
|
|
274
|
-
l.value.push(
|
|
272
|
+
const l = I([]), t = I(K(e)), r = I([]), m = $(() => l.value.length > 0), h = $(() => r.value.length > 0);
|
|
273
|
+
function V(k) {
|
|
274
|
+
l.value.push(K(t.value)), t.value = K(k), r.value = [];
|
|
275
275
|
}
|
|
276
276
|
function u(k) {
|
|
277
|
-
t.value =
|
|
277
|
+
t.value = K(k);
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function b() {
|
|
280
280
|
if (!l.value.length) return;
|
|
281
281
|
const k = l.value.pop();
|
|
282
|
-
r.value.unshift(
|
|
282
|
+
r.value.unshift(K(t.value)), t.value = K(k);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function M() {
|
|
285
285
|
if (!r.value.length) return;
|
|
286
286
|
const k = r.value.shift();
|
|
287
|
-
l.value.push(
|
|
287
|
+
l.value.push(K(t.value)), t.value = K(k);
|
|
288
288
|
}
|
|
289
|
-
function
|
|
290
|
-
l.value = [], r.value = [], t.value =
|
|
289
|
+
function E(k) {
|
|
290
|
+
l.value = [], r.value = [], t.value = K(k);
|
|
291
291
|
}
|
|
292
|
-
return { past: l, present: t, future: r, canUndo:
|
|
292
|
+
return { past: l, present: t, future: r, canUndo: m, canRedo: h, push: V, replace: u, undo: b, redo: M, reset: E };
|
|
293
293
|
}
|
|
294
294
|
function yl() {
|
|
295
|
-
const e =
|
|
296
|
-
function
|
|
297
|
-
e.value =
|
|
295
|
+
const e = I(null), l = I(null), t = ul({ x: 0, y: 0 }), r = $(() => !!e.value);
|
|
296
|
+
function m(b, M) {
|
|
297
|
+
e.value = b, t.x = M.clientX, t.y = M.clientY;
|
|
298
298
|
}
|
|
299
|
-
function h(
|
|
300
|
-
t.x =
|
|
299
|
+
function h(b) {
|
|
300
|
+
t.x = b.clientX, t.y = b.clientY;
|
|
301
301
|
}
|
|
302
|
-
function
|
|
303
|
-
l.value =
|
|
302
|
+
function V(b) {
|
|
303
|
+
l.value = b;
|
|
304
304
|
}
|
|
305
305
|
function u() {
|
|
306
306
|
e.value = null, l.value = null;
|
|
307
307
|
}
|
|
308
|
-
return { dragging: e, hoverTarget: l, pointer: t, isDragging: r, begin:
|
|
308
|
+
return { dragging: e, hoverTarget: l, pointer: t, isDragging: r, begin: m, move: h, setHover: V, end: u };
|
|
309
309
|
}
|
|
310
|
-
const
|
|
311
|
-
function
|
|
310
|
+
const oe = bl(il()), he = I(null), ae = yl(), De = I({});
|
|
311
|
+
function Te() {
|
|
312
312
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
313
313
|
}
|
|
314
|
-
function
|
|
315
|
-
|
|
314
|
+
function xe(e) {
|
|
315
|
+
oe.push(e);
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function _l(e) {
|
|
318
318
|
const l = fl(e);
|
|
319
|
-
|
|
319
|
+
he.value = null, oe.reset(K(l));
|
|
320
320
|
}
|
|
321
|
-
function
|
|
322
|
-
|
|
321
|
+
function gl(e) {
|
|
322
|
+
he.value = e;
|
|
323
323
|
}
|
|
324
324
|
function Ze() {
|
|
325
|
-
const e =
|
|
325
|
+
const e = he.value;
|
|
326
326
|
if (!e) return;
|
|
327
|
-
const l =
|
|
328
|
-
|
|
327
|
+
const l = K(oe.present.value);
|
|
328
|
+
Ke(l, e) && (xe(l), he.value = null);
|
|
329
329
|
}
|
|
330
330
|
function Vl(e, l) {
|
|
331
331
|
const t = { kind: "palette", nodeType: e };
|
|
332
|
-
|
|
332
|
+
ae.begin(t, l), Qe();
|
|
333
333
|
}
|
|
334
334
|
function wl(e, l) {
|
|
335
335
|
const t = { kind: "node", nodeId: e };
|
|
336
|
-
|
|
336
|
+
ae.begin(t, l), Qe();
|
|
337
337
|
}
|
|
338
|
-
function
|
|
339
|
-
const l =
|
|
338
|
+
function hl(e) {
|
|
339
|
+
const l = ae.dragging.value;
|
|
340
340
|
if (!l) return { accepted: !1, message: "拖拽已结束" };
|
|
341
|
-
const t = Date.now(), r =
|
|
341
|
+
const t = Date.now(), r = K(oe.present.value);
|
|
342
342
|
if (l.kind === "palette") {
|
|
343
|
-
const
|
|
344
|
-
return
|
|
343
|
+
const m = dl(l.nodeType);
|
|
344
|
+
return Je(r, "palette", l.nodeType, e) ? (Ge(r, e, m), xe(r), he.value = m.id, { accepted: !0, durationMs: Date.now() - t }) : (ge.warning("该位置不允许放置此组件"), { accepted: !1, message: "该位置不允许放置此组件", durationMs: Date.now() - t });
|
|
345
345
|
} else {
|
|
346
|
-
const
|
|
347
|
-
return
|
|
346
|
+
const m = Se(r, l.nodeId);
|
|
347
|
+
return m ? Je(r, "node", m.type, e) ? (sl(r, l.nodeId, e), xe(r), he.value = l.nodeId, { accepted: !0, durationMs: Date.now() - t }) : (ge.warning("该位置不允许放置此组件"), { accepted: !1, message: "该位置不允许放置此组件", durationMs: Date.now() - t }) : { accepted: !1, message: "未找到被移动的组件", durationMs: Date.now() - t };
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function Se(e, l) {
|
|
351
351
|
const t = [...e.root.children];
|
|
352
352
|
for (; t.length; ) {
|
|
353
353
|
const r = t.shift();
|
|
354
354
|
if (r.id === l) return r;
|
|
355
355
|
if (r.type === "flexRow")
|
|
356
|
-
for (const
|
|
356
|
+
for (const m of r.columns) t.push(...m.children);
|
|
357
357
|
else if (r.type === "collapse")
|
|
358
|
-
for (const
|
|
358
|
+
for (const m of r.items) t.push(...m.children);
|
|
359
359
|
else if (r.type === "tabs")
|
|
360
|
-
for (const
|
|
360
|
+
for (const m of r.tabs) t.push(...m.children);
|
|
361
361
|
}
|
|
362
362
|
return null;
|
|
363
363
|
}
|
|
364
|
-
let
|
|
364
|
+
let Oe = !1;
|
|
365
365
|
function Qe() {
|
|
366
|
-
|
|
366
|
+
Oe || (Oe = !0, window.addEventListener("pointermove", el), window.addEventListener("pointerup", xl, { once: !0 }));
|
|
367
367
|
}
|
|
368
|
-
function
|
|
369
|
-
|
|
368
|
+
function Pe() {
|
|
369
|
+
Oe && (Oe = !1, window.removeEventListener("pointermove", el));
|
|
370
370
|
}
|
|
371
371
|
function el(e) {
|
|
372
|
-
|
|
373
|
-
const l = tl(e.clientX, e.clientY), t =
|
|
372
|
+
ae.move(e);
|
|
373
|
+
const l = tl(e.clientX, e.clientY), t = ae.hoverTarget.value;
|
|
374
374
|
JSON.stringify(t) !== JSON.stringify(l) && ll(l);
|
|
375
375
|
}
|
|
376
|
-
function
|
|
377
|
-
if (!
|
|
378
|
-
|
|
376
|
+
function xl() {
|
|
377
|
+
if (!ae.dragging.value) {
|
|
378
|
+
ae.end(), Pe();
|
|
379
379
|
return;
|
|
380
380
|
}
|
|
381
|
-
const l =
|
|
381
|
+
const l = ae.hoverTarget.value ?? tl(ae.pointer.x, ae.pointer.y);
|
|
382
382
|
if (!l) {
|
|
383
|
-
|
|
383
|
+
ae.end(), Pe();
|
|
384
384
|
return;
|
|
385
385
|
}
|
|
386
|
-
|
|
386
|
+
hl(l), ae.end(), Pe();
|
|
387
387
|
}
|
|
388
|
-
const kl =
|
|
389
|
-
canUndo:
|
|
390
|
-
canRedo:
|
|
391
|
-
undo: () =>
|
|
392
|
-
redo: () =>
|
|
388
|
+
const kl = $(() => oe.present.value), Cl = {
|
|
389
|
+
canUndo: oe.canUndo,
|
|
390
|
+
canRedo: oe.canRedo,
|
|
391
|
+
undo: () => oe.undo(),
|
|
392
|
+
redo: () => oe.redo()
|
|
393
393
|
}, Ul = {
|
|
394
|
-
selectedNodeId:
|
|
394
|
+
selectedNodeId: he
|
|
395
395
|
};
|
|
396
396
|
function Il(e, l) {
|
|
397
|
-
const t =
|
|
398
|
-
r && (r.props = { ...r.props, ...l }, r.meta.updatedAt =
|
|
397
|
+
const t = K(oe.present.value), r = Se(t, e);
|
|
398
|
+
r && (r.props = { ...r.props, ...l }, r.meta.updatedAt = Te(), xe(t));
|
|
399
399
|
}
|
|
400
400
|
function zl(e, l) {
|
|
401
|
-
const t =
|
|
401
|
+
const t = K(oe.present.value), r = Se(t, e);
|
|
402
402
|
if (!r || r.type !== "flexRow") return;
|
|
403
|
-
const
|
|
404
|
-
if (r.props.cols = l, r.meta.updatedAt =
|
|
405
|
-
for (let h =
|
|
406
|
-
r.columns.push({ id:
|
|
407
|
-
else l <
|
|
408
|
-
|
|
403
|
+
const m = r.columns.length;
|
|
404
|
+
if (r.props.cols = l, r.meta.updatedAt = Te(), l > m)
|
|
405
|
+
for (let h = m; h < l; h += 1)
|
|
406
|
+
r.columns.push({ id: j(`col${h + 1}`), children: [] });
|
|
407
|
+
else l < m && (r.columns = r.columns.slice(0, l));
|
|
408
|
+
xe(t);
|
|
409
409
|
}
|
|
410
410
|
function Dl(e, l) {
|
|
411
|
-
const t =
|
|
411
|
+
const t = K(oe.present.value), r = Se(t, e);
|
|
412
412
|
if (!(!r || r.type !== "collapse")) {
|
|
413
413
|
if (l.accordion !== void 0 && (r.props.accordion = l.accordion), l.items) {
|
|
414
|
-
const
|
|
414
|
+
const m = r.items;
|
|
415
415
|
r.items = l.items.map((h) => {
|
|
416
|
-
const
|
|
417
|
-
return { id: h.id, title: h.title, name: h.name, children: (
|
|
416
|
+
const V = m.find((u) => u.id === h.id);
|
|
417
|
+
return { id: h.id, title: h.title, name: h.name, children: (V == null ? void 0 : V.children) ?? [] };
|
|
418
418
|
});
|
|
419
419
|
}
|
|
420
|
-
r.meta.updatedAt =
|
|
420
|
+
r.meta.updatedAt = Te(), xe(t);
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
function Sl(e, l) {
|
|
424
|
-
const t =
|
|
424
|
+
const t = K(oe.present.value), r = Se(t, e);
|
|
425
425
|
if (!(!r || r.type !== "tabs")) {
|
|
426
426
|
if (l.type && (r.props.type = l.type), l.tabs) {
|
|
427
|
-
const
|
|
427
|
+
const m = r.tabs;
|
|
428
428
|
r.tabs = l.tabs.map((h) => {
|
|
429
|
-
const
|
|
430
|
-
return { id: h.id, label: h.label, children: (
|
|
429
|
+
const V = m.find((u) => u.id === h.id);
|
|
430
|
+
return { id: h.id, label: h.label, children: (V == null ? void 0 : V.children) ?? [] };
|
|
431
431
|
});
|
|
432
432
|
}
|
|
433
|
-
r.meta.updatedAt =
|
|
433
|
+
r.meta.updatedAt = Te(), xe(t);
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
function ll(e) {
|
|
437
|
-
const l =
|
|
438
|
-
JSON.stringify(l) !== JSON.stringify(e) &&
|
|
437
|
+
const l = ae.hoverTarget.value;
|
|
438
|
+
JSON.stringify(l) !== JSON.stringify(e) && ae.setHover(e);
|
|
439
439
|
}
|
|
440
440
|
function tl(e, l) {
|
|
441
441
|
var h;
|
|
442
442
|
const t = document.elementFromPoint(e, l);
|
|
443
443
|
if (!t) return null;
|
|
444
|
-
const r = (h = t.closest) == null ? void 0 : h.call(t, "[data-drop-target]"),
|
|
445
|
-
if (!
|
|
444
|
+
const r = (h = t.closest) == null ? void 0 : h.call(t, "[data-drop-target]"), m = r == null ? void 0 : r.getAttribute("data-drop-target");
|
|
445
|
+
if (!m) return null;
|
|
446
446
|
try {
|
|
447
|
-
return JSON.parse(
|
|
447
|
+
return JSON.parse(m);
|
|
448
448
|
} catch {
|
|
449
449
|
return null;
|
|
450
450
|
}
|
|
@@ -452,27 +452,27 @@ function tl(e, l) {
|
|
|
452
452
|
function $l() {
|
|
453
453
|
window.addEventListener("keydown", (e) => {
|
|
454
454
|
if (e.ctrlKey && (e.key === "z" || e.key === "Z")) {
|
|
455
|
-
e.preventDefault(),
|
|
455
|
+
e.preventDefault(), oe.undo();
|
|
456
456
|
return;
|
|
457
457
|
}
|
|
458
458
|
if (e.ctrlKey && (e.key === "y" || e.key === "Y")) {
|
|
459
|
-
e.preventDefault(),
|
|
459
|
+
e.preventDefault(), oe.redo();
|
|
460
460
|
return;
|
|
461
461
|
}
|
|
462
462
|
e.key === "Delete" && Ze();
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
|
-
let
|
|
466
|
-
|
|
467
|
-
() =>
|
|
465
|
+
let Le = null;
|
|
466
|
+
q(
|
|
467
|
+
() => oe.present.value,
|
|
468
468
|
(e) => {
|
|
469
|
-
|
|
469
|
+
Le && window.clearTimeout(Le), Le = window.setTimeout(() => {
|
|
470
470
|
}, 800);
|
|
471
471
|
},
|
|
472
472
|
{ deep: !0 }
|
|
473
473
|
);
|
|
474
|
-
|
|
475
|
-
() =>
|
|
474
|
+
q(
|
|
475
|
+
() => De.value,
|
|
476
476
|
(e) => {
|
|
477
477
|
},
|
|
478
478
|
{ deep: !0 }
|
|
@@ -480,27 +480,27 @@ Y(
|
|
|
480
480
|
function Nl() {
|
|
481
481
|
}
|
|
482
482
|
function Ml(e) {
|
|
483
|
-
|
|
483
|
+
De.value = e;
|
|
484
484
|
}
|
|
485
|
-
function
|
|
486
|
-
return
|
|
485
|
+
function Rl() {
|
|
486
|
+
return K(De.value);
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function Hl(e) {
|
|
489
489
|
if (!e || typeof e != "object") throw new Error("invalid");
|
|
490
|
-
|
|
490
|
+
De.value = e;
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function Ve() {
|
|
493
493
|
return {
|
|
494
494
|
schema: kl,
|
|
495
495
|
history: Cl,
|
|
496
496
|
selection: Ul,
|
|
497
|
-
drag:
|
|
498
|
-
formData:
|
|
499
|
-
select:
|
|
497
|
+
drag: ae,
|
|
498
|
+
formData: De,
|
|
499
|
+
select: gl,
|
|
500
500
|
beginPaletteDrag: Vl,
|
|
501
501
|
beginNodeDrag: wl,
|
|
502
502
|
setHover: ll,
|
|
503
|
-
applySchema:
|
|
503
|
+
applySchema: _l,
|
|
504
504
|
removeSelected: Ze,
|
|
505
505
|
updateNodeProps: Il,
|
|
506
506
|
updateFlexCols: zl,
|
|
@@ -509,60 +509,60 @@ function ye() {
|
|
|
509
509
|
bindHotkeys: $l,
|
|
510
510
|
loadAutoSave: Nl,
|
|
511
511
|
setFormData: Ml,
|
|
512
|
-
exportFormData:
|
|
513
|
-
importFormData:
|
|
512
|
+
exportFormData: Rl,
|
|
513
|
+
importFormData: Hl
|
|
514
514
|
};
|
|
515
515
|
}
|
|
516
|
-
const Ol = ["data-drop-target"],
|
|
516
|
+
const Ol = ["data-drop-target"], Tl = /* @__PURE__ */ J({
|
|
517
517
|
__name: "DropLine",
|
|
518
518
|
props: {
|
|
519
519
|
target: {}
|
|
520
520
|
},
|
|
521
521
|
setup(e) {
|
|
522
|
-
const l = e, { drag: t, schema: r, setHover:
|
|
522
|
+
const l = e, { drag: t, schema: r, setHover: m } = Ve(), h = $(() => JSON.stringify(l.target)), V = $(() => {
|
|
523
523
|
const k = t.hoverTarget.value;
|
|
524
524
|
return k ? JSON.stringify(k) === JSON.stringify(l.target) : !1;
|
|
525
|
-
}), u =
|
|
525
|
+
}), u = $(() => {
|
|
526
526
|
const k = t.dragging.value;
|
|
527
527
|
if (!k) return !1;
|
|
528
|
-
const
|
|
529
|
-
return
|
|
528
|
+
const C = k.kind === "palette" ? k.nodeType : b(k.nodeId);
|
|
529
|
+
return C ? !Je(r.value, k.kind, C, l.target) : !1;
|
|
530
530
|
});
|
|
531
|
-
function
|
|
532
|
-
const
|
|
533
|
-
for (;
|
|
534
|
-
const
|
|
535
|
-
if (
|
|
536
|
-
if (
|
|
537
|
-
for (const
|
|
538
|
-
else if (
|
|
539
|
-
for (const
|
|
540
|
-
else if (
|
|
541
|
-
for (const
|
|
531
|
+
function b(k) {
|
|
532
|
+
const C = [...r.value.root.children];
|
|
533
|
+
for (; C.length; ) {
|
|
534
|
+
const N = C.shift();
|
|
535
|
+
if (N.id === k) return N.type;
|
|
536
|
+
if (N.type === "flexRow")
|
|
537
|
+
for (const F of N.columns) C.push(...F.children);
|
|
538
|
+
else if (N.type === "collapse")
|
|
539
|
+
for (const F of N.items) C.push(...F.children);
|
|
540
|
+
else if (N.type === "tabs")
|
|
541
|
+
for (const F of N.tabs) C.push(...F.children);
|
|
542
542
|
}
|
|
543
543
|
return null;
|
|
544
544
|
}
|
|
545
|
-
function
|
|
546
|
-
t.isDragging.value &&
|
|
545
|
+
function M() {
|
|
546
|
+
t.isDragging.value && m(l.target);
|
|
547
547
|
}
|
|
548
|
-
function
|
|
549
|
-
t.isDragging.value &&
|
|
548
|
+
function E() {
|
|
549
|
+
t.isDragging.value && m(null);
|
|
550
550
|
}
|
|
551
|
-
return (k,
|
|
552
|
-
class:
|
|
551
|
+
return (k, C) => (a(), f("div", {
|
|
552
|
+
class: Be(["line", { active: V.value, forbidden: u.value }]),
|
|
553
553
|
"data-drop-target": h.value,
|
|
554
|
-
onMouseenter:
|
|
555
|
-
onMouseleave:
|
|
556
|
-
onPointerenter:
|
|
557
|
-
onPointerleave:
|
|
554
|
+
onMouseenter: M,
|
|
555
|
+
onMouseleave: E,
|
|
556
|
+
onPointerenter: M,
|
|
557
|
+
onPointerleave: E
|
|
558
558
|
}, null, 42, Ol));
|
|
559
559
|
}
|
|
560
|
-
}),
|
|
560
|
+
}), ve = (e, l) => {
|
|
561
561
|
const t = e.__vccOpts || e;
|
|
562
|
-
for (const [r,
|
|
563
|
-
t[r] =
|
|
562
|
+
for (const [r, m] of l)
|
|
563
|
+
t[r] = m;
|
|
564
564
|
return t;
|
|
565
|
-
},
|
|
565
|
+
}, _e = /* @__PURE__ */ ve(Tl, [["__scopeId", "data-v-677f5a96"]]), Al = { class: "head" }, El = { class: "left" }, Pl = { class: "name" }, Ll = { class: "right" }, Yl = { class: "body" }, Jl = { class: "colTitle" }, Bl = { class: "colBody" }, ql = {
|
|
566
566
|
key: 0,
|
|
567
567
|
class: "colEmpty"
|
|
568
568
|
}, Fl = {
|
|
@@ -571,25 +571,25 @@ const Ol = ["data-drop-target"], Al = /* @__PURE__ */ P({
|
|
|
571
571
|
}, jl = {
|
|
572
572
|
key: 0,
|
|
573
573
|
class: "colEmpty"
|
|
574
|
-
},
|
|
574
|
+
}, Wl = {
|
|
575
575
|
key: 2,
|
|
576
576
|
class: "containerBox"
|
|
577
|
-
},
|
|
577
|
+
}, Xl = {
|
|
578
578
|
key: 0,
|
|
579
579
|
class: "colEmpty"
|
|
580
|
-
},
|
|
580
|
+
}, Kl = {
|
|
581
581
|
key: 3,
|
|
582
582
|
class: "tablePreview"
|
|
583
583
|
}, Gl = {
|
|
584
584
|
key: 4,
|
|
585
585
|
class: "fieldLine"
|
|
586
|
-
}, Zl = { class: "fieldLabel" }, Ql = { class: "fieldMeta" }, et = /* @__PURE__ */
|
|
586
|
+
}, Zl = { class: "fieldLabel" }, Ql = { class: "fieldMeta" }, et = /* @__PURE__ */ J({
|
|
587
587
|
__name: "NodeCard",
|
|
588
588
|
props: {
|
|
589
589
|
node: {}
|
|
590
590
|
},
|
|
591
591
|
setup(e) {
|
|
592
|
-
const l = e, { selection: t, select: r, beginNodeDrag:
|
|
592
|
+
const l = e, { selection: t, select: r, beginNodeDrag: m } = Ve(), h = $(() => t.selectedNodeId.value === l.node.id), V = $(() => l.node.type === "flexRow" ? "布局" : l.node.type === "collapse" || l.node.type === "tabs" ? "容器" : "组件"), u = $(() => {
|
|
593
593
|
if (l.node.type === "flexRow") return `Flex ${l.node.columns.length} 列`;
|
|
594
594
|
if (l.node.type === "collapse") return "折叠面板";
|
|
595
595
|
if (l.node.type === "tabs") return "标签页";
|
|
@@ -600,518 +600,518 @@ const Ol = ["data-drop-target"], Al = /* @__PURE__ */ P({
|
|
|
600
600
|
date: "日期",
|
|
601
601
|
time: "时间",
|
|
602
602
|
datetime: "日期时间"
|
|
603
|
-
},
|
|
604
|
-
return `${l.node.props.label} (${k[
|
|
603
|
+
}, C = l.node.props.inputType ?? "text";
|
|
604
|
+
return `${l.node.props.label} (${k[C] ?? C})`;
|
|
605
605
|
}
|
|
606
606
|
return l.node.props.label;
|
|
607
|
-
}),
|
|
607
|
+
}), b = $(() => l.node.type !== "flexRow" ? {} : {
|
|
608
608
|
display: "grid",
|
|
609
609
|
gap: `${l.node.props.gap ?? 12}px`,
|
|
610
610
|
gridTemplateColumns: `repeat(${l.node.columns.length}, minmax(0, 1fr))`
|
|
611
611
|
});
|
|
612
|
-
function
|
|
612
|
+
function M() {
|
|
613
613
|
r(l.node.id);
|
|
614
614
|
}
|
|
615
|
-
function
|
|
616
|
-
k.button === 0 &&
|
|
615
|
+
function E(k) {
|
|
616
|
+
k.button === 0 && m(l.node.id, k);
|
|
617
617
|
}
|
|
618
|
-
return (k,
|
|
619
|
-
const
|
|
620
|
-
return a(),
|
|
621
|
-
class:
|
|
622
|
-
onClick:
|
|
618
|
+
return (k, C) => {
|
|
619
|
+
const N = w("el-tag"), F = w("el-button"), W = w("NodeCard", !0), L = w("el-collapse-item"), X = w("el-collapse"), ne = w("el-tab-pane"), ee = w("el-tabs"), de = w("el-table-column"), se = w("el-table");
|
|
620
|
+
return a(), f("div", {
|
|
621
|
+
class: Be(["card", { selected: h.value }]),
|
|
622
|
+
onClick: Ye(M, ["stop"])
|
|
623
623
|
}, [
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
o(
|
|
627
|
-
default:
|
|
628
|
-
|
|
624
|
+
y("div", Al, [
|
|
625
|
+
y("div", El, [
|
|
626
|
+
o(N, { size: "small" }, {
|
|
627
|
+
default: i(() => [
|
|
628
|
+
z(te(V.value), 1)
|
|
629
629
|
]),
|
|
630
630
|
_: 1
|
|
631
631
|
}),
|
|
632
|
-
|
|
632
|
+
y("span", Pl, te(u.value), 1)
|
|
633
633
|
]),
|
|
634
|
-
|
|
635
|
-
o(
|
|
634
|
+
y("div", Ll, [
|
|
635
|
+
o(F, {
|
|
636
636
|
size: "small",
|
|
637
637
|
text: "",
|
|
638
|
-
onPointerdown:
|
|
638
|
+
onPointerdown: Ye(E, ["stop"])
|
|
639
639
|
}, {
|
|
640
|
-
default:
|
|
641
|
-
|
|
640
|
+
default: i(() => [...C[0] || (C[0] = [
|
|
641
|
+
z(" 拖拽 ", -1)
|
|
642
642
|
])]),
|
|
643
643
|
_: 1
|
|
644
644
|
})
|
|
645
645
|
])
|
|
646
646
|
]),
|
|
647
|
-
|
|
648
|
-
e.node.type === "flexRow" ? (a(),
|
|
647
|
+
y("div", Yl, [
|
|
648
|
+
e.node.type === "flexRow" ? (a(), f("div", {
|
|
649
649
|
key: 0,
|
|
650
650
|
class: "flexRow",
|
|
651
|
-
style:
|
|
651
|
+
style: He(b.value)
|
|
652
652
|
}, [
|
|
653
|
-
(a(!0),
|
|
654
|
-
key:
|
|
653
|
+
(a(!0), f(D, null, B(e.node.columns, (U, g) => (a(), f("div", {
|
|
654
|
+
key: U.id,
|
|
655
655
|
class: "col"
|
|
656
656
|
}, [
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
o(
|
|
660
|
-
target: { kind: "flexCol", rowId: e.node.id, colIndex:
|
|
657
|
+
y("div", Jl, " 第 " + te(Number(g) + 1) + " 列 ", 1),
|
|
658
|
+
y("div", Bl, [
|
|
659
|
+
o(_e, {
|
|
660
|
+
target: { kind: "flexCol", rowId: e.node.id, colIndex: g, insertIndex: 0 }
|
|
661
661
|
}, null, 8, ["target"]),
|
|
662
|
-
(a(!0),
|
|
663
|
-
key:
|
|
662
|
+
(a(!0), f(D, null, B(U.children, (d, s) => (a(), f(D, {
|
|
663
|
+
key: d.id
|
|
664
664
|
}, [
|
|
665
|
-
o(
|
|
666
|
-
o(
|
|
667
|
-
target: { kind: "flexCol", rowId: e.node.id, colIndex: Number(
|
|
665
|
+
o(W, { node: d }, null, 8, ["node"]),
|
|
666
|
+
o(_e, {
|
|
667
|
+
target: { kind: "flexCol", rowId: e.node.id, colIndex: Number(g), insertIndex: Number(s) + 1 }
|
|
668
668
|
}, null, 8, ["target"])
|
|
669
669
|
], 64))), 128)),
|
|
670
|
-
|
|
670
|
+
U.children.length === 0 ? (a(), f("div", ql, " 拖拽到此列 ")) : Q("", !0)
|
|
671
671
|
])
|
|
672
672
|
]))), 128))
|
|
673
|
-
], 4)) : e.node.type === "collapse" ? (a(),
|
|
674
|
-
o(
|
|
673
|
+
], 4)) : e.node.type === "collapse" ? (a(), f("div", Fl, [
|
|
674
|
+
o(X, {
|
|
675
675
|
accordion: e.node.props.accordion,
|
|
676
676
|
class: "tabsPreview"
|
|
677
677
|
}, {
|
|
678
|
-
default:
|
|
679
|
-
(a(!0),
|
|
680
|
-
key:
|
|
681
|
-
title:
|
|
682
|
-
name:
|
|
678
|
+
default: i(() => [
|
|
679
|
+
(a(!0), f(D, null, B(e.node.items, (U) => (a(), x(L, {
|
|
680
|
+
key: U.id,
|
|
681
|
+
title: U.title,
|
|
682
|
+
name: U.name
|
|
683
683
|
}, {
|
|
684
|
-
default:
|
|
685
|
-
o(
|
|
686
|
-
target: { kind: "collapse", collapseId: e.node.id, itemId:
|
|
684
|
+
default: i(() => [
|
|
685
|
+
o(_e, {
|
|
686
|
+
target: { kind: "collapse", collapseId: e.node.id, itemId: U.id, insertIndex: 0 }
|
|
687
687
|
}, null, 8, ["target"]),
|
|
688
|
-
(a(!0),
|
|
689
|
-
key:
|
|
688
|
+
(a(!0), f(D, null, B(U.children, (g, d) => (a(), f(D, {
|
|
689
|
+
key: g.id
|
|
690
690
|
}, [
|
|
691
|
-
o(
|
|
692
|
-
o(
|
|
693
|
-
target: { kind: "collapse", collapseId: e.node.id, itemId:
|
|
691
|
+
o(W, { node: g }, null, 8, ["node"]),
|
|
692
|
+
o(_e, {
|
|
693
|
+
target: { kind: "collapse", collapseId: e.node.id, itemId: U.id, insertIndex: d + 1 }
|
|
694
694
|
}, null, 8, ["target"])
|
|
695
695
|
], 64))), 128)),
|
|
696
|
-
|
|
696
|
+
U.children.length === 0 ? (a(), f("div", jl, " 拖拽到 " + te(U.title), 1)) : Q("", !0)
|
|
697
697
|
]),
|
|
698
698
|
_: 2
|
|
699
699
|
}, 1032, ["title", "name"]))), 128))
|
|
700
700
|
]),
|
|
701
701
|
_: 1
|
|
702
702
|
}, 8, ["accordion"])
|
|
703
|
-
])) : e.node.type === "tabs" ? (a(),
|
|
704
|
-
o(
|
|
703
|
+
])) : e.node.type === "tabs" ? (a(), f("div", Wl, [
|
|
704
|
+
o(ee, {
|
|
705
705
|
type: e.node.props.type,
|
|
706
706
|
class: "tabsPreview"
|
|
707
707
|
}, {
|
|
708
|
-
default:
|
|
709
|
-
(a(!0),
|
|
710
|
-
key:
|
|
711
|
-
label:
|
|
708
|
+
default: i(() => [
|
|
709
|
+
(a(!0), f(D, null, B(e.node.tabs, (U) => (a(), x(ne, {
|
|
710
|
+
key: U.id,
|
|
711
|
+
label: U.label
|
|
712
712
|
}, {
|
|
713
|
-
default:
|
|
714
|
-
o(
|
|
715
|
-
target: { kind: "tab", tabsId: e.node.id, tabId:
|
|
713
|
+
default: i(() => [
|
|
714
|
+
o(_e, {
|
|
715
|
+
target: { kind: "tab", tabsId: e.node.id, tabId: U.id, insertIndex: 0 }
|
|
716
716
|
}, null, 8, ["target"]),
|
|
717
|
-
(a(!0),
|
|
718
|
-
key:
|
|
717
|
+
(a(!0), f(D, null, B(U.children, (g, d) => (a(), f(D, {
|
|
718
|
+
key: g.id
|
|
719
719
|
}, [
|
|
720
|
-
o(
|
|
721
|
-
o(
|
|
722
|
-
target: { kind: "tab", tabsId: e.node.id, tabId:
|
|
720
|
+
o(W, { node: g }, null, 8, ["node"]),
|
|
721
|
+
o(_e, {
|
|
722
|
+
target: { kind: "tab", tabsId: e.node.id, tabId: U.id, insertIndex: d + 1 }
|
|
723
723
|
}, null, 8, ["target"])
|
|
724
724
|
], 64))), 128)),
|
|
725
|
-
|
|
725
|
+
U.children.length === 0 ? (a(), f("div", Xl, " 拖拽到 " + te(U.label), 1)) : Q("", !0)
|
|
726
726
|
]),
|
|
727
727
|
_: 2
|
|
728
728
|
}, 1032, ["label"]))), 128))
|
|
729
729
|
]),
|
|
730
730
|
_: 1
|
|
731
731
|
}, 8, ["type"])
|
|
732
|
-
])) : e.node.type === "table" ? (a(),
|
|
733
|
-
o(
|
|
732
|
+
])) : e.node.type === "table" ? (a(), f("div", Kl, [
|
|
733
|
+
o(se, {
|
|
734
734
|
data: [],
|
|
735
735
|
border: "",
|
|
736
736
|
size: "small"
|
|
737
737
|
}, {
|
|
738
|
-
default:
|
|
739
|
-
(a(!0),
|
|
740
|
-
key:
|
|
741
|
-
prop:
|
|
742
|
-
label:
|
|
743
|
-
width:
|
|
738
|
+
default: i(() => [
|
|
739
|
+
(a(!0), f(D, null, B(e.node.props.columns, (U) => (a(), x(de, {
|
|
740
|
+
key: U.id,
|
|
741
|
+
prop: U.prop,
|
|
742
|
+
label: U.label,
|
|
743
|
+
width: U.width
|
|
744
744
|
}, null, 8, ["prop", "label", "width"]))), 128))
|
|
745
745
|
]),
|
|
746
746
|
_: 1
|
|
747
747
|
})
|
|
748
|
-
])) : (a(),
|
|
749
|
-
|
|
750
|
-
|
|
748
|
+
])) : (a(), f("div", Gl, [
|
|
749
|
+
y("span", Zl, te(e.node.props.label), 1),
|
|
750
|
+
y("span", Ql, "(" + te(e.node.type) + ")", 1)
|
|
751
751
|
]))
|
|
752
752
|
])
|
|
753
753
|
], 2);
|
|
754
754
|
};
|
|
755
755
|
}
|
|
756
|
-
}), lt = /* @__PURE__ */
|
|
756
|
+
}), lt = /* @__PURE__ */ ve(et, [["__scopeId", "data-v-7c887642"]]), tt = { class: "root" }, ot = { class: "panel" }, nt = /* @__PURE__ */ J({
|
|
757
757
|
__name: "Canvas",
|
|
758
758
|
setup(e) {
|
|
759
|
-
const { schema: l } =
|
|
760
|
-
return (r,
|
|
761
|
-
const h =
|
|
762
|
-
return a(),
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
o(
|
|
766
|
-
(a(!0),
|
|
767
|
-
key:
|
|
759
|
+
const { schema: l } = Ve(), t = $(() => l.value);
|
|
760
|
+
return (r, m) => {
|
|
761
|
+
const h = w("el-empty");
|
|
762
|
+
return a(), f("div", tt, [
|
|
763
|
+
m[0] || (m[0] = y("div", { class: "title" }, " 画布 ", -1)),
|
|
764
|
+
y("div", ot, [
|
|
765
|
+
o(_e, { target: { kind: "root", insertIndex: 0 } }),
|
|
766
|
+
(a(!0), f(D, null, B(t.value.root.children, (V, u) => (a(), f(D, {
|
|
767
|
+
key: V.id
|
|
768
768
|
}, [
|
|
769
|
-
o(lt, { node:
|
|
770
|
-
o(
|
|
769
|
+
o(lt, { node: V }, null, 8, ["node"]),
|
|
770
|
+
o(_e, {
|
|
771
771
|
target: { kind: "root", insertIndex: Number(u) + 1 }
|
|
772
772
|
}, null, 8, ["target"])
|
|
773
773
|
], 64))), 128)),
|
|
774
|
-
t.value.root.children.length === 0 ? (a(),
|
|
774
|
+
t.value.root.children.length === 0 ? (a(), x(h, {
|
|
775
775
|
key: 0,
|
|
776
776
|
description: "从左侧拖拽组件到此处"
|
|
777
|
-
})) :
|
|
777
|
+
})) : Q("", !0)
|
|
778
778
|
])
|
|
779
779
|
]);
|
|
780
780
|
};
|
|
781
781
|
}
|
|
782
|
-
}), at = /* @__PURE__ */
|
|
782
|
+
}), at = /* @__PURE__ */ ve(nt, [["__scopeId", "data-v-e6a28470"]]);
|
|
783
783
|
/*! Element Plus Icons Vue v2.3.2 */
|
|
784
|
-
var ut = /* @__PURE__ */
|
|
784
|
+
var ut = /* @__PURE__ */ J({
|
|
785
785
|
name: "ArrowDown",
|
|
786
786
|
__name: "arrow-down",
|
|
787
787
|
setup(e) {
|
|
788
|
-
return (l, t) => (a(),
|
|
788
|
+
return (l, t) => (a(), f("svg", {
|
|
789
789
|
xmlns: "http://www.w3.org/2000/svg",
|
|
790
790
|
viewBox: "0 0 1024 1024"
|
|
791
791
|
}, [
|
|
792
|
-
|
|
792
|
+
y("path", {
|
|
793
793
|
fill: "currentColor",
|
|
794
794
|
d: "M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"
|
|
795
795
|
})
|
|
796
796
|
]));
|
|
797
797
|
}
|
|
798
|
-
}),
|
|
798
|
+
}), rt = ut, it = /* @__PURE__ */ J({
|
|
799
799
|
name: "CircleCheck",
|
|
800
800
|
__name: "circle-check",
|
|
801
801
|
setup(e) {
|
|
802
|
-
return (l, t) => (a(),
|
|
802
|
+
return (l, t) => (a(), f("svg", {
|
|
803
803
|
xmlns: "http://www.w3.org/2000/svg",
|
|
804
804
|
viewBox: "0 0 1024 1024"
|
|
805
805
|
}, [
|
|
806
|
-
|
|
806
|
+
y("path", {
|
|
807
807
|
fill: "currentColor",
|
|
808
808
|
d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
|
|
809
809
|
}),
|
|
810
|
-
|
|
810
|
+
y("path", {
|
|
811
811
|
fill: "currentColor",
|
|
812
812
|
d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752z"
|
|
813
813
|
})
|
|
814
814
|
]));
|
|
815
815
|
}
|
|
816
|
-
}), dt =
|
|
816
|
+
}), dt = it, st = /* @__PURE__ */ J({
|
|
817
817
|
name: "Delete",
|
|
818
818
|
__name: "delete",
|
|
819
819
|
setup(e) {
|
|
820
|
-
return (l, t) => (a(),
|
|
820
|
+
return (l, t) => (a(), f("svg", {
|
|
821
821
|
xmlns: "http://www.w3.org/2000/svg",
|
|
822
822
|
viewBox: "0 0 1024 1024"
|
|
823
823
|
}, [
|
|
824
|
-
|
|
824
|
+
y("path", {
|
|
825
825
|
fill: "currentColor",
|
|
826
826
|
d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"
|
|
827
827
|
})
|
|
828
828
|
]));
|
|
829
829
|
}
|
|
830
|
-
}), Fe = st, pt = /* @__PURE__ */
|
|
830
|
+
}), Fe = st, pt = /* @__PURE__ */ J({
|
|
831
831
|
name: "Document",
|
|
832
832
|
__name: "document",
|
|
833
833
|
setup(e) {
|
|
834
|
-
return (l, t) => (a(),
|
|
834
|
+
return (l, t) => (a(), f("svg", {
|
|
835
835
|
xmlns: "http://www.w3.org/2000/svg",
|
|
836
836
|
viewBox: "0 0 1024 1024"
|
|
837
837
|
}, [
|
|
838
|
-
|
|
838
|
+
y("path", {
|
|
839
839
|
fill: "currentColor",
|
|
840
840
|
d: "M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"
|
|
841
841
|
})
|
|
842
842
|
]));
|
|
843
843
|
}
|
|
844
|
-
}), ct = pt, mt = /* @__PURE__ */
|
|
844
|
+
}), ct = pt, mt = /* @__PURE__ */ J({
|
|
845
845
|
name: "Download",
|
|
846
846
|
__name: "download",
|
|
847
847
|
setup(e) {
|
|
848
|
-
return (l, t) => (a(),
|
|
848
|
+
return (l, t) => (a(), f("svg", {
|
|
849
849
|
xmlns: "http://www.w3.org/2000/svg",
|
|
850
850
|
viewBox: "0 0 1024 1024"
|
|
851
851
|
}, [
|
|
852
|
-
|
|
852
|
+
y("path", {
|
|
853
853
|
fill: "currentColor",
|
|
854
854
|
d: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"
|
|
855
855
|
})
|
|
856
856
|
]));
|
|
857
857
|
}
|
|
858
|
-
}), ft = mt, vt = /* @__PURE__ */
|
|
858
|
+
}), ft = mt, vt = /* @__PURE__ */ J({
|
|
859
859
|
name: "Edit",
|
|
860
860
|
__name: "edit",
|
|
861
861
|
setup(e) {
|
|
862
|
-
return (l, t) => (a(),
|
|
862
|
+
return (l, t) => (a(), f("svg", {
|
|
863
863
|
xmlns: "http://www.w3.org/2000/svg",
|
|
864
864
|
viewBox: "0 0 1024 1024"
|
|
865
865
|
}, [
|
|
866
|
-
|
|
866
|
+
y("path", {
|
|
867
867
|
fill: "currentColor",
|
|
868
868
|
d: "M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"
|
|
869
869
|
}),
|
|
870
|
-
|
|
870
|
+
y("path", {
|
|
871
871
|
fill: "currentColor",
|
|
872
872
|
d: "m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"
|
|
873
873
|
})
|
|
874
874
|
]));
|
|
875
875
|
}
|
|
876
|
-
}), je = vt, bt = /* @__PURE__ */
|
|
876
|
+
}), je = vt, bt = /* @__PURE__ */ J({
|
|
877
877
|
name: "Files",
|
|
878
878
|
__name: "files",
|
|
879
879
|
setup(e) {
|
|
880
|
-
return (l, t) => (a(),
|
|
880
|
+
return (l, t) => (a(), f("svg", {
|
|
881
881
|
xmlns: "http://www.w3.org/2000/svg",
|
|
882
882
|
viewBox: "0 0 1024 1024"
|
|
883
883
|
}, [
|
|
884
|
-
|
|
884
|
+
y("path", {
|
|
885
885
|
fill: "currentColor",
|
|
886
886
|
d: "M128 384v448h768V384zm-32-64h832a32 32 0 0 1 32 32v512a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V352a32 32 0 0 1 32-32m64-128h704v64H160zm96-128h512v64H256z"
|
|
887
887
|
})
|
|
888
888
|
]));
|
|
889
889
|
}
|
|
890
|
-
}), yt = bt,
|
|
890
|
+
}), yt = bt, _t = /* @__PURE__ */ J({
|
|
891
891
|
name: "Fold",
|
|
892
892
|
__name: "fold",
|
|
893
893
|
setup(e) {
|
|
894
|
-
return (l, t) => (a(),
|
|
894
|
+
return (l, t) => (a(), f("svg", {
|
|
895
895
|
xmlns: "http://www.w3.org/2000/svg",
|
|
896
896
|
viewBox: "0 0 1024 1024"
|
|
897
897
|
}, [
|
|
898
|
-
|
|
898
|
+
y("path", {
|
|
899
899
|
fill: "currentColor",
|
|
900
900
|
d: "M896 192H128v128h768zm0 256H384v128h512zm0 256H128v128h768zM320 384 128 512l192 128z"
|
|
901
901
|
})
|
|
902
902
|
]));
|
|
903
903
|
}
|
|
904
|
-
}),
|
|
904
|
+
}), gt = _t, Vt = /* @__PURE__ */ J({
|
|
905
905
|
name: "Grid",
|
|
906
906
|
__name: "grid",
|
|
907
907
|
setup(e) {
|
|
908
|
-
return (l, t) => (a(),
|
|
908
|
+
return (l, t) => (a(), f("svg", {
|
|
909
909
|
xmlns: "http://www.w3.org/2000/svg",
|
|
910
910
|
viewBox: "0 0 1024 1024"
|
|
911
911
|
}, [
|
|
912
|
-
|
|
912
|
+
y("path", {
|
|
913
913
|
fill: "currentColor",
|
|
914
914
|
d: "M640 384v256H384V384zm64 0h192v256H704zm-64 512H384V704h256zm64 0V704h192v192zm-64-768v192H384V128zm64 0h192v192H704zM320 384v256H128V384zm0 512H128V704h192zm0-768v192H128V128z"
|
|
915
915
|
})
|
|
916
916
|
]));
|
|
917
917
|
}
|
|
918
|
-
}), wt = Vt,
|
|
918
|
+
}), wt = Vt, ht = /* @__PURE__ */ J({
|
|
919
919
|
name: "Menu",
|
|
920
920
|
__name: "menu",
|
|
921
921
|
setup(e) {
|
|
922
|
-
return (l, t) => (a(),
|
|
922
|
+
return (l, t) => (a(), f("svg", {
|
|
923
923
|
xmlns: "http://www.w3.org/2000/svg",
|
|
924
924
|
viewBox: "0 0 1024 1024"
|
|
925
925
|
}, [
|
|
926
|
-
|
|
926
|
+
y("path", {
|
|
927
927
|
fill: "currentColor",
|
|
928
928
|
d: "M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"
|
|
929
929
|
})
|
|
930
930
|
]));
|
|
931
931
|
}
|
|
932
|
-
}),
|
|
932
|
+
}), xt = ht, kt = /* @__PURE__ */ J({
|
|
933
933
|
name: "Picture",
|
|
934
934
|
__name: "picture",
|
|
935
935
|
setup(e) {
|
|
936
|
-
return (l, t) => (a(),
|
|
936
|
+
return (l, t) => (a(), f("svg", {
|
|
937
937
|
xmlns: "http://www.w3.org/2000/svg",
|
|
938
938
|
viewBox: "0 0 1024 1024"
|
|
939
939
|
}, [
|
|
940
|
-
|
|
940
|
+
y("path", {
|
|
941
941
|
fill: "currentColor",
|
|
942
942
|
d: "M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"
|
|
943
943
|
}),
|
|
944
|
-
|
|
944
|
+
y("path", {
|
|
945
945
|
fill: "currentColor",
|
|
946
946
|
d: "M384 288q64 0 64 64t-64 64-64-64 64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952z"
|
|
947
947
|
})
|
|
948
948
|
]));
|
|
949
949
|
}
|
|
950
|
-
}), Ct = kt, Ut = /* @__PURE__ */
|
|
950
|
+
}), Ct = kt, Ut = /* @__PURE__ */ J({
|
|
951
951
|
name: "Plus",
|
|
952
952
|
__name: "plus",
|
|
953
953
|
setup(e) {
|
|
954
|
-
return (l, t) => (a(),
|
|
954
|
+
return (l, t) => (a(), f("svg", {
|
|
955
955
|
xmlns: "http://www.w3.org/2000/svg",
|
|
956
956
|
viewBox: "0 0 1024 1024"
|
|
957
957
|
}, [
|
|
958
|
-
|
|
958
|
+
y("path", {
|
|
959
959
|
fill: "currentColor",
|
|
960
960
|
d: "M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"
|
|
961
961
|
})
|
|
962
962
|
]));
|
|
963
963
|
}
|
|
964
|
-
}),
|
|
964
|
+
}), We = Ut, It = /* @__PURE__ */ J({
|
|
965
965
|
name: "Postcard",
|
|
966
966
|
__name: "postcard",
|
|
967
967
|
setup(e) {
|
|
968
|
-
return (l, t) => (a(),
|
|
968
|
+
return (l, t) => (a(), f("svg", {
|
|
969
969
|
xmlns: "http://www.w3.org/2000/svg",
|
|
970
970
|
viewBox: "0 0 1024 1024"
|
|
971
971
|
}, [
|
|
972
|
-
|
|
972
|
+
y("path", {
|
|
973
973
|
fill: "currentColor",
|
|
974
974
|
d: "M160 224a32 32 0 0 0-32 32v512a32 32 0 0 0 32 32h704a32 32 0 0 0 32-32V256a32 32 0 0 0-32-32zm0-64h704a96 96 0 0 1 96 96v512a96 96 0 0 1-96 96H160a96 96 0 0 1-96-96V256a96 96 0 0 1 96-96"
|
|
975
975
|
}),
|
|
976
|
-
|
|
976
|
+
y("path", {
|
|
977
977
|
fill: "currentColor",
|
|
978
978
|
d: "M704 320a64 64 0 1 1 0 128 64 64 0 0 1 0-128M288 448h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32m0 128h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32"
|
|
979
979
|
})
|
|
980
980
|
]));
|
|
981
981
|
}
|
|
982
|
-
}), zt = It, Dt = /* @__PURE__ */
|
|
982
|
+
}), zt = It, Dt = /* @__PURE__ */ J({
|
|
983
983
|
name: "SetUp",
|
|
984
984
|
__name: "set-up",
|
|
985
985
|
setup(e) {
|
|
986
|
-
return (l, t) => (a(),
|
|
986
|
+
return (l, t) => (a(), f("svg", {
|
|
987
987
|
xmlns: "http://www.w3.org/2000/svg",
|
|
988
988
|
viewBox: "0 0 1024 1024"
|
|
989
989
|
}, [
|
|
990
|
-
|
|
990
|
+
y("path", {
|
|
991
991
|
fill: "currentColor",
|
|
992
992
|
d: "M224 160a64 64 0 0 0-64 64v576a64 64 0 0 0 64 64h576a64 64 0 0 0 64-64V224a64 64 0 0 0-64-64zm0-64h576a128 128 0 0 1 128 128v576a128 128 0 0 1-128 128H224A128 128 0 0 1 96 800V224A128 128 0 0 1 224 96"
|
|
993
993
|
}),
|
|
994
|
-
|
|
994
|
+
y("path", {
|
|
995
995
|
fill: "currentColor",
|
|
996
996
|
d: "M384 416a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"
|
|
997
997
|
}),
|
|
998
|
-
|
|
998
|
+
y("path", {
|
|
999
999
|
fill: "currentColor",
|
|
1000
1000
|
d: "M480 320h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32m160 416a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"
|
|
1001
1001
|
}),
|
|
1002
|
-
|
|
1002
|
+
y("path", {
|
|
1003
1003
|
fill: "currentColor",
|
|
1004
1004
|
d: "M288 640h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32"
|
|
1005
1005
|
})
|
|
1006
1006
|
]));
|
|
1007
1007
|
}
|
|
1008
|
-
}), St = Dt, $t = /* @__PURE__ */
|
|
1008
|
+
}), St = Dt, $t = /* @__PURE__ */ J({
|
|
1009
1009
|
name: "SwitchButton",
|
|
1010
1010
|
__name: "switch-button",
|
|
1011
1011
|
setup(e) {
|
|
1012
|
-
return (l, t) => (a(),
|
|
1012
|
+
return (l, t) => (a(), f("svg", {
|
|
1013
1013
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1014
1014
|
viewBox: "0 0 1024 1024"
|
|
1015
1015
|
}, [
|
|
1016
|
-
|
|
1016
|
+
y("path", {
|
|
1017
1017
|
fill: "currentColor",
|
|
1018
1018
|
d: "M352 159.872V230.4a352 352 0 1 0 320 0v-70.528A416.128 416.128 0 0 1 512 960a416 416 0 0 1-160-800.128"
|
|
1019
1019
|
}),
|
|
1020
|
-
|
|
1020
|
+
y("path", {
|
|
1021
1021
|
fill: "currentColor",
|
|
1022
1022
|
d: "M512 64q32 0 32 32v320q0 32-32 32t-32-32V96q0-32 32-32"
|
|
1023
1023
|
})
|
|
1024
1024
|
]));
|
|
1025
1025
|
}
|
|
1026
|
-
}), Nt = $t, Mt = /* @__PURE__ */
|
|
1026
|
+
}), Nt = $t, Mt = /* @__PURE__ */ J({
|
|
1027
1027
|
name: "Upload",
|
|
1028
1028
|
__name: "upload",
|
|
1029
1029
|
setup(e) {
|
|
1030
|
-
return (l, t) => (a(),
|
|
1030
|
+
return (l, t) => (a(), f("svg", {
|
|
1031
1031
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1032
1032
|
viewBox: "0 0 1024 1024"
|
|
1033
1033
|
}, [
|
|
1034
|
-
|
|
1034
|
+
y("path", {
|
|
1035
1035
|
fill: "currentColor",
|
|
1036
1036
|
d: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248z"
|
|
1037
1037
|
})
|
|
1038
1038
|
]));
|
|
1039
1039
|
}
|
|
1040
1040
|
}), ol = Mt;
|
|
1041
|
-
const
|
|
1041
|
+
const Rt = { class: "content" }, Ht = { class: "label" }, Ot = /* @__PURE__ */ J({
|
|
1042
1042
|
__name: "PaletteItem",
|
|
1043
1043
|
props: {
|
|
1044
1044
|
label: {},
|
|
1045
1045
|
nodeType: {}
|
|
1046
1046
|
},
|
|
1047
1047
|
setup(e) {
|
|
1048
|
-
const l = e, { beginPaletteDrag: t } =
|
|
1049
|
-
flexRow:
|
|
1050
|
-
collapse:
|
|
1048
|
+
const l = e, { beginPaletteDrag: t } = Ve(), r = {
|
|
1049
|
+
flexRow: xt,
|
|
1050
|
+
collapse: gt,
|
|
1051
1051
|
tabs: yt,
|
|
1052
1052
|
table: wt,
|
|
1053
1053
|
input: je,
|
|
1054
1054
|
textarea: ct,
|
|
1055
|
-
select:
|
|
1055
|
+
select: rt,
|
|
1056
1056
|
radio: dt,
|
|
1057
1057
|
checkbox: St,
|
|
1058
1058
|
switch: Nt,
|
|
1059
1059
|
"image-upload": Ct,
|
|
1060
1060
|
"file-upload": ol,
|
|
1061
1061
|
title: zt
|
|
1062
|
-
},
|
|
1063
|
-
function h(
|
|
1064
|
-
|
|
1062
|
+
}, m = $(() => r[l.nodeType] || je);
|
|
1063
|
+
function h(V) {
|
|
1064
|
+
V.button === 0 && t(l.nodeType, V);
|
|
1065
1065
|
}
|
|
1066
|
-
return (
|
|
1067
|
-
const
|
|
1068
|
-
return a(),
|
|
1066
|
+
return (V, u) => {
|
|
1067
|
+
const b = w("el-icon"), M = w("el-card");
|
|
1068
|
+
return a(), x(M, {
|
|
1069
1069
|
shadow: "hover",
|
|
1070
1070
|
class: "item",
|
|
1071
1071
|
onPointerdown: h
|
|
1072
1072
|
}, {
|
|
1073
|
-
default:
|
|
1074
|
-
|
|
1075
|
-
o(
|
|
1073
|
+
default: i(() => [
|
|
1074
|
+
y("div", Rt, [
|
|
1075
|
+
o(b, {
|
|
1076
1076
|
class: "icon",
|
|
1077
1077
|
size: 16
|
|
1078
1078
|
}, {
|
|
1079
|
-
default:
|
|
1080
|
-
(a(),
|
|
1079
|
+
default: i(() => [
|
|
1080
|
+
(a(), x(rl(m.value)))
|
|
1081
1081
|
]),
|
|
1082
1082
|
_: 1
|
|
1083
1083
|
}),
|
|
1084
|
-
|
|
1084
|
+
y("div", Ht, te(e.label), 1)
|
|
1085
1085
|
])
|
|
1086
1086
|
]),
|
|
1087
1087
|
_: 1
|
|
1088
1088
|
});
|
|
1089
1089
|
};
|
|
1090
1090
|
}
|
|
1091
|
-
}), ie = /* @__PURE__ */
|
|
1091
|
+
}), ie = /* @__PURE__ */ ve(Ot, [["__scopeId", "data-v-7d576d24"]]), Tt = { class: "wrap" }, At = { class: "grid" }, Et = { class: "grid" }, Pt = /* @__PURE__ */ J({
|
|
1092
1092
|
__name: "Palette",
|
|
1093
1093
|
setup(e) {
|
|
1094
|
-
const l =
|
|
1094
|
+
const l = I(["container", "field"]), { drag: t } = Ve(), r = $(() => t.isDragging.value), m = $(() => ({
|
|
1095
1095
|
left: `${t.pointer.x + 12}px`,
|
|
1096
1096
|
top: `${t.pointer.y + 12}px`
|
|
1097
|
-
})), h =
|
|
1098
|
-
const
|
|
1099
|
-
return
|
|
1097
|
+
})), h = $(() => {
|
|
1098
|
+
const V = t.dragging.value;
|
|
1099
|
+
return V ? V.kind === "palette" ? V.nodeType : "移动组件" : "";
|
|
1100
1100
|
});
|
|
1101
|
-
return (
|
|
1102
|
-
const
|
|
1103
|
-
return a(),
|
|
1104
|
-
o(
|
|
1101
|
+
return (V, u) => {
|
|
1102
|
+
const b = w("el-collapse-item"), M = w("el-collapse");
|
|
1103
|
+
return a(), f("div", Tt, [
|
|
1104
|
+
o(M, {
|
|
1105
1105
|
modelValue: l.value,
|
|
1106
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
1106
|
+
"onUpdate:modelValue": u[0] || (u[0] = (E) => l.value = E)
|
|
1107
1107
|
}, {
|
|
1108
|
-
default:
|
|
1109
|
-
o(
|
|
1110
|
-
title:
|
|
1111
|
-
|
|
1108
|
+
default: i(() => [
|
|
1109
|
+
o(b, { name: "container" }, {
|
|
1110
|
+
title: i(() => [...u[1] || (u[1] = [
|
|
1111
|
+
z(" 容器组件 ", -1)
|
|
1112
1112
|
])]),
|
|
1113
|
-
default:
|
|
1114
|
-
|
|
1113
|
+
default: i(() => [
|
|
1114
|
+
y("div", At, [
|
|
1115
1115
|
o(ie, {
|
|
1116
1116
|
label: "横向布局",
|
|
1117
1117
|
"node-type": "flexRow"
|
|
@@ -1128,12 +1128,12 @@ const Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P
|
|
|
1128
1128
|
]),
|
|
1129
1129
|
_: 1
|
|
1130
1130
|
}),
|
|
1131
|
-
o(
|
|
1132
|
-
title:
|
|
1133
|
-
|
|
1131
|
+
o(b, { name: "field" }, {
|
|
1132
|
+
title: i(() => [...u[2] || (u[2] = [
|
|
1133
|
+
z(" 普通组件 ", -1)
|
|
1134
1134
|
])]),
|
|
1135
|
-
default:
|
|
1136
|
-
|
|
1135
|
+
default: i(() => [
|
|
1136
|
+
y("div", Et, [
|
|
1137
1137
|
o(ie, {
|
|
1138
1138
|
label: "文本框",
|
|
1139
1139
|
"node-type": "input"
|
|
@@ -1181,21 +1181,21 @@ const Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P
|
|
|
1181
1181
|
]),
|
|
1182
1182
|
_: 1
|
|
1183
1183
|
}, 8, ["modelValue"]),
|
|
1184
|
-
r.value ? (a(),
|
|
1184
|
+
r.value ? (a(), f("div", {
|
|
1185
1185
|
key: 0,
|
|
1186
1186
|
class: "ghost",
|
|
1187
|
-
style:
|
|
1188
|
-
},
|
|
1187
|
+
style: He(m.value)
|
|
1188
|
+
}, te(h.value), 5)) : Q("", !0)
|
|
1189
1189
|
]);
|
|
1190
1190
|
};
|
|
1191
1191
|
}
|
|
1192
|
-
}),
|
|
1192
|
+
}), Lt = /* @__PURE__ */ ve(Pt, [["__scopeId", "data-v-1a00cdb7"]]), Yt = {
|
|
1193
1193
|
key: 3,
|
|
1194
1194
|
class: "tableWrap"
|
|
1195
|
-
},
|
|
1195
|
+
}, Jt = { class: "tableHeader" }, Bt = { class: "title" }, qt = { class: "actions" }, Ft = {
|
|
1196
1196
|
key: 0,
|
|
1197
1197
|
class: "pagination"
|
|
1198
|
-
}, jt = /* @__PURE__ */
|
|
1198
|
+
}, jt = /* @__PURE__ */ J({
|
|
1199
1199
|
__name: "RenderNode",
|
|
1200
1200
|
props: {
|
|
1201
1201
|
node: {},
|
|
@@ -1203,333 +1203,356 @@ const Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P
|
|
|
1203
1203
|
},
|
|
1204
1204
|
emits: ["update:modelValue"],
|
|
1205
1205
|
setup(e, { emit: l }) {
|
|
1206
|
-
const t = e, r = l,
|
|
1206
|
+
const t = e, r = l, m = $({
|
|
1207
1207
|
get: () => t.modelValue,
|
|
1208
|
-
set: (
|
|
1208
|
+
set: (d) => r("update:modelValue", d)
|
|
1209
1209
|
});
|
|
1210
|
-
|
|
1210
|
+
Xe(() => {
|
|
1211
1211
|
if (t.node.type === "switch") {
|
|
1212
|
-
const
|
|
1213
|
-
|
|
1212
|
+
const d = t.node;
|
|
1213
|
+
m.value[d.props.field] === void 0 && r("update:modelValue", { ...m.value, [d.props.field]: d.props.inactiveValue ?? !1 });
|
|
1214
1214
|
}
|
|
1215
1215
|
});
|
|
1216
|
-
const h =
|
|
1216
|
+
const h = process.env.VITE_DEVJECT_UPLOAD_URL, V = process.env.VITE_DEVJECT_DOWNLOAD_URL, u = process.env.VITE_DEVJECT_UPLOAD_PARSE, b = $({
|
|
1217
1217
|
get: () => {
|
|
1218
1218
|
if (!["image-upload", "file-upload"].includes(t.node.type)) return [];
|
|
1219
|
-
const
|
|
1220
|
-
return Array.isArray(
|
|
1219
|
+
const d = t.node, s = m.value[d.props.field];
|
|
1220
|
+
return Array.isArray(s) ? s : [];
|
|
1221
1221
|
},
|
|
1222
|
-
set: (
|
|
1222
|
+
set: (d) => {
|
|
1223
1223
|
if (!["image-upload", "file-upload"].includes(t.node.type)) return;
|
|
1224
|
-
const
|
|
1225
|
-
r("update:modelValue", { ...
|
|
1224
|
+
const s = t.node;
|
|
1225
|
+
r("update:modelValue", { ...m.value, [s.props.field]: d });
|
|
1226
1226
|
}
|
|
1227
1227
|
});
|
|
1228
|
-
function
|
|
1229
|
-
|
|
1228
|
+
function M(d, s, T) {
|
|
1229
|
+
const G = (u || "data").split(".");
|
|
1230
|
+
let Y = d;
|
|
1231
|
+
for (const Z of G)
|
|
1232
|
+
if (Y && typeof Y == "object" && Z in Y)
|
|
1233
|
+
Y = Y[Z];
|
|
1234
|
+
else {
|
|
1235
|
+
Y = null;
|
|
1236
|
+
break;
|
|
1237
|
+
}
|
|
1238
|
+
if (Y) {
|
|
1239
|
+
let Z;
|
|
1240
|
+
if (Y.startsWith("http"))
|
|
1241
|
+
Z = Y;
|
|
1242
|
+
else {
|
|
1243
|
+
const ue = V || "", pe = Y.startsWith("/") ? "" : "/";
|
|
1244
|
+
Z = ue + pe + Y;
|
|
1245
|
+
}
|
|
1246
|
+
s.url = Z;
|
|
1247
|
+
const _ = t.node;
|
|
1248
|
+
r("update:modelValue", { ...m.value, [_.props.field]: [...T] });
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
function E(d) {
|
|
1252
|
+
d.url && window.open(d.url, "_blank");
|
|
1230
1253
|
}
|
|
1231
|
-
const
|
|
1254
|
+
const k = $(() => t.node.type !== "flexRow" ? {} : {
|
|
1232
1255
|
display: "grid",
|
|
1233
1256
|
gap: `${t.node.props.gap ?? 12}px`,
|
|
1234
1257
|
gridTemplateColumns: `repeat(${t.node.columns.length}, minmax(0, 1fr))`
|
|
1235
|
-
}),
|
|
1258
|
+
}), C = $({
|
|
1236
1259
|
get: () => {
|
|
1237
|
-
const
|
|
1238
|
-
if (
|
|
1239
|
-
return
|
|
1260
|
+
const d = t.node;
|
|
1261
|
+
if (d.props.field)
|
|
1262
|
+
return m.value[d.props.field];
|
|
1240
1263
|
},
|
|
1241
|
-
set: (
|
|
1242
|
-
const
|
|
1243
|
-
|
|
1264
|
+
set: (d) => {
|
|
1265
|
+
const s = t.node;
|
|
1266
|
+
s.props.field && r("update:modelValue", { ...m.value, [s.props.field]: d });
|
|
1244
1267
|
}
|
|
1245
|
-
}),
|
|
1268
|
+
}), N = $({
|
|
1246
1269
|
get: () => {
|
|
1247
|
-
const
|
|
1248
|
-
return
|
|
1270
|
+
const d = C.value, s = t.node;
|
|
1271
|
+
return d === void 0 ? s.props.inactiveValue : d;
|
|
1249
1272
|
},
|
|
1250
|
-
set: (
|
|
1251
|
-
|
|
1273
|
+
set: (d) => {
|
|
1274
|
+
C.value = d;
|
|
1252
1275
|
}
|
|
1253
|
-
}),
|
|
1276
|
+
}), F = $({
|
|
1254
1277
|
get: () => {
|
|
1255
1278
|
if (t.node.type !== "checkbox") return [];
|
|
1256
|
-
const
|
|
1257
|
-
return Array.isArray(
|
|
1279
|
+
const d = t.node, s = m.value[d.props.field];
|
|
1280
|
+
return Array.isArray(s) ? s : [];
|
|
1258
1281
|
},
|
|
1259
|
-
set: (
|
|
1282
|
+
set: (d) => {
|
|
1260
1283
|
if (t.node.type !== "checkbox") return;
|
|
1261
|
-
const
|
|
1262
|
-
r("update:modelValue", { ...
|
|
1284
|
+
const s = t.node;
|
|
1285
|
+
r("update:modelValue", { ...m.value, [s.props.field]: d });
|
|
1263
1286
|
}
|
|
1264
|
-
}),
|
|
1287
|
+
}), W = I(1), L = $({
|
|
1265
1288
|
get: () => {
|
|
1266
1289
|
if (t.node.type !== "table") return [];
|
|
1267
|
-
const
|
|
1268
|
-
return Array.isArray(
|
|
1290
|
+
const d = t.node, s = m.value[d.props.field];
|
|
1291
|
+
return Array.isArray(s) ? s : [];
|
|
1269
1292
|
},
|
|
1270
|
-
set: (
|
|
1293
|
+
set: (d) => {
|
|
1271
1294
|
if (t.node.type !== "table") return;
|
|
1272
|
-
const
|
|
1273
|
-
r("update:modelValue", { ...
|
|
1295
|
+
const s = t.node;
|
|
1296
|
+
r("update:modelValue", { ...m.value, [s.props.field]: d });
|
|
1274
1297
|
}
|
|
1275
|
-
}),
|
|
1298
|
+
}), X = $(() => {
|
|
1276
1299
|
if (t.node.type !== "table") return [];
|
|
1277
|
-
if (!t.node.props.pagination) return
|
|
1278
|
-
const
|
|
1279
|
-
return
|
|
1300
|
+
if (!t.node.props.pagination) return L.value;
|
|
1301
|
+
const d = t.node.props.pageSize ?? 10, s = (W.value - 1) * d;
|
|
1302
|
+
return L.value.slice(s, s + d);
|
|
1280
1303
|
});
|
|
1281
|
-
function
|
|
1304
|
+
function ne() {
|
|
1282
1305
|
if (t.node.type !== "table") return;
|
|
1283
|
-
const
|
|
1284
|
-
for (const
|
|
1285
|
-
|
|
1286
|
-
|
|
1306
|
+
const d = t.node, s = {};
|
|
1307
|
+
for (const T of d.props.columns)
|
|
1308
|
+
s[T.prop] = "";
|
|
1309
|
+
L.value = [...L.value, s];
|
|
1287
1310
|
}
|
|
1288
|
-
function
|
|
1311
|
+
function ee(d) {
|
|
1289
1312
|
if (t.node.type !== "table") return;
|
|
1290
|
-
const
|
|
1291
|
-
|
|
1313
|
+
const s = t.node, T = s.props.pagination ? (W.value - 1) * (s.props.pageSize ?? 10) + d : d, le = [...L.value];
|
|
1314
|
+
le.splice(T, 1), L.value = le;
|
|
1292
1315
|
}
|
|
1293
|
-
function
|
|
1294
|
-
|
|
1316
|
+
function de(d) {
|
|
1317
|
+
W.value = d;
|
|
1295
1318
|
}
|
|
1296
|
-
function
|
|
1319
|
+
function se(d) {
|
|
1297
1320
|
if (t.node.type !== "table") return;
|
|
1298
|
-
const
|
|
1299
|
-
|
|
1300
|
-
var
|
|
1301
|
-
const
|
|
1302
|
-
if (!
|
|
1303
|
-
const
|
|
1304
|
-
const
|
|
1305
|
-
for (const
|
|
1306
|
-
|
|
1307
|
-
return
|
|
1321
|
+
const s = new FileReader();
|
|
1322
|
+
s.onload = (T) => {
|
|
1323
|
+
var ue;
|
|
1324
|
+
const le = (ue = T.target) == null ? void 0 : ue.result;
|
|
1325
|
+
if (!le) return;
|
|
1326
|
+
const G = Ce.read(le, { type: "binary" }), Y = G.Sheets[G.SheetNames[0]], _ = Ce.utils.sheet_to_json(Y).map((pe) => {
|
|
1327
|
+
const be = {}, ke = t.node;
|
|
1328
|
+
for (const re of ke.props.columns)
|
|
1329
|
+
pe[re.prop] !== void 0 ? be[re.prop] = pe[re.prop] : pe[re.label] !== void 0 ? be[re.prop] = pe[re.label] : be[re.prop] = "";
|
|
1330
|
+
return be;
|
|
1308
1331
|
});
|
|
1309
|
-
|
|
1310
|
-
},
|
|
1332
|
+
L.value = [...L.value, ..._];
|
|
1333
|
+
}, s.readAsBinaryString(d.raw);
|
|
1311
1334
|
}
|
|
1312
|
-
function
|
|
1335
|
+
function U() {
|
|
1313
1336
|
if (t.node.type !== "table") return;
|
|
1314
|
-
const
|
|
1315
|
-
if (!
|
|
1316
|
-
const
|
|
1317
|
-
const
|
|
1318
|
-
return
|
|
1319
|
-
|
|
1320
|
-
}),
|
|
1321
|
-
}),
|
|
1322
|
-
|
|
1337
|
+
const d = L.value;
|
|
1338
|
+
if (!d.length) return;
|
|
1339
|
+
const s = t.node, T = s.props.columns, le = d.map((Z) => {
|
|
1340
|
+
const _ = {};
|
|
1341
|
+
return T.forEach((ue) => {
|
|
1342
|
+
_[ue.label] = Z[ue.prop];
|
|
1343
|
+
}), _;
|
|
1344
|
+
}), G = Ce.utils.json_to_sheet(le), Y = Ce.utils.book_new();
|
|
1345
|
+
Ce.utils.book_append_sheet(Y, G, "Sheet1"), Ce.writeFile(Y, `${s.props.label || "data"}.xlsx`);
|
|
1323
1346
|
}
|
|
1324
|
-
function
|
|
1325
|
-
t.node.type === "table" && (
|
|
1347
|
+
function g() {
|
|
1348
|
+
t.node.type === "table" && (L.value = []);
|
|
1326
1349
|
}
|
|
1327
|
-
return (
|
|
1328
|
-
const
|
|
1329
|
-
return e.node.type === "flexRow" ? (a(),
|
|
1350
|
+
return (d, s) => {
|
|
1351
|
+
const T = w("RenderNode", !0), le = w("el-collapse-item"), G = w("el-collapse"), Y = w("el-tab-pane"), Z = w("el-tabs"), _ = w("el-button"), ue = w("el-upload"), pe = w("el-option"), be = w("el-select"), ke = w("el-input-number"), re = w("el-date-picker"), $e = w("el-time-picker"), Ie = w("el-input"), Ne = w("el-table-column"), Ae = w("el-table"), Ee = w("el-pagination"), p = w("el-radio"), n = w("el-radio-group"), R = w("el-checkbox"), H = w("el-checkbox-group"), ce = w("el-switch"), A = w("el-icon"), ze = w("el-form-item");
|
|
1352
|
+
return e.node.type === "flexRow" ? (a(), f("div", {
|
|
1330
1353
|
key: 0,
|
|
1331
1354
|
class: "row",
|
|
1332
|
-
style:
|
|
1355
|
+
style: He(k.value)
|
|
1333
1356
|
}, [
|
|
1334
|
-
(a(!0),
|
|
1335
|
-
key:
|
|
1357
|
+
(a(!0), f(D, null, B(e.node.columns, (c) => (a(), f("div", {
|
|
1358
|
+
key: c.id,
|
|
1336
1359
|
class: "col"
|
|
1337
1360
|
}, [
|
|
1338
|
-
(a(!0),
|
|
1339
|
-
key:
|
|
1340
|
-
node:
|
|
1341
|
-
modelValue:
|
|
1342
|
-
"onUpdate:modelValue":
|
|
1361
|
+
(a(!0), f(D, null, B(c.children, (O) => (a(), x(T, {
|
|
1362
|
+
key: O.id,
|
|
1363
|
+
node: O,
|
|
1364
|
+
modelValue: m.value,
|
|
1365
|
+
"onUpdate:modelValue": s[0] || (s[0] = (S) => m.value = S)
|
|
1343
1366
|
}, null, 8, ["node", "modelValue"]))), 128))
|
|
1344
1367
|
]))), 128))
|
|
1345
|
-
], 4)) : e.node.type === "collapse" ? (a(),
|
|
1368
|
+
], 4)) : e.node.type === "collapse" ? (a(), x(G, {
|
|
1346
1369
|
key: 1,
|
|
1347
1370
|
accordion: e.node.props.accordion
|
|
1348
1371
|
}, {
|
|
1349
|
-
default:
|
|
1350
|
-
(a(!0),
|
|
1351
|
-
key:
|
|
1352
|
-
title:
|
|
1353
|
-
name:
|
|
1372
|
+
default: i(() => [
|
|
1373
|
+
(a(!0), f(D, null, B(e.node.items, (c) => (a(), x(le, {
|
|
1374
|
+
key: c.id,
|
|
1375
|
+
title: c.title,
|
|
1376
|
+
name: c.name
|
|
1354
1377
|
}, {
|
|
1355
|
-
default:
|
|
1356
|
-
(a(!0),
|
|
1357
|
-
key:
|
|
1358
|
-
node:
|
|
1359
|
-
modelValue:
|
|
1360
|
-
"onUpdate:modelValue":
|
|
1378
|
+
default: i(() => [
|
|
1379
|
+
(a(!0), f(D, null, B(c.children, (O) => (a(), x(T, {
|
|
1380
|
+
key: O.id,
|
|
1381
|
+
node: O,
|
|
1382
|
+
modelValue: m.value,
|
|
1383
|
+
"onUpdate:modelValue": s[1] || (s[1] = (S) => m.value = S)
|
|
1361
1384
|
}, null, 8, ["node", "modelValue"]))), 128))
|
|
1362
1385
|
]),
|
|
1363
1386
|
_: 2
|
|
1364
1387
|
}, 1032, ["title", "name"]))), 128))
|
|
1365
1388
|
]),
|
|
1366
1389
|
_: 1
|
|
1367
|
-
}, 8, ["accordion"])) : e.node.type === "tabs" ? (a(),
|
|
1390
|
+
}, 8, ["accordion"])) : e.node.type === "tabs" ? (a(), x(Z, {
|
|
1368
1391
|
key: 2,
|
|
1369
1392
|
type: e.node.props.type
|
|
1370
1393
|
}, {
|
|
1371
|
-
default:
|
|
1372
|
-
(a(!0),
|
|
1373
|
-
key:
|
|
1374
|
-
label:
|
|
1394
|
+
default: i(() => [
|
|
1395
|
+
(a(!0), f(D, null, B(e.node.tabs, (c) => (a(), x(Y, {
|
|
1396
|
+
key: c.id,
|
|
1397
|
+
label: c.label
|
|
1375
1398
|
}, {
|
|
1376
|
-
default:
|
|
1377
|
-
(a(!0),
|
|
1378
|
-
key:
|
|
1379
|
-
node:
|
|
1380
|
-
modelValue:
|
|
1381
|
-
"onUpdate:modelValue":
|
|
1399
|
+
default: i(() => [
|
|
1400
|
+
(a(!0), f(D, null, B(c.children, (O) => (a(), x(T, {
|
|
1401
|
+
key: O.id,
|
|
1402
|
+
node: O,
|
|
1403
|
+
modelValue: m.value,
|
|
1404
|
+
"onUpdate:modelValue": s[2] || (s[2] = (S) => m.value = S)
|
|
1382
1405
|
}, null, 8, ["node", "modelValue"]))), 128))
|
|
1383
1406
|
]),
|
|
1384
1407
|
_: 2
|
|
1385
1408
|
}, 1032, ["label"]))), 128))
|
|
1386
1409
|
]),
|
|
1387
1410
|
_: 1
|
|
1388
|
-
}, 8, ["type"])) : e.node.type === "table" ? (a(),
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
o(
|
|
1393
|
-
icon:
|
|
1411
|
+
}, 8, ["type"])) : e.node.type === "table" ? (a(), f("div", Yt, [
|
|
1412
|
+
y("div", Jt, [
|
|
1413
|
+
y("div", Bt, te(e.node.props.label), 1),
|
|
1414
|
+
y("div", qt, [
|
|
1415
|
+
o(_, {
|
|
1416
|
+
icon: ye(Fe),
|
|
1394
1417
|
size: "small",
|
|
1395
1418
|
type: "danger",
|
|
1396
1419
|
plain: "",
|
|
1397
|
-
onClick:
|
|
1420
|
+
onClick: g
|
|
1398
1421
|
}, {
|
|
1399
|
-
default:
|
|
1400
|
-
|
|
1422
|
+
default: i(() => [...s[16] || (s[16] = [
|
|
1423
|
+
z("清空数据", -1)
|
|
1401
1424
|
])]),
|
|
1402
1425
|
_: 1
|
|
1403
1426
|
}, 8, ["icon"]),
|
|
1404
|
-
e.node.props.enableExcelImport ? (a(),
|
|
1427
|
+
e.node.props.enableExcelImport ? (a(), x(ue, {
|
|
1405
1428
|
key: 0,
|
|
1406
1429
|
action: "#",
|
|
1407
1430
|
"auto-upload": !1,
|
|
1408
1431
|
"show-file-list": !1,
|
|
1409
1432
|
accept: ".xlsx, .xls",
|
|
1410
|
-
"on-change":
|
|
1433
|
+
"on-change": se
|
|
1411
1434
|
}, {
|
|
1412
|
-
default:
|
|
1413
|
-
o(
|
|
1414
|
-
icon:
|
|
1435
|
+
default: i(() => [
|
|
1436
|
+
o(_, {
|
|
1437
|
+
icon: ye(ol),
|
|
1415
1438
|
size: "small"
|
|
1416
1439
|
}, {
|
|
1417
|
-
default:
|
|
1418
|
-
|
|
1440
|
+
default: i(() => [...s[17] || (s[17] = [
|
|
1441
|
+
z("导入Excel", -1)
|
|
1419
1442
|
])]),
|
|
1420
1443
|
_: 1
|
|
1421
1444
|
}, 8, ["icon"])
|
|
1422
1445
|
]),
|
|
1423
1446
|
_: 1
|
|
1424
|
-
})) :
|
|
1425
|
-
o(
|
|
1426
|
-
icon:
|
|
1447
|
+
})) : Q("", !0),
|
|
1448
|
+
o(_, {
|
|
1449
|
+
icon: ye(ft),
|
|
1427
1450
|
size: "small",
|
|
1428
|
-
onClick:
|
|
1451
|
+
onClick: U
|
|
1429
1452
|
}, {
|
|
1430
|
-
default:
|
|
1431
|
-
|
|
1453
|
+
default: i(() => [...s[18] || (s[18] = [
|
|
1454
|
+
z("导出Excel", -1)
|
|
1432
1455
|
])]),
|
|
1433
1456
|
_: 1
|
|
1434
1457
|
}, 8, ["icon"]),
|
|
1435
|
-
o(
|
|
1458
|
+
o(_, {
|
|
1436
1459
|
type: "primary",
|
|
1437
|
-
icon:
|
|
1460
|
+
icon: ye(We),
|
|
1438
1461
|
size: "small",
|
|
1439
|
-
onClick:
|
|
1462
|
+
onClick: ne
|
|
1440
1463
|
}, {
|
|
1441
|
-
default:
|
|
1442
|
-
|
|
1464
|
+
default: i(() => [...s[19] || (s[19] = [
|
|
1465
|
+
z("添加", -1)
|
|
1443
1466
|
])]),
|
|
1444
1467
|
_: 1
|
|
1445
1468
|
}, 8, ["icon"])
|
|
1446
1469
|
])
|
|
1447
1470
|
]),
|
|
1448
|
-
o(
|
|
1449
|
-
data:
|
|
1471
|
+
o(Ae, {
|
|
1472
|
+
data: X.value,
|
|
1450
1473
|
border: "",
|
|
1451
1474
|
style: { width: "100%" },
|
|
1452
1475
|
size: "small"
|
|
1453
1476
|
}, {
|
|
1454
|
-
default:
|
|
1455
|
-
(a(!0),
|
|
1456
|
-
key:
|
|
1457
|
-
prop:
|
|
1458
|
-
label:
|
|
1459
|
-
width:
|
|
1460
|
-
sortable: !!
|
|
1477
|
+
default: i(() => [
|
|
1478
|
+
(a(!0), f(D, null, B(e.node.props.columns, (c) => (a(), x(Ne, {
|
|
1479
|
+
key: c.id,
|
|
1480
|
+
prop: c.prop,
|
|
1481
|
+
label: c.label,
|
|
1482
|
+
width: c.width,
|
|
1483
|
+
sortable: !!c.sortable
|
|
1461
1484
|
}, {
|
|
1462
|
-
default:
|
|
1463
|
-
|
|
1485
|
+
default: i(({ row: O }) => [
|
|
1486
|
+
c.type === "select" ? (a(), x(be, {
|
|
1464
1487
|
key: 0,
|
|
1465
|
-
modelValue:
|
|
1466
|
-
"onUpdate:modelValue": (
|
|
1488
|
+
modelValue: O[c.prop],
|
|
1489
|
+
"onUpdate:modelValue": (S) => O[c.prop] = S,
|
|
1467
1490
|
size: "small",
|
|
1468
|
-
multiple: !!
|
|
1469
|
-
filterable: !!
|
|
1470
|
-
placeholder:
|
|
1491
|
+
multiple: !!c.multiple,
|
|
1492
|
+
filterable: !!c.filterable,
|
|
1493
|
+
placeholder: c.placeholder || "请选择",
|
|
1471
1494
|
style: { width: "100%" }
|
|
1472
1495
|
}, {
|
|
1473
|
-
default:
|
|
1474
|
-
(a(!0),
|
|
1475
|
-
key:
|
|
1476
|
-
label:
|
|
1477
|
-
value:
|
|
1496
|
+
default: i(() => [
|
|
1497
|
+
(a(!0), f(D, null, B(c.options ?? [], (S) => (a(), x(pe, {
|
|
1498
|
+
key: S.value,
|
|
1499
|
+
label: S.label,
|
|
1500
|
+
value: S.value
|
|
1478
1501
|
}, null, 8, ["label", "value"]))), 128))
|
|
1479
1502
|
]),
|
|
1480
1503
|
_: 2
|
|
1481
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "multiple", "filterable", "placeholder"])) :
|
|
1504
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "multiple", "filterable", "placeholder"])) : c.type === "number" ? (a(), x(ke, {
|
|
1482
1505
|
key: 1,
|
|
1483
|
-
modelValue:
|
|
1484
|
-
"onUpdate:modelValue": (
|
|
1506
|
+
modelValue: O[c.prop],
|
|
1507
|
+
"onUpdate:modelValue": (S) => O[c.prop] = S,
|
|
1485
1508
|
"controls-position": "right",
|
|
1486
1509
|
size: "small",
|
|
1487
1510
|
style: { width: "100%" }
|
|
1488
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : ["date", "datetime", "month"].includes(
|
|
1511
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : ["date", "datetime", "month"].includes(c.type) ? (a(), x(re, {
|
|
1489
1512
|
key: 2,
|
|
1490
|
-
modelValue:
|
|
1491
|
-
"onUpdate:modelValue": (
|
|
1492
|
-
type:
|
|
1493
|
-
format:
|
|
1494
|
-
"value-format":
|
|
1495
|
-
placeholder:
|
|
1513
|
+
modelValue: O[c.prop],
|
|
1514
|
+
"onUpdate:modelValue": (S) => O[c.prop] = S,
|
|
1515
|
+
type: c.type,
|
|
1516
|
+
format: c.type === "datetime" ? "YYYY-MM-DD HH:mm:ss" : c.type === "month" ? "YYYY-MM" : "YYYY-MM-DD",
|
|
1517
|
+
"value-format": c.type === "datetime" ? "YYYY-MM-DD HH:mm:ss" : c.type === "month" ? "YYYY-MM" : "YYYY-MM-DD",
|
|
1518
|
+
placeholder: c.placeholder || "请选择",
|
|
1496
1519
|
size: "small",
|
|
1497
1520
|
style: { width: "100%" }
|
|
1498
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "type", "format", "value-format", "placeholder"])) :
|
|
1521
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "type", "format", "value-format", "placeholder"])) : c.type === "time" ? (a(), x($e, {
|
|
1499
1522
|
key: 3,
|
|
1500
|
-
modelValue:
|
|
1501
|
-
"onUpdate:modelValue": (
|
|
1523
|
+
modelValue: O[c.prop],
|
|
1524
|
+
"onUpdate:modelValue": (S) => O[c.prop] = S,
|
|
1502
1525
|
format: "HH:mm:ss",
|
|
1503
1526
|
"value-format": "HH:mm:ss",
|
|
1504
|
-
placeholder:
|
|
1527
|
+
placeholder: c.placeholder || "请选择时间",
|
|
1505
1528
|
size: "small",
|
|
1506
1529
|
style: { width: "100%" }
|
|
1507
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : (a(),
|
|
1530
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : (a(), x(Ie, {
|
|
1508
1531
|
key: 4,
|
|
1509
|
-
modelValue:
|
|
1510
|
-
"onUpdate:modelValue": (
|
|
1532
|
+
modelValue: O[c.prop],
|
|
1533
|
+
"onUpdate:modelValue": (S) => O[c.prop] = S,
|
|
1511
1534
|
size: "small"
|
|
1512
1535
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]))
|
|
1513
1536
|
]),
|
|
1514
1537
|
_: 2
|
|
1515
1538
|
}, 1032, ["prop", "label", "width", "sortable"]))), 128)),
|
|
1516
|
-
o(
|
|
1539
|
+
o(Ne, {
|
|
1517
1540
|
label: "操作",
|
|
1518
1541
|
width: "100",
|
|
1519
1542
|
fixed: "right"
|
|
1520
1543
|
}, {
|
|
1521
|
-
header:
|
|
1522
|
-
|
|
1523
|
-
|
|
1544
|
+
header: i(() => [...s[20] || (s[20] = [
|
|
1545
|
+
y("div", { style: { display: "flex", "justify-content": "space-between", "align-items": "center" } }, [
|
|
1546
|
+
y("span", null, "操作")
|
|
1524
1547
|
], -1)
|
|
1525
1548
|
])]),
|
|
1526
|
-
default:
|
|
1527
|
-
o(
|
|
1549
|
+
default: i(({ $index: c }) => [
|
|
1550
|
+
o(_, {
|
|
1528
1551
|
type: "danger",
|
|
1529
|
-
icon:
|
|
1552
|
+
icon: ye(Fe),
|
|
1530
1553
|
circle: "",
|
|
1531
1554
|
size: "small",
|
|
1532
|
-
onClick: (
|
|
1555
|
+
onClick: (O) => ee(c)
|
|
1533
1556
|
}, null, 8, ["icon", "onClick"])
|
|
1534
1557
|
]),
|
|
1535
1558
|
_: 1
|
|
@@ -1537,170 +1560,175 @@ const Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P
|
|
|
1537
1560
|
]),
|
|
1538
1561
|
_: 1
|
|
1539
1562
|
}, 8, ["data"]),
|
|
1540
|
-
e.node.props.pagination ? (a(),
|
|
1541
|
-
o(
|
|
1542
|
-
"current-page":
|
|
1543
|
-
"onUpdate:currentPage":
|
|
1563
|
+
e.node.props.pagination ? (a(), f("div", Ft, [
|
|
1564
|
+
o(Ee, {
|
|
1565
|
+
"current-page": W.value,
|
|
1566
|
+
"onUpdate:currentPage": s[3] || (s[3] = (c) => W.value = c),
|
|
1544
1567
|
"page-size": e.node.props.pageSize,
|
|
1545
|
-
total:
|
|
1568
|
+
total: L.value.length,
|
|
1546
1569
|
layout: "prev, pager, next",
|
|
1547
|
-
onCurrentChange:
|
|
1570
|
+
onCurrentChange: de
|
|
1548
1571
|
}, null, 8, ["current-page", "page-size", "total"])
|
|
1549
|
-
])) :
|
|
1550
|
-
])) : e.node.type === "title" ? (a(),
|
|
1572
|
+
])) : Q("", !0)
|
|
1573
|
+
])) : e.node.type === "title" ? (a(), f("div", {
|
|
1551
1574
|
key: 4,
|
|
1552
|
-
style:
|
|
1575
|
+
style: He({
|
|
1553
1576
|
fontSize: (e.node.props.fontSize || 16) + "px",
|
|
1554
1577
|
fontWeight: e.node.props.bold ? "bold" : "normal",
|
|
1555
1578
|
textAlign: e.node.props.align || "left",
|
|
1556
1579
|
margin: "10px 0"
|
|
1557
1580
|
})
|
|
1558
|
-
},
|
|
1581
|
+
}, te(e.node.props.label), 5)) : (a(), x(ze, {
|
|
1559
1582
|
key: 5,
|
|
1560
1583
|
label: e.node.props.label,
|
|
1561
1584
|
required: !!e.node.props.required
|
|
1562
1585
|
}, {
|
|
1563
|
-
default:
|
|
1564
|
-
e.node.type === "input" ? (a(),
|
|
1565
|
-
e.node.props.inputType === "number" ? (a(),
|
|
1586
|
+
default: i(() => [
|
|
1587
|
+
e.node.type === "input" ? (a(), f(D, { key: 0 }, [
|
|
1588
|
+
e.node.props.inputType === "number" ? (a(), x(ke, {
|
|
1566
1589
|
key: 0,
|
|
1567
|
-
modelValue:
|
|
1568
|
-
"onUpdate:modelValue":
|
|
1590
|
+
modelValue: C.value,
|
|
1591
|
+
"onUpdate:modelValue": s[4] || (s[4] = (c) => C.value = c),
|
|
1569
1592
|
placeholder: e.node.props.placeholder ?? ""
|
|
1570
|
-
}, null, 8, ["modelValue", "placeholder"])) : e.node.props.inputType === "date" ? (a(),
|
|
1593
|
+
}, null, 8, ["modelValue", "placeholder"])) : e.node.props.inputType === "date" ? (a(), x(re, {
|
|
1571
1594
|
key: 1,
|
|
1572
|
-
modelValue:
|
|
1573
|
-
"onUpdate:modelValue":
|
|
1595
|
+
modelValue: C.value,
|
|
1596
|
+
"onUpdate:modelValue": s[5] || (s[5] = (c) => C.value = c),
|
|
1574
1597
|
type: "date",
|
|
1575
1598
|
"value-format": "YYYY-MM-DD",
|
|
1576
1599
|
placeholder: e.node.props.placeholder ?? ""
|
|
1577
|
-
}, null, 8, ["modelValue", "placeholder"])) : e.node.props.inputType === "time" ? (a(),
|
|
1600
|
+
}, null, 8, ["modelValue", "placeholder"])) : e.node.props.inputType === "time" ? (a(), x($e, {
|
|
1578
1601
|
key: 2,
|
|
1579
|
-
modelValue:
|
|
1580
|
-
"onUpdate:modelValue":
|
|
1602
|
+
modelValue: C.value,
|
|
1603
|
+
"onUpdate:modelValue": s[6] || (s[6] = (c) => C.value = c),
|
|
1581
1604
|
"value-format": "HH:mm:ss",
|
|
1582
1605
|
placeholder: e.node.props.placeholder ?? ""
|
|
1583
|
-
}, null, 8, ["modelValue", "placeholder"])) : e.node.props.inputType === "datetime" ? (a(),
|
|
1606
|
+
}, null, 8, ["modelValue", "placeholder"])) : e.node.props.inputType === "datetime" ? (a(), x(re, {
|
|
1584
1607
|
key: 3,
|
|
1585
|
-
modelValue:
|
|
1586
|
-
"onUpdate:modelValue":
|
|
1608
|
+
modelValue: C.value,
|
|
1609
|
+
"onUpdate:modelValue": s[7] || (s[7] = (c) => C.value = c),
|
|
1587
1610
|
type: "datetime",
|
|
1588
1611
|
"value-format": "YYYY-MM-DD HH:mm:ss",
|
|
1589
1612
|
placeholder: e.node.props.placeholder ?? ""
|
|
1590
|
-
}, null, 8, ["modelValue", "placeholder"])) : (a(),
|
|
1613
|
+
}, null, 8, ["modelValue", "placeholder"])) : (a(), x(Ie, {
|
|
1591
1614
|
key: 4,
|
|
1592
|
-
modelValue:
|
|
1593
|
-
"onUpdate:modelValue":
|
|
1615
|
+
modelValue: C.value,
|
|
1616
|
+
"onUpdate:modelValue": s[8] || (s[8] = (c) => C.value = c),
|
|
1594
1617
|
placeholder: e.node.props.placeholder ?? ""
|
|
1595
1618
|
}, null, 8, ["modelValue", "placeholder"]))
|
|
1596
|
-
], 64)) : e.node.type === "textarea" ? (a(),
|
|
1619
|
+
], 64)) : e.node.type === "textarea" ? (a(), x(Ie, {
|
|
1597
1620
|
key: 1,
|
|
1598
|
-
modelValue:
|
|
1599
|
-
"onUpdate:modelValue":
|
|
1621
|
+
modelValue: C.value,
|
|
1622
|
+
"onUpdate:modelValue": s[9] || (s[9] = (c) => C.value = c),
|
|
1600
1623
|
type: "textarea",
|
|
1601
1624
|
autosize: { minRows: 3, maxRows: 8 },
|
|
1602
1625
|
placeholder: e.node.props.placeholder ?? ""
|
|
1603
|
-
}, null, 8, ["modelValue", "placeholder"])) : e.node.type === "select" ? (a(),
|
|
1626
|
+
}, null, 8, ["modelValue", "placeholder"])) : e.node.type === "select" ? (a(), x(be, {
|
|
1604
1627
|
key: 2,
|
|
1605
|
-
modelValue:
|
|
1606
|
-
"onUpdate:modelValue":
|
|
1628
|
+
modelValue: C.value,
|
|
1629
|
+
"onUpdate:modelValue": s[10] || (s[10] = (c) => C.value = c),
|
|
1607
1630
|
style: { width: "100%" },
|
|
1608
1631
|
placeholder: e.node.props.placeholder ?? "",
|
|
1609
1632
|
multiple: !!e.node.props.multiple
|
|
1610
1633
|
}, {
|
|
1611
|
-
default:
|
|
1612
|
-
(a(!0),
|
|
1613
|
-
key:
|
|
1614
|
-
label:
|
|
1615
|
-
value:
|
|
1634
|
+
default: i(() => [
|
|
1635
|
+
(a(!0), f(D, null, B(e.node.props.options ?? [], (c) => (a(), x(pe, {
|
|
1636
|
+
key: c.value,
|
|
1637
|
+
label: c.label,
|
|
1638
|
+
value: c.value
|
|
1616
1639
|
}, null, 8, ["label", "value"]))), 128))
|
|
1617
1640
|
]),
|
|
1618
1641
|
_: 1
|
|
1619
|
-
}, 8, ["modelValue", "placeholder", "multiple"])) : e.node.type === "radio" ? (a(),
|
|
1642
|
+
}, 8, ["modelValue", "placeholder", "multiple"])) : e.node.type === "radio" ? (a(), x(n, {
|
|
1620
1643
|
key: 3,
|
|
1621
|
-
modelValue:
|
|
1622
|
-
"onUpdate:modelValue":
|
|
1644
|
+
modelValue: C.value,
|
|
1645
|
+
"onUpdate:modelValue": s[11] || (s[11] = (c) => C.value = c)
|
|
1623
1646
|
}, {
|
|
1624
|
-
default:
|
|
1625
|
-
(a(!0),
|
|
1626
|
-
key:
|
|
1627
|
-
value:
|
|
1647
|
+
default: i(() => [
|
|
1648
|
+
(a(!0), f(D, null, B(e.node.props.options ?? [], (c) => (a(), x(p, {
|
|
1649
|
+
key: c.value,
|
|
1650
|
+
value: c.value
|
|
1628
1651
|
}, {
|
|
1629
|
-
default:
|
|
1630
|
-
|
|
1652
|
+
default: i(() => [
|
|
1653
|
+
z(te(c.label), 1)
|
|
1631
1654
|
]),
|
|
1632
1655
|
_: 2
|
|
1633
1656
|
}, 1032, ["value"]))), 128))
|
|
1634
1657
|
]),
|
|
1635
1658
|
_: 1
|
|
1636
|
-
}, 8, ["modelValue"])) : e.node.type === "checkbox" ? (a(),
|
|
1659
|
+
}, 8, ["modelValue"])) : e.node.type === "checkbox" ? (a(), x(H, {
|
|
1637
1660
|
key: 4,
|
|
1638
|
-
modelValue:
|
|
1639
|
-
"onUpdate:modelValue":
|
|
1661
|
+
modelValue: F.value,
|
|
1662
|
+
"onUpdate:modelValue": s[12] || (s[12] = (c) => F.value = c)
|
|
1640
1663
|
}, {
|
|
1641
|
-
default:
|
|
1642
|
-
(a(!0),
|
|
1643
|
-
key:
|
|
1644
|
-
value:
|
|
1664
|
+
default: i(() => [
|
|
1665
|
+
(a(!0), f(D, null, B(e.node.props.options ?? [], (c) => (a(), x(R, {
|
|
1666
|
+
key: c.value,
|
|
1667
|
+
value: c.value
|
|
1645
1668
|
}, {
|
|
1646
|
-
default:
|
|
1647
|
-
|
|
1669
|
+
default: i(() => [
|
|
1670
|
+
z(te(c.label), 1)
|
|
1648
1671
|
]),
|
|
1649
1672
|
_: 2
|
|
1650
1673
|
}, 1032, ["value"]))), 128))
|
|
1651
1674
|
]),
|
|
1652
1675
|
_: 1
|
|
1653
|
-
}, 8, ["modelValue"])) : e.node.type === "switch" ? (a(),
|
|
1676
|
+
}, 8, ["modelValue"])) : e.node.type === "switch" ? (a(), x(ce, {
|
|
1654
1677
|
key: 5,
|
|
1655
|
-
modelValue:
|
|
1656
|
-
"onUpdate:modelValue":
|
|
1678
|
+
modelValue: N.value,
|
|
1679
|
+
"onUpdate:modelValue": s[13] || (s[13] = (c) => N.value = c),
|
|
1657
1680
|
"active-text": e.node.props.activeText,
|
|
1658
1681
|
"inactive-text": e.node.props.inactiveText,
|
|
1659
1682
|
"active-value": e.node.props.activeValue,
|
|
1660
1683
|
"inactive-value": e.node.props.inactiveValue
|
|
1661
|
-
}, null, 8, ["modelValue", "active-text", "inactive-text", "active-value", "inactive-value"])) : e.node.type === "image-upload" ? (a(),
|
|
1684
|
+
}, null, 8, ["modelValue", "active-text", "inactive-text", "active-value", "inactive-value"])) : e.node.type === "image-upload" ? (a(), x(ue, {
|
|
1662
1685
|
key: 6,
|
|
1663
|
-
action:
|
|
1686
|
+
action: ye(h),
|
|
1687
|
+
name: "file",
|
|
1664
1688
|
"list-type": "picture-card",
|
|
1665
1689
|
limit: e.node.props.limit,
|
|
1666
|
-
"file-list":
|
|
1667
|
-
"onUpdate:fileList":
|
|
1668
|
-
"on-preview":
|
|
1690
|
+
"file-list": b.value,
|
|
1691
|
+
"onUpdate:fileList": s[14] || (s[14] = (c) => b.value = c),
|
|
1692
|
+
"on-preview": E,
|
|
1693
|
+
"on-success": M
|
|
1669
1694
|
}, {
|
|
1670
|
-
default:
|
|
1671
|
-
o(
|
|
1672
|
-
default:
|
|
1673
|
-
o(
|
|
1695
|
+
default: i(() => [
|
|
1696
|
+
o(A, null, {
|
|
1697
|
+
default: i(() => [
|
|
1698
|
+
o(ye(We))
|
|
1674
1699
|
]),
|
|
1675
1700
|
_: 1
|
|
1676
1701
|
})
|
|
1677
1702
|
]),
|
|
1678
1703
|
_: 1
|
|
1679
|
-
}, 8, ["action", "limit", "file-list"])) : e.node.type === "file-upload" ? (a(),
|
|
1704
|
+
}, 8, ["action", "limit", "file-list"])) : e.node.type === "file-upload" ? (a(), x(ue, {
|
|
1680
1705
|
key: 7,
|
|
1681
|
-
|
|
1706
|
+
style: { width: "100%" },
|
|
1707
|
+
action: ye(h),
|
|
1708
|
+
name: "file",
|
|
1682
1709
|
limit: e.node.props.limit,
|
|
1683
1710
|
accept: e.node.props.accept,
|
|
1684
|
-
"file-list":
|
|
1685
|
-
"onUpdate:fileList":
|
|
1686
|
-
"on-preview":
|
|
1711
|
+
"file-list": b.value,
|
|
1712
|
+
"onUpdate:fileList": s[15] || (s[15] = (c) => b.value = c),
|
|
1713
|
+
"on-preview": E,
|
|
1714
|
+
"on-success": M
|
|
1687
1715
|
}, {
|
|
1688
|
-
default:
|
|
1689
|
-
o(
|
|
1690
|
-
default:
|
|
1691
|
-
|
|
1716
|
+
default: i(() => [
|
|
1717
|
+
o(_, { type: "primary" }, {
|
|
1718
|
+
default: i(() => [...s[21] || (s[21] = [
|
|
1719
|
+
z("点击上传", -1)
|
|
1692
1720
|
])]),
|
|
1693
1721
|
_: 1
|
|
1694
1722
|
})
|
|
1695
1723
|
]),
|
|
1696
1724
|
_: 1
|
|
1697
|
-
}, 8, ["action", "limit", "accept", "file-list"])) :
|
|
1725
|
+
}, 8, ["action", "limit", "accept", "file-list"])) : Q("", !0)
|
|
1698
1726
|
]),
|
|
1699
1727
|
_: 1
|
|
1700
1728
|
}, 8, ["label", "required"]));
|
|
1701
1729
|
};
|
|
1702
1730
|
}
|
|
1703
|
-
}),
|
|
1731
|
+
}), Wt = /* @__PURE__ */ ve(jt, [["__scopeId", "data-v-c41bec75"]]), Xt = { class: "root" }, Kt = /* @__PURE__ */ J({
|
|
1704
1732
|
__name: "FormRenderer",
|
|
1705
1733
|
props: {
|
|
1706
1734
|
schema: {},
|
|
@@ -1708,144 +1736,144 @@ const Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P
|
|
|
1708
1736
|
},
|
|
1709
1737
|
emits: ["update:modelValue"],
|
|
1710
1738
|
setup(e, { emit: l }) {
|
|
1711
|
-
const t = e, r = l,
|
|
1739
|
+
const t = e, r = l, m = $({
|
|
1712
1740
|
get: () => t.modelValue,
|
|
1713
1741
|
set: (h) => r("update:modelValue", h)
|
|
1714
1742
|
});
|
|
1715
|
-
return (h,
|
|
1716
|
-
(a(!0),
|
|
1743
|
+
return (h, V) => (a(), f("div", Xt, [
|
|
1744
|
+
(a(!0), f(D, null, B(e.schema.root.children, (u) => (a(), x(Wt, {
|
|
1717
1745
|
key: u.id,
|
|
1718
1746
|
node: u,
|
|
1719
|
-
modelValue:
|
|
1720
|
-
"onUpdate:modelValue":
|
|
1747
|
+
modelValue: m.value,
|
|
1748
|
+
"onUpdate:modelValue": V[0] || (V[0] = (b) => m.value = b)
|
|
1721
1749
|
}, null, 8, ["node", "modelValue"]))), 128))
|
|
1722
1750
|
]));
|
|
1723
1751
|
}
|
|
1724
|
-
}), Gt = /* @__PURE__ */
|
|
1752
|
+
}), Gt = /* @__PURE__ */ ve(Kt, [["__scopeId", "data-v-a20c32c5"]]), Zt = { class: "bar" }, Qt = { class: "surface" }, eo = /* @__PURE__ */ J({
|
|
1725
1753
|
__name: "PreviewDialog",
|
|
1726
1754
|
props: {
|
|
1727
1755
|
modelValue: { type: Boolean }
|
|
1728
1756
|
},
|
|
1729
1757
|
emits: ["update:modelValue"],
|
|
1730
1758
|
setup(e, { emit: l }) {
|
|
1731
|
-
const t = e, r = l,
|
|
1759
|
+
const t = e, r = l, m = $({
|
|
1732
1760
|
get: () => t.modelValue,
|
|
1733
|
-
set: (
|
|
1734
|
-
}), { schema: h, formData:
|
|
1735
|
-
|
|
1736
|
-
const
|
|
1737
|
-
Object.keys(
|
|
1738
|
-
const
|
|
1739
|
-
|
|
1740
|
-
() =>
|
|
1741
|
-
(
|
|
1742
|
-
|
|
1761
|
+
set: (U) => r("update:modelValue", U)
|
|
1762
|
+
}), { schema: h, formData: V, setFormData: u, exportFormData: b, importFormData: M } = Ve(), E = $(() => h.value), k = I("pc"), C = I(!1);
|
|
1763
|
+
I(!1);
|
|
1764
|
+
const N = I({});
|
|
1765
|
+
Object.keys(N.value).length === 0 && Object.keys(V.value).length > 0 && (N.value = { ...V.value });
|
|
1766
|
+
const F = I(!1), W = I(""), L = I(!1), X = I("");
|
|
1767
|
+
q(
|
|
1768
|
+
() => m.value,
|
|
1769
|
+
(U) => {
|
|
1770
|
+
U && (N.value = b());
|
|
1743
1771
|
},
|
|
1744
1772
|
{ immediate: !0 }
|
|
1745
|
-
),
|
|
1746
|
-
() =>
|
|
1747
|
-
(
|
|
1748
|
-
u(
|
|
1773
|
+
), q(
|
|
1774
|
+
() => N.value,
|
|
1775
|
+
(U) => {
|
|
1776
|
+
u(U);
|
|
1749
1777
|
},
|
|
1750
1778
|
{ deep: !0 }
|
|
1751
1779
|
);
|
|
1752
|
-
function
|
|
1753
|
-
|
|
1780
|
+
function ne() {
|
|
1781
|
+
W.value = JSON.stringify(N.value, null, 2), F.value = !0;
|
|
1754
1782
|
}
|
|
1755
|
-
function
|
|
1756
|
-
navigator.clipboard.writeText(
|
|
1757
|
-
|
|
1783
|
+
function ee() {
|
|
1784
|
+
navigator.clipboard.writeText(W.value).then(() => {
|
|
1785
|
+
ge.success("已复制");
|
|
1758
1786
|
});
|
|
1759
1787
|
}
|
|
1760
|
-
function
|
|
1761
|
-
|
|
1788
|
+
function de() {
|
|
1789
|
+
X.value = "", L.value = !0;
|
|
1762
1790
|
}
|
|
1763
|
-
function
|
|
1791
|
+
function se() {
|
|
1764
1792
|
try {
|
|
1765
|
-
const
|
|
1766
|
-
|
|
1793
|
+
const U = JSON.parse(X.value);
|
|
1794
|
+
M(U), N.value = b(), L.value = !1, ge.success("已导入数据");
|
|
1767
1795
|
} catch {
|
|
1768
|
-
|
|
1796
|
+
ge.error("JSON 解析失败");
|
|
1769
1797
|
}
|
|
1770
1798
|
}
|
|
1771
|
-
return (
|
|
1772
|
-
const
|
|
1773
|
-
return a(),
|
|
1774
|
-
o(
|
|
1775
|
-
modelValue:
|
|
1776
|
-
"onUpdate:modelValue":
|
|
1799
|
+
return (U, g) => {
|
|
1800
|
+
const d = w("el-radio-button"), s = w("el-radio-group"), T = w("el-button"), le = w("el-form"), G = w("el-dialog"), Y = w("el-input"), Z = w("el-alert");
|
|
1801
|
+
return a(), f(D, null, [
|
|
1802
|
+
o(G, {
|
|
1803
|
+
modelValue: m.value,
|
|
1804
|
+
"onUpdate:modelValue": g[4] || (g[4] = (_) => m.value = _),
|
|
1777
1805
|
width: "980px",
|
|
1778
1806
|
title: "预览",
|
|
1779
1807
|
top: "4vh",
|
|
1780
|
-
fullscreen:
|
|
1808
|
+
fullscreen: C.value
|
|
1781
1809
|
}, {
|
|
1782
|
-
footer:
|
|
1783
|
-
o(
|
|
1784
|
-
onClick:
|
|
1810
|
+
footer: i(() => [
|
|
1811
|
+
o(T, {
|
|
1812
|
+
onClick: g[3] || (g[3] = (_) => m.value = !1)
|
|
1785
1813
|
}, {
|
|
1786
|
-
default:
|
|
1787
|
-
|
|
1814
|
+
default: i(() => [...g[16] || (g[16] = [
|
|
1815
|
+
z(" 关闭 ", -1)
|
|
1788
1816
|
])]),
|
|
1789
1817
|
_: 1
|
|
1790
1818
|
})
|
|
1791
1819
|
]),
|
|
1792
|
-
default:
|
|
1793
|
-
|
|
1794
|
-
o(
|
|
1820
|
+
default: i(() => [
|
|
1821
|
+
y("div", Zt, [
|
|
1822
|
+
o(s, {
|
|
1795
1823
|
modelValue: k.value,
|
|
1796
|
-
"onUpdate:modelValue":
|
|
1824
|
+
"onUpdate:modelValue": g[0] || (g[0] = (_) => k.value = _),
|
|
1797
1825
|
size: "small"
|
|
1798
1826
|
}, {
|
|
1799
|
-
default:
|
|
1800
|
-
o(
|
|
1801
|
-
default:
|
|
1802
|
-
|
|
1827
|
+
default: i(() => [
|
|
1828
|
+
o(d, { label: "pc" }, {
|
|
1829
|
+
default: i(() => [...g[11] || (g[11] = [
|
|
1830
|
+
z(" PC ", -1)
|
|
1803
1831
|
])]),
|
|
1804
1832
|
_: 1
|
|
1805
1833
|
}),
|
|
1806
|
-
o(
|
|
1807
|
-
default:
|
|
1808
|
-
|
|
1834
|
+
o(d, { label: "mobile" }, {
|
|
1835
|
+
default: i(() => [...g[12] || (g[12] = [
|
|
1836
|
+
z(" 移动端 ", -1)
|
|
1809
1837
|
])]),
|
|
1810
1838
|
_: 1
|
|
1811
1839
|
})
|
|
1812
1840
|
]),
|
|
1813
1841
|
_: 1
|
|
1814
1842
|
}, 8, ["modelValue"]),
|
|
1815
|
-
o(
|
|
1816
|
-
onClick:
|
|
1843
|
+
o(T, {
|
|
1844
|
+
onClick: g[1] || (g[1] = (_) => C.value = !C.value),
|
|
1817
1845
|
size: "small",
|
|
1818
1846
|
style: { "margin-left": "12px" }
|
|
1819
1847
|
}, {
|
|
1820
|
-
default:
|
|
1821
|
-
|
|
1848
|
+
default: i(() => [
|
|
1849
|
+
z(te(C.value ? "退出全屏" : "全屏"), 1)
|
|
1822
1850
|
]),
|
|
1823
1851
|
_: 1
|
|
1824
1852
|
}),
|
|
1825
|
-
|
|
1826
|
-
o(
|
|
1827
|
-
default:
|
|
1828
|
-
|
|
1853
|
+
g[15] || (g[15] = y("div", { class: "spacer" }, null, -1)),
|
|
1854
|
+
o(T, { onClick: ne }, {
|
|
1855
|
+
default: i(() => [...g[13] || (g[13] = [
|
|
1856
|
+
z(" 导出数据 JSON ", -1)
|
|
1829
1857
|
])]),
|
|
1830
1858
|
_: 1
|
|
1831
1859
|
}),
|
|
1832
|
-
o(
|
|
1833
|
-
default:
|
|
1834
|
-
|
|
1860
|
+
o(T, { onClick: de }, {
|
|
1861
|
+
default: i(() => [...g[14] || (g[14] = [
|
|
1862
|
+
z(" 导入数据 JSON ", -1)
|
|
1835
1863
|
])]),
|
|
1836
1864
|
_: 1
|
|
1837
1865
|
})
|
|
1838
1866
|
]),
|
|
1839
|
-
|
|
1840
|
-
class:
|
|
1867
|
+
y("div", {
|
|
1868
|
+
class: Be(["viewport", { mobile: k.value === "mobile" }])
|
|
1841
1869
|
}, [
|
|
1842
|
-
|
|
1843
|
-
o(
|
|
1844
|
-
default:
|
|
1870
|
+
y("div", Qt, [
|
|
1871
|
+
o(le, { "label-position": "top" }, {
|
|
1872
|
+
default: i(() => [
|
|
1845
1873
|
o(Gt, {
|
|
1846
|
-
schema:
|
|
1847
|
-
modelValue:
|
|
1848
|
-
"onUpdate:modelValue":
|
|
1874
|
+
schema: E.value,
|
|
1875
|
+
modelValue: N.value,
|
|
1876
|
+
"onUpdate:modelValue": g[2] || (g[2] = (_) => N.value = _)
|
|
1849
1877
|
}, null, 8, ["schema", "modelValue"])
|
|
1850
1878
|
]),
|
|
1851
1879
|
_: 1
|
|
@@ -1855,35 +1883,35 @@ const Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P
|
|
|
1855
1883
|
]),
|
|
1856
1884
|
_: 1
|
|
1857
1885
|
}, 8, ["modelValue", "fullscreen"]),
|
|
1858
|
-
o(
|
|
1859
|
-
modelValue:
|
|
1860
|
-
"onUpdate:modelValue":
|
|
1886
|
+
o(G, {
|
|
1887
|
+
modelValue: F.value,
|
|
1888
|
+
"onUpdate:modelValue": g[7] || (g[7] = (_) => F.value = _),
|
|
1861
1889
|
width: "860px",
|
|
1862
1890
|
title: "导出数据 JSON"
|
|
1863
1891
|
}, {
|
|
1864
|
-
footer:
|
|
1865
|
-
o(
|
|
1866
|
-
onClick:
|
|
1892
|
+
footer: i(() => [
|
|
1893
|
+
o(T, {
|
|
1894
|
+
onClick: g[6] || (g[6] = (_) => F.value = !1)
|
|
1867
1895
|
}, {
|
|
1868
|
-
default:
|
|
1869
|
-
|
|
1896
|
+
default: i(() => [...g[17] || (g[17] = [
|
|
1897
|
+
z(" 关闭 ", -1)
|
|
1870
1898
|
])]),
|
|
1871
1899
|
_: 1
|
|
1872
1900
|
}),
|
|
1873
|
-
o(
|
|
1901
|
+
o(T, {
|
|
1874
1902
|
type: "primary",
|
|
1875
|
-
onClick:
|
|
1903
|
+
onClick: ee
|
|
1876
1904
|
}, {
|
|
1877
|
-
default:
|
|
1878
|
-
|
|
1905
|
+
default: i(() => [...g[18] || (g[18] = [
|
|
1906
|
+
z(" 复制 ", -1)
|
|
1879
1907
|
])]),
|
|
1880
1908
|
_: 1
|
|
1881
1909
|
})
|
|
1882
1910
|
]),
|
|
1883
|
-
default:
|
|
1884
|
-
o(
|
|
1885
|
-
modelValue:
|
|
1886
|
-
"onUpdate:modelValue":
|
|
1911
|
+
default: i(() => [
|
|
1912
|
+
o(Y, {
|
|
1913
|
+
modelValue: W.value,
|
|
1914
|
+
"onUpdate:modelValue": g[5] || (g[5] = (_) => W.value = _),
|
|
1887
1915
|
type: "textarea",
|
|
1888
1916
|
rows: 22,
|
|
1889
1917
|
readonly: ""
|
|
@@ -1891,42 +1919,42 @@ const Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P
|
|
|
1891
1919
|
]),
|
|
1892
1920
|
_: 1
|
|
1893
1921
|
}, 8, ["modelValue"]),
|
|
1894
|
-
o(
|
|
1895
|
-
modelValue:
|
|
1896
|
-
"onUpdate:modelValue":
|
|
1922
|
+
o(G, {
|
|
1923
|
+
modelValue: L.value,
|
|
1924
|
+
"onUpdate:modelValue": g[10] || (g[10] = (_) => L.value = _),
|
|
1897
1925
|
width: "860px",
|
|
1898
1926
|
title: "导入数据 JSON"
|
|
1899
1927
|
}, {
|
|
1900
|
-
footer:
|
|
1901
|
-
o(
|
|
1902
|
-
onClick:
|
|
1928
|
+
footer: i(() => [
|
|
1929
|
+
o(T, {
|
|
1930
|
+
onClick: g[9] || (g[9] = (_) => L.value = !1)
|
|
1903
1931
|
}, {
|
|
1904
|
-
default:
|
|
1905
|
-
|
|
1932
|
+
default: i(() => [...g[19] || (g[19] = [
|
|
1933
|
+
z(" 取消 ", -1)
|
|
1906
1934
|
])]),
|
|
1907
1935
|
_: 1
|
|
1908
1936
|
}),
|
|
1909
|
-
o(
|
|
1937
|
+
o(T, {
|
|
1910
1938
|
type: "primary",
|
|
1911
|
-
onClick:
|
|
1939
|
+
onClick: se
|
|
1912
1940
|
}, {
|
|
1913
|
-
default:
|
|
1914
|
-
|
|
1941
|
+
default: i(() => [...g[20] || (g[20] = [
|
|
1942
|
+
z(" 确定 ", -1)
|
|
1915
1943
|
])]),
|
|
1916
1944
|
_: 1
|
|
1917
1945
|
})
|
|
1918
1946
|
]),
|
|
1919
|
-
default:
|
|
1920
|
-
o(
|
|
1947
|
+
default: i(() => [
|
|
1948
|
+
o(Z, {
|
|
1921
1949
|
title: "请粘贴数据 JSON,确定后将覆盖当前表单数据。",
|
|
1922
1950
|
type: "warning",
|
|
1923
1951
|
"show-icon": "",
|
|
1924
1952
|
closable: !1
|
|
1925
1953
|
}),
|
|
1926
|
-
|
|
1927
|
-
o(
|
|
1928
|
-
modelValue:
|
|
1929
|
-
"onUpdate:modelValue":
|
|
1954
|
+
g[21] || (g[21] = y("div", { style: { height: "10px" } }, null, -1)),
|
|
1955
|
+
o(Y, {
|
|
1956
|
+
modelValue: X.value,
|
|
1957
|
+
"onUpdate:modelValue": g[8] || (g[8] = (_) => X.value = _),
|
|
1930
1958
|
type: "textarea",
|
|
1931
1959
|
rows: 22,
|
|
1932
1960
|
placeholder: "在此粘贴 JSON"
|
|
@@ -1937,205 +1965,205 @@ const Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P
|
|
|
1937
1965
|
], 64);
|
|
1938
1966
|
};
|
|
1939
1967
|
}
|
|
1940
|
-
}), lo = /* @__PURE__ */
|
|
1968
|
+
}), lo = /* @__PURE__ */ ve(eo, [["__scopeId", "data-v-2e5f57e6"]]), to = { class: "wrap" }, oo = {
|
|
1941
1969
|
key: 1,
|
|
1942
1970
|
class: "panel"
|
|
1943
|
-
}, no = { class: "tabsEditor" }, ao = { class: "tabsEditor" }, uo = { class: "options" },
|
|
1971
|
+
}, no = { class: "tabsEditor" }, ao = { class: "tabsEditor" }, uo = { class: "options" }, ro = {
|
|
1944
1972
|
class: "colHeader",
|
|
1945
1973
|
style: { display: "flex", "justify-content": "space-between", "align-items": "center", width: "100%", "padding-right": "10px" }
|
|
1946
|
-
},
|
|
1974
|
+
}, io = { class: "options-list" }, so = { class: "options" }, po = /* @__PURE__ */ J({
|
|
1947
1975
|
__name: "PropertiesPanel",
|
|
1948
1976
|
setup(e) {
|
|
1949
|
-
const { schema: l, selection: t, updateNodeProps: r, updateFlexCols:
|
|
1950
|
-
const
|
|
1951
|
-
if (!
|
|
1977
|
+
const { schema: l, selection: t, updateNodeProps: r, updateFlexCols: m, updateTabs: h, updateCollapse: V } = Ve(), u = $(() => {
|
|
1978
|
+
const p = t.selectedNodeId.value;
|
|
1979
|
+
if (!p) return null;
|
|
1952
1980
|
const n = [...l.value.root.children];
|
|
1953
1981
|
for (; n.length; ) {
|
|
1954
|
-
const
|
|
1955
|
-
if (
|
|
1956
|
-
if (
|
|
1957
|
-
for (const
|
|
1958
|
-
else if (
|
|
1959
|
-
for (const
|
|
1960
|
-
else if (
|
|
1961
|
-
for (const
|
|
1982
|
+
const R = n.shift();
|
|
1983
|
+
if (R.id === p) return R;
|
|
1984
|
+
if (R.type === "flexRow")
|
|
1985
|
+
for (const H of R.columns) n.push(...H.children);
|
|
1986
|
+
else if (R.type === "collapse")
|
|
1987
|
+
for (const H of R.items) n.push(...H.children);
|
|
1988
|
+
else if (R.type === "tabs")
|
|
1989
|
+
for (const H of R.tabs) n.push(...H.children);
|
|
1962
1990
|
}
|
|
1963
1991
|
return null;
|
|
1964
|
-
}),
|
|
1965
|
-
var
|
|
1966
|
-
return ((
|
|
1967
|
-
}),
|
|
1968
|
-
var
|
|
1969
|
-
return ((
|
|
1970
|
-
}),
|
|
1971
|
-
var
|
|
1972
|
-
return ((
|
|
1973
|
-
}),
|
|
1974
|
-
var
|
|
1975
|
-
return ((
|
|
1976
|
-
}),
|
|
1977
|
-
|
|
1992
|
+
}), b = I(2), M = I(12), E = I(!1), k = I([]), C = I("card"), N = I([]), F = I(!0), W = I(10), L = I(!0), X = I([]), ne = I(""), ee = I(""), de = I(""), se = I(!1), U = I([]), g = I(!1), d = I("text"), s = I("开启"), T = I("关闭"), le = $(() => {
|
|
1993
|
+
var p, n, R;
|
|
1994
|
+
return ((p = u.value) == null ? void 0 : p.type) === "select" || ((n = u.value) == null ? void 0 : n.type) === "radio" || ((R = u.value) == null ? void 0 : R.type) === "checkbox";
|
|
1995
|
+
}), G = $(() => {
|
|
1996
|
+
var p;
|
|
1997
|
+
return ((p = u.value) == null ? void 0 : p.type) === "input";
|
|
1998
|
+
}), Y = $(() => {
|
|
1999
|
+
var p;
|
|
2000
|
+
return ((p = u.value) == null ? void 0 : p.type) === "select";
|
|
2001
|
+
}), Z = $(() => {
|
|
2002
|
+
var p;
|
|
2003
|
+
return ((p = u.value) == null ? void 0 : p.type) === "switch";
|
|
2004
|
+
}), _ = I(!1);
|
|
2005
|
+
q(
|
|
1978
2006
|
() => u.value,
|
|
1979
|
-
(
|
|
1980
|
-
if (
|
|
1981
|
-
if (
|
|
1982
|
-
|
|
1983
|
-
else if (
|
|
1984
|
-
|
|
1985
|
-
else if (
|
|
1986
|
-
|
|
1987
|
-
else if (
|
|
1988
|
-
|
|
1989
|
-
const n = (
|
|
1990
|
-
JSON.stringify(n) !== JSON.stringify(
|
|
1991
|
-
} else if (
|
|
1992
|
-
|
|
2007
|
+
(p) => {
|
|
2008
|
+
if (p) {
|
|
2009
|
+
if (_.value = !0, p.type === "flexRow")
|
|
2010
|
+
b.value = p.props.cols, M.value = p.props.gap ?? 12;
|
|
2011
|
+
else if (p.type === "collapse")
|
|
2012
|
+
E.value = p.props.accordion, k.value = p.items.map((n) => ({ id: n.id, title: n.title, name: n.name }));
|
|
2013
|
+
else if (p.type === "tabs")
|
|
2014
|
+
C.value = p.props.type, N.value = p.tabs.map((n) => ({ id: n.id, label: n.label }));
|
|
2015
|
+
else if (p.type === "table") {
|
|
2016
|
+
ne.value = p.props.field, ee.value = p.props.label, F.value = p.props.pagination, W.value = p.props.pageSize ?? 10, L.value = p.props.enableExcelImport;
|
|
2017
|
+
const n = (p.props.columns ?? []).map((R) => ({ ...R }));
|
|
2018
|
+
JSON.stringify(n) !== JSON.stringify(X.value) && (X.value = n);
|
|
2019
|
+
} else if (p.type === "title")
|
|
2020
|
+
ee.value = p.props.label;
|
|
1993
2021
|
else {
|
|
1994
|
-
const n =
|
|
1995
|
-
|
|
1996
|
-
const
|
|
1997
|
-
JSON.stringify(
|
|
2022
|
+
const n = p;
|
|
2023
|
+
ne.value = n.props.field, ee.value = n.props.label, de.value = n.props.placeholder ?? "", se.value = !!n.props.required, p.type === "switch" && (s.value = n.props.activeText ?? "开启", T.value = n.props.inactiveText ?? "关闭");
|
|
2024
|
+
const R = (n.props.options ?? []).map((H) => ({ ...H }));
|
|
2025
|
+
JSON.stringify(R) !== JSON.stringify(U.value) && (U.value = R), g.value = !!n.props.multiple, d.value = n.props.inputType ?? "text";
|
|
1998
2026
|
}
|
|
1999
2027
|
setTimeout(() => {
|
|
2000
|
-
|
|
2028
|
+
_.value = !1;
|
|
2001
2029
|
}, 0);
|
|
2002
2030
|
}
|
|
2003
2031
|
},
|
|
2004
2032
|
{ immediate: !0 }
|
|
2005
|
-
),
|
|
2033
|
+
), q(b, (p) => {
|
|
2006
2034
|
var n;
|
|
2007
|
-
|
|
2008
|
-
}),
|
|
2035
|
+
_.value || ((n = u.value) == null ? void 0 : n.type) === "flexRow" && m(u.value.id, p);
|
|
2036
|
+
}), q(M, (p) => {
|
|
2009
2037
|
var n;
|
|
2010
|
-
|
|
2011
|
-
}),
|
|
2038
|
+
_.value || ((n = u.value) == null ? void 0 : n.type) === "flexRow" && r(u.value.id, { gap: p });
|
|
2039
|
+
}), q(E, (p) => {
|
|
2012
2040
|
var n;
|
|
2013
|
-
|
|
2014
|
-
}),
|
|
2041
|
+
_.value || ((n = u.value) == null ? void 0 : n.type) === "collapse" && V(u.value.id, { accordion: p });
|
|
2042
|
+
}), q(
|
|
2015
2043
|
() => k.value,
|
|
2016
|
-
(
|
|
2044
|
+
(p) => {
|
|
2017
2045
|
var n;
|
|
2018
|
-
|
|
2046
|
+
_.value || ((n = u.value) == null ? void 0 : n.type) === "collapse" && V(u.value.id, { items: p.map((R) => ({ id: R.id, title: R.title, name: R.name })) });
|
|
2019
2047
|
},
|
|
2020
2048
|
{ deep: !0 }
|
|
2021
|
-
),
|
|
2049
|
+
), q(C, (p) => {
|
|
2022
2050
|
var n;
|
|
2023
|
-
|
|
2024
|
-
}),
|
|
2025
|
-
() =>
|
|
2026
|
-
(
|
|
2051
|
+
_.value || ((n = u.value) == null ? void 0 : n.type) === "tabs" && h(u.value.id, { type: p });
|
|
2052
|
+
}), q(
|
|
2053
|
+
() => N.value,
|
|
2054
|
+
(p) => {
|
|
2027
2055
|
var n;
|
|
2028
|
-
|
|
2056
|
+
_.value || ((n = u.value) == null ? void 0 : n.type) === "tabs" && h(u.value.id, { tabs: p.map((R) => ({ id: R.id, label: R.label })) });
|
|
2029
2057
|
},
|
|
2030
2058
|
{ deep: !0 }
|
|
2031
|
-
),
|
|
2032
|
-
|
|
2033
|
-
}),
|
|
2034
|
-
|
|
2035
|
-
}),
|
|
2036
|
-
|
|
2037
|
-
}),
|
|
2038
|
-
|
|
2039
|
-
}),
|
|
2040
|
-
|
|
2041
|
-
}),
|
|
2042
|
-
|
|
2043
|
-
}),
|
|
2059
|
+
), q(ne, (p) => {
|
|
2060
|
+
_.value || !u.value || u.value.type === "flexRow" || u.value.type === "collapse" || u.value.type === "tabs" || r(u.value.id, { field: p });
|
|
2061
|
+
}), q(ee, (p) => {
|
|
2062
|
+
_.value || !u.value || u.value.type === "flexRow" || u.value.type === "collapse" || u.value.type === "tabs" || r(u.value.id, { label: p });
|
|
2063
|
+
}), q(de, (p) => {
|
|
2064
|
+
_.value || !u.value || u.value.type === "flexRow" || u.value.type === "collapse" || u.value.type === "tabs" || r(u.value.id, { placeholder: p });
|
|
2065
|
+
}), q(se, (p) => {
|
|
2066
|
+
_.value || !u.value || u.value.type === "flexRow" || u.value.type === "collapse" || u.value.type === "tabs" || r(u.value.id, { required: p });
|
|
2067
|
+
}), q(g, (p) => {
|
|
2068
|
+
_.value || !u.value || u.value.type !== "select" || r(u.value.id, { multiple: p });
|
|
2069
|
+
}), q(d, (p) => {
|
|
2070
|
+
_.value || !u.value || u.value.type !== "input" || r(u.value.id, { inputType: p });
|
|
2071
|
+
}), q(s, (p) => {
|
|
2044
2072
|
var n;
|
|
2045
|
-
|
|
2046
|
-
}),
|
|
2073
|
+
_.value || ((n = u.value) == null ? void 0 : n.type) === "switch" && r(u.value.id, { activeText: p });
|
|
2074
|
+
}), q(T, (p) => {
|
|
2047
2075
|
var n;
|
|
2048
|
-
|
|
2049
|
-
}),
|
|
2076
|
+
_.value || ((n = u.value) == null ? void 0 : n.type) === "switch" && r(u.value.id, { inactiveText: p });
|
|
2077
|
+
}), q(F, (p) => {
|
|
2050
2078
|
var n;
|
|
2051
|
-
|
|
2052
|
-
}),
|
|
2079
|
+
_.value || ((n = u.value) == null ? void 0 : n.type) === "table" && r(u.value.id, { pagination: p });
|
|
2080
|
+
}), q(W, (p) => {
|
|
2053
2081
|
var n;
|
|
2054
|
-
|
|
2055
|
-
}),
|
|
2082
|
+
_.value || ((n = u.value) == null ? void 0 : n.type) === "table" && r(u.value.id, { pageSize: p });
|
|
2083
|
+
}), q(L, (p) => {
|
|
2056
2084
|
var n;
|
|
2057
|
-
|
|
2058
|
-
}),
|
|
2059
|
-
() =>
|
|
2060
|
-
(
|
|
2061
|
-
var
|
|
2062
|
-
if (
|
|
2063
|
-
const n =
|
|
2064
|
-
const
|
|
2065
|
-
return
|
|
2085
|
+
_.value || ((n = u.value) == null ? void 0 : n.type) === "table" && r(u.value.id, { enableExcelImport: p });
|
|
2086
|
+
}), q(
|
|
2087
|
+
() => X.value,
|
|
2088
|
+
(p) => {
|
|
2089
|
+
var R;
|
|
2090
|
+
if (_.value || ((R = u.value) == null ? void 0 : R.type) !== "table") return;
|
|
2091
|
+
const n = p.map((H) => {
|
|
2092
|
+
const ce = { ...H };
|
|
2093
|
+
return ce.options && (ce.options = ce.options.map((A) => ({ ...A }))), ce;
|
|
2066
2094
|
});
|
|
2067
2095
|
r(u.value.id, { columns: n });
|
|
2068
2096
|
},
|
|
2069
2097
|
{ deep: !0 }
|
|
2070
|
-
),
|
|
2071
|
-
() =>
|
|
2072
|
-
(
|
|
2073
|
-
|
|
2098
|
+
), q(
|
|
2099
|
+
() => U.value,
|
|
2100
|
+
(p) => {
|
|
2101
|
+
_.value || !u.value || u.value.type === "flexRow" || u.value.type === "collapse" || u.value.type === "tabs" || r(u.value.id, { options: p.map((n) => ({ ...n })) });
|
|
2074
2102
|
},
|
|
2075
2103
|
{ deep: !0 }
|
|
2076
2104
|
);
|
|
2077
|
-
function
|
|
2078
|
-
|
|
2105
|
+
function ue() {
|
|
2106
|
+
U.value.push({ label: "新选项", value: j("opt") });
|
|
2079
2107
|
}
|
|
2080
|
-
function
|
|
2081
|
-
|
|
2108
|
+
function pe(p) {
|
|
2109
|
+
U.value.splice(p, 1);
|
|
2082
2110
|
}
|
|
2083
|
-
function
|
|
2084
|
-
k.value.push({ id:
|
|
2111
|
+
function be() {
|
|
2112
|
+
k.value.push({ id: j("item"), title: `面板 ${k.value.length + 1}`, name: j("val") });
|
|
2085
2113
|
}
|
|
2086
|
-
function
|
|
2087
|
-
k.value = k.value.filter((n) => n.id !==
|
|
2114
|
+
function ke(p) {
|
|
2115
|
+
k.value = k.value.filter((n) => n.id !== p);
|
|
2088
2116
|
}
|
|
2089
|
-
function
|
|
2090
|
-
|
|
2117
|
+
function re() {
|
|
2118
|
+
N.value.push({ id: j("tab"), label: `标签页 ${N.value.length + 1}` });
|
|
2091
2119
|
}
|
|
2092
|
-
function
|
|
2093
|
-
|
|
2120
|
+
function $e(p) {
|
|
2121
|
+
N.value = N.value.filter((n) => n.id !== p);
|
|
2094
2122
|
}
|
|
2095
|
-
function
|
|
2096
|
-
const
|
|
2097
|
-
|
|
2123
|
+
function Ie() {
|
|
2124
|
+
const p = X.value.length + 1;
|
|
2125
|
+
X.value.push({ id: j("col"), label: `列${p}`, prop: `col${p}`, type: "text" });
|
|
2098
2126
|
}
|
|
2099
|
-
function
|
|
2100
|
-
|
|
2127
|
+
function Ne(p) {
|
|
2128
|
+
X.value.splice(p, 1);
|
|
2101
2129
|
}
|
|
2102
|
-
function
|
|
2103
|
-
|
|
2130
|
+
function Ae(p) {
|
|
2131
|
+
p.options || (p.options = []), p.options.push({ label: "新选项", value: j("opt") });
|
|
2104
2132
|
}
|
|
2105
|
-
function
|
|
2106
|
-
|
|
2133
|
+
function Ee(p, n) {
|
|
2134
|
+
p.options && p.options.splice(n, 1);
|
|
2107
2135
|
}
|
|
2108
|
-
return (
|
|
2109
|
-
const
|
|
2110
|
-
return a(),
|
|
2111
|
-
n[32] || (n[32] =
|
|
2112
|
-
u.value ? (a(),
|
|
2113
|
-
u.value.type === "flexRow" ? (a(),
|
|
2136
|
+
return (p, n) => {
|
|
2137
|
+
const R = w("el-empty"), H = w("el-option"), ce = w("el-select"), A = w("el-form-item"), ze = w("el-input-number"), c = w("el-form"), O = w("el-switch"), S = w("el-input"), me = w("el-button"), nl = w("el-collapse-item"), al = w("el-collapse");
|
|
2138
|
+
return a(), f("div", to, [
|
|
2139
|
+
n[32] || (n[32] = y("div", { class: "title" }, " 属性 ", -1)),
|
|
2140
|
+
u.value ? (a(), f("div", oo, [
|
|
2141
|
+
u.value.type === "flexRow" ? (a(), x(c, {
|
|
2114
2142
|
key: 0,
|
|
2115
2143
|
"label-width": "92px"
|
|
2116
2144
|
}, {
|
|
2117
|
-
default:
|
|
2118
|
-
o(
|
|
2119
|
-
default:
|
|
2120
|
-
o(
|
|
2121
|
-
modelValue:
|
|
2122
|
-
"onUpdate:modelValue": n[0] || (n[0] = (v) =>
|
|
2145
|
+
default: i(() => [
|
|
2146
|
+
o(A, { label: "列数" }, {
|
|
2147
|
+
default: i(() => [
|
|
2148
|
+
o(ce, {
|
|
2149
|
+
modelValue: b.value,
|
|
2150
|
+
"onUpdate:modelValue": n[0] || (n[0] = (v) => b.value = v),
|
|
2123
2151
|
style: { width: "200px" }
|
|
2124
2152
|
}, {
|
|
2125
|
-
default:
|
|
2126
|
-
o(
|
|
2153
|
+
default: i(() => [
|
|
2154
|
+
o(H, {
|
|
2127
2155
|
value: 1,
|
|
2128
2156
|
label: "1"
|
|
2129
2157
|
}),
|
|
2130
|
-
o(
|
|
2158
|
+
o(H, {
|
|
2131
2159
|
value: 2,
|
|
2132
2160
|
label: "2"
|
|
2133
2161
|
}),
|
|
2134
|
-
o(
|
|
2162
|
+
o(H, {
|
|
2135
2163
|
value: 3,
|
|
2136
2164
|
label: "3"
|
|
2137
2165
|
}),
|
|
2138
|
-
o(
|
|
2166
|
+
o(H, {
|
|
2139
2167
|
value: 4,
|
|
2140
2168
|
label: "4"
|
|
2141
2169
|
})
|
|
@@ -2145,11 +2173,11 @@ const Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P
|
|
|
2145
2173
|
]),
|
|
2146
2174
|
_: 1
|
|
2147
2175
|
}),
|
|
2148
|
-
o(
|
|
2149
|
-
default:
|
|
2150
|
-
o(
|
|
2151
|
-
modelValue:
|
|
2152
|
-
"onUpdate:modelValue": n[1] || (n[1] = (v) =>
|
|
2176
|
+
o(A, { label: "间距" }, {
|
|
2177
|
+
default: i(() => [
|
|
2178
|
+
o(ze, {
|
|
2179
|
+
modelValue: M.value,
|
|
2180
|
+
"onUpdate:modelValue": n[1] || (n[1] = (v) => M.value = v),
|
|
2153
2181
|
min: 0,
|
|
2154
2182
|
max: 48
|
|
2155
2183
|
}, null, 8, ["modelValue"])
|
|
@@ -2158,14 +2186,14 @@ const Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P
|
|
|
2158
2186
|
})
|
|
2159
2187
|
]),
|
|
2160
2188
|
_: 1
|
|
2161
|
-
})) : u.value.type === "collapse" ? (a(),
|
|
2162
|
-
o(
|
|
2163
|
-
default:
|
|
2164
|
-
o(
|
|
2165
|
-
default:
|
|
2166
|
-
o(
|
|
2167
|
-
modelValue:
|
|
2168
|
-
"onUpdate:modelValue": n[2] || (n[2] = (v) =>
|
|
2189
|
+
})) : u.value.type === "collapse" ? (a(), f(D, { key: 1 }, [
|
|
2190
|
+
o(c, { "label-width": "92px" }, {
|
|
2191
|
+
default: i(() => [
|
|
2192
|
+
o(A, { label: "手风琴" }, {
|
|
2193
|
+
default: i(() => [
|
|
2194
|
+
o(O, {
|
|
2195
|
+
modelValue: E.value,
|
|
2196
|
+
"onUpdate:modelValue": n[2] || (n[2] = (v) => E.value = v)
|
|
2169
2197
|
}, null, 8, ["modelValue"])
|
|
2170
2198
|
]),
|
|
2171
2199
|
_: 1
|
|
@@ -2173,50 +2201,50 @@ const Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P
|
|
|
2173
2201
|
]),
|
|
2174
2202
|
_: 1
|
|
2175
2203
|
}),
|
|
2176
|
-
n[19] || (n[19] =
|
|
2177
|
-
|
|
2178
|
-
(a(!0),
|
|
2204
|
+
n[19] || (n[19] = y("div", { class: "subTitle" }, " 面板 ", -1)),
|
|
2205
|
+
y("div", no, [
|
|
2206
|
+
(a(!0), f(D, null, B(k.value, (v) => (a(), f("div", {
|
|
2179
2207
|
key: v.id,
|
|
2180
2208
|
class: "tabRow"
|
|
2181
2209
|
}, [
|
|
2182
|
-
o(
|
|
2210
|
+
o(S, {
|
|
2183
2211
|
modelValue: v.title,
|
|
2184
|
-
"onUpdate:modelValue": (
|
|
2212
|
+
"onUpdate:modelValue": (fe) => v.title = fe
|
|
2185
2213
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2186
|
-
o(
|
|
2214
|
+
o(me, {
|
|
2187
2215
|
disabled: k.value.length <= 1,
|
|
2188
2216
|
type: "danger",
|
|
2189
|
-
onClick: (
|
|
2217
|
+
onClick: (fe) => ke(v.id)
|
|
2190
2218
|
}, {
|
|
2191
|
-
default:
|
|
2192
|
-
|
|
2219
|
+
default: i(() => [...n[17] || (n[17] = [
|
|
2220
|
+
z(" 删除 ", -1)
|
|
2193
2221
|
])]),
|
|
2194
2222
|
_: 1
|
|
2195
2223
|
}, 8, ["disabled", "onClick"])
|
|
2196
2224
|
]))), 128)),
|
|
2197
|
-
o(
|
|
2198
|
-
default:
|
|
2199
|
-
|
|
2225
|
+
o(me, { onClick: be }, {
|
|
2226
|
+
default: i(() => [...n[18] || (n[18] = [
|
|
2227
|
+
z(" 新增面板 ", -1)
|
|
2200
2228
|
])]),
|
|
2201
2229
|
_: 1
|
|
2202
2230
|
})
|
|
2203
2231
|
])
|
|
2204
|
-
], 64)) : u.value.type === "tabs" ? (a(),
|
|
2205
|
-
o(
|
|
2206
|
-
default:
|
|
2207
|
-
o(
|
|
2208
|
-
default:
|
|
2209
|
-
o(
|
|
2210
|
-
modelValue:
|
|
2211
|
-
"onUpdate:modelValue": n[3] || (n[3] = (v) =>
|
|
2232
|
+
], 64)) : u.value.type === "tabs" ? (a(), f(D, { key: 2 }, [
|
|
2233
|
+
o(c, { "label-width": "92px" }, {
|
|
2234
|
+
default: i(() => [
|
|
2235
|
+
o(A, { label: "样式" }, {
|
|
2236
|
+
default: i(() => [
|
|
2237
|
+
o(ce, {
|
|
2238
|
+
modelValue: C.value,
|
|
2239
|
+
"onUpdate:modelValue": n[3] || (n[3] = (v) => C.value = v),
|
|
2212
2240
|
style: { width: "200px" }
|
|
2213
2241
|
}, {
|
|
2214
|
-
default:
|
|
2215
|
-
o(
|
|
2242
|
+
default: i(() => [
|
|
2243
|
+
o(H, {
|
|
2216
2244
|
value: "card",
|
|
2217
2245
|
label: "card"
|
|
2218
2246
|
}),
|
|
2219
|
-
o(
|
|
2247
|
+
o(H, {
|
|
2220
2248
|
value: "border-card",
|
|
2221
2249
|
label: "border-card"
|
|
2222
2250
|
})
|
|
@@ -2229,82 +2257,82 @@ const Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P
|
|
|
2229
2257
|
]),
|
|
2230
2258
|
_: 1
|
|
2231
2259
|
}),
|
|
2232
|
-
n[22] || (n[22] =
|
|
2233
|
-
|
|
2234
|
-
(a(!0),
|
|
2260
|
+
n[22] || (n[22] = y("div", { class: "subTitle" }, " 标签 ", -1)),
|
|
2261
|
+
y("div", ao, [
|
|
2262
|
+
(a(!0), f(D, null, B(N.value, (v) => (a(), f("div", {
|
|
2235
2263
|
key: v.id,
|
|
2236
2264
|
class: "tabRow"
|
|
2237
2265
|
}, [
|
|
2238
|
-
o(
|
|
2266
|
+
o(S, {
|
|
2239
2267
|
modelValue: v.label,
|
|
2240
|
-
"onUpdate:modelValue": (
|
|
2268
|
+
"onUpdate:modelValue": (fe) => v.label = fe
|
|
2241
2269
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2242
|
-
o(
|
|
2243
|
-
disabled:
|
|
2270
|
+
o(me, {
|
|
2271
|
+
disabled: N.value.length <= 1,
|
|
2244
2272
|
type: "danger",
|
|
2245
|
-
onClick: (
|
|
2273
|
+
onClick: (fe) => $e(v.id)
|
|
2246
2274
|
}, {
|
|
2247
|
-
default:
|
|
2248
|
-
|
|
2275
|
+
default: i(() => [...n[20] || (n[20] = [
|
|
2276
|
+
z(" 删除 ", -1)
|
|
2249
2277
|
])]),
|
|
2250
2278
|
_: 1
|
|
2251
2279
|
}, 8, ["disabled", "onClick"])
|
|
2252
2280
|
]))), 128)),
|
|
2253
|
-
o(
|
|
2254
|
-
default:
|
|
2255
|
-
|
|
2281
|
+
o(me, { onClick: re }, {
|
|
2282
|
+
default: i(() => [...n[21] || (n[21] = [
|
|
2283
|
+
z(" 新增标签页 ", -1)
|
|
2256
2284
|
])]),
|
|
2257
2285
|
_: 1
|
|
2258
2286
|
})
|
|
2259
2287
|
])
|
|
2260
|
-
], 64)) : u.value.type === "table" ? (a(),
|
|
2261
|
-
o(
|
|
2262
|
-
default:
|
|
2263
|
-
o(
|
|
2264
|
-
default:
|
|
2265
|
-
o(
|
|
2266
|
-
modelValue:
|
|
2267
|
-
"onUpdate:modelValue": n[4] || (n[4] = (v) =>
|
|
2288
|
+
], 64)) : u.value.type === "table" ? (a(), f(D, { key: 3 }, [
|
|
2289
|
+
o(c, { "label-width": "92px" }, {
|
|
2290
|
+
default: i(() => [
|
|
2291
|
+
o(A, { label: "字段名" }, {
|
|
2292
|
+
default: i(() => [
|
|
2293
|
+
o(S, {
|
|
2294
|
+
modelValue: ne.value,
|
|
2295
|
+
"onUpdate:modelValue": n[4] || (n[4] = (v) => ne.value = v)
|
|
2268
2296
|
}, null, 8, ["modelValue"])
|
|
2269
2297
|
]),
|
|
2270
2298
|
_: 1
|
|
2271
2299
|
}),
|
|
2272
|
-
o(
|
|
2273
|
-
default:
|
|
2274
|
-
o(
|
|
2275
|
-
modelValue:
|
|
2276
|
-
"onUpdate:modelValue": n[5] || (n[5] = (v) =>
|
|
2300
|
+
o(A, { label: "标题" }, {
|
|
2301
|
+
default: i(() => [
|
|
2302
|
+
o(S, {
|
|
2303
|
+
modelValue: ee.value,
|
|
2304
|
+
"onUpdate:modelValue": n[5] || (n[5] = (v) => ee.value = v)
|
|
2277
2305
|
}, null, 8, ["modelValue"])
|
|
2278
2306
|
]),
|
|
2279
2307
|
_: 1
|
|
2280
2308
|
}),
|
|
2281
|
-
o(
|
|
2282
|
-
default:
|
|
2283
|
-
o(
|
|
2284
|
-
modelValue:
|
|
2285
|
-
"onUpdate:modelValue": n[6] || (n[6] = (v) =>
|
|
2309
|
+
o(A, { label: "分页" }, {
|
|
2310
|
+
default: i(() => [
|
|
2311
|
+
o(O, {
|
|
2312
|
+
modelValue: F.value,
|
|
2313
|
+
"onUpdate:modelValue": n[6] || (n[6] = (v) => F.value = v)
|
|
2286
2314
|
}, null, 8, ["modelValue"])
|
|
2287
2315
|
]),
|
|
2288
2316
|
_: 1
|
|
2289
2317
|
}),
|
|
2290
|
-
|
|
2318
|
+
F.value ? (a(), x(A, {
|
|
2291
2319
|
key: 0,
|
|
2292
2320
|
label: "每页条数"
|
|
2293
2321
|
}, {
|
|
2294
|
-
default:
|
|
2295
|
-
o(
|
|
2296
|
-
modelValue:
|
|
2297
|
-
"onUpdate:modelValue": n[7] || (n[7] = (v) =>
|
|
2322
|
+
default: i(() => [
|
|
2323
|
+
o(ze, {
|
|
2324
|
+
modelValue: W.value,
|
|
2325
|
+
"onUpdate:modelValue": n[7] || (n[7] = (v) => W.value = v),
|
|
2298
2326
|
min: 1
|
|
2299
2327
|
}, null, 8, ["modelValue"])
|
|
2300
2328
|
]),
|
|
2301
2329
|
_: 1
|
|
2302
|
-
})) :
|
|
2303
|
-
o(
|
|
2304
|
-
default:
|
|
2305
|
-
o(
|
|
2306
|
-
modelValue:
|
|
2307
|
-
"onUpdate:modelValue": n[8] || (n[8] = (v) =>
|
|
2330
|
+
})) : Q("", !0),
|
|
2331
|
+
o(A, { label: "Excel导入" }, {
|
|
2332
|
+
default: i(() => [
|
|
2333
|
+
o(O, {
|
|
2334
|
+
modelValue: L.value,
|
|
2335
|
+
"onUpdate:modelValue": n[8] || (n[8] = (v) => L.value = v)
|
|
2308
2336
|
}, null, 8, ["modelValue"])
|
|
2309
2337
|
]),
|
|
2310
2338
|
_: 1
|
|
@@ -2312,87 +2340,87 @@ const Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P
|
|
|
2312
2340
|
]),
|
|
2313
2341
|
_: 1
|
|
2314
2342
|
}),
|
|
2315
|
-
n[28] || (n[28] =
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
default:
|
|
2319
|
-
(a(!0),
|
|
2343
|
+
n[28] || (n[28] = y("div", { class: "subTitle" }, " 列配置 ", -1)),
|
|
2344
|
+
y("div", uo, [
|
|
2345
|
+
X.value.length > 0 ? (a(), x(al, { key: 0 }, {
|
|
2346
|
+
default: i(() => [
|
|
2347
|
+
(a(!0), f(D, null, B(X.value, (v, fe) => (a(), x(nl, {
|
|
2320
2348
|
key: v.id,
|
|
2321
2349
|
name: v.id
|
|
2322
2350
|
}, {
|
|
2323
|
-
title:
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
o(
|
|
2351
|
+
title: i(() => [
|
|
2352
|
+
y("div", ro, [
|
|
2353
|
+
y("span", null, te(v.label || "未命名列") + " (" + te(v.prop) + ")", 1),
|
|
2354
|
+
o(me, {
|
|
2327
2355
|
type: "danger",
|
|
2328
2356
|
link: "",
|
|
2329
2357
|
size: "small",
|
|
2330
|
-
onClick:
|
|
2358
|
+
onClick: Ye((P) => Ne(fe), ["stop"])
|
|
2331
2359
|
}, {
|
|
2332
|
-
default:
|
|
2333
|
-
|
|
2360
|
+
default: i(() => [...n[23] || (n[23] = [
|
|
2361
|
+
z("删除", -1)
|
|
2334
2362
|
])]),
|
|
2335
2363
|
_: 1
|
|
2336
2364
|
}, 8, ["onClick"])
|
|
2337
2365
|
])
|
|
2338
2366
|
]),
|
|
2339
|
-
default:
|
|
2340
|
-
o(
|
|
2367
|
+
default: i(() => [
|
|
2368
|
+
o(c, {
|
|
2341
2369
|
"label-width": "80px",
|
|
2342
2370
|
size: "small"
|
|
2343
2371
|
}, {
|
|
2344
|
-
default:
|
|
2345
|
-
o(
|
|
2346
|
-
default:
|
|
2347
|
-
o(
|
|
2372
|
+
default: i(() => [
|
|
2373
|
+
o(A, { label: "标题" }, {
|
|
2374
|
+
default: i(() => [
|
|
2375
|
+
o(S, {
|
|
2348
2376
|
modelValue: v.label,
|
|
2349
|
-
"onUpdate:modelValue": (
|
|
2377
|
+
"onUpdate:modelValue": (P) => v.label = P
|
|
2350
2378
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2351
2379
|
]),
|
|
2352
2380
|
_: 2
|
|
2353
2381
|
}, 1024),
|
|
2354
|
-
o(
|
|
2355
|
-
default:
|
|
2356
|
-
o(
|
|
2382
|
+
o(A, { label: "字段名" }, {
|
|
2383
|
+
default: i(() => [
|
|
2384
|
+
o(S, {
|
|
2357
2385
|
modelValue: v.prop,
|
|
2358
|
-
"onUpdate:modelValue": (
|
|
2386
|
+
"onUpdate:modelValue": (P) => v.prop = P
|
|
2359
2387
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2360
2388
|
]),
|
|
2361
2389
|
_: 2
|
|
2362
2390
|
}, 1024),
|
|
2363
|
-
o(
|
|
2364
|
-
default:
|
|
2365
|
-
o(
|
|
2391
|
+
o(A, { label: "类型" }, {
|
|
2392
|
+
default: i(() => [
|
|
2393
|
+
o(ce, {
|
|
2366
2394
|
modelValue: v.type,
|
|
2367
|
-
"onUpdate:modelValue": (
|
|
2395
|
+
"onUpdate:modelValue": (P) => v.type = P,
|
|
2368
2396
|
style: { width: "100%" }
|
|
2369
2397
|
}, {
|
|
2370
|
-
default:
|
|
2371
|
-
o(
|
|
2398
|
+
default: i(() => [
|
|
2399
|
+
o(H, {
|
|
2372
2400
|
label: "文本",
|
|
2373
2401
|
value: "text"
|
|
2374
2402
|
}),
|
|
2375
|
-
o(
|
|
2403
|
+
o(H, {
|
|
2376
2404
|
label: "数字",
|
|
2377
2405
|
value: "number"
|
|
2378
2406
|
}),
|
|
2379
|
-
o(
|
|
2407
|
+
o(H, {
|
|
2380
2408
|
label: "下拉",
|
|
2381
2409
|
value: "select"
|
|
2382
2410
|
}),
|
|
2383
|
-
o(
|
|
2411
|
+
o(H, {
|
|
2384
2412
|
label: "日期",
|
|
2385
2413
|
value: "date"
|
|
2386
2414
|
}),
|
|
2387
|
-
o(
|
|
2415
|
+
o(H, {
|
|
2388
2416
|
label: "时间",
|
|
2389
2417
|
value: "time"
|
|
2390
2418
|
}),
|
|
2391
|
-
o(
|
|
2419
|
+
o(H, {
|
|
2392
2420
|
label: "日期时间",
|
|
2393
2421
|
value: "datetime"
|
|
2394
2422
|
}),
|
|
2395
|
-
o(
|
|
2423
|
+
o(H, {
|
|
2396
2424
|
label: "年月",
|
|
2397
2425
|
value: "month"
|
|
2398
2426
|
})
|
|
@@ -2402,11 +2430,11 @@ const Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P
|
|
|
2402
2430
|
]),
|
|
2403
2431
|
_: 2
|
|
2404
2432
|
}, 1024),
|
|
2405
|
-
o(
|
|
2406
|
-
default:
|
|
2407
|
-
o(
|
|
2433
|
+
o(A, { label: "宽度" }, {
|
|
2434
|
+
default: i(() => [
|
|
2435
|
+
o(ze, {
|
|
2408
2436
|
modelValue: v.width,
|
|
2409
|
-
"onUpdate:modelValue": (
|
|
2437
|
+
"onUpdate:modelValue": (P) => v.width = P,
|
|
2410
2438
|
min: 0,
|
|
2411
2439
|
step: 10,
|
|
2412
2440
|
"controls-position": "right"
|
|
@@ -2414,87 +2442,87 @@ const Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P
|
|
|
2414
2442
|
]),
|
|
2415
2443
|
_: 2
|
|
2416
2444
|
}, 1024),
|
|
2417
|
-
o(
|
|
2418
|
-
default:
|
|
2419
|
-
o(
|
|
2445
|
+
o(A, { label: "必填" }, {
|
|
2446
|
+
default: i(() => [
|
|
2447
|
+
o(O, {
|
|
2420
2448
|
modelValue: v.required,
|
|
2421
|
-
"onUpdate:modelValue": (
|
|
2449
|
+
"onUpdate:modelValue": (P) => v.required = P
|
|
2422
2450
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2423
2451
|
]),
|
|
2424
2452
|
_: 2
|
|
2425
2453
|
}, 1024),
|
|
2426
|
-
o(
|
|
2427
|
-
default:
|
|
2428
|
-
o(
|
|
2454
|
+
o(A, { label: "排序" }, {
|
|
2455
|
+
default: i(() => [
|
|
2456
|
+
o(O, {
|
|
2429
2457
|
modelValue: v.sortable,
|
|
2430
|
-
"onUpdate:modelValue": (
|
|
2458
|
+
"onUpdate:modelValue": (P) => v.sortable = P
|
|
2431
2459
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2432
2460
|
]),
|
|
2433
2461
|
_: 2
|
|
2434
2462
|
}, 1024),
|
|
2435
|
-
v.type === "select" ? (a(),
|
|
2436
|
-
o(
|
|
2437
|
-
default:
|
|
2438
|
-
o(
|
|
2463
|
+
v.type === "select" ? (a(), f(D, { key: 0 }, [
|
|
2464
|
+
o(A, { label: "多选" }, {
|
|
2465
|
+
default: i(() => [
|
|
2466
|
+
o(O, {
|
|
2439
2467
|
modelValue: v.multiple,
|
|
2440
|
-
"onUpdate:modelValue": (
|
|
2468
|
+
"onUpdate:modelValue": (P) => v.multiple = P
|
|
2441
2469
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2442
2470
|
]),
|
|
2443
2471
|
_: 2
|
|
2444
2472
|
}, 1024),
|
|
2445
|
-
o(
|
|
2446
|
-
default:
|
|
2447
|
-
o(
|
|
2473
|
+
o(A, { label: "可搜索" }, {
|
|
2474
|
+
default: i(() => [
|
|
2475
|
+
o(O, {
|
|
2448
2476
|
modelValue: v.filterable,
|
|
2449
|
-
"onUpdate:modelValue": (
|
|
2477
|
+
"onUpdate:modelValue": (P) => v.filterable = P
|
|
2450
2478
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2451
2479
|
]),
|
|
2452
2480
|
_: 2
|
|
2453
2481
|
}, 1024),
|
|
2454
|
-
n[26] || (n[26] =
|
|
2482
|
+
n[26] || (n[26] = y("div", {
|
|
2455
2483
|
class: "subTitle",
|
|
2456
2484
|
style: { "font-size": "12px", "margin-left": "10px" }
|
|
2457
2485
|
}, "选项配置", -1)),
|
|
2458
|
-
|
|
2459
|
-
(a(!0),
|
|
2486
|
+
y("div", io, [
|
|
2487
|
+
(a(!0), f(D, null, B(v.options || [], (P, qe) => (a(), f("div", {
|
|
2460
2488
|
key: qe,
|
|
2461
2489
|
class: "optRow"
|
|
2462
2490
|
}, [
|
|
2463
|
-
o(
|
|
2464
|
-
modelValue:
|
|
2465
|
-
"onUpdate:modelValue": (
|
|
2491
|
+
o(S, {
|
|
2492
|
+
modelValue: P.label,
|
|
2493
|
+
"onUpdate:modelValue": (Me) => P.label = Me,
|
|
2466
2494
|
placeholder: "Label",
|
|
2467
2495
|
size: "small"
|
|
2468
2496
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2469
|
-
o(
|
|
2470
|
-
modelValue:
|
|
2471
|
-
"onUpdate:modelValue": (
|
|
2497
|
+
o(S, {
|
|
2498
|
+
modelValue: P.value,
|
|
2499
|
+
"onUpdate:modelValue": (Me) => P.value = Me,
|
|
2472
2500
|
placeholder: "Value",
|
|
2473
2501
|
size: "small"
|
|
2474
2502
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2475
|
-
o(
|
|
2503
|
+
o(me, {
|
|
2476
2504
|
type: "danger",
|
|
2477
2505
|
size: "small",
|
|
2478
|
-
onClick: (
|
|
2506
|
+
onClick: (Me) => Ee(v, qe)
|
|
2479
2507
|
}, {
|
|
2480
|
-
default:
|
|
2481
|
-
|
|
2508
|
+
default: i(() => [...n[24] || (n[24] = [
|
|
2509
|
+
z("删除", -1)
|
|
2482
2510
|
])]),
|
|
2483
2511
|
_: 1
|
|
2484
2512
|
}, 8, ["onClick"])
|
|
2485
2513
|
]))), 128)),
|
|
2486
|
-
o(
|
|
2514
|
+
o(me, {
|
|
2487
2515
|
size: "small",
|
|
2488
2516
|
style: { width: "100%" },
|
|
2489
|
-
onClick: (
|
|
2517
|
+
onClick: (P) => Ae(v)
|
|
2490
2518
|
}, {
|
|
2491
|
-
default:
|
|
2492
|
-
|
|
2519
|
+
default: i(() => [...n[25] || (n[25] = [
|
|
2520
|
+
z("添加选项", -1)
|
|
2493
2521
|
])]),
|
|
2494
2522
|
_: 1
|
|
2495
2523
|
}, 8, ["onClick"])
|
|
2496
2524
|
])
|
|
2497
|
-
], 64)) :
|
|
2525
|
+
], 64)) : Q("", !0)
|
|
2498
2526
|
]),
|
|
2499
2527
|
_: 2
|
|
2500
2528
|
}, 1024)
|
|
@@ -2503,110 +2531,110 @@ const Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P
|
|
|
2503
2531
|
}, 1032, ["name"]))), 128))
|
|
2504
2532
|
]),
|
|
2505
2533
|
_: 1
|
|
2506
|
-
})) : (a(),
|
|
2534
|
+
})) : (a(), x(R, {
|
|
2507
2535
|
key: 1,
|
|
2508
2536
|
description: "暂无列配置",
|
|
2509
2537
|
"image-size": 60
|
|
2510
2538
|
})),
|
|
2511
|
-
o(
|
|
2539
|
+
o(me, {
|
|
2512
2540
|
type: "primary",
|
|
2513
2541
|
plain: "",
|
|
2514
2542
|
style: { width: "100%", "margin-top": "10px" },
|
|
2515
|
-
onClick:
|
|
2543
|
+
onClick: Ie
|
|
2516
2544
|
}, {
|
|
2517
|
-
default:
|
|
2518
|
-
|
|
2545
|
+
default: i(() => [...n[27] || (n[27] = [
|
|
2546
|
+
z(" 新增列 ", -1)
|
|
2519
2547
|
])]),
|
|
2520
2548
|
_: 1
|
|
2521
2549
|
})
|
|
2522
2550
|
])
|
|
2523
|
-
], 64)) : (a(),
|
|
2524
|
-
o(
|
|
2525
|
-
default:
|
|
2526
|
-
o(
|
|
2527
|
-
default:
|
|
2528
|
-
o(
|
|
2529
|
-
modelValue:
|
|
2530
|
-
"onUpdate:modelValue": n[9] || (n[9] = (v) =>
|
|
2551
|
+
], 64)) : (a(), f(D, { key: 4 }, [
|
|
2552
|
+
o(c, { "label-width": "92px" }, {
|
|
2553
|
+
default: i(() => [
|
|
2554
|
+
o(A, { label: "标签" }, {
|
|
2555
|
+
default: i(() => [
|
|
2556
|
+
o(S, {
|
|
2557
|
+
modelValue: ee.value,
|
|
2558
|
+
"onUpdate:modelValue": n[9] || (n[9] = (v) => ee.value = v)
|
|
2531
2559
|
}, null, 8, ["modelValue"])
|
|
2532
2560
|
]),
|
|
2533
2561
|
_: 1
|
|
2534
2562
|
}),
|
|
2535
|
-
["title"].includes(u.value.type) ?
|
|
2563
|
+
["title"].includes(u.value.type) ? Q("", !0) : (a(), x(A, {
|
|
2536
2564
|
key: 0,
|
|
2537
2565
|
label: "字段名"
|
|
2538
2566
|
}, {
|
|
2539
|
-
default:
|
|
2540
|
-
o(
|
|
2541
|
-
modelValue:
|
|
2542
|
-
"onUpdate:modelValue": n[10] || (n[10] = (v) =>
|
|
2567
|
+
default: i(() => [
|
|
2568
|
+
o(S, {
|
|
2569
|
+
modelValue: ne.value,
|
|
2570
|
+
"onUpdate:modelValue": n[10] || (n[10] = (v) => ne.value = v)
|
|
2543
2571
|
}, null, 8, ["modelValue"])
|
|
2544
2572
|
]),
|
|
2545
2573
|
_: 1
|
|
2546
2574
|
})),
|
|
2547
|
-
["input", "textarea", "select"].includes(u.value.type) ? (a(),
|
|
2575
|
+
["input", "textarea", "select"].includes(u.value.type) ? (a(), x(A, {
|
|
2548
2576
|
key: 1,
|
|
2549
2577
|
label: "占位符"
|
|
2550
2578
|
}, {
|
|
2551
|
-
default:
|
|
2552
|
-
o(
|
|
2553
|
-
modelValue:
|
|
2554
|
-
"onUpdate:modelValue": n[11] || (n[11] = (v) =>
|
|
2579
|
+
default: i(() => [
|
|
2580
|
+
o(S, {
|
|
2581
|
+
modelValue: de.value,
|
|
2582
|
+
"onUpdate:modelValue": n[11] || (n[11] = (v) => de.value = v)
|
|
2555
2583
|
}, null, 8, ["modelValue"])
|
|
2556
2584
|
]),
|
|
2557
2585
|
_: 1
|
|
2558
|
-
})) :
|
|
2559
|
-
["switch", "title"].includes(u.value.type) ?
|
|
2586
|
+
})) : Q("", !0),
|
|
2587
|
+
["switch", "title"].includes(u.value.type) ? Q("", !0) : (a(), x(A, {
|
|
2560
2588
|
key: 2,
|
|
2561
2589
|
label: "必填"
|
|
2562
2590
|
}, {
|
|
2563
|
-
default:
|
|
2564
|
-
o(
|
|
2565
|
-
modelValue:
|
|
2566
|
-
"onUpdate:modelValue": n[12] || (n[12] = (v) =>
|
|
2591
|
+
default: i(() => [
|
|
2592
|
+
o(O, {
|
|
2593
|
+
modelValue: se.value,
|
|
2594
|
+
"onUpdate:modelValue": n[12] || (n[12] = (v) => se.value = v)
|
|
2567
2595
|
}, null, 8, ["modelValue"])
|
|
2568
2596
|
]),
|
|
2569
2597
|
_: 1
|
|
2570
2598
|
})),
|
|
2571
|
-
|
|
2599
|
+
Y.value ? (a(), x(A, {
|
|
2572
2600
|
key: 3,
|
|
2573
2601
|
label: "多选"
|
|
2574
2602
|
}, {
|
|
2575
|
-
default:
|
|
2576
|
-
o(
|
|
2577
|
-
modelValue:
|
|
2578
|
-
"onUpdate:modelValue": n[13] || (n[13] = (v) =>
|
|
2603
|
+
default: i(() => [
|
|
2604
|
+
o(O, {
|
|
2605
|
+
modelValue: g.value,
|
|
2606
|
+
"onUpdate:modelValue": n[13] || (n[13] = (v) => g.value = v)
|
|
2579
2607
|
}, null, 8, ["modelValue"])
|
|
2580
2608
|
]),
|
|
2581
2609
|
_: 1
|
|
2582
|
-
})) :
|
|
2583
|
-
|
|
2610
|
+
})) : Q("", !0),
|
|
2611
|
+
G.value ? (a(), x(A, {
|
|
2584
2612
|
key: 4,
|
|
2585
2613
|
label: "类型"
|
|
2586
2614
|
}, {
|
|
2587
|
-
default:
|
|
2588
|
-
o(
|
|
2589
|
-
modelValue:
|
|
2590
|
-
"onUpdate:modelValue": n[14] || (n[14] = (v) =>
|
|
2615
|
+
default: i(() => [
|
|
2616
|
+
o(ce, {
|
|
2617
|
+
modelValue: d.value,
|
|
2618
|
+
"onUpdate:modelValue": n[14] || (n[14] = (v) => d.value = v)
|
|
2591
2619
|
}, {
|
|
2592
|
-
default:
|
|
2593
|
-
o(
|
|
2620
|
+
default: i(() => [
|
|
2621
|
+
o(H, {
|
|
2594
2622
|
label: "文本",
|
|
2595
2623
|
value: "text"
|
|
2596
2624
|
}),
|
|
2597
|
-
o(
|
|
2625
|
+
o(H, {
|
|
2598
2626
|
label: "数字",
|
|
2599
2627
|
value: "number"
|
|
2600
2628
|
}),
|
|
2601
|
-
o(
|
|
2629
|
+
o(H, {
|
|
2602
2630
|
label: "日期",
|
|
2603
2631
|
value: "date"
|
|
2604
2632
|
}),
|
|
2605
|
-
o(
|
|
2633
|
+
o(H, {
|
|
2606
2634
|
label: "时间",
|
|
2607
2635
|
value: "time"
|
|
2608
2636
|
}),
|
|
2609
|
-
o(
|
|
2637
|
+
o(H, {
|
|
2610
2638
|
label: "日期时间",
|
|
2611
2639
|
value: "datetime"
|
|
2612
2640
|
})
|
|
@@ -2615,221 +2643,226 @@ const Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P
|
|
|
2615
2643
|
}, 8, ["modelValue"])
|
|
2616
2644
|
]),
|
|
2617
2645
|
_: 1
|
|
2618
|
-
})) :
|
|
2619
|
-
|
|
2620
|
-
o(
|
|
2621
|
-
default:
|
|
2622
|
-
o(
|
|
2623
|
-
modelValue:
|
|
2624
|
-
"onUpdate:modelValue": n[15] || (n[15] = (v) =>
|
|
2646
|
+
})) : Q("", !0),
|
|
2647
|
+
Z.value ? (a(), f(D, { key: 5 }, [
|
|
2648
|
+
o(A, { label: "开启文案" }, {
|
|
2649
|
+
default: i(() => [
|
|
2650
|
+
o(S, {
|
|
2651
|
+
modelValue: s.value,
|
|
2652
|
+
"onUpdate:modelValue": n[15] || (n[15] = (v) => s.value = v)
|
|
2625
2653
|
}, null, 8, ["modelValue"])
|
|
2626
2654
|
]),
|
|
2627
2655
|
_: 1
|
|
2628
2656
|
}),
|
|
2629
|
-
o(
|
|
2630
|
-
default:
|
|
2631
|
-
o(
|
|
2632
|
-
modelValue:
|
|
2633
|
-
"onUpdate:modelValue": n[16] || (n[16] = (v) =>
|
|
2657
|
+
o(A, { label: "关闭文案" }, {
|
|
2658
|
+
default: i(() => [
|
|
2659
|
+
o(S, {
|
|
2660
|
+
modelValue: T.value,
|
|
2661
|
+
"onUpdate:modelValue": n[16] || (n[16] = (v) => T.value = v)
|
|
2634
2662
|
}, null, 8, ["modelValue"])
|
|
2635
2663
|
]),
|
|
2636
2664
|
_: 1
|
|
2637
2665
|
})
|
|
2638
|
-
], 64)) :
|
|
2666
|
+
], 64)) : Q("", !0)
|
|
2639
2667
|
]),
|
|
2640
2668
|
_: 1
|
|
2641
2669
|
}),
|
|
2642
|
-
|
|
2643
|
-
n[31] || (n[31] =
|
|
2644
|
-
|
|
2645
|
-
(a(!0),
|
|
2646
|
-
key:
|
|
2670
|
+
le.value ? (a(), f(D, { key: 0 }, [
|
|
2671
|
+
n[31] || (n[31] = y("div", { class: "subTitle" }, " 选项 ", -1)),
|
|
2672
|
+
y("div", so, [
|
|
2673
|
+
(a(!0), f(D, null, B(U.value, (v, fe) => (a(), f("div", {
|
|
2674
|
+
key: fe,
|
|
2647
2675
|
class: "optRow"
|
|
2648
2676
|
}, [
|
|
2649
|
-
o(
|
|
2677
|
+
o(S, {
|
|
2650
2678
|
modelValue: v.label,
|
|
2651
|
-
"onUpdate:modelValue": (
|
|
2679
|
+
"onUpdate:modelValue": (P) => v.label = P,
|
|
2652
2680
|
placeholder: "label"
|
|
2653
2681
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2654
|
-
o(
|
|
2682
|
+
o(S, {
|
|
2655
2683
|
modelValue: v.value,
|
|
2656
|
-
"onUpdate:modelValue": (
|
|
2684
|
+
"onUpdate:modelValue": (P) => v.value = P,
|
|
2657
2685
|
placeholder: "value"
|
|
2658
2686
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2659
|
-
o(
|
|
2687
|
+
o(me, {
|
|
2660
2688
|
type: "danger",
|
|
2661
|
-
onClick: (
|
|
2689
|
+
onClick: (P) => pe(fe)
|
|
2662
2690
|
}, {
|
|
2663
|
-
default:
|
|
2664
|
-
|
|
2691
|
+
default: i(() => [...n[29] || (n[29] = [
|
|
2692
|
+
z(" 删除 ", -1)
|
|
2665
2693
|
])]),
|
|
2666
2694
|
_: 1
|
|
2667
2695
|
}, 8, ["onClick"])
|
|
2668
2696
|
]))), 128)),
|
|
2669
|
-
o(
|
|
2670
|
-
default:
|
|
2671
|
-
|
|
2697
|
+
o(me, { onClick: ue }, {
|
|
2698
|
+
default: i(() => [...n[30] || (n[30] = [
|
|
2699
|
+
z(" 新增选项 ", -1)
|
|
2672
2700
|
])]),
|
|
2673
2701
|
_: 1
|
|
2674
2702
|
})
|
|
2675
2703
|
])
|
|
2676
|
-
], 64)) :
|
|
2704
|
+
], 64)) : Q("", !0)
|
|
2677
2705
|
], 64))
|
|
2678
|
-
])) : (a(),
|
|
2706
|
+
])) : (a(), x(R, {
|
|
2679
2707
|
key: 0,
|
|
2680
2708
|
description: "请选择一个组件"
|
|
2681
2709
|
}))
|
|
2682
2710
|
]);
|
|
2683
2711
|
};
|
|
2684
2712
|
}
|
|
2685
|
-
}), co = /* @__PURE__ */
|
|
2713
|
+
}), co = /* @__PURE__ */ ve(po, [["__scopeId", "data-v-fbaf4bac"]]), mo = { class: "designer" }, fo = { class: "palette" }, vo = { class: "main" }, bo = { class: "toolbar" }, yo = { class: "body" }, _o = { class: "canvas" }, go = { class: "props" }, Vo = /* @__PURE__ */ J({
|
|
2686
2714
|
__name: "FormDesigner",
|
|
2715
|
+
props: {
|
|
2716
|
+
uploadUrl: {},
|
|
2717
|
+
downloadUrl: {},
|
|
2718
|
+
uploadParse: {}
|
|
2719
|
+
},
|
|
2687
2720
|
setup(e) {
|
|
2688
|
-
const { history: l, schema: t, selection: r, applySchema:
|
|
2689
|
-
|
|
2690
|
-
const
|
|
2691
|
-
|
|
2692
|
-
const
|
|
2693
|
-
function
|
|
2721
|
+
const { history: l, schema: t, selection: r, applySchema: m, removeSelected: h, bindHotkeys: V } = Ve(), u = I(!1), b = I(!1), M = I(!1);
|
|
2722
|
+
I(!1);
|
|
2723
|
+
const E = I(""), k = I("");
|
|
2724
|
+
I("");
|
|
2725
|
+
const C = $(() => r.selectedNodeId.value), N = $(() => l.canUndo.value), F = $(() => l.canRedo.value);
|
|
2726
|
+
function W() {
|
|
2694
2727
|
l.undo();
|
|
2695
2728
|
}
|
|
2696
|
-
function
|
|
2729
|
+
function L() {
|
|
2697
2730
|
l.redo();
|
|
2698
2731
|
}
|
|
2699
|
-
function
|
|
2732
|
+
function X() {
|
|
2700
2733
|
u.value = !0;
|
|
2701
2734
|
}
|
|
2702
|
-
function
|
|
2703
|
-
|
|
2735
|
+
function ne() {
|
|
2736
|
+
E.value = JSON.stringify(vl(t.value), null, 2), b.value = !0;
|
|
2704
2737
|
}
|
|
2705
|
-
function
|
|
2706
|
-
navigator.clipboard.writeText(
|
|
2707
|
-
|
|
2738
|
+
function ee() {
|
|
2739
|
+
navigator.clipboard.writeText(E.value).then(() => {
|
|
2740
|
+
ge.success("已复制");
|
|
2708
2741
|
});
|
|
2709
2742
|
}
|
|
2710
|
-
function
|
|
2711
|
-
k.value = "",
|
|
2743
|
+
function de() {
|
|
2744
|
+
k.value = "", M.value = !0;
|
|
2712
2745
|
}
|
|
2713
|
-
function
|
|
2746
|
+
function se() {
|
|
2714
2747
|
try {
|
|
2715
|
-
const
|
|
2716
|
-
|
|
2748
|
+
const g = JSON.parse(k.value);
|
|
2749
|
+
m(g), M.value = !1, ge.success("已导入布局");
|
|
2717
2750
|
} catch {
|
|
2718
|
-
|
|
2751
|
+
ge.error("JSON 解析失败");
|
|
2719
2752
|
}
|
|
2720
2753
|
}
|
|
2721
|
-
function
|
|
2722
|
-
|
|
2754
|
+
function U() {
|
|
2755
|
+
C.value && h();
|
|
2723
2756
|
}
|
|
2724
|
-
return
|
|
2725
|
-
|
|
2726
|
-
}), (
|
|
2727
|
-
const
|
|
2728
|
-
return a(),
|
|
2729
|
-
|
|
2730
|
-
o(
|
|
2757
|
+
return Xe(() => {
|
|
2758
|
+
V();
|
|
2759
|
+
}), (g, d) => {
|
|
2760
|
+
const s = w("el-button"), T = w("el-button-group"), le = w("el-divider"), G = w("el-input"), Y = w("el-dialog"), Z = w("el-alert");
|
|
2761
|
+
return a(), f("div", mo, [
|
|
2762
|
+
y("div", fo, [
|
|
2763
|
+
o(Lt)
|
|
2731
2764
|
]),
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
o(
|
|
2735
|
-
default:
|
|
2736
|
-
o(
|
|
2737
|
-
disabled: !
|
|
2738
|
-
onClick:
|
|
2765
|
+
y("div", vo, [
|
|
2766
|
+
y("div", bo, [
|
|
2767
|
+
o(T, null, {
|
|
2768
|
+
default: i(() => [
|
|
2769
|
+
o(s, {
|
|
2770
|
+
disabled: !N.value,
|
|
2771
|
+
onClick: W
|
|
2739
2772
|
}, {
|
|
2740
|
-
default:
|
|
2741
|
-
|
|
2773
|
+
default: i(() => [...d[7] || (d[7] = [
|
|
2774
|
+
z(" 撤销 ", -1)
|
|
2742
2775
|
])]),
|
|
2743
2776
|
_: 1
|
|
2744
2777
|
}, 8, ["disabled"]),
|
|
2745
|
-
o(
|
|
2746
|
-
disabled: !
|
|
2747
|
-
onClick:
|
|
2778
|
+
o(s, {
|
|
2779
|
+
disabled: !F.value,
|
|
2780
|
+
onClick: L
|
|
2748
2781
|
}, {
|
|
2749
|
-
default:
|
|
2750
|
-
|
|
2782
|
+
default: i(() => [...d[8] || (d[8] = [
|
|
2783
|
+
z(" 重做 ", -1)
|
|
2751
2784
|
])]),
|
|
2752
2785
|
_: 1
|
|
2753
2786
|
}, 8, ["disabled"])
|
|
2754
2787
|
]),
|
|
2755
2788
|
_: 1
|
|
2756
2789
|
}),
|
|
2757
|
-
o(
|
|
2758
|
-
o(
|
|
2759
|
-
default:
|
|
2760
|
-
|
|
2790
|
+
o(le, { direction: "vertical" }),
|
|
2791
|
+
o(s, { onClick: de }, {
|
|
2792
|
+
default: i(() => [...d[9] || (d[9] = [
|
|
2793
|
+
z(" 导入布局 ", -1)
|
|
2761
2794
|
])]),
|
|
2762
2795
|
_: 1
|
|
2763
2796
|
}),
|
|
2764
|
-
o(
|
|
2765
|
-
default:
|
|
2766
|
-
|
|
2797
|
+
o(s, { onClick: ne }, {
|
|
2798
|
+
default: i(() => [...d[10] || (d[10] = [
|
|
2799
|
+
z(" 导出布局 ", -1)
|
|
2767
2800
|
])]),
|
|
2768
2801
|
_: 1
|
|
2769
2802
|
}),
|
|
2770
|
-
o(
|
|
2803
|
+
o(s, {
|
|
2771
2804
|
type: "primary",
|
|
2772
|
-
onClick:
|
|
2805
|
+
onClick: X
|
|
2773
2806
|
}, {
|
|
2774
|
-
default:
|
|
2775
|
-
|
|
2807
|
+
default: i(() => [...d[11] || (d[11] = [
|
|
2808
|
+
z(" 预览 ", -1)
|
|
2776
2809
|
])]),
|
|
2777
2810
|
_: 1
|
|
2778
2811
|
}),
|
|
2779
|
-
|
|
2780
|
-
o(
|
|
2781
|
-
disabled: !
|
|
2812
|
+
d[13] || (d[13] = y("div", { class: "spacer" }, null, -1)),
|
|
2813
|
+
o(s, {
|
|
2814
|
+
disabled: !C.value,
|
|
2782
2815
|
type: "danger",
|
|
2783
|
-
onClick:
|
|
2816
|
+
onClick: U
|
|
2784
2817
|
}, {
|
|
2785
|
-
default:
|
|
2786
|
-
|
|
2818
|
+
default: i(() => [...d[12] || (d[12] = [
|
|
2819
|
+
z(" 删除组件 ", -1)
|
|
2787
2820
|
])]),
|
|
2788
2821
|
_: 1
|
|
2789
2822
|
}, 8, ["disabled"])
|
|
2790
2823
|
]),
|
|
2791
|
-
|
|
2792
|
-
|
|
2824
|
+
y("div", yo, [
|
|
2825
|
+
y("div", _o, [
|
|
2793
2826
|
o(at)
|
|
2794
2827
|
]),
|
|
2795
|
-
|
|
2828
|
+
y("div", go, [
|
|
2796
2829
|
o(co)
|
|
2797
2830
|
])
|
|
2798
2831
|
])
|
|
2799
2832
|
]),
|
|
2800
2833
|
o(lo, {
|
|
2801
2834
|
modelValue: u.value,
|
|
2802
|
-
"onUpdate:modelValue":
|
|
2835
|
+
"onUpdate:modelValue": d[0] || (d[0] = (_) => u.value = _)
|
|
2803
2836
|
}, null, 8, ["modelValue"]),
|
|
2804
|
-
o(
|
|
2805
|
-
modelValue:
|
|
2806
|
-
"onUpdate:modelValue":
|
|
2837
|
+
o(Y, {
|
|
2838
|
+
modelValue: b.value,
|
|
2839
|
+
"onUpdate:modelValue": d[3] || (d[3] = (_) => b.value = _),
|
|
2807
2840
|
width: "860px",
|
|
2808
2841
|
title: "导出布局 JSON"
|
|
2809
2842
|
}, {
|
|
2810
|
-
footer:
|
|
2811
|
-
o(
|
|
2812
|
-
onClick:
|
|
2843
|
+
footer: i(() => [
|
|
2844
|
+
o(s, {
|
|
2845
|
+
onClick: d[2] || (d[2] = (_) => b.value = !1)
|
|
2813
2846
|
}, {
|
|
2814
|
-
default:
|
|
2815
|
-
|
|
2847
|
+
default: i(() => [...d[14] || (d[14] = [
|
|
2848
|
+
z(" 关闭 ", -1)
|
|
2816
2849
|
])]),
|
|
2817
2850
|
_: 1
|
|
2818
2851
|
}),
|
|
2819
|
-
o(
|
|
2852
|
+
o(s, {
|
|
2820
2853
|
type: "primary",
|
|
2821
|
-
onClick:
|
|
2854
|
+
onClick: ee
|
|
2822
2855
|
}, {
|
|
2823
|
-
default:
|
|
2824
|
-
|
|
2856
|
+
default: i(() => [...d[15] || (d[15] = [
|
|
2857
|
+
z(" 复制 ", -1)
|
|
2825
2858
|
])]),
|
|
2826
2859
|
_: 1
|
|
2827
2860
|
})
|
|
2828
2861
|
]),
|
|
2829
|
-
default:
|
|
2830
|
-
o(
|
|
2831
|
-
modelValue:
|
|
2832
|
-
"onUpdate:modelValue":
|
|
2862
|
+
default: i(() => [
|
|
2863
|
+
o(G, {
|
|
2864
|
+
modelValue: E.value,
|
|
2865
|
+
"onUpdate:modelValue": d[1] || (d[1] = (_) => E.value = _),
|
|
2833
2866
|
type: "textarea",
|
|
2834
2867
|
rows: 22,
|
|
2835
2868
|
readonly: ""
|
|
@@ -2837,42 +2870,42 @@ const Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P
|
|
|
2837
2870
|
]),
|
|
2838
2871
|
_: 1
|
|
2839
2872
|
}, 8, ["modelValue"]),
|
|
2840
|
-
o(
|
|
2841
|
-
modelValue:
|
|
2842
|
-
"onUpdate:modelValue":
|
|
2873
|
+
o(Y, {
|
|
2874
|
+
modelValue: M.value,
|
|
2875
|
+
"onUpdate:modelValue": d[6] || (d[6] = (_) => M.value = _),
|
|
2843
2876
|
width: "860px",
|
|
2844
2877
|
title: "导入布局 JSON"
|
|
2845
2878
|
}, {
|
|
2846
|
-
footer:
|
|
2847
|
-
o(
|
|
2848
|
-
onClick:
|
|
2879
|
+
footer: i(() => [
|
|
2880
|
+
o(s, {
|
|
2881
|
+
onClick: d[5] || (d[5] = (_) => M.value = !1)
|
|
2849
2882
|
}, {
|
|
2850
|
-
default:
|
|
2851
|
-
|
|
2883
|
+
default: i(() => [...d[16] || (d[16] = [
|
|
2884
|
+
z(" 取消 ", -1)
|
|
2852
2885
|
])]),
|
|
2853
2886
|
_: 1
|
|
2854
2887
|
}),
|
|
2855
|
-
o(
|
|
2888
|
+
o(s, {
|
|
2856
2889
|
type: "primary",
|
|
2857
|
-
onClick:
|
|
2890
|
+
onClick: se
|
|
2858
2891
|
}, {
|
|
2859
|
-
default:
|
|
2860
|
-
|
|
2892
|
+
default: i(() => [...d[17] || (d[17] = [
|
|
2893
|
+
z(" 确定 ", -1)
|
|
2861
2894
|
])]),
|
|
2862
2895
|
_: 1
|
|
2863
2896
|
})
|
|
2864
2897
|
]),
|
|
2865
|
-
default:
|
|
2866
|
-
o(
|
|
2898
|
+
default: i(() => [
|
|
2899
|
+
o(Z, {
|
|
2867
2900
|
title: "请粘贴布局 JSON,确定后将覆盖当前画布内容。",
|
|
2868
2901
|
type: "warning",
|
|
2869
2902
|
"show-icon": "",
|
|
2870
2903
|
closable: !1
|
|
2871
2904
|
}),
|
|
2872
|
-
|
|
2873
|
-
o(
|
|
2905
|
+
d[18] || (d[18] = y("div", { style: { height: "10px" } }, null, -1)),
|
|
2906
|
+
o(G, {
|
|
2874
2907
|
modelValue: k.value,
|
|
2875
|
-
"onUpdate:modelValue":
|
|
2908
|
+
"onUpdate:modelValue": d[4] || (d[4] = (_) => k.value = _),
|
|
2876
2909
|
type: "textarea",
|
|
2877
2910
|
rows: 22,
|
|
2878
2911
|
placeholder: "在此粘贴 JSON"
|
|
@@ -2883,8 +2916,8 @@ const Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P
|
|
|
2883
2916
|
]);
|
|
2884
2917
|
};
|
|
2885
2918
|
}
|
|
2886
|
-
}),
|
|
2919
|
+
}), xo = /* @__PURE__ */ ve(Vo, [["__scopeId", "data-v-02e9bc29"]]);
|
|
2887
2920
|
export {
|
|
2888
|
-
|
|
2921
|
+
xo as FormDesigner,
|
|
2889
2922
|
Gt as FormRenderer
|
|
2890
2923
|
};
|