yswk-editor 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,6 +1,6 @@
1
- import { defineComponent as K, toRefs as he, ref as N, createElementBlock as k, openBlock as r, normalizeClass as ee, createElementVNode as v, createCommentVNode as M, renderSlot as Q, Fragment as Y, withModifiers as X, computed as P, renderList as G, shallowRef as ge, toDisplayString as T, normalizeStyle as oe, createVNode as w, createBlock as E, withCtx as U, resolveDynamicComponent as fe, mergeProps as ye, resolveComponent as I, createTextVNode as H, unref as B, reactive as re, watch as te, onMounted as be, normalizeProps as ae, guardReactiveProps as ie } from "vue";
2
- import { InfoFilled as ke, Grid as _e, QuestionFilled as j } from "@element-plus/icons-vue";
3
- const we = { class: "wkc-component-content" }, $e = { class: "wkc-component-actions" }, Ce = ["disabled"], Se = ["disabled"], Ve = /* @__PURE__ */ K({
1
+ import { defineComponent as K, toRefs as ge, ref as N, createElementBlock as _, openBlock as d, normalizeClass as ee, createElementVNode as v, createCommentVNode as M, renderSlot as Q, Fragment as Y, withModifiers as X, computed as E, renderList as G, shallowRef as fe, toDisplayString as T, normalizeStyle as oe, createVNode as w, createBlock as R, withCtx as U, resolveDynamicComponent as ye, mergeProps as be, resolveComponent as I, createTextVNode as H, unref as B, reactive as re, watch as te, onMounted as ke, normalizeProps as ae, guardReactiveProps as ie } from "vue";
2
+ import { InfoFilled as _e, Grid as we, QuestionFilled as j } from "@element-plus/icons-vue";
3
+ const $e = { class: "wkc-component-content" }, Ce = { class: "wkc-component-actions" }, Se = ["disabled"], Ve = ["disabled"], ze = /* @__PURE__ */ K({
4
4
  __name: "ComponentWrapper",
5
5
  props: {
6
6
  isActive: { type: Boolean },
@@ -12,13 +12,13 @@ const we = { class: "wkc-component-content" }, $e = { class: "wkc-component-acti
12
12
  designWidth: {}
13
13
  },
14
14
  emits: ["click", "move-up", "move-down", "delete", "cancel-select", "update-position", "update-size"],
15
- setup(e, { emit: d }) {
16
- const t = e, { designHeight: l, designWidth: o } = he(t), m = d, c = N(!1), _ = N({
15
+ setup(e, { emit: r }) {
16
+ const t = e, { designHeight: l, designWidth: o } = ge(t), p = r, c = N(!1), g = N({
17
17
  startX: 0,
18
18
  startY: 0,
19
19
  originalX: 0,
20
20
  originalY: 0
21
- }), S = N(!1), z = N({
21
+ }), C = N(!1), z = N({
22
22
  direction: "",
23
23
  startX: 0,
24
24
  startY: 0,
@@ -26,120 +26,120 @@ const we = { class: "wkc-component-content" }, $e = { class: "wkc-component-acti
26
26
  originalHeight: 0,
27
27
  originalLeft: 0,
28
28
  originalTop: 0
29
- }), $ = (C) => {
30
- m("click", C);
31
- }, i = (C) => {
29
+ }), $ = (S) => {
30
+ p("click", S);
31
+ }, i = (S) => {
32
32
  if (!t.isActive)
33
33
  return;
34
- const y = C.target;
35
- if (y.closest(".wkc-component-actions") || y.closest(".wkc-resizer") || !t.position)
34
+ const b = S.target;
35
+ if (b.closest(".wkc-component-actions") || b.closest(".wkc-resizer") || !t.position)
36
36
  return;
37
- c.value = !0, _.value = {
38
- startX: C.clientX,
39
- startY: C.clientY,
37
+ c.value = !0, g.value = {
38
+ startX: S.clientX,
39
+ startY: S.clientY,
40
40
  originalX: t.position.left,
41
41
  originalY: t.position.top
42
42
  };
43
- const h = (b) => {
43
+ const h = (k) => {
44
44
  if (!c.value) return;
45
- const f = b.clientX - _.value.startX, p = b.clientY - _.value.startY;
46
- let s = _.value.originalX + f, x = _.value.originalY + p;
45
+ const y = k.clientX - g.value.startX, m = k.clientY - g.value.startY;
46
+ let s = g.value.originalX + y, x = g.value.originalY + m;
47
47
  if (o != null && o.value && (l != null && l.value) && t.position) {
48
- const L = t.position.width || 0, R = t.position.height || 0;
49
- s = Math.max(0, s), L > 0 && (s = Math.min(o.value - L, s)), x = Math.max(0, x), R > 0 && (x = Math.min(l.value - R, x));
48
+ const L = t.position.width || 0, P = t.position.height || 0;
49
+ s = Math.max(0, s), L > 0 && (s = Math.min(o.value - L, s)), x = Math.max(0, x), P > 0 && (x = Math.min(l.value - P, x));
50
50
  }
51
- m("update-position", s, x);
51
+ p("update-position", s, x);
52
52
  }, u = () => {
53
53
  c.value && (c.value = !1), document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", u);
54
54
  };
55
55
  document.addEventListener("mousemove", h), document.addEventListener("mouseup", u);
56
- }, g = (C, y) => {
56
+ }, f = (S, b) => {
57
57
  if (!t.position) return;
58
- S.value = !0, z.value = {
59
- direction: C,
60
- startX: y.clientX,
61
- startY: y.clientY,
58
+ C.value = !0, z.value = {
59
+ direction: S,
60
+ startX: b.clientX,
61
+ startY: b.clientY,
62
62
  originalWidth: t.position.width || 0,
63
63
  originalHeight: t.position.height || 0,
64
64
  originalLeft: t.position.left,
65
65
  originalTop: t.position.top
66
66
  };
67
- const h = (b) => {
68
- if (!S.value) return;
69
- const f = b.clientX - z.value.startX, p = b.clientY - z.value.startY;
70
- let s = z.value.originalWidth, x = z.value.originalHeight, L = z.value.originalLeft, R = z.value.originalTop;
71
- switch (C) {
67
+ const h = (k) => {
68
+ if (!C.value) return;
69
+ const y = k.clientX - z.value.startX, m = k.clientY - z.value.startY;
70
+ let s = z.value.originalWidth, x = z.value.originalHeight, L = z.value.originalLeft, P = z.value.originalTop;
71
+ switch (S) {
72
72
  case "left-top":
73
- L = z.value.originalLeft + f, R = z.value.originalTop + p, s = z.value.originalWidth - f, x = z.value.originalHeight - p;
73
+ L = z.value.originalLeft + y, P = z.value.originalTop + m, s = z.value.originalWidth - y, x = z.value.originalHeight - m;
74
74
  break;
75
75
  case "left-bottom":
76
- L = z.value.originalLeft + f, s = z.value.originalWidth - f, x = z.value.originalHeight + p;
76
+ L = z.value.originalLeft + y, s = z.value.originalWidth - y, x = z.value.originalHeight + m;
77
77
  break;
78
78
  case "right-top":
79
- R = z.value.originalTop + p, s = z.value.originalWidth + f, x = z.value.originalHeight - p;
79
+ P = z.value.originalTop + m, s = z.value.originalWidth + y, x = z.value.originalHeight - m;
80
80
  break;
81
81
  case "right-bottom":
82
- s = z.value.originalWidth + f, x = z.value.originalHeight + p;
82
+ s = z.value.originalWidth + y, x = z.value.originalHeight + m;
83
83
  break;
84
84
  }
85
- s = Math.max(10, s), x = Math.max(10, x), o != null && o.value && (l != null && l.value) && (L = Math.max(0, L), R = Math.max(0, R), L + s > o.value && ((C === "left-top" || C === "left-bottom") && (L = Math.max(0, o.value - s)), s = o.value - L), R + x > l.value && ((C === "left-top" || C === "right-top") && (R = Math.max(0, l.value - x)), x = l.value - R)), m("update-size", s, x, L, R);
85
+ s = Math.max(10, s), x = Math.max(10, x), o != null && o.value && (l != null && l.value) && (L = Math.max(0, L), P = Math.max(0, P), L + s > o.value && ((S === "left-top" || S === "left-bottom") && (L = Math.max(0, o.value - s)), s = o.value - L), P + x > l.value && ((S === "left-top" || S === "right-top") && (P = Math.max(0, l.value - x)), x = l.value - P)), p("update-size", s, x, L, P);
86
86
  }, u = () => {
87
- S.value && (S.value = !1), document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", u);
87
+ C.value && (C.value = !1), document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", u);
88
88
  };
89
89
  document.addEventListener("mousemove", h), document.addEventListener("mouseup", u);
90
90
  };
91
- return (C, y) => (r(), k("div", {
91
+ return (S, b) => (d(), _("div", {
92
92
  class: ee(["wkc-component-wrapper", { active: e.isActive, dragging: c.value && e.isActive && !e.ignoreDrag }]),
93
- onClick: y[8] || (y[8] = () => $(!1)),
93
+ onClick: b[8] || (b[8] = () => $(!1)),
94
94
  onMousedown: i
95
95
  }, [
96
- v("div", we, [
97
- Q(C.$slots, "default")
96
+ v("div", $e, [
97
+ Q(S.$slots, "default")
98
98
  ]),
99
- e.isActive && !e.ignoreDrag ? (r(), k(Y, { key: 0 }, [
99
+ e.isActive && !e.ignoreDrag ? (d(), _(Y, { key: 0 }, [
100
100
  v("div", {
101
101
  class: "wkc-resizer corner-left-top",
102
- onMousedown: y[0] || (y[0] = X((h) => g("left-top", h), ["stop"]))
102
+ onMousedown: b[0] || (b[0] = X((h) => f("left-top", h), ["stop"]))
103
103
  }, null, 32),
104
104
  v("div", {
105
105
  class: "wkc-resizer corner-left-bottom",
106
- onMousedown: y[1] || (y[1] = X((h) => g("left-bottom", h), ["stop"]))
106
+ onMousedown: b[1] || (b[1] = X((h) => f("left-bottom", h), ["stop"]))
107
107
  }, null, 32),
108
108
  v("div", {
109
109
  class: "wkc-resizer corner-right-top",
110
- onMousedown: y[2] || (y[2] = X((h) => g("right-top", h), ["stop"]))
110
+ onMousedown: b[2] || (b[2] = X((h) => f("right-top", h), ["stop"]))
111
111
  }, null, 32),
112
112
  v("div", {
113
113
  class: "wkc-resizer corner-right-bottom",
114
- onMousedown: y[3] || (y[3] = X((h) => g("right-bottom", h), ["stop"]))
114
+ onMousedown: b[3] || (b[3] = X((h) => f("right-bottom", h), ["stop"]))
115
115
  }, null, 32)
116
116
  ], 64)) : M("", !0),
117
- v("div", $e, [
117
+ v("div", Ce, [
118
118
  v("button", {
119
119
  disabled: !e.canMoveUp,
120
- onClick: y[4] || (y[4] = X((h) => C.$emit("move-up"), ["stop"])),
120
+ onClick: b[4] || (b[4] = X((h) => S.$emit("move-up"), ["stop"])),
121
121
  title: "上移层级"
122
- }, "↑", 8, Ce),
122
+ }, "↑", 8, Se),
123
123
  v("button", {
124
124
  disabled: !e.canMoveDown,
125
- onClick: y[5] || (y[5] = X((h) => C.$emit("move-down"), ["stop"])),
125
+ onClick: b[5] || (b[5] = X((h) => S.$emit("move-down"), ["stop"])),
126
126
  title: "下移层级"
127
- }, "↓", 8, Se),
127
+ }, "↓", 8, Ve),
128
128
  v("button", {
129
- onClick: y[6] || (y[6] = X(() => $(!0), ["stop"])),
129
+ onClick: b[6] || (b[6] = X(() => $(!0), ["stop"])),
130
130
  title: "取消选中"
131
131
  }, "✕"),
132
132
  v("button", {
133
- onClick: y[7] || (y[7] = X((h) => C.$emit("delete"), ["stop"])),
133
+ onClick: b[7] || (b[7] = X((h) => S.$emit("delete"), ["stop"])),
134
134
  title: "删除组件"
135
135
  }, "🗑️")
136
136
  ])
137
137
  ], 34));
138
138
  }
139
- }), ze = {
139
+ }), xe = {
140
140
  key: 0,
141
141
  class: "wkc-grid-overlay"
142
- }, xe = ["width", "height"], Ue = ["x1", "x2", "y2"], Le = ["y1", "x2", "y2"], Me = /* @__PURE__ */ K({
142
+ }, Ue = ["width", "height"], Le = ["x1", "x2", "y2"], Me = ["y1", "x2", "y2"], Ie = /* @__PURE__ */ K({
143
143
  __name: "GridOverlay",
144
144
  props: {
145
145
  visible: { type: Boolean },
@@ -148,59 +148,59 @@ const we = { class: "wkc-component-content" }, $e = { class: "wkc-component-acti
148
148
  gridSize: { default: 10 }
149
149
  },
150
150
  setup(e) {
151
- const d = e, t = P(() => ({
152
- half: d.width / 2,
153
- quarter: d.width / 4,
154
- threeQuarter: d.width * 3 / 4
155
- })), l = P(() => {
156
- const c = [], _ = t.value;
157
- for (let $ = d.gridSize; $ < d.width; $ += d.gridSize)
151
+ const r = e, t = E(() => ({
152
+ half: r.width / 2,
153
+ quarter: r.width / 4,
154
+ threeQuarter: r.width * 3 / 4
155
+ })), l = E(() => {
156
+ const c = [], g = t.value;
157
+ for (let $ = r.gridSize; $ < r.width; $ += r.gridSize)
158
158
  c.push($);
159
- const S = 1, z = ($) => {
160
- c.some((g) => Math.abs(g - $) < S) || c.push($);
159
+ const C = 1, z = ($) => {
160
+ c.some((f) => Math.abs(f - $) < C) || c.push($);
161
161
  };
162
- return z(_.half), z(_.quarter), z(_.threeQuarter), c.sort(($, i) => $ - i);
163
- }), o = P(() => {
162
+ return z(g.half), z(g.quarter), z(g.threeQuarter), c.sort(($, i) => $ - i);
163
+ }), o = E(() => {
164
164
  const c = [];
165
- for (let _ = d.gridSize; _ < d.height; _ += d.gridSize)
166
- c.push(_);
165
+ for (let g = r.gridSize; g < r.height; g += r.gridSize)
166
+ c.push(g);
167
167
  return c;
168
- }), m = (c) => {
169
- const _ = t.value, S = 1;
170
- return Math.abs(c - _.half) < S ? "wkc-grid-line wkc-grid-line-half" : Math.abs(c - _.quarter) < S ? "wkc-grid-line wkc-grid-line-quarter" : Math.abs(c - _.threeQuarter) < S ? "wkc-grid-line wkc-grid-line-three-quarter" : "wkc-grid-line";
168
+ }), p = (c) => {
169
+ const g = t.value, C = 1;
170
+ return Math.abs(c - g.half) < C ? "wkc-grid-line wkc-grid-line-half" : Math.abs(c - g.quarter) < C ? "wkc-grid-line wkc-grid-line-quarter" : Math.abs(c - g.threeQuarter) < C ? "wkc-grid-line wkc-grid-line-three-quarter" : "wkc-grid-line";
171
171
  };
172
- return (c, _) => e.visible ? (r(), k("div", ze, [
173
- (r(), k("svg", {
172
+ return (c, g) => e.visible ? (d(), _("div", xe, [
173
+ (d(), _("svg", {
174
174
  class: "wkc-grid-svg",
175
175
  width: e.width,
176
176
  height: e.height
177
177
  }, [
178
- (r(!0), k(Y, null, G(l.value, (S) => (r(), k("line", {
179
- key: `v-${S}`,
180
- x1: S,
178
+ (d(!0), _(Y, null, G(l.value, (C) => (d(), _("line", {
179
+ key: `v-${C}`,
180
+ x1: C,
181
181
  y1: 0,
182
- x2: S,
182
+ x2: C,
183
183
  y2: e.height,
184
- class: ee(m(S))
185
- }, null, 10, Ue))), 128)),
186
- (r(!0), k(Y, null, G(o.value, (S) => (r(), k("line", {
187
- key: `h-${S}`,
184
+ class: ee(p(C))
185
+ }, null, 10, Le))), 128)),
186
+ (d(!0), _(Y, null, G(o.value, (C) => (d(), _("line", {
187
+ key: `h-${C}`,
188
188
  x1: 0,
189
- y1: S,
189
+ y1: C,
190
190
  x2: e.width,
191
- y2: S,
191
+ y2: C,
192
192
  class: "wkc-grid-line"
193
- }, null, 8, Le))), 128))
194
- ], 8, xe))
193
+ }, null, 8, Me))), 128))
194
+ ], 8, Ue))
195
195
  ])) : M("", !0);
196
196
  }
197
- }), Ie = { class: "wkc-h5-mobile-render" }, Ae = {
197
+ }), Ae = { class: "wkc-h5-mobile-render" }, Pe = {
198
198
  key: 0,
199
199
  class: "wkc-control-buttons"
200
- }, Re = { class: "wkc-button-row" }, Ee = { class: "wkc-button-label" }, Pe = { class: "wkc-button-row" }, Te = {
200
+ }, Re = { class: "wkc-button-row" }, Ee = { class: "wkc-button-label" }, Te = { class: "wkc-button-row" }, Be = {
201
201
  class: "wkc-mobile-content",
202
202
  id: "wkc-mobile-render-mock"
203
- }, Be = ["id"], Ne = {
203
+ }, Ne = ["id"], Oe = {
204
204
  key: 0,
205
205
  class: "wkc-empty-placeholder"
206
206
  }, So = /* @__PURE__ */ K({
@@ -223,26 +223,26 @@ const we = { class: "wkc-component-content" }, $e = { class: "wkc-component-acti
223
223
  ] }
224
224
  },
225
225
  emits: ["update:selectedIndex", "update:showGrid", "delete-component", "move-up", "move-down", "update-position", "update-size"],
226
- setup(e, { emit: d }) {
227
- const t = e, l = d, o = N("medium"), m = N(t.showGrid), c = P(() => {
228
- const p = t.mobileSizes.find((s) => s.name === o.value);
229
- return p ? {
230
- width: `${p.width}px`,
231
- height: `${p.height}px`
226
+ setup(e, { emit: r }) {
227
+ const t = e, l = r, o = N("medium"), p = N(t.showGrid), c = E(() => {
228
+ const m = t.mobileSizes.find((s) => s.name === o.value);
229
+ return m ? {
230
+ width: `${m.width}px`,
231
+ height: `${m.height}px`
232
232
  } : {};
233
- }), _ = P(() => {
234
- const p = t.mobileSizes.find((s) => s.name === o.value);
235
- return p ? p.width : t.designWidth;
236
- }), S = P(() => {
237
- const p = t.mobileSizes.find((s) => s.name === o.value);
238
- return p ? p.height : t.designHeight;
233
+ }), g = E(() => {
234
+ const m = t.mobileSizes.find((s) => s.name === o.value);
235
+ return m ? m.width : t.designWidth;
236
+ }), C = E(() => {
237
+ const m = t.mobileSizes.find((s) => s.name === o.value);
238
+ return m ? m.height : t.designHeight;
239
239
  }), z = () => {
240
- m.value = !m.value, l("update:showGrid", m.value);
241
- }, $ = (p) => {
242
- l("update:selectedIndex", p > -1 ? p : null);
243
- }, i = (p) => typeof p == "number" ? `${p}px` : /\d+$/g.test(p) ? `${p}px` : p, g = (p) => {
244
- var L, R;
245
- const s = (R = (L = p.props) == null ? void 0 : L.styleSchema) == null ? void 0 : R.position;
240
+ p.value = !p.value, l("update:showGrid", p.value);
241
+ }, $ = (m) => {
242
+ l("update:selectedIndex", m > -1 ? m : null);
243
+ }, i = (m) => typeof m == "number" ? `${m}px` : /\d+$/g.test(m) ? `${m}px` : m, f = (m) => {
244
+ var L, P;
245
+ const s = (P = (L = m.props) == null ? void 0 : L.styleSchema) == null ? void 0 : P.position;
246
246
  if (!s) return {};
247
247
  const x = {
248
248
  position: "absolute",
@@ -253,66 +253,66 @@ const we = { class: "wkc-component-content" }, $e = { class: "wkc-component-acti
253
253
  };
254
254
  return s.centerHorizontal ? (x.left = "50%", x.transform = "translateX(-50%)") : x.left = `${i(s.left || 0)}`, x;
255
255
  };
256
- ge(0);
257
- const C = (p) => {
258
- l("delete-component", p);
259
- }, y = (p) => {
260
- l("move-up", p);
261
- }, h = (p) => {
262
- l("move-down", p);
256
+ fe(0);
257
+ const S = (m) => {
258
+ l("delete-component", m);
259
+ }, b = (m) => {
260
+ l("move-up", m);
261
+ }, h = (m) => {
262
+ l("move-down", m);
263
263
  }, u = () => {
264
264
  l("update:selectedIndex", null);
265
- }, b = (p, s, x) => {
266
- l("update-position", p, s, x);
267
- }, f = (p, s) => {
268
- l("update-size", p, s);
265
+ }, k = (m, s, x) => {
266
+ l("update-position", m, s, x);
267
+ }, y = (m, s) => {
268
+ l("update-size", m, s);
269
269
  };
270
- return (p, s) => (r(), k("section", Ie, [
271
- e.showControls ? (r(), k("div", Ae, [
270
+ return (m, s) => (d(), _("section", Ae, [
271
+ e.showControls ? (d(), _("div", Pe, [
272
272
  v("div", Re, [
273
273
  v("span", Ee, "设计:" + T(e.designWidth) + "*" + T(e.designHeight), 1)
274
274
  ]),
275
- v("div", Pe, [
275
+ v("div", Te, [
276
276
  s[1] || (s[1] = v("span", { class: "wkc-button-label" }, "辅助工具:", -1)),
277
277
  v("button", {
278
- class: ee(["wkc-size-btn", { active: m.value }]),
278
+ class: ee(["wkc-size-btn", { active: p.value }]),
279
279
  onClick: z
280
- }, T(m.value ? "隐藏网格" : "显示网格"), 3)
280
+ }, T(p.value ? "隐藏网格" : "显示网格"), 3)
281
281
  ])
282
282
  ])) : M("", !0),
283
283
  v("div", {
284
284
  class: "wkc-mobile-simulator",
285
285
  style: oe(c.value)
286
286
  }, [
287
- v("div", Te, [
288
- w(Me, {
289
- visible: m.value,
290
- width: _.value,
291
- height: S.value,
287
+ v("div", Be, [
288
+ w(Ie, {
289
+ visible: p.value,
290
+ width: g.value,
291
+ height: C.value,
292
292
  "grid-size": e.gridSize
293
293
  }, null, 8, ["visible", "width", "height", "grid-size"]),
294
- (r(!0), k(Y, null, G(e.pageComponents, (x, L) => {
295
- var R, F, J;
296
- return r(), E(Ve, {
294
+ (d(!0), _(Y, null, G(e.pageComponents, (x, L) => {
295
+ var P, F, J;
296
+ return d(), R(ze, {
297
297
  key: L,
298
298
  "is-active": e.selectedIndex === L,
299
299
  "can-move-up": L > 0,
300
300
  "can-move-down": L < e.pageComponents.length - 1,
301
- position: (F = (R = x.props) == null ? void 0 : R.styleSchema) == null ? void 0 : F.position,
301
+ position: (F = (P = x.props) == null ? void 0 : P.styleSchema) == null ? void 0 : F.position,
302
302
  designWidth: e.designWidth,
303
303
  designHeight: e.designHeight,
304
- style: oe(g(x)),
304
+ style: oe(f(x)),
305
305
  "ignore-drag": !!((J = x.config) != null && J.isFullScreen),
306
306
  onClick: (W) => $(W ? -1 : L),
307
- onMoveUp: (W) => y(L),
307
+ onMoveUp: (W) => b(L),
308
308
  onMoveDown: (W) => h(L),
309
309
  onCancelSelect: u,
310
- onDelete: (W) => C(L),
311
- onUpdatePosition: (W, Z) => b(L, W, Z),
312
- onUpdateSize: (W, Z, a, V) => f(L, { width: W, height: Z, left: a, top: V })
310
+ onDelete: (W) => S(L),
311
+ onUpdatePosition: (W, Z) => k(L, W, Z),
312
+ onUpdateSize: (W, Z, a, V) => y(L, { width: W, height: Z, left: a, top: V })
313
313
  }, {
314
314
  default: U(() => [
315
- (r(), E(fe(x.component), ye({ ref_for: !0 }, x.props), null, 16))
315
+ (d(), R(ye(x.component), be({ ref_for: !0 }, x.props), null, 16))
316
316
  ]),
317
317
  _: 2
318
318
  }, 1032, ["is-active", "can-move-up", "can-move-down", "position", "designWidth", "designHeight", "style", "ignore-drag", "onClick", "onMoveUp", "onMoveDown", "onDelete", "onUpdatePosition", "onUpdateSize"]);
@@ -322,69 +322,69 @@ const we = { class: "wkc-component-content" }, $e = { class: "wkc-component-acti
322
322
  class: "wkc-popup-port",
323
323
  onClick: s[0] || (s[0] = X(() => {
324
324
  }, ["stop"]))
325
- }, null, 8, Be),
326
- e.pageComponents.length === 0 ? (r(), k("div", Ne, T(e.emptyText), 1)) : M("", !0)
325
+ }, null, 8, Ne),
326
+ e.pageComponents.length === 0 ? (d(), _("div", Oe, T(e.emptyText), 1)) : M("", !0)
327
327
  ])
328
328
  ], 4)
329
329
  ]));
330
330
  }
331
331
  });
332
332
  var de = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.SELECT = "select", e.RADIO = "radio", e.CHECKBOX = "checkbox", e.SWITCH = "switch", e.COLOR = "color", e.NUMBER = "number", e.SLIDER = "slider", e.TEXTAREA = "textarea", e.MATERIAL = "material", e.GOODS = "goods", e.READONLY = "readonly", e))(de || {}), D = /* @__PURE__ */ ((e) => (e.PREVIEW = "preview", e.STYLE = "style", e.BUSINESS = "business", e.SUB_COMPONENT = "subComponent", e))(D || {});
333
- const Oe = { class: "wkc-preview-config" }, He = {
333
+ const He = { class: "wkc-preview-config" }, We = {
334
334
  key: 0,
335
335
  class: "empty-state"
336
- }, We = {
336
+ }, De = {
337
337
  key: 1,
338
338
  class: "preview-list"
339
- }, De = { class: "preview-header" }, Ye = { class: "preview-title" }, Xe = { class: "preview-body" }, Ge = { class: "form-item editable" }, Ke = { class: "form-label" }, Ze = { class: "form-item" }, qe = {
339
+ }, Ye = { class: "preview-header" }, Xe = { class: "preview-title" }, Ge = { class: "preview-body" }, Ke = { class: "form-item editable" }, Ze = { class: "form-label" }, qe = { class: "form-item" }, Fe = {
340
340
  key: 0,
341
341
  class: "error-message"
342
- }, Fe = { class: "mock-preview" }, Je = /* @__PURE__ */ K({
342
+ }, Je = { class: "mock-preview" }, Qe = /* @__PURE__ */ K({
343
343
  __name: "PreviewConfig",
344
344
  props: {
345
345
  previewConfig: {}
346
346
  },
347
347
  emits: ["update-config"],
348
- setup(e, { emit: d }) {
349
- const t = e, l = d, o = N({}), m = N({}), c = P({
350
- get: () => new Proxy(m.value, {
351
- get(i, g) {
352
- const C = Number(g);
353
- return i[C] || (i[C] = "edit"), i[C];
348
+ setup(e, { emit: r }) {
349
+ const t = e, l = r, o = N({}), p = N({}), c = E({
350
+ get: () => new Proxy(p.value, {
351
+ get(i, f) {
352
+ const S = Number(f);
353
+ return i[S] || (i[S] = "edit"), i[S];
354
354
  }
355
355
  }),
356
356
  set: (i) => {
357
- m.value = i;
357
+ p.value = i;
358
358
  }
359
- }), _ = (i) => {
360
- const g = t.previewConfig.find((C) => C.key === i);
361
- g && l("update-config", i, g);
362
- }, S = (i) => {
363
- _(i);
364
- }, z = (i, g, C) => {
359
+ }), g = (i) => {
360
+ const f = t.previewConfig.find((S) => S.key === i);
361
+ f && l("update-config", i, f);
362
+ }, C = (i) => {
363
+ g(i);
364
+ }, z = (i, f, S) => {
365
365
  try {
366
- const y = JSON.parse(C);
367
- i.response.data = y, delete o.value[g], _(i.key);
366
+ const b = JSON.parse(S);
367
+ i.response.data = b, delete o.value[f], g(i.key);
368
368
  } catch {
369
- o.value[g] = "JSON 格式错误,请检查语法";
369
+ o.value[f] = "JSON 格式错误,请检查语法";
370
370
  }
371
371
  }, $ = (i) => JSON.stringify(i.response, null, 2);
372
- return (i, g) => {
373
- const C = I("el-empty"), y = I("el-tag"), h = I("el-icon"), u = I("el-tooltip"), b = I("el-input"), f = I("el-tab-pane"), p = I("el-tabs");
374
- return r(), k("div", Oe, [
375
- e.previewConfig.length === 0 ? (r(), k("div", He, [
376
- w(C, {
372
+ return (i, f) => {
373
+ const S = I("el-empty"), b = I("el-tag"), h = I("el-icon"), u = I("el-tooltip"), k = I("el-input"), y = I("el-tab-pane"), m = I("el-tabs");
374
+ return d(), _("div", He, [
375
+ e.previewConfig.length === 0 ? (d(), _("div", We, [
376
+ w(S, {
377
377
  description: "暂无预览配置",
378
378
  "image-size": 80
379
379
  })
380
- ])) : (r(), k("div", We, [
381
- (r(!0), k(Y, null, G(e.previewConfig, (s, x) => (r(), k("div", {
380
+ ])) : (d(), _("div", De, [
381
+ (d(!0), _(Y, null, G(e.previewConfig, (s, x) => (d(), _("div", {
382
382
  key: x,
383
383
  class: "preview-item"
384
384
  }, [
385
- v("div", De, [
386
- v("span", Ye, T(s.name), 1),
387
- w(y, {
385
+ v("div", Ye, [
386
+ v("span", Xe, T(s.name), 1),
387
+ w(b, {
388
388
  size: "small",
389
389
  type: s.method === "POST" ? "success" : "primary"
390
390
  }, {
@@ -394,10 +394,10 @@ const Oe = { class: "wkc-preview-config" }, He = {
394
394
  _: 2
395
395
  }, 1032, ["type"])
396
396
  ]),
397
- v("div", Xe, [
398
- v("div", Ge, [
399
- v("label", Ke, [
400
- g[0] || (g[0] = H(" 接口地址 ", -1)),
397
+ v("div", Ge, [
398
+ v("div", Ke, [
399
+ v("label", Ze, [
400
+ f[0] || (f[0] = H(" 接口地址 ", -1)),
401
401
  w(u, {
402
402
  content: "修改接口地址",
403
403
  placement: "top"
@@ -405,7 +405,7 @@ const Oe = { class: "wkc-preview-config" }, He = {
405
405
  default: U(() => [
406
406
  w(h, { class: "info-icon" }, {
407
407
  default: U(() => [
408
- w(B(ke))
408
+ w(B(_e))
409
409
  ]),
410
410
  _: 1
411
411
  })
@@ -413,42 +413,42 @@ const Oe = { class: "wkc-preview-config" }, He = {
413
413
  _: 1
414
414
  })
415
415
  ]),
416
- w(b, {
416
+ w(k, {
417
417
  modelValue: s.url,
418
418
  "onUpdate:modelValue": (L) => s.url = L,
419
419
  placeholder: "请输入接口地址",
420
- onBlur: (L) => S(s.key)
420
+ onBlur: (L) => C(s.key)
421
421
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onBlur"])
422
422
  ]),
423
- v("div", Ze, [
424
- w(p, {
423
+ v("div", qe, [
424
+ w(m, {
425
425
  modelValue: c.value[x],
426
426
  "onUpdate:modelValue": (L) => c.value[x] = L,
427
427
  class: "preview-tabs"
428
428
  }, {
429
429
  default: U(() => [
430
- w(f, {
430
+ w(y, {
431
431
  label: "Mock 数据",
432
432
  name: "edit"
433
433
  }, {
434
434
  default: U(() => [
435
- w(b, {
435
+ w(k, {
436
436
  "model-value": JSON.stringify(s.response.data, null, 2),
437
437
  type: "textarea",
438
438
  rows: 8,
439
439
  placeholder: "请输入 JSON 格式的 Mock 数据",
440
440
  onInput: (L) => z(s, x, L)
441
441
  }, null, 8, ["model-value", "onInput"]),
442
- o.value[x] ? (r(), k("div", qe, T(o.value[x]), 1)) : M("", !0)
442
+ o.value[x] ? (d(), _("div", Fe, T(o.value[x]), 1)) : M("", !0)
443
443
  ]),
444
444
  _: 2
445
445
  }, 1024),
446
- w(f, {
446
+ w(y, {
447
447
  label: "完整响应预览",
448
448
  name: "preview"
449
449
  }, {
450
450
  default: U(() => [
451
- v("div", Fe, [
451
+ v("div", Je, [
452
452
  v("pre", null, T($(s)), 1)
453
453
  ])
454
454
  ]),
@@ -465,97 +465,97 @@ const Oe = { class: "wkc-preview-config" }, He = {
465
465
  };
466
466
  }
467
467
  });
468
- function Qe(e, d, t) {
469
- var m, c, _;
470
- if (!((c = (m = e == null ? void 0 : e.props) == null ? void 0 : m.styleSchema) != null && c.position)) return;
471
- const l = Math.round(d), o = Math.round(t);
472
- if (e.props.styleSchema.position.left = l, e.props.styleSchema.position.top = o, (_ = e.config) != null && _.styleSchema) {
473
- const S = e.config.styleSchema.find(
468
+ function je(e, r, t) {
469
+ var p, c, g;
470
+ if (!((c = (p = e == null ? void 0 : e.props) == null ? void 0 : p.styleSchema) != null && c.position)) return;
471
+ const l = Math.round(r), o = Math.round(t);
472
+ if (e.props.styleSchema.position.left = l, e.props.styleSchema.position.top = o, (g = e.config) != null && g.styleSchema) {
473
+ const C = e.config.styleSchema.find(
474
474
  ($) => $.key === "position"
475
- ), z = (S == null ? void 0 : S.children) || [];
475
+ ), z = (C == null ? void 0 : C.children) || [];
476
476
  if (z.length) {
477
- const $ = z.find((g) => g.key === "top"), i = z.find((g) => g.key === "left");
477
+ const $ = z.find((f) => f.key === "top"), i = z.find((f) => f.key === "left");
478
478
  $ && ($.value = o), i && (i.value = l);
479
479
  }
480
480
  }
481
481
  }
482
- function je(e, d) {
483
- var $, i, g;
482
+ function et(e, r) {
483
+ var $, i, f;
484
484
  if (!((i = ($ = e == null ? void 0 : e.props) == null ? void 0 : $.styleSchema) != null && i.position)) return;
485
- const { width: t, height: l, left: o, top: m } = d, c = Math.round(t), _ = Math.round(l), S = Math.round(o), z = Math.round(m);
486
- if (e.props.styleSchema.position.left = S, e.props.styleSchema.position.top = z, e.props.styleSchema.position.width = c, e.props.styleSchema.position.height = _, (g = e.config) != null && g.styleSchema) {
487
- const C = e.config.styleSchema.find(
485
+ const { width: t, height: l, left: o, top: p } = r, c = Math.round(t), g = Math.round(l), C = Math.round(o), z = Math.round(p);
486
+ if (e.props.styleSchema.position.left = C, e.props.styleSchema.position.top = z, e.props.styleSchema.position.width = c, e.props.styleSchema.position.height = g, (f = e.config) != null && f.styleSchema) {
487
+ const S = e.config.styleSchema.find(
488
488
  (h) => h.key === "position"
489
- ), y = (C == null ? void 0 : C.children) || [];
490
- if (y.length) {
491
- const h = y.find((p) => p.key === "top"), u = y.find((p) => p.key === "left"), b = y.find((p) => p.key === "width"), f = y.find((p) => p.key === "height");
492
- h && (h.value = z), u && (u.value = S), b && (b.value = c), f && (f.value = _);
489
+ ), b = (S == null ? void 0 : S.children) || [];
490
+ if (b.length) {
491
+ const h = b.find((m) => m.key === "top"), u = b.find((m) => m.key === "left"), k = b.find((m) => m.key === "width"), y = b.find((m) => m.key === "height");
492
+ h && (h.value = z), u && (u.value = C), k && (k.value = c), y && (y.value = g);
493
493
  }
494
494
  }
495
495
  }
496
- const ce = (e, d) => {
496
+ const ce = (e, r) => {
497
497
  if (!e.showWhen) return !0;
498
- const { key: t, value: l } = e.showWhen, o = se(d, t);
498
+ const { key: t, value: l } = e.showWhen, o = se(r, t);
499
499
  return o ? Array.isArray(l) ? l.includes(o.value) : o.value === l : !1;
500
- }, se = (e, d) => {
500
+ }, se = (e, r) => {
501
501
  for (const t of e) {
502
- if (t.key === d)
502
+ if (t.key === r)
503
503
  return t;
504
504
  if (t.children) {
505
- const l = se(t.children, d);
505
+ const l = se(t.children, r);
506
506
  if (l) return l;
507
507
  }
508
508
  }
509
509
  return null;
510
510
  };
511
- function et(e, d, t) {
511
+ function tt(e, r, t) {
512
512
  if (e)
513
- if (d.includes(".")) {
514
- const l = d.split(".");
513
+ if (r.includes(".")) {
514
+ const l = r.split(".");
515
515
  let o = e;
516
516
  for (let c = 0; c < l.length - 1; c++) {
517
- const _ = l[c];
518
- o[_] || (o[_] = {}), o = o[_];
517
+ const g = l[c];
518
+ o[g] || (o[g] = {}), o = o[g];
519
519
  }
520
- const m = l[l.length - 1];
521
- o[m] = t;
520
+ const p = l[l.length - 1];
521
+ o[p] = t;
522
522
  } else
523
- e[d] = t;
523
+ e[r] = t;
524
524
  }
525
525
  function pe(e) {
526
- var d, t, l, o;
526
+ var r, t, l, o;
527
527
  try {
528
- const m = ((d = e.config) == null ? void 0 : d.styleSchema) || [];
528
+ const p = ((r = e.config) == null ? void 0 : r.styleSchema) || [];
529
529
  let c = null;
530
- for (const S of m)
531
- if (S.key === "position" && S.children && (c = S.children.find((z) => z.key === "zIndex"), c))
530
+ for (const C of p)
531
+ if (C.key === "position" && C.children && (c = C.children.find((z) => z.key === "zIndex"), c))
532
532
  break;
533
533
  return {
534
534
  min: 10,
535
535
  max: 99,
536
536
  current: ((o = (l = (t = e.props) == null ? void 0 : t.styleSchema) == null ? void 0 : l.position) == null ? void 0 : o.zIndex) || 10
537
537
  };
538
- } catch (m) {
539
- return console.error("获取 zIndex 配置失败:", m), { min: 10, max: 99, current: 10 };
538
+ } catch (p) {
539
+ return console.error("获取 zIndex 配置失败:", p), { min: 10, max: 99, current: 10 };
540
540
  }
541
541
  }
542
- function tt(e) {
542
+ function ot(e) {
543
543
  var l;
544
544
  if (!e)
545
545
  return { success: !1, message: "组件不存在" };
546
- const d = pe(e);
547
- if (d.current >= d.max)
546
+ const r = pe(e);
547
+ if (r.current >= r.max)
548
548
  return {
549
549
  success: !1,
550
- message: `层级已达到最大值 ${d.max}`
550
+ message: `层级已达到最大值 ${r.max}`
551
551
  };
552
- const t = Math.min(d.current + 1, d.max);
552
+ const t = Math.min(r.current + 1, r.max);
553
553
  if (e.props.styleSchema || (e.props.styleSchema = {}), e.props.styleSchema.position || (e.props.styleSchema.position = {}), e.props.styleSchema.position.zIndex = t, (l = e.config) != null && l.styleSchema) {
554
554
  const o = e.config.styleSchema.find(
555
555
  (c) => c.key === "position"
556
- ), m = (o == null ? void 0 : o.children) || [];
557
- if (m.length) {
558
- const c = m.find((_) => _.key === "zIndex");
556
+ ), p = (o == null ? void 0 : o.children) || [];
557
+ if (p.length) {
558
+ const c = p.find((g) => g.key === "zIndex");
559
559
  c && (c.value = t);
560
560
  }
561
561
  }
@@ -565,23 +565,23 @@ function tt(e) {
565
565
  newZIndex: t
566
566
  };
567
567
  }
568
- function ot(e) {
568
+ function lt(e) {
569
569
  var l;
570
570
  if (!e)
571
571
  return { success: !1, message: "组件不存在" };
572
- const d = pe(e);
573
- if (d.current <= d.min)
572
+ const r = pe(e);
573
+ if (r.current <= r.min)
574
574
  return {
575
575
  success: !1,
576
- message: `层级已达到最小值 ${d.min}`
576
+ message: `层级已达到最小值 ${r.min}`
577
577
  };
578
- const t = Math.max(d.current - 1, d.min);
578
+ const t = Math.max(r.current - 1, r.min);
579
579
  if (e.props.styleSchema || (e.props.styleSchema = {}), e.props.styleSchema.position || (e.props.styleSchema.position = {}), e.props.styleSchema.position.zIndex = t, (l = e.config) != null && l.styleSchema) {
580
580
  const o = e.config.styleSchema.find(
581
581
  (c) => c.key === "position"
582
- ), m = (o == null ? void 0 : o.children) || [];
583
- if (m.length) {
584
- const c = m.find((_) => _.key === "zIndex");
582
+ ), p = (o == null ? void 0 : o.children) || [];
583
+ if (p.length) {
584
+ const c = p.find((g) => g.key === "zIndex");
585
585
  c && (c.value = t);
586
586
  }
587
587
  }
@@ -591,25 +591,55 @@ function ot(e) {
591
591
  newZIndex: t
592
592
  };
593
593
  }
594
- const le = (e, d, t = "") => !e || !Array.isArray(e) ? [] : e.map((l) => {
595
- const o = t ? `${t}.${l.key}` : l.key, m = { ...l, parentKey: o };
596
- return l.children && Array.isArray(l.children) ? m.children = le(
594
+ const le = (e, r, t = "") => !e || !Array.isArray(e) ? [] : e.map((l) => {
595
+ const o = t ? `${t}.${l.key}` : l.key, p = { ...l, parentKey: o };
596
+ return l.children && Array.isArray(l.children) ? p.children = le(
597
597
  l.children,
598
- d == null ? void 0 : d[l.key],
598
+ r == null ? void 0 : r[l.key],
599
599
  o
600
- ) : d && l.key in d && (m.value = d[l.key]), m;
600
+ ) : r && l.key in r && (p.value = r[l.key]), p;
601
601
  });
602
- function lt(e, d) {
603
- const t = le(
604
- (e == null ? void 0 : e.styleSchema) || [],
605
- d.styleSchema,
606
- "styleSchema"
607
- ), l = le(
608
- (e == null ? void 0 : e.businessSchema) || [],
609
- d.businessSchema,
610
- "businessSchema"
611
- );
612
- return { ...e, styleSchema: t, businessSchema: l };
602
+ function me(e, r, t = "") {
603
+ var o;
604
+ let l = { ...e };
605
+ if (e != null && e.styleSchema) {
606
+ const p = le(
607
+ (e == null ? void 0 : e.styleSchema) || [],
608
+ r.styleSchema,
609
+ t + "styleSchema"
610
+ );
611
+ l.styleSchema = p;
612
+ }
613
+ if (e.businessSchema) {
614
+ const p = le(
615
+ (e == null ? void 0 : e.businessSchema) || [],
616
+ r.businessSchema,
617
+ t + "businessSchema"
618
+ );
619
+ l.businessSchema = p;
620
+ }
621
+ if (e.subComponents) {
622
+ const p = (o = e == null ? void 0 : e.subComponents) == null ? void 0 : o.map((c) => {
623
+ const g = r[c.id];
624
+ return g && typeof g == "object" ? me(
625
+ c,
626
+ g,
627
+ `${c.id}.`
628
+ ) : c;
629
+ });
630
+ l.subComponents = p;
631
+ }
632
+ if (e.previewConfig) {
633
+ const p = r.previewConfig || {}, c = (e.previewConfig || []).map((g) => {
634
+ const C = p[g.key];
635
+ return {
636
+ ...g,
637
+ ...C || {}
638
+ };
639
+ });
640
+ l.previewConfig = c;
641
+ }
642
+ return l;
613
643
  }
614
644
  const nt = { class: "animation-form" }, st = {
615
645
  key: 0,
@@ -623,15 +653,15 @@ const nt = { class: "animation-form" }, st = {
623
653
  modelValue: { default: () => ({}) }
624
654
  },
625
655
  emits: ["update:modelValue", "update-value"],
626
- setup(e, { emit: d }) {
627
- var S, z;
628
- const t = e, l = d, o = re({
629
- enterAnimation: ((S = t.modelValue) == null ? void 0 : S.enterAnimation) || "wkc-fadeIn",
656
+ setup(e, { emit: r }) {
657
+ var C, z;
658
+ const t = e, l = r, o = re({
659
+ enterAnimation: ((C = t.modelValue) == null ? void 0 : C.enterAnimation) || "wkc-fadeIn",
630
660
  exitAnimation: ((z = t.modelValue) == null ? void 0 : z.exitAnimation) || "wkc-fadeOut"
631
- }), m = P(() => {
661
+ }), p = E(() => {
632
662
  var $;
633
663
  return (($ = t.modelValue) == null ? void 0 : $.enterAnimation) !== void 0;
634
- }), c = P(() => {
664
+ }), c = E(() => {
635
665
  var $;
636
666
  return (($ = t.modelValue) == null ? void 0 : $.exitAnimation) !== void 0;
637
667
  });
@@ -642,41 +672,41 @@ const nt = { class: "animation-form" }, st = {
642
672
  },
643
673
  { deep: !0 }
644
674
  );
645
- const _ = ($, i) => {
675
+ const g = ($, i) => {
646
676
  o[$] = i, l("update-value", { key: $, value: i }), l("update:modelValue", { ...o });
647
677
  };
648
678
  return ($, i) => {
649
- const g = I("el-radio"), C = I("el-radio-group");
650
- return r(), k("div", nt, [
651
- m.value ? (r(), k("div", st, [
679
+ const f = I("el-radio"), S = I("el-radio-group");
680
+ return d(), _("div", nt, [
681
+ p.value ? (d(), _("div", st, [
652
682
  i[8] || (i[8] = v("label", { class: "form-label" }, "入场动画", -1)),
653
683
  v("div", at, [
654
- w(C, {
684
+ w(S, {
655
685
  modelValue: o.enterAnimation,
656
- "onUpdate:modelValue": i[0] || (i[0] = (y) => o.enterAnimation = y),
686
+ "onUpdate:modelValue": i[0] || (i[0] = (b) => o.enterAnimation = b),
657
687
  size: "small",
658
- onChange: i[1] || (i[1] = (y) => _("enterAnimation", y))
688
+ onChange: i[1] || (i[1] = (b) => g("enterAnimation", b))
659
689
  }, {
660
690
  default: U(() => [
661
- w(g, { label: "wkc-fadeIn" }, {
691
+ w(f, { label: "wkc-fadeIn" }, {
662
692
  default: U(() => [...i[4] || (i[4] = [
663
693
  H("淡入", -1)
664
694
  ])]),
665
695
  _: 1
666
696
  }),
667
- w(g, { label: "wkc-slideIn" }, {
697
+ w(f, { label: "wkc-slideIn" }, {
668
698
  default: U(() => [...i[5] || (i[5] = [
669
699
  H("滑入", -1)
670
700
  ])]),
671
701
  _: 1
672
702
  }),
673
- w(g, { label: "wkc-zoomIn" }, {
703
+ w(f, { label: "wkc-zoomIn" }, {
674
704
  default: U(() => [...i[6] || (i[6] = [
675
705
  H("缩放", -1)
676
706
  ])]),
677
707
  _: 1
678
708
  }),
679
- w(g, { label: "wkc-bounceIn" }, {
709
+ w(f, { label: "wkc-bounceIn" }, {
680
710
  default: U(() => [...i[7] || (i[7] = [
681
711
  H("弹跳", -1)
682
712
  ])]),
@@ -687,35 +717,35 @@ const nt = { class: "animation-form" }, st = {
687
717
  }, 8, ["modelValue"])
688
718
  ])
689
719
  ])) : M("", !0),
690
- c.value ? (r(), k("div", it, [
720
+ c.value ? (d(), _("div", it, [
691
721
  i[13] || (i[13] = v("label", { class: "form-label" }, "退场动画", -1)),
692
722
  v("div", ut, [
693
- w(C, {
723
+ w(S, {
694
724
  modelValue: o.exitAnimation,
695
- "onUpdate:modelValue": i[2] || (i[2] = (y) => o.exitAnimation = y),
725
+ "onUpdate:modelValue": i[2] || (i[2] = (b) => o.exitAnimation = b),
696
726
  size: "small",
697
- onChange: i[3] || (i[3] = (y) => _("exitAnimation", y))
727
+ onChange: i[3] || (i[3] = (b) => g("exitAnimation", b))
698
728
  }, {
699
729
  default: U(() => [
700
- w(g, { label: "wkc-fadeOut" }, {
730
+ w(f, { label: "wkc-fadeOut" }, {
701
731
  default: U(() => [...i[9] || (i[9] = [
702
732
  H("淡出", -1)
703
733
  ])]),
704
734
  _: 1
705
735
  }),
706
- w(g, { label: "wkc-slideOut" }, {
736
+ w(f, { label: "wkc-slideOut" }, {
707
737
  default: U(() => [...i[10] || (i[10] = [
708
738
  H("滑出", -1)
709
739
  ])]),
710
740
  _: 1
711
741
  }),
712
- w(g, { label: "wkc-zoomOut" }, {
742
+ w(f, { label: "wkc-zoomOut" }, {
713
743
  default: U(() => [...i[11] || (i[11] = [
714
744
  H("缩放", -1)
715
745
  ])]),
716
746
  _: 1
717
747
  }),
718
- w(g, { label: "wkc-bounceOut" }, {
748
+ w(f, { label: "wkc-bounceOut" }, {
719
749
  default: U(() => [...i[12] || (i[12] = [
720
750
  H("弹跳", -1)
721
751
  ])]),
@@ -729,9 +759,9 @@ const nt = { class: "animation-form" }, st = {
729
759
  ]);
730
760
  };
731
761
  }
732
- }), dt = (e, d) => {
762
+ }), dt = (e, r) => {
733
763
  const t = e.__vccOpts || e;
734
- for (const [l, o] of d)
764
+ for (const [l, o] of r)
735
765
  t[l] = o;
736
766
  return t;
737
767
  }, ct = /* @__PURE__ */ dt(rt, [["__scopeId", "data-v-ea77e723"]]), pt = { class: "wkc-form-border-radius" }, mt = { class: "border-radius-visual" }, vt = { class: "visual-container" }, ht = { class: "corner-input top-left" }, gt = { class: "corner-input top-right" }, ft = { class: "corner-input bottom-left" }, yt = { class: "corner-input bottom-right" }, bt = { class: "center-icon" }, kt = { class: "preset-section" }, _t = { class: "preset-buttons" }, wt = /* @__PURE__ */ K({
@@ -742,25 +772,25 @@ const nt = { class: "animation-form" }, st = {
742
772
  }) }
743
773
  },
744
774
  emits: ["update:modelValue", "update-value"],
745
- setup(e, { emit: d }) {
746
- const t = e, l = N(0), o = N(0), m = N(0), c = N(0), _ = d, S = N(""), z = () => {
747
- var b;
748
- const u = (((b = t.modelValue) == null ? void 0 : b.borderRadius) ?? "").split(" ").map(Number);
749
- u.length === 1 ? (l.value = u[0] ?? 0, o.value = u[0] ?? 0, m.value = u[0] ?? 0, c.value = u[0] ?? 0) : u.length === 2 ? (l.value = u[0] ?? 0, o.value = u[1] ?? 0, m.value = u[0] ?? 0, c.value = u[1] ?? 0) : u.length === 3 ? (l.value = u[0] ?? 0, o.value = u[1] ?? 0, c.value = u[2] ?? 0, m.value = u[1] ?? 0) : u.length === 4 ? (l.value = u[0] ?? 0, o.value = u[1] ?? 0, c.value = u[2] ?? 0, m.value = u[3] ?? 0) : (l.value = 0, o.value = 0, m.value = 0, c.value = 0);
775
+ setup(e, { emit: r }) {
776
+ const t = e, l = N(0), o = N(0), p = N(0), c = N(0), g = r, C = N(""), z = () => {
777
+ var k;
778
+ const u = (((k = t.modelValue) == null ? void 0 : k.borderRadius) ?? "").split(" ").map(Number);
779
+ u.length === 1 ? (l.value = u[0] ?? 0, o.value = u[0] ?? 0, p.value = u[0] ?? 0, c.value = u[0] ?? 0) : u.length === 2 ? (l.value = u[0] ?? 0, o.value = u[1] ?? 0, p.value = u[0] ?? 0, c.value = u[1] ?? 0) : u.length === 3 ? (l.value = u[0] ?? 0, o.value = u[1] ?? 0, c.value = u[2] ?? 0, p.value = u[1] ?? 0) : u.length === 4 ? (l.value = u[0] ?? 0, o.value = u[1] ?? 0, c.value = u[2] ?? 0, p.value = u[3] ?? 0) : (l.value = 0, o.value = 0, p.value = 0, c.value = 0);
750
780
  };
751
781
  te(
752
782
  () => t.modelValue,
753
783
  (h) => {
754
- h && (S.value = h.borderRadius ?? "", z());
784
+ h && (C.value = h.borderRadius ?? "", z());
755
785
  },
756
786
  { deep: !0 }
757
787
  );
758
788
  const $ = () => {
759
- const h = l.value ?? 0, u = o.value ?? 0, b = m.value ?? 0, f = c.value ?? 0;
789
+ const h = l.value ?? 0, u = o.value ?? 0, k = p.value ?? 0, y = c.value ?? 0;
760
790
  return {
761
- borderRadius: `${h}px ${u}px ${f}px ${b}px`
791
+ borderRadius: `${h}px ${u}px ${y}px ${k}px`
762
792
  };
763
- }, i = P(() => $()), g = (h, u) => {
793
+ }, i = E(() => $()), f = (h, u) => {
764
794
  switch (u) {
765
795
  case "topLeft":
766
796
  l.value = h ?? 0;
@@ -769,24 +799,24 @@ const nt = { class: "animation-form" }, st = {
769
799
  o.value = h ?? 0;
770
800
  break;
771
801
  case "bottomLeft":
772
- m.value = h ?? 0;
802
+ p.value = h ?? 0;
773
803
  break;
774
804
  case "bottomRight":
775
805
  c.value = h ?? 0;
776
806
  break;
777
807
  }
778
- C(), _("update-value", { key: u, value: h }), _("update:modelValue", { borderRadius: S.value });
779
- }, C = () => {
780
- const h = l.value ?? 0, u = o.value ?? 0, b = m.value ?? 0, f = c.value ?? 0;
781
- h === u && u === f && f === b ? S.value = h === 0 ? "" : `${h}` : S.value = `${h} ${u} ${f} ${b}`, _("update-value", { key: "borderRadius", value: S.value });
782
- }, y = (h) => {
783
- l.value = h, o.value = h, m.value = h, c.value = h, C();
808
+ S(), g("update-value", { key: u, value: h }), g("update:modelValue", { borderRadius: C.value });
809
+ }, S = () => {
810
+ const h = l.value ?? 0, u = o.value ?? 0, k = p.value ?? 0, y = c.value ?? 0;
811
+ h === u && u === y && y === k ? C.value = h === 0 ? "" : `${h}` : C.value = `${h} ${u} ${y} ${k}`, g("update-value", { key: "borderRadius", value: C.value });
812
+ }, b = (h) => {
813
+ l.value = h, o.value = h, p.value = h, c.value = h, S();
784
814
  };
785
- return be(() => {
815
+ return ke(() => {
786
816
  z();
787
817
  }), (h, u) => {
788
- const b = I("el-input-number"), f = I("el-icon"), p = I("el-button");
789
- return r(), k("div", pt, [
818
+ const k = I("el-input-number"), y = I("el-icon"), m = I("el-button");
819
+ return d(), _("div", pt, [
790
820
  v("div", mt, [
791
821
  v("div", vt, [
792
822
  v("div", {
@@ -794,53 +824,53 @@ const nt = { class: "animation-form" }, st = {
794
824
  style: oe(i.value)
795
825
  }, [
796
826
  v("div", ht, [
797
- w(b, {
827
+ w(k, {
798
828
  modelValue: l.value,
799
829
  "onUpdate:modelValue": u[0] || (u[0] = (s) => l.value = s),
800
830
  controls: !1,
801
831
  size: "small",
802
832
  min: 0,
803
833
  placeholder: "0",
804
- onChange: u[1] || (u[1] = (s) => g(l.value, s))
834
+ onChange: u[1] || (u[1] = (s) => f(l.value, s))
805
835
  }, null, 8, ["modelValue"])
806
836
  ]),
807
837
  v("div", gt, [
808
- w(b, {
838
+ w(k, {
809
839
  modelValue: o.value,
810
840
  "onUpdate:modelValue": u[2] || (u[2] = (s) => o.value = s),
811
841
  controls: !1,
812
842
  size: "small",
813
843
  min: 0,
814
844
  placeholder: "0",
815
- onChange: u[3] || (u[3] = (s) => g(o.value, s))
845
+ onChange: u[3] || (u[3] = (s) => f(o.value, s))
816
846
  }, null, 8, ["modelValue"])
817
847
  ]),
818
848
  v("div", ft, [
819
- w(b, {
820
- modelValue: m.value,
821
- "onUpdate:modelValue": u[4] || (u[4] = (s) => m.value = s),
849
+ w(k, {
850
+ modelValue: p.value,
851
+ "onUpdate:modelValue": u[4] || (u[4] = (s) => p.value = s),
822
852
  controls: !1,
823
853
  size: "small",
824
854
  min: 0,
825
855
  placeholder: "0",
826
- onChange: u[5] || (u[5] = (s) => g(m.value, s))
856
+ onChange: u[5] || (u[5] = (s) => f(p.value, s))
827
857
  }, null, 8, ["modelValue"])
828
858
  ]),
829
859
  v("div", yt, [
830
- w(b, {
860
+ w(k, {
831
861
  modelValue: c.value,
832
862
  "onUpdate:modelValue": u[6] || (u[6] = (s) => c.value = s),
833
863
  controls: !1,
834
864
  size: "small",
835
865
  min: 0,
836
866
  placeholder: "0",
837
- onChange: u[7] || (u[7] = (s) => g(c.value, s))
867
+ onChange: u[7] || (u[7] = (s) => f(c.value, s))
838
868
  }, null, 8, ["modelValue"])
839
869
  ]),
840
870
  v("div", bt, [
841
- w(f, null, {
871
+ w(y, null, {
842
872
  default: U(() => [
843
- w(B(_e))
873
+ w(B(we))
844
874
  ]),
845
875
  _: 1
846
876
  })
@@ -851,27 +881,27 @@ const nt = { class: "animation-form" }, st = {
851
881
  v("div", kt, [
852
882
  u[14] || (u[14] = v("div", { class: "preset-label" }, "快捷预设", -1)),
853
883
  v("div", _t, [
854
- w(p, {
884
+ w(m, {
855
885
  size: "small",
856
- onClick: u[8] || (u[8] = (s) => y(0))
886
+ onClick: u[8] || (u[8] = (s) => b(0))
857
887
  }, {
858
888
  default: U(() => [...u[11] || (u[11] = [
859
889
  H("无圆角", -1)
860
890
  ])]),
861
891
  _: 1
862
892
  }),
863
- w(p, {
893
+ w(m, {
864
894
  size: "small",
865
- onClick: u[9] || (u[9] = (s) => y(4))
895
+ onClick: u[9] || (u[9] = (s) => b(4))
866
896
  }, {
867
897
  default: U(() => [...u[12] || (u[12] = [
868
898
  H("小圆角4", -1)
869
899
  ])]),
870
900
  _: 1
871
901
  }),
872
- w(p, {
902
+ w(m, {
873
903
  size: "small",
874
- onClick: u[10] || (u[10] = (s) => y(8))
904
+ onClick: u[10] || (u[10] = (s) => b(8))
875
905
  }, {
876
906
  default: U(() => [...u[13] || (u[13] = [
877
907
  H("中圆角8", -1)
@@ -901,7 +931,7 @@ const nt = { class: "animation-form" }, st = {
901
931
  }, At = {
902
932
  key: 3,
903
933
  class: "form-row"
904
- }, Rt = { class: "form-item" }, Et = { class: "form-row" }, Pt = { class: "form-item" }, Tt = { class: "form-item" }, Bt = { class: "form-row" }, Nt = { class: "form-item" }, Ot = { class: "form-item" }, Ht = {
934
+ }, Pt = { class: "form-item" }, Rt = { class: "form-row" }, Et = { class: "form-item" }, Tt = { class: "form-item" }, Bt = { class: "form-row" }, Nt = { class: "form-item" }, Ot = { class: "form-item" }, Ht = {
905
935
  key: 5,
906
936
  class: "form-row"
907
937
  }, Wt = { class: "form-item" }, Dt = /* @__PURE__ */ K({
@@ -910,50 +940,50 @@ const nt = { class: "animation-form" }, st = {
910
940
  modelValue: { default: () => ({}) }
911
941
  },
912
942
  emits: ["update:modelValue", "update-value"],
913
- setup(e, { emit: d }) {
914
- var u, b, f, p, s, x, L, R, F, J, W, Z, a;
915
- const t = e, l = d, o = re({
943
+ setup(e, { emit: r }) {
944
+ var u, k, y, m, s, x, L, P, F, J, W, Z, a;
945
+ const t = e, l = r, o = re({
916
946
  top: ((u = t.modelValue) == null ? void 0 : u.top) ?? null,
917
- marginTop: ((b = t.modelValue) == null ? void 0 : b.marginTop) ?? null,
918
- width: ((f = t.modelValue) == null ? void 0 : f.width) ?? null,
919
- height: ((p = t.modelValue) == null ? void 0 : p.height) ?? null,
947
+ marginTop: ((k = t.modelValue) == null ? void 0 : k.marginTop) ?? null,
948
+ width: ((y = t.modelValue) == null ? void 0 : y.width) ?? null,
949
+ height: ((m = t.modelValue) == null ? void 0 : m.height) ?? null,
920
950
  left: ((s = t.modelValue) == null ? void 0 : s.left) ?? null,
921
951
  marginLeft: ((x = t.modelValue) == null ? void 0 : x.marginLeft) ?? null,
922
952
  centerHorizontal: ((L = t.modelValue) == null ? void 0 : L.centerHorizontal) ?? !1,
923
- bgColor: ((R = t.modelValue) == null ? void 0 : R.bgColor) ?? "",
953
+ bgColor: ((P = t.modelValue) == null ? void 0 : P.bgColor) ?? "",
924
954
  paddingTop: ((F = t.modelValue) == null ? void 0 : F.paddingTop) ?? null,
925
955
  paddingRight: ((J = t.modelValue) == null ? void 0 : J.paddingRight) ?? null,
926
956
  paddingBottom: ((W = t.modelValue) == null ? void 0 : W.paddingBottom) ?? null,
927
957
  paddingLeft: ((Z = t.modelValue) == null ? void 0 : Z.paddingLeft) ?? null,
928
958
  zIndex: ((a = t.modelValue) == null ? void 0 : a.zIndex) ?? 1
929
- }), m = P(() => {
959
+ }), p = E(() => {
930
960
  var V;
931
961
  return ((V = t.modelValue) == null ? void 0 : V.left) !== void 0;
932
- }), c = P(() => {
962
+ }), c = E(() => {
933
963
  var V;
934
964
  return ((V = t.modelValue) == null ? void 0 : V.marginLeft) !== void 0;
935
- }), _ = P(() => {
965
+ }), g = E(() => {
936
966
  var V;
937
967
  return ((V = t.modelValue) == null ? void 0 : V.top) !== void 0;
938
- }), S = P(() => {
968
+ }), C = E(() => {
939
969
  var V;
940
970
  return ((V = t.modelValue) == null ? void 0 : V.marginTop) !== void 0;
941
- }), z = P(() => {
971
+ }), z = E(() => {
942
972
  var V;
943
973
  return ((V = t.modelValue) == null ? void 0 : V.width) !== void 0;
944
- }), $ = P(() => {
974
+ }), $ = E(() => {
945
975
  var V;
946
976
  return ((V = t.modelValue) == null ? void 0 : V.height) !== void 0;
947
- }), i = P(() => {
977
+ }), i = E(() => {
948
978
  var V;
949
979
  return ((V = t.modelValue) == null ? void 0 : V.bgColor) !== void 0;
950
- }), g = P(() => {
980
+ }), f = E(() => {
951
981
  var V;
952
982
  return ((V = t.modelValue) == null ? void 0 : V.centerHorizontal) !== void 0;
953
- }), C = P(() => {
983
+ }), S = E(() => {
954
984
  var V, n, q, O;
955
985
  return ((V = t.modelValue) == null ? void 0 : V.paddingTop) !== void 0 || ((n = t.modelValue) == null ? void 0 : n.paddingRight) !== void 0 || ((q = t.modelValue) == null ? void 0 : q.paddingBottom) !== void 0 || ((O = t.modelValue) == null ? void 0 : O.paddingLeft) !== void 0;
956
- }), y = P(() => {
986
+ }), b = E(() => {
957
987
  var V;
958
988
  return ((V = t.modelValue) == null ? void 0 : V.zIndex) !== void 0;
959
989
  });
@@ -968,13 +998,13 @@ const nt = { class: "animation-form" }, st = {
968
998
  o[V] = n, l("update-value", { key: V, value: n }), l("update:modelValue", { ...o });
969
999
  };
970
1000
  return (V, n) => {
971
- const q = I("el-checkbox"), O = I("el-input-number"), ve = I("el-color-picker");
972
- return r(), k("div", $t, [
973
- m.value || c.value || g.value ? (r(), k("div", Ct, [
1001
+ const q = I("el-checkbox"), O = I("el-input-number"), he = I("el-color-picker");
1002
+ return d(), _("div", $t, [
1003
+ p.value || c.value || f.value ? (d(), _("div", Ct, [
974
1004
  v("div", St, [
975
1005
  n[14] || (n[14] = v("label", null, "距左侧", -1)),
976
1006
  v("div", Vt, [
977
- g.value ? (r(), E(q, {
1007
+ f.value ? (d(), R(q, {
978
1008
  key: 0,
979
1009
  "model-value": o.centerHorizontal,
980
1010
  onChange: n[0] || (n[0] = (A) => h("centerHorizontal", A)),
@@ -985,14 +1015,14 @@ const nt = { class: "animation-form" }, st = {
985
1015
  ])]),
986
1016
  _: 1
987
1017
  }, 8, ["model-value"])) : M("", !0),
988
- m.value ? (r(), E(O, {
1018
+ p.value ? (d(), R(O, {
989
1019
  key: 1,
990
1020
  "model-value": o.left,
991
1021
  disabled: o.centerHorizontal,
992
1022
  size: "small",
993
1023
  placeholder: "left",
994
1024
  onChange: n[1] || (n[1] = (A) => h("left", A))
995
- }, null, 8, ["model-value", "disabled"])) : c.value ? (r(), E(O, {
1025
+ }, null, 8, ["model-value", "disabled"])) : c.value ? (d(), R(O, {
996
1026
  key: 2,
997
1027
  "model-value": o.marginLeft,
998
1028
  disabled: o.centerHorizontal,
@@ -1001,19 +1031,19 @@ const nt = { class: "animation-form" }, st = {
1001
1031
  onChange: n[2] || (n[2] = (A) => h("marginLeft", A))
1002
1032
  }, null, 8, ["model-value", "disabled"])) : M("", !0)
1003
1033
  ]),
1004
- m.value || c.value ? (r(), k("span", zt, "px")) : M("", !0)
1034
+ p.value || c.value ? (d(), _("span", zt, "px")) : M("", !0)
1005
1035
  ])
1006
1036
  ])) : M("", !0),
1007
- _.value || S.value ? (r(), k("div", xt, [
1037
+ g.value || C.value ? (d(), _("div", xt, [
1008
1038
  v("div", Ut, [
1009
- v("label", null, T(_.value ? "距顶部" : "上间距"), 1),
1010
- _.value ? (r(), E(O, {
1039
+ v("label", null, T(g.value ? "距顶部" : "上间距"), 1),
1040
+ g.value ? (d(), R(O, {
1011
1041
  key: 0,
1012
1042
  "model-value": o.top,
1013
1043
  size: "small",
1014
1044
  placeholder: "top",
1015
1045
  onChange: n[3] || (n[3] = (A) => h("top", A))
1016
- }, null, 8, ["model-value"])) : S.value ? (r(), E(O, {
1046
+ }, null, 8, ["model-value"])) : C.value ? (d(), R(O, {
1017
1047
  key: 1,
1018
1048
  "model-value": o.marginTop,
1019
1049
  size: "small",
@@ -1023,8 +1053,8 @@ const nt = { class: "animation-form" }, st = {
1023
1053
  n[15] || (n[15] = H(" px ", -1))
1024
1054
  ])
1025
1055
  ])) : M("", !0),
1026
- z.value || $.value ? (r(), k("div", Lt, [
1027
- z.value ? (r(), k("div", Mt, [
1056
+ z.value || $.value ? (d(), _("div", Lt, [
1057
+ z.value ? (d(), _("div", Mt, [
1028
1058
  n[16] || (n[16] = v("label", null, "宽度", -1)),
1029
1059
  w(O, {
1030
1060
  "model-value": o.width,
@@ -1034,7 +1064,7 @@ const nt = { class: "animation-form" }, st = {
1034
1064
  }, null, 8, ["model-value"]),
1035
1065
  n[17] || (n[17] = H("px ", -1))
1036
1066
  ])) : M("", !0),
1037
- $.value ? (r(), k("div", It, [
1067
+ $.value ? (d(), _("div", It, [
1038
1068
  n[18] || (n[18] = v("label", null, "高度", -1)),
1039
1069
  w(O, {
1040
1070
  "model-value": o.height,
@@ -1045,19 +1075,19 @@ const nt = { class: "animation-form" }, st = {
1045
1075
  n[19] || (n[19] = H("px ", -1))
1046
1076
  ])) : M("", !0)
1047
1077
  ])) : M("", !0),
1048
- i.value ? (r(), k("div", At, [
1049
- v("div", Rt, [
1078
+ i.value ? (d(), _("div", At, [
1079
+ v("div", Pt, [
1050
1080
  n[20] || (n[20] = v("label", null, "背景色", -1)),
1051
- w(ve, {
1081
+ w(he, {
1052
1082
  "model-value": o.bgColor,
1053
1083
  onChange: n[7] || (n[7] = (A) => h("bgColor", A)),
1054
1084
  size: "small"
1055
1085
  }, null, 8, ["model-value"])
1056
1086
  ])
1057
1087
  ])) : M("", !0),
1058
- C.value ? (r(), k(Y, { key: 4 }, [
1059
- v("div", Et, [
1060
- v("div", Pt, [
1088
+ S.value ? (d(), _(Y, { key: 4 }, [
1089
+ v("div", Rt, [
1090
+ v("div", Et, [
1061
1091
  n[21] || (n[21] = v("label", null, "内边距上", -1)),
1062
1092
  w(O, {
1063
1093
  "model-value": o.paddingTop,
@@ -1097,7 +1127,7 @@ const nt = { class: "animation-form" }, st = {
1097
1127
  ])
1098
1128
  ])
1099
1129
  ], 64)) : M("", !0),
1100
- y.value ? (r(), k("div", Ht, [
1130
+ b.value ? (d(), _("div", Ht, [
1101
1131
  v("div", Wt, [
1102
1132
  n[25] || (n[25] = v("label", null, "层级", -1)),
1103
1133
  w(O, {
@@ -1160,57 +1190,57 @@ const nt = { class: "animation-form" }, st = {
1160
1190
  configList: {}
1161
1191
  },
1162
1192
  emits: ["update-value"],
1163
- setup(e, { emit: d }) {
1164
- const t = de, l = e, o = N([]), m = d, c = (i) => {
1193
+ setup(e, { emit: r }) {
1194
+ const t = de, l = e, o = N([]), p = r, c = (i) => {
1165
1195
  if (!i.children) return {};
1166
- const g = {};
1167
- return i.children.forEach((C) => {
1168
- g[C.key] = C.value;
1169
- }), g;
1170
- }, _ = (i) => ce(i, l.configList), S = (i, g) => {
1171
- const { key: C, value: y } = g;
1196
+ const f = {};
1197
+ return i.children.forEach((S) => {
1198
+ f[S.key] = S.value;
1199
+ }), f;
1200
+ }, g = (i) => ce(i, l.configList), C = (i, f) => {
1201
+ const { key: S, value: b } = f;
1172
1202
  if (i.children) {
1173
- const h = i.children.find((u) => u.key === C);
1203
+ const h = i.children.find((u) => u.key === S);
1174
1204
  if (h) {
1175
- h.value = y;
1176
- const u = i.parentKey ? `${i.parentKey}.${C}` : `${i.key}.${C}`;
1177
- m("update-value", u, y);
1205
+ h.value = b;
1206
+ const u = i.parentKey ? `${i.parentKey}.${S}` : `${i.key}.${S}`;
1207
+ p("update-value", u, b);
1178
1208
  }
1179
1209
  }
1180
- }, z = (i, g) => {
1181
- m("update-value", i, g);
1210
+ }, z = (i, f) => {
1211
+ p("update-value", i, f);
1182
1212
  }, $ = (i) => {
1183
- const { key: g, parentKey: C, value: y } = i;
1184
- m("update-value", C || g, y);
1213
+ const { key: f, parentKey: S, value: b } = i;
1214
+ p("update-value", S || f, b);
1185
1215
  };
1186
1216
  return te(
1187
1217
  () => l.configList,
1188
1218
  (i) => {
1189
- o.value = i.filter((g) => g.type === "group-panel").map((g) => g.key);
1219
+ o.value = i.filter((f) => f.type === "group-panel").map((f) => f.key);
1190
1220
  },
1191
1221
  {
1192
1222
  immediate: !0
1193
1223
  }
1194
- ), (i, g) => {
1195
- const C = I("RenderBlock", !0), y = I("el-collapse-item"), h = I("el-collapse"), u = I("el-input"), b = I("el-icon"), f = I("el-tooltip"), p = I("el-input-number"), s = I("el-slider"), x = I("el-switch"), L = I("el-radio"), R = I("el-radio-group"), F = I("el-option"), J = I("el-select"), W = I("el-color-picker"), Z = I("el-form-item");
1196
- return r(), k("div", Yt, [
1197
- (r(!0), k(Y, null, G(e.configList, (a, V) => (r(), k(Y, {
1224
+ ), (i, f) => {
1225
+ const S = I("RenderBlock", !0), b = I("el-collapse-item"), h = I("el-collapse"), u = I("el-input"), k = I("el-icon"), y = I("el-tooltip"), m = I("el-input-number"), s = I("el-slider"), x = I("el-switch"), L = I("el-radio"), P = I("el-radio-group"), F = I("el-option"), J = I("el-select"), W = I("el-color-picker"), Z = I("el-form-item");
1226
+ return d(), _("div", Yt, [
1227
+ (d(!0), _(Y, null, G(e.configList, (a, V) => (d(), _(Y, {
1198
1228
  key: `${a.key}-${V}`
1199
1229
  }, [
1200
- a.type === "group-panel" && _(a) ? (r(), E(h, {
1230
+ a.type === "group-panel" && g(a) ? (d(), R(h, {
1201
1231
  key: 0,
1202
1232
  modelValue: o.value,
1203
- "onUpdate:modelValue": g[0] || (g[0] = (n) => o.value = n),
1233
+ "onUpdate:modelValue": f[0] || (f[0] = (n) => o.value = n),
1204
1234
  class: "group-panel"
1205
1235
  }, {
1206
1236
  default: U(() => [
1207
- w(y, {
1237
+ w(b, {
1208
1238
  name: a.key
1209
1239
  }, {
1210
1240
  title: U(() => [
1211
1241
  v("div", Xt, [
1212
1242
  v("span", Gt, T(a.label || a.key), 1),
1213
- a.desc ? (r(), k("span", {
1243
+ a.desc ? (d(), _("span", {
1214
1244
  key: 0,
1215
1245
  class: "panel-desc",
1216
1246
  title: a.desc
@@ -1218,19 +1248,19 @@ const nt = { class: "animation-form" }, st = {
1218
1248
  ])
1219
1249
  ]),
1220
1250
  default: U(() => [
1221
- a.renderForm === "position" ? (r(), E(Dt, {
1251
+ a.renderForm === "position" ? (d(), R(Dt, {
1222
1252
  key: 0,
1223
1253
  "model-value": c(a),
1224
- onUpdateValue: (n) => S(a, n)
1225
- }, null, 8, ["model-value", "onUpdateValue"])) : a.renderForm === "animation" ? (r(), E(ct, {
1254
+ onUpdateValue: (n) => C(a, n)
1255
+ }, null, 8, ["model-value", "onUpdateValue"])) : a.renderForm === "animation" ? (d(), R(ct, {
1226
1256
  key: 1,
1227
1257
  "model-value": c(a),
1228
- onUpdateValue: (n) => S(a, n)
1229
- }, null, 8, ["model-value", "onUpdateValue"])) : a.renderForm === "border-radius" ? (r(), E(wt, {
1258
+ onUpdateValue: (n) => C(a, n)
1259
+ }, null, 8, ["model-value", "onUpdateValue"])) : a.renderForm === "border-radius" ? (d(), R(wt, {
1230
1260
  key: 2,
1231
1261
  "model-value": c(a),
1232
- onUpdateValue: (n) => S(a, n)
1233
- }, null, 8, ["model-value", "onUpdateValue"])) : a.children && a.children.length ? (r(), E(C, {
1262
+ onUpdateValue: (n) => C(a, n)
1263
+ }, null, 8, ["model-value", "onUpdateValue"])) : a.children && a.children.length ? (d(), R(S, {
1234
1264
  key: 3,
1235
1265
  "config-list": a.children,
1236
1266
  onUpdateValue: z
@@ -1256,7 +1286,7 @@ const nt = { class: "animation-form" }, st = {
1256
1286
  }, 1032, ["name"])
1257
1287
  ]),
1258
1288
  _: 2
1259
- }, 1032, ["modelValue"])) : _(a) ? (r(), E(Z, {
1289
+ }, 1032, ["modelValue"])) : g(a) ? (d(), R(Z, {
1260
1290
  key: 1,
1261
1291
  label: a.label
1262
1292
  }, {
@@ -1271,7 +1301,7 @@ const nt = { class: "animation-form" }, st = {
1271
1301
  field: a,
1272
1302
  value: a.value,
1273
1303
  update: (n) => $({ ...a, value: n })
1274
- }) : a.type === B(t).INPUT ? (r(), k("div", Zt, [
1304
+ }) : a.type === B(t).INPUT ? (d(), _("div", Zt, [
1275
1305
  w(u, {
1276
1306
  modelValue: a.value,
1277
1307
  "onUpdate:modelValue": (n) => a.value = n,
@@ -1279,14 +1309,14 @@ const nt = { class: "animation-form" }, st = {
1279
1309
  size: "small",
1280
1310
  onInput: (n) => $(a)
1281
1311
  }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onInput"]),
1282
- a.desc ? (r(), E(f, {
1312
+ a.desc ? (d(), R(y, {
1283
1313
  key: 0,
1284
1314
  content: a.desc,
1285
1315
  placement: "top",
1286
1316
  effect: "dark"
1287
1317
  }, {
1288
1318
  default: U(() => [
1289
- w(b, { class: "field-desc-icon" }, {
1319
+ w(k, { class: "field-desc-icon" }, {
1290
1320
  default: U(() => [
1291
1321
  w(B(j))
1292
1322
  ]),
@@ -1295,7 +1325,7 @@ const nt = { class: "animation-form" }, st = {
1295
1325
  ]),
1296
1326
  _: 1
1297
1327
  }, 8, ["content"])) : M("", !0)
1298
- ])) : a.type === B(t).TEXTAREA ? (r(), k("div", qt, [
1328
+ ])) : a.type === B(t).TEXTAREA ? (d(), _("div", qt, [
1299
1329
  w(u, {
1300
1330
  modelValue: a.value,
1301
1331
  "onUpdate:modelValue": (n) => a.value = n,
@@ -1306,14 +1336,14 @@ const nt = { class: "animation-form" }, st = {
1306
1336
  class: "textarea-item",
1307
1337
  onInput: (n) => $(a)
1308
1338
  }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onInput"]),
1309
- a.desc ? (r(), E(f, {
1339
+ a.desc ? (d(), R(y, {
1310
1340
  key: 0,
1311
1341
  content: a.desc,
1312
1342
  placement: "top",
1313
1343
  effect: "dark"
1314
1344
  }, {
1315
1345
  default: U(() => [
1316
- w(b, { class: "field-desc-icon" }, {
1346
+ w(k, { class: "field-desc-icon" }, {
1317
1347
  default: U(() => [
1318
1348
  w(B(j))
1319
1349
  ]),
@@ -1322,8 +1352,8 @@ const nt = { class: "animation-form" }, st = {
1322
1352
  ]),
1323
1353
  _: 1
1324
1354
  }, 8, ["content"])) : M("", !0)
1325
- ])) : a.type === B(t).NUMBER ? (r(), k("div", Ft, [
1326
- w(p, {
1355
+ ])) : a.type === B(t).NUMBER ? (d(), _("div", Ft, [
1356
+ w(m, {
1327
1357
  modelValue: a.value,
1328
1358
  "onUpdate:modelValue": (n) => a.value = n,
1329
1359
  placeholder: "请输入",
@@ -1331,8 +1361,8 @@ const nt = { class: "animation-form" }, st = {
1331
1361
  "controls-position": "right",
1332
1362
  onChange: (n) => $(a)
1333
1363
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"]),
1334
- a.desc ? (r(), k("span", Jt, T(a.desc), 1)) : M("", !0)
1335
- ])) : a.type === B(t).SLIDER ? (r(), k("div", Qt, [
1364
+ a.desc ? (d(), _("span", Jt, T(a.desc), 1)) : M("", !0)
1365
+ ])) : a.type === B(t).SLIDER ? (d(), _("div", Qt, [
1336
1366
  w(s, {
1337
1367
  modelValue: a.value,
1338
1368
  "onUpdate:modelValue": (n) => a.value = n,
@@ -1343,14 +1373,14 @@ const nt = { class: "animation-form" }, st = {
1343
1373
  "show-input": "",
1344
1374
  onChange: (n) => $(a)
1345
1375
  }, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max", "step", "onChange"]),
1346
- a.desc ? (r(), E(f, {
1376
+ a.desc ? (d(), R(y, {
1347
1377
  key: 0,
1348
1378
  content: a.desc,
1349
1379
  placement: "top",
1350
1380
  effect: "dark"
1351
1381
  }, {
1352
1382
  default: U(() => [
1353
- w(b, { class: "field-desc-icon" }, {
1383
+ w(k, { class: "field-desc-icon" }, {
1354
1384
  default: U(() => [
1355
1385
  w(B(j))
1356
1386
  ]),
@@ -1359,23 +1389,23 @@ const nt = { class: "animation-form" }, st = {
1359
1389
  ]),
1360
1390
  _: 1
1361
1391
  }, 8, ["content"])) : M("", !0)
1362
- ])) : a.type === B(t).SWITCH ? (r(), k("div", jt, [
1392
+ ])) : a.type === B(t).SWITCH ? (d(), _("div", jt, [
1363
1393
  w(x, {
1364
1394
  modelValue: a.value,
1365
1395
  "onUpdate:modelValue": (n) => a.value = n,
1366
1396
  size: "small",
1367
1397
  onChange: (n) => $(a)
1368
1398
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"]),
1369
- a.desc ? (r(), k("span", eo, T(a.desc), 1)) : M("", !0)
1370
- ])) : a.type === B(t).RADIO ? (r(), k("div", to, [
1371
- w(R, {
1399
+ a.desc ? (d(), _("span", eo, T(a.desc), 1)) : M("", !0)
1400
+ ])) : a.type === B(t).RADIO ? (d(), _("div", to, [
1401
+ w(P, {
1372
1402
  modelValue: a.value,
1373
1403
  "onUpdate:modelValue": (n) => a.value = n,
1374
1404
  size: "small",
1375
1405
  onChange: (n) => $(a)
1376
1406
  }, {
1377
1407
  default: U(() => [
1378
- (r(!0), k(Y, null, G(a.options || [], (n) => (r(), E(L, {
1408
+ (d(!0), _(Y, null, G(a.options || [], (n) => (d(), R(L, {
1379
1409
  key: String(n.value),
1380
1410
  label: n.value
1381
1411
  }, {
@@ -1387,14 +1417,14 @@ const nt = { class: "animation-form" }, st = {
1387
1417
  ]),
1388
1418
  _: 2
1389
1419
  }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"]),
1390
- a.desc ? (r(), E(f, {
1420
+ a.desc ? (d(), R(y, {
1391
1421
  key: 0,
1392
1422
  content: a.desc,
1393
1423
  placement: "top",
1394
1424
  effect: "dark"
1395
1425
  }, {
1396
1426
  default: U(() => [
1397
- w(b, { class: "field-desc-icon" }, {
1427
+ w(k, { class: "field-desc-icon" }, {
1398
1428
  default: U(() => [
1399
1429
  w(B(j))
1400
1430
  ]),
@@ -1403,7 +1433,7 @@ const nt = { class: "animation-form" }, st = {
1403
1433
  ]),
1404
1434
  _: 1
1405
1435
  }, 8, ["content"])) : M("", !0)
1406
- ])) : a.type === B(t).SELECT ? (r(), k("div", oo, [
1436
+ ])) : a.type === B(t).SELECT ? (d(), _("div", oo, [
1407
1437
  w(J, {
1408
1438
  modelValue: a.value,
1409
1439
  "onUpdate:modelValue": (n) => a.value = n,
@@ -1412,7 +1442,7 @@ const nt = { class: "animation-form" }, st = {
1412
1442
  filterable: ""
1413
1443
  }, {
1414
1444
  default: U(() => [
1415
- (r(!0), k(Y, null, G(a.options || [], (n) => (r(), E(F, {
1445
+ (d(!0), _(Y, null, G(a.options || [], (n) => (d(), R(F, {
1416
1446
  key: String(n.value),
1417
1447
  label: n.label,
1418
1448
  value: n.value
@@ -1420,14 +1450,14 @@ const nt = { class: "animation-form" }, st = {
1420
1450
  ]),
1421
1451
  _: 2
1422
1452
  }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"]),
1423
- a.desc ? (r(), E(f, {
1453
+ a.desc ? (d(), R(y, {
1424
1454
  key: 0,
1425
1455
  content: a.desc,
1426
1456
  placement: "top",
1427
1457
  effect: "dark"
1428
1458
  }, {
1429
1459
  default: U(() => [
1430
- w(b, { class: "field-desc-icon" }, {
1460
+ w(k, { class: "field-desc-icon" }, {
1431
1461
  default: U(() => [
1432
1462
  w(B(j))
1433
1463
  ]),
@@ -1436,7 +1466,7 @@ const nt = { class: "animation-form" }, st = {
1436
1466
  ]),
1437
1467
  _: 1
1438
1468
  }, 8, ["content"])) : M("", !0)
1439
- ])) : a.type === B(t).COLOR ? (r(), k("div", lo, [
1469
+ ])) : a.type === B(t).COLOR ? (d(), _("div", lo, [
1440
1470
  w(W, {
1441
1471
  modelValue: a.value,
1442
1472
  "onUpdate:modelValue": (n) => a.value = n,
@@ -1444,8 +1474,8 @@ const nt = { class: "animation-form" }, st = {
1444
1474
  "show-alpha": "",
1445
1475
  onChange: (n) => $(a)
1446
1476
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"]),
1447
- a.desc ? (r(), k("span", no, T(a.desc), 1)) : M("", !0)
1448
- ])) : a.type === B(t).READONLY ? (r(), k("div", so, T(a.value), 1)) : (r(), k("div", ao, "未指定类型: " + T(a.type), 1))
1477
+ a.desc ? (d(), _("span", no, T(a.desc), 1)) : M("", !0)
1478
+ ])) : a.type === B(t).READONLY ? (d(), _("div", so, T(a.value), 1)) : (d(), _("div", ao, "未指定类型: " + T(a.type), 1))
1449
1479
  ]),
1450
1480
  _: 2
1451
1481
  }, 1032, ["label"])) : M("", !0)
@@ -1472,81 +1502,81 @@ const nt = { class: "animation-form" }, st = {
1472
1502
  componentConfig: {}
1473
1503
  },
1474
1504
  emits: ["update-prop", "update-preview"],
1475
- setup(e, { emit: d }) {
1476
- const t = e, l = N("style"), o = N("style"), m = N([]), c = N([]), _ = N([]), S = P(() => l.value.startsWith(D.SUB_COMPONENT)), z = P(() => {
1505
+ setup(e, { emit: r }) {
1506
+ const t = e, l = N("style"), o = N("style"), p = N([]), c = N([]), g = N([]), C = E(() => l.value.startsWith(D.SUB_COMPONENT)), z = E(() => {
1477
1507
  var s;
1478
- if (!S.value || !t.componentConfig) return [];
1479
- const b = Number(l.value.split("-")[1]), f = (s = t.componentConfig.subComponents) == null ? void 0 : s[b];
1480
- if (!f) return [];
1481
- const p = [];
1482
- return f.styleSchema && f.styleSchema.length > 0 && p.push({ key: "style", label: "样式配置" }), f.businessSchema && f.businessSchema.length > 0 && p.push({ key: "business", label: "业务配置" }), p;
1483
- }), $ = (b) => {
1484
- var f;
1485
- l.value = b, b.startsWith(D.SUB_COMPONENT) && (o.value = ((f = z.value[0]) == null ? void 0 : f.key) || "style"), g();
1486
- }, i = (b) => {
1487
- o.value = b, g();
1488
- }, g = () => {
1489
- var b;
1508
+ if (!C.value || !t.componentConfig) return [];
1509
+ const k = Number(l.value.split("-")[1]), y = (s = t.componentConfig.subComponents) == null ? void 0 : s[k];
1510
+ if (!y) return [];
1511
+ const m = [];
1512
+ return y.styleSchema && y.styleSchema.length > 0 && m.push({ key: "style", label: "样式配置" }), y.businessSchema && y.businessSchema.length > 0 && m.push({ key: "business", label: "业务配置" }), m;
1513
+ }), $ = (k) => {
1514
+ var y;
1515
+ l.value = k, k.startsWith(D.SUB_COMPONENT) && (o.value = ((y = z.value[0]) == null ? void 0 : y.key) || "style"), f();
1516
+ }, i = (k) => {
1517
+ o.value = k, f();
1518
+ }, f = () => {
1519
+ var k;
1490
1520
  if (!t.componentConfig) {
1491
- m.value = [];
1521
+ p.value = [];
1492
1522
  return;
1493
1523
  }
1494
1524
  if (l.value.startsWith(D.SUB_COMPONENT)) {
1495
- const f = Number(l.value.split("-")[1]), p = (b = t.componentConfig.subComponents) == null ? void 0 : b[f];
1496
- if (!p) {
1497
- m.value = [];
1525
+ const y = Number(l.value.split("-")[1]), m = (k = t.componentConfig.subComponents) == null ? void 0 : k[y];
1526
+ if (!m) {
1527
+ p.value = [];
1498
1528
  return;
1499
1529
  }
1500
- o.value === "style" ? m.value = p.styleSchema || [] : m.value = p.businessSchema || [];
1530
+ o.value === "style" ? p.value = m.styleSchema || [] : p.value = m.businessSchema || [];
1501
1531
  return;
1502
1532
  }
1503
- switch (c.value = [], m.value = [], l.value) {
1533
+ switch (c.value = [], p.value = [], l.value) {
1504
1534
  case D.STYLE:
1505
- m.value = t.componentConfig.styleSchema || [];
1535
+ p.value = t.componentConfig.styleSchema || [];
1506
1536
  break;
1507
1537
  case D.BUSINESS:
1508
- m.value = t.componentConfig.businessSchema || [];
1538
+ p.value = t.componentConfig.businessSchema || [];
1509
1539
  break;
1510
1540
  case D.PREVIEW:
1511
1541
  c.value = t.componentConfig.previewConfig || [];
1512
1542
  break;
1513
1543
  }
1514
- m.value = m.value.filter((f) => !f.hidden);
1515
- }, C = () => {
1516
- if (_.value = [], !t.componentConfig) return;
1517
- const b = [], f = t.componentConfig;
1518
- f.styleSchema && f.styleSchema.length > 0 && b.push({ key: D.STYLE, label: "样式配置", icon: "🎨" }), f.businessSchema && f.businessSchema.length > 0 && b.push({ key: D.BUSINESS, label: "业务配置", icon: "⚙️" }), f.subComponents && f.subComponents.length > 0 && f.subComponents.forEach((p, s) => {
1519
- b.push({
1544
+ p.value = p.value.filter((y) => !y.hidden);
1545
+ }, S = () => {
1546
+ if (g.value = [], !t.componentConfig) return;
1547
+ const k = [], y = t.componentConfig;
1548
+ y.styleSchema && y.styleSchema.length > 0 && k.push({ key: D.STYLE, label: "样式配置", icon: "🎨" }), y.businessSchema && y.businessSchema.length > 0 && k.push({ key: D.BUSINESS, label: "业务配置", icon: "⚙️" }), y.subComponents && y.subComponents.length > 0 && y.subComponents.forEach((m, s) => {
1549
+ k.push({
1520
1550
  key: `${D.SUB_COMPONENT}-${s}`,
1521
- label: p.name,
1551
+ label: m.name,
1522
1552
  icon: "📦"
1523
1553
  });
1524
- }), f.previewConfig && b.push({ key: D.PREVIEW, label: "接口预览", icon: "" }), _.value = b;
1554
+ }), y.previewConfig && k.push({ key: D.PREVIEW, label: "接口预览", icon: "" }), g.value = k;
1525
1555
  };
1526
1556
  te(
1527
1557
  () => t.componentConfig,
1528
- (b) => {
1529
- C(), _.value.length > 0 ? l.value = _.value[0].key : l.value = "style", b ? g() : m.value = [];
1558
+ (k) => {
1559
+ S(), g.value.length > 0 ? l.value = g.value[0].key : l.value = "style", k ? f() : p.value = [];
1530
1560
  },
1531
1561
  { immediate: !0 }
1532
1562
  );
1533
- const y = d, h = (b, f) => {
1534
- y("update-prop", b, f);
1535
- }, u = (b, f) => {
1536
- if (!f) return;
1537
- const p = `previewConfig.${b}`;
1538
- y("update-prop", p, f);
1563
+ const b = r, h = (k, y) => {
1564
+ b("update-prop", k, y);
1565
+ }, u = (k, y) => {
1566
+ if (!y) return;
1567
+ const m = `previewConfig.${k}`;
1568
+ b("update-prop", m, y);
1539
1569
  };
1540
- return (b, f) => {
1541
- const p = I("el-empty");
1542
- return r(), k("aside", uo, [
1570
+ return (k, y) => {
1571
+ const m = I("el-empty");
1572
+ return d(), _("aside", uo, [
1543
1573
  v("div", ro, [
1544
- f[0] || (f[0] = v("h3", null, "属性编辑", -1)),
1545
- e.componentName ? (r(), k("div", co, T(e.componentName), 1)) : M("", !0)
1574
+ y[0] || (y[0] = v("h3", null, "属性编辑", -1)),
1575
+ e.componentName ? (d(), _("div", co, T(e.componentName), 1)) : M("", !0)
1546
1576
  ]),
1547
- e.componentConfig ? (r(), k("div", po, [
1577
+ e.componentConfig ? (d(), _("div", po, [
1548
1578
  v("div", mo, [
1549
- (r(!0), k(Y, null, G(_.value, (s) => (r(), k("div", {
1579
+ (d(!0), _(Y, null, G(g.value, (s) => (d(), _("div", {
1550
1580
  key: s.key,
1551
1581
  class: ee(["tab-item", { active: l.value === s.key }]),
1552
1582
  onClick: (x) => $(s.key)
@@ -1556,39 +1586,39 @@ const nt = { class: "animation-form" }, st = {
1556
1586
  ], 10, vo))), 128))
1557
1587
  ]),
1558
1588
  v("div", fo, [
1559
- S.value && z.value.length > 0 ? (r(), k("div", yo, [
1560
- (r(!0), k(Y, null, G(z.value, (s) => (r(), k("div", {
1589
+ C.value && z.value.length > 0 ? (d(), _("div", yo, [
1590
+ (d(!0), _(Y, null, G(z.value, (s) => (d(), _("div", {
1561
1591
  key: s.key,
1562
1592
  class: ee(["sub-tab-item", { active: o.value === s.key }]),
1563
1593
  onClick: (x) => i(s.key)
1564
1594
  }, T(s.label), 11, bo))), 128))
1565
1595
  ])) : M("", !0),
1566
1596
  v("div", ko, [
1567
- l.value === B(D).PREVIEW && c.value.length ? (r(), E(Je, {
1597
+ l.value === B(D).PREVIEW && c.value.length ? (d(), R(Qe, {
1568
1598
  key: 0,
1569
1599
  "preview-config": c.value,
1570
1600
  onUpdateConfig: u
1571
- }, null, 8, ["preview-config"])) : l.value !== B(D).PREVIEW && m.value.length ? (r(), E(io, {
1601
+ }, null, 8, ["preview-config"])) : l.value !== B(D).PREVIEW && p.value.length ? (d(), R(io, {
1572
1602
  key: 1,
1573
- "config-list": m.value,
1603
+ "config-list": p.value,
1574
1604
  onUpdateValue: h
1575
1605
  }, {
1576
1606
  "select-material": U((s) => [
1577
- Q(b.$slots, "select-material", ae(ie(s)))
1607
+ Q(k.$slots, "select-material", ae(ie(s)))
1578
1608
  ]),
1579
1609
  "select-goods": U((s) => [
1580
- Q(b.$slots, "select-goods", ae(ie(s)))
1610
+ Q(k.$slots, "select-goods", ae(ie(s)))
1581
1611
  ]),
1582
1612
  _: 3
1583
- }, 8, ["config-list"])) : (r(), E(p, {
1613
+ }, 8, ["config-list"])) : (d(), R(m, {
1584
1614
  key: 2,
1585
1615
  description: "暂无配置",
1586
1616
  "image-size": 100
1587
1617
  }))
1588
1618
  ])
1589
1619
  ])
1590
- ])) : (r(), k("div", _o, [
1591
- w(p, {
1620
+ ])) : (d(), _("div", _o, [
1621
+ w(m, {
1592
1622
  description: "暂无配置1",
1593
1623
  "image-size": 100
1594
1624
  })
@@ -1597,54 +1627,54 @@ const nt = { class: "animation-form" }, st = {
1597
1627
  };
1598
1628
  }
1599
1629
  });
1600
- function ne(e, d = {}, t = "") {
1630
+ function ne(e, r = {}, t = "") {
1601
1631
  !e || !e.length || e.forEach((l) => {
1602
1632
  const o = t ? `${t}.${l.key}` : l.key;
1603
- l.parentKey = o, l.type === "group-panel" && l.children ? (d[l.key] || (d[l.key] = {}), ne(
1633
+ l.parentKey = o, l.type === "group-panel" && l.children ? (r[l.key] || (r[l.key] = {}), ne(
1604
1634
  l.children,
1605
- d[l.key],
1635
+ r[l.key],
1606
1636
  o
1607
- )) : l.value !== void 0 && (d[l.key] = l.value);
1637
+ )) : l.value !== void 0 && (r[l.key] = l.value);
1608
1638
  });
1609
1639
  }
1610
- const ue = (e, d, t) => {
1640
+ const ue = (e, r, t) => {
1611
1641
  const l = t || "";
1612
1642
  if (e.styleSchema) {
1613
1643
  const o = {};
1614
- ne(e.styleSchema, o, l + "styleSchema"), d.styleSchema = o;
1644
+ ne(e.styleSchema, o, l + "styleSchema"), r.styleSchema = o;
1615
1645
  }
1616
1646
  if (e.businessSchema) {
1617
1647
  const o = {};
1618
- ne(e.businessSchema, o, l + "businessSchema"), d.businessSchema = o;
1648
+ ne(e.businessSchema, o, l + "businessSchema"), r.businessSchema = o;
1619
1649
  }
1620
- }, me = (e) => {
1621
- const d = {};
1622
- if (ue(e, d), e.subComponents)
1650
+ }, ve = (e) => {
1651
+ const r = {};
1652
+ if (ue(e, r), e.subComponents)
1623
1653
  for (const t of e.subComponents) {
1624
1654
  const l = {}, o = t.id;
1625
- ue(t, l, `${o}.`), d[o] = l;
1655
+ ue(t, l, `${o}.`), r[o] = l;
1626
1656
  }
1627
1657
  if (e.previewConfig) {
1628
1658
  const t = {};
1629
1659
  e.previewConfig.forEach((l) => {
1630
1660
  t[l.key] = l;
1631
- }), d.previewConfig = t;
1661
+ }), r.previewConfig = t;
1632
1662
  }
1633
- return d;
1663
+ return r;
1634
1664
  };
1635
- async function wo(e, d, t) {
1665
+ async function wo(e, r, t) {
1636
1666
  try {
1637
- if (!d)
1667
+ if (!r)
1638
1668
  throw new Error("未正确传入组件的配置数据");
1639
1669
  if (t !== "npm") {
1640
1670
  if (t === "onLine")
1641
1671
  throw new Error("暂不支持线上路径格式");
1642
1672
  }
1643
- const l = me(d);
1673
+ const l = ve(r);
1644
1674
  return {
1645
1675
  component: e,
1646
1676
  props: l,
1647
- config: d
1677
+ config: r
1648
1678
  };
1649
1679
  } catch (l) {
1650
1680
  throw console.error("加载组件失败:", l), new Error(`加载组件失败:${l}`);
@@ -1652,19 +1682,19 @@ async function wo(e, d, t) {
1652
1682
  }
1653
1683
  const zo = {
1654
1684
  // 构建组件属性
1655
- buildProps: me,
1685
+ buildProps: ve,
1656
1686
  // 加载组件
1657
1687
  load: wo
1658
1688
  }, xo = {
1659
1689
  // 位置和尺寸
1660
- updatePosition: Qe,
1661
- updateSize: je,
1690
+ updatePosition: je,
1691
+ updateSize: et,
1662
1692
  // 层级管理
1663
- moveComponentUp: tt,
1664
- moveComponentDown: ot,
1693
+ moveComponentUp: ot,
1694
+ moveComponentDown: lt,
1665
1695
  // 属性更新
1666
- updateProp: et,
1667
- updateDefaultVal: lt,
1696
+ updateProp: tt,
1697
+ updateDefaultVal: me,
1668
1698
  // 字段查找和条件渲染
1669
1699
  findField: se,
1670
1700
  shouldShow: ce