form-design-v3 1.0.3 → 1.0.5

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.
@@ -1,9 +1,11 @@
1
- import { defineComponent as L, openBlock as d, createElementBlock as c, normalizeClass as R, unref as h, createElementVNode as t, toDisplayString as y, normalizeStyle as G, Fragment as T, createTextVNode as U, computed as M, ref as O, onMounted as ie, onUnmounted as Ce, createVNode as F, withCtx as A, renderList as N, createBlock as V, resolveDynamicComponent as me, createCommentVNode as I, withModifiers as J, withDirectives as ce, renderSlot as Q, vShow as _e, reactive as Ie, Teleport as pe, nextTick as De, resolveComponent as Se, mergeProps as de, createSlots as ae, normalizeProps as Ue, guardReactiveProps as Be, provide as Ve, watch as le, createStaticVNode as ve, onBeforeUnmount as je, vModelText as Re, defineAsyncComponent as Ae, createApp as ze, h as Je } from "vue";
2
- import { defineStore as We } from "pinia";
3
- import { ElSelect as re, ElOption as oe, ElTree as He, ElLoading as qe, ElConfigProvider as Ge, ElDialog as Ye, ElInput as Ke, ElEmpty as Qe, ElPagination as Xe, ElButton as we, ElInputNumber as Ze } from "element-plus";
1
+ import { defineComponent as E, openBlock as d, createElementBlock as c, normalizeClass as R, unref as h, createElementVNode as t, toDisplayString as k, normalizeStyle as K, Fragment as F, createTextVNode as U, computed as M, ref as O, onMounted as ce, onUnmounted as Ee, createVNode as L, withCtx as j, renderList as N, createBlock as V, resolveDynamicComponent as he, createCommentVNode as T, withModifiers as q, withDirectives as fe, renderSlot as te, vShow as ye, reactive as Pe, Teleport as ke, nextTick as Oe, resolveComponent as Ue, mergeProps as ve, createSlots as re, normalizeProps as He, guardReactiveProps as qe, provide as Ge, watch as de, createStaticVNode as we, onBeforeUnmount as Ye, vModelText as Ke, h as pe, defineAsyncComponent as Qe, createApp as Xe } from "vue";
2
+ import { defineStore as Ze } from "pinia";
3
+ import { ElSelect as ue, ElOption as ee, ElTree as et, ElLoading as tt, ElConfigProvider as nt, ElDialog as ot, ElInput as st, ElEmpty as lt, ElPagination as at, ElButton as Fe, ElInputNumber as it, ElMessage as z, ElMessageBox as dt } from "element-plus";
4
4
  import "element-plus/es/components/select/style/css";
5
- import { icons as et } from "lucide-vue-next";
5
+ import { icons as rt } from "lucide-vue-next";
6
6
  import "element-plus/es/components/input-number/style/css";
7
+ import "element-plus/es/components/message/style/css";
8
+ import "element-plus/es/components/message-box/style/css";
7
9
  import "element-plus/es/components/tree/style/css";
8
10
  import "element-plus/es/components/dialog/style/css";
9
11
  import "element-plus/es/components/input/style/css";
@@ -12,50 +14,50 @@ import "element-plus/es/components/button/style/css";
12
14
  import "element-plus/es/components/empty/style/css";
13
15
  import "element-plus/es/components/loading/style/css";
14
16
  import "element-plus/es/components/config-provider/style/css";
15
- const be = /* @__PURE__ */ new Map();
16
- function ee(e) {
17
- be.set(e.type, e);
17
+ const $e = /* @__PURE__ */ new Map();
18
+ function le(e) {
19
+ $e.set(e.type, e);
18
20
  }
19
- function K(e) {
20
- return be.get(e);
21
+ function X(e) {
22
+ return $e.get(e);
21
23
  }
22
- function tt() {
23
- return Array.from(be.values());
24
+ function ut() {
25
+ return Array.from($e.values());
24
26
  }
25
- function nt(e) {
26
- const n = K(e);
27
+ function ct(e) {
28
+ const n = X(e);
27
29
  if (!n) throw new Error(`未注册的控件类型: ${e}`);
28
30
  return { ...n.createDefaultProps(), id: `${e}_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 7)}` };
29
31
  }
30
- const ot = { class: "fd-label-name" }, st = /* @__PURE__ */ L({
32
+ const ft = { class: "fd-label-name" }, mt = /* @__PURE__ */ E({
31
33
  __name: "LabelDesign",
32
34
  props: {
33
35
  node: {}
34
36
  },
35
37
  setup(e) {
36
- const n = W();
38
+ const n = G();
37
39
  return (o, s) => (d(), c("div", {
38
40
  class: R(["fd-label-design", { "is-mobile": h(n).device === "mobile" }])
39
41
  }, [
40
- t("span", ot, y(e.node.label || "标题"), 1),
42
+ t("span", ft, k(e.node.label || "标题"), 1),
41
43
  t("span", {
42
44
  class: R(["fd-label-value", { "fd-label-value--link": !!e.node.bindLink }]),
43
- style: G(e.node.color ? { color: e.node.color } : void 0)
45
+ style: K(!e.node.bindLink && e.node.color ? { color: e.node.color } : void 0)
44
46
  }, [
45
- e.node.bindLink ? (d(), c(T, { key: 0 }, [
46
- U(y(e.node.bindField || e.node.bindLink), 1)
47
- ], 64)) : (d(), c(T, { key: 1 }, [
48
- U(y(e.node.bindField || "未绑定字段"), 1)
47
+ e.node.bindLink ? (d(), c(F, { key: 0 }, [
48
+ U(k(e.node.bindField || e.node.bindLink), 1)
49
+ ], 64)) : (d(), c(F, { key: 1 }, [
50
+ U(k(e.node.bindField || "未绑定字段"), 1)
49
51
  ], 64))
50
52
  ], 6)
51
53
  ], 2));
52
54
  }
53
- }), E = (e, n) => {
55
+ }), P = (e, n) => {
54
56
  const o = e.__vccOpts || e;
55
57
  for (const [s, a] of n)
56
58
  o[s] = a;
57
59
  return o;
58
- }, lt = /* @__PURE__ */ E(st, [["__scopeId", "data-v-b6dcc499"]]), at = { class: "fd-label-name" }, it = ["data-key"], dt = ["href"], rt = /* @__PURE__ */ L({
60
+ }, pt = /* @__PURE__ */ P(mt, [["__scopeId", "data-v-d8f57508"]]), vt = { class: "fd-label-name" }, bt = ["data-key"], gt = ["href"], ht = /* @__PURE__ */ E({
59
61
  __name: "LabelRender",
60
62
  props: {
61
63
  node: {},
@@ -64,28 +66,28 @@ const ot = { class: "fd-label-name" }, st = /* @__PURE__ */ L({
64
66
  },
65
67
  setup(e) {
66
68
  const n = e, o = M(() => !!n.node.bindLink), s = M(() => {
67
- var v;
68
- const f = n.node.bindLink ? (v = n.formData) == null ? void 0 : v[n.node.bindLink] : void 0;
69
- return f == null ? "" : String(f);
70
- }), a = M(() => n.value !== void 0 && n.value !== null && n.value !== "" ? String(n.value) : s.value ? s.value : ""), i = W(), u = O(!1);
69
+ var p;
70
+ const m = n.node.bindLink ? (p = n.formData) == null ? void 0 : p[n.node.bindLink] : void 0;
71
+ return m == null ? "" : String(m);
72
+ }), a = M(() => n.value !== void 0 && n.value !== null && n.value !== "" ? String(n.value) : s.value ? s.value : ""), i = G(), u = O(!1);
71
73
  let r = null;
72
- ie(() => {
73
- r = window.matchMedia("(max-width: 768px)"), u.value = r.matches, r.addEventListener("change", (f) => {
74
- u.value = f.matches;
74
+ ce(() => {
75
+ r = window.matchMedia("(max-width: 768px)"), u.value = r.matches, r.addEventListener("change", (m) => {
76
+ u.value = m.matches;
75
77
  });
76
- }), Ce(() => {
78
+ }), Ee(() => {
77
79
  r && r.removeEventListener("change", () => {
78
80
  });
79
81
  });
80
82
  const l = M(() => i.device === "mobile" || u.value);
81
- return (f, v) => (d(), c("div", {
83
+ return (m, p) => (d(), c("div", {
82
84
  class: R(["fd-label-render", { "is-mobile": l.value }])
83
85
  }, [
84
- t("span", at, y(e.node.label || "标题"), 1),
86
+ t("span", vt, k(e.node.label || "标题"), 1),
85
87
  t("span", {
86
88
  class: R(["fd-label-value", { "fd-label-value--link": o.value }]),
87
89
  "data-key": e.node.bindField,
88
- style: G(e.node.color ? { color: e.node.color } : void 0)
90
+ style: K(!o.value && e.node.color ? { color: e.node.color } : void 0)
89
91
  }, [
90
92
  s.value ? (d(), c("a", {
91
93
  key: 0,
@@ -93,13 +95,13 @@ const ot = { class: "fd-label-name" }, st = /* @__PURE__ */ L({
93
95
  href: s.value,
94
96
  target: "_blank",
95
97
  rel: "noopener noreferrer"
96
- }, y(a.value), 9, dt)) : (d(), c(T, { key: 1 }, [
97
- U(y(a.value), 1)
98
+ }, k(a.value), 9, gt)) : (d(), c(F, { key: 1 }, [
99
+ U(k(a.value), 1)
98
100
  ], 64))
99
- ], 14, it)
101
+ ], 14, bt)
100
102
  ], 2));
101
103
  }
102
- }), ut = /* @__PURE__ */ E(rt, [["__scopeId", "data-v-7fe92042"]]), ct = { class: "fd-panel" }, ft = { class: "fd-panel-item" }, mt = ["value"], pt = { class: "fd-panel-item" }, vt = { class: "fd-panel-item" }, bt = ["value"], gt = { class: "fd-panel-item" }, ht = { class: "fd-color-row" }, yt = ["value"], kt = ["value"], wt = "#344054", $t = /* @__PURE__ */ L({
104
+ }), yt = /* @__PURE__ */ P(ht, [["__scopeId", "data-v-d521c01f"]]), kt = { class: "fd-panel" }, wt = { class: "fd-panel-item" }, $t = ["value"], xt = { class: "fd-panel-item" }, Ct = { class: "fd-panel-item" }, _t = { class: "fd-panel-item" }, It = { class: "fd-color-row" }, Dt = ["value"], St = ["value"], Tt = "#344054", Ft = /* @__PURE__ */ E({
103
105
  __name: "LabelPanel",
104
106
  props: {
105
107
  node: {},
@@ -108,27 +110,32 @@ const ot = { class: "fd-label-name" }, st = /* @__PURE__ */ L({
108
110
  emits: ["update"],
109
111
  setup(e, { emit: n }) {
110
112
  const o = e, s = n;
111
- function a(r) {
112
- return r && /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(r) ? r : wt;
113
+ function a(l) {
114
+ return l && /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(l) ? l : Tt;
113
115
  }
114
- function i(r) {
115
- s("update", { color: r.target.value });
116
+ function i(l) {
117
+ s("update", { color: l.target.value });
116
118
  }
117
- const u = (r) => {
118
- const l = r ?? "", f = o.fields.find((v) => v.name === l);
119
- s("update", { bindField: l, bindLink: (f == null ? void 0 : f.dataType) === "link" ? l : "" });
119
+ const u = (l) => {
120
+ const m = l ?? "", p = o.fields.find((C) => C.name === m), y = {
121
+ bindField: m,
122
+ bindLink: (p == null ? void 0 : p.dataType) === "link" ? m : ""
123
+ };
124
+ p != null && p.label && (y.label = p.label), s("update", y);
125
+ }, r = (l) => {
126
+ s("update", { bindLink: l ?? "" });
120
127
  };
121
- return (r, l) => (d(), c("div", ct, [
122
- t("div", ft, [
123
- l[2] || (l[2] = t("label", null, "标题", -1)),
128
+ return (l, m) => (d(), c("div", kt, [
129
+ t("div", wt, [
130
+ m[2] || (m[2] = t("label", null, "标题", -1)),
124
131
  t("input", {
125
132
  value: e.node.label,
126
- onInput: l[0] || (l[0] = (f) => s("update", { label: f.target.value }))
127
- }, null, 40, mt)
133
+ onInput: m[0] || (m[0] = (p) => s("update", { label: p.target.value }))
134
+ }, null, 40, $t)
128
135
  ]),
129
- t("div", pt, [
130
- l[3] || (l[3] = t("label", null, "绑定字段", -1)),
131
- F(h(re), {
136
+ t("div", xt, [
137
+ m[3] || (m[3] = t("label", null, "绑定字段", -1)),
138
+ L(h(ue), {
132
139
  "model-value": e.node.bindField,
133
140
  filterable: "",
134
141
  clearable: "",
@@ -136,51 +143,68 @@ const ot = { class: "fd-label-name" }, st = /* @__PURE__ */ L({
136
143
  style: { width: "100%" },
137
144
  "onUpdate:modelValue": u
138
145
  }, {
139
- default: A(() => [
140
- F(h(oe), {
146
+ default: j(() => [
147
+ L(h(ee), {
141
148
  label: "不绑定",
142
149
  value: ""
143
150
  }),
144
- (d(!0), c(T, null, N(e.fields, (f) => (d(), V(h(oe), {
145
- key: f.name,
146
- label: `${f.label}(${f.name})`,
147
- value: f.name
151
+ (d(!0), c(F, null, N(e.fields, (p) => (d(), V(h(ee), {
152
+ key: p.name,
153
+ label: `${p.label}(${p.name})`,
154
+ value: p.name
148
155
  }, null, 8, ["label", "value"]))), 128))
149
156
  ]),
150
157
  _: 1
151
158
  }, 8, ["model-value"])
152
159
  ]),
153
- t("div", vt, [
154
- l[4] || (l[4] = t("label", null, "链接", -1)),
155
- t("input", {
156
- value: e.node.bindLink ? `${e.node.bindLink}(链接字段自动绑定)` : "非链接字段",
157
- readonly: ""
158
- }, null, 8, bt)
160
+ t("div", Ct, [
161
+ m[4] || (m[4] = t("label", null, "链接", -1)),
162
+ L(h(ue), {
163
+ "model-value": e.node.bindLink,
164
+ filterable: "",
165
+ clearable: "",
166
+ placeholder: "选择链接字段(留空=不绑定)",
167
+ style: { width: "100%" },
168
+ "onUpdate:modelValue": r
169
+ }, {
170
+ default: j(() => [
171
+ L(h(ee), {
172
+ label: "不绑定",
173
+ value: ""
174
+ }),
175
+ (d(!0), c(F, null, N(e.fields, (p) => (d(), V(h(ee), {
176
+ key: p.name,
177
+ label: `${p.label}(${p.name})`,
178
+ value: p.name
179
+ }, null, 8, ["label", "value"]))), 128))
180
+ ]),
181
+ _: 1
182
+ }, 8, ["model-value"])
159
183
  ]),
160
- t("div", gt, [
161
- l[5] || (l[5] = t("label", null, "字体颜色", -1)),
162
- t("div", ht, [
184
+ t("div", _t, [
185
+ m[5] || (m[5] = t("label", null, "字体颜色", -1)),
186
+ t("div", It, [
163
187
  t("input", {
164
188
  type: "color",
165
189
  value: a(e.node.color),
166
190
  onInput: i
167
- }, null, 40, yt),
191
+ }, null, 40, Dt),
168
192
  t("input", {
169
193
  type: "text",
170
194
  value: e.node.color,
171
- onInput: l[1] || (l[1] = (f) => s("update", { color: f.target.value })),
195
+ onInput: m[1] || (m[1] = (p) => s("update", { color: p.target.value })),
172
196
  placeholder: "默认 #344054"
173
- }, null, 40, kt)
197
+ }, null, 40, St)
174
198
  ])
175
199
  ])
176
200
  ]));
177
201
  }
178
- }), xt = /* @__PURE__ */ E($t, [["__scopeId", "data-v-d1d2c609"]]), Ct = {
202
+ }), Lt = /* @__PURE__ */ P(Ft, [["__scopeId", "data-v-9219c401"]]), Mt = {
179
203
  type: "label",
180
204
  title: "Label 文本",
181
- design: lt,
182
- render: ut,
183
- panel: xt,
205
+ design: pt,
206
+ render: yt,
207
+ panel: Lt,
184
208
  isContainer: !1,
185
209
  createDefaultProps: () => ({
186
210
  id: "",
@@ -191,7 +215,7 @@ const ot = { class: "fd-label-name" }, st = /* @__PURE__ */ L({
191
215
  color: "#344054"
192
216
  }),
193
217
  serialize: (e) => e
194
- }, ue = /* @__PURE__ */ L({
218
+ }, be = /* @__PURE__ */ E({
195
219
  __name: "LucideIcon",
196
220
  props: {
197
221
  name: {},
@@ -199,40 +223,40 @@ const ot = { class: "fd-label-name" }, st = /* @__PURE__ */ L({
199
223
  strokeWidth: { default: 2 }
200
224
  },
201
225
  setup(e) {
202
- const n = e, o = M(() => n.name && et[n.name] || null);
203
- return (s, a) => o.value ? (d(), V(me(o.value), {
226
+ const n = e, o = M(() => n.name && rt[n.name] || null);
227
+ return (s, a) => o.value ? (d(), V(he(o.value), {
204
228
  key: 0,
205
229
  size: e.size,
206
230
  "stroke-width": e.strokeWidth
207
- }, null, 8, ["size", "stroke-width"])) : I("", !0);
231
+ }, null, 8, ["size", "stroke-width"])) : T("", !0);
208
232
  }
209
- }), _t = { class: "fd-card-design" }, It = { class: "fd-card-head" }, Dt = { class: "fd-card-title" }, St = ["title"], Tt = { class: "fd-card-body" }, Ft = /* @__PURE__ */ L({
233
+ }), Nt = { class: "fd-card-design" }, Et = { class: "fd-card-head" }, Pt = { class: "fd-card-title" }, Ot = ["title"], Ut = { class: "fd-card-body" }, Bt = /* @__PURE__ */ E({
210
234
  __name: "CardDesign",
211
235
  props: {
212
236
  node: {}
213
237
  },
214
238
  setup(e) {
215
- const n = e, o = W();
239
+ const n = e, o = G();
216
240
  function s() {
217
241
  o.setExpanded(n.node.id, !n.node.expanded);
218
242
  }
219
- return (a, i) => (d(), c("div", _t, [
220
- t("div", It, [
243
+ return (a, i) => (d(), c("div", Nt, [
244
+ t("div", Et, [
221
245
  e.node.icon ? (d(), c("span", {
222
246
  key: 0,
223
247
  class: "fd-card-icon",
224
- style: G({ background: e.node.iconBgColor || void 0 })
248
+ style: K({ background: e.node.iconBgColor || void 0 })
225
249
  }, [
226
- F(ue, {
250
+ L(be, {
227
251
  name: e.node.icon,
228
252
  size: 18
229
253
  }, null, 8, ["name"])
230
- ], 4)) : I("", !0),
231
- t("span", Dt, y(e.node.label || "卡片标题"), 1),
254
+ ], 4)) : T("", !0),
255
+ t("span", Pt, k(e.node.label || "卡片标题"), 1),
232
256
  t("span", {
233
257
  class: R(["fd-card-arrow", { "is-open": e.node.expanded }]),
234
258
  title: e.node.expanded ? "收起" : "展开",
235
- onClick: J(s, ["stop"])
259
+ onClick: q(s, ["stop"])
236
260
  }, [...i[0] || (i[0] = [
237
261
  t("svg", {
238
262
  viewBox: "0 0 24 24",
@@ -244,27 +268,27 @@ const ot = { class: "fd-label-name" }, st = /* @__PURE__ */ L({
244
268
  }, [
245
269
  t("polyline", { points: "6 9 12 15 18 9" })
246
270
  ], -1)
247
- ])], 10, St)
271
+ ])], 10, Ot)
248
272
  ]),
249
- ce(t("div", Tt, [
250
- Q(a.$slots, "children", {}, () => [
273
+ fe(t("div", Ut, [
274
+ te(a.$slots, "children", {}, () => [
251
275
  i[1] || (i[1] = t("div", { class: "fd-card-empty" }, "拖拽子控件到此处", -1))
252
276
  ], !0)
253
277
  ], 512), [
254
- [_e, e.node.expanded]
278
+ [ye, e.node.expanded]
255
279
  ])
256
280
  ]));
257
281
  }
258
- }), Lt = /* @__PURE__ */ E(Ft, [["__scopeId", "data-v-6a46ee95"]]);
259
- function Te(e, n) {
282
+ }), Vt = /* @__PURE__ */ P(Bt, [["__scopeId", "data-v-6a46ee95"]]);
283
+ function Be(e, n) {
260
284
  if (!e || e === "none") return !1;
261
285
  const o = Number(n);
262
286
  return e === "start" ? o === 10 : e === "not-start" ? o !== 10 : e === "not-approval" ? o !== 20 : !1;
263
287
  }
264
- const Mt = {
288
+ const At = {
265
289
  key: 0,
266
290
  class: "fd-card-render"
267
- }, Nt = { class: "fd-card-title" }, Et = { class: "fd-card-body" }, Pt = /* @__PURE__ */ L({
291
+ }, jt = { class: "fd-card-title" }, Rt = { class: "fd-card-body" }, Jt = /* @__PURE__ */ E({
268
292
  __name: "CardRender",
269
293
  props: {
270
294
  node: {},
@@ -274,7 +298,7 @@ const Mt = {
274
298
  const o = O(e.node.expanded);
275
299
  return (s, a) => {
276
300
  var i;
277
- return h(Te)(e.node.hiddenMode, (i = e.formData) == null ? void 0 : i.status) ? I("", !0) : (d(), c("div", Mt, [
301
+ return h(Be)(e.node.hiddenMode, (i = e.formData) == null ? void 0 : i.status) ? T("", !0) : (d(), c("div", At, [
278
302
  t("div", {
279
303
  class: "fd-card-head",
280
304
  onClick: a[0] || (a[0] = (u) => o.value = !o.value)
@@ -282,14 +306,14 @@ const Mt = {
282
306
  e.node.icon ? (d(), c("span", {
283
307
  key: 0,
284
308
  class: "fd-card-icon",
285
- style: G({ background: e.node.iconBgColor || void 0 })
309
+ style: K({ background: e.node.iconBgColor || void 0 })
286
310
  }, [
287
- F(ue, {
311
+ L(be, {
288
312
  name: e.node.icon,
289
313
  size: 18
290
314
  }, null, 8, ["name"])
291
- ], 4)) : I("", !0),
292
- t("span", Nt, y(e.node.label || "卡片标题"), 1),
315
+ ], 4)) : T("", !0),
316
+ t("span", jt, k(e.node.label || "卡片标题"), 1),
293
317
  t("span", {
294
318
  class: R(["fd-card-arrow", { "is-open": o.value }])
295
319
  }, [...a[1] || (a[1] = [
@@ -305,15 +329,15 @@ const Mt = {
305
329
  ], -1)
306
330
  ])], 2)
307
331
  ]),
308
- ce(t("div", Et, [
309
- Q(s.$slots, "children", {}, void 0, !0)
332
+ fe(t("div", Rt, [
333
+ te(s.$slots, "children", {}, void 0, !0)
310
334
  ], 512), [
311
- [_e, o.value]
335
+ [ye, o.value]
312
336
  ])
313
337
  ]));
314
338
  };
315
339
  }
316
- }), Ot = /* @__PURE__ */ E(Pt, [["__scopeId", "data-v-bc2f6273"]]), Ut = ["disabled", "aria-checked"], Bt = /* @__PURE__ */ L({
340
+ }), zt = /* @__PURE__ */ P(Jt, [["__scopeId", "data-v-bc2f6273"]]), Wt = ["disabled", "aria-checked"], Ht = /* @__PURE__ */ E({
317
341
  __name: "FdSwitch",
318
342
  props: {
319
343
  modelValue: { type: Boolean },
@@ -331,9 +355,9 @@ const Mt = {
331
355
  onClick: a[0] || (a[0] = (i) => o("update:modelValue", !e.modelValue))
332
356
  }, [...a[1] || (a[1] = [
333
357
  t("span", { class: "fd-switch-dot" }, null, -1)
334
- ])], 10, Ut));
358
+ ])], 10, Wt));
335
359
  }
336
- }), se = /* @__PURE__ */ E(Bt, [["__scopeId", "data-v-eac909bd"]]), Vt = [
360
+ }), ie = /* @__PURE__ */ P(Ht, [["__scopeId", "data-v-eac909bd"]]), qt = [
337
361
  // 卡片 / 布局通用
338
362
  "LayoutGrid",
339
363
  "PanelTop",
@@ -384,10 +408,10 @@ const Mt = {
384
408
  "BookOpen",
385
409
  "Coins",
386
410
  "Wallet"
387
- ], jt = { class: "fd-panel" }, Rt = { class: "fd-panel-item" }, At = ["value"], zt = { class: "fd-panel-item" }, Jt = { class: "fd-icon-picker" }, Wt = {
411
+ ], Gt = { class: "fd-panel" }, Yt = { class: "fd-panel-item" }, Kt = ["value"], Qt = { class: "fd-panel-item" }, Xt = { class: "fd-icon-picker" }, Zt = {
388
412
  key: 1,
389
413
  class: "fd-icon-placeholder"
390
- }, Ht = { class: "fd-icon-grid" }, qt = ["title", "onClick"], Gt = { class: "fd-panel-item" }, Yt = ["value"], Kt = { class: "fd-panel-item fd-panel-item--row" }, Qt = { class: "fd-panel-item" }, Xt = ["value"], Zt = { class: "fd-panel-item" }, en = ["value"], tn = /* @__PURE__ */ L({
414
+ }, en = { class: "fd-icon-grid" }, tn = ["title", "onClick"], nn = { class: "fd-panel-item" }, on = ["value"], sn = { class: "fd-panel-item fd-panel-item--row" }, ln = { class: "fd-panel-item" }, an = ["value"], dn = /* @__PURE__ */ E({
391
415
  __name: "CardPanel",
392
416
  props: {
393
417
  node: {},
@@ -399,28 +423,28 @@ const Mt = {
399
423
  function a(i) {
400
424
  o("update", { icon: i }), s.value = !1;
401
425
  }
402
- return (i, u) => (d(), c("div", jt, [
403
- t("div", Rt, [
404
- u[8] || (u[8] = t("label", null, "标题", -1)),
426
+ return (i, u) => (d(), c("div", Gt, [
427
+ t("div", Yt, [
428
+ u[7] || (u[7] = t("label", null, "标题", -1)),
405
429
  t("input", {
406
430
  value: e.node.label,
407
431
  onInput: u[0] || (u[0] = (r) => o("update", { label: r.target.value }))
408
- }, null, 40, At)
432
+ }, null, 40, Kt)
409
433
  ]),
410
- t("div", zt, [
411
- u[11] || (u[11] = t("label", null, "图标", -1)),
412
- t("div", Jt, [
434
+ t("div", Qt, [
435
+ u[10] || (u[10] = t("label", null, "图标", -1)),
436
+ t("div", Xt, [
413
437
  t("button", {
414
438
  type: "button",
415
439
  class: "fd-icon-trigger",
416
440
  onClick: u[1] || (u[1] = (r) => s.value = !s.value)
417
441
  }, [
418
- e.node.icon ? (d(), V(ue, {
442
+ e.node.icon ? (d(), V(be, {
419
443
  key: 0,
420
444
  name: e.node.icon,
421
445
  size: 16
422
- }, null, 8, ["name"])) : (d(), c("span", Wt, "无图标")),
423
- u[9] || (u[9] = t("svg", {
446
+ }, null, 8, ["name"])) : (d(), c("span", Zt, "无图标")),
447
+ u[8] || (u[8] = t("svg", {
424
448
  class: "fd-icon-caret",
425
449
  viewBox: "0 0 24 24",
426
450
  fill: "none",
@@ -435,75 +459,63 @@ const Mt = {
435
459
  s.value ? (d(), c("div", {
436
460
  key: 0,
437
461
  class: "fd-icon-popover",
438
- onClick: u[3] || (u[3] = J(() => {
462
+ onClick: u[3] || (u[3] = q(() => {
439
463
  }, ["stop"]))
440
464
  }, [
441
- t("div", Ht, [
465
+ t("div", en, [
442
466
  t("button", {
443
467
  type: "button",
444
468
  class: R(["fd-icon-option", { active: !e.node.icon }]),
445
469
  title: "无图标",
446
470
  onClick: u[2] || (u[2] = (r) => a(""))
447
- }, [...u[10] || (u[10] = [
471
+ }, [...u[9] || (u[9] = [
448
472
  t("span", { class: "fd-icon-none" }, "无", -1)
449
473
  ])], 2),
450
- (d(!0), c(T, null, N(h(Vt), (r) => (d(), c("button", {
474
+ (d(!0), c(F, null, N(h(qt), (r) => (d(), c("button", {
451
475
  key: r,
452
476
  type: "button",
453
477
  class: R(["fd-icon-option", { active: e.node.icon === r }]),
454
478
  title: r,
455
479
  onClick: (l) => a(r)
456
480
  }, [
457
- F(ue, {
481
+ L(be, {
458
482
  name: r,
459
483
  size: 18
460
484
  }, null, 8, ["name"])
461
- ], 10, qt))), 128))
485
+ ], 10, tn))), 128))
462
486
  ])
463
- ])) : I("", !0)
487
+ ])) : T("", !0)
464
488
  ])
465
489
  ]),
466
- t("div", Gt, [
467
- u[12] || (u[12] = t("label", null, "图标底色", -1)),
490
+ t("div", nn, [
491
+ u[11] || (u[11] = t("label", null, "图标底色", -1)),
468
492
  t("input", {
469
493
  value: e.node.iconBgColor,
470
494
  onInput: u[4] || (u[4] = (r) => o("update", { iconBgColor: r.target.value }))
471
- }, null, 40, Yt)
495
+ }, null, 40, on)
472
496
  ]),
473
- t("div", Kt, [
474
- u[13] || (u[13] = t("label", null, "初始展开", -1)),
475
- F(se, {
497
+ t("div", sn, [
498
+ u[12] || (u[12] = t("label", null, "初始展开", -1)),
499
+ L(ie, {
476
500
  "model-value": e.node.expanded,
477
501
  "onUpdate:modelValue": u[5] || (u[5] = (r) => o("update", { expanded: r }))
478
502
  }, null, 8, ["model-value"])
479
503
  ]),
480
- t("div", Qt, [
481
- u[14] || (u[14] = t("label", null, "宽度", -1)),
504
+ t("div", ln, [
505
+ u[13] || (u[13] = t("label", null, "宽度", -1)),
482
506
  t("input", {
483
507
  value: e.node.width,
484
508
  onInput: u[6] || (u[6] = (r) => o("update", { width: r.target.value }))
485
- }, null, 40, Xt)
486
- ]),
487
- t("div", Zt, [
488
- u[16] || (u[16] = t("label", null, "是否隐藏", -1)),
489
- t("select", {
490
- value: e.node.hiddenMode || "none",
491
- onChange: u[7] || (u[7] = (r) => o("update", { hiddenMode: r.target.value }))
492
- }, [...u[15] || (u[15] = [
493
- t("option", { value: "none" }, "不隐藏", -1),
494
- t("option", { value: "start" }, "发起时隐藏", -1),
495
- t("option", { value: "not-start" }, "非发起时隐藏", -1),
496
- t("option", { value: "not-approval" }, "非审批时隐藏", -1)
497
- ])], 40, en)
509
+ }, null, 40, an)
498
510
  ])
499
511
  ]));
500
512
  }
501
- }), nn = /* @__PURE__ */ E(tn, [["__scopeId", "data-v-4585a5b8"]]), on = {
513
+ }), rn = /* @__PURE__ */ P(dn, [["__scopeId", "data-v-d3ccdc07"]]), un = {
502
514
  type: "card",
503
515
  title: "卡片容器",
504
- design: Lt,
505
- render: Ot,
506
- panel: nn,
516
+ design: Vt,
517
+ render: zt,
518
+ panel: rn,
507
519
  isContainer: !0,
508
520
  createDefaultProps: () => ({
509
521
  id: "",
@@ -518,22 +530,24 @@ const Mt = {
518
530
  children: []
519
531
  }),
520
532
  serialize: (e) => e
521
- }, sn = { class: "fd-slot-design" }, ln = { class: "fd-slot-name" }, an = { class: "fd-slot-hint" }, dn = /* @__PURE__ */ L({
533
+ }, cn = { class: "fd-slot-design" }, fn = { class: "fd-slot-hint" }, mn = /* @__PURE__ */ E({
522
534
  __name: "SlotDesign",
523
535
  props: {
524
536
  node: {}
525
537
  },
526
538
  setup(e) {
527
- return (n, o) => (d(), c("div", sn, [
539
+ return (n, o) => (d(), c("div", cn, [
528
540
  o[0] || (o[0] = t("span", { class: "fd-slot-tag" }, "插槽", -1)),
529
- t("span", ln, y(e.node.slotName || "未命名插槽"), 1),
530
- t("span", an, "宿主注入:" + y(e.node.slotName), 1)
541
+ fe(t("span", { class: "fd-slot-name" }, k(e.node.label || "未命名插槽"), 513), [
542
+ [ye, !["", "插", "插槽"].includes(e.node.label)]
543
+ ]),
544
+ t("span", fn, "宿主注入:" + k(e.node.slotName), 1)
531
545
  ]));
532
546
  }
533
- }), rn = /* @__PURE__ */ E(dn, [["__scopeId", "data-v-d3fbc11d"]]), un = {
547
+ }), pn = /* @__PURE__ */ P(mn, [["__scopeId", "data-v-b1a912fb"]]), vn = {
534
548
  key: 0,
535
549
  class: "fd-slot-render"
536
- }, cn = { class: "fd-slot-missing" }, fn = /* @__PURE__ */ L({
550
+ }, bn = { class: "fd-slot-missing" }, gn = /* @__PURE__ */ E({
537
551
  __name: "SlotRender",
538
552
  props: {
539
553
  node: {},
@@ -544,19 +558,51 @@ const Mt = {
544
558
  setup(e) {
545
559
  return (n, o) => {
546
560
  var s;
547
- return h(Te)(e.node.hiddenMode, (s = e.formData) == null ? void 0 : s.status) ? I("", !0) : (d(), c("div", un, [
548
- Q(n.$slots, e.node.slotName, {
561
+ return h(Be)(e.node.hiddenMode, (s = e.formData) == null ? void 0 : s.status) ? T("", !0) : (d(), c("div", vn, [
562
+ te(n.$slots, e.node.slotName, {
549
563
  node: e.node,
550
564
  formData: e.formData,
551
565
  mode: e.mode,
552
566
  formId: e.formId
553
567
  }, () => [
554
- t("div", cn, "未注入插槽:" + y(e.node.slotName), 1)
568
+ t("div", bn, "未注入插槽:" + k(e.node.slotName), 1)
555
569
  ], !0)
556
570
  ]));
557
571
  };
558
572
  }
559
- }), mn = /* @__PURE__ */ E(fn, [["__scopeId", "data-v-10795159"]]), pn = { class: "fd-panel" }, vn = { class: "fd-panel-item" }, bn = ["value"], gn = { class: "fd-panel-item" }, hn = { class: "fd-panel-item" }, yn = ["value"], kn = /* @__PURE__ */ L({
573
+ }), hn = /* @__PURE__ */ P(gn, [["__scopeId", "data-v-10795159"]]), yn = [
574
+ "header",
575
+ "base-info",
576
+ "shop-tuning",
577
+ "contract-links",
578
+ "contract-list",
579
+ "handover-records",
580
+ "attachments",
581
+ "ai-risk",
582
+ "initiator-opinion",
583
+ "approval-flow",
584
+ "return-records",
585
+ "approval-records",
586
+ "approval-opinion",
587
+ "related-flows",
588
+ "footer"
589
+ ], me = {
590
+ header: "页面头部",
591
+ "base-info": "基础信息",
592
+ "shop-tuning": "招调信息",
593
+ "contract-links": "查看图纸/缴款计划",
594
+ "contract-list": "合同列表",
595
+ "handover-records": "交办记录",
596
+ attachments: "附件信息",
597
+ "ai-risk": "AI风险识别",
598
+ "initiator-opinion": "发起人意见",
599
+ "approval-flow": "审批流程",
600
+ "return-records": "退回记录",
601
+ "approval-records": "审批记录",
602
+ "approval-opinion": "审批意见",
603
+ "related-flows": "相关流程",
604
+ footer: "页面底部"
605
+ }, kn = { class: "fd-panel" }, wn = { class: "fd-panel-item" }, $n = ["value"], xn = { class: "fd-panel-item" }, Le = "插槽", Cn = /* @__PURE__ */ E({
560
606
  __name: "SlotPanel",
561
607
  props: {
562
608
  node: {},
@@ -564,47 +610,37 @@ const Mt = {
564
610
  },
565
611
  emits: ["update"],
566
612
  setup(e, { emit: n }) {
567
- const o = n, s = W(), a = [
568
- "header",
569
- "base-info",
570
- "shop-tuning",
571
- "contract-links",
572
- "contract-list",
573
- "handover-records",
574
- "attachments",
575
- "ai-risk",
576
- "initiator-opinion",
577
- "approval-flow",
578
- "return-records",
579
- "approval-records",
580
- "approval-opinion",
581
- "footer"
582
- ], i = O([]);
583
- function u(f, v) {
584
- f.forEach((k) => {
585
- var P;
586
- k.type === "slot" && k.slotName && v.add(k.slotName), (P = k.children) != null && P.length && u(k.children, v);
613
+ const o = e, s = n, a = G(), i = O([]);
614
+ function u(p, y) {
615
+ p.forEach((C) => {
616
+ var B;
617
+ C.type === "slot" && C.slotName && y.add(C.slotName), (B = C.children) != null && B.length && u(C.children, y);
587
618
  });
588
619
  }
589
620
  const r = M(() => {
590
- const f = new Set(a);
591
- return u(s.widgets, f), i.value.forEach((v) => v && f.add(v)), [...f];
592
- });
593
- function l(f) {
594
- const v = f ?? "";
595
- v && !r.value.includes(v) && i.value.push(v), o("update", { slotName: v });
621
+ const p = new Set(yn);
622
+ return u(a.widgets, p), i.value.forEach((y) => y && p.add(y)), [...p];
623
+ }), l = M(
624
+ () => o.node.label || me[o.node.slotName || ""] || Le
625
+ );
626
+ function m(p) {
627
+ const y = p ?? "";
628
+ y && !r.value.includes(y) && i.value.push(y), s("update", {
629
+ slotName: y,
630
+ label: me[y] || Le
631
+ });
596
632
  }
597
- return (f, v) => (d(), c("div", pn, [
598
- t("div", vn, [
599
- v[2] || (v[2] = t("label", null, "标题", -1)),
633
+ return (p, y) => (d(), c("div", kn, [
634
+ t("div", wn, [
635
+ y[1] || (y[1] = t("label", null, "标题", -1)),
600
636
  t("input", {
601
- value: e.node.label,
602
- onInput: v[0] || (v[0] = (k) => o("update", { label: k.target.value }))
603
- }, null, 40, bn)
637
+ value: l.value,
638
+ onInput: y[0] || (y[0] = (C) => s("update", { label: C.target.value }))
639
+ }, null, 40, $n)
604
640
  ]),
605
- t("div", gn, [
606
- v[3] || (v[3] = t("label", null, "插槽名", -1)),
607
- F(h(re), {
641
+ t("div", xn, [
642
+ y[2] || (y[2] = t("label", null, "插槽名", -1)),
643
+ L(h(ue), {
608
644
  "model-value": e.node.slotName,
609
645
  filterable: "",
610
646
  "allow-create": "",
@@ -612,38 +648,31 @@ const Mt = {
612
648
  "default-first-option": "",
613
649
  placeholder: "选择已有插槽名,或输入新名称创建",
614
650
  style: { width: "100%" },
615
- "onUpdate:modelValue": l
651
+ "onUpdate:modelValue": m
616
652
  }, {
617
- default: A(() => [
618
- (d(!0), c(T, null, N(r.value, (k) => (d(), V(h(oe), {
619
- key: k,
620
- label: k,
621
- value: k
622
- }, null, 8, ["label", "value"]))), 128))
653
+ default: j(() => [
654
+ (d(!0), c(F, null, N(r.value, (C) => (d(), V(h(ee), {
655
+ key: C,
656
+ label: C,
657
+ value: C
658
+ }, {
659
+ default: j(() => [
660
+ U(k(h(me)[C] ? `${h(me)[C]}(${C})` : C), 1)
661
+ ]),
662
+ _: 2
663
+ }, 1032, ["label", "value"]))), 128))
623
664
  ]),
624
665
  _: 1
625
666
  }, 8, ["model-value"])
626
- ]),
627
- t("div", hn, [
628
- v[5] || (v[5] = t("label", null, "是否隐藏", -1)),
629
- t("select", {
630
- value: e.node.hiddenMode || "none",
631
- onChange: v[1] || (v[1] = (k) => o("update", { hiddenMode: k.target.value }))
632
- }, [...v[4] || (v[4] = [
633
- t("option", { value: "none" }, "不隐藏", -1),
634
- t("option", { value: "start" }, "发起时隐藏", -1),
635
- t("option", { value: "not-start" }, "非发起时隐藏", -1),
636
- t("option", { value: "not-approval" }, "非审批时隐藏", -1)
637
- ])], 40, yn)
638
667
  ])
639
668
  ]));
640
669
  }
641
- }), wn = /* @__PURE__ */ E(kn, [["__scopeId", "data-v-dfae47c6"]]), $n = {
670
+ }), _n = /* @__PURE__ */ P(Cn, [["__scopeId", "data-v-56e42d3f"]]), In = {
642
671
  type: "slot",
643
672
  title: "插槽",
644
- design: rn,
645
- render: mn,
646
- panel: wn,
673
+ design: pn,
674
+ render: hn,
675
+ panel: _n,
647
676
  isContainer: !1,
648
677
  createDefaultProps: () => ({
649
678
  id: "",
@@ -655,91 +684,91 @@ const Mt = {
655
684
  hiddenMode: "none"
656
685
  }),
657
686
  serialize: (e) => e
658
- }, xn = { class: "fd-st-design" }, Cn = {
687
+ }, Dn = { class: "fd-st-design" }, Sn = {
659
688
  key: 0,
660
689
  class: "fd-st-table-wrap"
661
- }, _n = { class: "fd-st-table" }, In = {
690
+ }, Tn = { class: "fd-st-table" }, Fn = {
662
691
  key: 0,
663
692
  class: "fd-st-seq"
664
- }, Dn = {
693
+ }, Ln = {
665
694
  key: 0,
666
695
  class: "fd-st-seq"
667
- }, Sn = {
696
+ }, Mn = {
668
697
  key: 1,
669
698
  class: "fd-st-cards"
670
- }, Tn = { class: "fd-st-card" }, Fn = { class: "fd-st-card-label" }, Ln = {
699
+ }, Nn = { class: "fd-st-card" }, En = { class: "fd-st-card-label" }, Pn = {
671
700
  key: 0,
672
701
  class: "fd-st-cards-empty"
673
- }, Mn = /* @__PURE__ */ L({
702
+ }, On = /* @__PURE__ */ E({
674
703
  __name: "SubtableDesign",
675
704
  props: {
676
705
  node: {}
677
706
  },
678
707
  setup(e) {
679
708
  const n = e, o = M(() => n.node.tablestyle !== "cards");
680
- return (s, a) => (d(), c("div", xn, [
681
- o.value ? (d(), c("div", Cn, [
682
- t("table", _n, [
709
+ return (s, a) => (d(), c("div", Dn, [
710
+ o.value ? (d(), c("div", Sn, [
711
+ t("table", Tn, [
683
712
  t("thead", null, [
684
713
  t("tr", null, [
685
- e.node.secondtableindex === "1" ? (d(), c("th", In, "序号")) : I("", !0),
686
- (d(!0), c(T, null, N(e.node.colnums.filter((i) => i.isshow === 1), (i) => (d(), c("th", {
714
+ e.node.secondtableindex === "1" ? (d(), c("th", Fn, "序号")) : T("", !0),
715
+ (d(!0), c(F, null, N(e.node.colnums.filter((i) => i.isshow === 1), (i) => (d(), c("th", {
687
716
  key: i.name,
688
- style: G({ width: i.showwidth || void 0 })
689
- }, y(i.showname || i.major || i.name), 5))), 128))
717
+ style: K({ width: i.showwidth || void 0 })
718
+ }, k(i.showname || i.major || i.name), 5))), 128))
690
719
  ])
691
720
  ]),
692
721
  t("tbody", null, [
693
722
  t("tr", null, [
694
- e.node.secondtableindex === "1" ? (d(), c("td", Dn, "1")) : I("", !0),
695
- (d(!0), c(T, null, N(e.node.colnums.filter((i) => i.isshow === 1), (i) => (d(), c("td", {
723
+ e.node.secondtableindex === "1" ? (d(), c("td", Ln, "1")) : T("", !0),
724
+ (d(!0), c(F, null, N(e.node.colnums.filter((i) => i.isshow === 1), (i) => (d(), c("td", {
696
725
  key: i.name,
697
726
  class: R(["fd-st-cell", { "fd-st-cell--link": !!i.bindLink }])
698
- }, y(i.name), 3))), 128))
727
+ }, k(i.name), 3))), 128))
699
728
  ])
700
729
  ])
701
730
  ])
702
- ])) : (d(), c("div", Sn, [
703
- t("div", Tn, [
704
- (d(!0), c(T, null, N(e.node.colnums.filter((i) => i.isshow === 1), (i) => (d(), c("div", {
731
+ ])) : (d(), c("div", Mn, [
732
+ t("div", Nn, [
733
+ (d(!0), c(F, null, N(e.node.colnums.filter((i) => i.isshow === 1), (i) => (d(), c("div", {
705
734
  key: i.name,
706
735
  class: "fd-st-card-row"
707
736
  }, [
708
- t("span", Fn, y(i.showname || i.major), 1),
737
+ t("span", En, k(i.showname || i.major), 1),
709
738
  t("span", {
710
739
  class: R(["fd-st-card-value", { "fd-st-card-value--link": !!i.bindLink }])
711
- }, y(i.name), 3)
740
+ }, k(i.name), 3)
712
741
  ]))), 128))
713
742
  ]),
714
- e.node.colnums.filter((i) => i.isshow === 1).length === 0 ? (d(), c("div", Ln, " 暂无列配置 ")) : I("", !0)
743
+ e.node.colnums.filter((i) => i.isshow === 1).length === 0 ? (d(), c("div", Pn, " 暂无列配置 ")) : T("", !0)
715
744
  ]))
716
745
  ]));
717
746
  }
718
- }), Nn = /* @__PURE__ */ E(Mn, [["__scopeId", "data-v-aba8caec"]]), En = ["subtable-key"], Pn = {
747
+ }), Un = /* @__PURE__ */ P(On, [["__scopeId", "data-v-aba8caec"]]), Bn = ["subtable-key"], Vn = {
719
748
  key: 0,
720
749
  class: "fd-st-table-wrap"
721
- }, On = { class: "fd-st-table" }, Un = {
750
+ }, An = { class: "fd-st-table" }, jn = {
722
751
  key: 0,
723
752
  class: "fd-st-seq"
724
- }, Bn = ["subtable-val"], Vn = {
753
+ }, Rn = ["subtable-val"], Jn = {
725
754
  key: 1,
726
755
  class: "fd-st-op"
727
- }, jn = {
756
+ }, zn = {
728
757
  key: 0,
729
758
  class: "fd-st-seq"
730
- }, Rn = ["rowspan", "subtable-val"], An = ["href"], zn = {
759
+ }, Wn = ["rowspan", "subtable-val"], Hn = ["href"], qn = {
731
760
  key: 1,
732
761
  class: "fd-st-op"
733
- }, Jn = ["onClick"], Wn = { key: 0 }, Hn = ["colspan"], qn = {
762
+ }, Gn = ["onClick"], Yn = { key: 0 }, Kn = ["colspan"], Qn = {
734
763
  key: 1,
735
764
  class: "fd-st-cards"
736
- }, Gn = { class: "fd-st-card-label" }, Yn = ["subtable-val"], Kn = ["href"], Qn = {
765
+ }, Xn = { class: "fd-st-card-label" }, Zn = ["subtable-val"], eo = ["href"], to = {
737
766
  key: 0,
738
767
  class: "fd-st-card-actions"
739
- }, Xn = ["onClick"], Zn = {
768
+ }, no = ["onClick"], oo = {
740
769
  key: 0,
741
770
  class: "fd-st-cards-empty"
742
- }, eo = /* @__PURE__ */ L({
771
+ }, so = /* @__PURE__ */ E({
743
772
  __name: "SubtableRender",
744
773
  props: {
745
774
  node: {},
@@ -747,145 +776,145 @@ const Mt = {
747
776
  },
748
777
  setup(e) {
749
778
  const n = e, o = M(() => n.node.colnums.filter((_) => _.isshow === 1)), s = M(() => n.node.isreadonly === "1"), a = M(() => {
750
- var D;
751
- const _ = (D = n.formData) == null ? void 0 : D[n.node.secondtable];
779
+ var S;
780
+ const _ = (S = n.formData) == null ? void 0 : S[n.node.secondtable];
752
781
  return Array.isArray(_) ? _ : [];
753
782
  }), i = M(() => !(n.node.nodatahidetable === "1" && a.value.length === 0)), u = M(() => n.node.tablestyle !== "cards");
754
783
  function r() {
755
784
  if (s.value) return;
756
785
  const _ = {};
757
- o.value.forEach((D) => _[D.name] = ""), n.formData && Array.isArray(n.formData[n.node.secondtable]) && n.formData[n.node.secondtable].push(_);
786
+ o.value.forEach((S) => _[S.name] = ""), n.formData && Array.isArray(n.formData[n.node.secondtable]) && n.formData[n.node.secondtable].push(_);
758
787
  }
759
788
  function l(_) {
760
789
  s.value || n.formData && Array.isArray(n.formData[n.node.secondtable]) && n.formData[n.node.secondtable].splice(_, 1);
761
790
  }
762
- function f(_, D) {
763
- const m = _[D];
764
- return m == null ? "" : String(m);
791
+ function m(_, S) {
792
+ const v = _[S];
793
+ return v == null ? "" : String(v);
765
794
  }
766
- function v(_, D) {
767
- return _.bindLink ? f(D, _.bindLink) : "";
795
+ function p(_, S) {
796
+ return _.bindLink ? m(S, _.bindLink) : "";
768
797
  }
769
- const k = M(() => {
770
- const _ = a.value, D = [], m = [];
798
+ const y = M(() => {
799
+ const _ = a.value, S = [], v = [];
771
800
  return o.value.forEach((g, $) => {
772
- D[$] = [], m[$] = [];
773
- const B = g.issamecolmerge === 1;
774
- let q = 0;
801
+ S[$] = [], v[$] = [];
802
+ const A = g.issamecolmerge === 1;
803
+ let Y = 0;
775
804
  for (let x = 0; x < _.length; x++) {
776
- const p = f(_[x], g.name);
777
- B && p !== "" && x > 0 && p === f(_[x - 1], g.name) ? (m[$][x] = !0, D[$][q] += 1) : (m[$][x] = !1, D[$][x] = 1, q = x);
805
+ const b = m(_[x], g.name);
806
+ A && x > 0 && b === m(_[x - 1], g.name) ? (v[$][x] = !0, S[$][Y] += 1) : (v[$][x] = !1, S[$][x] = 1, Y = x);
778
807
  }
779
- }), { spans: D, skipped: m };
808
+ }), { spans: S, skipped: v };
780
809
  });
781
- function P(_, D) {
782
- var m;
783
- return ((m = k.value.skipped[_]) == null ? void 0 : m[D]) === !0;
810
+ function C(_, S) {
811
+ var v;
812
+ return ((v = y.value.skipped[_]) == null ? void 0 : v[S]) === !0;
784
813
  }
785
- function j(_, D) {
814
+ function B(_, S) {
786
815
  var g;
787
- const m = (g = k.value.spans[_]) == null ? void 0 : g[D];
788
- return m && m > 1 ? m : void 0;
816
+ const v = (g = y.value.spans[_]) == null ? void 0 : g[S];
817
+ return v && v > 1 ? v : void 0;
789
818
  }
790
- return (_, D) => i.value ? (d(), c("div", {
819
+ return (_, S) => i.value ? (d(), c("div", {
791
820
  key: 0,
792
821
  class: "fd-st-render",
793
822
  "subtable-key": e.node.secondtable
794
823
  }, [
795
- u.value ? (d(), c("div", Pn, [
796
- t("table", On, [
824
+ u.value ? (d(), c("div", Vn, [
825
+ t("table", An, [
797
826
  t("thead", null, [
798
827
  t("tr", null, [
799
- e.node.secondtableindex === "1" ? (d(), c("th", Un, "序号")) : I("", !0),
800
- (d(!0), c(T, null, N(o.value, (m) => (d(), c("th", {
801
- key: m.name,
802
- "subtable-val": m.name,
803
- style: G({ width: m.showwidth || void 0, textAlign: m.align || "left" })
804
- }, y(m.showname || m.major || m.name), 13, Bn))), 128)),
805
- s.value ? I("", !0) : (d(), c("th", Vn, "操作"))
828
+ e.node.secondtableindex === "1" ? (d(), c("th", jn, "序号")) : T("", !0),
829
+ (d(!0), c(F, null, N(o.value, (v) => (d(), c("th", {
830
+ key: v.name,
831
+ "subtable-val": v.name,
832
+ style: K({ width: v.showwidth || void 0, textAlign: v.align || "left" })
833
+ }, k(v.showname || v.major || v.name), 13, Rn))), 128)),
834
+ s.value ? T("", !0) : (d(), c("th", Jn, "操作"))
806
835
  ])
807
836
  ]),
808
837
  t("tbody", null, [
809
- (d(!0), c(T, null, N(a.value, (m, g) => (d(), c("tr", { key: g }, [
810
- e.node.secondtableindex === "1" ? (d(), c("td", jn, y(g + 1), 1)) : I("", !0),
811
- (d(!0), c(T, null, N(o.value, ($, B) => (d(), c(T, {
838
+ (d(!0), c(F, null, N(a.value, (v, g) => (d(), c("tr", { key: g }, [
839
+ e.node.secondtableindex === "1" ? (d(), c("td", zn, k(g + 1), 1)) : T("", !0),
840
+ (d(!0), c(F, null, N(o.value, ($, A) => (d(), c(F, {
812
841
  key: $.name
813
842
  }, [
814
- P(B, g) ? I("", !0) : (d(), c("td", {
843
+ C(A, g) ? T("", !0) : (d(), c("td", {
815
844
  key: 0,
816
- rowspan: j(B, g),
845
+ rowspan: B(A, g),
817
846
  "subtable-val": $.name,
818
- style: G({ textAlign: $.align || "left", color: $.prospect || void 0, background: $.background || void 0 })
847
+ style: K({ textAlign: $.align || "left", color: $.prospect || void 0, background: $.background || void 0 })
819
848
  }, [
820
- v($, m) ? (d(), c("a", {
849
+ p($, v) ? (d(), c("a", {
821
850
  key: 0,
822
851
  class: "fd-st-link",
823
- href: v($, m),
852
+ href: p($, v),
824
853
  target: "_blank",
825
854
  rel: "noopener noreferrer"
826
- }, y(f(m, $.name)), 9, An)) : (d(), c(T, { key: 1 }, [
827
- U(y(f(m, $.name)), 1)
855
+ }, k(m(v, $.name)), 9, Hn)) : (d(), c(F, { key: 1 }, [
856
+ U(k(m(v, $.name)), 1)
828
857
  ], 64))
829
- ], 12, Rn))
858
+ ], 12, Wn))
830
859
  ], 64))), 128)),
831
- s.value ? I("", !0) : (d(), c("td", zn, [
860
+ s.value ? T("", !0) : (d(), c("td", qn, [
832
861
  t("button", {
833
862
  class: "fd-btn fd-btn--danger",
834
863
  onClick: ($) => l(g)
835
- }, "删除", 8, Jn)
864
+ }, "删除", 8, Gn)
836
865
  ]))
837
866
  ]))), 128)),
838
- a.value.length === 0 ? (d(), c("tr", Wn, [
867
+ a.value.length === 0 ? (d(), c("tr", Yn, [
839
868
  t("td", {
840
869
  colspan: o.value.length + (e.node.secondtableindex === "1" ? 1 : 0) + (s.value ? 0 : 1),
841
870
  class: "fd-st-empty"
842
- }, y(e.node.nodatatitle === "1" ? "暂无数据" : ""), 9, Hn)
843
- ])) : I("", !0)
871
+ }, k(e.node.nodatatitle === "1" ? "暂无数据" : ""), 9, Kn)
872
+ ])) : T("", !0)
844
873
  ])
845
874
  ])
846
- ])) : (d(), c("div", qn, [
847
- (d(!0), c(T, null, N(a.value, (m, g) => (d(), c("div", {
875
+ ])) : (d(), c("div", Qn, [
876
+ (d(!0), c(F, null, N(a.value, (v, g) => (d(), c("div", {
848
877
  key: g,
849
878
  class: "fd-st-card"
850
879
  }, [
851
- (d(!0), c(T, null, N(o.value, ($) => (d(), c("div", {
880
+ (d(!0), c(F, null, N(o.value, ($) => (d(), c("div", {
852
881
  key: $.name,
853
882
  class: "fd-st-card-row"
854
883
  }, [
855
- t("span", Gn, y($.showname || $.major || $.name), 1),
884
+ t("span", Xn, k($.showname || $.major || $.name), 1),
856
885
  t("span", {
857
886
  class: "fd-st-card-value",
858
887
  "subtable-val": $.name
859
888
  }, [
860
- v($, m) ? (d(), c("a", {
889
+ p($, v) ? (d(), c("a", {
861
890
  key: 0,
862
891
  class: "fd-st-link",
863
- href: v($, m),
892
+ href: p($, v),
864
893
  target: "_blank",
865
894
  rel: "noopener noreferrer"
866
- }, y(f(m, $.name)), 9, Kn)) : (d(), c(T, { key: 1 }, [
867
- U(y(f(m, $.name)), 1)
895
+ }, k(m(v, $.name)), 9, eo)) : (d(), c(F, { key: 1 }, [
896
+ U(k(m(v, $.name)), 1)
868
897
  ], 64))
869
- ], 8, Yn)
898
+ ], 8, Zn)
870
899
  ]))), 128)),
871
- s.value ? I("", !0) : (d(), c("div", Qn, [
900
+ s.value ? T("", !0) : (d(), c("div", to, [
872
901
  t("button", {
873
902
  class: "fd-btn fd-btn--danger fd-btn--sm",
874
903
  onClick: ($) => l(g)
875
- }, "删除", 8, Xn)
904
+ }, "删除", 8, no)
876
905
  ]))
877
906
  ]))), 128)),
878
- a.value.length === 0 ? (d(), c("div", Zn, y(e.node.nodatatitle === "1" ? "暂无数据" : ""), 1)) : I("", !0)
907
+ a.value.length === 0 ? (d(), c("div", oo, k(e.node.nodatatitle === "1" ? "暂无数据" : ""), 1)) : T("", !0)
879
908
  ])),
880
- s.value ? I("", !0) : (d(), c("button", {
909
+ s.value ? T("", !0) : (d(), c("button", {
881
910
  key: 2,
882
911
  class: "fd-btn fd-btn--primary fd-st-add",
883
912
  onClick: r
884
913
  }, "新增一行"))
885
- ], 8, En)) : I("", !0);
914
+ ], 8, Bn)) : T("", !0);
886
915
  }
887
- }), to = /* @__PURE__ */ E(eo, [["__scopeId", "data-v-a650847e"]]);
888
- function no(e) {
916
+ }), lo = /* @__PURE__ */ P(so, [["__scopeId", "data-v-684725d9"]]);
917
+ function ao(e) {
889
918
  return e.fields.map((n, o) => {
890
919
  const s = n.dataType === "file", a = n.dataType === "link";
891
920
  return {
@@ -909,13 +938,13 @@ function no(e) {
909
938
  };
910
939
  });
911
940
  }
912
- const oo = { class: "fd-panel" }, so = { class: "fd-panel-item" }, lo = { class: "fd-panel-item fd-panel-item--row" }, ao = { class: "fd-panel-item fd-panel-item--row" }, io = { class: "fd-panel-item" }, ro = { class: "fd-panel-item" }, uo = { class: "fd-cols-head" }, co = {
941
+ const io = { class: "fd-panel" }, ro = { class: "fd-panel-item" }, uo = { class: "fd-panel-item fd-panel-item--row" }, co = { class: "fd-panel-item fd-panel-item--row" }, fo = { class: "fd-panel-item" }, mo = { class: "fd-panel-item" }, po = { class: "fd-cols-head" }, vo = {
913
942
  key: 0,
914
943
  class: "fd-cols-empty"
915
- }, fo = { class: "fd-col-card-top" }, mo = { class: "fd-col-order" }, po = { class: "fd-col-meta" }, vo = { class: "fd-col-title" }, bo = { class: "fd-col-name-sub" }, go = { class: "fd-col-tag" }, ho = { class: "fd-col-card-bottom" }, yo = { class: "fd-col-switch" }, ko = { class: "fd-col-actions" }, wo = ["onClick"], $o = ["onClick"], xo = {
944
+ }, bo = { class: "fd-col-card-top" }, go = { class: "fd-col-order" }, ho = { class: "fd-col-meta" }, yo = { class: "fd-col-title" }, ko = { class: "fd-col-name-sub" }, wo = { class: "fd-col-tag" }, $o = { class: "fd-col-card-bottom" }, xo = { class: "fd-col-switch" }, Co = { class: "fd-col-actions" }, _o = ["onClick"], Io = ["onClick"], Do = {
916
945
  class: "fd-dialog",
917
946
  style: { "max-width": "560px" }
918
- }, Co = { class: "fd-dialog-head" }, _o = { class: "fd-dialog-body" }, Io = { class: "fd-form-section" }, Do = { class: "fd-form-grid" }, So = { class: "fd-form-item" }, To = ["value"], Fo = ["value"], Lo = { class: "fd-form-item" }, Mo = ["value"], No = { class: "fd-form-item" }, Eo = ["value"], Po = { class: "fd-form-item" }, Oo = ["value"], Uo = { class: "fd-form-section" }, Bo = { class: "fd-form-grid" }, Vo = { class: "fd-form-item" }, jo = ["value"], Ro = { class: "fd-form-item" }, Ao = ["value"], zo = { class: "fd-form-item" }, Jo = { class: "fd-color-row" }, Wo = ["value"], Ho = ["value"], qo = { class: "fd-form-item" }, Go = { class: "fd-color-row" }, Yo = ["value"], Ko = ["value"], Qo = { class: "fd-form-section" }, Xo = { class: "fd-form-grid" }, Zo = { class: "fd-form-item" }, es = { class: "fd-form-item" }, ts = ["value"], ns = /* @__PURE__ */ L({
947
+ }, So = { class: "fd-dialog-head" }, To = { class: "fd-dialog-body" }, Fo = { class: "fd-form-section" }, Lo = { class: "fd-form-grid" }, Mo = { class: "fd-form-item" }, No = ["value"], Eo = ["value"], Po = { class: "fd-form-item" }, Oo = ["value"], Uo = { class: "fd-form-item" }, Bo = ["value"], Vo = { class: "fd-form-item" }, Ao = ["value"], jo = { class: "fd-form-section" }, Ro = { class: "fd-form-grid" }, Jo = { class: "fd-form-item" }, zo = ["value"], Wo = { class: "fd-form-item" }, Ho = ["value"], qo = { class: "fd-form-item" }, Go = { class: "fd-color-row" }, Yo = ["value"], Ko = ["value"], Qo = { class: "fd-form-item" }, Xo = { class: "fd-color-row" }, Zo = ["value"], es = ["value"], ts = { class: "fd-form-section" }, ns = { class: "fd-form-grid" }, os = { class: "fd-form-item" }, ss = { class: "fd-form-item" }, ls = ["value"], as = /* @__PURE__ */ E({
919
948
  __name: "SubtablePanel",
920
949
  props: {
921
950
  node: {},
@@ -923,37 +952,37 @@ const oo = { class: "fd-panel" }, so = { class: "fd-panel-item" }, lo = { class:
923
952
  },
924
953
  emits: ["update"],
925
954
  setup(e, { emit: n }) {
926
- const o = e, s = n, a = W(), i = M(() => a.subTables);
927
- function u(x, p) {
928
- s("update", { [x]: p });
955
+ const o = e, s = n, a = G(), i = M(() => a.subTables);
956
+ function u(x, b) {
957
+ s("update", { [x]: b });
929
958
  }
930
959
  function r(x) {
931
- const p = x ?? "", w = a.subTables.find((b) => b.name === p), C = { secondtable: p };
932
- w && (C.displaytitle = w.label, C.colnums = no(w)), s("update", C);
960
+ const b = x ?? "", w = a.subTables.find((se) => se.name === b), W = { secondtable: b };
961
+ w && (W.displaytitle = w.label, W.colnums = ao(w)), s("update", W);
933
962
  }
934
- const l = Ie({
963
+ const l = Pe({
935
964
  open: !1,
936
965
  index: -1,
937
966
  draft: null
938
967
  });
939
- function f(x) {
968
+ function m(x) {
940
969
  return JSON.parse(JSON.stringify(x));
941
970
  }
942
- function v(x) {
943
- l.index = x, l.draft = f(o.node.colnums[x]), l.open = !0;
971
+ function p(x) {
972
+ l.index = x, l.draft = m(o.node.colnums[x]), l.open = !0;
944
973
  }
945
- function k() {
974
+ function y() {
946
975
  l.open = !1, l.draft = null, l.index = -1;
947
976
  }
948
- function P() {
977
+ function C() {
949
978
  if (l.draft && l.index >= 0) {
950
979
  const x = [...o.node.colnums];
951
980
  x[l.index] = l.draft, s("update", { colnums: x });
952
981
  }
953
- k();
982
+ y();
954
983
  }
955
- function j(x, p) {
956
- x.isshow = p ? 1 : 0, s("update", { colnums: [...o.node.colnums] });
984
+ function B(x, b) {
985
+ x.isshow = b ? 1 : 0, s("update", { colnums: [...o.node.colnums] });
957
986
  }
958
987
  async function _() {
959
988
  const x = {
@@ -974,41 +1003,41 @@ const oo = { class: "fd-panel" }, so = { class: "fd-panel-item" }, lo = { class:
974
1003
  editmode: { editmode: "text", title: "文本" },
975
1004
  events: []
976
1005
  };
977
- s("update", { colnums: [...o.node.colnums, x] }), await De(), v(o.node.colnums.length - 1);
1006
+ s("update", { colnums: [...o.node.colnums, x] }), await Oe(), p(o.node.colnums.length - 1);
978
1007
  }
979
- function D(x) {
980
- const p = o.node.colnums.slice();
981
- p.splice(x, 1), s("update", { colnums: p });
1008
+ function S(x) {
1009
+ const b = o.node.colnums.slice();
1010
+ b.splice(x, 1), s("update", { colnums: b });
982
1011
  }
983
- function m(x) {
1012
+ function v(x) {
984
1013
  return /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(x) ? x : "#ffffff";
985
1014
  }
986
- function g(x, p) {
987
- l.draft && (l.draft[x] = p.target.value);
1015
+ function g(x, b) {
1016
+ l.draft && (l.draft[x] = b.target.value);
988
1017
  }
989
1018
  const $ = M(() => {
990
1019
  var x;
991
- return ((x = a.subTables.find((p) => p.name === o.node.secondtable)) == null ? void 0 : x.fields) ?? [];
1020
+ return ((x = a.subTables.find((b) => b.name === o.node.secondtable)) == null ? void 0 : x.fields) ?? [];
992
1021
  });
993
- function B(x) {
1022
+ function A(x) {
994
1023
  if (!l.draft) return;
995
- const p = x.target.value;
996
- l.draft.name = p;
997
- const w = $.value.find((C) => C.name === p);
1024
+ const b = x.target.value;
1025
+ l.draft.name = b;
1026
+ const w = $.value.find((W) => W.name === b);
998
1027
  if (w) {
999
1028
  l.draft.showname = w.label;
1000
- const C = w.dataType === "file";
1001
- l.draft.editmode.editmode = C ? "files" : "text", l.draft.editmode.title = C ? "文件" : "文本", l.draft.bindLink = w.dataType === "link" ? p : "";
1029
+ const W = w.dataType === "file";
1030
+ l.draft.editmode.editmode = W ? "files" : "text", l.draft.editmode.title = W ? "文件" : "文本", l.draft.bindLink = w.dataType === "link" ? b : "";
1002
1031
  }
1003
1032
  }
1004
- function q(x) {
1033
+ function Y(x) {
1005
1034
  u("tablestyle", x || "table");
1006
1035
  }
1007
- return (x, p) => (d(), c(T, null, [
1008
- t("div", oo, [
1009
- t("div", so, [
1010
- p[13] || (p[13] = t("label", null, "选择子表", -1)),
1011
- F(h(re), {
1036
+ return (x, b) => (d(), c(F, null, [
1037
+ t("div", io, [
1038
+ t("div", ro, [
1039
+ b[13] || (b[13] = t("label", null, "选择子表", -1)),
1040
+ L(h(ue), {
1012
1041
  "model-value": e.node.secondtable,
1013
1042
  filterable: "",
1014
1043
  clearable: "",
@@ -1016,8 +1045,8 @@ const oo = { class: "fd-panel" }, so = { class: "fd-panel-item" }, lo = { class:
1016
1045
  style: { width: "100%" },
1017
1046
  "onUpdate:modelValue": r
1018
1047
  }, {
1019
- default: A(() => [
1020
- (d(!0), c(T, null, N(i.value, (w) => (d(), V(h(oe), {
1048
+ default: j(() => [
1049
+ (d(!0), c(F, null, N(i.value, (w) => (d(), V(h(ee), {
1021
1050
  key: w.name,
1022
1051
  label: `${w.label}(${w.name})`,
1023
1052
  value: w.name
@@ -1026,33 +1055,33 @@ const oo = { class: "fd-panel" }, so = { class: "fd-panel-item" }, lo = { class:
1026
1055
  _: 1
1027
1056
  }, 8, ["model-value"])
1028
1057
  ]),
1029
- t("div", lo, [
1030
- p[14] || (p[14] = t("label", null, "只读", -1)),
1031
- F(se, {
1058
+ t("div", uo, [
1059
+ b[14] || (b[14] = t("label", null, "只读", -1)),
1060
+ L(ie, {
1032
1061
  "model-value": e.node.isreadonly === "1",
1033
- "onUpdate:modelValue": p[0] || (p[0] = (w) => u("isreadonly", w ? "1" : "0"))
1062
+ "onUpdate:modelValue": b[0] || (b[0] = (w) => u("isreadonly", w ? "1" : "0"))
1034
1063
  }, null, 8, ["model-value"])
1035
1064
  ]),
1036
- t("div", ao, [
1037
- p[15] || (p[15] = t("label", null, "序号列", -1)),
1038
- F(se, {
1065
+ t("div", co, [
1066
+ b[15] || (b[15] = t("label", null, "序号列", -1)),
1067
+ L(ie, {
1039
1068
  "model-value": e.node.secondtableindex === "1",
1040
- "onUpdate:modelValue": p[1] || (p[1] = (w) => u("secondtableindex", w ? "1" : "0"))
1069
+ "onUpdate:modelValue": b[1] || (b[1] = (w) => u("secondtableindex", w ? "1" : "0"))
1041
1070
  }, null, 8, ["model-value"])
1042
1071
  ]),
1043
- t("div", io, [
1044
- p[16] || (p[16] = t("label", null, "表格样式", -1)),
1045
- F(h(re), {
1072
+ t("div", fo, [
1073
+ b[16] || (b[16] = t("label", null, "表格样式", -1)),
1074
+ L(h(ue), {
1046
1075
  "model-value": e.node.tablestyle || "table",
1047
1076
  style: { width: "100%" },
1048
- "onUpdate:modelValue": q
1077
+ "onUpdate:modelValue": Y
1049
1078
  }, {
1050
- default: A(() => [
1051
- F(h(oe), {
1079
+ default: j(() => [
1080
+ L(h(ee), {
1052
1081
  label: "表格",
1053
1082
  value: "table"
1054
1083
  }),
1055
- F(h(oe), {
1084
+ L(h(ee), {
1056
1085
  label: "卡片列表",
1057
1086
  value: "cards"
1058
1087
  })
@@ -1060,179 +1089,179 @@ const oo = { class: "fd-panel" }, so = { class: "fd-panel-item" }, lo = { class:
1060
1089
  _: 1
1061
1090
  }, 8, ["model-value"])
1062
1091
  ]),
1063
- t("div", ro, [
1064
- t("div", uo, [
1065
- t("span", null, "列配置(" + y(e.node.colnums.length) + ")", 1),
1092
+ t("div", mo, [
1093
+ t("div", po, [
1094
+ t("span", null, "列配置(" + k(e.node.colnums.length) + ")", 1),
1066
1095
  t("button", {
1067
1096
  class: "fd-btn fd-btn--primary fd-btn--sm",
1068
1097
  onClick: _
1069
1098
  }, "+ 新增列")
1070
1099
  ]),
1071
- e.node.colnums.length === 0 ? (d(), c("div", co, " 暂无列,点击「新增列」添加 ")) : I("", !0),
1072
- (d(!0), c(T, null, N(e.node.colnums, (w, C) => (d(), c("div", {
1100
+ e.node.colnums.length === 0 ? (d(), c("div", vo, " 暂无列,点击「新增列」添加 ")) : T("", !0),
1101
+ (d(!0), c(F, null, N(e.node.colnums, (w, W) => (d(), c("div", {
1073
1102
  key: w.name,
1074
1103
  class: "fd-col-card"
1075
1104
  }, [
1076
- t("div", fo, [
1077
- t("span", mo, y(C + 1), 1),
1078
- t("div", po, [
1079
- t("span", vo, y(w.showname || "未命名列"), 1),
1080
- t("span", bo, y(w.name), 1)
1105
+ t("div", bo, [
1106
+ t("span", go, k(W + 1), 1),
1107
+ t("div", ho, [
1108
+ t("span", yo, k(w.showname || "未命名列"), 1),
1109
+ t("span", ko, k(w.name), 1)
1081
1110
  ]),
1082
- t("span", go, y(w.bindLink ? "链接" : "文本"), 1)
1111
+ t("span", wo, k(w.bindLink ? "链接" : "文本"), 1)
1083
1112
  ]),
1084
- t("div", ho, [
1085
- t("label", yo, [
1086
- p[17] || (p[17] = t("span", null, "显示", -1)),
1087
- F(se, {
1113
+ t("div", $o, [
1114
+ t("label", xo, [
1115
+ b[17] || (b[17] = t("span", null, "显示", -1)),
1116
+ L(ie, {
1088
1117
  "model-value": w.isshow === 1,
1089
- "onUpdate:modelValue": (b) => j(w, b)
1118
+ "onUpdate:modelValue": (se) => B(w, se)
1090
1119
  }, null, 8, ["model-value", "onUpdate:modelValue"])
1091
1120
  ]),
1092
- t("div", ko, [
1121
+ t("div", Co, [
1093
1122
  t("button", {
1094
1123
  class: "fd-btn fd-btn--ghost fd-btn--sm",
1095
- onClick: (b) => v(C)
1096
- }, "设置", 8, wo),
1124
+ onClick: (se) => p(W)
1125
+ }, "设置", 8, _o),
1097
1126
  t("button", {
1098
1127
  class: "fd-btn fd-btn--danger fd-btn--sm",
1099
- onClick: (b) => D(C)
1100
- }, "删除", 8, $o)
1128
+ onClick: (se) => S(W)
1129
+ }, "删除", 8, Io)
1101
1130
  ])
1102
1131
  ])
1103
1132
  ]))), 128))
1104
1133
  ])
1105
1134
  ]),
1106
- (d(), V(pe, { to: "body" }, [
1135
+ (d(), V(ke, { to: "body" }, [
1107
1136
  l.open && l.draft ? (d(), c("div", {
1108
1137
  key: 0,
1109
1138
  class: "fd-dialog-mask",
1110
- onClick: J(k, ["self"])
1139
+ onClick: q(y, ["self"])
1111
1140
  }, [
1112
- t("div", xo, [
1113
- t("div", Co, [
1114
- t("span", null, "列设置 · " + y(l.draft.showname || l.draft.name || "新列"), 1),
1141
+ t("div", Do, [
1142
+ t("div", So, [
1143
+ t("span", null, "列设置 · " + k(l.draft.showname || l.draft.name || "新列"), 1),
1115
1144
  t("button", {
1116
1145
  class: "fd-dialog-close",
1117
- onClick: k,
1146
+ onClick: y,
1118
1147
  title: "关闭"
1119
1148
  }, "×")
1120
1149
  ]),
1121
- t("div", _o, [
1122
- t("section", Io, [
1123
- p[23] || (p[23] = t("h5", { class: "fd-form-section-h" }, "基本信息", -1)),
1124
- t("div", Do, [
1125
- t("div", So, [
1126
- p[19] || (p[19] = t("label", null, "列字段", -1)),
1150
+ t("div", To, [
1151
+ t("section", Fo, [
1152
+ b[23] || (b[23] = t("h5", { class: "fd-form-section-h" }, "基本信息", -1)),
1153
+ t("div", Lo, [
1154
+ t("div", Mo, [
1155
+ b[19] || (b[19] = t("label", null, "列字段", -1)),
1127
1156
  t("select", {
1128
1157
  value: l.draft.name,
1129
- onChange: p[2] || (p[2] = (w) => B(w))
1158
+ onChange: b[2] || (b[2] = (w) => A(w))
1130
1159
  }, [
1131
- p[18] || (p[18] = t("option", { value: "" }, "请选择字段", -1)),
1132
- (d(!0), c(T, null, N($.value, (w) => (d(), c("option", {
1160
+ b[18] || (b[18] = t("option", { value: "" }, "请选择字段", -1)),
1161
+ (d(!0), c(F, null, N($.value, (w) => (d(), c("option", {
1133
1162
  key: w.name,
1134
1163
  value: w.name
1135
- }, y(w.label) + "(" + y(w.name) + ")", 9, Fo))), 128))
1136
- ], 40, To)
1164
+ }, k(w.label) + "(" + k(w.name) + ")", 9, Eo))), 128))
1165
+ ], 40, No)
1137
1166
  ]),
1138
- t("div", Lo, [
1139
- p[20] || (p[20] = t("label", null, "显示标题", -1)),
1167
+ t("div", Po, [
1168
+ b[20] || (b[20] = t("label", null, "显示标题", -1)),
1140
1169
  t("input", {
1141
1170
  value: l.draft.showname,
1142
- onInput: p[3] || (p[3] = (w) => l.draft.showname = w.target.value),
1171
+ onInput: b[3] || (b[3] = (w) => l.draft.showname = w.target.value),
1143
1172
  placeholder: "如 姓名"
1144
- }, null, 40, Mo)
1173
+ }, null, 40, Oo)
1145
1174
  ]),
1146
- t("div", No, [
1147
- p[21] || (p[21] = t("label", null, "主表头分组", -1)),
1175
+ t("div", Uo, [
1176
+ b[21] || (b[21] = t("label", null, "主表头分组", -1)),
1148
1177
  t("input", {
1149
1178
  value: l.draft.major,
1150
- onInput: p[4] || (p[4] = (w) => l.draft.major = w.target.value),
1179
+ onInput: b[4] || (b[4] = (w) => l.draft.major = w.target.value),
1151
1180
  placeholder: "可合并表头分组名"
1152
- }, null, 40, Eo)
1181
+ }, null, 40, Bo)
1153
1182
  ]),
1154
- t("div", Po, [
1155
- p[22] || (p[22] = t("label", null, "列序号", -1)),
1183
+ t("div", Vo, [
1184
+ b[22] || (b[22] = t("label", null, "列序号", -1)),
1156
1185
  t("input", {
1157
1186
  type: "number",
1158
1187
  min: "1",
1159
1188
  value: l.draft.index,
1160
- onInput: p[5] || (p[5] = (w) => l.draft.index = Number(w.target.value))
1161
- }, null, 40, Oo)
1189
+ onInput: b[5] || (b[5] = (w) => l.draft.index = Number(w.target.value))
1190
+ }, null, 40, Ao)
1162
1191
  ])
1163
1192
  ])
1164
1193
  ]),
1165
- t("section", Uo, [
1166
- p[29] || (p[29] = t("h5", { class: "fd-form-section-h" }, "显示与样式", -1)),
1167
- t("div", Bo, [
1168
- t("div", Vo, [
1169
- p[24] || (p[24] = t("label", null, "列宽", -1)),
1194
+ t("section", jo, [
1195
+ b[29] || (b[29] = t("h5", { class: "fd-form-section-h" }, "显示与样式", -1)),
1196
+ t("div", Ro, [
1197
+ t("div", Jo, [
1198
+ b[24] || (b[24] = t("label", null, "列宽", -1)),
1170
1199
  t("input", {
1171
1200
  value: l.draft.showwidth,
1172
- onInput: p[6] || (p[6] = (w) => l.draft.showwidth = w.target.value),
1201
+ onInput: b[6] || (b[6] = (w) => l.draft.showwidth = w.target.value),
1173
1202
  placeholder: "如 120px 或 20%"
1174
- }, null, 40, jo)
1203
+ }, null, 40, zo)
1175
1204
  ]),
1176
- t("div", Ro, [
1177
- p[26] || (p[26] = t("label", null, "对齐方式", -1)),
1205
+ t("div", Wo, [
1206
+ b[26] || (b[26] = t("label", null, "对齐方式", -1)),
1178
1207
  t("select", {
1179
1208
  value: l.draft.align,
1180
- onChange: p[7] || (p[7] = (w) => l.draft.align = w.target.value)
1181
- }, [...p[25] || (p[25] = [
1209
+ onChange: b[7] || (b[7] = (w) => l.draft.align = w.target.value)
1210
+ }, [...b[25] || (b[25] = [
1182
1211
  t("option", { value: "" }, "默认(左)", -1),
1183
1212
  t("option", { value: "left" }, "左对齐", -1),
1184
1213
  t("option", { value: "center" }, "居中", -1),
1185
1214
  t("option", { value: "right" }, "右对齐", -1)
1186
- ])], 40, Ao)
1215
+ ])], 40, Ho)
1187
1216
  ]),
1188
- t("div", zo, [
1189
- p[27] || (p[27] = t("label", null, "背景色", -1)),
1190
- t("div", Jo, [
1217
+ t("div", qo, [
1218
+ b[27] || (b[27] = t("label", null, "背景色", -1)),
1219
+ t("div", Go, [
1191
1220
  t("input", {
1192
1221
  type: "color",
1193
- value: m(l.draft.background),
1194
- onInput: p[8] || (p[8] = (w) => g("background", w))
1195
- }, null, 40, Wo),
1222
+ value: v(l.draft.background),
1223
+ onInput: b[8] || (b[8] = (w) => g("background", w))
1224
+ }, null, 40, Yo),
1196
1225
  t("input", {
1197
1226
  value: l.draft.background,
1198
- onInput: p[9] || (p[9] = (w) => l.draft.background = w.target.value),
1227
+ onInput: b[9] || (b[9] = (w) => l.draft.background = w.target.value),
1199
1228
  placeholder: "如 #f5f7fa 或空"
1200
- }, null, 40, Ho)
1229
+ }, null, 40, Ko)
1201
1230
  ])
1202
1231
  ]),
1203
- t("div", qo, [
1204
- p[28] || (p[28] = t("label", null, "字体色", -1)),
1205
- t("div", Go, [
1232
+ t("div", Qo, [
1233
+ b[28] || (b[28] = t("label", null, "字体色", -1)),
1234
+ t("div", Xo, [
1206
1235
  t("input", {
1207
1236
  type: "color",
1208
- value: m(l.draft.prospect),
1209
- onInput: p[10] || (p[10] = (w) => g("prospect", w))
1210
- }, null, 40, Yo),
1237
+ value: v(l.draft.prospect),
1238
+ onInput: b[10] || (b[10] = (w) => g("prospect", w))
1239
+ }, null, 40, Zo),
1211
1240
  t("input", {
1212
1241
  value: l.draft.prospect,
1213
- onInput: p[11] || (p[11] = (w) => l.draft.prospect = w.target.value),
1242
+ onInput: b[11] || (b[11] = (w) => l.draft.prospect = w.target.value),
1214
1243
  placeholder: "如 #f5523a 或空"
1215
- }, null, 40, Ko)
1244
+ }, null, 40, es)
1216
1245
  ])
1217
1246
  ])
1218
1247
  ])
1219
1248
  ]),
1220
- t("section", Qo, [
1221
- p[32] || (p[32] = t("h5", { class: "fd-form-section-h" }, "编辑模式", -1)),
1222
- t("div", Xo, [
1223
- t("div", Zo, [
1224
- p[30] || (p[30] = t("label", null, "同内容合并", -1)),
1225
- F(se, {
1249
+ t("section", ts, [
1250
+ b[32] || (b[32] = t("h5", { class: "fd-form-section-h" }, "编辑模式", -1)),
1251
+ t("div", ns, [
1252
+ t("div", os, [
1253
+ b[30] || (b[30] = t("label", null, "同内容合并", -1)),
1254
+ L(ie, {
1226
1255
  "model-value": l.draft.issamecolmerge === 1,
1227
- "onUpdate:modelValue": p[12] || (p[12] = (w) => l.draft.issamecolmerge = w ? 1 : 0)
1256
+ "onUpdate:modelValue": b[12] || (b[12] = (w) => l.draft.issamecolmerge = w ? 1 : 0)
1228
1257
  }, null, 8, ["model-value"])
1229
1258
  ]),
1230
- t("div", es, [
1231
- p[31] || (p[31] = t("label", null, "链接", -1)),
1259
+ t("div", ss, [
1260
+ b[31] || (b[31] = t("label", null, "链接", -1)),
1232
1261
  t("input", {
1233
1262
  value: l.draft.bindLink ? `${l.draft.bindLink}(链接字段自动绑定)` : "非链接字段",
1234
1263
  readonly: ""
1235
- }, null, 8, ts)
1264
+ }, null, 8, ls)
1236
1265
  ])
1237
1266
  ])
1238
1267
  ])
@@ -1240,20 +1269,20 @@ const oo = { class: "fd-panel" }, so = { class: "fd-panel-item" }, lo = { class:
1240
1269
  t("div", { class: "fd-dialog-foot" }, [
1241
1270
  t("button", {
1242
1271
  class: "fd-btn fd-btn--ghost",
1243
- onClick: k
1272
+ onClick: y
1244
1273
  }, "取消"),
1245
1274
  t("button", {
1246
1275
  class: "fd-btn fd-btn--primary",
1247
- onClick: P
1276
+ onClick: C
1248
1277
  }, "确定")
1249
1278
  ])
1250
1279
  ])
1251
- ])) : I("", !0)
1280
+ ])) : T("", !0)
1252
1281
  ]))
1253
1282
  ], 64));
1254
1283
  }
1255
- }), os = /* @__PURE__ */ E(ns, [["__scopeId", "data-v-e1fd519d"]]);
1256
- function ss() {
1284
+ }), is = /* @__PURE__ */ P(as, [["__scopeId", "data-v-e1fd519d"]]);
1285
+ function ds() {
1257
1286
  return [
1258
1287
  {
1259
1288
  name: "field1",
@@ -1293,12 +1322,12 @@ function ss() {
1293
1322
  }
1294
1323
  ];
1295
1324
  }
1296
- const ls = {
1325
+ const rs = {
1297
1326
  type: "subtable",
1298
1327
  title: "子表",
1299
- design: Nn,
1300
- render: to,
1301
- panel: os,
1328
+ design: Un,
1329
+ render: lo,
1330
+ panel: is,
1302
1331
  isContainer: !1,
1303
1332
  createDefaultProps: () => ({
1304
1333
  id: "",
@@ -1324,24 +1353,24 @@ const ls = {
1324
1353
  tableheight: 0,
1325
1354
  iscompletehide: "0",
1326
1355
  iscompletehidecode: "",
1327
- colnums: ss(),
1356
+ colnums: ds(),
1328
1357
  events: []
1329
1358
  }),
1330
1359
  serialize: (e) => e
1331
- }, as = /* @__PURE__ */ L({
1360
+ }, us = /* @__PURE__ */ E({
1332
1361
  __name: "GridDesign",
1333
1362
  props: {
1334
1363
  node: {}
1335
1364
  },
1336
1365
  setup(e) {
1337
- const n = W();
1366
+ const n = G();
1338
1367
  return (o, s) => (d(), c("div", {
1339
1368
  class: R(["fd-grid-design", { "is-mobile": h(n).device === "mobile" }])
1340
1369
  }, [
1341
- Q(o.$slots, "children", {}, void 0, !0)
1370
+ te(o.$slots, "children", {}, void 0, !0)
1342
1371
  ], 2));
1343
1372
  }
1344
- }), is = /* @__PURE__ */ E(as, [["__scopeId", "data-v-25511a77"]]), ge = /* @__PURE__ */ L({
1373
+ }), cs = /* @__PURE__ */ P(us, [["__scopeId", "data-v-b4d1e09d"]]), xe = /* @__PURE__ */ E({
1345
1374
  __name: "WidgetHost",
1346
1375
  props: {
1347
1376
  node: {},
@@ -1351,65 +1380,65 @@ const ls = {
1351
1380
  formId: {}
1352
1381
  },
1353
1382
  setup(e) {
1354
- const n = e, o = M(() => K(n.node.type)), s = M(() => o.value ? n.mode === "design" ? o.value.design : o.value.render : null), a = (i) => i && n.formData ? n.formData[i] : void 0;
1383
+ const n = e, o = M(() => X(n.node.type)), s = M(() => o.value ? n.mode === "design" ? o.value.design : o.value.render : null), a = (i) => i && n.formData ? n.formData[i] : void 0;
1355
1384
  return (i, u) => {
1356
1385
  var l;
1357
- const r = Se("WidgetHost", !0);
1358
- return s.value ? (d(), V(me(s.value), de({
1386
+ const r = Ue("WidgetHost", !0);
1387
+ return s.value ? (d(), V(he(s.value), ve({
1359
1388
  key: 0,
1360
1389
  node: e.node,
1361
1390
  value: a(e.node.bindField),
1362
1391
  "form-data": e.formData
1363
- }, e.mode === "render" ? { formMode: e.formMode, formId: e.formId } : null), ae({ _: 2 }, [
1364
- N(i.$slots, (f, v) => ({
1365
- name: v,
1366
- fn: A((k) => [
1367
- Q(i.$slots, v, Ue(Be(k || {})))
1392
+ }, e.mode === "render" ? { formMode: e.formMode, formId: e.formId } : null), re({ _: 2 }, [
1393
+ N(i.$slots, (m, p) => ({
1394
+ name: p,
1395
+ fn: j((y) => [
1396
+ te(i.$slots, p, He(qe(y || {})))
1368
1397
  ])
1369
1398
  })),
1370
1399
  (l = o.value) != null && l.isContainer && !i.$slots.children ? {
1371
1400
  name: "children",
1372
- fn: A(() => [
1373
- (d(!0), c(T, null, N(e.node.children, (f) => (d(), V(r, {
1374
- key: f.id,
1375
- node: f,
1401
+ fn: j(() => [
1402
+ (d(!0), c(F, null, N(e.node.children, (m) => (d(), V(r, {
1403
+ key: m.id,
1404
+ node: m,
1376
1405
  mode: e.mode,
1377
1406
  "form-mode": e.formMode,
1378
1407
  "form-data": e.formData,
1379
1408
  "form-id": e.formId
1380
- }, ae({ _: 2 }, [
1381
- N(i.$slots, (v, k) => ({
1382
- name: k,
1383
- fn: A((P) => [
1384
- Q(i.$slots, k, de({ ref_for: !0 }, P || {}))
1409
+ }, re({ _: 2 }, [
1410
+ N(i.$slots, (p, y) => ({
1411
+ name: y,
1412
+ fn: j((C) => [
1413
+ te(i.$slots, y, ve({ ref_for: !0 }, C || {}))
1385
1414
  ])
1386
1415
  }))
1387
1416
  ]), 1032, ["node", "mode", "form-mode", "form-data", "form-id"]))), 128))
1388
1417
  ]),
1389
1418
  key: "0"
1390
1419
  } : void 0
1391
- ]), 1040, ["node", "value", "form-data"])) : I("", !0);
1420
+ ]), 1040, ["node", "value", "form-data"])) : T("", !0);
1392
1421
  };
1393
1422
  }
1394
- }), ds = 24;
1395
- function Fe(e, n, o, s, a = !1) {
1423
+ }), fs = 24;
1424
+ function Ve(e, n, o, s, a = !1) {
1396
1425
  if (e.type !== "label" || !o.length) return "";
1397
- const i = a ? 1 : ds, u = (D) => Math.min(Math.max(D.gridSpan || s || i, 1), i), r = [];
1398
- let l = 0, f = 0;
1399
- for (const D of o) {
1400
- const m = u(D);
1401
- l + m > i && (l = 0, f++);
1426
+ const i = a ? 1 : fs, u = (S) => Math.min(Math.max(S.gridSpan || s || i, 1), i), r = [];
1427
+ let l = 0, m = 0;
1428
+ for (const S of o) {
1429
+ const v = u(S);
1430
+ l + v > i && (l = 0, m++);
1402
1431
  const g = l === 0;
1403
- l += m;
1432
+ l += v;
1404
1433
  const $ = l >= i;
1405
- r.push({ row: f, rowFirst: g, rowLast: $ }), l >= i && (l = 0, f++);
1434
+ r.push({ row: m, rowFirst: g, rowLast: $ }), l >= i && (l = 0, m++);
1406
1435
  }
1407
- const v = r[n];
1408
- if (!v) return "";
1409
- const k = r[r.length - 1].row, P = v.row === 0, j = v.row === k, _ = [];
1410
- return v.rowFirst && P && _.push("is-g-corner-tl"), v.rowLast && P && _.push("is-g-corner-tr"), v.rowFirst && j && _.push("is-g-corner-bl"), v.rowLast && j && _.push("is-g-corner-br"), _.join(" ");
1436
+ const p = r[n];
1437
+ if (!p) return "";
1438
+ const y = r[r.length - 1].row, C = p.row === 0, B = p.row === y, _ = [];
1439
+ return p.rowFirst && C && _.push("is-g-corner-tl"), p.rowLast && C && _.push("is-g-corner-tr"), p.rowFirst && B && _.push("is-g-corner-bl"), p.rowLast && B && _.push("is-g-corner-br"), _.join(" ");
1411
1440
  }
1412
- const rs = /* @__PURE__ */ L({
1441
+ const ms = /* @__PURE__ */ E({
1413
1442
  __name: "GridRender",
1414
1443
  props: {
1415
1444
  node: {},
@@ -1418,13 +1447,13 @@ const rs = /* @__PURE__ */ L({
1418
1447
  formId: {}
1419
1448
  },
1420
1449
  setup(e) {
1421
- const n = W(), o = O(!1);
1450
+ const n = G(), o = O(!1);
1422
1451
  let s = null;
1423
- ie(() => {
1452
+ ce(() => {
1424
1453
  s = window.matchMedia("(max-width: 768px)"), o.value = s.matches, s.addEventListener("change", (i) => {
1425
1454
  o.value = i.matches;
1426
1455
  });
1427
- }), Ce(() => {
1456
+ }), Ee(() => {
1428
1457
  s && s.removeEventListener("change", () => {
1429
1458
  });
1430
1459
  });
@@ -1432,29 +1461,29 @@ const rs = /* @__PURE__ */ L({
1432
1461
  return (i, u) => (d(), c("div", {
1433
1462
  class: R(["fd-grid-render", { "is-mobile": a.value }])
1434
1463
  }, [
1435
- (d(!0), c(T, null, N(e.node.children, (r, l) => (d(), c("div", {
1464
+ (d(!0), c(F, null, N(e.node.children, (r, l) => (d(), c("div", {
1436
1465
  key: r.id,
1437
- class: R(["fd-grid-cell", h(Fe)(r, l, e.node.children || [], e.node.layout || 24, a.value)]),
1438
- style: G({ gridColumn: `span ${r.gridSpan || e.node.layout}` })
1466
+ class: R(["fd-grid-cell", h(Ve)(r, l, e.node.children || [], e.node.layout || 24, a.value)]),
1467
+ style: K({ gridColumn: `span ${r.gridSpan || e.node.layout}` })
1439
1468
  }, [
1440
- F(ge, {
1469
+ L(xe, {
1441
1470
  node: r,
1442
1471
  mode: "render",
1443
1472
  "form-mode": e.formMode,
1444
1473
  "form-data": e.formData,
1445
1474
  "form-id": e.formId
1446
- }, ae({ _: 2 }, [
1447
- N(i.$slots, (f, v) => ({
1448
- name: v,
1449
- fn: A((k) => [
1450
- Q(i.$slots, v, de({ ref_for: !0 }, k || {}), void 0, !0)
1475
+ }, re({ _: 2 }, [
1476
+ N(i.$slots, (m, p) => ({
1477
+ name: p,
1478
+ fn: j((y) => [
1479
+ te(i.$slots, p, ve({ ref_for: !0 }, y || {}), void 0, !0)
1451
1480
  ])
1452
1481
  }))
1453
1482
  ]), 1032, ["node", "form-mode", "form-data", "form-id"])
1454
1483
  ], 6))), 128))
1455
1484
  ], 2));
1456
1485
  }
1457
- }), us = /* @__PURE__ */ E(rs, [["__scopeId", "data-v-417035f9"]]), cs = { class: "fd-panel" }, fs = { class: "fd-panel-item" }, ms = ["value"], ps = ["value"], vs = { class: "fd-panel-item" }, bs = /* @__PURE__ */ L({
1486
+ }), ps = /* @__PURE__ */ P(ms, [["__scopeId", "data-v-417035f9"]]), vs = { class: "fd-panel" }, bs = { class: "fd-panel-item" }, gs = ["value"], hs = ["value"], ys = { class: "fd-panel-item" }, ks = /* @__PURE__ */ E({
1458
1487
  __name: "GridPanel",
1459
1488
  props: {
1460
1489
  node: {},
@@ -1472,34 +1501,34 @@ const rs = /* @__PURE__ */ L({
1472
1501
  const u = o.node.layout || 24, r = (o.node.children ?? []).map((l) => ({ ...l, gridSpan: u }));
1473
1502
  s("update", { children: r });
1474
1503
  }
1475
- return (u, r) => (d(), c("div", cs, [
1476
- t("div", fs, [
1504
+ return (u, r) => (d(), c("div", vs, [
1505
+ t("div", bs, [
1477
1506
  r[1] || (r[1] = t("label", null, "布局", -1)),
1478
1507
  t("select", {
1479
1508
  value: e.node.layout,
1480
1509
  onChange: r[0] || (r[0] = (l) => s("update", { layout: Number(l.target.value) }))
1481
1510
  }, [
1482
- (d(), c(T, null, N(a, (l) => t("option", {
1511
+ (d(), c(F, null, N(a, (l) => t("option", {
1483
1512
  key: l.value,
1484
1513
  value: l.value
1485
- }, y(l.label), 9, ps)), 64))
1486
- ], 40, ms)
1514
+ }, k(l.label), 9, hs)), 64))
1515
+ ], 40, gs)
1487
1516
  ]),
1488
- t("div", vs, [
1517
+ t("div", ys, [
1489
1518
  r[2] || (r[2] = t("label", null, "一键布局", -1)),
1490
1519
  t("button", {
1491
1520
  class: "fd-btn fd-btn--primary fd-btn--sm fd-grid-apply",
1492
1521
  onClick: i
1493
- }, " 应用到全部子组件(每项占比 " + y(e.node.layout || 24) + "/24) ", 1)
1522
+ }, " 应用到全部子组件(每项占比 " + k(e.node.layout || 24) + "/24) ", 1)
1494
1523
  ])
1495
1524
  ]));
1496
1525
  }
1497
- }), gs = /* @__PURE__ */ E(bs, [["__scopeId", "data-v-a333d2ea"]]), hs = {
1526
+ }), ws = /* @__PURE__ */ P(ks, [["__scopeId", "data-v-a333d2ea"]]), $s = {
1498
1527
  type: "grid",
1499
1528
  title: "栅栏格",
1500
- design: is,
1501
- render: us,
1502
- panel: gs,
1529
+ design: cs,
1530
+ render: ps,
1531
+ panel: ws,
1503
1532
  isContainer: !0,
1504
1533
  createDefaultProps: () => ({
1505
1534
  id: "",
@@ -1511,7 +1540,7 @@ const rs = /* @__PURE__ */ L({
1511
1540
  children: []
1512
1541
  }),
1513
1542
  serialize: (e) => e
1514
- }, ys = /* @__PURE__ */ L({
1543
+ }, xs = /* @__PURE__ */ E({
1515
1544
  __name: "TextDesign",
1516
1545
  props: {
1517
1546
  node: {}
@@ -1519,10 +1548,10 @@ const rs = /* @__PURE__ */ L({
1519
1548
  setup(e) {
1520
1549
  return (n, o) => (d(), c("div", {
1521
1550
  class: "fd-text-design",
1522
- style: G({ display: e.node.display })
1523
- }, y(e.node.text || "文本内容"), 5));
1551
+ style: K({ display: e.node.display })
1552
+ }, k(e.node.text || "文本内容"), 5));
1524
1553
  }
1525
- }), ks = /* @__PURE__ */ E(ys, [["__scopeId", "data-v-ba382e6c"]]), ws = /* @__PURE__ */ L({
1554
+ }), Cs = /* @__PURE__ */ P(xs, [["__scopeId", "data-v-ba382e6c"]]), _s = /* @__PURE__ */ E({
1526
1555
  __name: "TextRender",
1527
1556
  props: {
1528
1557
  node: {},
@@ -1536,10 +1565,10 @@ const rs = /* @__PURE__ */ L({
1536
1565
  });
1537
1566
  return (s, a) => (d(), c("div", {
1538
1567
  class: "fd-text-render",
1539
- style: G({ display: e.node.display })
1540
- }, y(o.value), 5));
1568
+ style: K({ display: e.node.display })
1569
+ }, k(o.value), 5));
1541
1570
  }
1542
- }), $s = /* @__PURE__ */ E(ws, [["__scopeId", "data-v-3ed7b0f0"]]), xs = { class: "fd-panel" }, Cs = { class: "fd-panel-item" }, _s = ["value"], Is = { class: "fd-panel-item" }, Ds = ["value"], Ss = ["value"], Ts = { class: "fd-panel-item" }, Fs = ["value"], Ls = /* @__PURE__ */ L({
1571
+ }), Is = /* @__PURE__ */ P(_s, [["__scopeId", "data-v-3ed7b0f0"]]), Ds = { class: "fd-panel" }, Ss = { class: "fd-panel-item" }, Ts = ["value"], Fs = { class: "fd-panel-item" }, Ls = ["value"], Ms = ["value"], Ns = { class: "fd-panel-item" }, Es = ["value"], Ps = /* @__PURE__ */ E({
1543
1572
  __name: "TextPanel",
1544
1573
  props: {
1545
1574
  node: {},
@@ -1548,29 +1577,29 @@ const rs = /* @__PURE__ */ L({
1548
1577
  emits: ["update"],
1549
1578
  setup(e, { emit: n }) {
1550
1579
  const o = n;
1551
- return (s, a) => (d(), c("div", xs, [
1552
- t("div", Cs, [
1580
+ return (s, a) => (d(), c("div", Ds, [
1581
+ t("div", Ss, [
1553
1582
  a[3] || (a[3] = t("label", null, "文本", -1)),
1554
1583
  t("textarea", {
1555
1584
  rows: "4",
1556
1585
  value: e.node.text,
1557
1586
  onInput: a[0] || (a[0] = (i) => o("update", { text: i.target.value }))
1558
- }, null, 40, _s)
1587
+ }, null, 40, Ts)
1559
1588
  ]),
1560
- t("div", Is, [
1589
+ t("div", Fs, [
1561
1590
  a[5] || (a[5] = t("label", null, "绑定字段", -1)),
1562
1591
  t("select", {
1563
1592
  value: e.node.bindField,
1564
1593
  onChange: a[1] || (a[1] = (i) => o("update", { bindField: i.target.value }))
1565
1594
  }, [
1566
1595
  a[4] || (a[4] = t("option", { value: "" }, "不绑定", -1)),
1567
- (d(!0), c(T, null, N(e.fields, (i) => (d(), c("option", {
1596
+ (d(!0), c(F, null, N(e.fields, (i) => (d(), c("option", {
1568
1597
  key: i.name,
1569
1598
  value: i.name
1570
- }, y(i.label) + "(" + y(i.name) + ")", 9, Ss))), 128))
1571
- ], 40, Ds)
1599
+ }, k(i.label) + "(" + k(i.name) + ")", 9, Ms))), 128))
1600
+ ], 40, Ls)
1572
1601
  ]),
1573
- t("div", Ts, [
1602
+ t("div", Ns, [
1574
1603
  a[7] || (a[7] = t("label", null, "对齐方式", -1)),
1575
1604
  t("select", {
1576
1605
  value: e.node.display,
@@ -1578,16 +1607,16 @@ const rs = /* @__PURE__ */ L({
1578
1607
  }, [...a[6] || (a[6] = [
1579
1608
  t("option", { value: "inline-block" }, "对齐", -1),
1580
1609
  t("option", { value: "block" }, "换行", -1)
1581
- ])], 40, Fs)
1610
+ ])], 40, Es)
1582
1611
  ])
1583
1612
  ]));
1584
1613
  }
1585
- }), Ms = /* @__PURE__ */ E(Ls, [["__scopeId", "data-v-3201879c"]]), Ns = {
1614
+ }), Os = /* @__PURE__ */ P(Ps, [["__scopeId", "data-v-3201879c"]]), Us = {
1586
1615
  type: "text",
1587
1616
  title: "文本",
1588
- design: ks,
1589
- render: $s,
1590
- panel: Ms,
1617
+ design: Cs,
1618
+ render: Is,
1619
+ panel: Os,
1591
1620
  isContainer: !1,
1592
1621
  createDefaultProps: () => ({
1593
1622
  id: "",
@@ -1599,44 +1628,44 @@ const rs = /* @__PURE__ */ L({
1599
1628
  }),
1600
1629
  serialize: (e) => e
1601
1630
  };
1602
- let $e = !1;
1603
- function he() {
1604
- $e || ($e = !0, ee(Ct), ee(on), ee($n), ee(ls), ee(hs), ee(Ns));
1631
+ let Me = !1;
1632
+ function Ce() {
1633
+ Me || (Me = !0, le(Mt), le(un), le(In), le(rs), le($s), le(Us));
1605
1634
  }
1606
- he();
1607
- const Es = { baseUrl: "/bpmapi-uat" };
1608
- let ye = {}, fe = {}, Ps = {};
1609
- const Os = "api/formdesigner/v1";
1610
- function Le(e) {
1611
- fe = { ...fe, ...e };
1635
+ Ce();
1636
+ const Bs = { baseUrl: "/bpmapi-uat" };
1637
+ let _e = {}, ge = {}, Vs = {};
1638
+ const As = "api/formdesigner/v1";
1639
+ function Ae(e) {
1640
+ ge = { ...ge, ...e };
1612
1641
  }
1613
- function Us(e) {
1614
- ye.baseUrl = e;
1642
+ function js(e) {
1643
+ _e.baseUrl = e;
1615
1644
  }
1616
- function Ya(e) {
1617
- ye.baseUrl = e ? e.startsWith("/") ? e : `/${e}` : "";
1645
+ function ti(e) {
1646
+ _e.baseUrl = e ? e.startsWith("/") ? e : `/${e}` : "";
1618
1647
  }
1619
- function Ka(e) {
1648
+ function ni(e) {
1620
1649
  }
1621
- function Bs() {
1650
+ function Rs() {
1622
1651
  return {
1623
- baseUrl: Ps.baseUrl ?? ye.baseUrl ?? fe.baseUrl ?? Es.baseUrl
1652
+ baseUrl: Vs.baseUrl ?? _e.baseUrl ?? ge.baseUrl ?? Bs.baseUrl
1624
1653
  };
1625
1654
  }
1626
- function X(e, n) {
1627
- const { baseUrl: o } = Bs(), s = new URLSearchParams();
1655
+ function ne(e, n) {
1656
+ const { baseUrl: o } = Rs(), s = new URLSearchParams();
1628
1657
  Object.entries(n ?? {}).forEach(([i, u]) => {
1629
1658
  u != null && u !== "" && s.append(i, u);
1630
1659
  });
1631
1660
  const a = s.toString();
1632
- return `${o}/${Os}/${e}${a ? `?${a}` : ""}`;
1661
+ return `${o}/${As}/${e}${a ? `?${a}` : ""}`;
1633
1662
  }
1634
- class Me extends Error {
1663
+ class je extends Error {
1635
1664
  constructor(n, o) {
1636
1665
  super(o), this.status = n, this.name = "ApiError";
1637
1666
  }
1638
1667
  }
1639
- function Vs(e) {
1668
+ function Js(e) {
1640
1669
  if (!e) return "";
1641
1670
  try {
1642
1671
  const n = JSON.parse(e), o = n.error ?? n.message ?? n.title ?? n.detail;
@@ -1645,13 +1674,13 @@ function Vs(e) {
1645
1674
  }
1646
1675
  return e;
1647
1676
  }
1648
- async function Z(e, n) {
1677
+ async function oe(e, n) {
1649
1678
  const o = await fetch(e, {
1650
1679
  ...n,
1651
1680
  headers: { "Content-Type": "application/json", ...(n == null ? void 0 : n.headers) ?? {} }
1652
1681
  }), s = await o.text();
1653
1682
  if (!o.ok)
1654
- throw new Me(o.status, Vs(s) || `请求失败(${o.status})`);
1683
+ throw new je(o.status, Js(s) || `请求失败(${o.status})`);
1655
1684
  if ((o.headers.get("content-type") ?? "").includes("text/plain")) return s;
1656
1685
  if (!s) return null;
1657
1686
  try {
@@ -1660,7 +1689,7 @@ async function Z(e, n) {
1660
1689
  return s;
1661
1690
  }
1662
1691
  }
1663
- function js(e) {
1692
+ function zs(e) {
1664
1693
  if (e == null) return null;
1665
1694
  if (typeof e != "string") return e;
1666
1695
  try {
@@ -1669,36 +1698,36 @@ function js(e) {
1669
1698
  return null;
1670
1699
  }
1671
1700
  }
1672
- function Ne(e) {
1701
+ function Re(e) {
1673
1702
  return e == null ? { success: !1, message: "无响应" } : typeof e == "string" ? { success: e.includes("成功"), message: e } : e;
1674
1703
  }
1675
- async function Rs(e, n) {
1676
- return Z(X("opendesigner"), {
1704
+ async function Ws(e, n) {
1705
+ return oe(ne("opendesigner"), {
1677
1706
  method: "POST",
1678
1707
  body: JSON.stringify(e)
1679
1708
  });
1680
1709
  }
1681
- async function As(e, n) {
1682
- return Z(X("formconfig", { id: e }));
1710
+ async function Hs(e, n) {
1711
+ return oe(ne("formconfig", { id: e }));
1683
1712
  }
1684
- async function zs(e, n, o) {
1685
- return Z(X("fieldbinding/allfields", { dbtable: e, formid: n }));
1713
+ async function qs(e, n, o) {
1714
+ return oe(ne("fieldbinding/allfields", { dbtable: e, formid: n }));
1686
1715
  }
1687
- async function Js(e, n) {
1688
- return Ne(await Z(X("save"), { method: "POST", body: JSON.stringify(e) }));
1716
+ async function Gs(e, n) {
1717
+ return Re(await oe(ne("save"), { method: "POST", body: JSON.stringify(e) }));
1689
1718
  }
1690
- async function Ws(e, n) {
1691
- return Ne(await Z(X("publish"), { method: "POST", body: JSON.stringify(e) }));
1719
+ async function Ys(e, n) {
1720
+ return Re(await oe(ne("publish"), { method: "POST", body: JSON.stringify(e) }));
1692
1721
  }
1693
- async function Hs(e, n) {
1694
- return Z(X("saveas"), { method: "POST", body: JSON.stringify(e) });
1722
+ async function Ks(e, n) {
1723
+ return oe(ne("saveas"), { method: "POST", body: JSON.stringify(e) });
1695
1724
  }
1696
- async function qs(e, n) {
1697
- return Z(X("effectcount", { formId: e }));
1725
+ async function Qs(e, n) {
1726
+ return oe(ne("effectcount", { formId: e }));
1698
1727
  }
1699
- async function Gs(e, n) {
1700
- return Z(
1701
- X("effectprocesses", {
1728
+ async function Xs(e, n) {
1729
+ return oe(
1730
+ ne("effectprocesses", {
1702
1731
  id: e.id,
1703
1732
  processName: e.processName,
1704
1733
  page: String(e.page ?? 1),
@@ -1706,41 +1735,41 @@ async function Gs(e, n) {
1706
1735
  })
1707
1736
  );
1708
1737
  }
1709
- function Ys(e) {
1738
+ function Zs(e) {
1710
1739
  return { name: e.name, label: e.label, dataType: e.dataType };
1711
1740
  }
1712
- function Ks(e) {
1741
+ function el(e) {
1713
1742
  return { name: e.name, label: e.label, dataType: e.dataType || "string" };
1714
1743
  }
1715
- function Qs(e, n) {
1716
- return (e ?? []).filter((o) => o.name && o.name !== n).map((o) => ({ name: o.name, label: o.name, fields: (o.fields ?? []).map(Ks) }));
1744
+ function tl(e, n) {
1745
+ return (e ?? []).filter((o) => o.name && o.name !== n).map((o) => ({ name: o.name, label: o.name, fields: (o.fields ?? []).map(el) }));
1717
1746
  }
1718
- function Xs(e) {
1719
- return js(e);
1747
+ function nl(e) {
1748
+ return zs(e);
1720
1749
  }
1721
- function ne(e) {
1722
- return e instanceof Me || e instanceof Error ? e.message : String(e);
1750
+ function ae(e) {
1751
+ return e instanceof je || e instanceof Error ? e.message : String(e);
1723
1752
  }
1724
- const te = (e) => JSON.parse(JSON.stringify(e));
1725
- function Y(e, n) {
1753
+ const Z = (e) => JSON.parse(JSON.stringify(e));
1754
+ function Q(e, n) {
1726
1755
  for (const o of e) {
1727
1756
  if (o.id === n) return o;
1728
1757
  if (o.children) {
1729
- const s = Y(o.children, n);
1758
+ const s = Q(o.children, n);
1730
1759
  if (s) return s;
1731
1760
  }
1732
1761
  }
1733
1762
  return null;
1734
1763
  }
1735
- function Ee(e, n) {
1764
+ function Je(e, n) {
1736
1765
  const o = e.findIndex((s) => s.id === n);
1737
1766
  if (o >= 0)
1738
1767
  return e.splice(o, 1), !0;
1739
1768
  for (const s of e)
1740
- if (s.children && Ee(s.children, n)) return !0;
1769
+ if (s.children && Je(s.children, n)) return !0;
1741
1770
  return !1;
1742
1771
  }
1743
- const W = We("designer", {
1772
+ const G = Ze("designer", {
1744
1773
  state: () => ({
1745
1774
  workFormId: "",
1746
1775
  originFormId: "",
@@ -1767,7 +1796,7 @@ const W = We("designer", {
1767
1796
  noticeMsg: ""
1768
1797
  }),
1769
1798
  getters: {
1770
- selectedNode: (e) => e.selectedId ? Y(e.widgets, e.selectedId) : null,
1799
+ selectedNode: (e) => e.selectedId ? Q(e.widgets, e.selectedId) : null,
1771
1800
  canUndo: (e) => e.past.length > 0,
1772
1801
  canRedo: (e) => e.future.length > 0,
1773
1802
  /** 供控件「事件」下拉选择使用的自定义事件列表 */
@@ -1778,15 +1807,15 @@ const W = We("designer", {
1778
1807
  actions: {
1779
1808
  /** 提交一次变更快照(用于撤销重做) */
1780
1809
  commit() {
1781
- this.past.push(te(this.widgets)), this.past.length > 50 && this.past.shift(), this.future = [];
1810
+ this.past.push(Z(this.widgets)), this.past.length > 50 && this.past.shift(), this.future = [];
1782
1811
  },
1783
1812
  undo() {
1784
1813
  const e = this.past.pop();
1785
- e && (this.future.push(te(this.widgets)), this.widgets = e, this.selectedId && !Y(this.widgets, this.selectedId) && (this.selectedId = null));
1814
+ e && (this.future.push(Z(this.widgets)), this.widgets = e, this.selectedId && !Q(this.widgets, this.selectedId) && (this.selectedId = null));
1786
1815
  },
1787
1816
  redo() {
1788
1817
  const e = this.future.pop();
1789
- e && (this.past.push(te(this.widgets)), this.widgets = e);
1818
+ e && (this.past.push(Z(this.widgets)), this.widgets = e);
1790
1819
  },
1791
1820
  select(e) {
1792
1821
  this.selectedId = e, this.selectedForm = !1;
@@ -1816,10 +1845,10 @@ const W = We("designer", {
1816
1845
  /** 新增控件:parentId 指定容器,index 指定插入位置(不传则末尾) */
1817
1846
  addWidget(e, n, o) {
1818
1847
  var i;
1819
- const s = nt(e);
1848
+ const s = ct(e);
1820
1849
  this.commit();
1821
- const a = n ? Y(this.widgets, n) : null;
1822
- a && ((i = K(a.type)) != null && i.isContainer) ? (a.children = a.children || [], a.type === "grid" && s.gridSpan == null && (s.gridSpan = a.layout || 24), o == null || o > a.children.length ? a.children.push(s) : a.children.splice(Math.max(0, o), 0, s)) : o == null || o > this.widgets.length ? this.widgets.push(s) : this.widgets.splice(Math.max(0, o), 0, s), this.selectedId = s.id;
1850
+ const a = n ? Q(this.widgets, n) : null;
1851
+ a && ((i = X(a.type)) != null && i.isContainer) ? (a.children = a.children || [], a.type === "grid" && s.gridSpan == null && (s.gridSpan = a.layout || 24), o == null || o > a.children.length ? a.children.push(s) : a.children.splice(Math.max(0, o), 0, s)) : o == null || o > this.widgets.length ? this.widgets.push(s) : this.widgets.splice(Math.max(0, o), 0, s), this.selectedId = s.id;
1823
1852
  },
1824
1853
  /** 判断 maybeChild 是否为 node 的后代(防止把容器拖进自己) */
1825
1854
  isDescendant(e, n) {
@@ -1830,43 +1859,43 @@ const W = We("designer", {
1830
1859
  },
1831
1860
  /** 移动已有控件到指定容器 / 根,插入位置 index */
1832
1861
  moveNode(e, n, o) {
1833
- var v;
1862
+ var p;
1834
1863
  if (e === n) return;
1835
- const s = Y(this.widgets, e);
1864
+ const s = Q(this.widgets, e);
1836
1865
  if (!s || n && this.isDescendant(s, n)) return;
1837
- const a = n ? Y(this.widgets, n) : null, i = (k) => {
1838
- const P = k.findIndex((j) => j.id === e);
1839
- if (P >= 0) return { list: k, index: P };
1840
- for (const j of k)
1841
- if (j.children) {
1842
- const _ = i(j.children);
1866
+ const a = n ? Q(this.widgets, n) : null, i = (y) => {
1867
+ const C = y.findIndex((B) => B.id === e);
1868
+ if (C >= 0) return { list: y, index: C };
1869
+ for (const B of y)
1870
+ if (B.children) {
1871
+ const _ = i(B.children);
1843
1872
  if (_) return _;
1844
1873
  }
1845
1874
  return null;
1846
1875
  }, u = i(this.widgets);
1847
1876
  if (!u) return;
1848
1877
  let r;
1849
- a && ((v = K(a.type)) != null && v.isContainer) ? (a.children = a.children || [], r = a.children) : r = this.widgets, this.commit();
1878
+ a && ((p = X(a.type)) != null && p.isContainer) ? (a.children = a.children || [], r = a.children) : r = this.widgets, this.commit();
1850
1879
  let l = o;
1851
1880
  r === u.list && u.index < o && (l = o - 1);
1852
- const [f] = u.list.splice(u.index, 1);
1853
- if (l = Math.max(0, Math.min(l, r.length)), r.splice(l, 0, f), a && a.type === "grid") {
1854
- const k = a.layout || 24;
1855
- (u.list !== r || f.gridSpan == null) && (f.gridSpan = k);
1881
+ const [m] = u.list.splice(u.index, 1);
1882
+ if (l = Math.max(0, Math.min(l, r.length)), r.splice(l, 0, m), a && a.type === "grid") {
1883
+ const y = a.layout || 24;
1884
+ (u.list !== r || m.gridSpan == null) && (m.gridSpan = y);
1856
1885
  } else
1857
- delete f.gridSpan;
1858
- this.selectedId = f.id;
1886
+ delete m.gridSpan;
1887
+ this.selectedId = m.id;
1859
1888
  },
1860
1889
  removeWidget(e) {
1861
- this.commit(), Ee(this.widgets, e), this.selectedId === e && (this.selectedId = null);
1890
+ this.commit(), Je(this.widgets, e), this.selectedId === e && (this.selectedId = null);
1862
1891
  },
1863
1892
  moveSibling(e, n) {
1864
1893
  const o = (r) => {
1865
- if (r.findIndex((f) => f.id === e) >= 0) return r;
1866
- for (const f of r)
1867
- if (f.children) {
1868
- const v = o(f.children);
1869
- if (v) return v;
1894
+ if (r.findIndex((m) => m.id === e) >= 0) return r;
1895
+ for (const m of r)
1896
+ if (m.children) {
1897
+ const p = o(m.children);
1898
+ if (p) return p;
1870
1899
  }
1871
1900
  return null;
1872
1901
  }, s = o(this.widgets);
@@ -1878,7 +1907,7 @@ const W = We("designer", {
1878
1907
  s.splice(i, 0, u);
1879
1908
  },
1880
1909
  updateNode(e, n) {
1881
- const o = Y(this.widgets, e);
1910
+ const o = Q(this.widgets, e);
1882
1911
  o && (Object.assign(o, n), this.commit());
1883
1912
  },
1884
1913
  setDragging(e) {
@@ -1886,7 +1915,7 @@ const W = We("designer", {
1886
1915
  },
1887
1916
  /** 展开/收起容器(设计器视图操作,不写入撤销历史) */
1888
1917
  setExpanded(e, n) {
1889
- const o = Y(this.widgets, e);
1918
+ const o = Q(this.widgets, e);
1890
1919
  o && "expanded" in o && (o.expanded = n);
1891
1920
  },
1892
1921
  /** 将 draggingId 控件移动到 targetId(容器)或根 */
@@ -1913,14 +1942,24 @@ const W = We("designer", {
1913
1942
  return;
1914
1943
  }
1915
1944
  if (e) {
1916
- const i = Y(this.widgets, e);
1917
- i && ((a = K(i.type)) != null && a.isContainer) ? (i.children = i.children || [], i.children.push(s)) : this.widgets.push(s);
1945
+ const i = Q(this.widgets, e);
1946
+ i && ((a = X(i.type)) != null && a.isContainer) ? (i.children = i.children || [], i.children.push(s)) : this.widgets.push(s);
1918
1947
  } else
1919
1948
  this.widgets.push(s);
1920
1949
  this.draggingId = null, this.selectedId = s.id;
1921
1950
  },
1922
1951
  loadSchema(e) {
1923
- this.formId = e.formId, this.dbtable = e.dbtable, this.fields = e.fields, this.widgets = te(e.widgets), this.events = e.events ? te(e.events) : { lifecycle: {}, custom: [] }, this.selectedId = null, this.selectedForm = !1, this.past = [], this.future = [];
1952
+ this.formId = e.formId, this.dbtable = e.dbtable, this.fields = e.fields, this.widgets = Z(e.widgets), this.events = e.events ? Z(e.events) : { lifecycle: {}, custom: [] }, this.selectedId = null, this.selectedForm = !1, this.past = [], this.future = [];
1953
+ },
1954
+ /**
1955
+ * 导入(「导入」按钮):仅用导入 JSON 的表单结构(控件树 + 事件)覆盖当前设计,
1956
+ * 不清空业务对象——保留 dbtable(主表业务对象编码)、fields(由 allfields 按 dbtable 下发)、
1957
+ * 以及 formId / workFormId / attribute / subTables 等打开流程上下文。
1958
+ * 与 loadSchema 的区别:loadSchema 用于打开表单时整体装载(含 formId/dbtable/fields);
1959
+ * importSchema 只换表单 JSON,不动业务对象与字段。
1960
+ */
1961
+ importSchema(e) {
1962
+ this.widgets = Z(e.widgets ?? []), this.events = e.events ? Z(e.events) : this.events, this.selectedId = null, this.selectedForm = !1, this.past = [], this.future = [];
1924
1963
  },
1925
1964
  toSchema() {
1926
1965
  return {
@@ -1928,7 +1967,7 @@ const W = We("designer", {
1928
1967
  dbtable: this.dbtable,
1929
1968
  fields: this.fields,
1930
1969
  widgets: this.widgets,
1931
- events: te(this.events)
1970
+ events: Z(this.events)
1932
1971
  };
1933
1972
  },
1934
1973
  /**
@@ -1966,15 +2005,15 @@ const W = We("designer", {
1966
2005
  return;
1967
2006
  }
1968
2007
  this.originFormId = e;
1969
- const s = await Rs({ openType: o, id: e, formVersion: n });
2008
+ const s = await Ws({ openType: o, id: e, formVersion: n });
1970
2009
  this.workFormId = s.newFormID, this.formId = s.newFormID;
1971
- const a = await As(s.newFormID);
2010
+ const a = await Hs(s.newFormID);
1972
2011
  this.attribute = a.attribute ?? {}, this.formName = this.attribute.name ?? "", this.device = a.templateType === "App" ? "mobile" : "pc";
1973
- const i = this.attribute.dbtable || "", u = await zs(i, s.newFormID);
2012
+ const i = this.attribute.dbtable || "", u = await qs(i, s.newFormID);
1974
2013
  this.dbtable = i || u.dbtable;
1975
- const r = this.enrichFields((u.fields ?? []).map(Ys));
1976
- this.setFields(r), this.setSubTables(Qs(u.subtables, this.dbtable));
1977
- const l = Xs(a.json);
2014
+ const r = this.enrichFields((u.fields ?? []).map(Zs));
2015
+ this.setFields(r), this.setSubTables(tl(u.subtables, this.dbtable));
2016
+ const l = nl(a.json);
1978
2017
  l && Array.isArray(l.widgets) ? this.loadSchema({
1979
2018
  ...l,
1980
2019
  formId: s.newFormID,
@@ -1992,7 +2031,7 @@ const W = We("designer", {
1992
2031
  events: { lifecycle: {}, custom: [] }
1993
2032
  }));
1994
2033
  } catch (s) {
1995
- this.errorMsg = `加载失败:${ne(s)}`;
2034
+ this.errorMsg = `加载失败:${ae(s)}`;
1996
2035
  } finally {
1997
2036
  this.loading = !1;
1998
2037
  }
@@ -2013,7 +2052,7 @@ const W = We("designer", {
2013
2052
  async save() {
2014
2053
  this.errorMsg = "";
2015
2054
  try {
2016
- return await Js({
2055
+ return await Gs({
2017
2056
  id: this.workFormId,
2018
2057
  name: this.formName,
2019
2058
  att: this.attJson,
@@ -2024,7 +2063,7 @@ const W = We("designer", {
2024
2063
  dataObject: this.attribute.isentity === "0" ? JSON.stringify({ table: "" }) : void 0
2025
2064
  });
2026
2065
  } catch (e) {
2027
- throw this.errorMsg = `保存失败:${ne(e)}`, e;
2066
+ throw this.errorMsg = `保存失败:${ae(e)}`, e;
2028
2067
  }
2029
2068
  },
2030
2069
  /**
@@ -2034,16 +2073,16 @@ const W = We("designer", {
2034
2073
  async saveAs(e, n, o = "start") {
2035
2074
  this.errorMsg = "";
2036
2075
  try {
2037
- return await Hs({ id: this.workFormId, name: e, code: n, saveSelect: o });
2076
+ return await Ks({ id: this.workFormId, name: e, code: n, saveSelect: o });
2038
2077
  } catch (s) {
2039
- throw this.errorMsg = `另存为失败:${ne(s)}`, s;
2078
+ throw this.errorMsg = `另存为失败:${ae(s)}`, s;
2040
2079
  }
2041
2080
  },
2042
2081
  /** 发布:以工作表单 ID 发布(Status=4 → 回写版本行置 Status=1 + 一口收直写业务库) */
2043
2082
  async publish(e = "") {
2044
2083
  this.errorMsg = "";
2045
2084
  try {
2046
- return await Ws({
2085
+ return await Ys({
2047
2086
  id: this.workFormId,
2048
2087
  name: this.formName,
2049
2088
  att: this.attJson,
@@ -2051,7 +2090,7 @@ const W = We("designer", {
2051
2090
  text: e
2052
2091
  });
2053
2092
  } catch (n) {
2054
- throw this.errorMsg = `发布失败:${ne(n)}`, n;
2093
+ throw this.errorMsg = `发布失败:${ae(n)}`, n;
2055
2094
  }
2056
2095
  },
2057
2096
  /**
@@ -2062,19 +2101,19 @@ const W = We("designer", {
2062
2101
  async checkPublish() {
2063
2102
  this.errorMsg = "";
2064
2103
  try {
2065
- const e = await qs(this.originFormId);
2104
+ const e = await Qs(this.originFormId);
2066
2105
  return { needConfirm: e.result || e.count > 0, count: e.count };
2067
2106
  } catch (e) {
2068
- throw this.errorMsg = `发布检查失败:${ne(e)}`, e;
2107
+ throw this.errorMsg = `发布检查失败:${ae(e)}`, e;
2069
2108
  }
2070
2109
  }
2071
2110
  }
2072
- }), Pe = "fd:form:";
2073
- function Zs(e, n) {
2074
- localStorage.setItem(Pe + e, JSON.stringify(n));
2111
+ }), ze = "fd:form:";
2112
+ function ol(e, n) {
2113
+ localStorage.setItem(ze + e, JSON.stringify(n));
2075
2114
  }
2076
- function Qa(e) {
2077
- const n = localStorage.getItem(Pe + e);
2115
+ function oi(e) {
2116
+ const n = localStorage.getItem(ze + e);
2078
2117
  if (!n) return null;
2079
2118
  try {
2080
2119
  return JSON.parse(n);
@@ -2082,8 +2121,8 @@ function Qa(e) {
2082
2121
  return null;
2083
2122
  }
2084
2123
  }
2085
- const el = "fdFireEvent";
2086
- function xe(e, n = {}) {
2124
+ const sl = "fdFireEvent";
2125
+ function Ne(e, n = {}) {
2087
2126
  if (!(!e || !e.trim()))
2088
2127
  try {
2089
2128
  return new Function("ctx", `"use strict";
@@ -2093,7 +2132,7 @@ ${e}`)(n);
2093
2132
  return;
2094
2133
  }
2095
2134
  }
2096
- function tl(e) {
2135
+ function ll(e) {
2097
2136
  if (!(!e || !e.trim() || typeof document > "u"))
2098
2137
  try {
2099
2138
  const n = document.createElement("script");
@@ -2102,7 +2141,7 @@ function tl(e) {
2102
2141
  console.error("[form-designer] 自定义方法挂载失败:", n);
2103
2142
  }
2104
2143
  }
2105
- const nl = { class: "fd-renderer" }, ol = /* @__PURE__ */ L({
2144
+ const al = { class: "fd-renderer" }, il = /* @__PURE__ */ E({
2106
2145
  __name: "Renderer",
2107
2146
  props: {
2108
2147
  widgets: {},
@@ -2115,82 +2154,82 @@ const nl = { class: "fd-renderer" }, ol = /* @__PURE__ */ L({
2115
2154
  const o = e, s = M(
2116
2155
  () => o.widgets.filter((u) => {
2117
2156
  var l;
2118
- const r = (l = K(u.type)) == null ? void 0 : l.visibleModes;
2157
+ const r = (l = X(u.type)) == null ? void 0 : l.visibleModes;
2119
2158
  return !r || r.length === 0 ? !0 : o.formMode ? r.includes(o.formMode) : !0;
2120
2159
  })
2121
2160
  );
2122
2161
  function a(u) {
2123
2162
  var l;
2124
2163
  const r = (l = o.events) == null ? void 0 : l.lifecycle[u];
2125
- xe(r, { formData: o.formData, event: u });
2164
+ Ne(r, { formData: o.formData, event: u });
2126
2165
  }
2127
2166
  function i(u, r) {
2128
- var f;
2129
- const l = (f = o.events) == null ? void 0 : f.custom.find((v) => v.name === u);
2130
- l && xe(l.handler, { formData: o.formData, event: u, payload: r });
2167
+ var m;
2168
+ const l = (m = o.events) == null ? void 0 : m.custom.find((p) => p.name === u);
2169
+ l && Ne(l.handler, { formData: o.formData, event: u, payload: r });
2131
2170
  }
2132
- return Ve(el, i), ie(() => {
2171
+ return Ge(sl, i), ce(() => {
2133
2172
  var u;
2134
- a("onLoad"), a("onMounted"), tl((u = o.events) == null ? void 0 : u.lifecycle.custom);
2135
- }), le(
2173
+ a("onLoad"), a("onMounted"), ll((u = o.events) == null ? void 0 : u.lifecycle.custom);
2174
+ }), de(
2136
2175
  () => o.formData,
2137
2176
  () => a("onValueChange"),
2138
2177
  { deep: !0 }
2139
- ), n({ fireEvent: i, runLifecycle: a }), (u, r) => (d(), c("div", nl, [
2140
- (d(!0), c(T, null, N(s.value, (l) => (d(), V(ge, {
2178
+ ), n({ fireEvent: i, runLifecycle: a }), (u, r) => (d(), c("div", al, [
2179
+ (d(!0), c(F, null, N(s.value, (l) => (d(), V(xe, {
2141
2180
  key: l.id,
2142
2181
  node: l,
2143
2182
  mode: "render",
2144
2183
  "form-mode": e.formMode,
2145
2184
  "form-data": e.formData,
2146
2185
  "form-id": e.formId
2147
- }, ae({ _: 2 }, [
2148
- N(u.$slots, (f, v) => ({
2149
- name: v,
2150
- fn: A((k) => [
2151
- Q(u.$slots, v, de({ ref_for: !0 }, k || {}), void 0, !0)
2186
+ }, re({ _: 2 }, [
2187
+ N(u.$slots, (m, p) => ({
2188
+ name: p,
2189
+ fn: j((y) => [
2190
+ te(u.$slots, p, ve({ ref_for: !0 }, y || {}), void 0, !0)
2152
2191
  ])
2153
2192
  }))
2154
2193
  ]), 1032, ["node", "form-mode", "form-data", "form-id"]))), 128))
2155
2194
  ]));
2156
2195
  }
2157
- }), Oe = /* @__PURE__ */ E(ol, [["__scopeId", "data-v-82088c12"]]), sl = { class: "fd-tree" }, ll = { class: "fd-tree-head" }, al = {
2196
+ }), We = /* @__PURE__ */ P(il, [["__scopeId", "data-v-82088c12"]]), dl = { class: "fd-tree" }, rl = { class: "fd-tree-head" }, ul = {
2158
2197
  key: 0,
2159
2198
  class: "fd-tree-count"
2160
- }, il = {
2199
+ }, cl = {
2161
2200
  key: 0,
2162
2201
  class: "fd-tree-empty"
2163
- }, dl = { class: "fd-tree-name" }, rl = ["title"], ul = /* @__PURE__ */ L({
2202
+ }, fl = { class: "fd-tree-name" }, ml = ["title"], pl = /* @__PURE__ */ E({
2164
2203
  __name: "ComponentTree",
2165
2204
  setup(e) {
2166
- const n = W();
2205
+ const n = G();
2167
2206
  function o(u) {
2168
- var v;
2169
- const r = K(u.type), l = u.label, f = (r == null ? void 0 : r.title) ?? u.type;
2207
+ var p;
2208
+ const r = X(u.type), l = u.label, m = (r == null ? void 0 : r.title) ?? u.type;
2170
2209
  return {
2171
2210
  id: u.id,
2172
- label: l ? `${f} · ${l}` : f,
2173
- name: f,
2211
+ label: l ? `${m} · ${l}` : m,
2212
+ name: m,
2174
2213
  sub: l ?? "",
2175
- children: (v = u.children) == null ? void 0 : v.map(o)
2214
+ children: (p = u.children) == null ? void 0 : p.map(o)
2176
2215
  };
2177
2216
  }
2178
2217
  const s = M(() => n.widgets.map(o)), a = M(() => {
2179
- const u = (r) => r.reduce((l, f) => l + 1 + u(f.children ?? []), 0);
2218
+ const u = (r) => r.reduce((l, m) => l + 1 + u(m.children ?? []), 0);
2180
2219
  return u(n.widgets);
2181
2220
  });
2182
2221
  function i(u) {
2183
- n.select(u.id), De(() => {
2222
+ n.select(u.id), Oe(() => {
2184
2223
  var r;
2185
2224
  (r = document.querySelector(".fd-canvas-node.is-selected")) == null || r.scrollIntoView({ block: "nearest" });
2186
2225
  });
2187
2226
  }
2188
- return (u, r) => (d(), c("div", sl, [
2189
- t("div", ll, [
2190
- r[0] || (r[0] = ve('<svg class="fd-tree-head-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" data-v-e38c14ec><rect x="3" y="3" width="7" height="7" rx="1" data-v-e38c14ec></rect><rect x="14" y="3" width="7" height="7" rx="1" data-v-e38c14ec></rect><rect x="3" y="14" width="7" height="7" rx="1" data-v-e38c14ec></rect><rect x="14" y="14" width="7" height="7" rx="1" data-v-e38c14ec></rect></svg><span class="fd-tree-title" data-v-e38c14ec>组件树</span>', 2)),
2191
- a.value ? (d(), c("span", al, y(a.value), 1)) : I("", !0)
2227
+ return (u, r) => (d(), c("div", dl, [
2228
+ t("div", rl, [
2229
+ r[0] || (r[0] = we('<svg class="fd-tree-head-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" data-v-e38c14ec><rect x="3" y="3" width="7" height="7" rx="1" data-v-e38c14ec></rect><rect x="14" y="3" width="7" height="7" rx="1" data-v-e38c14ec></rect><rect x="3" y="14" width="7" height="7" rx="1" data-v-e38c14ec></rect><rect x="14" y="14" width="7" height="7" rx="1" data-v-e38c14ec></rect></svg><span class="fd-tree-title" data-v-e38c14ec>组件树</span>', 2)),
2230
+ a.value ? (d(), c("span", ul, k(a.value), 1)) : T("", !0)
2192
2231
  ]),
2193
- a.value ? (d(), V(h(He), {
2232
+ a.value ? (d(), V(h(et), {
2194
2233
  key: 1,
2195
2234
  class: "fd-tree-el",
2196
2235
  data: s.value,
@@ -2202,16 +2241,16 @@ const nl = { class: "fd-renderer" }, ol = /* @__PURE__ */ L({
2202
2241
  "expand-on-click-node": !1,
2203
2242
  onNodeClick: i
2204
2243
  }, {
2205
- default: A(({ data: l }) => [
2206
- t("span", dl, y(l.name), 1),
2244
+ default: j(({ data: l }) => [
2245
+ t("span", fl, k(l.name), 1),
2207
2246
  l.sub ? (d(), c("span", {
2208
2247
  key: 0,
2209
2248
  class: "fd-tree-sub",
2210
2249
  title: l.sub
2211
- }, y(l.sub), 9, rl)) : I("", !0)
2250
+ }, k(l.sub), 9, ml)) : T("", !0)
2212
2251
  ]),
2213
2252
  _: 1
2214
- }, 8, ["data", "current-node-key"])) : (d(), c("div", il, [...r[1] || (r[1] = [
2253
+ }, 8, ["data", "current-node-key"])) : (d(), c("div", cl, [...r[1] || (r[1] = [
2215
2254
  t("svg", {
2216
2255
  viewBox: "0 0 24 24",
2217
2256
  fill: "none",
@@ -2233,8 +2272,8 @@ const nl = { class: "fd-renderer" }, ol = /* @__PURE__ */ L({
2233
2272
  ])]))
2234
2273
  ]));
2235
2274
  }
2236
- }), cl = /* @__PURE__ */ E(ul, [["__scopeId", "data-v-e38c14ec"]]);
2237
- var fl = {
2275
+ }), vl = /* @__PURE__ */ P(pl, [["__scopeId", "data-v-e38c14ec"]]);
2276
+ var bl = {
2238
2277
  name: "zh-cn",
2239
2278
  el: {
2240
2279
  breadcrumb: { label: "面包屑" },
@@ -2416,10 +2455,10 @@ var fl = {
2416
2455
  }
2417
2456
  }
2418
2457
  };
2419
- const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, vl = { class: "fd-publish-toolbar" }, bl = { class: "fd-publish-table-wrap" }, gl = { class: "fd-publish-table" }, hl = ["title"], yl = ["href", "title"], kl = ["title"], wl = ["title"], $l = {
2458
+ const gl = { class: "fd-publish-tip" }, hl = { class: "fd-publish-tip-text" }, yl = { class: "fd-publish-toolbar" }, kl = { class: "fd-publish-table-wrap" }, wl = { class: "fd-publish-table" }, $l = ["title"], xl = ["href", "title"], Cl = ["title"], _l = ["title"], Il = {
2420
2459
  key: 1,
2421
2460
  class: "fd-publish-error"
2422
- }, xl = { class: "fd-publish-pager" }, Cl = /* @__PURE__ */ L({
2461
+ }, Dl = { class: "fd-publish-pager" }, Sl = /* @__PURE__ */ E({
2423
2462
  __name: "PublishConfirmDialog",
2424
2463
  props: {
2425
2464
  modelValue: { type: Boolean },
@@ -2428,92 +2467,92 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
2428
2467
  },
2429
2468
  emits: ["update:modelValue", "confirm"],
2430
2469
  setup(e, { emit: n }) {
2431
- const o = qe.directive, s = e, a = n, i = O(!1), u = O(""), r = O(""), l = O(1), f = O(10), v = O(0), k = O([]);
2432
- async function P() {
2470
+ const o = tt.directive, s = e, a = n, i = O(!1), u = O(""), r = O(""), l = O(1), m = O(10), p = O(0), y = O([]);
2471
+ async function C() {
2433
2472
  if (s.formId) {
2434
2473
  i.value = !0, u.value = "";
2435
2474
  try {
2436
- const D = await Gs({
2475
+ const S = await Xs({
2437
2476
  id: s.formId,
2438
2477
  processName: r.value,
2439
2478
  page: l.value,
2440
- pageSize: f.value
2479
+ pageSize: m.value
2441
2480
  });
2442
- k.value = D.items ?? [], v.value = D.total ?? 0;
2443
- } catch (D) {
2444
- k.value = [], v.value = 0, u.value = ne(D);
2481
+ y.value = S.items ?? [], p.value = S.total ?? 0;
2482
+ } catch (S) {
2483
+ y.value = [], p.value = 0, u.value = ae(S);
2445
2484
  } finally {
2446
2485
  i.value = !1;
2447
2486
  }
2448
2487
  }
2449
2488
  }
2450
- le(
2489
+ de(
2451
2490
  () => s.modelValue,
2452
- (D) => {
2453
- D && (r.value = "", l.value = 1, P());
2491
+ (S) => {
2492
+ S && (r.value = "", l.value = 1, C());
2454
2493
  }
2455
- ), le(r, () => {
2456
- l.value = 1, P();
2457
- }), le(l, () => P());
2458
- function j() {
2494
+ ), de(r, () => {
2495
+ l.value = 1, C();
2496
+ }), de(l, () => C());
2497
+ function B() {
2459
2498
  a("update:modelValue", !1);
2460
2499
  }
2461
2500
  function _() {
2462
2501
  a("confirm");
2463
2502
  }
2464
- return (D, m) => (d(), V(h(Ge), { locale: h(fl) }, {
2465
- default: A(() => [
2466
- F(h(Ye), {
2503
+ return (S, v) => (d(), V(h(nt), { locale: h(bl) }, {
2504
+ default: j(() => [
2505
+ L(h(ot), {
2467
2506
  "model-value": e.modelValue,
2468
2507
  title: "发布确认",
2469
2508
  width: "70rem",
2470
2509
  "close-on-click-modal": !1,
2471
- "onUpdate:modelValue": m[3] || (m[3] = (g) => a("update:modelValue", g))
2510
+ "onUpdate:modelValue": v[3] || (v[3] = (g) => a("update:modelValue", g))
2472
2511
  }, {
2473
- footer: A(() => [
2474
- F(h(we), { onClick: j }, {
2475
- default: A(() => [...m[9] || (m[9] = [
2512
+ footer: j(() => [
2513
+ L(h(Fe), { onClick: B }, {
2514
+ default: j(() => [...v[9] || (v[9] = [
2476
2515
  U("取消", -1)
2477
2516
  ])]),
2478
2517
  _: 1
2479
2518
  }),
2480
- F(h(we), {
2519
+ L(h(Fe), {
2481
2520
  type: "primary",
2482
2521
  disabled: i.value,
2483
2522
  onClick: _
2484
2523
  }, {
2485
- default: A(() => [...m[10] || (m[10] = [
2524
+ default: j(() => [...v[10] || (v[10] = [
2486
2525
  U("确认发布", -1)
2487
2526
  ])]),
2488
2527
  _: 1
2489
2528
  }, 8, ["disabled"])
2490
2529
  ]),
2491
- default: A(() => [
2492
- t("div", ml, [
2493
- m[6] || (m[6] = t("span", { class: "fd-publish-tip-icon" }, "!", -1)),
2494
- t("span", pl, [
2495
- m[4] || (m[4] = U(" 该表单正在被 ", -1)),
2496
- t("b", null, y(e.count), 1),
2497
- m[5] || (m[5] = U(" 个流程使用,发布后将影响以下流程,确定发布? ", -1))
2530
+ default: j(() => [
2531
+ t("div", gl, [
2532
+ v[6] || (v[6] = t("span", { class: "fd-publish-tip-icon" }, "!", -1)),
2533
+ t("span", hl, [
2534
+ v[4] || (v[4] = U(" 该表单正在被 ", -1)),
2535
+ t("b", null, k(e.count), 1),
2536
+ v[5] || (v[5] = U(" 个流程使用,发布后将影响以下流程,确定发布? ", -1))
2498
2537
  ])
2499
2538
  ]),
2500
- t("div", vl, [
2501
- F(h(Ke), {
2539
+ t("div", yl, [
2540
+ L(h(st), {
2502
2541
  modelValue: r.value,
2503
- "onUpdate:modelValue": m[0] || (m[0] = (g) => r.value = g),
2542
+ "onUpdate:modelValue": v[0] || (v[0] = (g) => r.value = g),
2504
2543
  placeholder: "输入流程名搜索",
2505
2544
  clearable: "",
2506
2545
  class: "fd-publish-search"
2507
2546
  }, null, 8, ["modelValue"])
2508
2547
  ]),
2509
- ce((d(), c("div", bl, [
2510
- t("table", gl, [
2511
- m[7] || (m[7] = t("colgroup", null, [
2548
+ fe((d(), c("div", kl, [
2549
+ t("table", wl, [
2550
+ v[7] || (v[7] = t("colgroup", null, [
2512
2551
  t("col", { style: { width: "24%" } }),
2513
2552
  t("col", { style: { width: "40%" } }),
2514
2553
  t("col", { style: { width: "36%" } })
2515
2554
  ], -1)),
2516
- m[8] || (m[8] = t("thead", null, [
2555
+ v[8] || (v[8] = t("thead", null, [
2517
2556
  t("tr", null, [
2518
2557
  t("th", null, "表单名称"),
2519
2558
  t("th", null, "流程模板"),
@@ -2521,12 +2560,12 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
2521
2560
  ])
2522
2561
  ], -1)),
2523
2562
  t("tbody", null, [
2524
- (d(!0), c(T, null, N(k.value, (g) => (d(), c("tr", {
2563
+ (d(!0), c(F, null, N(y.value, (g) => (d(), c("tr", {
2525
2564
  key: g.templateId || g.formId
2526
2565
  }, [
2527
2566
  t("td", {
2528
2567
  title: g.formNameCN || g.formCode
2529
- }, y(g.formNameCN || g.formCode), 9, hl),
2568
+ }, k(g.formNameCN || g.formCode), 9, $l),
2530
2569
  t("td", null, [
2531
2570
  g.templateUrl ? (d(), c("a", {
2532
2571
  key: 0,
@@ -2535,34 +2574,34 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
2535
2574
  target: "_blank",
2536
2575
  rel: "noopener noreferrer",
2537
2576
  title: g.templateName
2538
- }, y(g.templateName), 9, yl)) : (d(), c("span", {
2577
+ }, k(g.templateName), 9, xl)) : (d(), c("span", {
2539
2578
  key: 1,
2540
2579
  title: g.templateName
2541
- }, y(g.templateName), 9, kl))
2580
+ }, k(g.templateName), 9, Cl))
2542
2581
  ]),
2543
2582
  t("td", {
2544
2583
  class: "fd-publish-id",
2545
2584
  title: g.templateId
2546
- }, y(g.templateId), 9, wl)
2585
+ }, k(g.templateId), 9, _l)
2547
2586
  ]))), 128))
2548
2587
  ])
2549
2588
  ]),
2550
- !k.value.length && !u.value && !i.value ? (d(), V(h(Qe), {
2589
+ !y.value.length && !u.value && !i.value ? (d(), V(h(lt), {
2551
2590
  key: 0,
2552
2591
  description: "暂无可用流程模板",
2553
2592
  "image-size": 60
2554
- })) : I("", !0),
2555
- !k.value.length && u.value ? (d(), c("div", $l, y(u.value), 1)) : I("", !0)
2593
+ })) : T("", !0),
2594
+ !y.value.length && u.value ? (d(), c("div", Il, k(u.value), 1)) : T("", !0)
2556
2595
  ])), [
2557
2596
  [h(o), i.value]
2558
2597
  ]),
2559
- t("div", xl, [
2560
- F(h(Xe), {
2598
+ t("div", Dl, [
2599
+ L(h(at), {
2561
2600
  "current-page": l.value,
2562
- "onUpdate:currentPage": m[1] || (m[1] = (g) => l.value = g),
2563
- "page-size": f.value,
2564
- "onUpdate:pageSize": m[2] || (m[2] = (g) => f.value = g),
2565
- total: v.value,
2601
+ "onUpdate:currentPage": v[1] || (v[1] = (g) => l.value = g),
2602
+ "page-size": m.value,
2603
+ "onUpdate:pageSize": v[2] || (v[2] = (g) => m.value = g),
2604
+ total: p.value,
2566
2605
  "page-sizes": [10, 20, 50],
2567
2606
  layout: "total, sizes, prev, pager, next",
2568
2607
  background: ""
@@ -2575,152 +2614,195 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
2575
2614
  _: 1
2576
2615
  }, 8, ["locale"]));
2577
2616
  }
2578
- }), _l = /* @__PURE__ */ E(Cl, [["__scopeId", "data-v-6fdc08dc"]]), Il = { class: "fd-toolbar" }, Dl = { class: "fd-toolbar-left flex-align-center" }, Sl = ["value"], Tl = { class: "fd-device" }, Fl = {
2617
+ }), Tl = /* @__PURE__ */ P(Sl, [["__scopeId", "data-v-6fdc08dc"]]), Fl = { class: "fd-toolbar" }, Ll = { class: "fd-toolbar-left flex-align-center" }, Ml = ["value"], Nl = { class: "fd-device" }, El = {
2579
2618
  key: 0,
2580
2619
  class: "is-active",
2581
2620
  title: "移动端比例(由 URL 参数 templateType 决定)"
2582
- }, Ll = {
2621
+ }, Pl = {
2583
2622
  key: 1,
2584
2623
  class: "is-active",
2585
2624
  title: "电脑端比例(由 URL 参数 templateType 决定)"
2586
- }, Ml = { class: "fd-toolbar-right flex-align-center" }, Nl = ["disabled"], El = ["disabled"], Pl = { class: "fd-dialog fd-dialog--preview" }, Ol = { class: "fd-dialog-head" }, Ul = { class: "fd-preview-width" }, Bl = { class: "fd-dialog-body" }, Vl = { class: "fd-dialog" }, jl = { class: "fd-dialog-head" }, Rl = { class: "fd-dialog-code" }, Al = { class: "fd-dialog" }, zl = { class: "fd-dialog-head" }, Jl = { class: "fd-dialog-body" }, Wl = /* @__PURE__ */ L({
2625
+ }, Ol = { class: "fd-toolbar-right flex-align-center" }, Ul = ["disabled"], Bl = ["disabled"], Vl = { class: "fd-dialog fd-dialog--preview" }, Al = { class: "fd-dialog-head" }, jl = { class: "fd-preview-width" }, Rl = { class: "fd-dialog-body bg" }, Jl = { class: "fd-dialog" }, zl = { class: "fd-dialog-head" }, Wl = ["value"], Hl = { class: "fd-dialog" }, ql = { class: "fd-dialog-head" }, Gl = { class: "fd-dialog-body" }, Yl = /* @__PURE__ */ E({
2587
2626
  __name: "Toolbar",
2588
2627
  setup(e) {
2589
- const n = W(), o = O(!1), s = O(!1), a = O(!1), i = O(!1), u = O(!1), r = O(0);
2590
- function l() {
2591
- const C = new URLSearchParams(window.location.search).get("templateType") || "";
2592
- return C === "mobile" || C === "2";
2593
- }
2594
- const f = O(l() ? 375 : 1200);
2595
- function v() {
2596
- const C = Number(f.value);
2597
- f.value = Math.min(1200, Math.max(270, Number.isFinite(C) ? C : 1200));
2598
- }
2599
- le(
2628
+ const n = G(), o = O(!1), s = O(!1), a = O(!1), i = O(!1);
2629
+ function u(D, f, I) {
2630
+ const J = [pe("p", { style: "margin:0" }, f)];
2631
+ return I && J.push(pe("p", { style: "margin:8px 0 0" }, I)), dt.alert(pe("div", J), D, { confirmButtonText: "知道了" });
2632
+ }
2633
+ const r = O(!1), l = O(0);
2634
+ function m() {
2635
+ const D = new URLSearchParams(window.location.search).get("templateType") || "";
2636
+ return D === "mobile" || D === "2";
2637
+ }
2638
+ const p = O(m() ? 375 : 1200);
2639
+ function y() {
2640
+ const D = Number(p.value);
2641
+ p.value = Math.min(1200, Math.max(270, Number.isFinite(D) ? D : 1200));
2642
+ }
2643
+ de(
2600
2644
  () => n.device,
2601
- (C) => {
2602
- f.value = C === "mobile" ? 375 : 1200;
2645
+ (D) => {
2646
+ p.value = D === "mobile" ? 375 : 1200;
2603
2647
  }
2604
2648
  );
2605
- const k = O("");
2606
- function P() {
2607
- const C = k.value.trim();
2608
- if (!C) {
2609
- window.alert("请先粘贴表单 JSON");
2649
+ const C = O("");
2650
+ function B() {
2651
+ const D = C.value.trim();
2652
+ if (!D) {
2653
+ z.warning("请先粘贴表单 JSON");
2610
2654
  return;
2611
2655
  }
2656
+ let f;
2612
2657
  try {
2613
- n.loadSchema(JSON.parse(C));
2658
+ f = JSON.parse(D);
2614
2659
  } catch {
2615
- window.alert("JSON 解析失败");
2660
+ z.error("JSON 解析失败");
2616
2661
  return;
2617
2662
  }
2618
- k.value = "", i.value = !1;
2663
+ if (!f || !Array.isArray(f.widgets)) {
2664
+ z.error("JSON 格式不正确:缺少 widgets 数组");
2665
+ return;
2666
+ }
2667
+ n.importSchema(f), C.value = "", i.value = !1;
2668
+ }
2669
+ const _ = M(
2670
+ () => JSON.stringify(
2671
+ { formId: n.formId, dbtable: n.dbtable, widgets: n.widgets, events: n.events },
2672
+ null,
2673
+ 2
2674
+ )
2675
+ ), S = O("");
2676
+ let v;
2677
+ function g(D) {
2678
+ const f = document.createElement("textarea");
2679
+ f.value = D, f.style.position = "fixed", f.style.top = "-9999px", f.style.opacity = "0", document.body.appendChild(f), f.select();
2680
+ let I = !1;
2681
+ try {
2682
+ I = document.execCommand("copy");
2683
+ } catch {
2684
+ I = !1;
2685
+ } finally {
2686
+ document.body.removeChild(f);
2687
+ }
2688
+ return I;
2619
2689
  }
2620
- const j = M(() => JSON.stringify(n.toSchema(), null, 2)), _ = M(() => {
2621
- const C = {};
2622
- n.fields.forEach((S) => {
2623
- C[S.name] = S.name;
2690
+ async function $() {
2691
+ var f;
2692
+ let D = !1;
2693
+ try {
2694
+ (f = navigator.clipboard) != null && f.writeText ? (await navigator.clipboard.writeText(_.value), D = !0) : D = g(_.value);
2695
+ } catch {
2696
+ D = g(_.value);
2697
+ }
2698
+ S.value = D ? "已复制" : "复制失败", window.clearTimeout(v), v = window.setTimeout(() => {
2699
+ S.value = "";
2700
+ }, 1500);
2701
+ }
2702
+ const A = M(() => {
2703
+ const D = {};
2704
+ n.fields.forEach((I) => {
2705
+ D[I.name] = I.name;
2624
2706
  });
2625
- const b = (S, H) => (S.forEach((z) => {
2626
- var ke;
2627
- z.type === "subtable" && H.push(z), (ke = z.children) != null && ke.length && b(z.children, H);
2628
- }), H);
2629
- return b(n.widgets, []).forEach((S) => {
2630
- if (S.type !== "subtable" || !S.secondtable) return;
2631
- const H = {};
2632
- (S.colnums ?? []).forEach((z) => {
2633
- H[z.name] = z.name, z.bindLink && (H[z.bindLink] = z.bindLink);
2634
- }), C[S.secondtable] = [H];
2635
- }), C;
2707
+ const f = (I, J) => (I.forEach((H) => {
2708
+ var Te;
2709
+ H.type === "subtable" && J.push(H), (Te = H.children) != null && Te.length && f(H.children, J);
2710
+ }), J);
2711
+ return f(n.widgets, []).forEach((I) => {
2712
+ if (I.type !== "subtable" || !I.secondtable) return;
2713
+ const J = {};
2714
+ (I.colnums ?? []).forEach((H) => {
2715
+ J[H.name] = H.name, H.bindLink && (J[H.bindLink] = H.bindLink);
2716
+ }), D[I.secondtable] = [J];
2717
+ }), D;
2636
2718
  });
2637
- async function D() {
2719
+ async function Y() {
2638
2720
  if (!n.workFormId) {
2639
- window.alert("尚未打开表单,无法保存");
2721
+ z.warning("尚未打开表单,无法保存");
2640
2722
  return;
2641
2723
  }
2642
2724
  if (!n.formName.trim()) {
2643
- window.alert("请先填写表单名称(保存必填)");
2725
+ z.warning("请先填写表单名称(保存必填)");
2644
2726
  return;
2645
2727
  }
2646
2728
  try {
2647
- const C = await n.save();
2648
- C.success ? (Zs(n.formId, n.toSchema()), window.alert(`${C.message}
2649
- 工作表单 ID:${n.workFormId}`)) : window.alert(`保存失败:${C.message}`);
2729
+ const D = await n.save();
2730
+ D.success ? (ol(n.formId, n.toSchema()), u("保存成功", D.message, `工作表单 ID:${n.workFormId}`)) : z.error(`保存失败:${D.message}`);
2650
2731
  } catch {
2651
- window.alert(n.errorMsg || "保存失败");
2732
+ z.error(n.errorMsg || "保存失败");
2652
2733
  }
2653
2734
  }
2654
- async function m() {
2655
- var S, H;
2735
+ async function x() {
2736
+ var I, J;
2656
2737
  if (!n.workFormId) {
2657
- window.alert("尚未打开表单,无法另存为");
2738
+ z.warning("尚未打开表单,无法另存为");
2658
2739
  return;
2659
2740
  }
2660
- const C = (S = window.prompt("新表单名称", `${n.formName || "表单"} 副本`)) == null ? void 0 : S.trim();
2661
- if (!C) return;
2662
- const b = (H = window.prompt("新表单编码(如 SG_ZL_YYQHTSP,_M 结尾为移动端模板)", "")) == null ? void 0 : H.trim();
2663
- if (b)
2741
+ const D = (I = window.prompt("新表单名称", `${n.formName || "表单"} 副本`)) == null ? void 0 : I.trim();
2742
+ if (!D) return;
2743
+ const f = (J = window.prompt("新表单编码(如 SG_ZL_YYQHTSP,_M 结尾为移动端模板)", "")) == null ? void 0 : J.trim();
2744
+ if (f)
2664
2745
  try {
2665
- const z = await n.saveAs(C, b);
2666
- z.success ? window.alert(`${z.message}
2667
- 新表单 ID:${z.newFormID}`) : window.alert(`另存为失败:${z.message}`);
2746
+ const H = await n.saveAs(D, f);
2747
+ H.success ? u("另存为成功", H.message, `新表单 ID:${H.newFormID}`) : z.error(`另存为失败:${H.message}`);
2668
2748
  } catch {
2669
- window.alert(n.errorMsg || "另存为失败");
2749
+ z.error(n.errorMsg || "另存为失败");
2670
2750
  }
2671
2751
  }
2672
- function g() {
2752
+ function b() {
2673
2753
  location.reload();
2674
2754
  }
2675
- async function $() {
2755
+ async function w() {
2676
2756
  if (!n.workFormId) {
2677
- window.alert("尚未打开表单,无法发布");
2757
+ z.warning("尚未打开表单,无法发布");
2678
2758
  return;
2679
2759
  }
2680
2760
  if (!n.formName.trim()) {
2681
- window.alert("请先填写表单名称(发布必填)");
2761
+ z.warning("请先填写表单名称(发布必填)");
2682
2762
  return;
2683
2763
  }
2684
2764
  try {
2685
- const { needConfirm: C, count: b } = await n.checkPublish();
2686
- if (C) {
2687
- r.value = b, u.value = !0;
2765
+ const { needConfirm: D, count: f } = await n.checkPublish();
2766
+ if (D) {
2767
+ l.value = f, r.value = !0;
2688
2768
  return;
2689
2769
  }
2690
- await B();
2770
+ await W();
2691
2771
  } catch {
2692
- window.alert(n.errorMsg || "发布检查失败");
2772
+ z.error(n.errorMsg || "发布检查失败");
2693
2773
  }
2694
2774
  }
2695
- async function B() {
2775
+ async function W() {
2696
2776
  try {
2697
- const C = await n.publish();
2698
- window.alert(C.success ? C.message : `发布失败:${C.message}`);
2777
+ const D = await n.publish();
2778
+ D.success ? z.success(D.message) : z.error(`发布失败:${D.message}`);
2699
2779
  } catch {
2700
- window.alert(n.errorMsg || "发布失败");
2780
+ z.error(n.errorMsg || "发布失败");
2701
2781
  }
2702
2782
  }
2703
- async function q() {
2704
- u.value = !1, await B();
2783
+ async function se() {
2784
+ r.value = !1, await W();
2705
2785
  }
2706
- const x = O(null), p = O(null);
2707
- function w(C) {
2708
- var S, H;
2786
+ const Ie = O(null), De = O(null);
2787
+ function Se(D) {
2788
+ var I, J;
2709
2789
  if (!a.value) return;
2710
- const b = C.target;
2711
- (S = x.value) != null && S.contains(b) || (H = p.value) != null && H.contains(b) || (a.value = !1);
2712
- }
2713
- return ie(() => document.addEventListener("click", w)), je(() => document.removeEventListener("click", w)), (C, b) => (d(), c("div", Il, [
2714
- t("div", Dl, [
2715
- b[18] || (b[18] = t("span", { class: "fd-toolbar-title" }, "表单设计器", -1)),
2790
+ const f = D.target;
2791
+ (I = Ie.value) != null && I.contains(f) || (J = De.value) != null && J.contains(f) || (a.value = !1);
2792
+ }
2793
+ return ce(() => document.addEventListener("click", Se)), Ye(() => {
2794
+ document.removeEventListener("click", Se), window.clearTimeout(v);
2795
+ }), (D, f) => (d(), c("div", Fl, [
2796
+ t("div", Ll, [
2797
+ f[18] || (f[18] = t("span", { class: "fd-toolbar-title" }, "表单设计器", -1)),
2716
2798
  t("input", {
2717
2799
  class: "fd-toolbar-name",
2718
2800
  value: h(n).formName,
2719
2801
  placeholder: "表单名称(保存必填)",
2720
- onInput: b[0] || (b[0] = (S) => h(n).formName = S.target.value)
2721
- }, null, 40, Sl),
2722
- t("div", Tl, [
2723
- h(n).device === "mobile" ? (d(), c("button", Fl, [...b[16] || (b[16] = [
2802
+ onInput: f[0] || (f[0] = (I) => h(n).formName = I.target.value)
2803
+ }, null, 40, Ml),
2804
+ t("div", Nl, [
2805
+ h(n).device === "mobile" ? (d(), c("button", El, [...f[16] || (f[16] = [
2724
2806
  t("svg", {
2725
2807
  class: "fd-tool-btn-icon",
2726
2808
  viewBox: "0 0 24 24",
@@ -2745,7 +2827,7 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
2745
2827
  })
2746
2828
  ], -1),
2747
2829
  U(" 移动端 ", -1)
2748
- ])])) : (d(), c("button", Ll, [...b[17] || (b[17] = [
2830
+ ])])) : (d(), c("button", Pl, [...f[17] || (f[17] = [
2749
2831
  t("svg", {
2750
2832
  class: "fd-tool-btn-icon",
2751
2833
  viewBox: "0 0 24 24",
@@ -2779,11 +2861,11 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
2779
2861
  ])]))
2780
2862
  ])
2781
2863
  ]),
2782
- t("div", Ml, [
2864
+ t("div", Ol, [
2783
2865
  t("button", {
2784
2866
  class: "fd-tool-btn",
2785
- onClick: b[1] || (b[1] = (S) => o.value = !0)
2786
- }, [...b[19] || (b[19] = [
2867
+ onClick: f[1] || (f[1] = (I) => o.value = !0)
2868
+ }, [...f[19] || (f[19] = [
2787
2869
  t("svg", {
2788
2870
  class: "fd-tool-btn-icon",
2789
2871
  viewBox: "0 0 24 24",
@@ -2804,8 +2886,8 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
2804
2886
  ])]),
2805
2887
  t("button", {
2806
2888
  class: "fd-tool-btn",
2807
- onClick: b[2] || (b[2] = (S) => s.value = !0)
2808
- }, [...b[20] || (b[20] = [
2889
+ onClick: f[2] || (f[2] = (I) => s.value = !0)
2890
+ }, [...f[20] || (f[20] = [
2809
2891
  t("svg", {
2810
2892
  class: "fd-tool-btn-icon",
2811
2893
  viewBox: "0 0 24 24",
@@ -2822,8 +2904,8 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
2822
2904
  ])]),
2823
2905
  t("button", {
2824
2906
  class: "fd-tool-btn",
2825
- onClick: b[3] || (b[3] = (S) => i.value = !0)
2826
- }, [...b[21] || (b[21] = [
2907
+ onClick: f[3] || (f[3] = (I) => i.value = !0)
2908
+ }, [...f[21] || (f[21] = [
2827
2909
  t("svg", {
2828
2910
  class: "fd-tool-btn-icon",
2829
2911
  viewBox: "0 0 24 24",
@@ -2846,8 +2928,8 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
2846
2928
  ])]),
2847
2929
  t("button", {
2848
2930
  class: "fd-tool-btn",
2849
- onClick: g
2850
- }, [...b[22] || (b[22] = [
2931
+ onClick: b
2932
+ }, [...f[22] || (f[22] = [
2851
2933
  t("svg", {
2852
2934
  class: "fd-tool-btn-icon",
2853
2935
  viewBox: "0 0 24 24",
@@ -2864,8 +2946,8 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
2864
2946
  ])]),
2865
2947
  t("button", {
2866
2948
  class: "fd-tool-btn",
2867
- onClick: D
2868
- }, [...b[23] || (b[23] = [
2949
+ onClick: Y
2950
+ }, [...f[23] || (f[23] = [
2869
2951
  t("svg", {
2870
2952
  class: "fd-tool-btn-icon",
2871
2953
  viewBox: "0 0 24 24",
@@ -2883,8 +2965,8 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
2883
2965
  ])]),
2884
2966
  t("button", {
2885
2967
  class: "fd-tool-btn",
2886
- onClick: m
2887
- }, [...b[24] || (b[24] = [
2968
+ onClick: x
2969
+ }, [...f[24] || (f[24] = [
2888
2970
  t("svg", {
2889
2971
  class: "fd-tool-btn-icon",
2890
2972
  viewBox: "0 0 24 24",
@@ -2907,8 +2989,8 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
2907
2989
  ])]),
2908
2990
  t("button", {
2909
2991
  class: "fd-tool-btn fd-tool-btn--primary",
2910
- onClick: $
2911
- }, [...b[25] || (b[25] = [
2992
+ onClick: w
2993
+ }, [...f[25] || (f[25] = [
2912
2994
  t("svg", {
2913
2995
  class: "fd-tool-btn-icon",
2914
2996
  viewBox: "0 0 24 24",
@@ -2928,13 +3010,13 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
2928
3010
  ], -1),
2929
3011
  U(" 发布 ", -1)
2930
3012
  ])]),
2931
- b[29] || (b[29] = t("span", { class: "fd-toolbar-divider" }, null, -1)),
3013
+ f[29] || (f[29] = t("span", { class: "fd-toolbar-divider" }, null, -1)),
2932
3014
  t("button", {
2933
3015
  class: "fd-tool-btn fd-tool-icon-btn",
2934
3016
  disabled: !h(n).canUndo,
2935
3017
  title: "撤销",
2936
- onClick: b[4] || (b[4] = (S) => h(n).undo())
2937
- }, [...b[26] || (b[26] = [
3018
+ onClick: f[4] || (f[4] = (I) => h(n).undo())
3019
+ }, [...f[26] || (f[26] = [
2938
3020
  t("svg", {
2939
3021
  class: "fd-tool-icon",
2940
3022
  viewBox: "0 0 24 24",
@@ -2947,13 +3029,13 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
2947
3029
  t("polyline", { points: "9 14 4 9 9 4" }),
2948
3030
  t("path", { d: "M20 20v-7a4 4 0 0 0-4-4H4" })
2949
3031
  ], -1)
2950
- ])], 8, Nl),
3032
+ ])], 8, Ul),
2951
3033
  t("button", {
2952
3034
  class: "fd-tool-btn fd-tool-icon-btn",
2953
3035
  disabled: !h(n).canRedo,
2954
3036
  title: "重做",
2955
- onClick: b[5] || (b[5] = (S) => h(n).redo())
2956
- }, [...b[27] || (b[27] = [
3037
+ onClick: f[5] || (f[5] = (I) => h(n).redo())
3038
+ }, [...f[27] || (f[27] = [
2957
3039
  t("svg", {
2958
3040
  class: "fd-tool-icon",
2959
3041
  viewBox: "0 0 24 24",
@@ -2966,124 +3048,153 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
2966
3048
  t("polyline", { points: "15 14 20 9 15 4" }),
2967
3049
  t("path", { d: "M4 20v-7a4 4 0 0 1 4-4h12" })
2968
3050
  ], -1)
2969
- ])], 8, El),
3051
+ ])], 8, Bl),
2970
3052
  t("button", {
2971
3053
  ref_key: "treeBtnRef",
2972
- ref: p,
3054
+ ref: De,
2973
3055
  class: "fd-tool-btn",
2974
- onClick: b[6] || (b[6] = (S) => a.value = !a.value)
2975
- }, [...b[28] || (b[28] = [
2976
- ve('<svg class="fd-tool-btn-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" data-v-eae12460><line x1="8" y1="6" x2="21" y2="6" data-v-eae12460></line><line x1="8" y1="12" x2="21" y2="12" data-v-eae12460></line><line x1="8" y1="18" x2="21" y2="18" data-v-eae12460></line><line x1="3" y1="6" x2="3.01" y2="6" data-v-eae12460></line><line x1="3" y1="12" x2="3.01" y2="12" data-v-eae12460></line><line x1="3" y1="18" x2="3.01" y2="18" data-v-eae12460></line></svg> 组件树 ', 2)
3056
+ onClick: f[6] || (f[6] = (I) => a.value = !a.value)
3057
+ }, [...f[28] || (f[28] = [
3058
+ we('<svg class="fd-tool-btn-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" data-v-da21485c><line x1="8" y1="6" x2="21" y2="6" data-v-da21485c></line><line x1="8" y1="12" x2="21" y2="12" data-v-da21485c></line><line x1="8" y1="18" x2="21" y2="18" data-v-da21485c></line><line x1="3" y1="6" x2="3.01" y2="6" data-v-da21485c></line><line x1="3" y1="12" x2="3.01" y2="12" data-v-da21485c></line><line x1="3" y1="18" x2="3.01" y2="18" data-v-da21485c></line></svg> 组件树 ', 2)
2977
3059
  ])], 512)
2978
3060
  ]),
2979
- (d(), V(pe, { to: "body" }, [
3061
+ (d(), V(ke, { to: "body" }, [
2980
3062
  o.value ? (d(), c("div", {
2981
3063
  key: 0,
2982
3064
  class: "fd-dialog-mask",
2983
- onClick: b[9] || (b[9] = J((S) => o.value = !1, ["self"]))
3065
+ onClick: f[9] || (f[9] = q((I) => o.value = !1, ["self"]))
2984
3066
  }, [
2985
- t("div", Pl, [
2986
- t("div", Ol, [
2987
- b[32] || (b[32] = t("span", null, "预览", -1)),
2988
- t("div", Ul, [
2989
- b[30] || (b[30] = t("label", { for: "fd-preview-width-input" }, "宽度", -1)),
2990
- F(h(Ze), {
3067
+ t("div", Vl, [
3068
+ t("div", Al, [
3069
+ f[32] || (f[32] = t("span", null, "预览", -1)),
3070
+ t("div", jl, [
3071
+ f[30] || (f[30] = t("label", { for: "fd-preview-width-input" }, "宽度", -1)),
3072
+ L(h(it), {
2991
3073
  id: "fd-preview-width-input",
2992
- modelValue: f.value,
2993
- "onUpdate:modelValue": b[7] || (b[7] = (S) => f.value = S),
3074
+ modelValue: p.value,
3075
+ "onUpdate:modelValue": f[7] || (f[7] = (I) => p.value = I),
2994
3076
  min: 270,
2995
3077
  max: 1200,
2996
3078
  step: 10,
2997
3079
  size: "small",
2998
3080
  "controls-position": "right",
2999
- onChange: v
3081
+ onChange: y
3000
3082
  }, null, 8, ["modelValue"]),
3001
- b[31] || (b[31] = t("span", { class: "fd-preview-width-unit" }, "px", -1))
3083
+ f[31] || (f[31] = t("span", { class: "fd-preview-width-unit" }, "px", -1))
3002
3084
  ]),
3003
3085
  t("button", {
3004
3086
  class: "fd-tool-btn",
3005
- onClick: b[8] || (b[8] = (S) => o.value = !1)
3087
+ onClick: f[8] || (f[8] = (I) => o.value = !1)
3006
3088
  }, "关闭")
3007
3089
  ]),
3008
- t("div", Bl, [
3090
+ t("div", Rl, [
3009
3091
  t("div", {
3010
3092
  class: "fd-preview-stage",
3011
- style: G({ width: f.value + "px" })
3093
+ style: K({ width: p.value + "px" })
3012
3094
  }, [
3013
- F(Oe, {
3095
+ L(We, {
3014
3096
  widgets: h(n).widgets,
3015
- "form-data": _.value
3097
+ "form-data": A.value
3016
3098
  }, null, 8, ["widgets", "form-data"])
3017
3099
  ], 4)
3018
3100
  ])
3019
3101
  ])
3020
- ])) : I("", !0),
3102
+ ])) : T("", !0),
3021
3103
  s.value ? (d(), c("div", {
3022
3104
  key: 1,
3023
3105
  class: "fd-dialog-mask",
3024
- onClick: b[11] || (b[11] = J((S) => s.value = !1, ["self"]))
3106
+ onClick: f[11] || (f[11] = q((I) => s.value = !1, ["self"]))
3025
3107
  }, [
3026
- t("div", Vl, [
3027
- t("div", jl, [
3028
- b[33] || (b[33] = t("span", null, "JSON Schema", -1)),
3108
+ t("div", Jl, [
3109
+ t("div", zl, [
3110
+ f[34] || (f[34] = t("span", null, "JSON Schema", -1)),
3029
3111
  t("button", {
3030
3112
  class: "fd-tool-btn",
3031
- onClick: b[10] || (b[10] = (S) => s.value = !1)
3113
+ onClick: $
3114
+ }, [
3115
+ f[33] || (f[33] = t("svg", {
3116
+ class: "fd-tool-btn-icon",
3117
+ viewBox: "0 0 24 24",
3118
+ fill: "none",
3119
+ stroke: "currentColor",
3120
+ "stroke-width": "1.8",
3121
+ "stroke-linecap": "round",
3122
+ "stroke-linejoin": "round"
3123
+ }, [
3124
+ t("rect", {
3125
+ x: "9",
3126
+ y: "9",
3127
+ width: "13",
3128
+ height: "13",
3129
+ rx: "2",
3130
+ ry: "2"
3131
+ }),
3132
+ t("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
3133
+ ], -1)),
3134
+ U(" " + k(S.value || "复制JSON"), 1)
3135
+ ]),
3136
+ t("button", {
3137
+ class: "fd-tool-btn",
3138
+ onClick: f[10] || (f[10] = (I) => s.value = !1)
3032
3139
  }, "关闭")
3033
3140
  ]),
3034
- t("pre", Rl, y(j.value), 1)
3141
+ t("textarea", {
3142
+ class: "fd-dialog-code",
3143
+ value: _.value,
3144
+ readonly: ""
3145
+ }, null, 8, Wl)
3035
3146
  ])
3036
- ])) : I("", !0),
3147
+ ])) : T("", !0),
3037
3148
  i.value ? (d(), c("div", {
3038
3149
  key: 2,
3039
3150
  class: "fd-dialog-mask",
3040
- onClick: b[14] || (b[14] = J((S) => i.value = !1, ["self"]))
3151
+ onClick: f[14] || (f[14] = q((I) => i.value = !1, ["self"]))
3041
3152
  }, [
3042
- t("div", Al, [
3043
- t("div", zl, [
3044
- b[34] || (b[34] = t("span", null, "导入(粘贴 JSON)", -1)),
3153
+ t("div", Hl, [
3154
+ t("div", ql, [
3155
+ f[35] || (f[35] = t("span", null, "导入(粘贴 JSON)", -1)),
3045
3156
  t("button", {
3046
3157
  class: "fd-tool-btn",
3047
- onClick: b[12] || (b[12] = (S) => i.value = !1)
3158
+ onClick: f[12] || (f[12] = (I) => i.value = !1)
3048
3159
  }, "取消"),
3049
3160
  t("button", {
3050
3161
  class: "fd-tool-btn fd-tool-btn--primary",
3051
- onClick: P
3162
+ onClick: B
3052
3163
  }, "确认")
3053
3164
  ]),
3054
- t("div", Jl, [
3055
- ce(t("textarea", {
3056
- "onUpdate:modelValue": b[13] || (b[13] = (S) => k.value = S),
3165
+ t("div", Gl, [
3166
+ fe(t("textarea", {
3167
+ "onUpdate:modelValue": f[13] || (f[13] = (I) => C.value = I),
3057
3168
  class: "fd-dialog-import-text",
3058
- placeholder: "请粘贴表单 JSON(可从「查看代码」复制),确认后将覆盖当前表单"
3169
+ placeholder: "请粘贴表单 JSON(可从「查看代码」复制),确认后仅覆盖表单结构,保留业务对象"
3059
3170
  }, null, 512), [
3060
- [Re, k.value]
3171
+ [Ke, C.value]
3061
3172
  ])
3062
3173
  ])
3063
3174
  ])
3064
- ])) : I("", !0),
3175
+ ])) : T("", !0),
3065
3176
  a.value ? (d(), c("div", {
3066
3177
  key: 3,
3067
3178
  ref_key: "treeDrawerRef",
3068
- ref: x,
3179
+ ref: Ie,
3069
3180
  class: "fd-tree-drawer"
3070
3181
  }, [
3071
- F(cl)
3072
- ], 512)) : I("", !0),
3073
- F(_l, {
3074
- modelValue: u.value,
3075
- "onUpdate:modelValue": b[15] || (b[15] = (S) => u.value = S),
3182
+ L(vl)
3183
+ ], 512)) : T("", !0),
3184
+ L(Tl, {
3185
+ modelValue: r.value,
3186
+ "onUpdate:modelValue": f[15] || (f[15] = (I) => r.value = I),
3076
3187
  "form-id": h(n).originFormId,
3077
- count: r.value,
3078
- onConfirm: q
3188
+ count: l.value,
3189
+ onConfirm: se
3079
3190
  }, null, 8, ["modelValue", "form-id", "count"])
3080
3191
  ]))
3081
3192
  ]));
3082
3193
  }
3083
- }), Hl = /* @__PURE__ */ E(Wl, [["__scopeId", "data-v-eae12460"]]), ql = { class: "fd-palette" }, Gl = { class: "fd-palette-group-title" }, Yl = ["onDragstart", "onClick"], Kl = { class: "fd-palette-icon" }, Ql = /* @__PURE__ */ L({
3194
+ }), Kl = /* @__PURE__ */ P(Yl, [["__scopeId", "data-v-da21485c"]]), Ql = { class: "fd-palette" }, Xl = { class: "fd-palette-group-title" }, Zl = ["onDragstart", "onClick"], ea = { class: "fd-palette-icon" }, ta = /* @__PURE__ */ E({
3084
3195
  __name: "WidgetPalette",
3085
3196
  setup(e) {
3086
- const n = W(), o = tt(), s = [
3197
+ const n = G(), o = ut(), s = [
3087
3198
  {
3088
3199
  title: "基础控件",
3089
3200
  types: ["label", "text"]
@@ -3105,55 +3216,55 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
3105
3216
  subtable: "☰"
3106
3217
  };
3107
3218
  function i(l) {
3108
- return o.find((f) => f.type === l);
3219
+ return o.find((m) => m.type === l);
3109
3220
  }
3110
- function u(l, f) {
3111
- var v;
3112
- (v = l.dataTransfer) == null || v.setData("application/x-fd-new", f), l.dataTransfer && (l.dataTransfer.effectAllowed = "copy");
3221
+ function u(l, m) {
3222
+ var p;
3223
+ (p = l.dataTransfer) == null || p.setData("application/x-fd-new", m), l.dataTransfer && (l.dataTransfer.effectAllowed = "copy");
3113
3224
  }
3114
3225
  function r(l) {
3115
3226
  n.addWidget(l);
3116
3227
  }
3117
- return (l, f) => (d(), c("div", ql, [
3118
- f[0] || (f[0] = t("div", { class: "fd-palette-title" }, "控件库", -1)),
3119
- (d(), c(T, null, N(s, (v) => t("div", {
3120
- key: v.title,
3228
+ return (l, m) => (d(), c("div", Ql, [
3229
+ m[0] || (m[0] = t("div", { class: "fd-palette-title" }, "控件库", -1)),
3230
+ (d(), c(F, null, N(s, (p) => t("div", {
3231
+ key: p.title,
3121
3232
  class: "fd-palette-group"
3122
3233
  }, [
3123
- t("div", Gl, y(v.title), 1),
3124
- (d(!0), c(T, null, N(v.types, (k) => (d(), c(T, { key: k }, [
3125
- i(k) ? (d(), c("div", {
3234
+ t("div", Xl, k(p.title), 1),
3235
+ (d(!0), c(F, null, N(p.types, (y) => (d(), c(F, { key: y }, [
3236
+ i(y) ? (d(), c("div", {
3126
3237
  key: 0,
3127
3238
  class: "fd-palette-item",
3128
3239
  draggable: "true",
3129
- onDragstart: (P) => u(P, k),
3130
- onClick: (P) => r(k)
3240
+ onDragstart: (C) => u(C, y),
3241
+ onClick: (C) => r(y)
3131
3242
  }, [
3132
- t("span", Kl, y(a[k]), 1),
3133
- t("span", null, y(i(k).title), 1)
3134
- ], 40, Yl)) : I("", !0)
3243
+ t("span", ea, k(a[y]), 1),
3244
+ t("span", null, k(i(y).title), 1)
3245
+ ], 40, Zl)) : T("", !0)
3135
3246
  ], 64))), 128))
3136
3247
  ])), 64))
3137
3248
  ]));
3138
3249
  }
3139
- }), Xl = /* @__PURE__ */ E(Ql, [["__scopeId", "data-v-6a2bab90"]]), Zl = [
3250
+ }), na = /* @__PURE__ */ P(ta, [["__scopeId", "data-v-6a2bab90"]]), oa = [
3140
3251
  { key: "onLoad", label: "加载完成", desc: "表单数据就绪后触发" },
3141
3252
  { key: "onMounted", label: "渲染挂载", desc: "渲染完成并挂载到 DOM 后触发" },
3142
3253
  { key: "onValueChange", label: "值变化", desc: "任意字段值变化时触发" },
3143
3254
  { key: "custom", label: "自定义方法", desc: "写入的方法将挂载至全局 window,可在其他事件处理中调用" }
3144
- ], ea = { class: "fd-form-events" }, ta = { class: "fd-form-meta" }, na = { class: "fd-events-section" }, oa = { class: "fd-event-head" }, sa = ["title"], la = { class: "fd-event-key" }, aa = ["onClick", "title"], ia = {
3255
+ ], sa = { class: "fd-form-events" }, la = { class: "fd-form-meta" }, aa = { class: "fd-events-section" }, ia = { class: "fd-event-head" }, da = ["title"], ra = { class: "fd-event-key" }, ua = ["onClick", "title"], ca = {
3145
3256
  key: 0,
3146
3257
  class: "fd-event-trigger-text"
3147
- }, da = {
3258
+ }, fa = {
3148
3259
  key: 1,
3149
3260
  class: "fd-event-trigger-placeholder"
3150
- }, ra = {
3261
+ }, ma = {
3151
3262
  class: "fd-dialog",
3152
3263
  style: { "max-width": "600px" }
3153
- }, ua = { class: "fd-dialog-head" }, ca = { class: "fd-dialog-body" }, fa = /* @__PURE__ */ L({
3264
+ }, pa = { class: "fd-dialog-head" }, va = { class: "fd-dialog-body" }, ba = /* @__PURE__ */ E({
3154
3265
  __name: "FormEventsPanel",
3155
3266
  setup(e) {
3156
- const n = Ae(() => import("./CodeEditor-CJeYvarM.js")), o = W(), s = Ie({
3267
+ const n = Qe(() => import("./CodeEditor-LYxKHZlN.js")), o = G(), s = Pe({
3157
3268
  open: !1,
3158
3269
  type: "",
3159
3270
  hookKey: "",
@@ -3170,54 +3281,54 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
3170
3281
  function u() {
3171
3282
  s.open = !1;
3172
3283
  }
3173
- return (r, l) => (d(), c("div", ea, [
3284
+ return (r, l) => (d(), c("div", sa, [
3174
3285
  l[4] || (l[4] = t("div", { class: "fd-property-title" }, "表单属性", -1)),
3175
- t("div", ta, [
3176
- t("span", null, "表单:" + y(h(o).formId), 1),
3177
- t("span", null, "主表:" + y(h(o).dbtable), 1)
3286
+ t("div", la, [
3287
+ t("span", null, "表单:" + k(h(o).formId), 1),
3288
+ t("span", null, "主表:" + k(h(o).dbtable), 1)
3178
3289
  ]),
3179
- t("section", na, [
3290
+ t("section", aa, [
3180
3291
  l[2] || (l[2] = t("h4", { class: "fd-events-h" }, "全局事件 · 生命周期", -1)),
3181
3292
  l[3] || (l[3] = t("p", { class: "fd-events-tip" }, "渲染时绑定至对应钩子函数中执行", -1)),
3182
- (d(!0), c(T, null, N(h(Zl), (f) => (d(), c("div", {
3183
- key: f.key,
3293
+ (d(!0), c(F, null, N(h(oa), (m) => (d(), c("div", {
3294
+ key: m.key,
3184
3295
  class: "fd-event-row"
3185
3296
  }, [
3186
- t("div", oa, [
3297
+ t("div", ia, [
3187
3298
  t("label", {
3188
- title: f.desc
3189
- }, y(f.label), 9, sa),
3190
- t("code", la, y(f.key), 1)
3299
+ title: m.desc
3300
+ }, k(m.label), 9, da),
3301
+ t("code", ra, k(m.key), 1)
3191
3302
  ]),
3192
3303
  t("div", {
3193
3304
  class: "fd-event-trigger",
3194
- onClick: (v) => a(f),
3195
- title: h(o).events.lifecycle[f.key] || "点击编写处理函数"
3305
+ onClick: (p) => a(m),
3306
+ title: h(o).events.lifecycle[m.key] || "点击编写处理函数"
3196
3307
  }, [
3197
- h(o).events.lifecycle[f.key] ? (d(), c("span", ia, y(h(o).events.lifecycle[f.key]), 1)) : (d(), c("span", da, "点击编写")),
3308
+ h(o).events.lifecycle[m.key] ? (d(), c("span", ca, k(h(o).events.lifecycle[m.key]), 1)) : (d(), c("span", fa, "点击编写")),
3198
3309
  l[1] || (l[1] = t("span", { class: "fd-event-trigger-arrow" }, "›", -1))
3199
- ], 8, aa)
3310
+ ], 8, ua)
3200
3311
  ]))), 128))
3201
3312
  ]),
3202
- (d(), V(pe, { to: "body" }, [
3313
+ (d(), V(ke, { to: "body" }, [
3203
3314
  s.open ? (d(), c("div", {
3204
3315
  key: 0,
3205
3316
  class: "fd-dialog-mask",
3206
- onClick: J(u, ["self"])
3317
+ onClick: q(u, ["self"])
3207
3318
  }, [
3208
- t("div", ra, [
3209
- t("div", ua, [
3210
- t("span", null, "编写处理函数 - " + y(s.title), 1),
3319
+ t("div", ma, [
3320
+ t("div", pa, [
3321
+ t("span", null, "编写处理函数 - " + k(s.title), 1),
3211
3322
  t("button", {
3212
3323
  class: "fd-dialog-close",
3213
3324
  onClick: u,
3214
3325
  title: "关闭"
3215
3326
  }, "×")
3216
3327
  ]),
3217
- t("div", ca, [
3218
- F(h(n), {
3328
+ t("div", va, [
3329
+ L(h(n), {
3219
3330
  modelValue: s.draft,
3220
- "onUpdate:modelValue": l[0] || (l[0] = (f) => s.draft = f),
3331
+ "onUpdate:modelValue": l[0] || (l[0] = (m) => s.draft = m),
3221
3332
  language: "javascript"
3222
3333
  }, null, 8, ["modelValue"])
3223
3334
  ]),
@@ -3228,20 +3339,20 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
3228
3339
  }, "确定")
3229
3340
  ])
3230
3341
  ])
3231
- ])) : I("", !0)
3342
+ ])) : T("", !0)
3232
3343
  ]))
3233
3344
  ]));
3234
3345
  }
3235
- }), ma = /* @__PURE__ */ E(fa, [["__scopeId", "data-v-7e5a3f15"]]), pa = { class: "fd-property" }, va = {
3346
+ }), ga = /* @__PURE__ */ P(ba, [["__scopeId", "data-v-7e5a3f15"]]), ha = { class: "fd-property" }, ya = {
3236
3347
  key: 1,
3237
3348
  class: "fd-property-empty"
3238
- }, ba = {
3349
+ }, ka = {
3239
3350
  key: 1,
3240
3351
  class: "fd-property-item"
3241
- }, ga = ["value"], ha = { class: "fd-property-foot" }, ya = { class: "fd-property-type" }, ka = /* @__PURE__ */ L({
3352
+ }, wa = ["value"], $a = { class: "fd-property-foot" }, xa = { class: "fd-property-type" }, Ca = /* @__PURE__ */ E({
3242
3353
  __name: "PropertyPanel",
3243
3354
  setup(e) {
3244
- const n = W(), o = M(() => n.selectedNode), s = M(() => o.value ? K(o.value.type) : void 0), a = M(() => {
3355
+ const n = G(), o = M(() => n.selectedNode), s = M(() => o.value ? X(o.value.type) : void 0), a = M(() => {
3245
3356
  var l;
3246
3357
  return (l = s.value) == null ? void 0 : l.panel;
3247
3358
  });
@@ -3251,34 +3362,34 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
3251
3362
  const u = M(() => o.value != null && o.value.gridSpan != null);
3252
3363
  function r(l) {
3253
3364
  if (!o.value) return;
3254
- const f = Number(l.target.value), v = Math.min(24, Math.max(1, Number.isFinite(f) ? Math.round(f) : 24));
3255
- n.updateNode(o.value.id, { gridSpan: v });
3256
- }
3257
- return (l, f) => {
3258
- var v;
3259
- return d(), c("div", pa, [
3260
- f[2] || (f[2] = t("div", { class: "fd-property-title" }, "属性", -1)),
3261
- h(n).selectedForm ? (d(), V(ma, { key: 0 })) : o.value ? (d(), c(T, { key: 2 }, [
3262
- a.value ? (d(), V(me(a.value), {
3365
+ const m = Number(l.target.value), p = Math.min(24, Math.max(1, Number.isFinite(m) ? Math.round(m) : 24));
3366
+ n.updateNode(o.value.id, { gridSpan: p });
3367
+ }
3368
+ return (l, m) => {
3369
+ var p;
3370
+ return d(), c("div", ha, [
3371
+ m[2] || (m[2] = t("div", { class: "fd-property-title" }, "属性", -1)),
3372
+ h(n).selectedForm ? (d(), V(ga, { key: 0 })) : o.value ? (d(), c(F, { key: 2 }, [
3373
+ a.value ? (d(), V(he(a.value), {
3263
3374
  key: 0,
3264
3375
  node: o.value,
3265
3376
  fields: h(n).fields,
3266
3377
  onUpdate: i
3267
- }, null, 40, ["node", "fields"])) : I("", !0),
3268
- u.value ? (d(), c("div", ba, [
3269
- f[1] || (f[1] = t("label", null, "占比", -1)),
3378
+ }, null, 40, ["node", "fields"])) : T("", !0),
3379
+ u.value ? (d(), c("div", ka, [
3380
+ m[1] || (m[1] = t("label", null, "占比", -1)),
3270
3381
  t("input", {
3271
3382
  type: "number",
3272
3383
  min: "1",
3273
3384
  max: "24",
3274
3385
  value: o.value.gridSpan,
3275
3386
  onChange: r
3276
- }, null, 40, ga)
3277
- ])) : I("", !0),
3278
- t("div", ha, [
3279
- t("span", ya, "类型:" + y((v = s.value) == null ? void 0 : v.title), 1)
3387
+ }, null, 40, wa)
3388
+ ])) : T("", !0),
3389
+ t("div", $a, [
3390
+ t("span", xa, "类型:" + k((p = s.value) == null ? void 0 : p.title), 1)
3280
3391
  ])
3281
- ], 64)) : (d(), c("div", va, [...f[0] || (f[0] = [
3392
+ ], 64)) : (d(), c("div", ya, [...m[0] || (m[0] = [
3282
3393
  t("span", { class: "fd-property-empty-icon" }, "⚙", -1),
3283
3394
  t("span", null, [
3284
3395
  U("请选择左侧控件"),
@@ -3289,10 +3400,10 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
3289
3400
  ]);
3290
3401
  };
3291
3402
  }
3292
- }), wa = /* @__PURE__ */ E(ka, [["__scopeId", "data-v-e89617c7"]]), $a = {
3403
+ }), _a = /* @__PURE__ */ P(Ca, [["__scopeId", "data-v-e89617c7"]]), Ia = {
3293
3404
  key: 0,
3294
3405
  class: "fd-canvas-dropzone"
3295
- }, xa = /* @__PURE__ */ L({
3406
+ }, Da = /* @__PURE__ */ E({
3296
3407
  __name: "CanvasNode",
3297
3408
  props: {
3298
3409
  node: {},
@@ -3300,69 +3411,69 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
3300
3411
  index: {}
3301
3412
  },
3302
3413
  setup(e) {
3303
- const n = e, o = W(), s = O(null), a = M(() => {
3304
- const m = {};
3305
- return n.node.gridSpan != null && (m.gridColumn = `span ${n.node.gridSpan}`), n.node.type === "text" && (m.display = n.node.display || "inline-block"), Object.keys(m).length ? m : void 0;
3414
+ const n = e, o = G(), s = O(null), a = M(() => {
3415
+ const v = {};
3416
+ return n.node.gridSpan != null && (v.gridColumn = `span ${n.node.gridSpan}`), n.node.type === "text" && (v.display = n.node.display || "inline-block"), Object.keys(v).length ? v : void 0;
3306
3417
  }), i = () => {
3307
- var m;
3308
- return (m = K(n.node.type)) == null ? void 0 : m.isContainer;
3418
+ var v;
3419
+ return (v = X(n.node.type)) == null ? void 0 : v.isContainer;
3309
3420
  };
3310
- function u(m, g) {
3421
+ function u(v, g) {
3311
3422
  if (n.node.type !== "grid") return "";
3312
3423
  const $ = n.node.layout || 24;
3313
- return Fe(m, g, n.node.children || [], $, o.device === "mobile");
3424
+ return Ve(v, g, n.node.children || [], $, o.device === "mobile");
3314
3425
  }
3315
- function r(m) {
3316
- const g = m.dataTransfer;
3426
+ function r(v) {
3427
+ const g = v.dataTransfer;
3317
3428
  return !!g && (g.types.includes("application/x-fd-new") || g.types.includes("application/x-fd-move"));
3318
3429
  }
3319
3430
  function l() {
3320
3431
  o.select(n.node.id);
3321
3432
  }
3322
- function f(m) {
3433
+ function m(v) {
3323
3434
  var g;
3324
- m.stopPropagation(), o.setDragging(n.node.id), (g = m.dataTransfer) == null || g.setData("application/x-fd-move", n.node.id), m.dataTransfer && (m.dataTransfer.effectAllowed = "move");
3435
+ v.stopPropagation(), o.setDragging(n.node.id), (g = v.dataTransfer) == null || g.setData("application/x-fd-move", n.node.id), v.dataTransfer && (v.dataTransfer.effectAllowed = "move");
3325
3436
  }
3326
- function v() {
3437
+ function p() {
3327
3438
  o.dragOverId = null, o.dropContainerId = null, o.dragBefore = !1, o.setDragging(null);
3328
3439
  }
3329
- function k(m) {
3330
- m.stopPropagation(), v();
3440
+ function y(v) {
3441
+ v.stopPropagation(), p();
3331
3442
  }
3332
- function P() {
3443
+ function C() {
3333
3444
  o.dragOverId === n.node.id && (o.dragOverId = null), o.dropContainerId === n.node.id && (o.dropContainerId = null);
3334
3445
  }
3335
- function j(m) {
3336
- if (r(m))
3337
- if (m.preventDefault(), m.stopPropagation(), i())
3446
+ function B(v) {
3447
+ if (r(v))
3448
+ if (v.preventDefault(), v.stopPropagation(), i())
3338
3449
  o.dragOverId = null, o.dragBefore = !1, o.dropContainerId = n.node.id;
3339
3450
  else {
3340
3451
  o.dropContainerId = null, o.dragOverId = n.node.id;
3341
3452
  const g = s.value;
3342
3453
  if (g) {
3343
3454
  const $ = g.getBoundingClientRect();
3344
- o.dragBefore = m.clientY - $.top < $.height / 2;
3455
+ o.dragBefore = v.clientY - $.top < $.height / 2;
3345
3456
  }
3346
3457
  }
3347
3458
  }
3348
3459
  function _() {
3349
- P();
3460
+ C();
3350
3461
  }
3351
- function D(m) {
3352
- var B, q, x;
3353
- if (!r(m)) return;
3354
- m.preventDefault(), m.stopPropagation();
3355
- const g = (B = m.dataTransfer) == null ? void 0 : B.getData("application/x-fd-new"), $ = (q = m.dataTransfer) == null ? void 0 : q.getData("application/x-fd-move");
3462
+ function S(v) {
3463
+ var A, Y, x;
3464
+ if (!r(v)) return;
3465
+ v.preventDefault(), v.stopPropagation();
3466
+ const g = (A = v.dataTransfer) == null ? void 0 : A.getData("application/x-fd-new"), $ = (Y = v.dataTransfer) == null ? void 0 : Y.getData("application/x-fd-move");
3356
3467
  if (i())
3357
3468
  g ? o.addWidget(g, n.node.id) : $ && o.moveNode($, n.node.id, ((x = n.node.children) == null ? void 0 : x.length) ?? 0);
3358
3469
  else {
3359
- const p = o.dragBefore ? n.index : n.index + 1;
3360
- g ? o.addWidget(g, n.parentId, p) : $ && o.moveNode($, n.parentId, p);
3470
+ const b = o.dragBefore ? n.index : n.index + 1;
3471
+ g ? o.addWidget(g, n.parentId, b) : $ && o.moveNode($, n.parentId, b);
3361
3472
  }
3362
3473
  o.dragOverId = null, o.dragBefore = !1, o.dropContainerId = null;
3363
3474
  }
3364
- return (m, g) => {
3365
- const $ = Se("CanvasNode", !0);
3475
+ return (v, g) => {
3476
+ const $ = Ue("CanvasNode", !0);
3366
3477
  return d(), c("div", {
3367
3478
  ref_key: "rootEl",
3368
3479
  ref: s,
@@ -3375,26 +3486,26 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
3375
3486
  "dragging-source": h(o).draggingId === e.node.id
3376
3487
  }
3377
3488
  ]]),
3378
- style: G(a.value),
3489
+ style: K(a.value),
3379
3490
  draggable: "true",
3380
- onMousedown: J(l, ["stop"]),
3381
- onClick: g[4] || (g[4] = J(() => {
3491
+ onMousedown: q(l, ["stop"]),
3492
+ onClick: g[4] || (g[4] = q(() => {
3382
3493
  }, ["stop"])),
3383
- onDragstart: f,
3384
- onDragend: k,
3385
- onDragover: j,
3494
+ onDragstart: m,
3495
+ onDragend: y,
3496
+ onDragover: B,
3386
3497
  onDragleave: _,
3387
- onDrop: D
3498
+ onDrop: S
3388
3499
  }, [
3389
3500
  t("div", {
3390
3501
  class: "fd-canvas-node-actions",
3391
- onMousedown: g[3] || (g[3] = J(() => {
3502
+ onMousedown: g[3] || (g[3] = q(() => {
3392
3503
  }, ["stop"]))
3393
3504
  }, [
3394
3505
  t("span", {
3395
3506
  class: "fd-node-action",
3396
3507
  title: "上移",
3397
- onClick: g[0] || (g[0] = J((B) => h(o).moveSibling(e.node.id, -1), ["stop"]))
3508
+ onClick: g[0] || (g[0] = q((A) => h(o).moveSibling(e.node.id, -1), ["stop"]))
3398
3509
  }, [...g[5] || (g[5] = [
3399
3510
  t("svg", {
3400
3511
  class: "fd-node-icon",
@@ -3417,7 +3528,7 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
3417
3528
  t("span", {
3418
3529
  class: "fd-node-action",
3419
3530
  title: "下移",
3420
- onClick: g[1] || (g[1] = J((B) => h(o).moveSibling(e.node.id, 1), ["stop"]))
3531
+ onClick: g[1] || (g[1] = q((A) => h(o).moveSibling(e.node.id, 1), ["stop"]))
3421
3532
  }, [...g[6] || (g[6] = [
3422
3533
  t("svg", {
3423
3534
  class: "fd-node-icon",
@@ -3440,26 +3551,26 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
3440
3551
  t("span", {
3441
3552
  class: "fd-node-action delete",
3442
3553
  title: "删除",
3443
- onClick: g[2] || (g[2] = J((B) => h(o).removeWidget(e.node.id), ["stop"]))
3554
+ onClick: g[2] || (g[2] = q((A) => h(o).removeWidget(e.node.id), ["stop"]))
3444
3555
  }, [...g[7] || (g[7] = [
3445
- ve('<svg class="fd-node-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" data-v-3f3a43d3><path d="M4 7h16" data-v-3f3a43d3></path><path d="M9 7V5.5a1.5 1.5 0 0 1 1.5-1.5h3A1.5 1.5 0 0 1 15 5.5V7" data-v-3f3a43d3></path><path d="M6.5 7l1 12.5h9l1-12.5" data-v-3f3a43d3></path><line x1="10" y1="11" x2="10" y2="16.5" data-v-3f3a43d3></line><line x1="14" y1="11" x2="14" y2="16.5" data-v-3f3a43d3></line></svg>', 1)
3556
+ we('<svg class="fd-node-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" data-v-3f3a43d3><path d="M4 7h16" data-v-3f3a43d3></path><path d="M9 7V5.5a1.5 1.5 0 0 1 1.5-1.5h3A1.5 1.5 0 0 1 15 5.5V7" data-v-3f3a43d3></path><path d="M6.5 7l1 12.5h9l1-12.5" data-v-3f3a43d3></path><line x1="10" y1="11" x2="10" y2="16.5" data-v-3f3a43d3></line><line x1="14" y1="11" x2="14" y2="16.5" data-v-3f3a43d3></line></svg>', 1)
3446
3557
  ])])
3447
3558
  ], 32),
3448
- F(ge, {
3559
+ L(xe, {
3449
3560
  node: e.node,
3450
3561
  mode: "design"
3451
- }, ae({ _: 2 }, [
3562
+ }, re({ _: 2 }, [
3452
3563
  i() && e.node.children ? {
3453
3564
  name: "children",
3454
- fn: A(() => [
3455
- (d(!0), c(T, null, N(e.node.children, (B, q) => (d(), V($, {
3456
- key: B.id,
3457
- node: B,
3565
+ fn: j(() => [
3566
+ (d(!0), c(F, null, N(e.node.children, (A, Y) => (d(), V($, {
3567
+ key: A.id,
3568
+ node: A,
3458
3569
  "parent-id": e.node.id,
3459
- index: q,
3460
- class: R(u(B, q))
3570
+ index: Y,
3571
+ class: R(u(A, Y))
3461
3572
  }, null, 8, ["node", "parent-id", "index", "class"]))), 128)),
3462
- !e.node.children || e.node.children.length === 0 ? (d(), c("div", $a, "拖拽控件到此容器")) : I("", !0)
3573
+ !e.node.children || e.node.children.length === 0 ? (d(), c("div", Ia, "拖拽控件到此容器")) : T("", !0)
3463
3574
  ]),
3464
3575
  key: "0"
3465
3576
  } : void 0
@@ -3467,28 +3578,28 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
3467
3578
  ], 38);
3468
3579
  };
3469
3580
  }
3470
- }), Ca = /* @__PURE__ */ E(xa, [["__scopeId", "data-v-3f3a43d3"]]), _a = { class: "fd-designer" }, Ia = { class: "fd-designer-body" }, Da = { class: "fd-designer-left" }, Sa = {
3581
+ }), Sa = /* @__PURE__ */ P(Da, [["__scopeId", "data-v-3f3a43d3"]]), Ta = { class: "fd-designer" }, Fa = { class: "fd-designer-body" }, La = { class: "fd-designer-left" }, Ma = {
3471
3582
  key: 0,
3472
3583
  class: "fd-canvas-notice"
3473
- }, Ta = {
3584
+ }, Na = {
3474
3585
  key: 1,
3475
3586
  class: "fd-canvas-state"
3476
- }, Fa = {
3587
+ }, Ea = {
3477
3588
  key: 2,
3478
3589
  class: "fd-canvas-state fd-canvas-state--error"
3479
- }, La = {
3590
+ }, Pa = {
3480
3591
  key: 0,
3481
3592
  class: "fd-canvas-empty"
3482
- }, Ma = { class: "fd-designer-right" }, Na = /* @__PURE__ */ L({
3593
+ }, Oa = { class: "fd-designer-right" }, Ua = /* @__PURE__ */ E({
3483
3594
  __name: "Designer",
3484
3595
  props: {
3485
3596
  formId: {}
3486
3597
  },
3487
3598
  setup(e) {
3488
- const n = e, o = W();
3489
- ie(async () => {
3599
+ const n = e, o = G();
3600
+ ce(async () => {
3490
3601
  const a = new URLSearchParams(window.location.search), i = a.get("baseUrl");
3491
- i && Us(i);
3602
+ i && js(i);
3492
3603
  const u = n.formId || a.get("id") || "", r = a.get("formVersion") || a.get("FormVersion") || "", l = a.get("openType") || a.get("OpenType") || "";
3493
3604
  await o.openForm(u, r, l);
3494
3605
  });
@@ -3498,29 +3609,29 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
3498
3609
  const i = (r = a.dataTransfer) == null ? void 0 : r.getData("application/x-fd-new"), u = (l = a.dataTransfer) == null ? void 0 : l.getData("application/x-fd-move");
3499
3610
  i ? o.addWidget(i, null, o.widgets.length) : u && o.moveNode(u, null, o.widgets.length);
3500
3611
  }
3501
- return (a, i) => (d(), c("div", _a, [
3502
- F(Hl),
3503
- t("div", Ia, [
3504
- t("aside", Da, [
3505
- F(Xl)
3612
+ return (a, i) => (d(), c("div", Ta, [
3613
+ L(Kl),
3614
+ t("div", Fa, [
3615
+ t("aside", La, [
3616
+ L(na)
3506
3617
  ]),
3507
3618
  t("main", {
3508
3619
  class: "fd-designer-center",
3509
- onDragover: i[1] || (i[1] = J(() => {
3620
+ onDragover: i[1] || (i[1] = q(() => {
3510
3621
  }, ["prevent"])),
3511
3622
  onDrop: s
3512
3623
  }, [
3513
- h(o).noticeMsg ? (d(), c("div", Sa, y(h(o).noticeMsg), 1)) : I("", !0),
3514
- h(o).loading ? (d(), c("div", Ta, "正在加载表单…")) : h(o).errorMsg ? (d(), c("div", Fa, y(h(o).errorMsg), 1)) : (d(), c("div", {
3624
+ h(o).noticeMsg ? (d(), c("div", Ma, k(h(o).noticeMsg), 1)) : T("", !0),
3625
+ h(o).loading ? (d(), c("div", Na, "正在加载表单…")) : h(o).errorMsg ? (d(), c("div", Ea, k(h(o).errorMsg), 1)) : (d(), c("div", {
3515
3626
  key: 3,
3516
3627
  class: R(["fd-canvas", { "is-mobile": h(o).device === "mobile", "is-selected": h(o).selectedForm }]),
3517
3628
  onClick: i[0] || (i[0] = (u) => h(o).selectForm())
3518
3629
  }, [
3519
- h(o).widgets.length === 0 ? (d(), c("div", La, [...i[2] || (i[2] = [
3630
+ h(o).widgets.length === 0 ? (d(), c("div", Pa, [...i[2] || (i[2] = [
3520
3631
  t("span", { class: "fd-canvas-empty-icon" }, "▦", -1),
3521
3632
  t("span", null, "从左侧拖拽控件到此处", -1)
3522
- ])])) : I("", !0),
3523
- (d(!0), c(T, null, N(h(o).widgets, (u, r) => (d(), V(Ca, {
3633
+ ])])) : T("", !0),
3634
+ (d(!0), c(F, null, N(h(o).widgets, (u, r) => (d(), V(Sa, {
3524
3635
  key: u.id,
3525
3636
  node: u,
3526
3637
  "parent-id": null,
@@ -3528,18 +3639,18 @@ const ml = { class: "fd-publish-tip" }, pl = { class: "fd-publish-tip-text" }, v
3528
3639
  }, null, 8, ["node", "index"]))), 128))
3529
3640
  ], 2))
3530
3641
  ], 32),
3531
- t("aside", Ma, [
3532
- F(wa)
3642
+ t("aside", Oa, [
3643
+ L(_a)
3533
3644
  ])
3534
3645
  ])
3535
3646
  ]));
3536
3647
  }
3537
- }), Ea = /* @__PURE__ */ E(Na, [["__scopeId", "data-v-86f01272"]]);
3538
- function Xa(e) {
3539
- he(), e.baseUrl && Le({ baseUrl: e.baseUrl });
3648
+ }), Ba = /* @__PURE__ */ P(Ua, [["__scopeId", "data-v-86f01272"]]);
3649
+ function si(e) {
3650
+ Ce(), e.baseUrl && Ae({ baseUrl: e.baseUrl });
3540
3651
  let n = null;
3541
- const s = ze({
3542
- render: () => Je(Oe, {
3652
+ const s = Xe({
3653
+ render: () => pe(We, {
3543
3654
  widgets: e.widgets,
3544
3655
  formMode: e.formMode,
3545
3656
  formData: e.formData,
@@ -3558,21 +3669,21 @@ function Xa(e) {
3558
3669
  unmount: () => s.unmount()
3559
3670
  };
3560
3671
  }
3561
- const Za = {
3672
+ const li = {
3562
3673
  install(e, n = {}) {
3563
- he(), n.baseUrl && Le({ baseUrl: n.baseUrl }), e.component("FdDesigner", Ea);
3674
+ Ce(), n.baseUrl && Ae({ baseUrl: n.baseUrl }), e.component("FdDesigner", Ba);
3564
3675
  }
3565
3676
  };
3566
3677
  export {
3567
- Ea as D,
3568
- Zl as L,
3569
- Oe as R,
3570
- E as _,
3571
- Za as a,
3572
- Xa as b,
3573
- Le as c,
3574
- Ya as d,
3575
- Qa as l,
3576
- ee as r,
3577
- Ka as s
3678
+ Ba as D,
3679
+ oa as L,
3680
+ We as R,
3681
+ P as _,
3682
+ li as a,
3683
+ si as b,
3684
+ Ae as c,
3685
+ ti as d,
3686
+ oi as l,
3687
+ le as r,
3688
+ ni as s
3578
3689
  };