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/dist/index.es.js CHANGED
@@ -1,13 +1,13 @@
1
- import { ref as z, computed as N, reactive as ul, watch as Y, defineComponent as P, createElementBlock as m, openBlock as a, normalizeClass as Je, resolveComponent as V, withModifiers as Le, createElementVNode as b, createVNode as o, withCtx as d, createTextVNode as S, toDisplayString as ee, normalizeStyle as Ne, Fragment as $, renderList as E, createCommentVNode as G, createBlock as C, resolveDynamicComponent as il, onMounted as Ke, unref as fe } from "vue";
2
- import { ElMessage as be } from "element-plus";
3
- import * as he from "xlsx";
4
- function B(e) {
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 rl() {
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 ke() {
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 X(e) {
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 = B("row"), r = 2;
31
+ const t = j("row"), r = 2;
32
32
  return {
33
33
  id: t,
34
34
  type: "flexRow",
35
- meta: ke(),
35
+ meta: Ue(),
36
36
  props: {
37
37
  cols: r,
38
38
  gap: 12
39
39
  },
40
- columns: new Array(r).fill(0).map((c, h) => ({
41
- id: B(`col${h + 1}`),
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: B("collapse"),
48
+ id: j("collapse"),
49
49
  type: "collapse",
50
- meta: ke(),
50
+ meta: Ue(),
51
51
  props: {
52
52
  accordion: !1
53
53
  },
54
54
  items: [
55
- { id: B("item"), title: "面板 1", name: B("val"), children: [] },
56
- { id: B("item"), title: "面板 2", name: B("val"), children: [] }
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: B("tabs"),
61
+ id: j("tabs"),
62
62
  type: "tabs",
63
- meta: ke(),
63
+ meta: Ue(),
64
64
  props: {
65
65
  type: "card"
66
66
  },
67
67
  tabs: [
68
- { id: B("tab"), label: "标签页 1", children: [] },
69
- { id: B("tab"), label: "标签页 2", children: [] }
68
+ { id: j("tab"), label: "标签页 1", children: [] },
69
+ { id: j("tab"), label: "标签页 2", children: [] }
70
70
  ]
71
71
  };
72
72
  const l = {
73
- id: B(e),
73
+ id: j(e),
74
74
  type: e,
75
- meta: ke(),
75
+ meta: Ue(),
76
76
  props: {
77
77
  label: "字段",
78
- field: B("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: B("table"),
129
+ id: j("table"),
130
130
  type: "table",
131
- meta: ke(),
131
+ meta: Ue(),
132
132
  props: {
133
133
  label: "表格",
134
- field: B("table-field"),
134
+ field: j("table-field"),
135
135
  columns: [
136
- { id: B("col"), label: "列1", prop: "col1", type: "text" },
137
- { id: B("col"), label: "列2", prop: "col2", type: "number" }
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 ge(e, l) {
153
- function t(r, c) {
154
- const h = r.findIndex((g) => g.id === l);
155
- if (h >= 0) return { node: r[h], loc: { ...c, index: h } };
156
- for (const g of r)
157
- if (g.type === "flexRow")
158
- for (let u = 0; u < g.columns.length; u += 1) {
159
- const y = t(g.columns[u].children, { kind: "flexCol", rowId: g.id, colIndex: u, index: 0 });
160
- if (y) return y;
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 (g.type === "collapse")
163
- for (const u of g.items) {
164
- const y = t(u.children, { kind: "collapse", collapseId: g.id, itemId: u.id, index: 0 });
165
- if (y) return y;
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 (g.type === "tabs")
168
- for (const u of g.tabs) {
169
- const y = t(u.children, { kind: "tab", tabsId: g.id, tabId: u.id, index: 0 });
170
- if (y) return y;
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 We(e, l) {
177
- const t = ge(e, l);
176
+ function Ke(e, l) {
177
+ const t = we(e, l);
178
178
  if (!t) return null;
179
- const r = cl(e, t.loc), [c] = r.splice(t.loc.index, 1);
180
- return c ?? null;
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), c = Math.max(0, Math.min(l.insertIndex, r.length));
184
- r.splice(c, 0, t);
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 = We(e, l);
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 c, h, g, u;
191
+ var m, h, V, u;
192
192
  if (l.kind === "root") return e.root.children;
193
193
  if (l.kind === "flexCol") {
194
- const y = (c = ge(e, l.rowId)) == null ? void 0 : c.node;
195
- return !y || y.type !== "flexRow" ? e.root.children : ((h = y.columns[l.colIndex]) == null ? void 0 : h.children) ?? y.columns[0].children;
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 y = (g = ge(e, l.collapseId)) == null ? void 0 : g.node;
199
- return !y || y.type !== "collapse" ? e.root.children : (y.items.find((O) => O.id === l.itemId) ?? y.items[0]).children;
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 = ge(e, l.tabsId)) == null ? void 0 : u.node;
202
- return !t || t.type !== "tabs" ? e.root.children : (t.tabs.find((y) => y.id === l.tabId) ?? t.tabs[0]).children;
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 c, h, g, u;
205
+ var m, h, V, u;
206
206
  if (l.kind === "root") return e.root.children;
207
207
  if (l.kind === "flexCol") {
208
- const y = (c = ge(e, l.rowId)) == null ? void 0 : c.node;
209
- return !y || y.type !== "flexRow" ? e.root.children : ((h = y.columns[l.colIndex]) == null ? void 0 : h.children) ?? y.columns[0].children;
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 y = (g = ge(e, l.collapseId)) == null ? void 0 : g.node;
213
- return !y || y.type !== "collapse" ? e.root.children : (y.items.find((O) => O.id === l.itemId) ?? y.items[0]).children;
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 = ge(e, l.tabsId)) == null ? void 0 : u.node;
216
- return !t || t.type !== "tabs" ? e.root.children : (t.tabs.find((y) => y.id === l.tabId) ?? t.tabs[0]).children;
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 Be(e, l, t, r) {
219
- const c = 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", g = t === "flexRow", u = ml(e, r);
220
- return r.kind === "root" || u === "flexRow" ? g || h || c : u === "collapse" || u === "tabs" ? c || g : !1;
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
- $e(t);
231
+ Re(t);
232
232
  return l;
233
233
  }
234
- function $e(e) {
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 = ke()), 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") {
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) $e(t);
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) $e(t);
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) $e(t);
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) => X(l))
267
+ children: e.root.children.map((l) => K(l))
268
268
  }
269
269
  };
270
270
  }
271
271
  function bl(e) {
272
- const l = z([]), t = z(X(e)), r = z([]), c = N(() => l.value.length > 0), h = N(() => r.value.length > 0);
273
- function g(k) {
274
- l.value.push(X(t.value)), t.value = X(k), r.value = [];
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 = X(k);
277
+ t.value = K(k);
278
278
  }
279
- function y() {
279
+ function b() {
280
280
  if (!l.value.length) return;
281
281
  const k = l.value.pop();
282
- r.value.unshift(X(t.value)), t.value = X(k);
282
+ r.value.unshift(K(t.value)), t.value = K(k);
283
283
  }
284
- function I() {
284
+ function M() {
285
285
  if (!r.value.length) return;
286
286
  const k = r.value.shift();
287
- l.value.push(X(t.value)), t.value = X(k);
287
+ l.value.push(K(t.value)), t.value = K(k);
288
288
  }
289
- function O(k) {
290
- l.value = [], r.value = [], t.value = X(k);
289
+ function E(k) {
290
+ l.value = [], r.value = [], t.value = K(k);
291
291
  }
292
- return { past: l, present: t, future: r, canUndo: c, canRedo: h, push: g, replace: u, undo: y, redo: I, reset: O };
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 = z(null), l = z(null), t = ul({ x: 0, y: 0 }), r = N(() => !!e.value);
296
- function c(y, I) {
297
- e.value = y, t.x = I.clientX, t.y = I.clientY;
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(y) {
300
- t.x = y.clientX, t.y = y.clientY;
299
+ function h(b) {
300
+ t.x = b.clientX, t.y = b.clientY;
301
301
  }
302
- function g(y) {
303
- l.value = y;
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: c, move: h, setHover: g, end: u };
308
+ return { dragging: e, hoverTarget: l, pointer: t, isDragging: r, begin: m, move: h, setHover: V, end: u };
309
309
  }
310
- const le = bl(rl()), _e = z(null), ne = yl(), Ue = z({});
311
- function He() {
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 Ve(e) {
315
- le.push(e);
314
+ function xe(e) {
315
+ oe.push(e);
316
316
  }
317
- function gl(e) {
317
+ function _l(e) {
318
318
  const l = fl(e);
319
- _e.value = null, le.reset(X(l));
319
+ he.value = null, oe.reset(K(l));
320
320
  }
321
- function _l(e) {
322
- _e.value = e;
321
+ function gl(e) {
322
+ he.value = e;
323
323
  }
324
324
  function Ze() {
325
- const e = _e.value;
325
+ const e = he.value;
326
326
  if (!e) return;
327
- const l = X(le.present.value);
328
- We(l, e) && (Ve(l), _e.value = null);
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
- ne.begin(t, l), Qe();
332
+ ae.begin(t, l), Qe();
333
333
  }
334
334
  function wl(e, l) {
335
335
  const t = { kind: "node", nodeId: e };
336
- ne.begin(t, l), Qe();
336
+ ae.begin(t, l), Qe();
337
337
  }
338
- function xl(e) {
339
- const l = ne.dragging.value;
338
+ function hl(e) {
339
+ const l = ae.dragging.value;
340
340
  if (!l) return { accepted: !1, message: "拖拽已结束" };
341
- const t = Date.now(), r = X(le.present.value);
341
+ const t = Date.now(), r = K(oe.present.value);
342
342
  if (l.kind === "palette") {
343
- const c = dl(l.nodeType);
344
- return Be(r, "palette", l.nodeType, e) ? (Ge(r, e, c), Ve(r), _e.value = c.id, { accepted: !0, durationMs: Date.now() - t }) : (be.warning("该位置不允许放置此组件"), { accepted: !1, message: "该位置不允许放置此组件", durationMs: Date.now() - t });
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 c = Ie(r, l.nodeId);
347
- return c ? Be(r, "node", c.type, e) ? (sl(r, l.nodeId, e), Ve(r), _e.value = l.nodeId, { accepted: !0, durationMs: Date.now() - t }) : (be.warning("该位置不允许放置此组件"), { accepted: !1, message: "该位置不允许放置此组件", durationMs: Date.now() - t }) : { accepted: !1, message: "未找到被移动的组件", durationMs: Date.now() - t };
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 Ie(e, l) {
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 c of r.columns) t.push(...c.children);
356
+ for (const m of r.columns) t.push(...m.children);
357
357
  else if (r.type === "collapse")
358
- for (const c of r.items) t.push(...c.children);
358
+ for (const m of r.items) t.push(...m.children);
359
359
  else if (r.type === "tabs")
360
- for (const c of r.tabs) t.push(...c.children);
360
+ for (const m of r.tabs) t.push(...m.children);
361
361
  }
362
362
  return null;
363
363
  }
364
- let Me = !1;
364
+ let Oe = !1;
365
365
  function Qe() {
366
- Me || (Me = !0, window.addEventListener("pointermove", el), window.addEventListener("pointerup", hl, { once: !0 }));
366
+ Oe || (Oe = !0, window.addEventListener("pointermove", el), window.addEventListener("pointerup", xl, { once: !0 }));
367
367
  }
368
- function Ee() {
369
- Me && (Me = !1, window.removeEventListener("pointermove", el));
368
+ function Pe() {
369
+ Oe && (Oe = !1, window.removeEventListener("pointermove", el));
370
370
  }
371
371
  function el(e) {
372
- ne.move(e);
373
- const l = tl(e.clientX, e.clientY), t = ne.hoverTarget.value;
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 hl() {
377
- if (!ne.dragging.value) {
378
- ne.end(), Ee();
376
+ function xl() {
377
+ if (!ae.dragging.value) {
378
+ ae.end(), Pe();
379
379
  return;
380
380
  }
381
- const l = ne.hoverTarget.value ?? tl(ne.pointer.x, ne.pointer.y);
381
+ const l = ae.hoverTarget.value ?? tl(ae.pointer.x, ae.pointer.y);
382
382
  if (!l) {
383
- ne.end(), Ee();
383
+ ae.end(), Pe();
384
384
  return;
385
385
  }
386
- xl(l), ne.end(), Ee();
386
+ hl(l), ae.end(), Pe();
387
387
  }
388
- const kl = N(() => le.present.value), Cl = {
389
- canUndo: le.canUndo,
390
- canRedo: le.canRedo,
391
- undo: () => le.undo(),
392
- redo: () => le.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: _e
394
+ selectedNodeId: he
395
395
  };
396
396
  function Il(e, l) {
397
- const t = X(le.present.value), r = Ie(t, e);
398
- r && (r.props = { ...r.props, ...l }, r.meta.updatedAt = He(), Ve(t));
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 = X(le.present.value), r = Ie(t, e);
401
+ const t = K(oe.present.value), r = Se(t, e);
402
402
  if (!r || r.type !== "flexRow") return;
403
- const c = r.columns.length;
404
- if (r.props.cols = l, r.meta.updatedAt = He(), l > c)
405
- for (let h = c; h < l; h += 1)
406
- r.columns.push({ id: B(`col${h + 1}`), children: [] });
407
- else l < c && (r.columns = r.columns.slice(0, l));
408
- Ve(t);
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 = X(le.present.value), r = Ie(t, e);
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 c = r.items;
414
+ const m = r.items;
415
415
  r.items = l.items.map((h) => {
416
- const g = c.find((u) => u.id === h.id);
417
- return { id: h.id, title: h.title, name: h.name, children: (g == null ? void 0 : g.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 = He(), Ve(t);
420
+ r.meta.updatedAt = Te(), xe(t);
421
421
  }
422
422
  }
423
423
  function Sl(e, l) {
424
- const t = X(le.present.value), r = Ie(t, e);
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 c = r.tabs;
427
+ const m = r.tabs;
428
428
  r.tabs = l.tabs.map((h) => {
429
- const g = c.find((u) => u.id === h.id);
430
- return { id: h.id, label: h.label, children: (g == null ? void 0 : g.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 = He(), Ve(t);
433
+ r.meta.updatedAt = Te(), xe(t);
434
434
  }
435
435
  }
436
436
  function ll(e) {
437
- const l = ne.hoverTarget.value;
438
- JSON.stringify(l) !== JSON.stringify(e) && ne.setHover(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]"), c = r == null ? void 0 : r.getAttribute("data-drop-target");
445
- if (!c) return null;
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(c);
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(), le.undo();
455
+ e.preventDefault(), oe.undo();
456
456
  return;
457
457
  }
458
458
  if (e.ctrlKey && (e.key === "y" || e.key === "Y")) {
459
- e.preventDefault(), le.redo();
459
+ e.preventDefault(), oe.redo();
460
460
  return;
461
461
  }
462
462
  e.key === "Delete" && Ze();
463
463
  });
464
464
  }
465
- let Ye = null;
466
- Y(
467
- () => le.present.value,
465
+ let Le = null;
466
+ q(
467
+ () => oe.present.value,
468
468
  (e) => {
469
- Ye && window.clearTimeout(Ye), Ye = window.setTimeout(() => {
469
+ Le && window.clearTimeout(Le), Le = window.setTimeout(() => {
470
470
  }, 800);
471
471
  },
472
472
  { deep: !0 }
473
473
  );
474
- Y(
475
- () => Ue.value,
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
- Ue.value = e;
483
+ De.value = e;
484
484
  }
485
- function Hl() {
486
- return X(Ue.value);
485
+ function Rl() {
486
+ return K(De.value);
487
487
  }
488
- function Rl(e) {
488
+ function Hl(e) {
489
489
  if (!e || typeof e != "object") throw new Error("invalid");
490
- Ue.value = e;
490
+ De.value = e;
491
491
  }
492
- function ye() {
492
+ function Ve() {
493
493
  return {
494
494
  schema: kl,
495
495
  history: Cl,
496
496
  selection: Ul,
497
- drag: ne,
498
- formData: Ue,
499
- select: _l,
497
+ drag: ae,
498
+ formData: De,
499
+ select: gl,
500
500
  beginPaletteDrag: Vl,
501
501
  beginNodeDrag: wl,
502
502
  setHover: ll,
503
- applySchema: gl,
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: Hl,
513
- importFormData: Rl
512
+ exportFormData: Rl,
513
+ importFormData: Hl
514
514
  };
515
515
  }
516
- const Ol = ["data-drop-target"], Al = /* @__PURE__ */ P({
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: c } = ye(), h = N(() => JSON.stringify(l.target)), g = N(() => {
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 = N(() => {
525
+ }), u = $(() => {
526
526
  const k = t.dragging.value;
527
527
  if (!k) return !1;
528
- const M = k.kind === "palette" ? k.nodeType : y(k.nodeId);
529
- return M ? !Be(r.value, k.kind, M, l.target) : !1;
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 y(k) {
532
- const M = [...r.value.root.children];
533
- for (; M.length; ) {
534
- const D = M.shift();
535
- if (D.id === k) return D.type;
536
- if (D.type === "flexRow")
537
- for (const J of D.columns) M.push(...J.children);
538
- else if (D.type === "collapse")
539
- for (const J of D.items) M.push(...J.children);
540
- else if (D.type === "tabs")
541
- for (const J of D.tabs) M.push(...J.children);
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 I() {
546
- t.isDragging.value && c(l.target);
545
+ function M() {
546
+ t.isDragging.value && m(l.target);
547
547
  }
548
- function O() {
549
- t.isDragging.value && c(null);
548
+ function E() {
549
+ t.isDragging.value && m(null);
550
550
  }
551
- return (k, M) => (a(), m("div", {
552
- class: Je(["line", { active: g.value, forbidden: u.value }]),
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: I,
555
- onMouseleave: O,
556
- onPointerenter: I,
557
- onPointerleave: O
554
+ onMouseenter: M,
555
+ onMouseleave: E,
556
+ onPointerenter: M,
557
+ onPointerleave: E
558
558
  }, null, 42, Ol));
559
559
  }
560
- }), ce = (e, l) => {
560
+ }), ve = (e, l) => {
561
561
  const t = e.__vccOpts || e;
562
- for (const [r, c] of l)
563
- t[r] = c;
562
+ for (const [r, m] of l)
563
+ t[r] = m;
564
564
  return t;
565
- }, ve = /* @__PURE__ */ ce(Al, [["__scopeId", "data-v-677f5a96"]]), Tl = { class: "head" }, Pl = { class: "left" }, El = { class: "name" }, Yl = { class: "right" }, Ll = { class: "body" }, Bl = { class: "colTitle" }, Jl = { class: "colBody" }, ql = {
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
- }, Xl = {
574
+ }, Wl = {
575
575
  key: 2,
576
576
  class: "containerBox"
577
- }, Kl = {
577
+ }, Xl = {
578
578
  key: 0,
579
579
  class: "colEmpty"
580
- }, Wl = {
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__ */ P({
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: c } = ye(), h = N(() => t.selectedNodeId.value === l.node.id), g = N(() => l.node.type === "flexRow" ? "布局" : l.node.type === "collapse" || l.node.type === "tabs" ? "容器" : "组件"), u = N(() => {
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
- }, M = l.node.props.inputType ?? "text";
604
- return `${l.node.props.label} (${k[M] ?? M})`;
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
- }), y = N(() => l.node.type !== "flexRow" ? {} : {
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 I() {
612
+ function M() {
613
613
  r(l.node.id);
614
614
  }
615
- function O(k) {
616
- k.button === 0 && c(l.node.id, k);
615
+ function E(k) {
616
+ k.button === 0 && m(l.node.id, k);
617
617
  }
618
- return (k, M) => {
619
- const D = V("el-tag"), J = V("el-button"), K = V("NodeCard", !0), Z = V("el-collapse-item"), j = V("el-collapse"), te = V("el-tab-pane"), Q = V("el-tabs"), re = V("el-table-column"), x = V("el-table");
620
- return a(), m("div", {
621
- class: Je(["card", { selected: h.value }]),
622
- onClick: Le(I, ["stop"])
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
- b("div", Tl, [
625
- b("div", Pl, [
626
- o(D, { size: "small" }, {
627
- default: d(() => [
628
- S(ee(g.value), 1)
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
- b("span", El, ee(u.value), 1)
632
+ y("span", Pl, te(u.value), 1)
633
633
  ]),
634
- b("div", Yl, [
635
- o(J, {
634
+ y("div", Ll, [
635
+ o(F, {
636
636
  size: "small",
637
637
  text: "",
638
- onPointerdown: Le(O, ["stop"])
638
+ onPointerdown: Ye(E, ["stop"])
639
639
  }, {
640
- default: d(() => [...M[0] || (M[0] = [
641
- S(" 拖拽 ", -1)
640
+ default: i(() => [...C[0] || (C[0] = [
641
+ z(" 拖拽 ", -1)
642
642
  ])]),
643
643
  _: 1
644
644
  })
645
645
  ])
646
646
  ]),
647
- b("div", Ll, [
648
- e.node.type === "flexRow" ? (a(), m("div", {
647
+ y("div", Yl, [
648
+ e.node.type === "flexRow" ? (a(), f("div", {
649
649
  key: 0,
650
650
  class: "flexRow",
651
- style: Ne(y.value)
651
+ style: He(b.value)
652
652
  }, [
653
- (a(!0), m($, null, E(e.node.columns, (i, f) => (a(), m("div", {
654
- key: i.id,
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
- b("div", Bl, " 第 " + ee(Number(f) + 1) + " 列 ", 1),
658
- b("div", Jl, [
659
- o(ve, {
660
- target: { kind: "flexCol", rowId: e.node.id, colIndex: f, insertIndex: 0 }
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), m($, null, E(i.children, (_, T) => (a(), m($, {
663
- key: _.id
662
+ (a(!0), f(D, null, B(U.children, (d, s) => (a(), f(D, {
663
+ key: d.id
664
664
  }, [
665
- o(K, { node: _ }, null, 8, ["node"]),
666
- o(ve, {
667
- target: { kind: "flexCol", rowId: e.node.id, colIndex: Number(f), insertIndex: Number(T) + 1 }
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
- i.children.length === 0 ? (a(), m("div", ql, " 拖拽到此列 ")) : G("", !0)
670
+ U.children.length === 0 ? (a(), f("div", ql, " 拖拽到此列 ")) : Q("", !0)
671
671
  ])
672
672
  ]))), 128))
673
- ], 4)) : e.node.type === "collapse" ? (a(), m("div", Fl, [
674
- o(j, {
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: d(() => [
679
- (a(!0), m($, null, E(e.node.items, (i) => (a(), C(Z, {
680
- key: i.id,
681
- title: i.title,
682
- name: i.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: d(() => [
685
- o(ve, {
686
- target: { kind: "collapse", collapseId: e.node.id, itemId: i.id, insertIndex: 0 }
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), m($, null, E(i.children, (f, _) => (a(), m($, {
689
- key: f.id
688
+ (a(!0), f(D, null, B(U.children, (g, d) => (a(), f(D, {
689
+ key: g.id
690
690
  }, [
691
- o(K, { node: f }, null, 8, ["node"]),
692
- o(ve, {
693
- target: { kind: "collapse", collapseId: e.node.id, itemId: i.id, insertIndex: _ + 1 }
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
- i.children.length === 0 ? (a(), m("div", jl, " 拖拽到 " + ee(i.title), 1)) : G("", !0)
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(), m("div", Xl, [
704
- o(Q, {
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: d(() => [
709
- (a(!0), m($, null, E(e.node.tabs, (i) => (a(), C(te, {
710
- key: i.id,
711
- label: i.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: d(() => [
714
- o(ve, {
715
- target: { kind: "tab", tabsId: e.node.id, tabId: i.id, insertIndex: 0 }
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), m($, null, E(i.children, (f, _) => (a(), m($, {
718
- key: f.id
717
+ (a(!0), f(D, null, B(U.children, (g, d) => (a(), f(D, {
718
+ key: g.id
719
719
  }, [
720
- o(K, { node: f }, null, 8, ["node"]),
721
- o(ve, {
722
- target: { kind: "tab", tabsId: e.node.id, tabId: i.id, insertIndex: _ + 1 }
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
- i.children.length === 0 ? (a(), m("div", Kl, " 拖拽到 " + ee(i.label), 1)) : G("", !0)
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(), m("div", Wl, [
733
- o(x, {
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: d(() => [
739
- (a(!0), m($, null, E(e.node.props.columns, (i) => (a(), C(re, {
740
- key: i.id,
741
- prop: i.prop,
742
- label: i.label,
743
- width: i.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(), m("div", Gl, [
749
- b("span", Zl, ee(e.node.props.label), 1),
750
- b("span", Ql, "(" + ee(e.node.type) + ")", 1)
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__ */ ce(et, [["__scopeId", "data-v-7c887642"]]), tt = { class: "root" }, ot = { class: "panel" }, nt = /* @__PURE__ */ P({
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 } = ye(), t = N(() => l.value);
760
- return (r, c) => {
761
- const h = V("el-empty");
762
- return a(), m("div", tt, [
763
- c[0] || (c[0] = b("div", { class: "title" }, " 画布 ", -1)),
764
- b("div", ot, [
765
- o(ve, { target: { kind: "root", insertIndex: 0 } }),
766
- (a(!0), m($, null, E(t.value.root.children, (g, u) => (a(), m($, {
767
- key: g.id
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: g }, null, 8, ["node"]),
770
- o(ve, {
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(), C(h, {
774
+ t.value.root.children.length === 0 ? (a(), x(h, {
775
775
  key: 0,
776
776
  description: "从左侧拖拽组件到此处"
777
- })) : G("", !0)
777
+ })) : Q("", !0)
778
778
  ])
779
779
  ]);
780
780
  };
781
781
  }
782
- }), at = /* @__PURE__ */ ce(nt, [["__scopeId", "data-v-e6a28470"]]);
782
+ }), at = /* @__PURE__ */ ve(nt, [["__scopeId", "data-v-e6a28470"]]);
783
783
  /*! Element Plus Icons Vue v2.3.2 */
784
- var ut = /* @__PURE__ */ P({
784
+ var ut = /* @__PURE__ */ J({
785
785
  name: "ArrowDown",
786
786
  __name: "arrow-down",
787
787
  setup(e) {
788
- return (l, t) => (a(), m("svg", {
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
- b("path", {
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
- }), it = ut, rt = /* @__PURE__ */ P({
798
+ }), rt = ut, it = /* @__PURE__ */ J({
799
799
  name: "CircleCheck",
800
800
  __name: "circle-check",
801
801
  setup(e) {
802
- return (l, t) => (a(), m("svg", {
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
- b("path", {
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
- b("path", {
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 = rt, st = /* @__PURE__ */ P({
816
+ }), dt = it, st = /* @__PURE__ */ J({
817
817
  name: "Delete",
818
818
  __name: "delete",
819
819
  setup(e) {
820
- return (l, t) => (a(), m("svg", {
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
- b("path", {
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__ */ P({
830
+ }), Fe = st, pt = /* @__PURE__ */ J({
831
831
  name: "Document",
832
832
  __name: "document",
833
833
  setup(e) {
834
- return (l, t) => (a(), m("svg", {
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
- b("path", {
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__ */ P({
844
+ }), ct = pt, mt = /* @__PURE__ */ J({
845
845
  name: "Download",
846
846
  __name: "download",
847
847
  setup(e) {
848
- return (l, t) => (a(), m("svg", {
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
- b("path", {
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__ */ P({
858
+ }), ft = mt, vt = /* @__PURE__ */ J({
859
859
  name: "Edit",
860
860
  __name: "edit",
861
861
  setup(e) {
862
- return (l, t) => (a(), m("svg", {
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
- b("path", {
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
- b("path", {
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__ */ P({
876
+ }), je = vt, bt = /* @__PURE__ */ J({
877
877
  name: "Files",
878
878
  __name: "files",
879
879
  setup(e) {
880
- return (l, t) => (a(), m("svg", {
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
- b("path", {
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, gt = /* @__PURE__ */ P({
890
+ }), yt = bt, _t = /* @__PURE__ */ J({
891
891
  name: "Fold",
892
892
  __name: "fold",
893
893
  setup(e) {
894
- return (l, t) => (a(), m("svg", {
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
- b("path", {
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
- }), _t = gt, Vt = /* @__PURE__ */ P({
904
+ }), gt = _t, Vt = /* @__PURE__ */ J({
905
905
  name: "Grid",
906
906
  __name: "grid",
907
907
  setup(e) {
908
- return (l, t) => (a(), m("svg", {
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
- b("path", {
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, xt = /* @__PURE__ */ P({
918
+ }), wt = Vt, ht = /* @__PURE__ */ J({
919
919
  name: "Menu",
920
920
  __name: "menu",
921
921
  setup(e) {
922
- return (l, t) => (a(), m("svg", {
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
- b("path", {
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
- }), ht = xt, kt = /* @__PURE__ */ P({
932
+ }), xt = ht, kt = /* @__PURE__ */ J({
933
933
  name: "Picture",
934
934
  __name: "picture",
935
935
  setup(e) {
936
- return (l, t) => (a(), m("svg", {
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
- b("path", {
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
- b("path", {
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__ */ P({
950
+ }), Ct = kt, Ut = /* @__PURE__ */ J({
951
951
  name: "Plus",
952
952
  __name: "plus",
953
953
  setup(e) {
954
- return (l, t) => (a(), m("svg", {
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
- b("path", {
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
- }), Xe = Ut, It = /* @__PURE__ */ P({
964
+ }), We = Ut, It = /* @__PURE__ */ J({
965
965
  name: "Postcard",
966
966
  __name: "postcard",
967
967
  setup(e) {
968
- return (l, t) => (a(), m("svg", {
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
- b("path", {
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
- b("path", {
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__ */ P({
982
+ }), zt = It, Dt = /* @__PURE__ */ J({
983
983
  name: "SetUp",
984
984
  __name: "set-up",
985
985
  setup(e) {
986
- return (l, t) => (a(), m("svg", {
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
- b("path", {
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
- b("path", {
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
- b("path", {
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
- b("path", {
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__ */ P({
1008
+ }), St = Dt, $t = /* @__PURE__ */ J({
1009
1009
  name: "SwitchButton",
1010
1010
  __name: "switch-button",
1011
1011
  setup(e) {
1012
- return (l, t) => (a(), m("svg", {
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
- b("path", {
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
- b("path", {
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__ */ P({
1026
+ }), Nt = $t, Mt = /* @__PURE__ */ J({
1027
1027
  name: "Upload",
1028
1028
  __name: "upload",
1029
1029
  setup(e) {
1030
- return (l, t) => (a(), m("svg", {
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
- b("path", {
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 Ht = { class: "content" }, Rt = { class: "label" }, Ot = /* @__PURE__ */ P({
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 } = ye(), r = {
1049
- flexRow: ht,
1050
- collapse: _t,
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: it,
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
- }, c = N(() => r[l.nodeType] || je);
1063
- function h(g) {
1064
- g.button === 0 && t(l.nodeType, g);
1062
+ }, m = $(() => r[l.nodeType] || je);
1063
+ function h(V) {
1064
+ V.button === 0 && t(l.nodeType, V);
1065
1065
  }
1066
- return (g, u) => {
1067
- const y = V("el-icon"), I = V("el-card");
1068
- return a(), C(I, {
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: d(() => [
1074
- b("div", Ht, [
1075
- o(y, {
1073
+ default: i(() => [
1074
+ y("div", Rt, [
1075
+ o(b, {
1076
1076
  class: "icon",
1077
1077
  size: 16
1078
1078
  }, {
1079
- default: d(() => [
1080
- (a(), C(il(c.value)))
1079
+ default: i(() => [
1080
+ (a(), x(rl(m.value)))
1081
1081
  ]),
1082
1082
  _: 1
1083
1083
  }),
1084
- b("div", Rt, ee(e.label), 1)
1084
+ y("div", Ht, te(e.label), 1)
1085
1085
  ])
1086
1086
  ]),
1087
1087
  _: 1
1088
1088
  });
1089
1089
  };
1090
1090
  }
1091
- }), ie = /* @__PURE__ */ ce(Ot, [["__scopeId", "data-v-7d576d24"]]), At = { class: "wrap" }, Tt = { class: "grid" }, Pt = { class: "grid" }, Et = /* @__PURE__ */ P({
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 = z(["container", "field"]), { drag: t } = ye(), r = N(() => t.isDragging.value), c = N(() => ({
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 = N(() => {
1098
- const g = t.dragging.value;
1099
- return g ? g.kind === "palette" ? g.nodeType : "移动组件" : "";
1097
+ })), h = $(() => {
1098
+ const V = t.dragging.value;
1099
+ return V ? V.kind === "palette" ? V.nodeType : "移动组件" : "";
1100
1100
  });
1101
- return (g, u) => {
1102
- const y = V("el-collapse-item"), I = V("el-collapse");
1103
- return a(), m("div", At, [
1104
- o(I, {
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] = (O) => l.value = O)
1106
+ "onUpdate:modelValue": u[0] || (u[0] = (E) => l.value = E)
1107
1107
  }, {
1108
- default: d(() => [
1109
- o(y, { name: "container" }, {
1110
- title: d(() => [...u[1] || (u[1] = [
1111
- S(" 容器组件 ", -1)
1108
+ default: i(() => [
1109
+ o(b, { name: "container" }, {
1110
+ title: i(() => [...u[1] || (u[1] = [
1111
+ z(" 容器组件 ", -1)
1112
1112
  ])]),
1113
- default: d(() => [
1114
- b("div", Tt, [
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(y, { name: "field" }, {
1132
- title: d(() => [...u[2] || (u[2] = [
1133
- S(" 普通组件 ", -1)
1131
+ o(b, { name: "field" }, {
1132
+ title: i(() => [...u[2] || (u[2] = [
1133
+ z(" 普通组件 ", -1)
1134
1134
  ])]),
1135
- default: d(() => [
1136
- b("div", Pt, [
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(), m("div", {
1184
+ r.value ? (a(), f("div", {
1185
1185
  key: 0,
1186
1186
  class: "ghost",
1187
- style: Ne(c.value)
1188
- }, ee(h.value), 5)) : G("", !0)
1187
+ style: He(m.value)
1188
+ }, te(h.value), 5)) : Q("", !0)
1189
1189
  ]);
1190
1190
  };
1191
1191
  }
1192
- }), Yt = /* @__PURE__ */ ce(Et, [["__scopeId", "data-v-1a00cdb7"]]), Lt = {
1192
+ }), Lt = /* @__PURE__ */ ve(Pt, [["__scopeId", "data-v-1a00cdb7"]]), Yt = {
1193
1193
  key: 3,
1194
1194
  class: "tableWrap"
1195
- }, Bt = { class: "tableHeader" }, Jt = { class: "title" }, qt = { class: "actions" }, Ft = {
1195
+ }, Jt = { class: "tableHeader" }, Bt = { class: "title" }, qt = { class: "actions" }, Ft = {
1196
1196
  key: 0,
1197
1197
  class: "pagination"
1198
- }, jt = /* @__PURE__ */ P({
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, c = N({
1206
+ const t = e, r = l, m = $({
1207
1207
  get: () => t.modelValue,
1208
- set: (x) => r("update:modelValue", x)
1208
+ set: (d) => r("update:modelValue", d)
1209
1209
  });
1210
- Ke(() => {
1210
+ Xe(() => {
1211
1211
  if (t.node.type === "switch") {
1212
- const x = t.node;
1213
- c.value[x.props.field] === void 0 && r("update:modelValue", { ...c.value, [x.props.field]: x.props.inactiveValue ?? !1 });
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 = "/api/upload", g = N({
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 x = t.node, i = c.value[x.props.field];
1220
- return Array.isArray(i) ? i : [];
1219
+ const d = t.node, s = m.value[d.props.field];
1220
+ return Array.isArray(s) ? s : [];
1221
1221
  },
1222
- set: (x) => {
1222
+ set: (d) => {
1223
1223
  if (!["image-upload", "file-upload"].includes(t.node.type)) return;
1224
- const i = t.node;
1225
- r("update:modelValue", { ...c.value, [i.props.field]: x });
1224
+ const s = t.node;
1225
+ r("update:modelValue", { ...m.value, [s.props.field]: d });
1226
1226
  }
1227
1227
  });
1228
- function u(x) {
1229
- x.url && window.open(x.url, "_blank");
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 y = N(() => t.node.type !== "flexRow" ? {} : {
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
- }), I = N({
1258
+ }), C = $({
1236
1259
  get: () => {
1237
- const x = t.node;
1238
- if (x.props.field)
1239
- return c.value[x.props.field];
1260
+ const d = t.node;
1261
+ if (d.props.field)
1262
+ return m.value[d.props.field];
1240
1263
  },
1241
- set: (x) => {
1242
- const i = t.node;
1243
- i.props.field && r("update:modelValue", { ...c.value, [i.props.field]: x });
1264
+ set: (d) => {
1265
+ const s = t.node;
1266
+ s.props.field && r("update:modelValue", { ...m.value, [s.props.field]: d });
1244
1267
  }
1245
- }), O = N({
1268
+ }), N = $({
1246
1269
  get: () => {
1247
- const x = I.value, i = t.node;
1248
- return x === void 0 ? i.props.inactiveValue : x;
1270
+ const d = C.value, s = t.node;
1271
+ return d === void 0 ? s.props.inactiveValue : d;
1249
1272
  },
1250
- set: (x) => {
1251
- I.value = x;
1273
+ set: (d) => {
1274
+ C.value = d;
1252
1275
  }
1253
- }), k = N({
1276
+ }), F = $({
1254
1277
  get: () => {
1255
1278
  if (t.node.type !== "checkbox") return [];
1256
- const x = t.node, i = c.value[x.props.field];
1257
- return Array.isArray(i) ? i : [];
1279
+ const d = t.node, s = m.value[d.props.field];
1280
+ return Array.isArray(s) ? s : [];
1258
1281
  },
1259
- set: (x) => {
1282
+ set: (d) => {
1260
1283
  if (t.node.type !== "checkbox") return;
1261
- const i = t.node;
1262
- r("update:modelValue", { ...c.value, [i.props.field]: x });
1284
+ const s = t.node;
1285
+ r("update:modelValue", { ...m.value, [s.props.field]: d });
1263
1286
  }
1264
- }), M = z(1), D = N({
1287
+ }), W = I(1), L = $({
1265
1288
  get: () => {
1266
1289
  if (t.node.type !== "table") return [];
1267
- const x = t.node, i = c.value[x.props.field];
1268
- return Array.isArray(i) ? i : [];
1290
+ const d = t.node, s = m.value[d.props.field];
1291
+ return Array.isArray(s) ? s : [];
1269
1292
  },
1270
- set: (x) => {
1293
+ set: (d) => {
1271
1294
  if (t.node.type !== "table") return;
1272
- const i = t.node;
1273
- r("update:modelValue", { ...c.value, [i.props.field]: x });
1295
+ const s = t.node;
1296
+ r("update:modelValue", { ...m.value, [s.props.field]: d });
1274
1297
  }
1275
- }), J = N(() => {
1298
+ }), X = $(() => {
1276
1299
  if (t.node.type !== "table") return [];
1277
- if (!t.node.props.pagination) return D.value;
1278
- const x = t.node.props.pageSize ?? 10, i = (M.value - 1) * x;
1279
- return D.value.slice(i, i + x);
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 K() {
1304
+ function ne() {
1282
1305
  if (t.node.type !== "table") return;
1283
- const x = t.node, i = {};
1284
- for (const f of x.props.columns)
1285
- i[f.prop] = "";
1286
- D.value = [...D.value, i];
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 Z(x) {
1311
+ function ee(d) {
1289
1312
  if (t.node.type !== "table") return;
1290
- const i = t.node, f = i.props.pagination ? (M.value - 1) * (i.props.pageSize ?? 10) + x : x, _ = [...D.value];
1291
- _.splice(f, 1), D.value = _;
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 j(x) {
1294
- M.value = x;
1316
+ function de(d) {
1317
+ W.value = d;
1295
1318
  }
1296
- function te(x) {
1319
+ function se(d) {
1297
1320
  if (t.node.type !== "table") return;
1298
- const i = new FileReader();
1299
- i.onload = (f) => {
1300
- var W;
1301
- const _ = (W = f.target) == null ? void 0 : W.result;
1302
- if (!_) return;
1303
- const T = he.read(_, { type: "binary" }), q = T.Sheets[T.SheetNames[0]], F = he.utils.sheet_to_json(q).map((ae) => {
1304
- const w = {}, we = t.node;
1305
- for (const ue of we.props.columns)
1306
- ae[ue.prop] !== void 0 ? w[ue.prop] = ae[ue.prop] : ae[ue.label] !== void 0 ? w[ue.prop] = ae[ue.label] : w[ue.prop] = "";
1307
- return w;
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
- D.value = [...D.value, ...F];
1310
- }, i.readAsBinaryString(x.raw);
1332
+ L.value = [...L.value, ..._];
1333
+ }, s.readAsBinaryString(d.raw);
1311
1334
  }
1312
- function Q() {
1335
+ function U() {
1313
1336
  if (t.node.type !== "table") return;
1314
- const x = D.value;
1315
- if (!x.length) return;
1316
- const i = t.node, f = i.props.columns, _ = x.map((de) => {
1317
- const F = {};
1318
- return f.forEach((W) => {
1319
- F[W.label] = de[W.prop];
1320
- }), F;
1321
- }), T = he.utils.json_to_sheet(_), q = he.utils.book_new();
1322
- he.utils.book_append_sheet(q, T, "Sheet1"), he.writeFile(q, `${i.props.label || "data"}.xlsx`);
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 re() {
1325
- t.node.type === "table" && (D.value = []);
1347
+ function g() {
1348
+ t.node.type === "table" && (L.value = []);
1326
1349
  }
1327
- return (x, i) => {
1328
- const f = V("RenderNode", !0), _ = V("el-collapse-item"), T = V("el-collapse"), q = V("el-tab-pane"), de = V("el-tabs"), F = V("el-button"), W = V("el-upload"), ae = V("el-option"), w = V("el-select"), we = V("el-input-number"), ue = V("el-date-picker"), ze = V("el-time-picker"), Ce = V("el-input"), De = V("el-table-column"), Re = V("el-table"), Oe = V("el-pagination"), Ae = V("el-radio"), Te = V("el-radio-group"), Pe = V("el-checkbox"), s = V("el-checkbox-group"), n = V("el-switch"), H = V("el-icon"), R = V("el-form-item");
1329
- return e.node.type === "flexRow" ? (a(), m("div", {
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: Ne(y.value)
1355
+ style: He(k.value)
1333
1356
  }, [
1334
- (a(!0), m($, null, E(e.node.columns, (p) => (a(), m("div", {
1335
- key: p.id,
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), m($, null, E(p.children, (U) => (a(), C(f, {
1339
- key: U.id,
1340
- node: U,
1341
- modelValue: c.value,
1342
- "onUpdate:modelValue": i[0] || (i[0] = (L) => c.value = L)
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(), C(T, {
1368
+ ], 4)) : e.node.type === "collapse" ? (a(), x(G, {
1346
1369
  key: 1,
1347
1370
  accordion: e.node.props.accordion
1348
1371
  }, {
1349
- default: d(() => [
1350
- (a(!0), m($, null, E(e.node.items, (p) => (a(), C(_, {
1351
- key: p.id,
1352
- title: p.title,
1353
- name: p.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: d(() => [
1356
- (a(!0), m($, null, E(p.children, (U) => (a(), C(f, {
1357
- key: U.id,
1358
- node: U,
1359
- modelValue: c.value,
1360
- "onUpdate:modelValue": i[1] || (i[1] = (L) => c.value = L)
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(), C(de, {
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: d(() => [
1372
- (a(!0), m($, null, E(e.node.tabs, (p) => (a(), C(q, {
1373
- key: p.id,
1374
- label: p.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: d(() => [
1377
- (a(!0), m($, null, E(p.children, (U) => (a(), C(f, {
1378
- key: U.id,
1379
- node: U,
1380
- modelValue: c.value,
1381
- "onUpdate:modelValue": i[2] || (i[2] = (L) => c.value = L)
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(), m("div", Lt, [
1389
- b("div", Bt, [
1390
- b("div", Jt, ee(e.node.props.label), 1),
1391
- b("div", qt, [
1392
- o(F, {
1393
- icon: fe(Fe),
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: re
1420
+ onClick: g
1398
1421
  }, {
1399
- default: d(() => [...i[16] || (i[16] = [
1400
- S("清空数据", -1)
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(), C(W, {
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": te
1433
+ "on-change": se
1411
1434
  }, {
1412
- default: d(() => [
1413
- o(F, {
1414
- icon: fe(ol),
1435
+ default: i(() => [
1436
+ o(_, {
1437
+ icon: ye(ol),
1415
1438
  size: "small"
1416
1439
  }, {
1417
- default: d(() => [...i[17] || (i[17] = [
1418
- S("导入Excel", -1)
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
- })) : G("", !0),
1425
- o(F, {
1426
- icon: fe(ft),
1447
+ })) : Q("", !0),
1448
+ o(_, {
1449
+ icon: ye(ft),
1427
1450
  size: "small",
1428
- onClick: Q
1451
+ onClick: U
1429
1452
  }, {
1430
- default: d(() => [...i[18] || (i[18] = [
1431
- S("导出Excel", -1)
1453
+ default: i(() => [...s[18] || (s[18] = [
1454
+ z("导出Excel", -1)
1432
1455
  ])]),
1433
1456
  _: 1
1434
1457
  }, 8, ["icon"]),
1435
- o(F, {
1458
+ o(_, {
1436
1459
  type: "primary",
1437
- icon: fe(Xe),
1460
+ icon: ye(We),
1438
1461
  size: "small",
1439
- onClick: K
1462
+ onClick: ne
1440
1463
  }, {
1441
- default: d(() => [...i[19] || (i[19] = [
1442
- S("添加", -1)
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(Re, {
1449
- data: J.value,
1471
+ o(Ae, {
1472
+ data: X.value,
1450
1473
  border: "",
1451
1474
  style: { width: "100%" },
1452
1475
  size: "small"
1453
1476
  }, {
1454
- default: d(() => [
1455
- (a(!0), m($, null, E(e.node.props.columns, (p) => (a(), C(De, {
1456
- key: p.id,
1457
- prop: p.prop,
1458
- label: p.label,
1459
- width: p.width,
1460
- sortable: !!p.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: d(({ row: U }) => [
1463
- p.type === "select" ? (a(), C(w, {
1485
+ default: i(({ row: O }) => [
1486
+ c.type === "select" ? (a(), x(be, {
1464
1487
  key: 0,
1465
- modelValue: U[p.prop],
1466
- "onUpdate:modelValue": (L) => U[p.prop] = L,
1488
+ modelValue: O[c.prop],
1489
+ "onUpdate:modelValue": (S) => O[c.prop] = S,
1467
1490
  size: "small",
1468
- multiple: !!p.multiple,
1469
- filterable: !!p.filterable,
1470
- placeholder: p.placeholder || "请选择",
1491
+ multiple: !!c.multiple,
1492
+ filterable: !!c.filterable,
1493
+ placeholder: c.placeholder || "请选择",
1471
1494
  style: { width: "100%" }
1472
1495
  }, {
1473
- default: d(() => [
1474
- (a(!0), m($, null, E(p.options ?? [], (L) => (a(), C(ae, {
1475
- key: L.value,
1476
- label: L.label,
1477
- value: L.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"])) : p.type === "number" ? (a(), C(we, {
1504
+ }, 1032, ["modelValue", "onUpdate:modelValue", "multiple", "filterable", "placeholder"])) : c.type === "number" ? (a(), x(ke, {
1482
1505
  key: 1,
1483
- modelValue: U[p.prop],
1484
- "onUpdate:modelValue": (L) => U[p.prop] = L,
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(p.type) ? (a(), C(ue, {
1511
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])) : ["date", "datetime", "month"].includes(c.type) ? (a(), x(re, {
1489
1512
  key: 2,
1490
- modelValue: U[p.prop],
1491
- "onUpdate:modelValue": (L) => U[p.prop] = L,
1492
- type: p.type,
1493
- format: p.type === "datetime" ? "YYYY-MM-DD HH:mm:ss" : p.type === "month" ? "YYYY-MM" : "YYYY-MM-DD",
1494
- "value-format": p.type === "datetime" ? "YYYY-MM-DD HH:mm:ss" : p.type === "month" ? "YYYY-MM" : "YYYY-MM-DD",
1495
- placeholder: p.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"])) : p.type === "time" ? (a(), C(ze, {
1521
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "format", "value-format", "placeholder"])) : c.type === "time" ? (a(), x($e, {
1499
1522
  key: 3,
1500
- modelValue: U[p.prop],
1501
- "onUpdate:modelValue": (L) => U[p.prop] = L,
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: p.placeholder || "请选择时间",
1527
+ placeholder: c.placeholder || "请选择时间",
1505
1528
  size: "small",
1506
1529
  style: { width: "100%" }
1507
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : (a(), C(Ce, {
1530
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : (a(), x(Ie, {
1508
1531
  key: 4,
1509
- modelValue: U[p.prop],
1510
- "onUpdate:modelValue": (L) => U[p.prop] = L,
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(De, {
1539
+ o(Ne, {
1517
1540
  label: "操作",
1518
1541
  width: "100",
1519
1542
  fixed: "right"
1520
1543
  }, {
1521
- header: d(() => [...i[20] || (i[20] = [
1522
- b("div", { style: { display: "flex", "justify-content": "space-between", "align-items": "center" } }, [
1523
- b("span", null, "操作")
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: d(({ $index: p }) => [
1527
- o(F, {
1549
+ default: i(({ $index: c }) => [
1550
+ o(_, {
1528
1551
  type: "danger",
1529
- icon: fe(Fe),
1552
+ icon: ye(Fe),
1530
1553
  circle: "",
1531
1554
  size: "small",
1532
- onClick: (U) => Z(p)
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(), m("div", Ft, [
1541
- o(Oe, {
1542
- "current-page": M.value,
1543
- "onUpdate:currentPage": i[3] || (i[3] = (p) => M.value = p),
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: D.value.length,
1568
+ total: L.value.length,
1546
1569
  layout: "prev, pager, next",
1547
- onCurrentChange: j
1570
+ onCurrentChange: de
1548
1571
  }, null, 8, ["current-page", "page-size", "total"])
1549
- ])) : G("", !0)
1550
- ])) : e.node.type === "title" ? (a(), m("div", {
1572
+ ])) : Q("", !0)
1573
+ ])) : e.node.type === "title" ? (a(), f("div", {
1551
1574
  key: 4,
1552
- style: Ne({
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
- }, ee(e.node.props.label), 5)) : (a(), C(R, {
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: d(() => [
1564
- e.node.type === "input" ? (a(), m($, { key: 0 }, [
1565
- e.node.props.inputType === "number" ? (a(), C(we, {
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: I.value,
1568
- "onUpdate:modelValue": i[4] || (i[4] = (p) => I.value = p),
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(), C(ue, {
1593
+ }, null, 8, ["modelValue", "placeholder"])) : e.node.props.inputType === "date" ? (a(), x(re, {
1571
1594
  key: 1,
1572
- modelValue: I.value,
1573
- "onUpdate:modelValue": i[5] || (i[5] = (p) => I.value = p),
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(), C(ze, {
1600
+ }, null, 8, ["modelValue", "placeholder"])) : e.node.props.inputType === "time" ? (a(), x($e, {
1578
1601
  key: 2,
1579
- modelValue: I.value,
1580
- "onUpdate:modelValue": i[6] || (i[6] = (p) => I.value = p),
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(), C(ue, {
1606
+ }, null, 8, ["modelValue", "placeholder"])) : e.node.props.inputType === "datetime" ? (a(), x(re, {
1584
1607
  key: 3,
1585
- modelValue: I.value,
1586
- "onUpdate:modelValue": i[7] || (i[7] = (p) => I.value = p),
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(), C(Ce, {
1613
+ }, null, 8, ["modelValue", "placeholder"])) : (a(), x(Ie, {
1591
1614
  key: 4,
1592
- modelValue: I.value,
1593
- "onUpdate:modelValue": i[8] || (i[8] = (p) => I.value = p),
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(), C(Ce, {
1619
+ ], 64)) : e.node.type === "textarea" ? (a(), x(Ie, {
1597
1620
  key: 1,
1598
- modelValue: I.value,
1599
- "onUpdate:modelValue": i[9] || (i[9] = (p) => I.value = p),
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(), C(w, {
1626
+ }, null, 8, ["modelValue", "placeholder"])) : e.node.type === "select" ? (a(), x(be, {
1604
1627
  key: 2,
1605
- modelValue: I.value,
1606
- "onUpdate:modelValue": i[10] || (i[10] = (p) => I.value = p),
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: d(() => [
1612
- (a(!0), m($, null, E(e.node.props.options ?? [], (p) => (a(), C(ae, {
1613
- key: p.value,
1614
- label: p.label,
1615
- value: p.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(), C(Te, {
1642
+ }, 8, ["modelValue", "placeholder", "multiple"])) : e.node.type === "radio" ? (a(), x(n, {
1620
1643
  key: 3,
1621
- modelValue: I.value,
1622
- "onUpdate:modelValue": i[11] || (i[11] = (p) => I.value = p)
1644
+ modelValue: C.value,
1645
+ "onUpdate:modelValue": s[11] || (s[11] = (c) => C.value = c)
1623
1646
  }, {
1624
- default: d(() => [
1625
- (a(!0), m($, null, E(e.node.props.options ?? [], (p) => (a(), C(Ae, {
1626
- key: p.value,
1627
- value: p.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: d(() => [
1630
- S(ee(p.label), 1)
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(), C(s, {
1659
+ }, 8, ["modelValue"])) : e.node.type === "checkbox" ? (a(), x(H, {
1637
1660
  key: 4,
1638
- modelValue: k.value,
1639
- "onUpdate:modelValue": i[12] || (i[12] = (p) => k.value = p)
1661
+ modelValue: F.value,
1662
+ "onUpdate:modelValue": s[12] || (s[12] = (c) => F.value = c)
1640
1663
  }, {
1641
- default: d(() => [
1642
- (a(!0), m($, null, E(e.node.props.options ?? [], (p) => (a(), C(Pe, {
1643
- key: p.value,
1644
- value: p.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: d(() => [
1647
- S(ee(p.label), 1)
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(), C(n, {
1676
+ }, 8, ["modelValue"])) : e.node.type === "switch" ? (a(), x(ce, {
1654
1677
  key: 5,
1655
- modelValue: O.value,
1656
- "onUpdate:modelValue": i[13] || (i[13] = (p) => O.value = p),
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(), C(W, {
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: fe(h),
1686
+ action: ye(h),
1687
+ name: "file",
1664
1688
  "list-type": "picture-card",
1665
1689
  limit: e.node.props.limit,
1666
- "file-list": g.value,
1667
- "onUpdate:fileList": i[14] || (i[14] = (p) => g.value = p),
1668
- "on-preview": u
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: d(() => [
1671
- o(H, null, {
1672
- default: d(() => [
1673
- o(fe(Xe))
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(), C(W, {
1704
+ }, 8, ["action", "limit", "file-list"])) : e.node.type === "file-upload" ? (a(), x(ue, {
1680
1705
  key: 7,
1681
- action: fe(h),
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": g.value,
1685
- "onUpdate:fileList": i[15] || (i[15] = (p) => g.value = p),
1686
- "on-preview": u
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: d(() => [
1689
- o(F, { type: "primary" }, {
1690
- default: d(() => [...i[21] || (i[21] = [
1691
- S("点击上传", -1)
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"])) : G("", !0)
1725
+ }, 8, ["action", "limit", "accept", "file-list"])) : Q("", !0)
1698
1726
  ]),
1699
1727
  _: 1
1700
1728
  }, 8, ["label", "required"]));
1701
1729
  };
1702
1730
  }
1703
- }), Xt = /* @__PURE__ */ ce(jt, [["__scopeId", "data-v-7a292d3e"]]), Kt = { class: "root" }, Wt = /* @__PURE__ */ P({
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, c = N({
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, g) => (a(), m("div", Kt, [
1716
- (a(!0), m($, null, E(e.schema.root.children, (u) => (a(), C(Xt, {
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: c.value,
1720
- "onUpdate:modelValue": g[0] || (g[0] = (y) => c.value = y)
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__ */ ce(Wt, [["__scopeId", "data-v-a20c32c5"]]), Zt = { class: "bar" }, Qt = { class: "surface" }, eo = /* @__PURE__ */ P({
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, c = N({
1759
+ const t = e, r = l, m = $({
1732
1760
  get: () => t.modelValue,
1733
- set: (i) => r("update:modelValue", i)
1734
- }), { schema: h, formData: g, setFormData: u, exportFormData: y, importFormData: I } = ye(), O = N(() => h.value), k = z("pc"), M = z(!1);
1735
- z(!1);
1736
- const D = z({});
1737
- Object.keys(D.value).length === 0 && Object.keys(g.value).length > 0 && (D.value = { ...g.value });
1738
- const J = z(!1), K = z(""), Z = z(!1), j = z("");
1739
- Y(
1740
- () => c.value,
1741
- (i) => {
1742
- i && (D.value = y());
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
- ), Y(
1746
- () => D.value,
1747
- (i) => {
1748
- u(i);
1773
+ ), q(
1774
+ () => N.value,
1775
+ (U) => {
1776
+ u(U);
1749
1777
  },
1750
1778
  { deep: !0 }
1751
1779
  );
1752
- function te() {
1753
- K.value = JSON.stringify(D.value, null, 2), J.value = !0;
1780
+ function ne() {
1781
+ W.value = JSON.stringify(N.value, null, 2), F.value = !0;
1754
1782
  }
1755
- function Q() {
1756
- navigator.clipboard.writeText(K.value).then(() => {
1757
- be.success("已复制");
1783
+ function ee() {
1784
+ navigator.clipboard.writeText(W.value).then(() => {
1785
+ ge.success("已复制");
1758
1786
  });
1759
1787
  }
1760
- function re() {
1761
- j.value = "", Z.value = !0;
1788
+ function de() {
1789
+ X.value = "", L.value = !0;
1762
1790
  }
1763
- function x() {
1791
+ function se() {
1764
1792
  try {
1765
- const i = JSON.parse(j.value);
1766
- I(i), D.value = y(), Z.value = !1, be.success("已导入数据");
1793
+ const U = JSON.parse(X.value);
1794
+ M(U), N.value = b(), L.value = !1, ge.success("已导入数据");
1767
1795
  } catch {
1768
- be.error("JSON 解析失败");
1796
+ ge.error("JSON 解析失败");
1769
1797
  }
1770
1798
  }
1771
- return (i, f) => {
1772
- const _ = V("el-radio-button"), T = V("el-radio-group"), q = V("el-button"), de = V("el-form"), F = V("el-dialog"), W = V("el-input"), ae = V("el-alert");
1773
- return a(), m($, null, [
1774
- o(F, {
1775
- modelValue: c.value,
1776
- "onUpdate:modelValue": f[4] || (f[4] = (w) => c.value = w),
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: M.value
1808
+ fullscreen: C.value
1781
1809
  }, {
1782
- footer: d(() => [
1783
- o(q, {
1784
- onClick: f[3] || (f[3] = (w) => c.value = !1)
1810
+ footer: i(() => [
1811
+ o(T, {
1812
+ onClick: g[3] || (g[3] = (_) => m.value = !1)
1785
1813
  }, {
1786
- default: d(() => [...f[16] || (f[16] = [
1787
- S(" 关闭 ", -1)
1814
+ default: i(() => [...g[16] || (g[16] = [
1815
+ z(" 关闭 ", -1)
1788
1816
  ])]),
1789
1817
  _: 1
1790
1818
  })
1791
1819
  ]),
1792
- default: d(() => [
1793
- b("div", Zt, [
1794
- o(T, {
1820
+ default: i(() => [
1821
+ y("div", Zt, [
1822
+ o(s, {
1795
1823
  modelValue: k.value,
1796
- "onUpdate:modelValue": f[0] || (f[0] = (w) => k.value = w),
1824
+ "onUpdate:modelValue": g[0] || (g[0] = (_) => k.value = _),
1797
1825
  size: "small"
1798
1826
  }, {
1799
- default: d(() => [
1800
- o(_, { label: "pc" }, {
1801
- default: d(() => [...f[11] || (f[11] = [
1802
- S(" PC ", -1)
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(_, { label: "mobile" }, {
1807
- default: d(() => [...f[12] || (f[12] = [
1808
- S(" 移动端 ", -1)
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(q, {
1816
- onClick: f[1] || (f[1] = (w) => M.value = !M.value),
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: d(() => [
1821
- S(ee(M.value ? "退出全屏" : "全屏"), 1)
1848
+ default: i(() => [
1849
+ z(te(C.value ? "退出全屏" : "全屏"), 1)
1822
1850
  ]),
1823
1851
  _: 1
1824
1852
  }),
1825
- f[15] || (f[15] = b("div", { class: "spacer" }, null, -1)),
1826
- o(q, { onClick: te }, {
1827
- default: d(() => [...f[13] || (f[13] = [
1828
- S(" 导出数据 JSON ", -1)
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(q, { onClick: re }, {
1833
- default: d(() => [...f[14] || (f[14] = [
1834
- S(" 导入数据 JSON ", -1)
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
- b("div", {
1840
- class: Je(["viewport", { mobile: k.value === "mobile" }])
1867
+ y("div", {
1868
+ class: Be(["viewport", { mobile: k.value === "mobile" }])
1841
1869
  }, [
1842
- b("div", Qt, [
1843
- o(de, { "label-position": "top" }, {
1844
- default: d(() => [
1870
+ y("div", Qt, [
1871
+ o(le, { "label-position": "top" }, {
1872
+ default: i(() => [
1845
1873
  o(Gt, {
1846
- schema: O.value,
1847
- modelValue: D.value,
1848
- "onUpdate:modelValue": f[2] || (f[2] = (w) => D.value = w)
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(F, {
1859
- modelValue: J.value,
1860
- "onUpdate:modelValue": f[7] || (f[7] = (w) => J.value = w),
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: d(() => [
1865
- o(q, {
1866
- onClick: f[6] || (f[6] = (w) => J.value = !1)
1892
+ footer: i(() => [
1893
+ o(T, {
1894
+ onClick: g[6] || (g[6] = (_) => F.value = !1)
1867
1895
  }, {
1868
- default: d(() => [...f[17] || (f[17] = [
1869
- S(" 关闭 ", -1)
1896
+ default: i(() => [...g[17] || (g[17] = [
1897
+ z(" 关闭 ", -1)
1870
1898
  ])]),
1871
1899
  _: 1
1872
1900
  }),
1873
- o(q, {
1901
+ o(T, {
1874
1902
  type: "primary",
1875
- onClick: Q
1903
+ onClick: ee
1876
1904
  }, {
1877
- default: d(() => [...f[18] || (f[18] = [
1878
- S(" 复制 ", -1)
1905
+ default: i(() => [...g[18] || (g[18] = [
1906
+ z(" 复制 ", -1)
1879
1907
  ])]),
1880
1908
  _: 1
1881
1909
  })
1882
1910
  ]),
1883
- default: d(() => [
1884
- o(W, {
1885
- modelValue: K.value,
1886
- "onUpdate:modelValue": f[5] || (f[5] = (w) => K.value = w),
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(F, {
1895
- modelValue: Z.value,
1896
- "onUpdate:modelValue": f[10] || (f[10] = (w) => Z.value = w),
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: d(() => [
1901
- o(q, {
1902
- onClick: f[9] || (f[9] = (w) => Z.value = !1)
1928
+ footer: i(() => [
1929
+ o(T, {
1930
+ onClick: g[9] || (g[9] = (_) => L.value = !1)
1903
1931
  }, {
1904
- default: d(() => [...f[19] || (f[19] = [
1905
- S(" 取消 ", -1)
1932
+ default: i(() => [...g[19] || (g[19] = [
1933
+ z(" 取消 ", -1)
1906
1934
  ])]),
1907
1935
  _: 1
1908
1936
  }),
1909
- o(q, {
1937
+ o(T, {
1910
1938
  type: "primary",
1911
- onClick: x
1939
+ onClick: se
1912
1940
  }, {
1913
- default: d(() => [...f[20] || (f[20] = [
1914
- S(" 确定 ", -1)
1941
+ default: i(() => [...g[20] || (g[20] = [
1942
+ z(" 确定 ", -1)
1915
1943
  ])]),
1916
1944
  _: 1
1917
1945
  })
1918
1946
  ]),
1919
- default: d(() => [
1920
- o(ae, {
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
- f[21] || (f[21] = b("div", { style: { height: "10px" } }, null, -1)),
1927
- o(W, {
1928
- modelValue: j.value,
1929
- "onUpdate:modelValue": f[8] || (f[8] = (w) => j.value = w),
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__ */ ce(eo, [["__scopeId", "data-v-2e5f57e6"]]), to = { class: "wrap" }, oo = {
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" }, io = {
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
- }, ro = { class: "options-list" }, so = { class: "options" }, po = /* @__PURE__ */ P({
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: c, updateTabs: h, updateCollapse: g } = ye(), u = N(() => {
1950
- const s = t.selectedNodeId.value;
1951
- if (!s) return null;
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 H = n.shift();
1955
- if (H.id === s) return H;
1956
- if (H.type === "flexRow")
1957
- for (const R of H.columns) n.push(...R.children);
1958
- else if (H.type === "collapse")
1959
- for (const R of H.items) n.push(...R.children);
1960
- else if (H.type === "tabs")
1961
- for (const R of H.tabs) n.push(...R.children);
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
- }), y = z(2), I = z(12), O = z(!1), k = z([]), M = z("card"), D = z([]), J = z(!0), K = z(10), Z = z(!0), j = z([]), te = z(""), Q = z(""), re = z(""), x = z(!1), i = z([]), f = z(!1), _ = z("text"), T = z("开启"), q = z("关闭"), de = N(() => {
1965
- var s, n, H;
1966
- return ((s = u.value) == null ? void 0 : s.type) === "select" || ((n = u.value) == null ? void 0 : n.type) === "radio" || ((H = u.value) == null ? void 0 : H.type) === "checkbox";
1967
- }), F = N(() => {
1968
- var s;
1969
- return ((s = u.value) == null ? void 0 : s.type) === "input";
1970
- }), W = N(() => {
1971
- var s;
1972
- return ((s = u.value) == null ? void 0 : s.type) === "select";
1973
- }), ae = N(() => {
1974
- var s;
1975
- return ((s = u.value) == null ? void 0 : s.type) === "switch";
1976
- }), w = z(!1);
1977
- Y(
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
- (s) => {
1980
- if (s) {
1981
- if (w.value = !0, s.type === "flexRow")
1982
- y.value = s.props.cols, I.value = s.props.gap ?? 12;
1983
- else if (s.type === "collapse")
1984
- O.value = s.props.accordion, k.value = s.items.map((n) => ({ id: n.id, title: n.title, name: n.name }));
1985
- else if (s.type === "tabs")
1986
- M.value = s.props.type, D.value = s.tabs.map((n) => ({ id: n.id, label: n.label }));
1987
- else if (s.type === "table") {
1988
- te.value = s.props.field, Q.value = s.props.label, J.value = s.props.pagination, K.value = s.props.pageSize ?? 10, Z.value = s.props.enableExcelImport;
1989
- const n = (s.props.columns ?? []).map((H) => ({ ...H }));
1990
- JSON.stringify(n) !== JSON.stringify(j.value) && (j.value = n);
1991
- } else if (s.type === "title")
1992
- Q.value = s.props.label;
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 = s;
1995
- te.value = n.props.field, Q.value = n.props.label, re.value = n.props.placeholder ?? "", x.value = !!n.props.required, s.type === "switch" && (T.value = n.props.activeText ?? "开启", q.value = n.props.inactiveText ?? "关闭");
1996
- const H = (n.props.options ?? []).map((R) => ({ ...R }));
1997
- JSON.stringify(H) !== JSON.stringify(i.value) && (i.value = H), f.value = !!n.props.multiple, _.value = n.props.inputType ?? "text";
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
- w.value = !1;
2028
+ _.value = !1;
2001
2029
  }, 0);
2002
2030
  }
2003
2031
  },
2004
2032
  { immediate: !0 }
2005
- ), Y(y, (s) => {
2033
+ ), q(b, (p) => {
2006
2034
  var n;
2007
- w.value || ((n = u.value) == null ? void 0 : n.type) === "flexRow" && c(u.value.id, s);
2008
- }), Y(I, (s) => {
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
- w.value || ((n = u.value) == null ? void 0 : n.type) === "flexRow" && r(u.value.id, { gap: s });
2011
- }), Y(O, (s) => {
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
- w.value || ((n = u.value) == null ? void 0 : n.type) === "collapse" && g(u.value.id, { accordion: s });
2014
- }), Y(
2041
+ _.value || ((n = u.value) == null ? void 0 : n.type) === "collapse" && V(u.value.id, { accordion: p });
2042
+ }), q(
2015
2043
  () => k.value,
2016
- (s) => {
2044
+ (p) => {
2017
2045
  var n;
2018
- w.value || ((n = u.value) == null ? void 0 : n.type) === "collapse" && g(u.value.id, { items: s.map((H) => ({ id: H.id, title: H.title, name: H.name })) });
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
- ), Y(M, (s) => {
2049
+ ), q(C, (p) => {
2022
2050
  var n;
2023
- w.value || ((n = u.value) == null ? void 0 : n.type) === "tabs" && h(u.value.id, { type: s });
2024
- }), Y(
2025
- () => D.value,
2026
- (s) => {
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
- w.value || ((n = u.value) == null ? void 0 : n.type) === "tabs" && h(u.value.id, { tabs: s.map((H) => ({ id: H.id, label: H.label })) });
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
- ), Y(te, (s) => {
2032
- w.value || !u.value || u.value.type === "flexRow" || u.value.type === "collapse" || u.value.type === "tabs" || r(u.value.id, { field: s });
2033
- }), Y(Q, (s) => {
2034
- w.value || !u.value || u.value.type === "flexRow" || u.value.type === "collapse" || u.value.type === "tabs" || r(u.value.id, { label: s });
2035
- }), Y(re, (s) => {
2036
- w.value || !u.value || u.value.type === "flexRow" || u.value.type === "collapse" || u.value.type === "tabs" || r(u.value.id, { placeholder: s });
2037
- }), Y(x, (s) => {
2038
- w.value || !u.value || u.value.type === "flexRow" || u.value.type === "collapse" || u.value.type === "tabs" || r(u.value.id, { required: s });
2039
- }), Y(f, (s) => {
2040
- w.value || !u.value || u.value.type !== "select" || r(u.value.id, { multiple: s });
2041
- }), Y(_, (s) => {
2042
- w.value || !u.value || u.value.type !== "input" || r(u.value.id, { inputType: s });
2043
- }), Y(T, (s) => {
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
- w.value || ((n = u.value) == null ? void 0 : n.type) === "switch" && r(u.value.id, { activeText: s });
2046
- }), Y(q, (s) => {
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
- w.value || ((n = u.value) == null ? void 0 : n.type) === "switch" && r(u.value.id, { inactiveText: s });
2049
- }), Y(J, (s) => {
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
- w.value || ((n = u.value) == null ? void 0 : n.type) === "table" && r(u.value.id, { pagination: s });
2052
- }), Y(K, (s) => {
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
- w.value || ((n = u.value) == null ? void 0 : n.type) === "table" && r(u.value.id, { pageSize: s });
2055
- }), Y(Z, (s) => {
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
- w.value || ((n = u.value) == null ? void 0 : n.type) === "table" && r(u.value.id, { enableExcelImport: s });
2058
- }), Y(
2059
- () => j.value,
2060
- (s) => {
2061
- var H;
2062
- if (w.value || ((H = u.value) == null ? void 0 : H.type) !== "table") return;
2063
- const n = s.map((R) => {
2064
- const p = { ...R };
2065
- return p.options && (p.options = p.options.map((U) => ({ ...U }))), p;
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
- ), Y(
2071
- () => i.value,
2072
- (s) => {
2073
- w.value || !u.value || u.value.type === "flexRow" || u.value.type === "collapse" || u.value.type === "tabs" || r(u.value.id, { options: s.map((n) => ({ ...n })) });
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 we() {
2078
- i.value.push({ label: "新选项", value: B("opt") });
2105
+ function ue() {
2106
+ U.value.push({ label: "新选项", value: j("opt") });
2079
2107
  }
2080
- function ue(s) {
2081
- i.value.splice(s, 1);
2108
+ function pe(p) {
2109
+ U.value.splice(p, 1);
2082
2110
  }
2083
- function ze() {
2084
- k.value.push({ id: B("item"), title: `面板 ${k.value.length + 1}`, name: B("val") });
2111
+ function be() {
2112
+ k.value.push({ id: j("item"), title: `面板 ${k.value.length + 1}`, name: j("val") });
2085
2113
  }
2086
- function Ce(s) {
2087
- k.value = k.value.filter((n) => n.id !== s);
2114
+ function ke(p) {
2115
+ k.value = k.value.filter((n) => n.id !== p);
2088
2116
  }
2089
- function De() {
2090
- D.value.push({ id: B("tab"), label: `标签页 ${D.value.length + 1}` });
2117
+ function re() {
2118
+ N.value.push({ id: j("tab"), label: `标签页 ${N.value.length + 1}` });
2091
2119
  }
2092
- function Re(s) {
2093
- D.value = D.value.filter((n) => n.id !== s);
2120
+ function $e(p) {
2121
+ N.value = N.value.filter((n) => n.id !== p);
2094
2122
  }
2095
- function Oe() {
2096
- const s = j.value.length + 1;
2097
- j.value.push({ id: B("col"), label: `列${s}`, prop: `col${s}`, type: "text" });
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 Ae(s) {
2100
- j.value.splice(s, 1);
2127
+ function Ne(p) {
2128
+ X.value.splice(p, 1);
2101
2129
  }
2102
- function Te(s) {
2103
- s.options || (s.options = []), s.options.push({ label: "新选项", value: B("opt") });
2130
+ function Ae(p) {
2131
+ p.options || (p.options = []), p.options.push({ label: "新选项", value: j("opt") });
2104
2132
  }
2105
- function Pe(s, n) {
2106
- s.options && s.options.splice(n, 1);
2133
+ function Ee(p, n) {
2134
+ p.options && p.options.splice(n, 1);
2107
2135
  }
2108
- return (s, n) => {
2109
- const H = V("el-empty"), R = V("el-option"), p = V("el-select"), U = V("el-form-item"), L = V("el-input-number"), xe = V("el-form"), me = V("el-switch"), oe = V("el-input"), se = V("el-button"), nl = V("el-collapse-item"), al = V("el-collapse");
2110
- return a(), m("div", to, [
2111
- n[32] || (n[32] = b("div", { class: "title" }, " 属性 ", -1)),
2112
- u.value ? (a(), m("div", oo, [
2113
- u.value.type === "flexRow" ? (a(), C(xe, {
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: d(() => [
2118
- o(U, { label: "列数" }, {
2119
- default: d(() => [
2120
- o(p, {
2121
- modelValue: y.value,
2122
- "onUpdate:modelValue": n[0] || (n[0] = (v) => y.value = 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: d(() => [
2126
- o(R, {
2153
+ default: i(() => [
2154
+ o(H, {
2127
2155
  value: 1,
2128
2156
  label: "1"
2129
2157
  }),
2130
- o(R, {
2158
+ o(H, {
2131
2159
  value: 2,
2132
2160
  label: "2"
2133
2161
  }),
2134
- o(R, {
2162
+ o(H, {
2135
2163
  value: 3,
2136
2164
  label: "3"
2137
2165
  }),
2138
- o(R, {
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(U, { label: "间距" }, {
2149
- default: d(() => [
2150
- o(L, {
2151
- modelValue: I.value,
2152
- "onUpdate:modelValue": n[1] || (n[1] = (v) => I.value = 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(), m($, { key: 1 }, [
2162
- o(xe, { "label-width": "92px" }, {
2163
- default: d(() => [
2164
- o(U, { label: "手风琴" }, {
2165
- default: d(() => [
2166
- o(me, {
2167
- modelValue: O.value,
2168
- "onUpdate:modelValue": n[2] || (n[2] = (v) => O.value = 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] = b("div", { class: "subTitle" }, " 面板 ", -1)),
2177
- b("div", no, [
2178
- (a(!0), m($, null, E(k.value, (v) => (a(), m("div", {
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(oe, {
2210
+ o(S, {
2183
2211
  modelValue: v.title,
2184
- "onUpdate:modelValue": (pe) => v.title = pe
2212
+ "onUpdate:modelValue": (fe) => v.title = fe
2185
2213
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
2186
- o(se, {
2214
+ o(me, {
2187
2215
  disabled: k.value.length <= 1,
2188
2216
  type: "danger",
2189
- onClick: (pe) => Ce(v.id)
2217
+ onClick: (fe) => ke(v.id)
2190
2218
  }, {
2191
- default: d(() => [...n[17] || (n[17] = [
2192
- S(" 删除 ", -1)
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(se, { onClick: ze }, {
2198
- default: d(() => [...n[18] || (n[18] = [
2199
- S(" 新增面板 ", -1)
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(), m($, { key: 2 }, [
2205
- o(xe, { "label-width": "92px" }, {
2206
- default: d(() => [
2207
- o(U, { label: "样式" }, {
2208
- default: d(() => [
2209
- o(p, {
2210
- modelValue: M.value,
2211
- "onUpdate:modelValue": n[3] || (n[3] = (v) => M.value = 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: d(() => [
2215
- o(R, {
2242
+ default: i(() => [
2243
+ o(H, {
2216
2244
  value: "card",
2217
2245
  label: "card"
2218
2246
  }),
2219
- o(R, {
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] = b("div", { class: "subTitle" }, " 标签 ", -1)),
2233
- b("div", ao, [
2234
- (a(!0), m($, null, E(D.value, (v) => (a(), m("div", {
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(oe, {
2266
+ o(S, {
2239
2267
  modelValue: v.label,
2240
- "onUpdate:modelValue": (pe) => v.label = pe
2268
+ "onUpdate:modelValue": (fe) => v.label = fe
2241
2269
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
2242
- o(se, {
2243
- disabled: D.value.length <= 1,
2270
+ o(me, {
2271
+ disabled: N.value.length <= 1,
2244
2272
  type: "danger",
2245
- onClick: (pe) => Re(v.id)
2273
+ onClick: (fe) => $e(v.id)
2246
2274
  }, {
2247
- default: d(() => [...n[20] || (n[20] = [
2248
- S(" 删除 ", -1)
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(se, { onClick: De }, {
2254
- default: d(() => [...n[21] || (n[21] = [
2255
- S(" 新增标签页 ", -1)
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(), m($, { key: 3 }, [
2261
- o(xe, { "label-width": "92px" }, {
2262
- default: d(() => [
2263
- o(U, { label: "字段名" }, {
2264
- default: d(() => [
2265
- o(oe, {
2266
- modelValue: te.value,
2267
- "onUpdate:modelValue": n[4] || (n[4] = (v) => te.value = 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(U, { label: "标题" }, {
2273
- default: d(() => [
2274
- o(oe, {
2275
- modelValue: Q.value,
2276
- "onUpdate:modelValue": n[5] || (n[5] = (v) => Q.value = 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(U, { label: "分页" }, {
2282
- default: d(() => [
2283
- o(me, {
2284
- modelValue: J.value,
2285
- "onUpdate:modelValue": n[6] || (n[6] = (v) => J.value = 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
- J.value ? (a(), C(U, {
2318
+ F.value ? (a(), x(A, {
2291
2319
  key: 0,
2292
2320
  label: "每页条数"
2293
2321
  }, {
2294
- default: d(() => [
2295
- o(L, {
2296
- modelValue: K.value,
2297
- "onUpdate:modelValue": n[7] || (n[7] = (v) => K.value = 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
- })) : G("", !0),
2303
- o(U, { label: "Excel导入" }, {
2304
- default: d(() => [
2305
- o(me, {
2306
- modelValue: Z.value,
2307
- "onUpdate:modelValue": n[8] || (n[8] = (v) => Z.value = 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] = b("div", { class: "subTitle" }, " 列配置 ", -1)),
2316
- b("div", uo, [
2317
- j.value.length > 0 ? (a(), C(al, { key: 0 }, {
2318
- default: d(() => [
2319
- (a(!0), m($, null, E(j.value, (v, pe) => (a(), C(nl, {
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: d(() => [
2324
- b("div", io, [
2325
- b("span", null, ee(v.label || "未命名列") + " (" + ee(v.prop) + ")", 1),
2326
- o(se, {
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: Le((A) => Ae(pe), ["stop"])
2358
+ onClick: Ye((P) => Ne(fe), ["stop"])
2331
2359
  }, {
2332
- default: d(() => [...n[23] || (n[23] = [
2333
- S("删除", -1)
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: d(() => [
2340
- o(xe, {
2367
+ default: i(() => [
2368
+ o(c, {
2341
2369
  "label-width": "80px",
2342
2370
  size: "small"
2343
2371
  }, {
2344
- default: d(() => [
2345
- o(U, { label: "标题" }, {
2346
- default: d(() => [
2347
- o(oe, {
2372
+ default: i(() => [
2373
+ o(A, { label: "标题" }, {
2374
+ default: i(() => [
2375
+ o(S, {
2348
2376
  modelValue: v.label,
2349
- "onUpdate:modelValue": (A) => v.label = A
2377
+ "onUpdate:modelValue": (P) => v.label = P
2350
2378
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
2351
2379
  ]),
2352
2380
  _: 2
2353
2381
  }, 1024),
2354
- o(U, { label: "字段名" }, {
2355
- default: d(() => [
2356
- o(oe, {
2382
+ o(A, { label: "字段名" }, {
2383
+ default: i(() => [
2384
+ o(S, {
2357
2385
  modelValue: v.prop,
2358
- "onUpdate:modelValue": (A) => v.prop = A
2386
+ "onUpdate:modelValue": (P) => v.prop = P
2359
2387
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
2360
2388
  ]),
2361
2389
  _: 2
2362
2390
  }, 1024),
2363
- o(U, { label: "类型" }, {
2364
- default: d(() => [
2365
- o(p, {
2391
+ o(A, { label: "类型" }, {
2392
+ default: i(() => [
2393
+ o(ce, {
2366
2394
  modelValue: v.type,
2367
- "onUpdate:modelValue": (A) => v.type = A,
2395
+ "onUpdate:modelValue": (P) => v.type = P,
2368
2396
  style: { width: "100%" }
2369
2397
  }, {
2370
- default: d(() => [
2371
- o(R, {
2398
+ default: i(() => [
2399
+ o(H, {
2372
2400
  label: "文本",
2373
2401
  value: "text"
2374
2402
  }),
2375
- o(R, {
2403
+ o(H, {
2376
2404
  label: "数字",
2377
2405
  value: "number"
2378
2406
  }),
2379
- o(R, {
2407
+ o(H, {
2380
2408
  label: "下拉",
2381
2409
  value: "select"
2382
2410
  }),
2383
- o(R, {
2411
+ o(H, {
2384
2412
  label: "日期",
2385
2413
  value: "date"
2386
2414
  }),
2387
- o(R, {
2415
+ o(H, {
2388
2416
  label: "时间",
2389
2417
  value: "time"
2390
2418
  }),
2391
- o(R, {
2419
+ o(H, {
2392
2420
  label: "日期时间",
2393
2421
  value: "datetime"
2394
2422
  }),
2395
- o(R, {
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(U, { label: "宽度" }, {
2406
- default: d(() => [
2407
- o(L, {
2433
+ o(A, { label: "宽度" }, {
2434
+ default: i(() => [
2435
+ o(ze, {
2408
2436
  modelValue: v.width,
2409
- "onUpdate:modelValue": (A) => v.width = A,
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(U, { label: "必填" }, {
2418
- default: d(() => [
2419
- o(me, {
2445
+ o(A, { label: "必填" }, {
2446
+ default: i(() => [
2447
+ o(O, {
2420
2448
  modelValue: v.required,
2421
- "onUpdate:modelValue": (A) => v.required = A
2449
+ "onUpdate:modelValue": (P) => v.required = P
2422
2450
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
2423
2451
  ]),
2424
2452
  _: 2
2425
2453
  }, 1024),
2426
- o(U, { label: "排序" }, {
2427
- default: d(() => [
2428
- o(me, {
2454
+ o(A, { label: "排序" }, {
2455
+ default: i(() => [
2456
+ o(O, {
2429
2457
  modelValue: v.sortable,
2430
- "onUpdate:modelValue": (A) => v.sortable = A
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(), m($, { key: 0 }, [
2436
- o(U, { label: "多选" }, {
2437
- default: d(() => [
2438
- o(me, {
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": (A) => v.multiple = A
2468
+ "onUpdate:modelValue": (P) => v.multiple = P
2441
2469
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
2442
2470
  ]),
2443
2471
  _: 2
2444
2472
  }, 1024),
2445
- o(U, { label: "可搜索" }, {
2446
- default: d(() => [
2447
- o(me, {
2473
+ o(A, { label: "可搜索" }, {
2474
+ default: i(() => [
2475
+ o(O, {
2448
2476
  modelValue: v.filterable,
2449
- "onUpdate:modelValue": (A) => v.filterable = A
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] = b("div", {
2482
+ n[26] || (n[26] = y("div", {
2455
2483
  class: "subTitle",
2456
2484
  style: { "font-size": "12px", "margin-left": "10px" }
2457
2485
  }, "选项配置", -1)),
2458
- b("div", ro, [
2459
- (a(!0), m($, null, E(v.options || [], (A, qe) => (a(), m("div", {
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(oe, {
2464
- modelValue: A.label,
2465
- "onUpdate:modelValue": (Se) => A.label = Se,
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(oe, {
2470
- modelValue: A.value,
2471
- "onUpdate:modelValue": (Se) => A.value = Se,
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(se, {
2503
+ o(me, {
2476
2504
  type: "danger",
2477
2505
  size: "small",
2478
- onClick: (Se) => Pe(v, qe)
2506
+ onClick: (Me) => Ee(v, qe)
2479
2507
  }, {
2480
- default: d(() => [...n[24] || (n[24] = [
2481
- S("删除", -1)
2508
+ default: i(() => [...n[24] || (n[24] = [
2509
+ z("删除", -1)
2482
2510
  ])]),
2483
2511
  _: 1
2484
2512
  }, 8, ["onClick"])
2485
2513
  ]))), 128)),
2486
- o(se, {
2514
+ o(me, {
2487
2515
  size: "small",
2488
2516
  style: { width: "100%" },
2489
- onClick: (A) => Te(v)
2517
+ onClick: (P) => Ae(v)
2490
2518
  }, {
2491
- default: d(() => [...n[25] || (n[25] = [
2492
- S("添加选项", -1)
2519
+ default: i(() => [...n[25] || (n[25] = [
2520
+ z("添加选项", -1)
2493
2521
  ])]),
2494
2522
  _: 1
2495
2523
  }, 8, ["onClick"])
2496
2524
  ])
2497
- ], 64)) : G("", !0)
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(), C(H, {
2534
+ })) : (a(), x(R, {
2507
2535
  key: 1,
2508
2536
  description: "暂无列配置",
2509
2537
  "image-size": 60
2510
2538
  })),
2511
- o(se, {
2539
+ o(me, {
2512
2540
  type: "primary",
2513
2541
  plain: "",
2514
2542
  style: { width: "100%", "margin-top": "10px" },
2515
- onClick: Oe
2543
+ onClick: Ie
2516
2544
  }, {
2517
- default: d(() => [...n[27] || (n[27] = [
2518
- S(" 新增列 ", -1)
2545
+ default: i(() => [...n[27] || (n[27] = [
2546
+ z(" 新增列 ", -1)
2519
2547
  ])]),
2520
2548
  _: 1
2521
2549
  })
2522
2550
  ])
2523
- ], 64)) : (a(), m($, { key: 4 }, [
2524
- o(xe, { "label-width": "92px" }, {
2525
- default: d(() => [
2526
- o(U, { label: "标签" }, {
2527
- default: d(() => [
2528
- o(oe, {
2529
- modelValue: Q.value,
2530
- "onUpdate:modelValue": n[9] || (n[9] = (v) => Q.value = 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) ? G("", !0) : (a(), C(U, {
2563
+ ["title"].includes(u.value.type) ? Q("", !0) : (a(), x(A, {
2536
2564
  key: 0,
2537
2565
  label: "字段名"
2538
2566
  }, {
2539
- default: d(() => [
2540
- o(oe, {
2541
- modelValue: te.value,
2542
- "onUpdate:modelValue": n[10] || (n[10] = (v) => te.value = 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(), C(U, {
2575
+ ["input", "textarea", "select"].includes(u.value.type) ? (a(), x(A, {
2548
2576
  key: 1,
2549
2577
  label: "占位符"
2550
2578
  }, {
2551
- default: d(() => [
2552
- o(oe, {
2553
- modelValue: re.value,
2554
- "onUpdate:modelValue": n[11] || (n[11] = (v) => re.value = 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
- })) : G("", !0),
2559
- ["switch", "title"].includes(u.value.type) ? G("", !0) : (a(), C(U, {
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: d(() => [
2564
- o(me, {
2565
- modelValue: x.value,
2566
- "onUpdate:modelValue": n[12] || (n[12] = (v) => x.value = 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
- W.value ? (a(), C(U, {
2599
+ Y.value ? (a(), x(A, {
2572
2600
  key: 3,
2573
2601
  label: "多选"
2574
2602
  }, {
2575
- default: d(() => [
2576
- o(me, {
2577
- modelValue: f.value,
2578
- "onUpdate:modelValue": n[13] || (n[13] = (v) => f.value = 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
- })) : G("", !0),
2583
- F.value ? (a(), C(U, {
2610
+ })) : Q("", !0),
2611
+ G.value ? (a(), x(A, {
2584
2612
  key: 4,
2585
2613
  label: "类型"
2586
2614
  }, {
2587
- default: d(() => [
2588
- o(p, {
2589
- modelValue: _.value,
2590
- "onUpdate:modelValue": n[14] || (n[14] = (v) => _.value = 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: d(() => [
2593
- o(R, {
2620
+ default: i(() => [
2621
+ o(H, {
2594
2622
  label: "文本",
2595
2623
  value: "text"
2596
2624
  }),
2597
- o(R, {
2625
+ o(H, {
2598
2626
  label: "数字",
2599
2627
  value: "number"
2600
2628
  }),
2601
- o(R, {
2629
+ o(H, {
2602
2630
  label: "日期",
2603
2631
  value: "date"
2604
2632
  }),
2605
- o(R, {
2633
+ o(H, {
2606
2634
  label: "时间",
2607
2635
  value: "time"
2608
2636
  }),
2609
- o(R, {
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
- })) : G("", !0),
2619
- ae.value ? (a(), m($, { key: 5 }, [
2620
- o(U, { label: "开启文案" }, {
2621
- default: d(() => [
2622
- o(oe, {
2623
- modelValue: T.value,
2624
- "onUpdate:modelValue": n[15] || (n[15] = (v) => T.value = 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(U, { label: "关闭文案" }, {
2630
- default: d(() => [
2631
- o(oe, {
2632
- modelValue: q.value,
2633
- "onUpdate:modelValue": n[16] || (n[16] = (v) => q.value = 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)) : G("", !0)
2666
+ ], 64)) : Q("", !0)
2639
2667
  ]),
2640
2668
  _: 1
2641
2669
  }),
2642
- de.value ? (a(), m($, { key: 0 }, [
2643
- n[31] || (n[31] = b("div", { class: "subTitle" }, " 选项 ", -1)),
2644
- b("div", so, [
2645
- (a(!0), m($, null, E(i.value, (v, pe) => (a(), m("div", {
2646
- key: pe,
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(oe, {
2677
+ o(S, {
2650
2678
  modelValue: v.label,
2651
- "onUpdate:modelValue": (A) => v.label = A,
2679
+ "onUpdate:modelValue": (P) => v.label = P,
2652
2680
  placeholder: "label"
2653
2681
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
2654
- o(oe, {
2682
+ o(S, {
2655
2683
  modelValue: v.value,
2656
- "onUpdate:modelValue": (A) => v.value = A,
2684
+ "onUpdate:modelValue": (P) => v.value = P,
2657
2685
  placeholder: "value"
2658
2686
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
2659
- o(se, {
2687
+ o(me, {
2660
2688
  type: "danger",
2661
- onClick: (A) => ue(pe)
2689
+ onClick: (P) => pe(fe)
2662
2690
  }, {
2663
- default: d(() => [...n[29] || (n[29] = [
2664
- S(" 删除 ", -1)
2691
+ default: i(() => [...n[29] || (n[29] = [
2692
+ z(" 删除 ", -1)
2665
2693
  ])]),
2666
2694
  _: 1
2667
2695
  }, 8, ["onClick"])
2668
2696
  ]))), 128)),
2669
- o(se, { onClick: we }, {
2670
- default: d(() => [...n[30] || (n[30] = [
2671
- S(" 新增选项 ", -1)
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)) : G("", !0)
2704
+ ], 64)) : Q("", !0)
2677
2705
  ], 64))
2678
- ])) : (a(), C(H, {
2706
+ ])) : (a(), x(R, {
2679
2707
  key: 0,
2680
2708
  description: "请选择一个组件"
2681
2709
  }))
2682
2710
  ]);
2683
2711
  };
2684
2712
  }
2685
- }), co = /* @__PURE__ */ ce(po, [["__scopeId", "data-v-fbaf4bac"]]), mo = { class: "designer" }, fo = { class: "palette" }, vo = { class: "main" }, bo = { class: "toolbar" }, yo = { class: "body" }, go = { class: "canvas" }, _o = { class: "props" }, Vo = /* @__PURE__ */ P({
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: c, removeSelected: h, bindHotkeys: g } = ye(), u = z(!1), y = z(!1), I = z(!1);
2689
- z(!1);
2690
- const O = z(""), k = z("");
2691
- z("");
2692
- const M = N(() => r.selectedNodeId.value), D = N(() => l.canUndo.value), J = N(() => l.canRedo.value);
2693
- function K() {
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 Z() {
2729
+ function L() {
2697
2730
  l.redo();
2698
2731
  }
2699
- function j() {
2732
+ function X() {
2700
2733
  u.value = !0;
2701
2734
  }
2702
- function te() {
2703
- O.value = JSON.stringify(vl(t.value), null, 2), y.value = !0;
2735
+ function ne() {
2736
+ E.value = JSON.stringify(vl(t.value), null, 2), b.value = !0;
2704
2737
  }
2705
- function Q() {
2706
- navigator.clipboard.writeText(O.value).then(() => {
2707
- be.success("已复制");
2738
+ function ee() {
2739
+ navigator.clipboard.writeText(E.value).then(() => {
2740
+ ge.success("已复制");
2708
2741
  });
2709
2742
  }
2710
- function re() {
2711
- k.value = "", I.value = !0;
2743
+ function de() {
2744
+ k.value = "", M.value = !0;
2712
2745
  }
2713
- function x() {
2746
+ function se() {
2714
2747
  try {
2715
- const f = JSON.parse(k.value);
2716
- c(f), I.value = !1, be.success("已导入布局");
2748
+ const g = JSON.parse(k.value);
2749
+ m(g), M.value = !1, ge.success("已导入布局");
2717
2750
  } catch {
2718
- be.error("JSON 解析失败");
2751
+ ge.error("JSON 解析失败");
2719
2752
  }
2720
2753
  }
2721
- function i() {
2722
- M.value && h();
2754
+ function U() {
2755
+ C.value && h();
2723
2756
  }
2724
- return Ke(() => {
2725
- g();
2726
- }), (f, _) => {
2727
- const T = V("el-button"), q = V("el-button-group"), de = V("el-divider"), F = V("el-input"), W = V("el-dialog"), ae = V("el-alert");
2728
- return a(), m("div", mo, [
2729
- b("div", fo, [
2730
- o(Yt)
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
- b("div", vo, [
2733
- b("div", bo, [
2734
- o(q, null, {
2735
- default: d(() => [
2736
- o(T, {
2737
- disabled: !D.value,
2738
- onClick: K
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: d(() => [..._[7] || (_[7] = [
2741
- S(" 撤销 ", -1)
2773
+ default: i(() => [...d[7] || (d[7] = [
2774
+ z(" 撤销 ", -1)
2742
2775
  ])]),
2743
2776
  _: 1
2744
2777
  }, 8, ["disabled"]),
2745
- o(T, {
2746
- disabled: !J.value,
2747
- onClick: Z
2778
+ o(s, {
2779
+ disabled: !F.value,
2780
+ onClick: L
2748
2781
  }, {
2749
- default: d(() => [..._[8] || (_[8] = [
2750
- S(" 重做 ", -1)
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(de, { direction: "vertical" }),
2758
- o(T, { onClick: re }, {
2759
- default: d(() => [..._[9] || (_[9] = [
2760
- S(" 导入布局 ", -1)
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(T, { onClick: te }, {
2765
- default: d(() => [..._[10] || (_[10] = [
2766
- S(" 导出布局 ", -1)
2797
+ o(s, { onClick: ne }, {
2798
+ default: i(() => [...d[10] || (d[10] = [
2799
+ z(" 导出布局 ", -1)
2767
2800
  ])]),
2768
2801
  _: 1
2769
2802
  }),
2770
- o(T, {
2803
+ o(s, {
2771
2804
  type: "primary",
2772
- onClick: j
2805
+ onClick: X
2773
2806
  }, {
2774
- default: d(() => [..._[11] || (_[11] = [
2775
- S(" 预览 ", -1)
2807
+ default: i(() => [...d[11] || (d[11] = [
2808
+ z(" 预览 ", -1)
2776
2809
  ])]),
2777
2810
  _: 1
2778
2811
  }),
2779
- _[13] || (_[13] = b("div", { class: "spacer" }, null, -1)),
2780
- o(T, {
2781
- disabled: !M.value,
2812
+ d[13] || (d[13] = y("div", { class: "spacer" }, null, -1)),
2813
+ o(s, {
2814
+ disabled: !C.value,
2782
2815
  type: "danger",
2783
- onClick: i
2816
+ onClick: U
2784
2817
  }, {
2785
- default: d(() => [..._[12] || (_[12] = [
2786
- S(" 删除组件 ", -1)
2818
+ default: i(() => [...d[12] || (d[12] = [
2819
+ z(" 删除组件 ", -1)
2787
2820
  ])]),
2788
2821
  _: 1
2789
2822
  }, 8, ["disabled"])
2790
2823
  ]),
2791
- b("div", yo, [
2792
- b("div", go, [
2824
+ y("div", yo, [
2825
+ y("div", _o, [
2793
2826
  o(at)
2794
2827
  ]),
2795
- b("div", _o, [
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": _[0] || (_[0] = (w) => u.value = w)
2835
+ "onUpdate:modelValue": d[0] || (d[0] = (_) => u.value = _)
2803
2836
  }, null, 8, ["modelValue"]),
2804
- o(W, {
2805
- modelValue: y.value,
2806
- "onUpdate:modelValue": _[3] || (_[3] = (w) => y.value = w),
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: d(() => [
2811
- o(T, {
2812
- onClick: _[2] || (_[2] = (w) => y.value = !1)
2843
+ footer: i(() => [
2844
+ o(s, {
2845
+ onClick: d[2] || (d[2] = (_) => b.value = !1)
2813
2846
  }, {
2814
- default: d(() => [..._[14] || (_[14] = [
2815
- S(" 关闭 ", -1)
2847
+ default: i(() => [...d[14] || (d[14] = [
2848
+ z(" 关闭 ", -1)
2816
2849
  ])]),
2817
2850
  _: 1
2818
2851
  }),
2819
- o(T, {
2852
+ o(s, {
2820
2853
  type: "primary",
2821
- onClick: Q
2854
+ onClick: ee
2822
2855
  }, {
2823
- default: d(() => [..._[15] || (_[15] = [
2824
- S(" 复制 ", -1)
2856
+ default: i(() => [...d[15] || (d[15] = [
2857
+ z(" 复制 ", -1)
2825
2858
  ])]),
2826
2859
  _: 1
2827
2860
  })
2828
2861
  ]),
2829
- default: d(() => [
2830
- o(F, {
2831
- modelValue: O.value,
2832
- "onUpdate:modelValue": _[1] || (_[1] = (w) => O.value = w),
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(W, {
2841
- modelValue: I.value,
2842
- "onUpdate:modelValue": _[6] || (_[6] = (w) => I.value = w),
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: d(() => [
2847
- o(T, {
2848
- onClick: _[5] || (_[5] = (w) => I.value = !1)
2879
+ footer: i(() => [
2880
+ o(s, {
2881
+ onClick: d[5] || (d[5] = (_) => M.value = !1)
2849
2882
  }, {
2850
- default: d(() => [..._[16] || (_[16] = [
2851
- S(" 取消 ", -1)
2883
+ default: i(() => [...d[16] || (d[16] = [
2884
+ z(" 取消 ", -1)
2852
2885
  ])]),
2853
2886
  _: 1
2854
2887
  }),
2855
- o(T, {
2888
+ o(s, {
2856
2889
  type: "primary",
2857
- onClick: x
2890
+ onClick: se
2858
2891
  }, {
2859
- default: d(() => [..._[17] || (_[17] = [
2860
- S(" 确定 ", -1)
2892
+ default: i(() => [...d[17] || (d[17] = [
2893
+ z(" 确定 ", -1)
2861
2894
  ])]),
2862
2895
  _: 1
2863
2896
  })
2864
2897
  ]),
2865
- default: d(() => [
2866
- o(ae, {
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
- _[18] || (_[18] = b("div", { style: { height: "10px" } }, null, -1)),
2873
- o(F, {
2905
+ d[18] || (d[18] = y("div", { style: { height: "10px" } }, null, -1)),
2906
+ o(G, {
2874
2907
  modelValue: k.value,
2875
- "onUpdate:modelValue": _[4] || (_[4] = (w) => k.value = w),
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
- }), ho = /* @__PURE__ */ ce(Vo, [["__scopeId", "data-v-aed585f1"]]);
2919
+ }), xo = /* @__PURE__ */ ve(Vo, [["__scopeId", "data-v-02e9bc29"]]);
2887
2920
  export {
2888
- ho as FormDesigner,
2921
+ xo as FormDesigner,
2889
2922
  Gt as FormRenderer
2890
2923
  };