@cluadwong/form-designer 0.2.0 → 0.3.0

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.
Files changed (32) hide show
  1. package/dist/chunks/designer-ui.js +1383 -1302
  2. package/dist/chunks/renderer-core.js +1104 -1046
  3. package/dist/components/designer/FormDesigner.vue.d.ts.map +1 -1
  4. package/dist/components/designer/HelpPanel.vue.d.ts.map +1 -1
  5. package/dist/components/designer/InspectorPanel.vue.d.ts.map +1 -1
  6. package/dist/components/designer/PaletteSidebar.vue.d.ts.map +1 -1
  7. package/dist/components/designer/composables/useSchemaEdits.d.ts +5 -2
  8. package/dist/components/designer/composables/useSchemaEdits.d.ts.map +1 -1
  9. package/dist/components/designer/inspectors/FieldPInspector.vue.d.ts +9 -1
  10. package/dist/components/designer/inspectors/FieldPInspector.vue.d.ts.map +1 -1
  11. package/dist/components/designer/inspectors/ParamsFields.vue.d.ts +9 -0
  12. package/dist/components/designer/inspectors/ParamsFields.vue.d.ts.map +1 -0
  13. package/dist/components/designer/inspectors/TableInspector.vue.d.ts.map +1 -1
  14. package/dist/components/renderer-v2/FormRenderer.vue.d.ts +3 -3
  15. package/dist/components/renderer-v2/FormRenderer.vue.d.ts.map +1 -1
  16. package/dist/components/renderer-v2/GridFormRenderer.vue.d.ts +3 -3
  17. package/dist/components/renderer-v2/GridFormRenderer.vue.d.ts.map +1 -1
  18. package/dist/components/renderer-v2/GridSchemaNode.vue.d.ts +3 -3
  19. package/dist/components/renderer-v2/GridSchemaNode.vue.d.ts.map +1 -1
  20. package/dist/designer-ui.css +2 -2
  21. package/dist/index.js +24 -24
  22. package/dist/renderer-core.css +1 -1
  23. package/dist/renderer.js +25 -25
  24. package/dist/ticket-designer.css +2 -2
  25. package/dist/types/schema-v2-serialization.d.ts.map +1 -1
  26. package/dist/types/schema-v2.d.ts +36 -15
  27. package/dist/types/schema-v2.d.ts.map +1 -1
  28. package/dist/utils/date-format.d.ts +11 -5
  29. package/dist/utils/date-format.d.ts.map +1 -1
  30. package/dist/utils/node-params.d.ts +35 -0
  31. package/dist/utils/node-params.d.ts.map +1 -0
  32. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { defineComponent as X, ref as G, watch as ve, onMounted as Zt, onUnmounted as tt, computed as P, openBlock as $, createElementBlock as I, normalizeClass as me, createVNode as le, normalizeStyle as Pe, createCommentVNode as K, nextTick as Ke, createElementVNode as l, createTextVNode as ge, toDisplayString as D, Fragment as _, renderList as ye, inject as Sl, resolveComponent as $l, withModifiers as Qt, createBlock as oe, unref as x, useModel as _t, withDirectives as Cl, vModelCheckbox as wl, mergeModels as qe, createStaticVNode as Il, reactive as xl, provide as Tl, withCtx as kl } from "vue";
2
- import { L as he, N as $e, G as Fl, b as Xe, a as Ye, P as Ze, _ as ie, c as Dl, p as Qe, s as el, t as Nl, r as Pl, i as ke, D as El, d as Al, e as _e, f as tl, u as Hl, g as Rl, h as Ll, j as Ml, k as Bl, l as Wt, m as Vl, n as Gl, o as zl, q as Ol, v as Wl, w as Ul, x as jl, y as Yl, z as be, A as Ut, B as Jl, C as Kl, E as Fe, F as ql, H as Xl, I as Zl, J as Ql, K as _l, M as ea, O as ta, Q as la, R as aa, S as na, T as oa, U as ia } from "./renderer-core.js";
1
+ import { defineComponent as X, ref as G, watch as ce, onMounted as tl, onUnmounted as lt, computed as N, openBlock as $, createElementBlock as I, normalizeClass as pe, createVNode as ae, normalizeStyle as Ae, createCommentVNode as q, nextTick as Ye, createElementVNode as l, createTextVNode as be, toDisplayString as E, Fragment as Q, renderList as ge, inject as $l, resolveComponent as Cl, withModifiers as ll, createBlock as oe, unref as x, useModel as al, withDirectives as wl, vModelCheckbox as Il, mergeModels as Xe, createStaticVNode as nl, reactive as xl, provide as kl, withCtx as Tl } from "vue";
2
+ import { L as $e, N as we, G as Fl, b as Ze, a as Ke, P as Qe, _ as ve, c as Dl, p as _e, s as ol, t as Nl, r as Pl, i as De, D as El, d as Jt, e as Al, f as et, g as il, u as Hl, h as Rl, j as Ll, k as Ml, l as Bl, m as Kt, n as Vl, o as Gl, q as zl, v as Ol, w as Wl, x as Ul, y as jl, z as Jl, A as Se, B as qt, C as Kl, E as ql, F as Ne, H as Yl, I as Xl, J as Zl, K as Ql, M as _l, O as ea, Q as ta, R as la, S as aa, T as na, U as oa, V as ia } from "./renderer-core.js";
3
3
  const da = /* @__PURE__ */ X({
4
4
  __name: "CanvasSurface",
5
5
  props: {
@@ -12,31 +12,31 @@ const da = /* @__PURE__ */ X({
12
12
  paginate: { type: Boolean, default: !0 }
13
13
  },
14
14
  emits: ["node-drag-start", "field-change", "drop-node", "drop-palette", "drag-end"],
15
- setup(e, { emit: u }) {
16
- const t = e, a = u, n = G(null);
17
- let r = null;
18
- function b() {
19
- const c = n.value;
15
+ setup(e, { emit: r }) {
16
+ const t = e, a = r, o = G(null);
17
+ let u = null;
18
+ function f() {
19
+ const c = o.value;
20
20
  if (!c) return;
21
- const h = t.selectedNodeId ? c.querySelector(`[${$e}="${t.selectedNodeId}"]`) : null;
21
+ const h = t.selectedNodeId ? c.querySelector(`[${we}="${t.selectedNodeId}"]`) : null;
22
22
  c.querySelectorAll(".is-design-selected").forEach((m) => {
23
23
  m !== h && m.classList.remove("is-design-selected");
24
24
  }), h && h.classList.add("is-design-selected");
25
25
  }
26
26
  function s() {
27
- const c = n.value;
27
+ const c = o.value;
28
28
  if (!c) return;
29
29
  const h = U.value;
30
30
  c.querySelectorAll("[data-node-id]:not(.layout-grid__cell)").forEach((m) => {
31
31
  h ? m.setAttribute("draggable", "true") : m.removeAttribute("draggable");
32
32
  });
33
33
  }
34
- function f() {
35
- r == null || r.disconnect(), Ke(() => {
36
- b(), s(), n.value && (r == null || r.observe(n.value, { childList: !0, subtree: !0 }));
34
+ function b() {
35
+ u == null || u.disconnect(), Ye(() => {
36
+ f(), s(), o.value && (u == null || u.observe(o.value, { childList: !0, subtree: !0 }));
37
37
  });
38
38
  }
39
- ve(
39
+ ce(
40
40
  () => [
41
41
  t.selectedNodeId,
42
42
  t.schema,
@@ -44,23 +44,23 @@ const da = /* @__PURE__ */ X({
44
44
  t.mode,
45
45
  t.readonly
46
46
  ],
47
- f,
47
+ b,
48
48
  { deep: !0, immediate: !0 }
49
- ), Zt(() => {
50
- r = new MutationObserver(f), f();
51
- }), tt(() => r == null ? void 0 : r.disconnect());
52
- const v = P(() => ({
49
+ ), tl(() => {
50
+ u = new MutationObserver(b), b();
51
+ }), lt(() => u == null ? void 0 : u.disconnect());
52
+ const v = N(() => ({
53
53
  "v2-canvas-surface--preview": t.mode !== "design"
54
- })), p = G(null), g = G(-1), L = P(() => {
55
- const c = p.value, h = g.value, m = n.value;
54
+ })), p = G(null), g = G(-1), M = N(() => {
55
+ const c = p.value, h = g.value, m = o.value;
56
56
  if (!c || h < 0 || !m) return null;
57
- const S = m.querySelector(`[${he}="${c}"]`);
58
- if (!S) return null;
59
- const F = m.getBoundingClientRect(), E = Array.from(S.children).filter(
60
- (O) => O instanceof HTMLElement && O.hasAttribute($e)
57
+ const C = m.querySelector(`[${$e}="${c}"]`);
58
+ if (!C) return null;
59
+ const F = m.getBoundingClientRect(), P = Array.from(C.children).filter(
60
+ (O) => O instanceof HTMLElement && O.hasAttribute(we)
61
61
  );
62
- if (h < E.length) {
63
- const O = E[h].getBoundingClientRect();
62
+ if (h < P.length) {
63
+ const O = P[h].getBoundingClientRect();
64
64
  return {
65
65
  position: "absolute",
66
66
  top: `${O.top - F.top}px`,
@@ -68,9 +68,9 @@ const da = /* @__PURE__ */ X({
68
68
  width: `${O.width}px`
69
69
  };
70
70
  }
71
- const N = E[E.length - 1];
72
- if (N) {
73
- const O = N.getBoundingClientRect();
71
+ const D = P[P.length - 1];
72
+ if (D) {
73
+ const O = D.getBoundingClientRect();
74
74
  return {
75
75
  position: "absolute",
76
76
  top: `${O.bottom - F.top}px`,
@@ -78,7 +78,7 @@ const da = /* @__PURE__ */ X({
78
78
  width: `${O.width}px`
79
79
  };
80
80
  }
81
- const z = S.getBoundingClientRect();
81
+ const z = C.getBoundingClientRect();
82
82
  return {
83
83
  position: "absolute",
84
84
  top: `${z.top - F.top}px`,
@@ -87,95 +87,95 @@ const da = /* @__PURE__ */ X({
87
87
  };
88
88
  }), A = G(/* @__PURE__ */ new Set());
89
89
  let H = null;
90
- const U = P(
90
+ const U = N(
91
91
  () => t.mode === "design"
92
92
  );
93
- function q(c) {
93
+ function Z(c) {
94
94
  H && H !== c && H.classList.remove("v2-drop-target"), c && c !== H && c.classList.add("v2-drop-target"), H = c;
95
95
  }
96
96
  function j() {
97
97
  H && (H.classList.remove("v2-drop-target"), H = null);
98
98
  }
99
- function te(c, h) {
99
+ function le(c, h) {
100
100
  const m = Array.from(c.children).filter(
101
- (S) => S instanceof HTMLElement && S.hasAttribute($e)
101
+ (C) => C instanceof HTMLElement && C.hasAttribute(we)
102
102
  );
103
- for (let S = 0; S < m.length; S += 1) {
104
- const F = m[S].getBoundingClientRect();
105
- if (h < F.top + F.height / 2) return S;
103
+ for (let C = 0; C < m.length; C += 1) {
104
+ const F = m[C].getBoundingClientRect();
105
+ if (h < F.top + F.height / 2) return C;
106
106
  }
107
107
  return m.length;
108
108
  }
109
109
  function ee(c) {
110
- const h = Xe(t.schema), m = [], S = (F) => {
111
- var N, z;
112
- let E = F;
113
- for (; E; ) {
114
- if (E === c) return !0;
115
- E = (z = (N = h.get(E)) == null ? void 0 : N.parent) == null ? void 0 : z.id;
110
+ const h = Ze(t.schema), m = [], C = (F) => {
111
+ var D, z;
112
+ let P = F;
113
+ for (; P; ) {
114
+ if (P === c) return !0;
115
+ P = (z = (D = h.get(P)) == null ? void 0 : D.parent) == null ? void 0 : z.id;
116
116
  }
117
117
  return !1;
118
118
  };
119
119
  t.schema.pages.forEach((F) => {
120
- const E = (N) => {
121
- N.forEach((z) => {
120
+ const P = (D) => {
121
+ D.forEach((z) => {
122
122
  z.type === "grid" ? z.rows.forEach(
123
- (O) => O.cells.forEach((ce) => {
124
- S(ce.id) || m.push(ce.id), E(ce.children);
123
+ (O) => O.cells.forEach((fe) => {
124
+ C(fe.id) || m.push(fe.id), P(fe.children);
125
125
  })
126
126
  ) : z.type === "table" && z.rowTemplate.forEach((O) => {
127
- S(O.id) || m.push(O.id);
127
+ C(O.id) || m.push(O.id);
128
128
  });
129
129
  });
130
130
  };
131
- E(F.children);
131
+ P(F.children);
132
132
  }), A.value = new Set(m), a("node-drag-start", c);
133
133
  }
134
- function k(c) {
134
+ function T(c) {
135
135
  var O;
136
136
  if (!U.value) return;
137
137
  const h = c.target, m = (h == null ? void 0 : h.closest("[data-node-id]")) ?? null;
138
138
  if (!m) return;
139
- const S = m.closest(".layout-table");
140
- if (S && S !== m) {
139
+ const C = m.closest(".layout-table");
140
+ if (C && C !== m) {
141
141
  c.preventDefault();
142
142
  return;
143
143
  }
144
144
  const F = m.getAttribute("data-node-id") ?? "";
145
145
  if (!F) return;
146
- const E = (O = Xe(t.schema).get(F)) == null ? void 0 : O.node, N = E || void 0;
147
- if (N && N.type === "p" && t.mode === "design" && N.mode === "field" && !N.prefix && !N.suffix && !c.altKey) {
146
+ const P = (O = Ze(t.schema).get(F)) == null ? void 0 : O.node, D = P || void 0;
147
+ if (D && D.type === "p" && t.mode === "design" && D.mode === "field" && !D.prefix && !D.suffix && !c.altKey) {
148
148
  c.preventDefault();
149
149
  return;
150
150
  }
151
151
  const z = c.dataTransfer;
152
- z && (z.setData(Ye, F), z.setData("text/plain", F), z.effectAllowed = "move", ee(F));
152
+ z && (z.setData(Ke, F), z.setData("text/plain", F), z.effectAllowed = "move", ee(F));
153
153
  }
154
- function Y(c) {
154
+ function J(c) {
155
155
  if (!U.value) return;
156
156
  const h = c.dataTransfer;
157
157
  if (!h) return;
158
- const m = Array.from(h.types).includes(Ze), S = Array.from(h.types).includes(Ye);
159
- if (!m && !S) return;
158
+ const m = Array.from(h.types).includes(Qe), C = Array.from(h.types).includes(Ke);
159
+ if (!m && !C) return;
160
160
  if (m) {
161
161
  c.preventDefault();
162
- const N = c.target.closest(
163
- `[${he}]`
162
+ const D = c.target.closest(
163
+ `[${$e}]`
164
164
  );
165
- q(N ?? null), p.value = null, g.value = -1;
165
+ Z(D ?? null), p.value = null, g.value = -1;
166
166
  return;
167
167
  }
168
- q(null);
168
+ Z(null);
169
169
  const F = c.target.closest(
170
- `[${he}]`
171
- ), E = (F == null ? void 0 : F.dataset.layoutId) ?? null;
172
- F && E && A.value.has(E) ? (c.preventDefault(), p.value = E, g.value = te(F, c.clientY)) : (p.value = null, g.value = -1);
170
+ `[${$e}]`
171
+ ), P = (F == null ? void 0 : F.dataset.layoutId) ?? null;
172
+ F && P && A.value.has(P) ? (c.preventDefault(), p.value = P, g.value = le(F, c.clientY)) : (p.value = null, g.value = -1);
173
173
  }
174
- function J(c) {
174
+ function K(c) {
175
175
  const h = c.relatedTarget;
176
- (!h || !h.closest(`[${he}]`)) && (j(), p.value = null, g.value = -1);
176
+ (!h || !h.closest(`[${$e}]`)) && (j(), p.value = null, g.value = -1);
177
177
  }
178
- function Z() {
178
+ function _() {
179
179
  p.value = null, g.value = -1, A.value = /* @__PURE__ */ new Set(), j();
180
180
  }
181
181
  function w(c) {
@@ -183,70 +183,70 @@ const da = /* @__PURE__ */ X({
183
183
  const h = c.dataTransfer;
184
184
  if (!h) return;
185
185
  j(), c.preventDefault();
186
- const m = h.getData(Ze) ?? "";
186
+ const m = h.getData(Qe) ?? "";
187
187
  if (m) {
188
- const N = c.target.closest(
189
- `[${he}]`
190
- ), z = (N == null ? void 0 : N.dataset.layoutId) ?? null;
191
- if (Z(), !z) return;
188
+ const D = c.target.closest(
189
+ `[${$e}]`
190
+ ), z = (D == null ? void 0 : D.dataset.layoutId) ?? null;
191
+ if (_(), !z) return;
192
192
  a("drop-palette", { kind: m, cellId: z });
193
193
  return;
194
194
  }
195
- const S = h.getData(Ye) ?? "", F = p.value, E = g.value;
196
- Z(), !(!S || !F || E < 0) && a("drop-node", { moveId: S, cellId: F, index: E });
195
+ const C = h.getData(Ke) ?? "", F = p.value, P = g.value;
196
+ _(), !(!C || !F || P < 0) && a("drop-node", { moveId: C, cellId: F, index: P });
197
197
  }
198
- function y() {
199
- Z(), a("drag-end");
198
+ function S() {
199
+ _(), a("drag-end");
200
200
  }
201
201
  return (c, h) => ($(), I("div", {
202
202
  ref_key: "root",
203
- ref: n,
204
- class: me(["v2-canvas-surface", v.value]),
205
- onDragover: Y,
206
- onDragleave: J,
203
+ ref: o,
204
+ class: pe(["v2-canvas-surface", v.value]),
205
+ onDragover: J,
206
+ onDragleave: K,
207
207
  onDrop: w,
208
- onDragend: y,
209
- onDragstart: k
208
+ onDragend: S,
209
+ onDragstart: T
210
210
  }, [
211
- le(Fl, {
211
+ ae(Fl, {
212
212
  schema: e.schema,
213
213
  mode: e.mode,
214
214
  data: e.data,
215
215
  readonly: e.readonly,
216
216
  bare: e.bare,
217
217
  paginate: e.paginate,
218
- onFieldChange: h[0] || (h[0] = (m, S) => a("field-change", m, S))
218
+ onFieldChange: h[0] || (h[0] = (m, C) => a("field-change", m, C))
219
219
  }, null, 8, ["schema", "mode", "data", "readonly", "bare", "paginate"]),
220
- L.value ? ($(), I("div", {
220
+ M.value ? ($(), I("div", {
221
221
  key: 0,
222
222
  class: "v2-insertion-line",
223
- style: Pe(L.value)
224
- }, null, 4)) : K("", !0)
223
+ style: Ae(M.value)
224
+ }, null, 4)) : q("", !0)
225
225
  ], 34));
226
226
  }
227
- }), ua = /* @__PURE__ */ ie(da, [["__scopeId", "data-v-deb3136c"]]), ra = 2, sa = "ticket-schema-v2", va = "ticket-fill-data";
228
- function et(e, u = {}) {
229
- return e ? Dl(e, u) : {};
227
+ }), ra = /* @__PURE__ */ ve(da, [["__scopeId", "data-v-deb3136c"]]), ua = 2, sa = "ticket-schema-v2", va = "ticket-fill-data";
228
+ function tt(e, r = {}) {
229
+ return e ? Dl(e, r) : {};
230
230
  }
231
- function ca(e, u = !0) {
232
- return el(e, u);
231
+ function ca(e, r = !0) {
232
+ return ol(e, r);
233
233
  }
234
- function jt(e, u = !0) {
235
- return u ? JSON.stringify(e, null, ra) : JSON.stringify(e);
234
+ function Yt(e, r = !0) {
235
+ return r ? JSON.stringify(e, null, ua) : JSON.stringify(e);
236
236
  }
237
- function ll(e, u = Date.now()) {
238
- return `${e}-${u}.json`;
237
+ function dl(e, r = Date.now()) {
238
+ return `${e}-${r}.json`;
239
239
  }
240
- function al(e, u) {
240
+ function rl(e, r) {
241
241
  if (typeof document > "u" || typeof URL > "u" || typeof URL.createObjectURL != "function")
242
242
  return;
243
- const t = new Blob([u], { type: "application/json" }), a = URL.createObjectURL(t), n = document.createElement("a");
244
- n.href = a, n.download = e, n.click(), URL.revokeObjectURL(a);
243
+ const t = new Blob([r], { type: "application/json" }), a = URL.createObjectURL(t), o = document.createElement("a");
244
+ o.href = a, o.download = e, o.click(), URL.revokeObjectURL(a);
245
245
  }
246
246
  function pa(e) {
247
- return typeof e == "string" ? Qe(e) : JSON.parse(JSON.stringify(e));
247
+ return typeof e == "string" ? _e(e) : JSON.parse(JSON.stringify(e));
248
248
  }
249
- const fa = { class: "status-bar" }, ga = { class: "status-group" }, ma = { class: "status-item" }, ba = {
249
+ const fa = { class: "status-bar" }, ba = { class: "status-group" }, ga = { class: "status-item" }, ma = {
250
250
  key: 0,
251
251
  class: "status-item",
252
252
  "data-physical-page-count": "true"
@@ -263,34 +263,34 @@ const fa = { class: "status-bar" }, ga = { class: "status-group" }, ma = { class
263
263
  paginateWarningCount: {}
264
264
  },
265
265
  setup(e) {
266
- return (u, t) => ($(), I("div", fa, [
267
- l("div", ga, [
268
- l("span", ma, [
269
- t[0] || (t[0] = ge(" 页数:", -1)),
270
- l("strong", null, D(e.pageCount), 1)
266
+ return (r, t) => ($(), I("div", fa, [
267
+ l("div", ba, [
268
+ l("span", ga, [
269
+ t[0] || (t[0] = be(" 页数:", -1)),
270
+ l("strong", null, E(e.pageCount), 1)
271
271
  ]),
272
- e.physicalPageCount != null && e.physicalPageCount !== e.pageCount ? ($(), I("span", ba, [
273
- t[1] || (t[1] = ge(" 打印:", -1)),
274
- l("strong", null, D(e.physicalPageCount), 1),
275
- t[2] || (t[2] = ge(" 张 ", -1))
276
- ])) : K("", !0),
272
+ e.physicalPageCount != null && e.physicalPageCount !== e.pageCount ? ($(), I("span", ma, [
273
+ t[1] || (t[1] = be(" 打印:", -1)),
274
+ l("strong", null, E(e.physicalPageCount), 1),
275
+ t[2] || (t[2] = be(" 张 ", -1))
276
+ ])) : q("", !0),
277
277
  l("span", {
278
- class: me(["status-item", "warning-count", { "has-warning": e.warningCount > 0 }])
278
+ class: pe(["status-item", "warning-count", { "has-warning": e.warningCount > 0 }])
279
279
  }, [
280
- t[3] || (t[3] = ge(" 待处理问题:", -1)),
281
- l("strong", null, D(e.warningCount), 1)
280
+ t[3] || (t[3] = be(" 待处理问题:", -1)),
281
+ l("strong", null, E(e.warningCount), 1)
282
282
  ], 2),
283
283
  e.paginateWarningCount ? ($(), I("span", ha, [
284
- t[4] || (t[4] = ge(" 内容超高:", -1)),
285
- l("strong", null, D(e.paginateWarningCount), 1)
286
- ])) : K("", !0)
284
+ t[4] || (t[4] = be(" 内容超高:", -1)),
285
+ l("strong", null, E(e.paginateWarningCount), 1)
286
+ ])) : q("", !0)
287
287
  ]),
288
288
  t[5] || (t[5] = l("div", { class: "status-group status-right" }, [
289
289
  l("span", { class: "status-item muted" }, "缩放:100%(阶段 5 完善)")
290
290
  ], -1))
291
291
  ]));
292
292
  }
293
- }), Sa = /* @__PURE__ */ ie(ya, [["__scopeId", "data-v-e5a749ea"]]), $a = {
293
+ }), Sa = /* @__PURE__ */ ve(ya, [["__scopeId", "data-v-e5a749ea"]]), $a = {
294
294
  showNewBlank: !0,
295
295
  showSamples: !0,
296
296
  showUndoRedo: !0,
@@ -306,10 +306,10 @@ function Ca(e) {
306
306
  const wa = { class: "v2-toolbar" }, Ia = {
307
307
  key: 0,
308
308
  class: "v2-toolbar__group"
309
- }, xa = ["onClick"], Ta = {
309
+ }, xa = ["onClick"], ka = {
310
310
  key: 1,
311
311
  class: "v2-toolbar__group"
312
- }, ka = ["disabled"], Fa = ["disabled"], Da = {
312
+ }, Ta = ["disabled"], Fa = ["disabled"], Da = {
313
313
  key: 2,
314
314
  class: "v2-toolbar__group"
315
315
  }, Na = { class: "v2-toolbar__label" }, Pa = {
@@ -329,144 +329,144 @@ const wa = { class: "v2-toolbar" }, Ia = {
329
329
  uiConfig: {}
330
330
  },
331
331
  emits: ["reset-blank", "load-sample", "undo", "redo", "save-template", "load-template", "export-template", "import-template", "import-fill-data", "export-fill-data", "load-fill-data", "save-fill-data", "toggle-preview", "print", "help"],
332
- setup(e, { emit: u }) {
333
- const t = e, a = P(() => Ca(t.uiConfig));
334
- function n(b) {
335
- return Nl(b, void 0, a.value.locale);
332
+ setup(e, { emit: r }) {
333
+ const t = e, a = N(() => Ca(t.uiConfig));
334
+ function o(f) {
335
+ return Nl(f, void 0, a.value.locale);
336
336
  }
337
- const r = u;
338
- return (b, s) => ($(), I("header", wa, [
337
+ const u = r;
338
+ return (f, s) => ($(), I("header", wa, [
339
339
  l("span", {
340
- class: me(["v2-toolbar__dirty", { "v2-toolbar__dirty--on": e.dirty }])
341
- }, D(e.dirty ? n("toolbar.dirty") : n("toolbar.saved")), 3),
340
+ class: pe(["v2-toolbar__dirty", { "v2-toolbar__dirty--on": e.dirty }])
341
+ }, E(e.dirty ? o("toolbar.dirty") : o("toolbar.saved")), 3),
342
342
  a.value.showNewBlank || a.value.showSamples ? ($(), I("div", Ia, [
343
343
  a.value.showNewBlank ? ($(), I("button", {
344
344
  key: 0,
345
345
  class: "v2-toolbar__button",
346
346
  type: "button",
347
- onClick: s[0] || (s[0] = (f) => r("reset-blank"))
348
- }, D(n("toolbar.newBlank")), 1)) : K("", !0),
349
- a.value.showSamples ? ($(!0), I(_, { key: 1 }, ye(e.samples, (f) => ($(), I("button", {
350
- key: f.id,
347
+ onClick: s[0] || (s[0] = (b) => u("reset-blank"))
348
+ }, E(o("toolbar.newBlank")), 1)) : q("", !0),
349
+ a.value.showSamples ? ($(!0), I(Q, { key: 1 }, ge(e.samples, (b) => ($(), I("button", {
350
+ key: b.id,
351
351
  class: "v2-toolbar__button",
352
352
  type: "button",
353
- onClick: (v) => r("load-sample", f)
354
- }, D(n("toolbar.loadSamplePrefix")) + D(f.label), 9, xa))), 128)) : K("", !0)
355
- ])) : K("", !0),
356
- a.value.showUndoRedo ? ($(), I("div", Ta, [
353
+ onClick: (v) => u("load-sample", b)
354
+ }, E(o("toolbar.loadSamplePrefix")) + E(b.label), 9, xa))), 128)) : q("", !0)
355
+ ])) : q("", !0),
356
+ a.value.showUndoRedo ? ($(), I("div", ka, [
357
357
  l("button", {
358
358
  class: "v2-toolbar__button",
359
359
  type: "button",
360
360
  disabled: !e.canUndo,
361
- onClick: s[1] || (s[1] = (f) => r("undo"))
362
- }, D(n("toolbar.undo")), 9, ka),
361
+ onClick: s[1] || (s[1] = (b) => u("undo"))
362
+ }, E(o("toolbar.undo")), 9, Ta),
363
363
  l("button", {
364
364
  class: "v2-toolbar__button",
365
365
  type: "button",
366
366
  disabled: !e.canRedo,
367
- onClick: s[2] || (s[2] = (f) => r("redo"))
368
- }, D(n("toolbar.redo")), 9, Fa)
369
- ])) : K("", !0),
367
+ onClick: s[2] || (s[2] = (b) => u("redo"))
368
+ }, E(o("toolbar.redo")), 9, Fa)
369
+ ])) : q("", !0),
370
370
  a.value.showTemplateModule ? ($(), I("div", Da, [
371
- l("span", Na, D(n("toolbar.module.template")), 1),
371
+ l("span", Na, E(o("toolbar.module.template")), 1),
372
372
  l("button", {
373
373
  class: "v2-toolbar__button",
374
374
  type: "button",
375
- onClick: s[3] || (s[3] = (f) => r("save-template"))
376
- }, D(n("toolbar.saveTemplate")), 1),
375
+ onClick: s[3] || (s[3] = (b) => u("save-template"))
376
+ }, E(o("toolbar.saveTemplate")), 1),
377
377
  l("button", {
378
378
  class: "v2-toolbar__button",
379
379
  type: "button",
380
- onClick: s[4] || (s[4] = (f) => r("load-template"))
381
- }, D(n("toolbar.loadTemplate")), 1),
380
+ onClick: s[4] || (s[4] = (b) => u("load-template"))
381
+ }, E(o("toolbar.loadTemplate")), 1),
382
382
  l("button", {
383
383
  class: "v2-toolbar__button",
384
384
  type: "button",
385
- onClick: s[5] || (s[5] = (f) => r("export-template"))
386
- }, D(n("toolbar.exportTemplate")), 1),
385
+ onClick: s[5] || (s[5] = (b) => u("export-template"))
386
+ }, E(o("toolbar.exportTemplate")), 1),
387
387
  l("button", {
388
388
  class: "v2-toolbar__button",
389
389
  type: "button",
390
- onClick: s[6] || (s[6] = (f) => r("import-template"))
391
- }, D(n("toolbar.importTemplate")), 1)
392
- ])) : K("", !0),
390
+ onClick: s[6] || (s[6] = (b) => u("import-template"))
391
+ }, E(o("toolbar.importTemplate")), 1)
392
+ ])) : q("", !0),
393
393
  a.value.showFillDataModule ? ($(), I("div", Pa, [
394
- l("span", Ea, D(n("toolbar.module.fillData")), 1),
394
+ l("span", Ea, E(o("toolbar.module.fillData")), 1),
395
395
  l("button", {
396
396
  class: "v2-toolbar__button",
397
397
  type: "button",
398
- title: n("toolbar.saveFillDataTip"),
399
- onClick: s[7] || (s[7] = (f) => r("save-fill-data"))
400
- }, D(n("toolbar.saveFillData")), 9, Aa),
398
+ title: o("toolbar.saveFillDataTip"),
399
+ onClick: s[7] || (s[7] = (b) => u("save-fill-data"))
400
+ }, E(o("toolbar.saveFillData")), 9, Aa),
401
401
  l("button", {
402
402
  class: "v2-toolbar__button",
403
403
  type: "button",
404
- title: n("toolbar.loadFillDataTip"),
405
- onClick: s[8] || (s[8] = (f) => r("load-fill-data"))
406
- }, D(n("toolbar.loadFillData")), 9, Ha),
404
+ title: o("toolbar.loadFillDataTip"),
405
+ onClick: s[8] || (s[8] = (b) => u("load-fill-data"))
406
+ }, E(o("toolbar.loadFillData")), 9, Ha),
407
407
  l("button", {
408
408
  class: "v2-toolbar__button",
409
409
  type: "button",
410
410
  "data-export-fill-data": "",
411
- title: n("toolbar.exportFillDataTip"),
412
- onClick: s[9] || (s[9] = (f) => r("export-fill-data"))
413
- }, D(n("toolbar.exportFillData")), 9, Ra),
411
+ title: o("toolbar.exportFillDataTip"),
412
+ onClick: s[9] || (s[9] = (b) => u("export-fill-data"))
413
+ }, E(o("toolbar.exportFillData")), 9, Ra),
414
414
  l("button", {
415
415
  class: "v2-toolbar__button",
416
416
  type: "button",
417
- title: n("toolbar.importFillDataTip"),
418
- onClick: s[10] || (s[10] = (f) => r("import-fill-data"))
419
- }, D(n("toolbar.importFillData")), 9, La)
420
- ])) : K("", !0),
417
+ title: o("toolbar.importFillDataTip"),
418
+ onClick: s[10] || (s[10] = (b) => u("import-fill-data"))
419
+ }, E(o("toolbar.importFillData")), 9, La)
420
+ ])) : q("", !0),
421
421
  a.value.showPreviewPrint || a.value.showHelp ? ($(), I("div", Ma, [
422
422
  a.value.showPreviewPrint ? ($(), I("button", {
423
423
  key: 0,
424
- class: me(["v2-toolbar__button", { "v2-toolbar__button--active": e.previewMode }]),
424
+ class: pe(["v2-toolbar__button", { "v2-toolbar__button--active": e.previewMode }]),
425
425
  type: "button",
426
426
  "data-view-mode": "preview",
427
- title: n("toolbar.previewTip"),
428
- onClick: s[11] || (s[11] = (f) => r("toggle-preview"))
429
- }, D(e.previewMode ? n("toolbar.exitPreview") : n("toolbar.preview")), 11, Ba)) : K("", !0),
427
+ title: o("toolbar.previewTip"),
428
+ onClick: s[11] || (s[11] = (b) => u("toggle-preview"))
429
+ }, E(e.previewMode ? o("toolbar.exitPreview") : o("toolbar.preview")), 11, Ba)) : q("", !0),
430
430
  a.value.showPreviewPrint ? ($(), I("button", {
431
431
  key: 1,
432
432
  class: "v2-toolbar__button",
433
433
  type: "button",
434
- onClick: s[12] || (s[12] = (f) => r("print"))
435
- }, D(n("toolbar.print")), 1)) : K("", !0),
434
+ onClick: s[12] || (s[12] = (b) => u("print"))
435
+ }, E(o("toolbar.print")), 1)) : q("", !0),
436
436
  a.value.showHelp ? ($(), I("button", {
437
437
  key: 2,
438
438
  class: "v2-toolbar__button",
439
439
  type: "button",
440
440
  "data-help-toggle": "",
441
- title: n("toolbar.helpTip"),
442
- onClick: s[13] || (s[13] = (f) => r("help"))
443
- }, D(n("toolbar.help")), 9, Va)) : K("", !0)
444
- ])) : K("", !0)
441
+ title: o("toolbar.helpTip"),
442
+ onClick: s[13] || (s[13] = (b) => u("help"))
443
+ }, E(o("toolbar.help")), 9, Va)) : q("", !0)
444
+ ])) : q("", !0)
445
445
  ]));
446
446
  }
447
- }), za = /* @__PURE__ */ ie(Ga, [["__scopeId", "data-v-71ae7003"]]), nl = Symbol(
447
+ }), za = /* @__PURE__ */ ve(Ga, [["__scopeId", "data-v-71ae7003"]]), ul = Symbol(
448
448
  "TicketDesigner.TreeControl"
449
449
  );
450
- function ol(e, u) {
451
- return u ? e.id === u ? !0 : e.children.some((t) => ol(t, u)) : !1;
450
+ function sl(e, r) {
451
+ return r ? e.id === r ? !0 : e.children.some((t) => sl(t, r)) : !1;
452
452
  }
453
- function Oa(e, u, t = 4) {
454
- const a = e.getBoundingClientRect(), n = u.getBoundingClientRect(), r = e.scrollTop, b = a.top + t - n.top;
455
- if (b > 0) return Math.max(0, r - b);
456
- const s = n.bottom + t - a.bottom;
457
- return s > 0 ? r + s : r;
453
+ function Oa(e, r, t = 4) {
454
+ const a = e.getBoundingClientRect(), o = r.getBoundingClientRect(), u = e.scrollTop, f = a.top + t - o.top;
455
+ if (f > 0) return Math.max(0, u - f);
456
+ const s = o.bottom + t - a.bottom;
457
+ return s > 0 ? u + s : u;
458
458
  }
459
- function Yt(e, u, t = 4) {
460
- const a = Oa(e, u, t);
459
+ function Xt(e, r, t = 4) {
460
+ const a = Oa(e, r, t);
461
461
  return a === e.scrollTop ? !1 : (e.scrollTop = a, !0);
462
462
  }
463
463
  const Wa = { class: "v2-tree-node" }, Ua = ["data-tree-node-id"], ja = {
464
464
  key: 1,
465
465
  class: "v2-tree-dot"
466
- }, Ya = { class: "v2-tree-label" }, Ja = { class: "v2-tree-type" }, Ka = {
466
+ }, Ja = { class: "v2-tree-label" }, Ka = { class: "v2-tree-type" }, qa = {
467
467
  key: 0,
468
468
  class: "v2-tree-children"
469
- }, qa = /* @__PURE__ */ X({
469
+ }, Ya = /* @__PURE__ */ X({
470
470
  name: "NodeTreeItem",
471
471
  __name: "NodeTreeItem",
472
472
  props: {
@@ -475,54 +475,54 @@ const Wa = { class: "v2-tree-node" }, Ua = ["data-tree-node-id"], ja = {
475
475
  depth: {}
476
476
  },
477
477
  emits: ["select"],
478
- setup(e, { emit: u }) {
479
- const t = e, a = u, n = Sl(nl, null), r = G(n ? n.target.value : !0);
480
- n && (ve(n.token, () => {
481
- r.value = n.target.value;
482
- }), ve(
483
- n.focusToken,
478
+ setup(e, { emit: r }) {
479
+ const t = e, a = r, o = $l(ul, null), u = G(o ? o.target.value : !0);
480
+ o && (ce(o.token, () => {
481
+ u.value = o.target.value;
482
+ }), ce(
483
+ o.focusToken,
484
484
  () => {
485
- ol(t.node, n.focusId.value) && (r.value = !0);
485
+ sl(t.node, o.focusId.value) && (u.value = !0);
486
486
  },
487
487
  { immediate: !0 }
488
488
  ));
489
- function b() {
489
+ function f() {
490
490
  a("select", t.node.id);
491
491
  }
492
492
  function s() {
493
- r.value = !r.value;
493
+ u.value = !u.value;
494
494
  }
495
- return (f, v) => {
496
- const p = $l("NodeTreeItem", !0);
495
+ return (b, v) => {
496
+ const p = Cl("NodeTreeItem", !0);
497
497
  return $(), I("div", Wa, [
498
498
  l("div", {
499
- class: me(["v2-tree-row", { "v2-tree-row--selected": e.node.id === e.selectedId }]),
500
- style: Pe({ paddingLeft: `${e.depth * 14 + 6}px` }),
499
+ class: pe(["v2-tree-row", { "v2-tree-row--selected": e.node.id === e.selectedId }]),
500
+ style: Ae({ paddingLeft: `${e.depth * 14 + 6}px` }),
501
501
  "data-tree-node-id": e.node.id,
502
- onClick: b
502
+ onClick: f
503
503
  }, [
504
504
  e.node.children.length ? ($(), I("button", {
505
505
  key: 0,
506
506
  class: "v2-tree-toggle",
507
507
  type: "button",
508
- onClick: Qt(s, ["stop"])
509
- }, D(r.value ? "▾" : "▸"), 1)) : ($(), I("span", ja, "·")),
510
- l("span", Ya, D(e.node.label), 1),
511
- l("span", Ja, D(e.node.type), 1)
508
+ onClick: ll(s, ["stop"])
509
+ }, E(u.value ? "▾" : "▸"), 1)) : ($(), I("span", ja, "·")),
510
+ l("span", Ja, E(e.node.label), 1),
511
+ l("span", Ka, E(e.node.type), 1)
512
512
  ], 14, Ua),
513
- r.value && e.node.children.length ? ($(), I("div", Ka, [
514
- ($(!0), I(_, null, ye(e.node.children, (g) => ($(), oe(p, {
513
+ u.value && e.node.children.length ? ($(), I("div", qa, [
514
+ ($(!0), I(Q, null, ge(e.node.children, (g) => ($(), oe(p, {
515
515
  key: g.id,
516
516
  node: g,
517
517
  "selected-id": e.selectedId,
518
518
  depth: e.depth + 1,
519
- onSelect: v[0] || (v[0] = (L) => a("select", L))
519
+ onSelect: v[0] || (v[0] = (M) => a("select", M))
520
520
  }, null, 8, ["node", "selected-id", "depth"]))), 128))
521
- ])) : K("", !0)
521
+ ])) : q("", !0)
522
522
  ]);
523
523
  };
524
524
  }
525
- }), Xa = /* @__PURE__ */ ie(qa, [["__scopeId", "data-v-10a2a207"]]), Za = ["disabled"], Qa = ["disabled"], _a = ["disabled"], en = ["disabled"], tn = ["disabled"], ln = ["disabled"], an = { class: "v2-sidebar__heading v2-sidebar__heading--tree v2-tree-head" }, nn = ["disabled", "title"], on = { class: "v2-tree__buttons" }, dn = /* @__PURE__ */ X({
525
+ }), Xa = /* @__PURE__ */ ve(Ya, [["__scopeId", "data-v-10a2a207"]]), Za = ["disabled"], Qa = ["disabled"], _a = ["disabled"], en = ["disabled"], tn = ["disabled"], ln = ["disabled"], an = { class: "v2-sidebar__heading v2-sidebar__heading--tree v2-tree-head" }, nn = ["disabled", "title"], on = { class: "v2-tree__buttons" }, dn = /* @__PURE__ */ X({
526
526
  __name: "PaletteSidebar",
527
527
  props: {
528
528
  editable: { type: Boolean },
@@ -531,31 +531,31 @@ const Wa = { class: "v2-tree-node" }, Ua = ["data-tree-node-id"], ja = {
531
531
  selectedNodeId: {}
532
532
  },
533
533
  emits: ["add-node", "add-grid", "palette-drag", "select", "remove-selected", "collapse-all", "expand-all"],
534
- setup(e, { emit: u }) {
535
- const t = e, a = G(null), n = G(null);
536
- function r(f) {
534
+ setup(e, { emit: r }) {
535
+ const t = e, a = G(null), o = G(null);
536
+ function u(b) {
537
537
  const v = a.value;
538
538
  if (!v) return null;
539
539
  const p = v.querySelectorAll("[data-tree-node-id]");
540
540
  for (const g of Array.from(p))
541
- if (g.dataset.treeNodeId === f) return g;
541
+ if (g.dataset.treeNodeId === b) return g;
542
542
  return null;
543
543
  }
544
- function b(f) {
545
- if (!f) return;
546
- const v = r(f);
547
- v && (a.value && Yt(a.value, v), n.value && a.value && Yt(n.value, a.value));
544
+ function f(b) {
545
+ if (!b) return;
546
+ const v = u(b);
547
+ v && (a.value && Xt(a.value, v), o.value && a.value && Xt(o.value, a.value));
548
548
  }
549
- ve(
549
+ ce(
550
550
  () => t.selectedNodeId,
551
- async (f) => {
552
- f && (await Ke(), r(f) || await Ke(), b(f));
551
+ async (b) => {
552
+ b && (await Ye(), u(b) || await Ye(), f(b));
553
553
  }
554
554
  );
555
- const s = u;
556
- return (f, v) => ($(), I("aside", {
555
+ const s = r;
556
+ return (b, v) => ($(), I("aside", {
557
557
  ref_key: "sidebarRef",
558
- ref: n,
558
+ ref: o,
559
559
  class: "v2-sidebar v2-sidebar--left"
560
560
  }, [
561
561
  v[17] || (v[17] = l("div", { class: "v2-sidebar__group-title" }, "基础组件", -1)),
@@ -595,25 +595,25 @@ const Wa = { class: "v2-tree-node" }, Ua = ["data-tree-node-id"], ja = {
595
595
  onDragstart: v[6] || (v[6] = (p) => s("palette-drag", "html", p)),
596
596
  onClick: v[7] || (v[7] = (p) => s("add-node", "html"))
597
597
  }, " HTML 模块 ", 40, en),
598
- v[18] || (v[18] = l("div", { class: "v2-sidebar__group-title" }, "布局组件", -1)),
599
598
  l("button", {
600
599
  class: "v2-palette-item v2-palette-item--button",
601
600
  type: "button",
602
601
  draggable: "true",
603
- "data-palette": "grid",
602
+ "data-palette": "table",
604
603
  disabled: !e.editable,
605
- onDragstart: v[8] || (v[8] = (p) => s("palette-drag", "grid", p)),
606
- onClick: v[9] || (v[9] = (p) => s("add-grid"))
607
- }, " 网格 ", 40, tn),
604
+ onDragstart: v[8] || (v[8] = (p) => s("palette-drag", "table", p)),
605
+ onClick: v[9] || (v[9] = (p) => s("add-node", "table"))
606
+ }, " 表格 ", 40, tn),
607
+ v[18] || (v[18] = l("div", { class: "v2-sidebar__group-title" }, "布局组件", -1)),
608
608
  l("button", {
609
609
  class: "v2-palette-item v2-palette-item--button",
610
610
  type: "button",
611
611
  draggable: "true",
612
- "data-palette": "table",
612
+ "data-palette": "grid",
613
613
  disabled: !e.editable,
614
- onDragstart: v[10] || (v[10] = (p) => s("palette-drag", "table", p)),
615
- onClick: v[11] || (v[11] = (p) => s("add-node", "table"))
616
- }, " 表格 ", 40, ln),
614
+ onDragstart: v[10] || (v[10] = (p) => s("palette-drag", "grid", p)),
615
+ onClick: v[11] || (v[11] = (p) => s("add-grid"))
616
+ }, " 网格 ", 40, ln),
617
617
  l("div", an, [
618
618
  v[16] || (v[16] = l("span", null, "结构", -1)),
619
619
  l("button", {
@@ -629,7 +629,7 @@ const Wa = { class: "v2-tree-node" }, Ua = ["data-tree-node-id"], ja = {
629
629
  ref: a,
630
630
  class: "v2-tree"
631
631
  }, [
632
- ($(!0), I(_, null, ye(e.nodeTree, (p) => ($(), oe(Xa, {
632
+ ($(!0), I(Q, null, ge(e.nodeTree, (p) => ($(), oe(Xa, {
633
633
  key: p.id,
634
634
  node: p,
635
635
  "selected-id": e.selectedNodeId,
@@ -651,7 +651,7 @@ const Wa = { class: "v2-tree-node" }, Ua = ["data-tree-node-id"], ja = {
651
651
  ])
652
652
  ], 512));
653
653
  }
654
- }), un = /* @__PURE__ */ ie(dn, [["__scopeId", "data-v-91a9dac6"]]), rn = {
654
+ }), rn = /* @__PURE__ */ ve(dn, [["__scopeId", "data-v-e580095e"]]), un = {
655
655
  page: "页面",
656
656
  grid: "网格",
657
657
  "grid-cell": "格子",
@@ -661,10 +661,10 @@ const Wa = { class: "v2-tree-node" }, Ua = ["data-tree-node-id"], ja = {
661
661
  image: "图片",
662
662
  html: "HTML 模块"
663
663
  };
664
- function De(e) {
665
- return rn[e] ?? e;
664
+ function Pe(e) {
665
+ return un[e] ?? e;
666
666
  }
667
- function Ne(e) {
667
+ function Ee(e) {
668
668
  switch (e.type) {
669
669
  case "page":
670
670
  return "页面";
@@ -681,173 +681,173 @@ function Ne(e) {
681
681
  case "html":
682
682
  return "HTML 模块";
683
683
  default:
684
- return De(e.type);
684
+ return Pe(e.type);
685
685
  }
686
686
  }
687
- function lt(e) {
687
+ function at(e) {
688
688
  return e.type === "grid" ? sn(e) : e.type === "page" ? {
689
689
  id: e.id,
690
- type: De(e.type),
691
- label: Ne(e),
692
- children: e.children.map(lt)
693
- } : { id: e.id, type: De(e.type), label: Ne(e), children: [] };
690
+ type: Pe(e.type),
691
+ label: Ee(e),
692
+ children: e.children.map(at)
693
+ } : { id: e.id, type: Pe(e.type), label: Ee(e), children: [] };
694
694
  }
695
695
  function sn(e) {
696
- const u = [];
696
+ const r = [];
697
697
  return e.rows.forEach((t, a) => {
698
- t.cells.forEach((n, r) => {
699
- u.push(vn(n, a, r, t.cells.length, e.rows.length));
698
+ t.cells.forEach((o, u) => {
699
+ r.push(vn(o, a, u, t.cells.length, e.rows.length));
700
700
  });
701
- }), { id: e.id, type: "网格", label: Ne(e), children: u };
701
+ }), { id: e.id, type: "网格", label: Ee(e), children: r };
702
702
  }
703
- function vn(e, u, t, a, n) {
704
- const r = n > 1 ? `格子 ${u + 1}-${t + 1}` : a > 1 ? `格子 ${t + 1}` : "格子";
703
+ function vn(e, r, t, a, o) {
704
+ const u = o > 1 ? `格子 ${r + 1}-${t + 1}` : a > 1 ? `格子 ${t + 1}` : "格子";
705
705
  return {
706
706
  id: e.id,
707
707
  type: "格子",
708
- label: r,
709
- children: e.children.map(lt)
708
+ label: u,
709
+ children: e.children.map(at)
710
710
  };
711
711
  }
712
- function cn(e, u) {
713
- const t = G(null), a = G(null), n = G([]), r = G(0);
714
- let b = null, s = 0;
715
- const f = P(() => Xe(e.value));
712
+ function cn(e, r) {
713
+ const t = G(null), a = G(null), o = G([]), u = G(0);
714
+ let f = null, s = 0;
715
+ const b = N(() => Ze(e.value));
716
716
  function v(w) {
717
717
  var c, h;
718
- let y = ((c = f.value.get(w)) == null ? void 0 : c.parent) ?? null;
719
- for (; y; ) {
720
- if (y.type === "table") return !0;
721
- y = ((h = f.value.get(y.id)) == null ? void 0 : h.parent) ?? null;
718
+ let S = ((c = b.value.get(w)) == null ? void 0 : c.parent) ?? null;
719
+ for (; S; ) {
720
+ if (S.type === "table") return !0;
721
+ S = ((h = b.value.get(S.id)) == null ? void 0 : h.parent) ?? null;
722
722
  }
723
723
  return !1;
724
724
  }
725
725
  function p(w) {
726
726
  var c;
727
- const y = (c = f.value.get(w)) == null ? void 0 : c.node;
728
- return !y || v(w) ? !1 : ke(y) || y.type === "grid-cell";
727
+ const S = (c = b.value.get(w)) == null ? void 0 : c.node;
728
+ return !S || v(w) ? !1 : De(S) || S.type === "grid-cell";
729
729
  }
730
- const g = P(() => {
731
- var y;
730
+ const g = N(() => {
731
+ var S;
732
732
  const w = t.value;
733
- return w && p(w) ? ((y = f.value.get(w)) == null ? void 0 : y.node) ?? null : null;
734
- }), L = P(
735
- () => g.value ? De(g.value.type) : "未选择"
736
- ), A = P(
733
+ return w && p(w) ? ((S = b.value.get(w)) == null ? void 0 : S.node) ?? null : null;
734
+ }), M = N(
735
+ () => g.value ? Pe(g.value.type) : "未选择"
736
+ ), A = N(
737
737
  () => {
738
738
  var w;
739
- return t.value ? ((w = f.value.get(t.value)) == null ? void 0 : w.ownerCell) ?? null : null;
739
+ return t.value ? ((w = b.value.get(t.value)) == null ? void 0 : w.ownerCell) ?? null : null;
740
740
  }
741
- ), H = P(
741
+ ), H = N(
742
742
  () => {
743
743
  var w;
744
744
  return ((w = g.value) == null ? void 0 : w.type) === "grid-cell" ? g.value : null;
745
745
  }
746
- ), U = P(() => {
746
+ ), U = N(() => {
747
747
  var c, h;
748
748
  const w = t.value;
749
749
  if (!w) return null;
750
- let y = ((c = f.value.get(w)) == null ? void 0 : c.parent) ?? null;
751
- for (; y && y.type !== "grid"; )
752
- y = ((h = f.value.get(y.id)) == null ? void 0 : h.parent) ?? null;
753
- return (y == null ? void 0 : y.type) === "grid" ? y : null;
754
- }), q = P(() => {
755
- const w = H.value, y = U.value;
756
- return !w || !y ? null : Pl(w, y);
757
- }), j = P(() => {
758
- var S, F, E;
750
+ let S = ((c = b.value.get(w)) == null ? void 0 : c.parent) ?? null;
751
+ for (; S && S.type !== "grid"; )
752
+ S = ((h = b.value.get(S.id)) == null ? void 0 : h.parent) ?? null;
753
+ return (S == null ? void 0 : S.type) === "grid" ? S : null;
754
+ }), Z = N(() => {
755
+ const w = H.value, S = U.value;
756
+ return !w || !S ? null : Pl(w, S);
757
+ }), j = N(() => {
758
+ var C, F, P;
759
759
  const w = t.value;
760
760
  if (!w) return null;
761
- const y = f.value.get(w);
762
- if ((y == null ? void 0 : y.node.type) !== "grid-cell" || ((S = y.parent) == null ? void 0 : S.type) !== "grid-row") return null;
763
- const c = y.parent, h = (F = f.value.get(c.id)) != null && F.node ? (((E = U.value) == null ? void 0 : E.rows) ?? []).findIndex((N) => N.id === c.id) : -1, m = c.cells.findIndex((N) => N.id === w);
761
+ const S = b.value.get(w);
762
+ if ((S == null ? void 0 : S.node.type) !== "grid-cell" || ((C = S.parent) == null ? void 0 : C.type) !== "grid-row") return null;
763
+ const c = S.parent, h = (F = b.value.get(c.id)) != null && F.node ? (((P = U.value) == null ? void 0 : P.rows) ?? []).findIndex((D) => D.id === c.id) : -1, m = c.cells.findIndex((D) => D.id === w);
764
764
  return m < 0 ? null : {
765
765
  rowIndex: h,
766
766
  columnIndex: m,
767
767
  hasNextSibling: m < c.cells.length - 1,
768
- canSplit: (y.node.colspan ?? 1) > 1
768
+ canSplit: (S.node.colspan ?? 1) > 1
769
769
  };
770
- }), te = P(() => {
770
+ }), le = N(() => {
771
771
  var h, m;
772
- const w = a.value, y = w ? (h = f.value.get(w)) == null ? void 0 : h.node : void 0;
773
- if ((y == null ? void 0 : y.type) === "grid-cell" || (y == null ? void 0 : y.type) === "table-cell-template") return y;
774
- const c = t.value ? (m = f.value.get(t.value)) == null ? void 0 : m.node : void 0;
772
+ const w = a.value, S = w ? (h = b.value.get(w)) == null ? void 0 : h.node : void 0;
773
+ if ((S == null ? void 0 : S.type) === "grid-cell" || (S == null ? void 0 : S.type) === "table-cell-template") return S;
774
+ const c = t.value ? (m = b.value.get(t.value)) == null ? void 0 : m.node : void 0;
775
775
  return (c == null ? void 0 : c.type) === "grid-cell" || (c == null ? void 0 : c.type) === "table-cell-template" ? c : A.value;
776
- }), ee = P(() => e.value.pages.map((w) => lt(w)));
777
- function k() {
778
- t.value = null, a.value = null, n.value = [], r.value = 0, b = null, s = 0;
779
- }
780
- function Y(w) {
781
- var F, E;
782
- if (!u.editable()) return;
783
- const y = w.target;
784
- a.value = ((F = y.closest(`[${he}]`)) == null ? void 0 : F.dataset.layoutId) ?? null;
776
+ }), ee = N(() => e.value.pages.map((w) => at(w)));
777
+ function T() {
778
+ t.value = null, a.value = null, o.value = [], u.value = 0, f = null, s = 0;
779
+ }
780
+ function J(w) {
781
+ var F, P;
782
+ if (!r.editable()) return;
783
+ const S = w.target;
784
+ a.value = ((F = S.closest(`[${$e}]`)) == null ? void 0 : F.dataset.layoutId) ?? null;
785
785
  const c = [];
786
- let h = y.closest(`[${$e}]`);
786
+ let h = S.closest(`[${we}]`);
787
787
  for (; h; ) {
788
- const N = h.dataset.nodeId;
789
- N && c.push(N), h = ((E = h.parentElement) == null ? void 0 : E.closest(`[${$e}]`)) ?? null;
788
+ const D = h.dataset.nodeId;
789
+ D && c.push(D), h = ((P = h.parentElement) == null ? void 0 : P.closest(`[${we}]`)) ?? null;
790
790
  }
791
- const m = c.filter((N) => p(N)), S = m[0] ?? null;
792
- if (!S) {
793
- t.value = null, a.value = null, n.value = [], r.value = 0, b = null, s = 0;
791
+ const m = c.filter((D) => p(D)), C = m[0] ?? null;
792
+ if (!C) {
793
+ t.value = null, a.value = null, o.value = [], u.value = 0, f = null, s = 0;
794
794
  return;
795
795
  }
796
- S === b && n.value.join("/") === m.join("/") ? s = (s + 1) % m.length : (b = S, s = 0, n.value = m), r.value = s, t.value = m[s] ?? S;
796
+ C === f && o.value.join("/") === m.join("/") ? s = (s + 1) % m.length : (f = C, s = 0, o.value = m), u.value = s, t.value = m[s] ?? C;
797
797
  }
798
- function J(w) {
799
- var m, S, F;
800
- const y = f.value, c = [];
801
- let h = w.nodeId ? (m = y.get(w.nodeId)) == null ? void 0 : m.node : void 0;
798
+ function K(w) {
799
+ var m, C, F;
800
+ const S = b.value, c = [];
801
+ let h = w.nodeId ? (m = S.get(w.nodeId)) == null ? void 0 : m.node : void 0;
802
802
  for (; h; )
803
- ke(h) && c.push(h.id), h = ((S = y.get(h.id)) == null ? void 0 : S.parent) ?? void 0;
803
+ De(h) && c.push(h.id), h = ((C = S.get(h.id)) == null ? void 0 : C.parent) ?? void 0;
804
804
  if (c.length === 0) {
805
- const E = (F = e.value.pages[0]) == null ? void 0 : F.id;
806
- if (!E) return;
807
- c.push(E);
805
+ const P = (F = e.value.pages[0]) == null ? void 0 : F.id;
806
+ if (!P) return;
807
+ c.push(P);
808
808
  }
809
- t.value = c[0], a.value = null, n.value = c, r.value = 0, s = 0, b = c[0];
809
+ t.value = c[0], a.value = null, o.value = c, u.value = 0, s = 0, f = c[0];
810
810
  }
811
- function Z(w) {
811
+ function _(w) {
812
812
  var m;
813
- if (!u.editable()) return;
814
- const y = f.value.get(w);
815
- if (!y || !ke(y.node) && y.node.type !== "grid-cell") return;
813
+ if (!r.editable()) return;
814
+ const S = b.value.get(w);
815
+ if (!S || !De(S.node) && S.node.type !== "grid-cell") return;
816
816
  t.value = w, a.value = null;
817
817
  const c = [];
818
- let h = y.parent;
818
+ let h = S.parent;
819
819
  for (; h; )
820
- ke(h) && c.unshift(h.id), h = ((m = f.value.get(h.id)) == null ? void 0 : m.parent) ?? null;
821
- n.value = [...c, w], r.value = n.value.length - 1, s = n.value.length - 1, b = w;
820
+ De(h) && c.unshift(h.id), h = ((m = b.value.get(h.id)) == null ? void 0 : m.parent) ?? null;
821
+ o.value = [...c, w], u.value = o.value.length - 1, s = o.value.length - 1, f = w;
822
822
  }
823
823
  return {
824
824
  selectedNodeId: t,
825
825
  selectedInsertionSlotId: a,
826
- selectionPathIds: n,
827
- selectionPathIndex: r,
828
- nodeIndex: f,
826
+ selectionPathIds: o,
827
+ selectionPathIndex: u,
828
+ nodeIndex: b,
829
829
  selectedNode: g,
830
- selectedNodeType: L,
830
+ selectedNodeType: M,
831
831
  selectedOwnerCell: A,
832
832
  selectedCell: H,
833
833
  selectedOwnerGridOfCell: U,
834
- selectedCellBox: q,
834
+ selectedCellBox: Z,
835
835
  selectedCellContext: j,
836
- insertionSlot: te,
836
+ insertionSlot: le,
837
837
  nodeTree: ee,
838
838
  isInsideTable: v,
839
839
  isStyleEditableNodeId: p,
840
- clearSelection: k,
841
- selectNode: Y,
842
- selectNodeById: Z,
843
- selectIssue: J
840
+ clearSelection: T,
841
+ selectNode: J,
842
+ selectNodeById: _,
843
+ selectIssue: K
844
844
  };
845
845
  }
846
- const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-control--toggle" }, gn = ["checked"], mn = { class: "v2-control v2-control--inline" }, bn = ["value"], hn = { class: "v2-control v2-control--inline" }, yn = ["value"], Sn = { class: "v2-control v2-control--inline" }, $n = ["value"], Cn = { class: "v2-grid-dimensions" }, wn = { class: "v2-control v2-control--inline" }, In = ["value"], xn = { class: "v2-control v2-control--inline" }, Tn = ["value"], kn = {
846
+ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-control--toggle" }, bn = ["checked"], gn = { class: "v2-control v2-control--inline" }, mn = ["value"], hn = { class: "v2-control v2-control--inline" }, yn = ["value"], Sn = { class: "v2-control v2-control--inline" }, $n = ["value"], Cn = { class: "v2-grid-dimensions" }, wn = { class: "v2-control v2-control--inline" }, In = ["value"], xn = { class: "v2-control v2-control--inline" }, kn = ["value"], Tn = {
847
847
  key: 0,
848
848
  class: "v2-hint",
849
849
  style: { color: "#b45309" }
850
- }, Fn = { class: "v2-grid-dimensions" }, Dn = { class: "v2-control v2-control--inline" }, Nn = ["value"], Pn = { class: "v2-control v2-control--inline" }, En = ["value"], An = { class: "v2-control v2-control--toggle" }, Hn = ["checked"], Jt = /* @__PURE__ */ X({
850
+ }, Fn = { class: "v2-grid-dimensions" }, Dn = { class: "v2-control v2-control--inline" }, Nn = ["value"], Pn = { class: "v2-control v2-control--inline" }, En = ["value"], An = { class: "v2-control v2-control--toggle" }, Hn = ["checked"], Zt = /* @__PURE__ */ X({
851
851
  __name: "HeaderFooterFields",
852
852
  props: {
853
853
  label: {},
@@ -857,52 +857,52 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
857
857
  margin: {}
858
858
  },
859
859
  setup(e) {
860
- const u = e, t = P(
861
- () => u.kind === "header" ? u.api.updatePaperHeaderEnabled : u.api.updatePaperFooterEnabled
862
- ), a = P(
863
- () => u.kind === "header" ? u.api.updatePaperHeaderContent : u.api.updatePaperFooterContent
864
- ), n = P(
865
- () => u.kind === "header" ? u.api.updatePaperHeaderHeight : u.api.updatePaperFooterHeight
866
- ), r = P(
867
- () => u.kind === "header" ? u.api.updatePaperHeaderSeparator : u.api.updatePaperFooterSeparator
868
- ), b = P(
869
- () => u.kind === "header" ? u.api.updatePaperHeaderFontSize : u.api.updatePaperFooterFontSize
870
- ), s = P(
871
- () => u.kind === "header" ? u.api.updatePaperHeaderFontWeight : u.api.updatePaperFooterFontWeight
872
- ), f = P(
873
- () => u.kind === "header" ? u.api.updatePaperHeaderColor : u.api.updatePaperFooterColor
874
- ), v = P(() => {
860
+ const r = e, t = N(
861
+ () => r.kind === "header" ? r.api.updatePaperHeaderEnabled : r.api.updatePaperFooterEnabled
862
+ ), a = N(
863
+ () => r.kind === "header" ? r.api.updatePaperHeaderContent : r.api.updatePaperFooterContent
864
+ ), o = N(
865
+ () => r.kind === "header" ? r.api.updatePaperHeaderHeight : r.api.updatePaperFooterHeight
866
+ ), u = N(
867
+ () => r.kind === "header" ? r.api.updatePaperHeaderSeparator : r.api.updatePaperFooterSeparator
868
+ ), f = N(
869
+ () => r.kind === "header" ? r.api.updatePaperHeaderFontSize : r.api.updatePaperFooterFontSize
870
+ ), s = N(
871
+ () => r.kind === "header" ? r.api.updatePaperHeaderFontWeight : r.api.updatePaperFooterFontWeight
872
+ ), b = N(
873
+ () => r.kind === "header" ? r.api.updatePaperHeaderColor : r.api.updatePaperFooterColor
874
+ ), v = N(() => {
875
875
  var p;
876
- return ((p = u.band) == null ? void 0 : p.enabled) === !0;
876
+ return ((p = r.band) == null ? void 0 : p.enabled) === !0;
877
877
  });
878
878
  return (p, g) => {
879
- var L, A, H, U, q, j, te, ee, k, Y, J, Z, w, y, c, h;
880
- return $(), I(_, null, [
881
- l("div", pn, D(e.label), 1),
879
+ var M, A, H, U, Z, j, le, ee, T, J, K, _, w, S, c, h;
880
+ return $(), I(Q, null, [
881
+ l("div", pn, E(e.label), 1),
882
882
  l("label", fn, [
883
883
  l("input", {
884
884
  type: "checkbox",
885
- checked: ((L = e.band) == null ? void 0 : L.enabled) === !0,
885
+ checked: ((M = e.band) == null ? void 0 : M.enabled) === !0,
886
886
  onChange: g[0] || (g[0] = //@ts-ignore
887
887
  (...m) => t.value && t.value(...m))
888
- }, null, 40, gn),
889
- l("span", null, "启用" + D(e.label), 1)
888
+ }, null, 40, bn),
889
+ l("span", null, "启用" + E(e.label), 1)
890
890
  ]),
891
- v.value ? ($(), I(_, { key: 0 }, [
892
- l("label", mn, [
891
+ v.value ? ($(), I(Q, { key: 0 }, [
892
+ l("label", gn, [
893
893
  g[9] || (g[9] = l("span", null, "左", -1)),
894
894
  l("input", {
895
895
  type: "text",
896
896
  value: ((H = (A = e.band) == null ? void 0 : A.content) == null ? void 0 : H.left) ?? "",
897
897
  placeholder: "变量: {page} {total}",
898
898
  onChange: g[1] || (g[1] = (m) => a.value("left", m))
899
- }, null, 40, bn)
899
+ }, null, 40, mn)
900
900
  ]),
901
901
  l("label", hn, [
902
902
  g[10] || (g[10] = l("span", null, "中", -1)),
903
903
  l("input", {
904
904
  type: "text",
905
- value: ((q = (U = e.band) == null ? void 0 : U.content) == null ? void 0 : q.center) ?? "",
905
+ value: ((Z = (U = e.band) == null ? void 0 : U.content) == null ? void 0 : Z.center) ?? "",
906
906
  placeholder: "变量: {page} {total}",
907
907
  onChange: g[2] || (g[2] = (m) => a.value("center", m))
908
908
  }, null, 40, yn)
@@ -911,7 +911,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
911
911
  g[11] || (g[11] = l("span", null, "右", -1)),
912
912
  l("input", {
913
913
  type: "text",
914
- value: ((te = (j = e.band) == null ? void 0 : j.content) == null ? void 0 : te.right) ?? "",
914
+ value: ((le = (j = e.band) == null ? void 0 : j.content) == null ? void 0 : le.right) ?? "",
915
915
  placeholder: "变量: {page} {total}",
916
916
  onChange: g[3] || (g[3] = (m) => a.value("right", m))
917
917
  }, null, 40, $n)
@@ -925,7 +925,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
925
925
  step: "1",
926
926
  value: ((ee = e.band) == null ? void 0 : ee.height) ?? x(El),
927
927
  onChange: g[4] || (g[4] = //@ts-ignore
928
- (...m) => n.value && n.value(...m))
928
+ (...m) => o.value && o.value(...m))
929
929
  }, null, 40, In)
930
930
  ]),
931
931
  l("label", xn, [
@@ -934,18 +934,18 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
934
934
  type: "number",
935
935
  min: "1",
936
936
  step: "1",
937
- value: ((Y = (k = e.band) == null ? void 0 : k.style) == null ? void 0 : Y.fontSize) ?? 12,
937
+ value: ((J = (T = e.band) == null ? void 0 : T.style) == null ? void 0 : J.fontSize) ?? 12,
938
938
  onChange: g[5] || (g[5] = //@ts-ignore
939
- (...m) => b.value && b.value(...m))
940
- }, null, 40, Tn)
939
+ (...m) => f.value && f.value(...m))
940
+ }, null, 40, kn)
941
941
  ])
942
942
  ]),
943
- ((J = e.band) == null ? void 0 : J.height) != null && e.margin != null && e.band.height > e.margin ? ($(), I("p", kn, " 高度 " + D(e.band.height) + "mm 超过纸张边距 " + D(e.margin) + "mm:显示时已按边距 收敛(页眉/页脚画在边距内,超出会压到正文、打印被裁切)。 ", 1)) : K("", !0),
943
+ ((K = e.band) == null ? void 0 : K.height) != null && e.margin != null && e.band.height > e.margin ? ($(), I("p", Tn, " 高度 " + E(e.band.height) + "mm 超过纸张边距 " + E(e.margin) + "mm:显示时已按边距 收敛(页眉/页脚画在边距内,超出会压到正文、打印被裁切)。 ", 1)) : q("", !0),
944
944
  l("div", Fn, [
945
945
  l("label", Dn, [
946
946
  g[15] || (g[15] = l("span", null, "粗细", -1)),
947
947
  l("select", {
948
- value: ((w = (Z = e.band) == null ? void 0 : Z.style) == null ? void 0 : w.fontWeight) ?? "normal",
948
+ value: ((w = (_ = e.band) == null ? void 0 : _.style) == null ? void 0 : w.fontWeight) ?? "normal",
949
949
  onChange: g[6] || (g[6] = //@ts-ignore
950
950
  (...m) => s.value && s.value(...m))
951
951
  }, [...g[14] || (g[14] = [
@@ -957,9 +957,9 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
957
957
  g[16] || (g[16] = l("span", null, "颜色", -1)),
958
958
  l("input", {
959
959
  type: "color",
960
- value: ((c = (y = e.band) == null ? void 0 : y.style) == null ? void 0 : c.color) ?? "#111827",
960
+ value: ((c = (S = e.band) == null ? void 0 : S.style) == null ? void 0 : c.color) ?? "#111827",
961
961
  onChange: g[7] || (g[7] = //@ts-ignore
962
- (...m) => f.value && f.value(...m))
962
+ (...m) => b.value && b.value(...m))
963
963
  }, null, 40, En)
964
964
  ])
965
965
  ]),
@@ -968,17 +968,17 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
968
968
  type: "checkbox",
969
969
  checked: ((h = e.band) == null ? void 0 : h.separator) !== !1,
970
970
  onChange: g[8] || (g[8] = //@ts-ignore
971
- (...m) => r.value && r.value(...m))
971
+ (...m) => u.value && u.value(...m))
972
972
  }, null, 40, Hn),
973
973
  g[17] || (g[17] = l("span", null, "分隔线", -1))
974
974
  ])
975
- ], 64)) : K("", !0)
975
+ ], 64)) : q("", !0)
976
976
  ], 64);
977
977
  };
978
978
  }
979
- }), Rn = { class: "v2-control v2-control--inline" }, Ln = ["value"], Mn = { class: "v2-grid-dimensions" }, Bn = { class: "v2-control v2-control--inline" }, Vn = ["value"], Gn = { class: "v2-control v2-control--inline" }, zn = ["value"], On = { class: "v2-control v2-control--inline" }, Wn = ["value"], Un = { class: "v2-control v2-control--inline" }, jn = ["value"], Yn = { class: "v2-control v2-control--inline" }, Jn = ["value"], Kn = { class: "v2-control v2-control--toggle" }, qn = /* @__PURE__ */ X({
979
+ }), Rn = { class: "v2-control v2-control--inline" }, Ln = ["value"], Mn = { class: "v2-grid-dimensions" }, Bn = { class: "v2-control v2-control--inline" }, Vn = ["value"], Gn = { class: "v2-control v2-control--inline" }, zn = ["value"], On = { class: "v2-control v2-control--inline" }, Wn = ["value"], Un = { class: "v2-control v2-control--inline" }, jn = ["value"], Jn = { class: "v2-control v2-control--inline" }, Kn = ["value"], qn = { class: "v2-control v2-control--toggle" }, Yn = /* @__PURE__ */ X({
980
980
  __name: "PageInspector",
981
- props: /* @__PURE__ */ qe({
981
+ props: /* @__PURE__ */ Xe({
982
982
  paperSize: {},
983
983
  baseRowHeight: {},
984
984
  paperMarginTop: {},
@@ -994,15 +994,15 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
994
994
  }),
995
995
  emits: ["update:paginate"],
996
996
  setup(e) {
997
- const u = _t(e, "paginate");
998
- return (t, a) => ($(), I(_, null, [
997
+ const r = al(e, "paginate");
998
+ return (t, a) => ($(), I(Q, null, [
999
999
  a[15] || (a[15] = l("div", { class: "v2-sidebar__subheading" }, "页面设置", -1)),
1000
1000
  l("label", Rn, [
1001
1001
  a[8] || (a[8] = l("span", null, "纸张类型", -1)),
1002
1002
  l("select", {
1003
1003
  value: e.paperSize,
1004
1004
  onChange: a[0] || (a[0] = //@ts-ignore
1005
- (...n) => e.api.updatePaperSize && e.api.updatePaperSize(...n))
1005
+ (...o) => e.api.updatePaperSize && e.api.updatePaperSize(...o))
1006
1006
  }, [...a[7] || (a[7] = [
1007
1007
  l("option", { value: "A4" }, "A4(纵向)", -1),
1008
1008
  l("option", { value: "A3" }, "A3(横向)", -1)
@@ -1017,7 +1017,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1017
1017
  max: "99",
1018
1018
  step: "1",
1019
1019
  value: e.paperMarginTop,
1020
- onChange: a[1] || (a[1] = (n) => e.api.updatePaperMarginSide("top", n))
1020
+ onChange: a[1] || (a[1] = (o) => e.api.updatePaperMarginSide("top", o))
1021
1021
  }, null, 40, Vn)
1022
1022
  ]),
1023
1023
  l("label", Gn, [
@@ -1028,7 +1028,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1028
1028
  max: "99",
1029
1029
  step: "1",
1030
1030
  value: e.paperMarginRight,
1031
- onChange: a[2] || (a[2] = (n) => e.api.updatePaperMarginSide("right", n))
1031
+ onChange: a[2] || (a[2] = (o) => e.api.updatePaperMarginSide("right", o))
1032
1032
  }, null, 40, zn)
1033
1033
  ]),
1034
1034
  l("label", On, [
@@ -1039,7 +1039,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1039
1039
  max: "99",
1040
1040
  step: "1",
1041
1041
  value: e.paperMarginBottom,
1042
- onChange: a[3] || (a[3] = (n) => e.api.updatePaperMarginSide("bottom", n))
1042
+ onChange: a[3] || (a[3] = (o) => e.api.updatePaperMarginSide("bottom", o))
1043
1043
  }, null, 40, Wn)
1044
1044
  ]),
1045
1045
  l("label", Un, [
@@ -1050,11 +1050,11 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1050
1050
  max: "99",
1051
1051
  step: "1",
1052
1052
  value: e.paperMarginLeft,
1053
- onChange: a[4] || (a[4] = (n) => e.api.updatePaperMarginSide("left", n))
1053
+ onChange: a[4] || (a[4] = (o) => e.api.updatePaperMarginSide("left", o))
1054
1054
  }, null, 40, jn)
1055
1055
  ])
1056
1056
  ]),
1057
- l("label", Yn, [
1057
+ l("label", Jn, [
1058
1058
  a[13] || (a[13] = l("span", null, "行高(mm)", -1)),
1059
1059
  l("input", {
1060
1060
  type: "number",
@@ -1063,27 +1063,27 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1063
1063
  step: "1",
1064
1064
  value: e.baseRowHeight,
1065
1065
  onChange: a[5] || (a[5] = //@ts-ignore
1066
- (...n) => e.api.updateBaseRowHeight && e.api.updateBaseRowHeight(...n))
1067
- }, null, 40, Jn)
1066
+ (...o) => e.api.updateBaseRowHeight && e.api.updateBaseRowHeight(...o))
1067
+ }, null, 40, Kn)
1068
1068
  ]),
1069
- l("label", Kn, [
1070
- Cl(l("input", {
1071
- "onUpdate:modelValue": a[6] || (a[6] = (n) => u.value = n),
1069
+ l("label", qn, [
1070
+ wl(l("input", {
1071
+ "onUpdate:modelValue": a[6] || (a[6] = (o) => r.value = o),
1072
1072
  type: "checkbox",
1073
1073
  "data-paginate": "true"
1074
1074
  }, null, 512), [
1075
- [wl, u.value]
1075
+ [Il, r.value]
1076
1076
  ]),
1077
1077
  a[14] || (a[14] = l("span", null, "分页显示(仅影响编辑画面,打印始终分页)", -1))
1078
1078
  ]),
1079
- le(Jt, {
1079
+ ae(Zt, {
1080
1080
  label: "页眉",
1081
1081
  kind: "header",
1082
1082
  band: e.header,
1083
1083
  margin: e.paperMarginTop,
1084
1084
  api: e.api
1085
1085
  }, null, 8, ["band", "margin", "api"]),
1086
- le(Jt, {
1086
+ ae(Zt, {
1087
1087
  label: "页脚",
1088
1088
  kind: "footer",
1089
1089
  band: e.footer,
@@ -1092,16 +1092,16 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1092
1092
  }, null, 8, ["band", "margin", "api"])
1093
1093
  ], 64));
1094
1094
  }
1095
- }), Xn = { class: "v2-grid-dimensions" }, Zn = { class: "v2-control" }, Qn = ["value"], _n = { class: "v2-control" }, eo = ["value"], to = { class: "v2-grid-dimensions" }, lo = ["value", "onChange"], ao = { class: "v2-control" }, no = ["value"], oo = { class: "v2-grid-dimensions" }, io = { class: "v2-control v2-control--inline" }, uo = ["value"], ro = { class: "v2-control v2-control--inline" }, so = ["value"], vo = { class: "v2-control v2-control--inline" }, co = ["value"], po = { class: "v2-control v2-control--inline" }, fo = ["value"], go = /* @__PURE__ */ X({
1095
+ }), Xn = { class: "v2-grid-dimensions" }, Zn = { class: "v2-control" }, Qn = ["value"], _n = { class: "v2-control" }, eo = ["value"], to = { class: "v2-grid-dimensions" }, lo = ["value", "onChange"], ao = { class: "v2-control" }, no = ["value"], oo = { class: "v2-grid-dimensions" }, io = { class: "v2-control v2-control--inline" }, ro = ["value"], uo = { class: "v2-control v2-control--inline" }, so = ["value"], vo = { class: "v2-control v2-control--inline" }, co = ["value"], po = { class: "v2-control v2-control--inline" }, fo = ["value"], bo = /* @__PURE__ */ X({
1096
1096
  __name: "GridInspector",
1097
1097
  props: {
1098
1098
  node: {},
1099
1099
  api: {}
1100
1100
  },
1101
1101
  setup(e) {
1102
- return (u, t) => {
1102
+ return (r, t) => {
1103
1103
  var a;
1104
- return $(), I(_, null, [
1104
+ return $(), I(Q, null, [
1105
1105
  l("div", Xn, [
1106
1106
  l("label", Zn, [
1107
1107
  t[7] || (t[7] = l("span", null, "行数", -1)),
@@ -1112,7 +1112,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1112
1112
  value: e.node.rows.length,
1113
1113
  "data-dimension": "rows",
1114
1114
  onChange: t[0] || (t[0] = //@ts-ignore
1115
- (...n) => e.api.updateGridDimensions && e.api.updateGridDimensions(...n))
1115
+ (...o) => e.api.updateGridDimensions && e.api.updateGridDimensions(...o))
1116
1116
  }, null, 40, Qn)
1117
1117
  ]),
1118
1118
  l("label", _n, [
@@ -1124,23 +1124,23 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1124
1124
  value: ((a = e.node.rows[0]) == null ? void 0 : a.cells.length) ?? 1,
1125
1125
  "data-dimension": "columns",
1126
1126
  onChange: t[1] || (t[1] = //@ts-ignore
1127
- (...n) => e.api.updateGridDimensions && e.api.updateGridDimensions(...n))
1127
+ (...o) => e.api.updateGridDimensions && e.api.updateGridDimensions(...o))
1128
1128
  }, null, 40, eo)
1129
1129
  ])
1130
1130
  ]),
1131
1131
  t[17] || (t[17] = l("div", { class: "v2-sidebar__subheading" }, "列宽(mm / 比例 / 自动)", -1)),
1132
1132
  l("div", to, [
1133
- ($(!0), I(_, null, ye(e.node.rows[0].cells, (n, r) => {
1134
- var b;
1133
+ ($(!0), I(Q, null, ge(e.node.rows[0].cells, (o, u) => {
1134
+ var f;
1135
1135
  return $(), I("label", {
1136
- key: r,
1136
+ key: u,
1137
1137
  class: "v2-control v2-control--inline"
1138
1138
  }, [
1139
- l("span", null, "第 " + D(r + 1) + " 列", 1),
1139
+ l("span", null, "第 " + E(u + 1) + " 列", 1),
1140
1140
  l("input", {
1141
- value: ((b = e.node.columns) == null ? void 0 : b[r]) ?? n.width ?? "1fr",
1141
+ value: ((f = e.node.columns) == null ? void 0 : f[u]) ?? o.width ?? "1fr",
1142
1142
  placeholder: "如 30、1fr、auto",
1143
- onChange: (s) => e.api.updateGridColumnWidth(r, s)
1143
+ onChange: (s) => e.api.updateGridColumnWidth(u, s)
1144
1144
  }, null, 40, lo)
1145
1145
  ]);
1146
1146
  }), 128))
@@ -1150,7 +1150,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1150
1150
  l("select", {
1151
1151
  value: e.node.border,
1152
1152
  onChange: t[2] || (t[2] = //@ts-ignore
1153
- (...n) => e.api.updateGridBorder && e.api.updateGridBorder(...n))
1153
+ (...o) => e.api.updateGridBorder && e.api.updateGridBorder(...o))
1154
1154
  }, [...t[9] || (t[9] = [
1155
1155
  l("option", { value: "all" }, "外框 + 内部", -1),
1156
1156
  l("option", { value: "outer" }, "仅外框", -1),
@@ -1169,10 +1169,10 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1169
1169
  "data-grid": "gap",
1170
1170
  value: e.node.gap ?? "",
1171
1171
  onChange: t[3] || (t[3] = //@ts-ignore
1172
- (...n) => e.api.updateGridGap && e.api.updateGridGap(...n))
1173
- }, null, 40, uo)
1172
+ (...o) => e.api.updateGridGap && e.api.updateGridGap(...o))
1173
+ }, null, 40, ro)
1174
1174
  ]),
1175
- l("label", ro, [
1175
+ l("label", uo, [
1176
1176
  t[12] || (t[12] = l("span", null, "默认内边距(mm)", -1)),
1177
1177
  l("input", {
1178
1178
  type: "number",
@@ -1180,7 +1180,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1180
1180
  step: "1",
1181
1181
  "data-cell-default": "padding",
1182
1182
  value: e.node.cellPadding ?? "",
1183
- onChange: t[4] || (t[4] = (n) => e.api.updateGridCellDefault("cellPadding", n))
1183
+ onChange: t[4] || (t[4] = (o) => e.api.updateGridCellDefault("cellPadding", o))
1184
1184
  }, null, 40, so)
1185
1185
  ]),
1186
1186
  l("label", vo, [
@@ -1188,7 +1188,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1188
1188
  l("select", {
1189
1189
  "data-cell-default": "align",
1190
1190
  value: e.node.cellAlign ?? "",
1191
- onChange: t[5] || (t[5] = (n) => e.api.updateGridCellDefault("cellAlign", n))
1191
+ onChange: t[5] || (t[5] = (o) => e.api.updateGridCellDefault("cellAlign", o))
1192
1192
  }, [...t[13] || (t[13] = [
1193
1193
  l("option", { value: "" }, "居中(默认)", -1),
1194
1194
  l("option", { value: "left" }, "左", -1),
@@ -1201,7 +1201,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1201
1201
  l("select", {
1202
1202
  "data-cell-default": "valign",
1203
1203
  value: e.node.cellVerticalAlign ?? "",
1204
- onChange: t[6] || (t[6] = (n) => e.api.updateGridCellDefault("cellVerticalAlign", n))
1204
+ onChange: t[6] || (t[6] = (o) => e.api.updateGridCellDefault("cellVerticalAlign", o))
1205
1205
  }, [...t[15] || (t[15] = [
1206
1206
  l("option", { value: "" }, "居中(默认)", -1),
1207
1207
  l("option", { value: "top" }, "顶部", -1),
@@ -1213,7 +1213,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1213
1213
  ], 64);
1214
1214
  };
1215
1215
  }
1216
- }), mo = { class: "v2-control v2-control--inline" }, bo = ["checked"], ho = { class: "v2-toolbar v2-toolbar--row" }, yo = ["disabled"], So = ["disabled"], $o = { class: "v2-grid-dimensions" }, Co = { class: "v2-control" }, wo = ["value"], Io = { class: "v2-control" }, xo = ["value"], To = { class: "v2-control" }, ko = ["value"], Fo = { class: "v2-control" }, Do = ["value"], No = /* @__PURE__ */ X({
1216
+ }), go = { class: "v2-control v2-control--inline" }, mo = ["checked"], ho = { class: "v2-toolbar v2-toolbar--row" }, yo = ["disabled"], So = ["disabled"], $o = { class: "v2-grid-dimensions" }, Co = { class: "v2-control" }, wo = ["value"], Io = { class: "v2-control" }, xo = ["value"], ko = { class: "v2-control" }, To = ["value"], Fo = { class: "v2-control" }, Do = ["value"], No = /* @__PURE__ */ X({
1217
1217
  __name: "CellInspector",
1218
1218
  props: {
1219
1219
  node: {},
@@ -1222,18 +1222,18 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1222
1222
  api: {}
1223
1223
  },
1224
1224
  setup(e) {
1225
- return (u, t) => {
1226
- var a, n;
1227
- return $(), I(_, null, [
1228
- l("label", mo, [
1225
+ return (r, t) => {
1226
+ var a, o;
1227
+ return $(), I(Q, null, [
1228
+ l("label", go, [
1229
1229
  t[7] || (t[7] = l("span", null, "内容撑满格子", -1)),
1230
1230
  l("input", {
1231
1231
  type: "checkbox",
1232
1232
  "data-flex": "true",
1233
1233
  checked: !!e.node.flex,
1234
1234
  onChange: t[0] || (t[0] = //@ts-ignore
1235
- (...r) => e.api.updateSelectedCellFlex && e.api.updateSelectedCellFlex(...r))
1236
- }, null, 40, bo)
1235
+ (...u) => e.api.updateSelectedCellFlex && e.api.updateSelectedCellFlex(...u))
1236
+ }, null, 40, mo)
1237
1237
  ]),
1238
1238
  t[14] || (t[14] = l("div", { class: "v2-sidebar__subheading" }, "合并 / 拆分", -1)),
1239
1239
  l("div", ho, [
@@ -1243,15 +1243,15 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1243
1243
  "data-cell-merge": "true",
1244
1244
  disabled: !((a = e.cellContext) != null && a.hasNextSibling),
1245
1245
  onClick: t[1] || (t[1] = //@ts-ignore
1246
- (...r) => e.api.mergeSelectedCellRight && e.api.mergeSelectedCellRight(...r))
1246
+ (...u) => e.api.mergeSelectedCellRight && e.api.mergeSelectedCellRight(...u))
1247
1247
  }, " 合并右侧相邻格 ", 8, yo),
1248
1248
  l("button", {
1249
1249
  class: "v2-toolbar__button",
1250
1250
  type: "button",
1251
1251
  "data-cell-split": "true",
1252
- disabled: !((n = e.cellContext) != null && n.canSplit),
1252
+ disabled: !((o = e.cellContext) != null && o.canSplit),
1253
1253
  onClick: t[2] || (t[2] = //@ts-ignore
1254
- (...r) => e.api.splitSelectedCell && e.api.splitSelectedCell(...r))
1254
+ (...u) => e.api.splitSelectedCell && e.api.splitSelectedCell(...u))
1255
1255
  }, " 拆分此格 ", 8, So)
1256
1256
  ]),
1257
1257
  l("div", $o, [
@@ -1264,7 +1264,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1264
1264
  "data-cell-padding": "true",
1265
1265
  value: e.node.padding ?? "",
1266
1266
  onChange: t[3] || (t[3] = //@ts-ignore
1267
- (...r) => e.api.updateSelectedCellPadding && e.api.updateSelectedCellPadding(...r))
1267
+ (...u) => e.api.updateSelectedCellPadding && e.api.updateSelectedCellPadding(...u))
1268
1268
  }, null, 40, wo)
1269
1269
  ]),
1270
1270
  l("label", Io, [
@@ -1275,28 +1275,28 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1275
1275
  step: "1",
1276
1276
  value: e.node.rowHeight ?? "",
1277
1277
  onChange: t[4] || (t[4] = //@ts-ignore
1278
- (...r) => e.api.updateSelectedCellRowHeight && e.api.updateSelectedCellRowHeight(...r))
1278
+ (...u) => e.api.updateSelectedCellRowHeight && e.api.updateSelectedCellRowHeight(...u))
1279
1279
  }, null, 40, xo)
1280
1280
  ]),
1281
- l("label", To, [
1281
+ l("label", ko, [
1282
1282
  t[11] || (t[11] = l("span", null, "水平对齐", -1)),
1283
1283
  l("select", {
1284
1284
  value: e.node.align ?? "",
1285
1285
  onChange: t[5] || (t[5] = //@ts-ignore
1286
- (...r) => e.api.updateSelectedCellAlign && e.api.updateSelectedCellAlign(...r))
1286
+ (...u) => e.api.updateSelectedCellAlign && e.api.updateSelectedCellAlign(...u))
1287
1287
  }, [...t[10] || (t[10] = [
1288
1288
  l("option", { value: "" }, "默认(居中)", -1),
1289
1289
  l("option", { value: "left" }, "左", -1),
1290
1290
  l("option", { value: "center" }, "居中", -1),
1291
1291
  l("option", { value: "right" }, "右", -1)
1292
- ])], 40, ko)
1292
+ ])], 40, To)
1293
1293
  ]),
1294
1294
  l("label", Fo, [
1295
1295
  t[13] || (t[13] = l("span", null, "垂直对齐", -1)),
1296
1296
  l("select", {
1297
1297
  value: e.node.verticalAlign ?? "",
1298
1298
  onChange: t[6] || (t[6] = //@ts-ignore
1299
- (...r) => e.api.updateSelectedCellVerticalAlign && e.api.updateSelectedCellVerticalAlign(...r))
1299
+ (...u) => e.api.updateSelectedCellVerticalAlign && e.api.updateSelectedCellVerticalAlign(...u))
1300
1300
  }, [...t[12] || (t[12] = [
1301
1301
  l("option", { value: "" }, "默认(跟随格子设置)", -1),
1302
1302
  l("option", { value: "top" }, "顶部", -1),
@@ -1308,16 +1308,16 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1308
1308
  ], 64);
1309
1309
  };
1310
1310
  }
1311
- }), Po = { class: "v2-style-grid" }, Eo = { class: "v2-control v2-control--inline" }, Ao = ["value"], Ho = { class: "v2-control v2-control--inline" }, Ro = ["value"], Lo = { class: "v2-control v2-control--inline" }, Mo = ["value"], Bo = { class: "v2-control v2-control--inline" }, Vo = ["value"], Go = { class: "v2-grid-dimensions" }, zo = { class: "v2-control" }, Oo = ["value"], Wo = { class: "v2-control" }, Uo = ["value"], jo = { class: "v2-control v2-control--full" }, Yo = ["value"], il = /* @__PURE__ */ X({
1311
+ }), Po = { class: "v2-style-grid" }, Eo = { class: "v2-control v2-control--inline" }, Ao = ["value"], Ho = { class: "v2-control v2-control--inline" }, Ro = ["value"], Lo = { class: "v2-control v2-control--inline" }, Mo = ["value"], Bo = { class: "v2-control v2-control--inline" }, Vo = ["value"], Go = { class: "v2-grid-dimensions" }, zo = { class: "v2-control" }, Oo = ["value"], Wo = { class: "v2-control" }, Uo = ["value"], jo = { class: "v2-control v2-control--full" }, Jo = ["value"], vl = /* @__PURE__ */ X({
1312
1312
  __name: "TextStyleFields",
1313
1313
  props: {
1314
1314
  style: {},
1315
1315
  api: {}
1316
1316
  },
1317
1317
  setup(e) {
1318
- return (u, t) => {
1319
- var a, n, r, b, s, f, v;
1320
- return $(), I(_, null, [
1318
+ return (r, t) => {
1319
+ var a, o, u, f, s, b, v;
1320
+ return $(), I(Q, null, [
1321
1321
  t[17] || (t[17] = l("div", { class: "v2-sidebar__subheading" }, "文本样式", -1)),
1322
1322
  l("div", Po, [
1323
1323
  l("label", Eo, [
@@ -1337,7 +1337,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1337
1337
  type: "number",
1338
1338
  min: "0",
1339
1339
  step: "0.1",
1340
- value: ((n = e.style) == null ? void 0 : n.lineHeight) ?? "",
1340
+ value: ((o = e.style) == null ? void 0 : o.lineHeight) ?? "",
1341
1341
  onChange: t[1] || (t[1] = //@ts-ignore
1342
1342
  (...p) => e.api.updateSelectedLineHeight && e.api.updateSelectedLineHeight(...p))
1343
1343
  }, null, 40, Ro)
@@ -1345,7 +1345,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1345
1345
  l("label", Lo, [
1346
1346
  t[10] || (t[10] = l("span", null, "粗细", -1)),
1347
1347
  l("select", {
1348
- value: ((r = e.style) == null ? void 0 : r.fontWeight) ?? "normal",
1348
+ value: ((u = e.style) == null ? void 0 : u.fontWeight) ?? "normal",
1349
1349
  onChange: t[2] || (t[2] = //@ts-ignore
1350
1350
  (...p) => e.api.updateSelectedFontWeight && e.api.updateSelectedFontWeight(...p))
1351
1351
  }, [...t[9] || (t[9] = [
@@ -1357,7 +1357,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1357
1357
  t[11] || (t[11] = l("span", null, "颜色", -1)),
1358
1358
  l("input", {
1359
1359
  type: "color",
1360
- value: ((b = e.style) == null ? void 0 : b.color) ?? "#111827",
1360
+ value: ((f = e.style) == null ? void 0 : f.color) ?? "#111827",
1361
1361
  onInput: t[3] || (t[3] = //@ts-ignore
1362
1362
  (...p) => e.api.updateSelectedColor && e.api.updateSelectedColor(...p))
1363
1363
  }, null, 40, Vo)
@@ -1379,7 +1379,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1379
1379
  l("label", Wo, [
1380
1380
  t[15] || (t[15] = l("span", null, "垂直对齐", -1)),
1381
1381
  l("select", {
1382
- value: ((f = e.style) == null ? void 0 : f.verticalAlign) ?? "middle",
1382
+ value: ((b = e.style) == null ? void 0 : b.verticalAlign) ?? "middle",
1383
1383
  onChange: t[5] || (t[5] = //@ts-ignore
1384
1384
  (...p) => e.api.updateSelectedVerticalAlign && e.api.updateSelectedVerticalAlign(...p))
1385
1385
  }, [...t[14] || (t[14] = [
@@ -1394,21 +1394,21 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1394
1394
  value: ((v = e.style) == null ? void 0 : v.fontFamily) ?? "",
1395
1395
  onInput: t[6] || (t[6] = //@ts-ignore
1396
1396
  (...p) => e.api.updateSelectedFontFamily && e.api.updateSelectedFontFamily(...p))
1397
- }, null, 40, Yo)
1397
+ }, null, 40, Jo)
1398
1398
  ])
1399
1399
  ])
1400
1400
  ], 64);
1401
1401
  };
1402
1402
  }
1403
- }), Jo = { class: "v2-control v2-control--full" }, Ko = ["value"], qo = /* @__PURE__ */ X({
1403
+ }), Ko = { class: "v2-control v2-control--full" }, qo = ["value"], Yo = /* @__PURE__ */ X({
1404
1404
  __name: "TextInspector",
1405
1405
  props: {
1406
1406
  node: {},
1407
1407
  api: {}
1408
1408
  },
1409
1409
  setup(e) {
1410
- return (u, t) => ($(), I(_, null, [
1411
- l("label", Jo, [
1410
+ return (r, t) => ($(), I(Q, null, [
1411
+ l("label", Ko, [
1412
1412
  t[1] || (t[1] = l("span", null, "文本内容", -1)),
1413
1413
  l("textarea", {
1414
1414
  class: "v2-textarea",
@@ -1416,129 +1416,106 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1416
1416
  value: e.node.text,
1417
1417
  onInput: t[0] || (t[0] = //@ts-ignore
1418
1418
  (...a) => e.api.updateSelectedText && e.api.updateSelectedText(...a))
1419
- }, null, 40, Ko)
1419
+ }, null, 40, qo)
1420
1420
  ]),
1421
- le(il, {
1422
- style: Pe(e.node.style),
1421
+ ae(vl, {
1422
+ style: Ae(e.node.style),
1423
1423
  api: e.api
1424
1424
  }, null, 8, ["style", "api"])
1425
1425
  ], 64));
1426
1426
  }
1427
- }), Xo = { class: "v2-control" }, Zo = ["value"], Qo = { class: "v2-grid-dimensions" }, _o = { class: "v2-control" }, ei = ["value"], ti = { class: "v2-control" }, li = ["value"], ai = { class: "v2-control" }, ni = ["value"], oi = {
1428
- key: 0,
1429
- class: "v2-control v2-control--full"
1430
- }, ii = ["value"], di = {
1431
- key: 1,
1432
- class: "v2-hint"
1433
- }, ui = { class: "v2-control v2-control--full" }, ri = ["value"], si = { class: "v2-grid-dimensions" }, vi = { class: "v2-control v2-control--full" }, ci = ["value"], pi = { class: "v2-control" }, fi = ["checked"], gi = /* @__PURE__ */ X({
1427
+ }), Xo = { class: "v2-control" }, Zo = ["value"], Qo = { class: "v2-grid-dimensions" }, _o = { class: "v2-control" }, ei = ["value"], ti = { class: "v2-control" }, li = ["value"], ai = { class: "v2-control v2-control--toggle" }, ni = ["checked"], oi = { class: "v2-control v2-control--full" }, ii = ["value"], di = { class: "v2-grid-dimensions" }, ri = { class: "v2-control v2-control--full" }, ui = ["value"], si = { class: "v2-control" }, vi = ["checked"], ci = /* @__PURE__ */ X({
1434
1428
  __name: "FieldPInspector",
1435
1429
  props: {
1436
1430
  node: {},
1437
1431
  api: {}
1438
1432
  },
1439
1433
  setup(e) {
1440
- return (u, t) => {
1441
- var a;
1442
- return $(), I(_, null, [
1443
- l("label", Xo, [
1444
- t[8] || (t[8] = l("span", null, "字段名", -1)),
1434
+ return (r, t) => ($(), I(Q, null, [
1435
+ l("label", Xo, [
1436
+ t[7] || (t[7] = l("span", null, "字段名", -1)),
1437
+ l("input", {
1438
+ value: e.node.field,
1439
+ onInput: t[0] || (t[0] = //@ts-ignore
1440
+ (...a) => e.api.updateSelectedField && e.api.updateSelectedField(...a))
1441
+ }, null, 40, Zo)
1442
+ ]),
1443
+ l("div", Qo, [
1444
+ l("label", _o, [
1445
+ t[8] || (t[8] = l("span", null, "前标签(可选)", -1)),
1445
1446
  l("input", {
1446
- value: e.node.field,
1447
- onInput: t[0] || (t[0] = //@ts-ignore
1448
- (...n) => e.api.updateSelectedField && e.api.updateSelectedField(...n))
1449
- }, null, 40, Zo)
1450
- ]),
1451
- l("div", Qo, [
1452
- l("label", _o, [
1453
- t[9] || (t[9] = l("span", null, "前标签(可选)", -1)),
1454
- l("input", {
1455
- value: e.node.prefix ?? "",
1456
- onInput: t[1] || (t[1] = //@ts-ignore
1457
- (...n) => e.api.updateSelectedPrefix && e.api.updateSelectedPrefix(...n))
1458
- }, null, 40, ei)
1459
- ]),
1460
- l("label", ti, [
1461
- t[10] || (t[10] = l("span", null, "后标签(可选)", -1)),
1462
- l("input", {
1463
- value: e.node.suffix ?? "",
1464
- onInput: t[2] || (t[2] = //@ts-ignore
1465
- (...n) => e.api.updateSelectedSuffix && e.api.updateSelectedSuffix(...n))
1466
- }, null, 40, li)
1467
- ])
1468
- ]),
1469
- l("label", ai, [
1470
- t[12] || (t[12] = l("span", null, "输入方式", -1)),
1471
- l("select", {
1472
- value: e.node.action ?? "text",
1473
- onChange: t[3] || (t[3] = //@ts-ignore
1474
- (...n) => e.api.updateSelectedAction && e.api.updateSelectedAction(...n))
1475
- }, [...t[11] || (t[11] = [
1476
- l("option", { value: "text" }, "无(纯文本输入)", -1),
1477
- l("option", { value: "date" }, "日期选择器", -1),
1478
- l("option", { value: "signature" }, "签名板", -1),
1479
- l("option", { value: "upload" }, "文件上传", -1)
1480
- ])], 40, ni)
1447
+ value: e.node.prefix ?? "",
1448
+ onInput: t[1] || (t[1] = //@ts-ignore
1449
+ (...a) => e.api.updateSelectedPrefix && e.api.updateSelectedPrefix(...a))
1450
+ }, null, 40, ei)
1481
1451
  ]),
1482
- e.node.action === "date" ? ($(), I("label", oi, [
1483
- t[13] || (t[13] = l("span", null, "日期格式", -1)),
1452
+ l("label", ti, [
1453
+ t[9] || (t[9] = l("span", null, "后标签(可选)", -1)),
1484
1454
  l("input", {
1485
- type: "text",
1486
- placeholder: "如 {YYYY}年{MM}月{DD} {hh}时{mm}分{ss}秒",
1487
- value: ((a = e.node.actionParams) == null ? void 0 : a.format) ?? "",
1488
- onChange: t[4] || (t[4] = //@ts-ignore
1489
- (...n) => e.api.updateSelectedDateFormat && e.api.updateSelectedDateFormat(...n))
1490
- }, null, 40, ii)
1491
- ])) : K("", !0),
1492
- e.node.action === "date" ? ($(), I("p", di, " 留空则存原生日期(YYYY-MM-DD);配置后填写值按格式显示,如 " + D("{") + "YYYY" + D("}") + "年" + D("{") + "MM" + D("}") + "月" + D("{") + "DD" + D("}") + "。 ")) : K("", !0),
1493
- le(il, {
1494
- style: Pe(e.node.style),
1495
- api: e.api
1496
- }, null, 8, ["style", "api"]),
1497
- l("label", ui, [
1498
- t[14] || (t[14] = l("span", null, "默认内容", -1)),
1499
- l("textarea", {
1500
- class: "v2-textarea",
1501
- rows: "3",
1502
- "data-field-default": "true",
1503
- value: e.node.default ?? "",
1455
+ value: e.node.suffix ?? "",
1456
+ onInput: t[2] || (t[2] = //@ts-ignore
1457
+ (...a) => e.api.updateSelectedSuffix && e.api.updateSelectedSuffix(...a))
1458
+ }, null, 40, li)
1459
+ ])
1460
+ ]),
1461
+ l("label", ai, [
1462
+ l("input", {
1463
+ type: "checkbox",
1464
+ "data-field-interactive": "true",
1465
+ checked: e.node.interactive ?? !1,
1466
+ onChange: t[3] || (t[3] = //@ts-ignore
1467
+ (...a) => e.api.updateSelectedInteractive && e.api.updateSelectedInteractive(...a))
1468
+ }, null, 40, ni),
1469
+ t[10] || (t[10] = l("span", null, "点击触发外部控件", -1))
1470
+ ]),
1471
+ ae(vl, {
1472
+ style: Ae(e.node.style),
1473
+ api: e.api
1474
+ }, null, 8, ["style", "api"]),
1475
+ l("label", oi, [
1476
+ t[11] || (t[11] = l("span", null, "默认内容", -1)),
1477
+ l("textarea", {
1478
+ class: "v2-textarea",
1479
+ rows: "3",
1480
+ "data-field-default": "true",
1481
+ value: e.node.default ?? "",
1482
+ onInput: t[4] || (t[4] = //@ts-ignore
1483
+ (...a) => e.api.updateSelectedDefault && e.api.updateSelectedDefault(...a))
1484
+ }, null, 40, ii)
1485
+ ]),
1486
+ l("div", di, [
1487
+ l("label", ri, [
1488
+ t[12] || (t[12] = l("span", null, "输入区宽度", -1)),
1489
+ l("input", {
1490
+ "data-field-width": "true",
1491
+ placeholder: "如 30mm、50%,留空不限",
1492
+ value: e.node.width ?? "",
1504
1493
  onInput: t[5] || (t[5] = //@ts-ignore
1505
- (...n) => e.api.updateSelectedDefault && e.api.updateSelectedDefault(...n))
1506
- }, null, 40, ri)
1494
+ (...a) => e.api.updateSelectedWidth && e.api.updateSelectedWidth(...a))
1495
+ }, null, 40, ui)
1507
1496
  ]),
1508
- l("div", si, [
1509
- l("label", vi, [
1510
- t[15] || (t[15] = l("span", null, "输入区宽度", -1)),
1511
- l("input", {
1512
- "data-field-width": "true",
1513
- placeholder: "如 30mm、50%,留空不限",
1514
- value: e.node.width ?? "",
1515
- onInput: t[6] || (t[6] = //@ts-ignore
1516
- (...n) => e.api.updateSelectedWidth && e.api.updateSelectedWidth(...n))
1517
- }, null, 40, ci)
1518
- ]),
1519
- l("label", pi, [
1520
- t[16] || (t[16] = l("span", null, "内部边框", -1)),
1521
- l("input", {
1522
- type: "checkbox",
1523
- "data-field-inner-border": "true",
1524
- checked: e.node.innerBorder ?? !1,
1525
- onChange: t[7] || (t[7] = //@ts-ignore
1526
- (...n) => e.api.updateSelectedInnerBorder && e.api.updateSelectedInnerBorder(...n))
1527
- }, null, 40, fi)
1528
- ])
1497
+ l("label", si, [
1498
+ t[13] || (t[13] = l("span", null, "内部边框", -1)),
1499
+ l("input", {
1500
+ type: "checkbox",
1501
+ "data-field-inner-border": "true",
1502
+ checked: e.node.innerBorder ?? !1,
1503
+ onChange: t[6] || (t[6] = //@ts-ignore
1504
+ (...a) => e.api.updateSelectedInnerBorder && e.api.updateSelectedInnerBorder(...a))
1505
+ }, null, 40, vi)
1529
1506
  ])
1530
- ], 64);
1531
- };
1507
+ ])
1508
+ ], 64));
1532
1509
  }
1533
- }), mi = { class: "v2-control v2-control--full" }, bi = ["value"], hi = { class: "v2-control v2-control--full" }, yi = ["value"], Si = /* @__PURE__ */ X({
1510
+ }), pi = { class: "v2-control v2-control--full" }, fi = ["value"], bi = { class: "v2-control v2-control--full" }, gi = ["value"], mi = /* @__PURE__ */ X({
1534
1511
  __name: "HtmlInspector",
1535
1512
  props: {
1536
1513
  node: {},
1537
1514
  api: {}
1538
1515
  },
1539
1516
  setup(e) {
1540
- return (u, t) => ($(), I(_, null, [
1541
- l("label", mi, [
1517
+ return (r, t) => ($(), I(Q, null, [
1518
+ l("label", pi, [
1542
1519
  t[2] || (t[2] = l("span", null, "HTML 片段(不含脚本)", -1)),
1543
1520
  l("textarea", {
1544
1521
  class: "v2-textarea",
@@ -1546,9 +1523,9 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1546
1523
  value: e.node.html,
1547
1524
  onInput: t[0] || (t[0] = //@ts-ignore
1548
1525
  (...a) => e.api.updateSelectedHtml && e.api.updateSelectedHtml(...a))
1549
- }, null, 40, bi)
1526
+ }, null, 40, fi)
1550
1527
  ]),
1551
- l("label", hi, [
1528
+ l("label", bi, [
1552
1529
  t[3] || (t[3] = l("span", null, "样式代码(仅模块内生效)", -1)),
1553
1530
  l("textarea", {
1554
1531
  class: "v2-textarea",
@@ -1556,62 +1533,62 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1556
1533
  value: e.node.css ?? "",
1557
1534
  onInput: t[1] || (t[1] = //@ts-ignore
1558
1535
  (...a) => e.api.updateSelectedCss && e.api.updateSelectedCss(...a))
1559
- }, null, 40, yi)
1536
+ }, null, 40, gi)
1560
1537
  ]),
1561
1538
  t[4] || (t[4] = l("p", { class: "v2-sidebar__hint" }, " 支持 {{ 字段 }} 占位符,展示时自动替换为填写内容;样式仅在模块内部生效,不影响整张表单。 ", -1))
1562
1539
  ], 64));
1563
1540
  }
1564
- }), $i = { class: "v2-grid-dimensions" }, Ci = { class: "v2-control v2-control--full" }, wi = ["value"], Ii = { class: "v2-control v2-control--full" }, xi = ["value"], Ti = { class: "v2-grid-dimensions" }, ki = { class: "v2-control" }, Fi = ["value"], Di = { class: "v2-control" }, Ni = ["value"], Pi = { class: "v2-control" }, Ei = ["value"], Ai = {
1541
+ }), hi = { class: "v2-grid-dimensions" }, yi = { class: "v2-control v2-control--full" }, Si = ["value"], $i = { class: "v2-control v2-control--full" }, Ci = ["value"], wi = { class: "v2-grid-dimensions" }, Ii = { class: "v2-control" }, xi = ["value"], ki = { class: "v2-control" }, Ti = ["value"], Fi = { class: "v2-control" }, Di = ["value"], Ni = {
1565
1542
  key: 0,
1566
1543
  class: "v2-sidebar__hint"
1567
- }, Hi = /* @__PURE__ */ X({
1544
+ }, Pi = /* @__PURE__ */ X({
1568
1545
  __name: "ImageInspector",
1569
1546
  props: {
1570
1547
  node: {},
1571
1548
  api: {}
1572
1549
  },
1573
1550
  setup(e) {
1574
- return (u, t) => ($(), I(_, null, [
1575
- l("div", $i, [
1576
- l("label", Ci, [
1551
+ return (r, t) => ($(), I(Q, null, [
1552
+ l("div", hi, [
1553
+ l("label", yi, [
1577
1554
  t[5] || (t[5] = l("span", null, "字段名", -1)),
1578
1555
  l("input", {
1579
1556
  value: e.node.field ?? "",
1580
1557
  onInput: t[0] || (t[0] = //@ts-ignore
1581
1558
  (...a) => e.api.updateSelectedImageField && e.api.updateSelectedImageField(...a))
1582
- }, null, 40, wi)
1559
+ }, null, 40, Si)
1583
1560
  ]),
1584
- l("label", Ii, [
1561
+ l("label", $i, [
1585
1562
  t[6] || (t[6] = l("span", null, "图片地址", -1)),
1586
1563
  l("input", {
1587
1564
  value: e.node.src ?? "",
1588
1565
  placeholder: "https:// 链接或 Base64",
1589
1566
  onInput: t[1] || (t[1] = //@ts-ignore
1590
1567
  (...a) => e.api.updateSelectedImageSrc && e.api.updateSelectedImageSrc(...a))
1591
- }, null, 40, xi)
1568
+ }, null, 40, Ci)
1592
1569
  ])
1593
1570
  ]),
1594
- l("div", Ti, [
1595
- l("label", ki, [
1571
+ l("div", wi, [
1572
+ l("label", Ii, [
1596
1573
  t[7] || (t[7] = l("span", null, "宽(mm)", -1)),
1597
1574
  l("input", {
1598
1575
  type: "number",
1599
1576
  min: "0",
1600
1577
  value: e.node.width ?? "",
1601
1578
  onChange: t[2] || (t[2] = (a) => e.api.updateSelectedImageSize("width", a))
1602
- }, null, 40, Fi)
1579
+ }, null, 40, xi)
1603
1580
  ]),
1604
- l("label", Di, [
1581
+ l("label", ki, [
1605
1582
  t[8] || (t[8] = l("span", null, "高(mm)", -1)),
1606
1583
  l("input", {
1607
1584
  type: "number",
1608
1585
  min: "0",
1609
1586
  value: e.node.height ?? "",
1610
1587
  onChange: t[3] || (t[3] = (a) => e.api.updateSelectedImageSize("height", a))
1611
- }, null, 40, Ni)
1588
+ }, null, 40, Ti)
1612
1589
  ])
1613
1590
  ]),
1614
- l("label", Pi, [
1591
+ l("label", Fi, [
1615
1592
  t[10] || (t[10] = l("span", null, "填充方式", -1)),
1616
1593
  l("select", {
1617
1594
  value: e.node.objectFit ?? "contain",
@@ -1621,27 +1598,30 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1621
1598
  l("option", { value: "contain" }, "等比完整显示", -1),
1622
1599
  l("option", { value: "cover" }, "裁剪填满", -1),
1623
1600
  l("option", { value: "fill" }, "拉伸填满", -1)
1624
- ])], 40, Ei)
1601
+ ])], 40, Di)
1625
1602
  ]),
1626
- !e.node.src && !e.node.field ? ($(), I("p", Ai, [...t[11] || (t[11] = [
1627
- ge(" 还没配置图片地址:画布上会显示占位框方便编辑,", -1),
1603
+ !e.node.src && !e.node.field ? ($(), I("p", Ni, [...t[11] || (t[11] = [
1604
+ be(" 还没配置图片地址:画布上会显示占位框方便编辑,", -1),
1628
1605
  l("strong", null, "打印时不占位置", -1),
1629
- ge("。 ", -1)
1630
- ])])) : K("", !0)
1606
+ be("。 ", -1)
1607
+ ])])) : q("", !0)
1631
1608
  ], 64));
1632
1609
  }
1633
- }), Ri = { class: "v2-grid-dimensions" }, Li = { class: "v2-control" }, Mi = ["value"], Bi = { class: "v2-control" }, Vi = ["value"], Gi = { class: "v2-style-grid" }, zi = { class: "v2-control v2-control--inline" }, Oi = ["value"], Wi = { class: "v2-control v2-control--inline" }, Ui = ["value"], ji = { class: "v2-grid-dimensions" }, Yi = { class: "v2-control" }, Ji = ["value"], Ki = { class: "v2-col-table" }, qi = ["value", "onInput"], Xi = ["value", "onInput"], Zi = ["disabled", "title", "onClick"], Qi = /* @__PURE__ */ X({
1610
+ }), Ei = { class: "v2-grid-dimensions" }, Ai = { class: "v2-control" }, Hi = ["value"], Ri = { class: "v2-control" }, Li = ["value"], Mi = { class: "v2-style-grid" }, Bi = { class: "v2-control v2-control--inline" }, Vi = ["value"], Gi = { class: "v2-control v2-control--inline" }, zi = ["value"], Oi = { class: "v2-grid-dimensions" }, Wi = { class: "v2-control" }, Ui = ["value"], ji = {
1611
+ class: "v2-col-table",
1612
+ "data-table-columns": "true"
1613
+ }, Ji = ["value", "onInput"], Ki = ["value", "onInput"], qi = ["disabled", "title", "onClick"], Yi = /* @__PURE__ */ X({
1634
1614
  __name: "TableInspector",
1635
1615
  props: {
1636
1616
  node: {},
1637
1617
  api: {}
1638
1618
  },
1639
1619
  setup(e) {
1640
- return (u, t) => {
1641
- var a, n, r;
1642
- return $(), I(_, null, [
1643
- l("div", Ri, [
1644
- l("label", Li, [
1620
+ return (r, t) => {
1621
+ var a, o, u;
1622
+ return $(), I(Q, null, [
1623
+ l("div", Ei, [
1624
+ l("label", Ai, [
1645
1625
  t[6] || (t[6] = l("span", null, "最小行数", -1)),
1646
1626
  l("input", {
1647
1627
  type: "number",
@@ -1649,26 +1629,26 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1649
1629
  step: "1",
1650
1630
  value: e.node.minRows,
1651
1631
  onChange: t[0] || (t[0] = //@ts-ignore
1652
- (...b) => e.api.updateTableRows && e.api.updateTableRows(...b))
1653
- }, null, 40, Mi)
1632
+ (...f) => e.api.updateTableRows && e.api.updateTableRows(...f))
1633
+ }, null, 40, Hi)
1654
1634
  ]),
1655
- l("label", Bi, [
1635
+ l("label", Ri, [
1656
1636
  t[8] || (t[8] = l("span", null, "边框", -1)),
1657
1637
  l("select", {
1658
1638
  value: e.node.border ?? "all",
1659
1639
  onChange: t[1] || (t[1] = //@ts-ignore
1660
- (...b) => e.api.updateTableBorder && e.api.updateTableBorder(...b))
1640
+ (...f) => e.api.updateTableBorder && e.api.updateTableBorder(...f))
1661
1641
  }, [...t[7] || (t[7] = [
1662
1642
  l("option", { value: "all" }, "外框 + 内部", -1),
1663
1643
  l("option", { value: "outer" }, "仅外框", -1),
1664
1644
  l("option", { value: "inner" }, "仅内部", -1),
1665
1645
  l("option", { value: "none" }, "无边框", -1)
1666
- ])], 40, Vi)
1646
+ ])], 40, Li)
1667
1647
  ])
1668
1648
  ]),
1669
1649
  t[15] || (t[15] = l("div", { class: "v2-sidebar__subheading" }, "表头样式", -1)),
1670
- l("div", Gi, [
1671
- l("label", zi, [
1650
+ l("div", Mi, [
1651
+ l("label", Bi, [
1672
1652
  t[9] || (t[9] = l("span", null, "字号(px)", -1)),
1673
1653
  l("input", {
1674
1654
  type: "number",
@@ -1676,98 +1656,164 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1676
1656
  step: "1",
1677
1657
  value: ((a = e.node.headerStyle) == null ? void 0 : a.fontSize) ?? 16,
1678
1658
  onChange: t[2] || (t[2] = //@ts-ignore
1679
- (...b) => e.api.updateTableHeaderFontSize && e.api.updateTableHeaderFontSize(...b))
1680
- }, null, 40, Oi)
1659
+ (...f) => e.api.updateTableHeaderFontSize && e.api.updateTableHeaderFontSize(...f))
1660
+ }, null, 40, Vi)
1681
1661
  ]),
1682
- l("label", Wi, [
1662
+ l("label", Gi, [
1683
1663
  t[11] || (t[11] = l("span", null, "粗细", -1)),
1684
1664
  l("select", {
1685
- value: ((n = e.node.headerStyle) == null ? void 0 : n.fontWeight) ?? "normal",
1665
+ value: ((o = e.node.headerStyle) == null ? void 0 : o.fontWeight) ?? "normal",
1686
1666
  onChange: t[3] || (t[3] = //@ts-ignore
1687
- (...b) => e.api.updateTableHeaderFontWeight && e.api.updateTableHeaderFontWeight(...b))
1667
+ (...f) => e.api.updateTableHeaderFontWeight && e.api.updateTableHeaderFontWeight(...f))
1688
1668
  }, [...t[10] || (t[10] = [
1689
1669
  l("option", { value: "normal" }, "常规", -1),
1690
1670
  l("option", { value: "bold" }, "加粗", -1)
1691
- ])], 40, Ui)
1671
+ ])], 40, zi)
1692
1672
  ])
1693
1673
  ]),
1694
- l("div", ji, [
1695
- l("label", Yi, [
1674
+ l("div", Oi, [
1675
+ l("label", Wi, [
1696
1676
  t[13] || (t[13] = l("span", null, "水平对齐", -1)),
1697
1677
  l("select", {
1698
- value: ((r = e.node.headerStyle) == null ? void 0 : r.align) ?? "left",
1678
+ value: ((u = e.node.headerStyle) == null ? void 0 : u.align) ?? "left",
1699
1679
  onChange: t[4] || (t[4] = //@ts-ignore
1700
- (...b) => e.api.updateTableHeaderAlign && e.api.updateTableHeaderAlign(...b))
1680
+ (...f) => e.api.updateTableHeaderAlign && e.api.updateTableHeaderAlign(...f))
1701
1681
  }, [...t[12] || (t[12] = [
1702
1682
  l("option", { value: "left" }, "左", -1),
1703
1683
  l("option", { value: "center" }, "居中", -1),
1704
1684
  l("option", { value: "right" }, "右", -1)
1705
- ])], 40, Ji)
1685
+ ])], 40, Ui)
1706
1686
  ])
1707
1687
  ]),
1708
1688
  t[16] || (t[16] = l("div", { class: "v2-sidebar__subheading" }, "列配置", -1)),
1709
- l("div", Ki, [
1689
+ l("div", ji, [
1710
1690
  t[14] || (t[14] = l("div", { class: "v2-col-table__row v2-col-table__head" }, [
1711
1691
  l("span", { class: "v2-col-table__th" }, "标题"),
1712
1692
  l("span", { class: "v2-col-table__th" }, "字段"),
1713
1693
  l("span", { class: "v2-col-table__th v2-col-table__th--action" })
1714
1694
  ], -1)),
1715
- ($(!0), I(_, null, ye(e.node.columns, (b) => ($(), I("div", {
1716
- key: b.key,
1695
+ ($(!0), I(Q, null, ge(e.node.columns, (f) => ($(), I("div", {
1696
+ key: f.key,
1717
1697
  class: "v2-col-table__row"
1718
1698
  }, [
1719
1699
  l("input", {
1720
1700
  class: "v2-col-table__input",
1721
- value: b.title,
1701
+ value: f.title,
1722
1702
  placeholder: "列标题",
1723
- onInput: (s) => e.api.updateTableColumn(b.key, "title", s)
1724
- }, null, 40, qi),
1703
+ onInput: (s) => e.api.updateTableColumn(f.key, "title", s)
1704
+ }, null, 40, Ji),
1725
1705
  l("input", {
1726
1706
  class: "v2-col-table__input v2-col-table__input--mono",
1727
- value: b.key,
1707
+ value: f.key,
1728
1708
  placeholder: "字段名",
1729
- onInput: (s) => e.api.renameTableColumnKey(b.key, s)
1730
- }, null, 40, Xi),
1709
+ onInput: (s) => e.api.renameTableColumnKey(f.key, s)
1710
+ }, null, 40, Ki),
1731
1711
  l("button", {
1732
1712
  class: "v2-inspector__delete v2-inspector__delete--small",
1733
1713
  type: "button",
1734
1714
  disabled: e.node.columns.length <= 1,
1735
- title: `删除列 ${b.key}`,
1736
- onClick: (s) => e.api.removeTableColumn(b.key)
1737
- }, " ✕ ", 8, Zi)
1715
+ title: `删除列 ${f.key}`,
1716
+ onClick: (s) => e.api.removeTableColumn(f.key)
1717
+ }, " ✕ ", 8, qi)
1738
1718
  ]))), 128))
1739
1719
  ]),
1740
1720
  l("button", {
1741
1721
  class: "v2-toolbar__button v2-add-col",
1742
1722
  type: "button",
1743
1723
  onClick: t[5] || (t[5] = //@ts-ignore
1744
- (...b) => e.api.addTableColumn && e.api.addTableColumn(...b))
1724
+ (...f) => e.api.addTableColumn && e.api.addTableColumn(...f))
1745
1725
  }, " + 添加列 ")
1746
1726
  ], 64);
1747
1727
  };
1748
1728
  }
1749
- }), _i = /* @__PURE__ */ ie(Qi, [["__scopeId", "data-v-6aacc8cd"]]), ed = ["onClick"], td = /* @__PURE__ */ X({
1729
+ }), Xi = {
1730
+ class: "v2-col-table",
1731
+ "data-node-params": "true"
1732
+ }, Zi = ["value", "onChange"], Qi = ["value", "onInput"], _i = ["title", "onClick"], ed = {
1733
+ key: 0,
1734
+ class: "v2-hint v2-hint--warn"
1735
+ }, td = /* @__PURE__ */ X({
1736
+ __name: "ParamsFields",
1737
+ props: {
1738
+ params: {},
1739
+ api: {}
1740
+ },
1741
+ setup(e) {
1742
+ const r = e, t = N(() => Object.keys(r.params ?? {})), a = N(() => t.value.some((o) => !Jt(o)));
1743
+ return (o, u) => ($(), I(Q, null, [
1744
+ u[3] || (u[3] = l("div", {
1745
+ class: "v2-sidebar__subheading",
1746
+ title: '键值对会作为 HTML 属性插到该组件的标签上(如 action="datePicker");内核不解释这些属性,怎么消费由宿主决定。'
1747
+ }, " 额外属性 ", -1)),
1748
+ l("div", Xi, [
1749
+ u[1] || (u[1] = l("div", { class: "v2-col-table__row v2-col-table__head" }, [
1750
+ l("span", { class: "v2-col-table__th" }, "属性名"),
1751
+ l("span", { class: "v2-col-table__th" }, "值"),
1752
+ l("span", { class: "v2-col-table__th v2-col-table__th--action" })
1753
+ ], -1)),
1754
+ ($(!0), I(Q, null, ge(t.value, (f) => {
1755
+ var s;
1756
+ return $(), I("div", {
1757
+ key: f,
1758
+ class: "v2-col-table__row"
1759
+ }, [
1760
+ l("input", {
1761
+ class: pe(["v2-col-table__input v2-col-table__input--mono", { "v2-col-table__input--invalid": !x(Jt)(f) }]),
1762
+ "data-param-key": "true",
1763
+ placeholder: "如 action",
1764
+ value: f,
1765
+ onChange: (b) => e.api.renameSelectedParam(f, b)
1766
+ }, null, 42, Zi),
1767
+ l("input", {
1768
+ class: "v2-col-table__input",
1769
+ "data-param-value": "true",
1770
+ placeholder: "如 datePicker",
1771
+ value: ((s = e.params) == null ? void 0 : s[f]) ?? "",
1772
+ onInput: (b) => e.api.updateSelectedParamValue(f, b)
1773
+ }, null, 40, Qi),
1774
+ l("button", {
1775
+ class: "v2-inspector__delete v2-inspector__delete--small",
1776
+ type: "button",
1777
+ title: `删除属性 ${f}`,
1778
+ onClick: (b) => e.api.removeSelectedParam(f)
1779
+ }, " ✕ ", 8, _i)
1780
+ ]);
1781
+ }), 128))
1782
+ ]),
1783
+ l("button", {
1784
+ class: "v2-toolbar__button v2-add-col",
1785
+ type: "button",
1786
+ "data-param-add": "true",
1787
+ onClick: u[0] || (u[0] = //@ts-ignore
1788
+ (...f) => e.api.addSelectedParam && e.api.addSelectedParam(...f))
1789
+ }, " + 添加属性 "),
1790
+ a.value ? ($(), I("p", ed, [...u[2] || (u[2] = [
1791
+ nl(" 红字属性名不会被渲染:内核会丢弃 <code>on*</code>(事件)与 <code>data-*</code>(节点寻址), 以及 <code>class</code> / <code>style</code> / <code>field</code> 等保留名;属性名须全小写, 仅含小写字母、数字、<code>-</code>、<code>_</code>。 ", 15)
1792
+ ])])) : q("", !0)
1793
+ ], 64));
1794
+ }
1795
+ }), ld = ["onClick"], ad = /* @__PURE__ */ X({
1750
1796
  __name: "IssuesPanel",
1751
1797
  props: {
1752
1798
  issues: {}
1753
1799
  },
1754
1800
  emits: ["select"],
1755
- setup(e, { emit: u }) {
1756
- const t = u;
1757
- return (a, n) => ($(), I("div", {
1758
- class: me(["v2-issues", { "v2-issues--ok": e.issues.length === 0 }])
1801
+ setup(e, { emit: r }) {
1802
+ const t = r;
1803
+ return (a, o) => ($(), I("div", {
1804
+ class: pe(["v2-issues", { "v2-issues--ok": e.issues.length === 0 }])
1759
1805
  }, [
1760
- l("strong", null, D(e.issues.length === 0 ? "检查通过" : "发现 " + e.issues.length + " 个问题"), 1),
1761
- ($(!0), I(_, null, ye(e.issues, (r) => ($(), I("div", {
1762
- key: r.code + "-" + (r.nodeId || "schema"),
1806
+ l("strong", null, E(e.issues.length === 0 ? "检查通过" : "发现 " + e.issues.length + " 个问题"), 1),
1807
+ ($(!0), I(Q, null, ge(e.issues, (u) => ($(), I("div", {
1808
+ key: u.code + "-" + (u.nodeId || "schema"),
1763
1809
  class: "v2-issue v2-issue--selectable",
1764
- onClick: (b) => t("select", r)
1765
- }, D(r.message), 9, ed))), 128))
1810
+ onClick: (f) => t("select", u)
1811
+ }, E(u.message), 9, ld))), 128))
1766
1812
  ], 2));
1767
1813
  }
1768
- }), ld = /* @__PURE__ */ ie(td, [["__scopeId", "data-v-1f696812"]]), ad = { class: "v2-sidebar v2-sidebar--right" }, nd = { class: "v2-inspector-row" }, od = { class: "v2-inspector-row v2-inspector-row--head" }, id = /* @__PURE__ */ X({
1814
+ }), nd = /* @__PURE__ */ ve(ad, [["__scopeId", "data-v-1f696812"]]), od = { class: "v2-sidebar v2-sidebar--right" }, id = { class: "v2-inspector-row" }, dd = { class: "v2-inspector-row v2-inspector-row--head" }, rd = /* @__PURE__ */ X({
1769
1815
  __name: "InspectorPanel",
1770
- props: /* @__PURE__ */ qe({
1816
+ props: /* @__PURE__ */ Xe({
1771
1817
  node: { default: null },
1772
1818
  nodeId: { default: null },
1773
1819
  nodeType: {},
@@ -1787,9 +1833,9 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1787
1833
  paginate: { type: Boolean, required: !0 },
1788
1834
  paginateModifiers: {}
1789
1835
  }),
1790
- emits: /* @__PURE__ */ qe(["selectIssue"], ["update:paginate"]),
1791
- setup(e, { emit: u }) {
1792
- const t = e, a = P(() => {
1836
+ emits: /* @__PURE__ */ Xe(["selectIssue"], ["update:paginate"]),
1837
+ setup(e, { emit: r }) {
1838
+ const t = e, a = N(() => {
1793
1839
  const s = t.node;
1794
1840
  return s && s.type === "page" ? {
1795
1841
  top: s.margin.top ?? 12,
@@ -1797,30 +1843,30 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1797
1843
  bottom: s.margin.bottom ?? 12,
1798
1844
  left: s.margin.left ?? 12
1799
1845
  } : { top: 12, right: 12, bottom: 12, left: 12 };
1800
- }), n = _t(e, "paginate"), r = u, b = P(() => {
1846
+ }), o = al(e, "paginate"), u = r, f = N(() => {
1801
1847
  const s = t.node;
1802
1848
  if (!s) return "未选择";
1803
1849
  if (s.type === "grid-cell" && t.cellContext) {
1804
- const { rowIndex: f, columnIndex: v } = t.cellContext;
1805
- if (f >= 0) return `格子 ${f + 1}-${v + 1}`;
1850
+ const { rowIndex: b, columnIndex: v } = t.cellContext;
1851
+ if (b >= 0) return `格子 ${b + 1}-${v + 1}`;
1806
1852
  }
1807
- return Ne(s);
1853
+ return Ee(s);
1808
1854
  });
1809
- return (s, f) => {
1810
- var v, p, g, L, A, H, U, q;
1811
- return $(), I("aside", ad, [
1812
- l("div", nd, [
1813
- f[2] || (f[2] = l("span", null, "组件类型", -1)),
1814
- l("strong", null, D(e.nodeType), 1)
1855
+ return (s, b) => {
1856
+ var v, p, g, M, A, H, U, Z;
1857
+ return $(), I("aside", od, [
1858
+ l("div", id, [
1859
+ b[2] || (b[2] = l("span", null, "组件类型", -1)),
1860
+ l("strong", null, E(e.nodeType), 1)
1815
1861
  ]),
1816
- l("div", od, [
1817
- f[3] || (f[3] = l("span", null, "当前选中", -1)),
1818
- l("code", null, D(b.value), 1)
1862
+ l("div", dd, [
1863
+ b[3] || (b[3] = l("span", null, "当前选中", -1)),
1864
+ l("code", null, E(f.value), 1)
1819
1865
  ]),
1820
- ((v = e.node) == null ? void 0 : v.type) === "page" ? ($(), oe(qn, {
1866
+ ((v = e.node) == null ? void 0 : v.type) === "page" ? ($(), oe(Yn, {
1821
1867
  key: 0,
1822
- paginate: n.value,
1823
- "onUpdate:paginate": f[0] || (f[0] = (j) => n.value = j),
1868
+ paginate: o.value,
1869
+ "onUpdate:paginate": b[0] || (b[0] = (j) => o.value = j),
1824
1870
  "paper-size": e.paperSize,
1825
1871
  "base-row-height": e.baseRowHeight,
1826
1872
  "paper-margin-top": a.value.top,
@@ -1830,15 +1876,15 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1830
1876
  header: e.header,
1831
1877
  footer: e.footer,
1832
1878
  api: e.api
1833
- }, null, 8, ["paginate", "paper-size", "base-row-height", "paper-margin-top", "paper-margin-right", "paper-margin-bottom", "paper-margin-left", "header", "footer", "api"])) : ((p = e.node) == null ? void 0 : p.type) === "grid" ? ($(), oe(go, {
1879
+ }, null, 8, ["paginate", "paper-size", "base-row-height", "paper-margin-top", "paper-margin-right", "paper-margin-bottom", "paper-margin-left", "header", "footer", "api"])) : ((p = e.node) == null ? void 0 : p.type) === "grid" ? ($(), oe(bo, {
1834
1880
  key: 1,
1835
1881
  node: e.node,
1836
1882
  api: e.api
1837
- }, null, 8, ["node", "api"])) : ((g = e.node) == null ? void 0 : g.type) === "text" ? ($(), oe(qo, {
1883
+ }, null, 8, ["node", "api"])) : ((g = e.node) == null ? void 0 : g.type) === "text" ? ($(), oe(Yo, {
1838
1884
  key: 2,
1839
1885
  node: e.node,
1840
1886
  api: e.api
1841
- }, null, 8, ["node", "api"])) : ((L = e.node) == null ? void 0 : L.type) === "p" ? ($(), oe(gi, {
1887
+ }, null, 8, ["node", "api"])) : ((M = e.node) == null ? void 0 : M.type) === "p" ? ($(), oe(ci, {
1842
1888
  key: 3,
1843
1889
  node: e.node,
1844
1890
  api: e.api
@@ -1848,513 +1894,546 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
1848
1894
  "cell-context": e.cellContext,
1849
1895
  "cell-box": e.cellBox,
1850
1896
  api: e.api
1851
- }, null, 8, ["node", "cell-context", "cell-box", "api"])) : ((H = e.node) == null ? void 0 : H.type) === "html" ? ($(), oe(Si, {
1897
+ }, null, 8, ["node", "cell-context", "cell-box", "api"])) : ((H = e.node) == null ? void 0 : H.type) === "html" ? ($(), oe(mi, {
1852
1898
  key: 5,
1853
1899
  node: e.node,
1854
1900
  api: e.api
1855
- }, null, 8, ["node", "api"])) : ((U = e.node) == null ? void 0 : U.type) === "image" ? ($(), oe(Hi, {
1901
+ }, null, 8, ["node", "api"])) : ((U = e.node) == null ? void 0 : U.type) === "image" ? ($(), oe(Pi, {
1856
1902
  key: 6,
1857
1903
  node: e.node,
1858
1904
  api: e.api
1859
- }, null, 8, ["node", "api"])) : ((q = e.node) == null ? void 0 : q.type) === "table" ? ($(), oe(_i, {
1905
+ }, null, 8, ["node", "api"])) : ((Z = e.node) == null ? void 0 : Z.type) === "table" ? ($(), oe(Yi, {
1860
1906
  key: 7,
1861
1907
  node: e.node,
1862
1908
  api: e.api
1863
- }, null, 8, ["node", "api"])) : K("", !0),
1864
- le(ld, {
1909
+ }, null, 8, ["node", "api"])) : q("", !0),
1910
+ e.node ? ($(), oe(td, {
1911
+ key: 8,
1912
+ params: e.node.params,
1913
+ api: e.api
1914
+ }, null, 8, ["params", "api"])) : q("", !0),
1915
+ ae(nd, {
1865
1916
  issues: e.issues,
1866
- onSelect: f[1] || (f[1] = (j) => r("selectIssue", j))
1917
+ onSelect: b[1] || (b[1] = (j) => u("selectIssue", j))
1867
1918
  }, null, 8, ["issues"])
1868
1919
  ]);
1869
1920
  };
1870
1921
  }
1871
- }), dd = /* @__PURE__ */ ie(id, [["__scopeId", "data-v-b0930d9c"]]), ud = {
1922
+ }), ud = /* @__PURE__ */ ve(rd, [["__scopeId", "data-v-06c2cbdb"]]), sd = {
1872
1923
  class: "v2-help__panel",
1873
1924
  role: "dialog",
1874
1925
  "aria-label": "操作指南"
1875
- }, rd = { class: "v2-help__head" }, sd = /* @__PURE__ */ X({
1926
+ }, vd = { class: "v2-help__head" }, cd = /* @__PURE__ */ X({
1876
1927
  __name: "HelpPanel",
1877
1928
  props: {
1878
1929
  open: { type: Boolean }
1879
1930
  },
1880
1931
  emits: ["close"],
1881
- setup(e, { emit: u }) {
1882
- const t = e, a = u;
1883
- function n(r) {
1884
- r.key === "Escape" && a("close");
1932
+ setup(e, { emit: r }) {
1933
+ const t = e, a = r;
1934
+ function o(u) {
1935
+ u.key === "Escape" && a("close");
1885
1936
  }
1886
- return ve(
1937
+ return ce(
1887
1938
  () => t.open,
1888
- (r) => {
1889
- r ? window.addEventListener("keydown", n) : window.removeEventListener("keydown", n);
1939
+ (u) => {
1940
+ u ? window.addEventListener("keydown", o) : window.removeEventListener("keydown", o);
1890
1941
  },
1891
1942
  // immediate:兼容「初始即 open」的消费方,否则首挂载时 Esc 监听永远挂不上。
1892
1943
  { immediate: !0 }
1893
- ), tt(() => window.removeEventListener("keydown", n)), (r, b) => e.open ? ($(), I("div", {
1944
+ ), lt(() => window.removeEventListener("keydown", o)), (u, f) => e.open ? ($(), I("div", {
1894
1945
  key: 0,
1895
1946
  class: "v2-help",
1896
- onClick: b[1] || (b[1] = Qt((s) => a("close"), ["self"]))
1947
+ onClick: f[1] || (f[1] = ll((s) => a("close"), ["self"]))
1897
1948
  }, [
1898
- l("div", ud, [
1899
- l("header", rd, [
1900
- b[2] || (b[2] = l("h2", null, "操作指南", -1)),
1949
+ l("div", sd, [
1950
+ l("header", vd, [
1951
+ f[2] || (f[2] = l("h2", null, "操作指南", -1)),
1901
1952
  l("button", {
1902
1953
  type: "button",
1903
1954
  class: "v2-help__close",
1904
1955
  title: "关闭帮助",
1905
- onClick: b[0] || (b[0] = (s) => a("close"))
1956
+ onClick: f[0] || (f[0] = (s) => a("close"))
1906
1957
  }, " ✕ ")
1907
1958
  ]),
1908
- b[3] || (b[3] = Il('<div class="v2-help__body" data-v-3f47c5df><h3 data-v-3f47c5df>这个工具是做什么的</h3><p data-v-3f47c5df> 用来<b data-v-3f47c5df>设计固定版式的工作票表单</b>:设计好一次「模板」,以后每次作业直接填写、打印不同的票。 </p><ul data-v-3f47c5df><li data-v-3f47c5df><b data-v-3f47c5df>模板</b>=空的表单版式(有哪些格子、哪些输入框、标题写什么)。 </li><li data-v-3f47c5df><b data-v-3f47c5df>填写数据</b>=某次作业填进输入框的具体内容(如「工作负责人:张三」)。 </li></ul><h3 data-v-3f47c5df>界面五大区域</h3><table data-v-3f47c5df><tbody data-v-3f47c5df><tr data-v-3f47c5df><th data-v-3f47c5df>顶部工具栏</th><td data-v-3f47c5df>新建、保存、预览、打印、导入导出</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>左侧栏</th><td data-v-3f47c5df>组件「零件库」+ 整张表的结构树</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>中间画布</th><td data-v-3f47c5df> 纸张,在这里摆组件、看效果. <strong data-v-3f47c5df>按住空格键,拖拽可平移纸张</strong></td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>右侧属性面板</th><td data-v-3f47c5df>选中某个东西后,在这里改它的设置</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>底部状态栏</th><td data-v-3f47c5df>共几页、有没有问题、会打印几张</td></tr></tbody></table><h3 data-v-3f47c5df>两个模式:设计 / 预览</h3><ul data-v-3f47c5df><li data-v-3f47c5df><b data-v-3f47c5df>设计态</b>(默认):搭模板、改结构、调属性,可随意增删组件、拖动位置。 </li><li data-v-3f47c5df><b data-v-3f47c5df>预览态</b>:点「预览」进入(再点变「退出预览」),输入框<b data-v-3f47c5df>直接打字填写</b>,检查版式。刚进入时输入框是<b data-v-3f47c5df>空的</b>,内容靠填写或「导入数据 / 读取数据」载入。 </li></ul><p class="v2-help__tip" data-v-3f47c5df> 记不住就记住一句:<b data-v-3f47c5df>设计时搭架子,预览时填内容。</b></p><h3 data-v-3f47c5df>模板 与 填写数据(一定要分清)</h3><ul data-v-3f47c5df><li data-v-3f47c5df> 模板 → 工具栏「模板」组的 <b data-v-3f47c5df>保存模板 / 读取模板 / 导出文件 / 导入文件</b>。 </li><li data-v-3f47c5df> 填写数据 → 工具栏「填充数据」组的 <b data-v-3f47c5df>保存数据 / 读取数据 / 导入数据 / 导出数据</b>(这组不限预览态,随时都能点)。 </li></ul><p class="v2-help__tip" data-v-3f47c5df><b data-v-3f47c5df>导出数据 / 保存数据</b>随时可点:它们扫一遍画布上的输入框,把「字段 → 值」 采集出来(没配输入框时就是空对象)。导出<b data-v-3f47c5df>文件</b>与导出<b data-v-3f47c5df>数据</b>还会把同一份 JSON 打印到浏览器控制台,方便对接系统时直接复制。 </p><h3 data-v-3f47c5df>从零设计一张票(标准流程)</h3><ol data-v-3f47c5df><li data-v-3f47c5df><b data-v-3f47c5df>新建空白</b>:得到一张空纸。</li><li data-v-3f47c5df><b data-v-3f47c5df>搭大框</b>:从左侧「布局组件」拖一个<b data-v-3f47c5df>网格</b>到画布(按行列分成若干<b data-v-3f47c5df>格子</b>)。 </li><li data-v-3f47c5df><b data-v-3f47c5df>放内容</b>:把 文本 / 输入框 / 图片 / HTML 模块 拖进某个格子(或点组件按钮放进当前选中的格子)。 </li><li data-v-3f47c5df><b data-v-3f47c5df>改属性</b>:点画布上的组件,右侧面板修改设置。</li><li data-v-3f47c5df><b data-v-3f47c5df>保存 / 导出</b>:本机接着改用「保存模板 / 读取模板」;备份或发人用「导出文件 / 导入文件」(.json)。 </li></ol><p data-v-3f47c5df>左上角「● 未保存 / 已保存」:改了没保存会提示,关页面前记得保存。</p><h3 data-v-3f47c5df>组件说明(左侧零件库)</h3><table data-v-3f47c5df><tbody data-v-3f47c5df><tr data-v-3f47c5df><th data-v-3f47c5df>文本</th><td data-v-3f47c5df>固定不变的文字,不能填。用于标题、栏目标题、说明文字。</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>输入框</th><td data-v-3f47c5df>可填写的字段。凡作业时要手写的地方。</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>图片</th><td data-v-3f47c5df>图片占位框。用于盖章区、示意图、签名扫描件。</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>HTML 模块</th><td data-v-3f47c5df>自由排版的自定义块。不懂 HTML 不用管它。</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>网格</th><td data-v-3f47c5df>按行列划分的布局区,把票分成若干区块。</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>表格</th><td data-v-3f47c5df>多行多列的表。用于设备清单、措施列表等。</td></tr></tbody></table><p data-v-3f47c5df><b data-v-3f47c5df>右侧属性面板</b>(选中后显示):页面=纸张/边距/页眉页脚/分页;网格=列数/边框/间距/行数;格子=撑满/内边距/对齐;文本=文字/字号/加粗/对齐;输入框=字段名/输入方式/宽度/默认值/内边框;图片=地址/填充方式/尺寸;表格=行列数/边框。顶部会显示当前选中(如「格子 1-2」)。 </p><h3 data-v-3f47c5df>结构树(左侧下半部分)</h3><ul data-v-3f47c5df><li data-v-3f47c5df>把整张表从大到小列出:页面 → 网格 → 格子 → 组件。</li><li data-v-3f47c5df> 点树里的项=选中它(比在画布上找小字方便);反向也成立:点画布上的组件,树里会同步高亮并滚动到 它,折叠着的层级会自动展开。 </li><li data-v-3f47c5df> 「删除」删掉选中的组件(页面和格子不能删);「折叠全部 / 展开全部」收起或展开整棵树。 </li></ul><h3 data-v-3f47c5df>填写与打印</h3><ul data-v-3f47c5df><li data-v-3f47c5df>点「预览」→ 在输入框直接打字 → 「保存数据 / 导出数据」留存。</li><li data-v-3f47c5df> 「打印」在预览态或设计态都能点,<b data-v-3f47c5df>自动按纸张分页</b>,方向由纸张尺寸决定(A4 竖打、A3 横打)。 </li><li data-v-3f47c5df> 打出来的<b data-v-3f47c5df>只有票面本身</b>:系统菜单、工具栏、页面其他区域都不会跟着打出来。 </li></ul><p data-v-3f47c5df> 没配置地址的图片:屏幕显示占位灰框方便选中编辑,<b data-v-3f47c5df>打印时不占位置</b>。 </p><p data-v-3f47c5df> 输入框默认的下划线(表示「这里可填写」)<b data-v-3f47c5df>打印时不显示</b>;只有勾选了「显示内部边框」的字段,逐行实线边框才会打印出来。 </p><h3 data-v-3f47c5df>快捷键(设计时可用)</h3><p data-v-3f47c5df>在输入框里打字时,快捷键让位给输入,不会触发下面的操作。</p><table data-v-3f47c5df><tbody data-v-3f47c5df><tr data-v-3f47c5df><th data-v-3f47c5df>Space 空格键</th><td data-v-3f47c5df>按住,拖拽可平移纸张</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>Ctrl/Cmd + Z</th><td data-v-3f47c5df>撤销</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>Ctrl/Cmd + Shift + Z 或 Ctrl/Cmd + Y</th><td data-v-3f47c5df>重做</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>Ctrl/Cmd + S</th><td data-v-3f47c5df>保存模板(本机)</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>Ctrl/Cmd + C / X / V</th><td data-v-3f47c5df>复制 / 剪切 / 粘贴选中的组件</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>Ctrl/Cmd + D</th><td data-v-3f47c5df>原地复制一份选中的组件</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>Delete / Backspace</th><td data-v-3f47c5df>删除选中的组件(仅设计态)</td></tr></tbody></table><h3 data-v-3f47c5df>常见问题</h3><p data-v-3f47c5df><b data-v-3f47c5df>拖了组件但放不进去?</b>先点一下网格里的空位选中某个格子,再拖或点组件按钮。组件必须落在格子里。 </p><p data-v-3f47c5df><b data-v-3f47c5df>预览里能改结构吗?</b>不能。点「退出预览」回设计态再改。</p><p data-v-3f47c5df><b data-v-3f47c5df>导出的文件是什么?</b>模板和填写数据都是 .json 文本备份,可导入还原、发给同事。 </p><p data-v-3f47c5df><b data-v-3f47c5df>怎么知道有没有排版问题?</b>看底部状态栏「待处理问题」数量,点右侧面板里的提示可跳到对应位置。 </p><h3 data-v-3f47c5df>术语速查</h3><table data-v-3f47c5df><tbody data-v-3f47c5df><tr data-v-3f47c5df><th data-v-3f47c5df>模板</th><td data-v-3f47c5df>空表单版式(设计一次,反复用)</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>填写数据</th><td data-v-3f47c5df>某次作业填进表里的具体内容</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>网格</th><td data-v-3f47c5df>按行列划分的布局容器</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>格子</th><td data-v-3f47c5df>网格里的小格,组件就放在里面</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>输入框 / 文本</th><td data-v-3f47c5df>可填写的字段 / 固定不可填的文字</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>设计态 / 预览态</th><td data-v-3f47c5df>搭模板改结构 / 像最终用户一样填写检查</td></tr><tr data-v-3f47c5df><th data-v-3f47c5df>分页</th><td data-v-3f47c5df>一页放不下时自动分到下一页</td></tr></tbody></table></div>', 1))
1959
+ f[3] || (f[3] = nl('<div class="v2-help__body" data-v-e521f73b><h3 data-v-e521f73b>这个工具是做什么的</h3><p data-v-e521f73b> 用来<b data-v-e521f73b>设计固定版式的工作票表单</b>:设计好一次「模板」,以后每次作业直接填写、打印不同的票。 </p><ul data-v-e521f73b><li data-v-e521f73b><b data-v-e521f73b>模板</b>=空的表单版式(有哪些格子、哪些输入框、标题写什么)。 </li><li data-v-e521f73b><b data-v-e521f73b>填写数据</b>=某次作业填进输入框的具体内容(如「工作负责人:张三」)。 </li></ul><h3 data-v-e521f73b>界面五大区域</h3><table data-v-e521f73b><tbody data-v-e521f73b><tr data-v-e521f73b><th data-v-e521f73b>顶部工具栏</th><td data-v-e521f73b>新建、保存、预览、打印、导入导出</td></tr><tr data-v-e521f73b><th data-v-e521f73b>左侧栏</th><td data-v-e521f73b>组件「零件库」+ 整张表的结构树</td></tr><tr data-v-e521f73b><th data-v-e521f73b>中间画布</th><td data-v-e521f73b> 纸张,在这里摆组件、看效果. <strong data-v-e521f73b>按住空格键,拖拽可平移纸张</strong></td></tr><tr data-v-e521f73b><th data-v-e521f73b>右侧属性面板</th><td data-v-e521f73b>选中某个东西后,在这里改它的设置</td></tr><tr data-v-e521f73b><th data-v-e521f73b>底部状态栏</th><td data-v-e521f73b>共几页、有没有问题、会打印几张</td></tr></tbody></table><h3 data-v-e521f73b>两个模式:设计 / 预览</h3><ul data-v-e521f73b><li data-v-e521f73b><b data-v-e521f73b>设计态</b>(默认):搭模板、改结构、调属性,可随意增删组件、拖动位置。 </li><li data-v-e521f73b><b data-v-e521f73b>预览态</b>:点「预览」进入(再点变「退出预览」),输入框<b data-v-e521f73b>直接打字填写</b>,检查版式。刚进入时输入框是<b data-v-e521f73b>空的</b>,内容靠填写或「导入数据 / 读取数据」载入。 </li></ul><p class="v2-help__tip" data-v-e521f73b> 记不住就记住一句:<b data-v-e521f73b>设计时搭架子,预览时填内容。</b></p><h3 data-v-e521f73b>模板 与 填写数据(一定要分清)</h3><ul data-v-e521f73b><li data-v-e521f73b> 模板 → 工具栏「模板」组的 <b data-v-e521f73b>保存模板 / 读取模板 / 导出文件 / 导入文件</b>。 </li><li data-v-e521f73b> 填写数据 → 工具栏「填充数据」组的 <b data-v-e521f73b>保存数据 / 读取数据 / 导入数据 / 导出数据</b>(这组不限预览态,随时都能点)。 </li></ul><p class="v2-help__tip" data-v-e521f73b><b data-v-e521f73b>导出数据 / 保存数据</b>随时可点:它们扫一遍画布上的输入框,把「字段 → 值」 采集出来(没配输入框时就是空对象)。导出<b data-v-e521f73b>文件</b>与导出<b data-v-e521f73b>数据</b>还会把同一份 JSON 打印到浏览器控制台,方便对接系统时直接复制。 </p><h3 data-v-e521f73b>从零设计一张票(标准流程)</h3><ol data-v-e521f73b><li data-v-e521f73b><b data-v-e521f73b>新建空白</b>:得到一张空纸。</li><li data-v-e521f73b><b data-v-e521f73b>搭大框</b>:从左侧「布局组件」拖一个<b data-v-e521f73b>网格</b>到画布(按行列分成若干<b data-v-e521f73b>格子</b>)。 </li><li data-v-e521f73b><b data-v-e521f73b>放内容</b>:把 文本 / 输入框 / 图片 / 表格 / HTML 模块 拖进某个格子(或点组件按钮放进当前选中的格子)。 </li><li data-v-e521f73b><b data-v-e521f73b>改属性</b>:点画布上的组件,右侧面板修改设置。</li><li data-v-e521f73b><b data-v-e521f73b>保存 / 导出</b>:本机接着改用「保存模板 / 读取模板」;备份或发人用「导出文件 / 导入文件」(.json)。 </li></ol><p data-v-e521f73b>左上角「● 未保存 / 已保存」:改了没保存会提示,关页面前记得保存。</p><h3 data-v-e521f73b>组件说明(左侧零件库)</h3><p data-v-e521f73b>左侧分两组:<b data-v-e521f73b>基础组件</b>(往表里填内容的)和 <b data-v-e521f73b>布局组件</b>(用来排版定位的)。</p><table data-v-e521f73b><tbody data-v-e521f73b><tr data-v-e521f73b><th data-v-e521f73b>文本</th><td data-v-e521f73b>固定不变的文字,不能填。用于标题、栏目标题、说明文字。</td></tr><tr data-v-e521f73b><th data-v-e521f73b>输入框</th><td data-v-e521f73b>可填写的字段。凡作业时要手写的地方。</td></tr><tr data-v-e521f73b><th data-v-e521f73b>图片</th><td data-v-e521f73b>图片占位框。用于盖章区、示意图、签名扫描件。</td></tr><tr data-v-e521f73b><th data-v-e521f73b>HTML 模块</th><td data-v-e521f73b>自由排版的自定义块。不懂 HTML 不用管它。</td></tr><tr data-v-e521f73b><th data-v-e521f73b>表格</th><td data-v-e521f73b>多行多列的表,格子可直接填写。用于设备清单、措施列表等。</td></tr><tr data-v-e521f73b><th data-v-e521f73b>网格</th><td data-v-e521f73b>按行列划分的布局区,把票分成若干区块(布局组件)。</td></tr></tbody></table><p data-v-e521f73b><b data-v-e521f73b>右侧属性面板</b>(选中后显示):页面=纸张/边距/页眉页脚/分页;网格=列数/边框/间距/行数;格子=撑满/内边距/对齐;文本=文字/字号/加粗/对齐;输入框=字段名/前后标签/点击触发/宽度/默认值/内边框;图片=地址/填充方式/尺寸;表格=最小行数/边框/表头/列配置。底部还有<b data-v-e521f73b>额外属性</b>(自定义键值对,会作为 HTML 属性输出,含义由消费系统识别;属性名会被系统忽略时标红提示)。顶部会显示当前选中(如「格子 1-2」)。 </p><h3 data-v-e521f73b>结构树(左侧下半部分)</h3><ul data-v-e521f73b><li data-v-e521f73b>把整张表从大到小列出:页面 → 网格 → 格子 → 组件。</li><li data-v-e521f73b> 点树里的项=选中它(比在画布上找小字方便);反向也成立:点画布上的组件,树里会同步高亮并滚动到 它,折叠着的层级会自动展开。 </li><li data-v-e521f73b> 「删除」删掉选中的组件(页面和格子不能删);「折叠全部 / 展开全部」收起或展开整棵树。 </li></ul><h3 data-v-e521f73b>填写与打印</h3><ul data-v-e521f73b><li data-v-e521f73b>点「预览」→ 在输入框直接打字 → 「保存数据 / 导出数据」留存。</li><li data-v-e521f73b> 「打印」在预览态或设计态都能点,<b data-v-e521f73b>自动按纸张分页</b>,方向由纸张尺寸决定(A4 竖打、A3 横打)。 </li><li data-v-e521f73b> 打出来的<b data-v-e521f73b>只有票面本身</b>:系统菜单、工具栏、页面其他区域都不会跟着打出来。 </li></ul><p data-v-e521f73b> 没配置地址的图片:屏幕显示占位灰框方便选中编辑,<b data-v-e521f73b>打印时不占位置</b>。 </p><p data-v-e521f73b> 输入框默认的下划线(表示「这里可填写」)<b data-v-e521f73b>打印时不显示</b>;只有勾选了「显示内部边框」的字段,逐行实线边框才会打印出来。 </p><h3 data-v-e521f73b>快捷键(设计时可用)</h3><p data-v-e521f73b>在输入框里打字时,快捷键让位给输入,不会触发下面的操作。</p><table data-v-e521f73b><tbody data-v-e521f73b><tr data-v-e521f73b><th data-v-e521f73b>Space 空格键</th><td data-v-e521f73b>按住,拖拽可平移纸张</td></tr><tr data-v-e521f73b><th data-v-e521f73b>Ctrl/Cmd + Z</th><td data-v-e521f73b>撤销</td></tr><tr data-v-e521f73b><th data-v-e521f73b>Ctrl/Cmd + Shift + Z 或 Ctrl/Cmd + Y</th><td data-v-e521f73b>重做</td></tr><tr data-v-e521f73b><th data-v-e521f73b>Ctrl/Cmd + S</th><td data-v-e521f73b>保存模板(本机)</td></tr><tr data-v-e521f73b><th data-v-e521f73b>Ctrl/Cmd + C / X / V</th><td data-v-e521f73b>复制 / 剪切 / 粘贴选中的组件</td></tr><tr data-v-e521f73b><th data-v-e521f73b>Ctrl/Cmd + D</th><td data-v-e521f73b>原地复制一份选中的组件</td></tr><tr data-v-e521f73b><th data-v-e521f73b>Delete / Backspace</th><td data-v-e521f73b>删除选中的组件(仅设计态)</td></tr></tbody></table><h3 data-v-e521f73b>常见问题</h3><p data-v-e521f73b><b data-v-e521f73b>拖了组件但放不进去?</b>先点一下网格里的空位选中某个格子,再拖或点组件按钮。组件必须落在格子里。 </p><p data-v-e521f73b><b data-v-e521f73b>预览里能改结构吗?</b>不能。点「退出预览」回设计态再改。</p><p data-v-e521f73b><b data-v-e521f73b>导出的文件是什么?</b>模板和填写数据都是 .json 文本备份,可导入还原、发给同事。 </p><p data-v-e521f73b><b data-v-e521f73b>怎么知道有没有排版问题?</b>看底部状态栏「待处理问题」数量,点右侧面板里的提示可跳到对应位置。 </p><h3 data-v-e521f73b>术语速查</h3><table data-v-e521f73b><tbody data-v-e521f73b><tr data-v-e521f73b><th data-v-e521f73b>模板</th><td data-v-e521f73b>空表单版式(设计一次,反复用)</td></tr><tr data-v-e521f73b><th data-v-e521f73b>填写数据</th><td data-v-e521f73b>某次作业填进表里的具体内容</td></tr><tr data-v-e521f73b><th data-v-e521f73b>网格</th><td data-v-e521f73b>按行列划分的布局容器</td></tr><tr data-v-e521f73b><th data-v-e521f73b>格子</th><td data-v-e521f73b>网格里的小格,组件就放在里面</td></tr><tr data-v-e521f73b><th data-v-e521f73b>输入框 / 文本</th><td data-v-e521f73b>可填写的字段 / 固定不可填的文字</td></tr><tr data-v-e521f73b><th data-v-e521f73b>设计态 / 预览态</th><td data-v-e521f73b>搭模板改结构 / 像最终用户一样填写检查</td></tr><tr data-v-e521f73b><th data-v-e521f73b>分页</th><td data-v-e521f73b>一页放不下时自动分到下一页</td></tr></tbody></table></div>', 1))
1909
1960
  ])
1910
- ])) : K("", !0);
1961
+ ])) : q("", !0);
1911
1962
  }
1912
- }), vd = /* @__PURE__ */ ie(sd, [["__scopeId", "data-v-3f47c5df"]]), cd = "[ticket-designer] schema 配置 JSON", Kt = "ticket-designer-schema-v2", pd = 100, fd = 800;
1913
- function dl() {
1914
- const e = Al(), u = _e();
1915
- return tl(e, u);
1963
+ }), pd = /* @__PURE__ */ ve(cd, [["__scopeId", "data-v-e521f73b"]]), fd = "[ticket-designer] schema 配置 JSON", Qt = "ticket-designer-schema-v2", bd = 100, gd = 800;
1964
+ function cl() {
1965
+ const e = Al(), r = et();
1966
+ return il(e, r);
1916
1967
  }
1917
- function gd(e, u = {}) {
1968
+ function md(e, r = {}) {
1918
1969
  const t = G(
1919
- e ? JSON.parse(JSON.stringify(e)) : dl()
1920
- ), a = G(!1), n = G([]), r = G([]), b = G(null);
1921
- let s = "", f = 0;
1922
- ve(
1970
+ e ? JSON.parse(JSON.stringify(e)) : cl()
1971
+ ), a = G(!1), o = G([]), u = G([]), f = G(null);
1972
+ let s = "", b = 0;
1973
+ ce(
1923
1974
  t,
1924
1975
  () => {
1925
1976
  a.value = !0;
1926
1977
  },
1927
1978
  { flush: "sync" }
1928
1979
  );
1929
- function v(k, Y) {
1930
- const J = Date.now();
1931
- Y && Y === s && J - f < fd ? t.value = k : (n.value.push(t.value), n.value.length > pd && n.value.shift(), r.value = [], t.value = k, s = Y ?? ""), f = J;
1980
+ function v(T, J) {
1981
+ const K = Date.now();
1982
+ J && J === s && K - b < gd ? t.value = T : (o.value.push(t.value), o.value.length > bd && o.value.shift(), u.value = [], t.value = T, s = J ?? ""), b = K;
1932
1983
  }
1933
- function p(k) {
1934
- n.value = [], r.value = [], s = "", t.value = k, a.value = !1;
1984
+ function p(T) {
1985
+ o.value = [], u.value = [], s = "", t.value = T, a.value = !1;
1935
1986
  }
1936
1987
  function g() {
1937
- const k = n.value.pop();
1938
- k && (r.value.push(t.value), t.value = k, s = "", a.value = !0);
1988
+ const T = o.value.pop();
1989
+ T && (u.value.push(t.value), t.value = T, s = "", a.value = !0);
1939
1990
  }
1940
- function L() {
1941
- const k = r.value.pop();
1942
- k && (n.value.push(t.value), t.value = k, s = "", a.value = !0);
1991
+ function M() {
1992
+ const T = u.value.pop();
1993
+ T && (o.value.push(t.value), t.value = T, s = "", a.value = !0);
1943
1994
  }
1944
- const A = P(() => n.value.length > 0), H = P(() => r.value.length > 0);
1995
+ const A = N(() => o.value.length > 0), H = N(() => u.value.length > 0);
1945
1996
  function U() {
1946
1997
  try {
1947
1998
  localStorage.setItem(
1948
- Kt,
1949
- el(t.value, !0)
1999
+ Qt,
2000
+ ol(t.value, !0)
1950
2001
  ), a.value = !1;
1951
- } catch (k) {
2002
+ } catch (T) {
1952
2003
  alert(
1953
- `保存失败:${k instanceof Error ? k.message : String(k)}`
2004
+ `保存失败:${T instanceof Error ? T.message : String(T)}`
1954
2005
  );
1955
2006
  }
1956
2007
  }
1957
- function q() {
1958
- var Y;
1959
- const k = localStorage.getItem(Kt);
1960
- if (!k) {
2008
+ function Z() {
2009
+ var J;
2010
+ const T = localStorage.getItem(Qt);
2011
+ if (!T) {
1961
2012
  alert("本地没有已保存的模板");
1962
2013
  return;
1963
2014
  }
1964
2015
  try {
1965
- p(Qe(k)), (Y = u.onReset) == null || Y.call(u);
1966
- } catch (J) {
2016
+ p(_e(T)), (J = r.onReset) == null || J.call(r);
2017
+ } catch (K) {
1967
2018
  alert(
1968
- `读取失败:${J instanceof Error ? J.message : String(J)}`
2019
+ `读取失败:${K instanceof Error ? K.message : String(K)}`
1969
2020
  );
1970
2021
  }
1971
2022
  }
1972
2023
  function j() {
1973
2024
  try {
1974
- const k = ca(t.value);
1975
- console.log(cd, k), al(ll(sa), k);
1976
- } catch (k) {
2025
+ const T = ca(t.value);
2026
+ console.log(fd, T), rl(dl(sa), T);
2027
+ } catch (T) {
1977
2028
  alert(
1978
- `导出失败:${k instanceof Error ? k.message : String(k)}`
2029
+ `导出失败:${T instanceof Error ? T.message : String(T)}`
1979
2030
  );
1980
2031
  }
1981
2032
  }
1982
- function te(k) {
2033
+ function le(T) {
1983
2034
  var w;
1984
- const Y = k.target, J = (w = Y.files) == null ? void 0 : w[0];
1985
- if (!J) return;
1986
- const Z = new FileReader();
1987
- Z.onload = () => {
1988
- var y;
2035
+ const J = T.target, K = (w = J.files) == null ? void 0 : w[0];
2036
+ if (!K) return;
2037
+ const _ = new FileReader();
2038
+ _.onload = () => {
2039
+ var S;
1989
2040
  try {
1990
- p(Qe(String(Z.result))), (y = u.onReset) == null || y.call(u);
2041
+ p(_e(String(_.result))), (S = r.onReset) == null || S.call(r);
1991
2042
  } catch (c) {
1992
2043
  alert(
1993
2044
  `导入失败:${c instanceof Error ? c.message : String(c)}`
1994
2045
  );
1995
2046
  } finally {
1996
- Y.value = "";
2047
+ J.value = "";
1997
2048
  }
1998
- }, Z.onerror = () => {
1999
- alert("文件读取失败"), Y.value = "";
2000
- }, Z.readAsText(J);
2049
+ }, _.onerror = () => {
2050
+ alert("文件读取失败"), J.value = "";
2051
+ }, _.readAsText(K);
2001
2052
  }
2002
2053
  function ee() {
2003
- var k;
2004
- (k = b.value) == null || k.click();
2054
+ var T;
2055
+ (T = f.value) == null || T.click();
2005
2056
  }
2006
2057
  return {
2007
2058
  schema: t,
2008
2059
  dirty: a,
2009
2060
  canUndo: A,
2010
2061
  canRedo: H,
2011
- fileInput: b,
2062
+ fileInput: f,
2012
2063
  commit: v,
2013
2064
  resetHistory: p,
2014
2065
  undo: g,
2015
- redo: L,
2066
+ redo: M,
2016
2067
  saveToLocal: U,
2017
- loadFromLocal: q,
2068
+ loadFromLocal: Z,
2018
2069
  exportFile: j,
2019
- importFile: te,
2070
+ importFile: le,
2020
2071
  triggerImport: ee
2021
2072
  };
2022
2073
  }
2023
- function Je(e) {
2024
- const u = e.trim();
2025
- if (u === "") return;
2026
- const t = Number(u);
2074
+ function qe(e) {
2075
+ const r = e.trim();
2076
+ if (r === "") return;
2077
+ const t = Number(r);
2027
2078
  return Number.isFinite(t) ? Math.max(0, t) : void 0;
2028
2079
  }
2029
- function md(e) {
2030
- const { schema: u, commit: t } = e.document, {
2080
+ function hd(e) {
2081
+ const { schema: r, commit: t } = e.document, {
2031
2082
  selectedNodeId: a,
2032
- selectedNode: n,
2033
- selectionPathIds: r,
2034
- selectionPathIndex: b,
2083
+ selectedNode: o,
2084
+ selectionPathIds: u,
2085
+ selectionPathIndex: f,
2035
2086
  nodeIndex: s,
2036
- selectedCellContext: f,
2087
+ selectedCellContext: b,
2037
2088
  selectedOwnerCell: v,
2038
2089
  insertionSlot: p
2039
2090
  } = e.selection;
2040
- function g(o) {
2041
- return o === "text" ? Xl() : o === "field" ? Zl() : o === "table" ? Ql() : o === "html" ? _l() : o === "grid" ? _e() : ea();
2091
+ function g(n) {
2092
+ return n === "text" ? Xl() : n === "field" ? Zl() : n === "table" ? Ql() : n === "html" ? _l() : n === "grid" ? et() : ea();
2042
2093
  }
2043
- function L() {
2094
+ function M() {
2044
2095
  if (!e.editable()) return;
2045
- const o = _e();
2046
- t(tl(u.value, o)), a.value = o.id, r.value = [u.value.pages[0].id, o.id], b.value = 1;
2096
+ const n = et();
2097
+ t(il(r.value, n)), a.value = n.id, u.value = [r.value.pages[0].id, n.id], f.value = 1;
2047
2098
  }
2048
2099
  function A() {
2049
- e.editable() && (p.value ? H("grid") : L());
2100
+ e.editable() && (p.value ? H("grid") : M());
2050
2101
  }
2051
- function H(o) {
2102
+ function H(n) {
2052
2103
  if (!e.editable()) return;
2053
2104
  const i = p.value;
2054
2105
  if (!i) return;
2055
- const d = g(o);
2056
- t(be(u.value, i.id, d)), a.value = d.id;
2106
+ const d = g(n);
2107
+ t(Se(r.value, i.id, d)), a.value = d.id;
2057
2108
  }
2058
2109
  function U() {
2059
- var o, i;
2060
- !a.value || ((o = n.value) == null ? void 0 : o.type) === "page" || ((i = n.value) == null ? void 0 : i.type) === "grid-cell" || (t(ql(u.value, a.value)), e.clearSelection());
2110
+ var n, i;
2111
+ !a.value || ((n = o.value) == null ? void 0 : n.type) === "page" || ((i = o.value) == null ? void 0 : i.type) === "grid-cell" || (t(Yl(r.value, a.value)), e.clearSelection());
2061
2112
  }
2062
- let q = null, j = null;
2063
- function te() {
2064
- const o = n.value;
2065
- return o && o.type !== "page" && o.type !== "grid-cell" ? o : null;
2113
+ let Z = null, j = null;
2114
+ function le() {
2115
+ const n = o.value;
2116
+ return n && n.type !== "page" && n.type !== "grid-cell" ? n : null;
2066
2117
  }
2067
- function ee(o) {
2068
- var B;
2069
- const i = n.value;
2118
+ function ee(n) {
2119
+ var R;
2120
+ const i = o.value;
2070
2121
  if ((i == null ? void 0 : i.type) === "grid-cell") {
2071
- t(be(u.value, i.id, o)), a.value = o.id;
2122
+ t(Se(r.value, i.id, n)), a.value = n.id;
2072
2123
  return;
2073
2124
  }
2074
2125
  const d = v.value;
2075
2126
  if (i && d) {
2076
- const Q = d.children.findIndex((se) => se.id === a.value), ne = Q >= 0 ? Q + 1 : d.children.length, pe = be(u.value, d.id, o);
2077
- t(Ut(pe, o.id, d.id, ne)), a.value = o.id;
2127
+ const Y = d.children.findIndex((se) => se.id === a.value), te = Y >= 0 ? Y + 1 : d.children.length, ue = Se(r.value, d.id, n);
2128
+ t(qt(ue, n.id, d.id, te)), a.value = n.id;
2078
2129
  return;
2079
2130
  }
2080
- const C = p.value;
2081
- if (C && (C.type === "grid-cell" || C.type === "table-cell-template")) {
2082
- t(be(u.value, C.id, o)), a.value = o.id;
2131
+ const y = p.value;
2132
+ if (y && (y.type === "grid-cell" || y.type === "table-cell-template")) {
2133
+ t(Se(r.value, y.id, n)), a.value = n.id;
2083
2134
  return;
2084
2135
  }
2085
2136
  if (j) {
2086
- const Q = (B = s.value.get(j)) == null ? void 0 : B.node;
2087
- if (Q && Q.type === "grid-cell") {
2088
- t(be(u.value, Q.id, o)), a.value = o.id;
2137
+ const Y = (R = s.value.get(j)) == null ? void 0 : R.node;
2138
+ if (Y && Y.type === "grid-cell") {
2139
+ t(Se(r.value, Y.id, n)), a.value = n.id;
2089
2140
  return;
2090
2141
  }
2091
2142
  }
2092
2143
  }
2093
- function k() {
2144
+ function T() {
2094
2145
  var i;
2095
2146
  if (!e.editable()) return;
2096
- const o = te();
2097
- o && (q = Fe(o), j = ((i = v.value) == null ? void 0 : i.id) ?? null);
2147
+ const n = le();
2148
+ n && (Z = Ne(n), j = ((i = v.value) == null ? void 0 : i.id) ?? null);
2098
2149
  }
2099
- function Y() {
2150
+ function J() {
2100
2151
  var i;
2101
2152
  if (!e.editable()) return;
2102
- const o = te();
2103
- o && (q = Fe(o), j = ((i = v.value) == null ? void 0 : i.id) ?? null, U());
2153
+ const n = le();
2154
+ n && (Z = Ne(n), j = ((i = v.value) == null ? void 0 : i.id) ?? null, U());
2104
2155
  }
2105
- function J() {
2106
- e.editable() && q && ee(Fe(q));
2156
+ function K() {
2157
+ e.editable() && Z && ee(Ne(Z));
2107
2158
  }
2108
- function Z() {
2159
+ function _() {
2109
2160
  if (!e.editable()) return;
2110
- const o = te();
2111
- o && ee(Fe(o));
2161
+ const n = le();
2162
+ n && ee(Ne(n));
2112
2163
  }
2113
2164
  function w() {
2114
- var B;
2115
- const o = a.value, i = f.value;
2116
- if (!o || !i || !i.hasNextSibling) return;
2117
- const d = (B = s.value.get(o)) == null ? void 0 : B.parent;
2165
+ var R;
2166
+ const n = a.value, i = b.value;
2167
+ if (!n || !i || !i.hasNextSibling) return;
2168
+ const d = (R = s.value.get(n)) == null ? void 0 : R.parent;
2118
2169
  if (!d) return;
2119
- const C = d.cells[i.columnIndex + 1].id;
2120
- t(Kl(u.value, o, C), `merge:${o}`), a.value = o;
2170
+ const y = d.cells[i.columnIndex + 1].id;
2171
+ t(ql(r.value, n, y), `merge:${n}`), a.value = n;
2121
2172
  }
2122
- function y() {
2123
- const o = a.value, i = f.value;
2124
- !o || !i || !i.canSplit || (t(Jl(u.value, o), `split:${o}`), a.value = o);
2173
+ function S() {
2174
+ const n = a.value, i = b.value;
2175
+ !n || !i || !i.canSplit || (t(Kl(r.value, n), `split:${n}`), a.value = n);
2125
2176
  }
2126
- function c(o) {
2127
- a.value = o;
2177
+ function c(n) {
2178
+ a.value = n;
2128
2179
  }
2129
- function h(o) {
2130
- const i = Ut(u.value, o.moveId, o.cellId, o.index);
2131
- i !== u.value && (t(i, "move:" + o.moveId), a.value = o.moveId);
2180
+ function h(n) {
2181
+ const i = qt(r.value, n.moveId, n.cellId, n.index);
2182
+ i !== r.value && (t(i, "move:" + n.moveId), a.value = n.moveId);
2132
2183
  }
2133
- function m(o) {
2134
- var C;
2135
- const i = (C = s.value.get(o.cellId)) == null ? void 0 : C.node;
2184
+ function m(n) {
2185
+ var y;
2186
+ const i = (y = s.value.get(n.cellId)) == null ? void 0 : y.node;
2136
2187
  if (!i || i.type !== "grid-cell" && i.type !== "table-cell-template") return;
2137
- const d = g(o.kind);
2138
- t(be(u.value, o.cellId, d)), a.value = d.id;
2188
+ const d = g(n.kind);
2189
+ t(Se(r.value, n.cellId, d)), a.value = d.id;
2139
2190
  }
2140
- function S(o, i) {
2141
- a.value && t(Yl(u.value, a.value, o), i);
2191
+ function C(n, i) {
2192
+ a.value && t(Jl(r.value, a.value, n), i);
2142
2193
  }
2143
- function F(o) {
2144
- const i = o.target.value;
2145
- S(
2194
+ function F(n) {
2195
+ const i = n.target.value;
2196
+ C(
2146
2197
  (d) => d.type === "text" ? { ...d, text: i } : d,
2147
2198
  a.value ? `edit:${a.value}` : void 0
2148
2199
  );
2149
2200
  }
2150
- function E(o) {
2151
- const i = o.target.value;
2152
- S(
2201
+ function P(n) {
2202
+ const i = n.target.value;
2203
+ C(
2153
2204
  (d) => d.type === "p" && d.mode === "field" ? { ...d, field: i } : d,
2154
2205
  a.value ? `edit:${a.value}` : void 0
2155
2206
  );
2156
2207
  }
2157
- function N(o) {
2158
- const i = o.target.value;
2159
- S(
2208
+ function D(n) {
2209
+ const i = n.target.value;
2210
+ C(
2160
2211
  (d) => d.type === "p" && d.mode === "field" ? { ...d, prefix: i || void 0 } : d,
2161
2212
  a.value ? `edit:${a.value}` : void 0
2162
2213
  );
2163
2214
  }
2164
- function z(o) {
2165
- const i = o.target.value;
2166
- S(
2215
+ function z(n) {
2216
+ const i = n.target.value;
2217
+ C(
2167
2218
  (d) => d.type === "p" && d.mode === "field" ? { ...d, suffix: i || void 0 } : d,
2168
2219
  a.value ? `edit:${a.value}` : void 0
2169
2220
  );
2170
2221
  }
2171
- function O(o) {
2172
- const i = o.target.value;
2173
- S(
2222
+ function O(n) {
2223
+ const i = n.target.value;
2224
+ C(
2174
2225
  (d) => d.type === "p" && d.mode === "field" ? { ...d, width: i.trim() || void 0 } : d,
2175
2226
  a.value ? `edit:${a.value}` : void 0
2176
2227
  );
2177
2228
  }
2178
- function ce(o) {
2179
- const i = o.target.value;
2180
- S(
2229
+ function fe(n) {
2230
+ const i = n.target.value;
2231
+ C(
2181
2232
  (d) => d.type === "p" && d.mode === "field" ? { ...d, default: i || void 0 } : d,
2182
2233
  a.value ? `edit:${a.value}` : void 0
2183
2234
  );
2184
2235
  }
2185
- function Ee(o) {
2186
- const i = o.target.checked;
2187
- S(
2236
+ function He(n) {
2237
+ const i = n.target.checked;
2238
+ C(
2188
2239
  (d) => d.type === "p" && d.mode === "field" ? { ...d, innerBorder: i || void 0 } : d,
2189
2240
  a.value ? `edit:${a.value}` : void 0
2190
2241
  );
2191
2242
  }
2192
- function ae(o) {
2193
- const i = o.target.value;
2194
- S(
2195
- (d) => d.type === "p" && d.mode === "field" ? { ...d, action: i || void 0 } : d,
2196
- a.value ? `action:${a.value}` : void 0
2243
+ function ne(n) {
2244
+ const i = n.target.checked;
2245
+ C(
2246
+ (d) => d.type === "p" && d.mode === "field" ? { ...d, interactive: i || void 0 } : d,
2247
+ a.value ? `interactive:${a.value}` : void 0
2197
2248
  );
2198
2249
  }
2199
- function Ae(o) {
2200
- const i = o.target.value.trim();
2201
- S(
2202
- (d) => {
2203
- if (d.type !== "p" || d.mode !== "field") return d;
2204
- const C = { ...d.actionParams ?? {} };
2205
- return i ? C.format = i : delete C.format, {
2206
- ...d,
2207
- actionParams: Object.keys(C).length ? C : void 0
2208
- };
2209
- },
2210
- a.value ? `actionParams:${a.value}` : void 0
2250
+ function me() {
2251
+ const n = o.value;
2252
+ return n && "params" in n ? { ...n.params ?? {} } : {};
2253
+ }
2254
+ function he(n, i) {
2255
+ const d = Object.keys(n).length ? n : void 0;
2256
+ C(
2257
+ (y) => Object.assign({}, y, { params: d }),
2258
+ a.value ? `${i}:${a.value}` : void 0
2211
2259
  );
2212
2260
  }
2213
- function He(o) {
2261
+ function Ie(n) {
2262
+ let i = Object.keys(n).length + 1;
2263
+ for (; `param${i}` in n; ) i += 1;
2264
+ return `param${i}`;
2265
+ }
2266
+ function nt() {
2267
+ const n = me();
2268
+ n[Ie(n)] = "", he(n, "param");
2269
+ }
2270
+ function Re(n, i) {
2271
+ const d = i.target.value.trim();
2272
+ if (d === n) return;
2273
+ const y = me();
2274
+ if (!(n in y)) return;
2275
+ if (!d || d in y) {
2276
+ i.target.value = n;
2277
+ return;
2278
+ }
2279
+ const R = {};
2280
+ for (const [Y, te] of Object.entries(y))
2281
+ Y === n ? R[d] = te : R[Y] = te;
2282
+ he(R, "param");
2283
+ }
2284
+ function Le(n, i) {
2285
+ const d = i.target.value, y = me();
2286
+ n in y && (y[n] = d, he(y, "param"));
2287
+ }
2288
+ function xe(n) {
2289
+ const i = me();
2290
+ n in i && (delete i[n], he(i, "paramdel"));
2291
+ }
2292
+ function Me(n) {
2214
2293
  var i;
2215
- ((i = n.value) == null ? void 0 : i.type) === "grid" && t(
2294
+ ((i = o.value) == null ? void 0 : i.type) === "grid" && t(
2216
2295
  jl(
2217
- u.value,
2218
- n.value.id,
2219
- o.target.value
2296
+ r.value,
2297
+ o.value.id,
2298
+ n.target.value
2220
2299
  )
2221
2300
  );
2222
2301
  }
2223
- function Ce(o) {
2302
+ function Be(n) {
2224
2303
  var i;
2225
- ((i = n.value) == null ? void 0 : i.type) === "table" && t(
2304
+ ((i = o.value) == null ? void 0 : i.type) === "table" && t(
2226
2305
  Ul(
2227
- u.value,
2228
- n.value.id,
2229
- o.target.value
2306
+ r.value,
2307
+ o.value.id,
2308
+ n.target.value
2230
2309
  )
2231
2310
  );
2232
2311
  }
2233
- function at(o) {
2234
- var ne, pe;
2235
- if (((ne = n.value) == null ? void 0 : ne.type) !== "grid") return;
2236
- const i = o.target, d = Math.floor(Number(i.value));
2312
+ function Ve(n) {
2313
+ var te, ue;
2314
+ if (((te = o.value) == null ? void 0 : te.type) !== "grid") return;
2315
+ const i = n.target, d = Math.floor(Number(i.value));
2237
2316
  if (!Number.isInteger(d) || d < 1) return;
2238
- const C = d, B = i.dataset.dimension === "rows" ? C : n.value.rows.length, Q = i.dataset.dimension === "columns" ? C : ((pe = n.value.rows[0]) == null ? void 0 : pe.cells.length) ?? 1;
2239
- t(Wl(u.value, n.value.id, B, Q));
2317
+ const y = d, R = i.dataset.dimension === "rows" ? y : o.value.rows.length, Y = i.dataset.dimension === "columns" ? y : ((ue = o.value.rows[0]) == null ? void 0 : ue.cells.length) ?? 1;
2318
+ t(Wl(r.value, o.value.id, R, Y));
2240
2319
  }
2241
- function Re(o) {
2320
+ function Ge(n) {
2242
2321
  var i;
2243
- ((i = n.value) == null ? void 0 : i.type) === "table" && t(
2322
+ ((i = o.value) == null ? void 0 : i.type) === "table" && t(
2244
2323
  Ol(
2245
- u.value,
2246
- n.value.id,
2247
- Number(o.target.value)
2324
+ r.value,
2325
+ o.value.id,
2326
+ Number(n.target.value)
2248
2327
  )
2249
2328
  );
2250
2329
  }
2251
- function Le() {
2252
- var o;
2253
- ((o = n.value) == null ? void 0 : o.type) === "table" && t(zl(u.value, n.value.id));
2330
+ function ot() {
2331
+ var n;
2332
+ ((n = o.value) == null ? void 0 : n.type) === "table" && t(zl(r.value, o.value.id));
2254
2333
  }
2255
- function we(o) {
2334
+ function it(n) {
2256
2335
  var i;
2257
- ((i = n.value) == null ? void 0 : i.type) === "table" && t(Gl(u.value, n.value.id, o));
2336
+ ((i = o.value) == null ? void 0 : i.type) === "table" && t(Gl(r.value, o.value.id, n));
2258
2337
  }
2259
- function Me(o, i) {
2260
- var C;
2261
- if (((C = n.value) == null ? void 0 : C.type) !== "table") return;
2338
+ function ze(n, i) {
2339
+ var y;
2340
+ if (((y = o.value) == null ? void 0 : y.type) !== "table") return;
2262
2341
  const d = i.target.value.trim();
2263
- !d || d === o || t(Vl(u.value, n.value.id, o, d));
2342
+ !d || d === n || t(Vl(r.value, o.value.id, n, d));
2264
2343
  }
2265
- function Be(o, i, d) {
2266
- var Q;
2267
- if (((Q = n.value) == null ? void 0 : Q.type) !== "table") return;
2268
- const C = d.target;
2344
+ function Oe(n, i, d) {
2345
+ var Y;
2346
+ if (((Y = o.value) == null ? void 0 : Y.type) !== "table") return;
2347
+ const y = d.target;
2269
2348
  if (i === "width") {
2270
- const ne = Ie(C.value);
2271
- if (ne === "INVALID") return;
2349
+ const te = We(y.value);
2350
+ if (te === "INVALID") return;
2272
2351
  t(
2273
- Wt(u.value, n.value.id, o, { width: ne }),
2274
- `tblcol:${o}:width`
2352
+ Kt(r.value, o.value.id, n, { width: te }),
2353
+ `tblcol:${n}:width`
2275
2354
  );
2276
2355
  return;
2277
2356
  }
2278
- const B = { [i]: C.value || void 0 };
2357
+ const R = { [i]: y.value || void 0 };
2279
2358
  t(
2280
- Wt(u.value, n.value.id, o, B),
2281
- `tblcol:${o}:${i}`
2359
+ Kt(r.value, o.value.id, n, R),
2360
+ `tblcol:${n}:${i}`
2282
2361
  );
2283
2362
  }
2284
- function Se(o) {
2363
+ function Ce(n) {
2285
2364
  var i;
2286
- ((i = n.value) == null ? void 0 : i.type) === "table" && S(
2287
- (d) => d.type === "table" ? { ...d, headerStyle: { ...d.headerStyle, ...o } } : d,
2365
+ ((i = o.value) == null ? void 0 : i.type) === "table" && C(
2366
+ (d) => d.type === "table" ? { ...d, headerStyle: { ...d.headerStyle, ...n } } : d,
2288
2367
  a.value ? `tablehdr:${a.value}` : void 0
2289
2368
  );
2290
2369
  }
2291
- function Ve(o) {
2292
- const i = o.target.value, d = Number(i);
2293
- Se({ fontSize: Number.isFinite(d) && d > 0 ? d : void 0 });
2370
+ function dt(n) {
2371
+ const i = n.target.value, d = Number(i);
2372
+ Ce({ fontSize: Number.isFinite(d) && d > 0 ? d : void 0 });
2294
2373
  }
2295
- function nt(o) {
2296
- const i = o.target.value;
2297
- Se({
2374
+ function rt(n) {
2375
+ const i = n.target.value;
2376
+ Ce({
2298
2377
  fontWeight: i || void 0
2299
2378
  });
2300
2379
  }
2301
- function ot(o) {
2302
- const i = o.target.value;
2303
- Se({
2380
+ function ut(n) {
2381
+ const i = n.target.value;
2382
+ Ce({
2304
2383
  align: i || void 0
2305
2384
  });
2306
2385
  }
2307
- function Ie(o) {
2308
- const i = o.trim().toLowerCase();
2386
+ function We(n) {
2387
+ const i = n.trim().toLowerCase();
2309
2388
  if (i === "") return "1fr";
2310
2389
  if (i === "auto") return "auto";
2311
2390
  if (/^\d+(\.\d+)?fr$/.test(i)) return i;
2312
2391
  const d = i.match(/^(\d+(?:\.\d+)?)\s*mm$/);
2313
2392
  if (d) {
2314
- const B = Number(d[1]);
2315
- return Number.isFinite(B) && B > 0 ? B : "INVALID";
2393
+ const R = Number(d[1]);
2394
+ return Number.isFinite(R) && R > 0 ? R : "INVALID";
2316
2395
  }
2317
- const C = Number(i);
2318
- return Number.isFinite(C) && C > 0 ? C : "INVALID";
2396
+ const y = Number(i);
2397
+ return Number.isFinite(y) && y > 0 ? y : "INVALID";
2319
2398
  }
2320
- function Ge(o, i) {
2321
- var C;
2322
- if (((C = n.value) == null ? void 0 : C.type) !== "grid") return;
2323
- const d = Ie(i.target.value);
2399
+ function st(n, i) {
2400
+ var y;
2401
+ if (((y = o.value) == null ? void 0 : y.type) !== "grid") return;
2402
+ const d = We(i.target.value);
2324
2403
  d !== "INVALID" && t(
2325
- Bl(u.value, n.value.id, o, d),
2326
- `col:${n.value.id}:${o}`
2404
+ Bl(r.value, o.value.id, n, d),
2405
+ `col:${o.value.id}:${n}`
2327
2406
  );
2328
2407
  }
2329
- function ze(o, i) {
2330
- var Q;
2331
- if (((Q = n.value) == null ? void 0 : Q.type) !== "grid") return;
2332
- const C = i.target.value, B = o === "cellPadding" ? { cellPadding: Je(C) } : { [o]: C === "" ? void 0 : C };
2333
- t(Ml(u.value, n.value.id, B), `gridcell:${o}`);
2334
- }
2335
- function it(o) {
2336
- var C;
2337
- if (((C = n.value) == null ? void 0 : C.type) !== "grid") return;
2338
- const i = o.target.value, d = Je(i);
2339
- t(Ll(u.value, n.value.id, d), "gridgap");
2340
- }
2341
- function dt(o) {
2342
- const i = o.target.value, d = Je(i);
2343
- S(
2344
- (C) => C.type === "grid-cell" ? { ...C, padding: d } : C,
2408
+ function vt(n, i) {
2409
+ var Y;
2410
+ if (((Y = o.value) == null ? void 0 : Y.type) !== "grid") return;
2411
+ const y = i.target.value, R = n === "cellPadding" ? { cellPadding: qe(y) } : { [n]: y === "" ? void 0 : y };
2412
+ t(Ml(r.value, o.value.id, R), `gridcell:${n}`);
2413
+ }
2414
+ function ct(n) {
2415
+ var y;
2416
+ if (((y = o.value) == null ? void 0 : y.type) !== "grid") return;
2417
+ const i = n.target.value, d = qe(i);
2418
+ t(Ll(r.value, o.value.id, d), "gridgap");
2419
+ }
2420
+ function pt(n) {
2421
+ const i = n.target.value, d = qe(i);
2422
+ C(
2423
+ (y) => y.type === "grid-cell" ? { ...y, padding: d } : y,
2345
2424
  a.value ? `cellpad:${a.value}` : void 0
2346
2425
  );
2347
2426
  }
2348
- function ut(o) {
2349
- const i = o.target.value;
2350
- S(
2427
+ function ft(n) {
2428
+ const i = n.target.value;
2429
+ C(
2351
2430
  (d) => d.type === "grid-cell" ? { ...d, align: i || void 0 } : d,
2352
2431
  a.value ? `cellalign:${a.value}` : void 0
2353
2432
  );
2354
2433
  }
2355
- function rt(o) {
2356
- const i = o.target.value;
2357
- S(
2434
+ function bt(n) {
2435
+ const i = n.target.value;
2436
+ C(
2358
2437
  (d) => d.type === "grid-cell" ? {
2359
2438
  ...d,
2360
2439
  verticalAlign: i || void 0
@@ -2362,269 +2441,272 @@ function md(e) {
2362
2441
  a.value ? `cellvalign:${a.value}` : void 0
2363
2442
  );
2364
2443
  }
2365
- function st(o) {
2366
- const i = o.target.checked;
2367
- S(
2444
+ function gt(n) {
2445
+ const i = n.target.checked;
2446
+ C(
2368
2447
  (d) => d.type === "grid-cell" ? { ...d, flex: i || void 0 } : d,
2369
2448
  a.value ? `cellflex:${a.value}` : void 0
2370
2449
  );
2371
2450
  }
2372
- function vt(o) {
2373
- const i = o.target.value, d = Number(i), C = Number.isFinite(d) && d > 0 ? Math.floor(d) : void 0;
2374
- S(
2375
- (B) => B.type === "grid-cell" ? { ...B, rowHeight: C } : B,
2451
+ function mt(n) {
2452
+ const i = n.target.value, d = Number(i), y = Number.isFinite(d) && d > 0 ? Math.floor(d) : void 0;
2453
+ C(
2454
+ (R) => R.type === "grid-cell" ? { ...R, rowHeight: y } : R,
2376
2455
  a.value ? `cellrowh:${a.value}` : void 0
2377
2456
  );
2378
2457
  }
2379
- function de(o) {
2380
- S(
2381
- (i) => i.type === "p" || i.type === "text" ? { ...i, style: { ...i.style, ...o } } : i,
2458
+ function ie(n) {
2459
+ C(
2460
+ (i) => i.type === "p" || i.type === "text" ? { ...i, style: { ...i.style, ...n } } : i,
2382
2461
  a.value ? `style:${a.value}` : void 0
2383
2462
  );
2384
2463
  }
2385
- function ct(o) {
2386
- const i = o.target.value, d = Number(i);
2387
- de({
2464
+ function ht(n) {
2465
+ const i = n.target.value, d = Number(i);
2466
+ ie({
2388
2467
  fontSize: Number.isFinite(d) && d > 0 ? Math.floor(d) : void 0
2389
2468
  });
2390
2469
  }
2391
- function pt(o) {
2392
- const i = Number(o.target.value);
2393
- de({
2470
+ function yt(n) {
2471
+ const i = Number(n.target.value);
2472
+ ie({
2394
2473
  lineHeight: Number.isFinite(i) && i > 0 ? i : void 0
2395
2474
  });
2396
2475
  }
2397
- function ft(o) {
2398
- const i = o.target.value;
2399
- de({
2476
+ function St(n) {
2477
+ const i = n.target.value;
2478
+ ie({
2400
2479
  fontWeight: i || void 0
2401
2480
  });
2402
2481
  }
2403
- function gt(o) {
2404
- const i = o.target.value;
2405
- de({ color: i || void 0 });
2482
+ function $t(n) {
2483
+ const i = n.target.value;
2484
+ ie({ color: i || void 0 });
2406
2485
  }
2407
- function mt(o) {
2408
- const i = o.target.value;
2409
- de({ fontFamily: i || void 0 });
2486
+ function Ct(n) {
2487
+ const i = n.target.value;
2488
+ ie({ fontFamily: i || void 0 });
2410
2489
  }
2411
- function bt(o) {
2412
- const i = o.target.value;
2413
- de({
2490
+ function wt(n) {
2491
+ const i = n.target.value;
2492
+ ie({
2414
2493
  align: i || void 0
2415
2494
  });
2416
2495
  }
2417
- function ht(o) {
2418
- const i = o.target.value;
2419
- de({
2496
+ function It(n) {
2497
+ const i = n.target.value;
2498
+ ie({
2420
2499
  verticalAlign: i || void 0
2421
2500
  });
2422
2501
  }
2423
- function yt(o) {
2424
- const i = o.target.value;
2425
- S(
2502
+ function xt(n) {
2503
+ const i = n.target.value;
2504
+ C(
2426
2505
  (d) => d.type === "html" ? { ...d, html: i } : d,
2427
2506
  a.value ? `html:${a.value}` : void 0
2428
2507
  );
2429
2508
  }
2430
- function St(o) {
2431
- const i = o.target.value;
2432
- S(
2509
+ function kt(n) {
2510
+ const i = n.target.value;
2511
+ C(
2433
2512
  (d) => d.type === "html" ? { ...d, css: i || void 0 } : d,
2434
2513
  a.value ? `css:${a.value}` : void 0
2435
2514
  );
2436
2515
  }
2437
- function $t(o) {
2438
- const i = o.target.value;
2439
- S(
2516
+ function Tt(n) {
2517
+ const i = n.target.value;
2518
+ C(
2440
2519
  (d) => d.type === "image" ? { ...d, src: i || void 0 } : d,
2441
2520
  a.value ? `imgsrc:${a.value}` : void 0
2442
2521
  );
2443
2522
  }
2444
- function Ct(o) {
2445
- const i = o.target.value;
2446
- S(
2523
+ function Ft(n) {
2524
+ const i = n.target.value;
2525
+ C(
2447
2526
  (d) => d.type === "image" ? { ...d, field: i || void 0 } : d,
2448
2527
  a.value ? `imgfield:${a.value}` : void 0
2449
2528
  );
2450
2529
  }
2451
- function wt(o, i) {
2530
+ function Dt(n, i) {
2452
2531
  const d = Number(i.target.value);
2453
- S(
2454
- (C) => C.type === "image" ? { ...C, [o]: Number.isFinite(d) && d > 0 ? d : void 0 } : C,
2532
+ C(
2533
+ (y) => y.type === "image" ? { ...y, [n]: Number.isFinite(d) && d > 0 ? d : void 0 } : y,
2455
2534
  a.value ? `imgsize:${a.value}` : void 0
2456
2535
  );
2457
2536
  }
2458
- function It(o) {
2459
- const i = o.target.value;
2460
- S(
2537
+ function Nt(n) {
2538
+ const i = n.target.value;
2539
+ C(
2461
2540
  (d) => d.type === "image" ? { ...d, objectFit: i } : d,
2462
2541
  a.value ? `imgfit:${a.value}` : void 0
2463
2542
  );
2464
2543
  }
2465
- function xt(o) {
2466
- const i = Number(o.target.value);
2467
- !Number.isFinite(i) || i < 1 || t(Rl(u.value, Math.floor(i)));
2544
+ function Pt(n) {
2545
+ const i = Number(n.target.value);
2546
+ !Number.isFinite(i) || i < 1 || t(Rl(r.value, Math.floor(i)));
2468
2547
  }
2469
- function Tt(o) {
2470
- const i = o.target.value;
2471
- t(Hl(u.value, { size: i }));
2548
+ function Et(n) {
2549
+ const i = n.target.value;
2550
+ t(Hl(r.value, { size: i }));
2472
2551
  }
2473
- const kt = P(
2552
+ const At = N(
2474
2553
  () => {
2475
- var o;
2476
- return ((o = u.value.pages[0]) == null ? void 0 : o.margin.top) ?? 12;
2554
+ var n;
2555
+ return ((n = r.value.pages[0]) == null ? void 0 : n.margin.top) ?? 12;
2477
2556
  }
2478
- ), Ft = P(
2557
+ ), Ht = N(
2479
2558
  () => {
2480
- var o;
2481
- return ((o = u.value.pages[0]) == null ? void 0 : o.margin.right) ?? 12;
2559
+ var n;
2560
+ return ((n = r.value.pages[0]) == null ? void 0 : n.margin.right) ?? 12;
2482
2561
  }
2483
- ), Dt = P(
2562
+ ), Rt = N(
2484
2563
  () => {
2485
- var o;
2486
- return ((o = u.value.pages[0]) == null ? void 0 : o.margin.bottom) ?? 12;
2564
+ var n;
2565
+ return ((n = r.value.pages[0]) == null ? void 0 : n.margin.bottom) ?? 12;
2487
2566
  }
2488
- ), Nt = P(
2567
+ ), Lt = N(
2489
2568
  () => {
2490
- var o;
2491
- return ((o = u.value.pages[0]) == null ? void 0 : o.margin.left) ?? 12;
2569
+ var n;
2570
+ return ((n = r.value.pages[0]) == null ? void 0 : n.margin.left) ?? 12;
2492
2571
  }
2493
2572
  );
2494
- function Pt(o, i) {
2573
+ function Mt(n, i) {
2495
2574
  const d = Number(i.target.value);
2496
2575
  if (!Number.isFinite(d)) return;
2497
- const C = Math.max(0, Math.floor(d));
2576
+ const y = Math.max(0, Math.floor(d));
2498
2577
  t({
2499
- ...u.value,
2500
- pages: u.value.pages.map((B) => ({
2501
- ...B,
2502
- margin: { ...B.margin, [o]: C }
2578
+ ...r.value,
2579
+ pages: r.value.pages.map((R) => ({
2580
+ ...R,
2581
+ margin: { ...R.margin, [n]: y }
2503
2582
  }))
2504
2583
  });
2505
2584
  }
2506
- function Oe(o) {
2585
+ function Ue(n) {
2507
2586
  function i() {
2508
- const R = u.value.paper;
2509
- return o === "header" ? R == null ? void 0 : R.header : R == null ? void 0 : R.footer;
2587
+ const L = r.value.paper;
2588
+ return n === "header" ? L == null ? void 0 : L.header : L == null ? void 0 : L.footer;
2510
2589
  }
2511
- function d(R) {
2512
- const W = u.value.paper;
2590
+ function d(L) {
2591
+ const W = r.value.paper;
2513
2592
  t({
2514
- ...u.value,
2515
- paper: o === "header" ? { ...W, header: R } : { ...W, footer: R }
2593
+ ...r.value,
2594
+ paper: n === "header" ? { ...W, header: L } : { ...W, footer: L }
2516
2595
  });
2517
2596
  }
2518
- function C(R) {
2519
- d({ ...i() ?? {}, ...R });
2597
+ function y(L) {
2598
+ d({ ...i() ?? {}, ...L });
2520
2599
  }
2521
- function B(R, W) {
2522
- var Te;
2523
- const fe = W.target.value, xe = ((Te = i()) == null ? void 0 : Te.content) ?? {};
2524
- C({ content: { ...xe, [R]: fe || void 0 } });
2600
+ function R(L, W) {
2601
+ var Fe;
2602
+ const ye = W.target.value, Te = ((Fe = i()) == null ? void 0 : Fe.content) ?? {};
2603
+ y({ content: { ...Te, [L]: ye || void 0 } });
2525
2604
  }
2526
- function Q(R) {
2527
- C({ enabled: R.target.checked });
2605
+ function Y(L) {
2606
+ y({ enabled: L.target.checked });
2528
2607
  }
2529
- function ne(R) {
2530
- const W = Number(R.target.value);
2531
- C({ height: Number.isFinite(W) && W > 0 ? W : void 0 });
2608
+ function te(L) {
2609
+ const W = Number(L.target.value);
2610
+ y({ height: Number.isFinite(W) && W > 0 ? W : void 0 });
2532
2611
  }
2533
- function pe(R) {
2534
- C({ separator: R.target.checked });
2612
+ function ue(L) {
2613
+ y({ separator: L.target.checked });
2535
2614
  }
2536
- function se(R) {
2537
- var fe;
2538
- const W = ((fe = i()) == null ? void 0 : fe.style) ?? {};
2539
- C({ style: { ...W, ...R } });
2615
+ function se(L) {
2616
+ var ye;
2617
+ const W = ((ye = i()) == null ? void 0 : ye.style) ?? {};
2618
+ y({ style: { ...W, ...L } });
2540
2619
  }
2541
- function We(R) {
2542
- const W = Number(R.target.value);
2620
+ function je(L) {
2621
+ const W = Number(L.target.value);
2543
2622
  se({ fontSize: Number.isFinite(W) && W > 0 ? W : void 0 });
2544
2623
  }
2545
- function Ue(R) {
2546
- const W = R.target.value;
2624
+ function ke(L) {
2625
+ const W = L.target.value;
2547
2626
  se({ fontWeight: W === "bold" || W === "normal" ? W : void 0 });
2548
2627
  }
2549
- function je(R) {
2550
- const W = R.target.value;
2628
+ function Je(L) {
2629
+ const W = L.target.value;
2551
2630
  se({ color: W || void 0 });
2552
2631
  }
2553
- return { patch: C, content: B, enabled: Q, height: ne, separator: pe, style: se, fontSize: We, fontWeight: Ue, color: je };
2632
+ return { patch: y, content: R, enabled: Y, height: te, separator: ue, style: se, fontSize: je, fontWeight: ke, color: Je };
2554
2633
  }
2555
- const ue = Oe("header"), re = Oe("footer");
2634
+ const de = Ue("header"), re = Ue("footer");
2556
2635
  return {
2557
- addRootGrid: L,
2636
+ addRootGrid: M,
2558
2637
  addGrid: A,
2559
2638
  addNodeToSelectedCell: H,
2560
2639
  removeSelectedNode: U,
2561
- copySelected: k,
2562
- cutSelected: Y,
2563
- pasteClipboard: J,
2564
- duplicateSelected: Z,
2640
+ copySelected: T,
2641
+ cutSelected: J,
2642
+ pasteClipboard: K,
2643
+ duplicateSelected: _,
2565
2644
  mergeSelectedCellRight: w,
2566
- splitSelectedCell: y,
2645
+ splitSelectedCell: S,
2567
2646
  onCanvasNodeDragStart: c,
2568
2647
  onDropNode: h,
2569
2648
  onDropPalette: m,
2570
- updateSelectedNode: S,
2649
+ updateSelectedNode: C,
2571
2650
  updateSelectedText: F,
2572
- updateSelectedField: E,
2573
- updateSelectedPrefix: N,
2651
+ updateSelectedField: P,
2652
+ updateSelectedPrefix: D,
2574
2653
  updateSelectedSuffix: z,
2575
2654
  updateSelectedWidth: O,
2576
- updateSelectedDefault: ce,
2577
- updateSelectedInnerBorder: Ee,
2578
- updateSelectedAction: ae,
2579
- updateSelectedDateFormat: Ae,
2580
- updateGridBorder: He,
2581
- updateTableBorder: Ce,
2582
- updateGridDimensions: at,
2583
- updateTableRows: Re,
2584
- addTableColumn: Le,
2585
- removeTableColumn: we,
2586
- renameTableColumnKey: Me,
2587
- updateTableColumn: Be,
2588
- updateTableHeaderFontSize: Ve,
2589
- updateTableHeaderFontWeight: nt,
2590
- updateTableHeaderAlign: ot,
2591
- updateGridColumnWidth: Ge,
2592
- updateGridCellDefault: ze,
2593
- updateGridGap: it,
2594
- updateSelectedCellPadding: dt,
2595
- updateSelectedCellAlign: ut,
2596
- updateSelectedCellVerticalAlign: rt,
2597
- updateSelectedCellFlex: st,
2598
- updateSelectedCellRowHeight: vt,
2599
- updateSelectedTextStyle: de,
2600
- updateSelectedFontSize: ct,
2601
- updateSelectedLineHeight: pt,
2602
- updateSelectedFontWeight: ft,
2603
- updateSelectedColor: gt,
2604
- updateSelectedFontFamily: mt,
2605
- updateSelectedAlign: bt,
2606
- updateSelectedVerticalAlign: ht,
2607
- updateSelectedHtml: yt,
2608
- updateSelectedCss: St,
2609
- updateSelectedImageSrc: $t,
2610
- updateSelectedImageField: Ct,
2611
- updateSelectedImageSize: wt,
2612
- updateSelectedImageFit: It,
2613
- updateBaseRowHeight: xt,
2614
- updatePaperSize: Tt,
2615
- paperMarginTop: kt,
2616
- paperMarginRight: Ft,
2617
- paperMarginBottom: Dt,
2618
- paperMarginLeft: Nt,
2619
- updatePaperMarginSide: Pt,
2620
- updatePaperHeader: ue.patch,
2621
- updatePaperHeaderContent: ue.content,
2622
- updatePaperHeaderEnabled: ue.enabled,
2623
- updatePaperHeaderHeight: ue.height,
2624
- updatePaperHeaderSeparator: ue.separator,
2625
- updatePaperHeaderFontSize: ue.fontSize,
2626
- updatePaperHeaderFontWeight: ue.fontWeight,
2627
- updatePaperHeaderColor: ue.color,
2655
+ updateSelectedDefault: fe,
2656
+ updateSelectedInnerBorder: He,
2657
+ updateSelectedInteractive: ne,
2658
+ addSelectedParam: nt,
2659
+ renameSelectedParam: Re,
2660
+ updateSelectedParamValue: Le,
2661
+ removeSelectedParam: xe,
2662
+ updateGridBorder: Me,
2663
+ updateTableBorder: Be,
2664
+ updateGridDimensions: Ve,
2665
+ updateTableRows: Ge,
2666
+ addTableColumn: ot,
2667
+ removeTableColumn: it,
2668
+ renameTableColumnKey: ze,
2669
+ updateTableColumn: Oe,
2670
+ updateTableHeaderFontSize: dt,
2671
+ updateTableHeaderFontWeight: rt,
2672
+ updateTableHeaderAlign: ut,
2673
+ updateGridColumnWidth: st,
2674
+ updateGridCellDefault: vt,
2675
+ updateGridGap: ct,
2676
+ updateSelectedCellPadding: pt,
2677
+ updateSelectedCellAlign: ft,
2678
+ updateSelectedCellVerticalAlign: bt,
2679
+ updateSelectedCellFlex: gt,
2680
+ updateSelectedCellRowHeight: mt,
2681
+ updateSelectedTextStyle: ie,
2682
+ updateSelectedFontSize: ht,
2683
+ updateSelectedLineHeight: yt,
2684
+ updateSelectedFontWeight: St,
2685
+ updateSelectedColor: $t,
2686
+ updateSelectedFontFamily: Ct,
2687
+ updateSelectedAlign: wt,
2688
+ updateSelectedVerticalAlign: It,
2689
+ updateSelectedHtml: xt,
2690
+ updateSelectedCss: kt,
2691
+ updateSelectedImageSrc: Tt,
2692
+ updateSelectedImageField: Ft,
2693
+ updateSelectedImageSize: Dt,
2694
+ updateSelectedImageFit: Nt,
2695
+ updateBaseRowHeight: Pt,
2696
+ updatePaperSize: Et,
2697
+ paperMarginTop: At,
2698
+ paperMarginRight: Ht,
2699
+ paperMarginBottom: Rt,
2700
+ paperMarginLeft: Lt,
2701
+ updatePaperMarginSide: Mt,
2702
+ updatePaperHeader: de.patch,
2703
+ updatePaperHeaderContent: de.content,
2704
+ updatePaperHeaderEnabled: de.enabled,
2705
+ updatePaperHeaderHeight: de.height,
2706
+ updatePaperHeaderSeparator: de.separator,
2707
+ updatePaperHeaderFontSize: de.fontSize,
2708
+ updatePaperHeaderFontWeight: de.fontWeight,
2709
+ updatePaperHeaderColor: de.color,
2628
2710
  updatePaperFooter: re.patch,
2629
2711
  updatePaperFooterContent: re.content,
2630
2712
  updatePaperFooterEnabled: re.enabled,
@@ -2635,19 +2717,19 @@ function md(e) {
2635
2717
  updatePaperFooterColor: re.color
2636
2718
  };
2637
2719
  }
2638
- const qt = "ticket-designer-fill-data-v2", bd = "[ticket-designer] 表单数据 JSON";
2639
- function hd(e) {
2640
- const u = xl({
2720
+ const _t = "ticket-designer-fill-data-v2", yd = "[ticket-designer] 表单数据 JSON";
2721
+ function Sd(e) {
2722
+ const r = xl({
2641
2723
  value: null
2642
- }), t = P(() => u.value), a = G(null);
2643
- function n(v) {
2724
+ }), t = N(() => r.value), a = G(null);
2725
+ function o(v) {
2644
2726
  var A;
2645
2727
  const p = v.target, g = (A = p.files) == null ? void 0 : A[0];
2646
2728
  if (!g) return;
2647
- const L = new FileReader();
2648
- L.onload = () => {
2729
+ const M = new FileReader();
2730
+ M.onload = () => {
2649
2731
  try {
2650
- const H = JSON.parse(String(L.result));
2732
+ const H = JSON.parse(String(M.result));
2651
2733
  e.enterPreview(H);
2652
2734
  } catch (H) {
2653
2735
  alert(
@@ -2656,20 +2738,20 @@ function hd(e) {
2656
2738
  } finally {
2657
2739
  p.value = "";
2658
2740
  }
2659
- }, L.onerror = () => {
2741
+ }, M.onerror = () => {
2660
2742
  alert("数据文件读取失败"), p.value = "";
2661
- }, L.readAsText(g);
2743
+ }, M.readAsText(g);
2662
2744
  }
2663
- function r() {
2745
+ function u() {
2664
2746
  var v;
2665
2747
  (v = a.value) == null || v.click();
2666
2748
  }
2667
- function b() {
2749
+ function f() {
2668
2750
  try {
2669
- const v = et(e.canvasEl.value, {
2751
+ const v = tt(e.canvasEl.value, {
2670
2752
  maskHidden: !0
2671
- }), p = jt(v);
2672
- console.log(bd, p), al(ll(va), p);
2753
+ }), p = Yt(v);
2754
+ console.log(yd, p), rl(dl(va), p);
2673
2755
  } catch (v) {
2674
2756
  alert(
2675
2757
  `导出数据失败:${v instanceof Error ? v.message : String(v)}`
@@ -2679,11 +2761,11 @@ function hd(e) {
2679
2761
  function s() {
2680
2762
  try {
2681
2763
  localStorage.setItem(
2682
- qt,
2764
+ _t,
2683
2765
  // 本机「保存数据」:脱敏字段(HIDDEN)从 previewFormData 回源真实值,保存→读取不丢数据
2684
- jt(
2685
- et(e.canvasEl.value, {
2686
- baseData: u.value
2766
+ Yt(
2767
+ tt(e.canvasEl.value, {
2768
+ baseData: r.value
2687
2769
  })
2688
2770
  )
2689
2771
  );
@@ -2693,8 +2775,8 @@ function hd(e) {
2693
2775
  );
2694
2776
  }
2695
2777
  }
2696
- function f() {
2697
- const v = localStorage.getItem(qt);
2778
+ function b() {
2779
+ const v = localStorage.getItem(_t);
2698
2780
  if (!v) {
2699
2781
  alert("本地没有已保存的填写数据");
2700
2782
  return;
@@ -2708,347 +2790,346 @@ function hd(e) {
2708
2790
  }
2709
2791
  }
2710
2792
  return {
2711
- previewFormData: u,
2793
+ previewFormData: r,
2712
2794
  previewData: t,
2713
2795
  fillDataFileInput: a,
2714
- importFillDataFile: n,
2715
- triggerImportFillData: r,
2716
- exportFillDataFile: b,
2796
+ importFillDataFile: o,
2797
+ triggerImportFillData: u,
2798
+ exportFillDataFile: f,
2717
2799
  saveFillDataToLocal: s,
2718
- loadFillDataFromLocal: f
2800
+ loadFillDataFromLocal: b
2719
2801
  };
2720
2802
  }
2721
- const yd = { class: "v2-designer" }, Sd = { class: "v2-designer__body" }, Xt = "ticket-designer-help-seen-v1", $d = /* @__PURE__ */ X({
2803
+ const $d = { class: "v2-designer" }, Cd = { class: "v2-designer__body" }, el = "ticket-designer-help-seen-v1", wd = /* @__PURE__ */ X({
2722
2804
  __name: "FormDesigner",
2723
2805
  props: {
2724
2806
  initialSchema: {},
2725
2807
  samples: {},
2726
2808
  uiConfig: {}
2727
2809
  },
2728
- setup(e, { expose: u }) {
2810
+ setup(e, { expose: r }) {
2729
2811
  const t = e;
2730
- ve(
2812
+ ce(
2731
2813
  () => {
2732
- var T;
2733
- return (T = t.uiConfig) == null ? void 0 : T.locale;
2814
+ var k;
2815
+ return (k = t.uiConfig) == null ? void 0 : k.locale;
2734
2816
  },
2735
- (T) => ta(T ?? ia),
2817
+ (k) => ta(k ?? ia),
2736
2818
  { immediate: !0 }
2737
2819
  );
2738
- const a = G("design"), n = P(() => a.value !== "design"), r = P(() => !n.value), b = G(!0);
2820
+ const a = G("design"), o = N(() => a.value !== "design"), u = N(() => !o.value), f = G(!0);
2739
2821
  function s() {
2740
2822
  try {
2741
- return localStorage.getItem(Xt) !== null;
2823
+ return localStorage.getItem(el) !== null;
2742
2824
  } catch {
2743
2825
  return !1;
2744
2826
  }
2745
2827
  }
2746
- function f() {
2828
+ function b() {
2747
2829
  v.value = !1;
2748
2830
  try {
2749
- localStorage.setItem(Xt, "1");
2831
+ localStorage.setItem(el, "1");
2750
2832
  } catch {
2751
2833
  }
2752
2834
  }
2753
2835
  const v = G(!s()), p = G(null);
2754
2836
  let g = () => {
2755
2837
  };
2756
- const L = gd(t.initialSchema, {
2838
+ const M = md(t.initialSchema, {
2757
2839
  onReset: () => g()
2758
2840
  }), {
2759
2841
  schema: A,
2760
2842
  dirty: H,
2761
2843
  canUndo: U,
2762
- canRedo: q,
2844
+ canRedo: Z,
2763
2845
  fileInput: j,
2764
- commit: te,
2846
+ commit: le,
2765
2847
  resetHistory: ee,
2766
- saveToLocal: k,
2767
- loadFromLocal: Y,
2768
- exportFile: J,
2769
- importFile: Z,
2848
+ saveToLocal: T,
2849
+ loadFromLocal: J,
2850
+ exportFile: K,
2851
+ importFile: _,
2770
2852
  triggerImport: w
2771
- } = L, y = cn(A, { editable: () => r.value }), {
2853
+ } = M, S = cn(A, { editable: () => u.value }), {
2772
2854
  selectedNodeId: c,
2773
2855
  selectedNode: h,
2774
2856
  selectedNodeType: m,
2775
- selectedCellContext: S,
2857
+ selectedCellContext: C,
2776
2858
  selectedCellBox: F,
2777
- nodeTree: E,
2778
- clearSelection: N,
2859
+ nodeTree: P,
2860
+ clearSelection: D,
2779
2861
  selectNode: z,
2780
2862
  selectNodeById: O,
2781
- selectIssue: ce
2782
- } = y;
2783
- g = N;
2784
- const Ee = P(
2863
+ selectIssue: fe
2864
+ } = S;
2865
+ g = D;
2866
+ const He = N(
2785
2867
  () => {
2786
- var T, V;
2787
- return r.value && c.value !== null && ((T = h.value) == null ? void 0 : T.type) !== "page" && ((V = h.value) == null ? void 0 : V.type) !== "grid-cell";
2868
+ var k, V;
2869
+ return u.value && c.value !== null && ((k = h.value) == null ? void 0 : k.type) !== "page" && ((V = h.value) == null ? void 0 : V.type) !== "grid-cell";
2788
2870
  }
2789
- ), ae = {
2871
+ ), ne = {
2790
2872
  token: G(0),
2791
2873
  target: G(!0),
2792
2874
  focusId: G(null),
2793
2875
  focusToken: G(0)
2794
2876
  };
2795
- Tl(nl, ae);
2796
- function Ae() {
2797
- ae.target.value = !1, ae.focusId.value = null, ae.token.value++;
2877
+ kl(ul, ne);
2878
+ function me() {
2879
+ ne.target.value = !1, ne.focusId.value = null, ne.token.value++;
2798
2880
  }
2799
- function He() {
2800
- ae.target.value = !0, ae.focusId.value = null, ae.token.value++;
2881
+ function he() {
2882
+ ne.target.value = !0, ne.focusId.value = null, ne.token.value++;
2801
2883
  }
2802
- ve(
2884
+ ce(
2803
2885
  c,
2804
- (T) => {
2805
- ae.focusId.value = T, T && ae.focusToken.value++;
2886
+ (k) => {
2887
+ ne.focusId.value = k, k && ne.focusToken.value++;
2806
2888
  },
2807
2889
  { flush: "sync" }
2808
2890
  );
2809
- const Ce = md({
2810
- document: L,
2811
- selection: y,
2812
- editable: () => r.value,
2813
- clearSelection: N
2891
+ const Ie = hd({
2892
+ document: M,
2893
+ selection: S,
2894
+ editable: () => u.value,
2895
+ clearSelection: D
2814
2896
  }), {
2815
- addRootGrid: at,
2897
+ addRootGrid: nt,
2816
2898
  addGrid: Re,
2817
2899
  addNodeToSelectedCell: Le,
2818
- removeSelectedNode: we,
2900
+ removeSelectedNode: xe,
2819
2901
  copySelected: Me,
2820
2902
  cutSelected: Be,
2821
- pasteClipboard: Se,
2822
- duplicateSelected: Ve,
2823
- mergeSelectedCellRight: nt,
2824
- splitSelectedCell: ot,
2825
- onCanvasNodeDragStart: Ie,
2826
- onDropNode: Ge,
2827
- onDropPalette: ze,
2828
- updateSelectedText: it,
2829
- updateSelectedField: dt,
2903
+ pasteClipboard: Ve,
2904
+ duplicateSelected: Ge,
2905
+ mergeSelectedCellRight: ot,
2906
+ splitSelectedCell: it,
2907
+ onCanvasNodeDragStart: ze,
2908
+ onDropNode: Oe,
2909
+ onDropPalette: Ce,
2910
+ updateSelectedText: dt,
2911
+ updateSelectedField: rt,
2830
2912
  updateSelectedPrefix: ut,
2831
- updateSelectedSuffix: rt,
2913
+ updateSelectedSuffix: We,
2832
2914
  updateSelectedWidth: st,
2833
2915
  updateSelectedDefault: vt,
2834
- updateSelectedInnerBorder: de,
2835
- updateSelectedAction: ct,
2916
+ updateSelectedInnerBorder: ct,
2836
2917
  updateGridBorder: pt,
2837
2918
  updateTableBorder: ft,
2838
- updateGridDimensions: gt,
2839
- updateTableRows: mt,
2840
- addTableColumn: bt,
2841
- removeTableColumn: ht,
2842
- renameTableColumnKey: yt,
2843
- updateTableColumn: St,
2844
- updateGridColumnWidth: $t,
2845
- updateGridCellDefault: Ct,
2846
- updateGridGap: wt,
2847
- updateSelectedCellPadding: It,
2848
- updateSelectedCellAlign: xt,
2849
- updateSelectedCellVerticalAlign: Tt,
2919
+ updateGridDimensions: bt,
2920
+ updateTableRows: gt,
2921
+ addTableColumn: mt,
2922
+ removeTableColumn: ie,
2923
+ renameTableColumnKey: ht,
2924
+ updateTableColumn: yt,
2925
+ updateGridColumnWidth: St,
2926
+ updateGridCellDefault: $t,
2927
+ updateGridGap: Ct,
2928
+ updateSelectedCellPadding: wt,
2929
+ updateSelectedCellAlign: It,
2930
+ updateSelectedCellVerticalAlign: xt,
2850
2931
  updateSelectedCellRowHeight: kt,
2851
- updateSelectedFontSize: Ft,
2852
- updateSelectedLineHeight: Dt,
2853
- updateSelectedFontWeight: Nt,
2854
- updateSelectedColor: Pt,
2855
- updateSelectedFontFamily: Oe,
2856
- updateSelectedAlign: ue,
2857
- updateSelectedVerticalAlign: re,
2858
- updateSelectedHtml: o,
2859
- updateSelectedCss: i,
2860
- updateSelectedImageSrc: d,
2861
- updateSelectedImageField: C,
2862
- updateSelectedImageSize: B,
2863
- updateSelectedImageFit: Q,
2864
- updateBaseRowHeight: ne,
2865
- updatePaperSize: pe,
2866
- paperMarginTop: se,
2867
- paperMarginRight: We,
2868
- paperMarginBottom: Ue,
2869
- paperMarginLeft: je,
2870
- updatePaperMarginSide: R
2871
- } = Ce, W = hd({
2932
+ updateSelectedFontSize: Tt,
2933
+ updateSelectedLineHeight: Ft,
2934
+ updateSelectedFontWeight: Dt,
2935
+ updateSelectedColor: Nt,
2936
+ updateSelectedFontFamily: Pt,
2937
+ updateSelectedAlign: Et,
2938
+ updateSelectedVerticalAlign: At,
2939
+ updateSelectedHtml: Ht,
2940
+ updateSelectedCss: Rt,
2941
+ updateSelectedImageSrc: Lt,
2942
+ updateSelectedImageField: Mt,
2943
+ updateSelectedImageSize: Ue,
2944
+ updateSelectedImageFit: de,
2945
+ updateBaseRowHeight: re,
2946
+ updatePaperSize: n,
2947
+ paperMarginTop: i,
2948
+ paperMarginRight: d,
2949
+ paperMarginBottom: y,
2950
+ paperMarginLeft: R,
2951
+ updatePaperMarginSide: Y
2952
+ } = Ie, te = Sd({
2872
2953
  canvasEl: p,
2873
- enterPreview: (T) => Ht(T)
2954
+ enterPreview: (k) => Te(k)
2874
2955
  }), {
2875
- previewFormData: fe,
2876
- previewData: xe,
2877
- fillDataFileInput: Te,
2878
- importFillDataFile: Et,
2879
- triggerImportFillData: ul,
2880
- exportFillDataFile: At,
2881
- saveFillDataToLocal: rl,
2882
- loadFillDataFromLocal: sl
2883
- } = W;
2884
- function Ht(T) {
2885
- fe.value = T, a.value = "preview", N();
2886
- }
2887
- function vl(T) {
2888
- if (a.value === T) {
2889
- a.value = "design", fe.value = null;
2956
+ previewFormData: ue,
2957
+ previewData: se,
2958
+ fillDataFileInput: je,
2959
+ importFillDataFile: ke,
2960
+ triggerImportFillData: Je,
2961
+ exportFillDataFile: L,
2962
+ saveFillDataToLocal: W,
2963
+ loadFillDataFromLocal: ye
2964
+ } = te;
2965
+ function Te(k) {
2966
+ ue.value = k, a.value = "preview", D();
2967
+ }
2968
+ function Fe(k) {
2969
+ if (a.value === k) {
2970
+ a.value = "design", ue.value = null;
2890
2971
  return;
2891
2972
  }
2892
- Ht({});
2973
+ Te({});
2893
2974
  }
2894
- function Rt() {
2895
- L.undo(), N();
2975
+ function Bt() {
2976
+ M.undo(), D();
2896
2977
  }
2897
- function Lt() {
2898
- L.redo(), N();
2978
+ function Vt() {
2979
+ M.redo(), D();
2899
2980
  }
2900
- function Mt() {
2981
+ function Gt() {
2901
2982
  oa({ root: p.value });
2902
2983
  }
2903
- function cl(T) {
2904
- ee(T.loadSchema()), N();
2984
+ function pl(k) {
2985
+ ee(k.loadSchema()), D();
2905
2986
  }
2906
- function Bt() {
2907
- ee(dl()), N();
2987
+ function zt() {
2988
+ ee(cl()), D();
2908
2989
  }
2909
- function pl(T, V) {
2910
- var M;
2911
- r.value && ((M = V.dataTransfer) == null || M.setData(Ze, T), V.dataTransfer && (V.dataTransfer.effectAllowed = "copy"));
2990
+ function fl(k, V) {
2991
+ var B;
2992
+ u.value && ((B = V.dataTransfer) == null || B.setData(Qe, k), V.dataTransfer && (V.dataTransfer.effectAllowed = "copy"));
2912
2993
  }
2913
- const Vt = P(() => la(A.value)), fl = P(() => Vt.value.length), Gt = P(
2914
- () => aa(A.value, { data: xe.value })
2994
+ const Ot = N(() => la(A.value)), bl = N(() => Ot.value.length), Wt = N(
2995
+ () => aa(A.value, { data: se.value })
2915
2996
  );
2916
- function gl(T) {
2917
- const V = T.target;
2997
+ function gl(k) {
2998
+ const V = k.target;
2918
2999
  if (!V) return !1;
2919
- const M = V.tagName;
2920
- return M === "INPUT" || M === "TEXTAREA" || M === "SELECT" || V.isContentEditable;
3000
+ const B = V.tagName;
3001
+ return B === "INPUT" || B === "TEXTAREA" || B === "SELECT" || V.isContentEditable;
2921
3002
  }
2922
- function zt(T) {
2923
- if (gl(T)) return;
2924
- const V = T.ctrlKey || T.metaKey, M = T.key.toLowerCase();
3003
+ function Ut(k) {
3004
+ if (gl(k)) return;
3005
+ const V = k.ctrlKey || k.metaKey, B = k.key.toLowerCase();
2925
3006
  if (V) {
2926
- M === "z" && !T.shiftKey ? (T.preventDefault(), Rt()) : M === "z" && T.shiftKey || M === "y" ? (T.preventDefault(), Lt()) : M === "s" ? (T.preventDefault(), k()) : M === "c" ? (T.preventDefault(), Me()) : M === "x" ? (T.preventDefault(), Be()) : M === "v" ? (T.preventDefault(), Se()) : M === "d" && (T.preventDefault(), Ve());
3007
+ B === "z" && !k.shiftKey ? (k.preventDefault(), Bt()) : B === "z" && k.shiftKey || B === "y" ? (k.preventDefault(), Vt()) : B === "s" ? (k.preventDefault(), T()) : B === "c" ? (k.preventDefault(), Me()) : B === "x" ? (k.preventDefault(), Be()) : B === "v" ? (k.preventDefault(), Ve()) : B === "d" && (k.preventDefault(), Ge());
2927
3008
  return;
2928
3009
  }
2929
- (M === "delete" || M === "backspace") && r.value && (T.preventDefault(), we());
3010
+ (B === "delete" || B === "backspace") && u.value && (k.preventDefault(), xe());
2930
3011
  }
2931
- function Ot(T) {
2932
- H.value && (T.preventDefault(), T.returnValue = "");
3012
+ function jt(k) {
3013
+ H.value && (k.preventDefault(), k.returnValue = "");
2933
3014
  }
2934
- Zt(() => {
2935
- A.value.pages.length > 0 && O(A.value.pages[0].id), window.addEventListener("keydown", zt), window.addEventListener("beforeunload", Ot);
2936
- }), tt(() => {
2937
- window.removeEventListener("keydown", zt), window.removeEventListener("beforeunload", Ot);
3015
+ tl(() => {
3016
+ A.value.pages.length > 0 && O(A.value.pages[0].id), window.addEventListener("keydown", Ut), window.addEventListener("beforeunload", jt);
3017
+ }), lt(() => {
3018
+ window.removeEventListener("keydown", Ut), window.removeEventListener("beforeunload", jt);
2938
3019
  });
2939
3020
  function ml() {
2940
3021
  return JSON.parse(JSON.stringify(A.value));
2941
3022
  }
2942
- function bl(T) {
2943
- return et(p.value, {
3023
+ function hl(k) {
3024
+ return tt(p.value, {
2944
3025
  maskHidden: !0,
2945
- ...T
3026
+ ...k
2946
3027
  });
2947
3028
  }
2948
- function hl(T) {
2949
- ee(pa(T)), N();
3029
+ function yl(k) {
3030
+ ee(pa(k)), D();
2950
3031
  }
2951
- function yl() {
2952
- J();
3032
+ function Sl() {
3033
+ K();
2953
3034
  }
2954
- return u({
3035
+ return r({
2955
3036
  getSchema: ml,
2956
- getFormData: bl,
2957
- setSchema: hl,
2958
- exportSchemaFile: yl,
3037
+ getFormData: hl,
3038
+ setSchema: yl,
3039
+ exportSchemaFile: Sl,
2959
3040
  // 「导出数据」与工具栏同一实现(`useFillData.exportFillDataFile`,含 console 打印)
2960
- exportFillDataFile: At,
2961
- print: Mt,
2962
- resetBlank: Bt
2963
- }), (T, V) => ($(), I("div", yd, [
2964
- le(za, {
3041
+ exportFillDataFile: L,
3042
+ print: Gt,
3043
+ resetBlank: zt
3044
+ }), (k, V) => ($(), I("div", $d, [
3045
+ ae(za, {
2965
3046
  samples: e.samples,
2966
3047
  dirty: x(H),
2967
3048
  "can-undo": x(U),
2968
- "can-redo": x(q),
2969
- "preview-mode": n.value,
3049
+ "can-redo": x(Z),
3050
+ "preview-mode": o.value,
2970
3051
  "ui-config": e.uiConfig,
2971
- onResetBlank: Bt,
2972
- onLoadSample: cl,
2973
- onUndo: Rt,
2974
- onRedo: Lt,
2975
- onSaveTemplate: x(k),
2976
- onLoadTemplate: x(Y),
2977
- onExportTemplate: x(J),
3052
+ onResetBlank: zt,
3053
+ onLoadSample: pl,
3054
+ onUndo: Bt,
3055
+ onRedo: Vt,
3056
+ onSaveTemplate: x(T),
3057
+ onLoadTemplate: x(J),
3058
+ onExportTemplate: x(K),
2978
3059
  onImportTemplate: x(w),
2979
- onImportFillData: x(ul),
2980
- onExportFillData: x(At),
2981
- onLoadFillData: x(sl),
2982
- onSaveFillData: x(rl),
2983
- onTogglePreview: V[0] || (V[0] = (M) => vl("preview")),
2984
- onPrint: Mt,
2985
- onHelp: V[1] || (V[1] = (M) => v.value = !0)
3060
+ onImportFillData: x(Je),
3061
+ onExportFillData: x(L),
3062
+ onLoadFillData: x(ye),
3063
+ onSaveFillData: x(W),
3064
+ onTogglePreview: V[0] || (V[0] = (B) => Fe("preview")),
3065
+ onPrint: Gt,
3066
+ onHelp: V[1] || (V[1] = (B) => v.value = !0)
2986
3067
  }, null, 8, ["samples", "dirty", "can-undo", "can-redo", "preview-mode", "ui-config", "onSaveTemplate", "onLoadTemplate", "onExportTemplate", "onImportTemplate", "onImportFillData", "onExportFillData", "onLoadFillData", "onSaveFillData"]),
2987
- l("div", Sd, [
2988
- le(un, {
2989
- editable: r.value,
2990
- "can-remove": Ee.value,
2991
- "node-tree": x(E),
3068
+ l("div", Cd, [
3069
+ ae(rn, {
3070
+ editable: u.value,
3071
+ "can-remove": He.value,
3072
+ "node-tree": x(P),
2992
3073
  "selected-node-id": x(c),
2993
3074
  onAddNode: x(Le),
2994
3075
  onAddGrid: x(Re),
2995
- onPaletteDrag: pl,
3076
+ onPaletteDrag: fl,
2996
3077
  onSelect: x(O),
2997
- onRemoveSelected: x(we),
2998
- onCollapseAll: Ae,
2999
- onExpandAll: He
3078
+ onRemoveSelected: x(xe),
3079
+ onCollapseAll: me,
3080
+ onExpandAll: he
3000
3081
  }, null, 8, ["editable", "can-remove", "node-tree", "selected-node-id", "onAddNode", "onAddGrid", "onSelect", "onRemoveSelected"]),
3001
3082
  l("main", {
3002
3083
  ref_key: "canvasEl",
3003
3084
  ref: p,
3004
- class: me(["v2-canvas", { "v2-canvas--preview": n.value }]),
3085
+ class: pe(["v2-canvas", { "v2-canvas--preview": o.value }]),
3005
3086
  onClick: V[2] || (V[2] = //@ts-ignore
3006
- (...M) => x(z) && x(z)(...M))
3087
+ (...B) => x(z) && x(z)(...B))
3007
3088
  }, [
3008
- le(na, { "fit-on-mount": !1 }, {
3009
- default: kl(() => [
3010
- le(ua, {
3089
+ ae(na, { "fit-on-mount": !1 }, {
3090
+ default: Tl(() => [
3091
+ ae(ra, {
3011
3092
  schema: x(A),
3012
- mode: n.value ? "preview" : "design",
3013
- "selected-node-id": n.value ? null : x(c),
3014
- data: x(xe),
3093
+ mode: o.value ? "preview" : "design",
3094
+ "selected-node-id": o.value ? null : x(c),
3095
+ data: x(se),
3015
3096
  readonly: !1,
3016
3097
  bare: !0,
3017
- paginate: n.value || b.value,
3018
- onNodeDragStart: x(Ie),
3019
- onDropNode: x(Ge),
3020
- onDropPalette: x(ze)
3098
+ paginate: o.value || f.value,
3099
+ onNodeDragStart: x(ze),
3100
+ onDropNode: x(Oe),
3101
+ onDropPalette: x(Ce)
3021
3102
  }, null, 8, ["schema", "mode", "selected-node-id", "data", "paginate", "onNodeDragStart", "onDropNode", "onDropPalette"])
3022
3103
  ]),
3023
3104
  _: 1
3024
3105
  })
3025
3106
  ], 2),
3026
- le(dd, {
3027
- paginate: b.value,
3028
- "onUpdate:paginate": V[3] || (V[3] = (M) => b.value = M),
3107
+ ae(ud, {
3108
+ paginate: f.value,
3109
+ "onUpdate:paginate": V[3] || (V[3] = (B) => f.value = B),
3029
3110
  node: x(h),
3030
3111
  "node-id": x(c),
3031
3112
  "node-type": x(m),
3032
- "cell-context": x(S),
3113
+ "cell-context": x(C),
3033
3114
  "cell-box": x(F),
3034
- issues: Vt.value,
3035
- api: x(Ce),
3115
+ issues: Ot.value,
3116
+ api: x(Ie),
3036
3117
  "paper-size": x(A).paper.size,
3037
3118
  "base-row-height": x(A).baseRowHeight,
3038
- "paper-margin-top": x(se),
3039
- "paper-margin-right": x(We),
3040
- "paper-margin-bottom": x(Ue),
3041
- "paper-margin-left": x(je),
3119
+ "paper-margin-top": x(i),
3120
+ "paper-margin-right": x(d),
3121
+ "paper-margin-bottom": x(y),
3122
+ "paper-margin-left": x(R),
3042
3123
  header: x(A).paper.header,
3043
3124
  footer: x(A).paper.footer,
3044
- onSelectIssue: x(ce)
3125
+ onSelectIssue: x(fe)
3045
3126
  }, null, 8, ["paginate", "node", "node-id", "node-type", "cell-context", "cell-box", "issues", "api", "paper-size", "base-row-height", "paper-margin-top", "paper-margin-right", "paper-margin-bottom", "paper-margin-left", "header", "footer", "onSelectIssue"])
3046
3127
  ]),
3047
- le(Sa, {
3128
+ ae(Sa, {
3048
3129
  "page-count": x(A).pages.length,
3049
- "warning-count": fl.value,
3050
- "physical-page-count": Gt.value.pages.length,
3051
- "paginate-warning-count": Gt.value.warnings.length
3130
+ "warning-count": bl.value,
3131
+ "physical-page-count": Wt.value.pages.length,
3132
+ "paginate-warning-count": Wt.value.warnings.length
3052
3133
  }, null, 8, ["page-count", "warning-count", "physical-page-count", "paginate-warning-count"]),
3053
3134
  l("input", {
3054
3135
  ref_key: "fileInput",
@@ -3057,36 +3138,36 @@ const yd = { class: "v2-designer" }, Sd = { class: "v2-designer__body" }, Xt = "
3057
3138
  accept: ".json,application/json",
3058
3139
  class: "v2-toolbar__file",
3059
3140
  onChange: V[4] || (V[4] = //@ts-ignore
3060
- (...M) => x(Z) && x(Z)(...M))
3141
+ (...B) => x(_) && x(_)(...B))
3061
3142
  }, null, 544),
3062
3143
  l("input", {
3063
3144
  ref_key: "fillDataFileInput",
3064
- ref: Te,
3145
+ ref: je,
3065
3146
  type: "file",
3066
3147
  accept: ".json,application/json",
3067
3148
  class: "v2-toolbar__file",
3068
3149
  onChange: V[5] || (V[5] = //@ts-ignore
3069
- (...M) => x(Et) && x(Et)(...M))
3150
+ (...B) => x(ke) && x(ke)(...B))
3070
3151
  }, null, 544),
3071
- le(vd, {
3152
+ ae(pd, {
3072
3153
  open: v.value,
3073
- onClose: f
3154
+ onClose: b
3074
3155
  }, null, 8, ["open"])
3075
3156
  ]));
3076
3157
  }
3077
- }), Id = /* @__PURE__ */ ie($d, [["__scopeId", "data-v-c31c7c34"]]);
3158
+ }), kd = /* @__PURE__ */ ve(wd, [["__scopeId", "data-v-11f35b10"]]);
3078
3159
  export {
3079
3160
  va as F,
3080
- ra as J,
3161
+ ua as J,
3081
3162
  sa as S,
3082
- Id as a,
3083
- dl as b,
3084
- et as c,
3163
+ kd as a,
3164
+ cl as b,
3165
+ tt as c,
3085
3166
  $a as d,
3086
- al as e,
3087
- ll as f,
3167
+ rl as e,
3168
+ dl as f,
3088
3169
  ca as g,
3089
3170
  pa as n,
3090
3171
  Ca as r,
3091
- jt as s
3172
+ Yt as s
3092
3173
  };