epic-designer-gold 0.0.27 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/{attributeView-VgLT3_0E.js → attributeView-53W6OYFq.js} +1 -1
  2. package/dist/{attributeView-DT3Pgu2H.cjs → attributeView-Br4R-qs2.cjs} +1 -1
  3. package/dist/core/components/builder/src/builder.vue.d.ts +2 -0
  4. package/dist/index-3RNTR6WH.cjs +10 -0
  5. package/dist/{index-C2Nctb3q.js → index-5vW2b_OC.js} +1 -1
  6. package/dist/{index-BWCIdFn_.js → index-B60Tmc0O.js} +1 -1
  7. package/dist/index-BUbBjk-A.js +4 -0
  8. package/dist/{index-BfoDWeC1.cjs → index-BXR6vTnH.cjs} +1 -1
  9. package/dist/{index-Rhk7Lv_h.cjs → index-BuMTLuUU.cjs} +1 -1
  10. package/dist/{index-D-mV-SAk.cjs → index-BzetW3fw.cjs} +1 -1
  11. package/dist/{index-B0S7YNtd.js → index-C0_2_WpB.js} +1 -1
  12. package/dist/{index-CJaP0qUg.js → index-CCe1TX6z.js} +1 -1
  13. package/dist/{index-Cn2i-Eyz.js → index-CXCTsEX3.js} +1 -1
  14. package/dist/{index-DKe3uW6g.cjs → index-CoWccwst.cjs} +1 -1
  15. package/dist/{index-CQ_Xpn1C.js → index-CpCohObI.js} +1 -1
  16. package/dist/{index-DkVKzqSQ.cjs → index-CrsnSHt0.cjs} +1 -1
  17. package/dist/index-Dk3I3tbP.cjs +1 -0
  18. package/dist/{index-DqWY4lfL.js → index-Do_cYUvQ.js} +68 -64
  19. package/dist/{index-8jV4lvPb.js → index-EQJa9EU2.js} +441 -432
  20. package/dist/{index-BcTELKKi.cjs → index-hIAPokYs.cjs} +1 -1
  21. package/dist/{index-B9zp9FUu.cjs → index-thxQ_B2C.cjs} +1 -1
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.js +1 -1
  24. package/dist/style.css +1 -1
  25. package/dist/{styleView-B66KWbOm.cjs → styleView-CElFrsoj.cjs} +1 -1
  26. package/dist/{styleView-Cjdr_xer.js → styleView-DOTi7atY.js} +1 -1
  27. package/package.json +1 -1
  28. package/dist/index-BAbG8xrg.cjs +0 -1
  29. package/dist/index-R7VF52gK.cjs +0 -10
  30. package/dist/index-fwa-_XEi.js +0 -4
@@ -1,8 +1,8 @@
1
- import { defineComponent as B, inject as j, resolveComponent as J, openBlock as v, createBlock as N, unref as o, isRef as E, withCtx as A, createElementVNode as p, normalizeClass as D, createVNode as c, createCommentVNode as $, createElementBlock as _, ref as z, reactive as w, onMounted as K, watch as L, provide as P, Fragment as R, renderList as T, toDisplayString as F, withDirectives as q, vShow as G, createTextVNode as H } from "vue";
1
+ import { defineComponent as B, inject as j, resolveComponent as J, openBlock as v, createBlock as I, unref as r, isRef as E, withCtx as D, createElementVNode as p, normalizeClass as A, createVNode as m, createCommentVNode as $, createElementBlock as g, ref as z, reactive as w, onMounted as K, watch as L, provide as P, Fragment as R, renderList as T, toDisplayString as F, withDirectives as q, vShow as G, createTextVNode as H } from "vue";
2
2
  import { d as Q } from "./vuedraggable.umd-D2S7Eo7p.js";
3
- import { p as g, E as W, a as X } from "./axios-ITY6Uw7A.js";
3
+ import { p as f, E as W, a as X } from "./axios-ITY6Uw7A.js";
4
4
  import { _ as S } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
5
- import { n as O } from "./index-8jV4lvPb.js";
5
+ import { n as N } from "./index-EQJa9EU2.js";
6
6
  import { ElMessage as Y } from "element-plus";
7
7
  import { _ as Z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  const ee = {
@@ -16,7 +16,7 @@ const ee = {
16
16
  },
17
17
  emits: ["update:modelValue"],
18
18
  setup(b, { emit: C }) {
19
- const k = b, x = g.getComponent("input"), m = j("tree", !1), s = O(k, "modelValue", C);
19
+ const k = b, x = f.getComponent("input"), c = j("tree", !1), s = N(k, "modelValue", C);
20
20
  function y(n) {
21
21
  const d = {
22
22
  label: "",
@@ -24,13 +24,13 @@ const ee = {
24
24
  };
25
25
  n.children ? n.children.push(d) : n.children = [d];
26
26
  }
27
- function i(n) {
28
- s.value = s.value.filter((d, f) => f !== n);
27
+ function o(n) {
28
+ s.value = s.value.filter((d, V) => V !== n);
29
29
  }
30
30
  return (n, d) => {
31
- const f = J("EOptionItem");
32
- return v(), N(o(Q), {
33
- modelValue: o(s),
31
+ const V = J("EOptionItem");
32
+ return v(), I(r(Q), {
33
+ modelValue: r(s),
34
34
  "onUpdate:modelValue": d[0] || (d[0] = (a) => E(s) ? s.value = a : null),
35
35
  "item-key": "id",
36
36
  "component-data": {
@@ -40,45 +40,45 @@ const ee = {
40
40
  handle: ".handle",
41
41
  animation: 200
42
42
  }, {
43
- item: A(({ element: a, index: V }) => [
43
+ item: D(({ element: a, index: _ }) => [
44
44
  p("div", null, [
45
45
  p("div", {
46
- class: D([o(m) ? "grid-cols-[16px_auto_auto_16px_16px]" : "grid-cols-[16px_auto_auto_16px]", "option-item text-16px grid text-$epic-text-secondary gap-2 items-center mb-2"])
46
+ class: A([r(c) ? "grid-cols-[16px_auto_auto_16px_16px]" : "grid-cols-[16px_auto_auto_16px]", "option-item text-16px grid text-$epic-text-secondary gap-2 items-center mb-2"])
47
47
  }, [
48
- c(o(S), {
48
+ m(r(S), {
49
49
  class: "mr-2 cursor-move handle",
50
50
  name: "icon--epic--drag"
51
51
  }),
52
- c(o(x), {
52
+ m(r(x), {
53
53
  modelValue: a.label,
54
- "onUpdate:modelValue": (r) => a.label = r,
54
+ "onUpdate:modelValue": (u) => a.label = u,
55
55
  value: a.label,
56
- "onUpdate:value": (r) => a.label = r,
56
+ "onUpdate:value": (u) => a.label = u,
57
57
  placeholder: "label"
58
58
  }, null, 8, ["modelValue", "onUpdate:modelValue", "value", "onUpdate:value"]),
59
- c(o(x), {
59
+ m(r(x), {
60
60
  modelValue: a.value,
61
- "onUpdate:modelValue": (r) => a.value = r,
61
+ "onUpdate:modelValue": (u) => a.value = u,
62
62
  value: a.value,
63
- "onUpdate:value": (r) => a.value = r,
63
+ "onUpdate:value": (u) => a.value = u,
64
64
  placeholder: "value"
65
65
  }, null, 8, ["modelValue", "onUpdate:modelValue", "value", "onUpdate:value"]),
66
- o(m) ? (v(), N(o(S), {
66
+ r(c) ? (v(), I(r(S), {
67
67
  key: 0,
68
68
  class: "cursor-pointer text-lg!",
69
69
  name: "icon--epic--add-rounded",
70
- onClick: (r) => y(a)
70
+ onClick: (u) => y(a)
71
71
  }, null, 8, ["onClick"])) : $("", !0),
72
- c(o(S), {
72
+ m(r(S), {
73
73
  class: "hover:text-red cursor-pointer",
74
74
  name: "icon--epic--delete-outline-rounded",
75
- onClick: (r) => i(V)
75
+ onClick: (u) => o(_)
76
76
  }, null, 8, ["onClick"])
77
77
  ], 2),
78
- a.children ? (v(), _("div", ee, [
79
- c(f, {
78
+ a.children ? (v(), g("div", ee, [
79
+ m(V, {
80
80
  modelValue: a.children,
81
- "onUpdate:modelValue": (r) => a.children = r
81
+ "onUpdate:modelValue": (u) => a.children = u
82
82
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
83
83
  ])) : $("", !0)
84
84
  ])
@@ -87,7 +87,7 @@ const ee = {
87
87
  }, 8, ["modelValue"]);
88
88
  };
89
89
  }
90
- }), te = { class: "" }, ae = { class: "epic-tabs-box" }, ne = ["title", "onClick"], oe = { key: 0 }, re = { class: "py-4 my-2 text-center text-gray-400 bg-white" }, ie = { key: 1 }, ue = /* @__PURE__ */ B({
90
+ }), te = { class: "" }, ae = { class: "epic-tabs-box" }, ne = ["title", "onClick"], oe = { key: 0 }, re = { class: "py-4 my-2 text-center text-gray-400 bg-white" }, ue = { key: 1 }, ie = /* @__PURE__ */ B({
91
91
  __name: "index",
92
92
  props: {
93
93
  tree: { type: Boolean },
@@ -97,31 +97,31 @@ const ee = {
97
97
  },
98
98
  emits: ["update:modelValue", "update:EOptionsEditor"],
99
99
  setup(b, { emit: C }) {
100
- const k = g.getComponent("button"), x = g.getComponent("select"), m = z([]), h = w({
100
+ const k = f.getComponent("button"), x = f.getComponent("select"), c = z([]), h = w({
101
101
  title: "静态"
102
102
  }), s = b, y = C;
103
103
  W.on("updateSource", (l) => {
104
- m.value = g.sourceData.map((e) => ({
104
+ c.value = f.sourceData.map((e) => ({
105
105
  ...e,
106
106
  label: e.apiName,
107
107
  value: e.id
108
- })), V(n.value);
108
+ })), _(n.value);
109
109
  }), K(() => {
110
- m.value = g.sourceData.map((l) => ({
110
+ c.value = f.sourceData.map((l) => ({
111
111
  ...l,
112
112
  label: l.apiName,
113
113
  value: l.id
114
- })), V(n.value);
114
+ })), _(n.value);
115
115
  });
116
- const i = O(s, "modelValue", y), n = O(s, "dynamicId", y);
117
- function d(l, e, u) {
116
+ const o = N(s, "modelValue", y), n = N(s, "dynamicId", y);
117
+ function d(l, e, i) {
118
118
  return l && Object.prototype.toString.call(l) === "[object Array]" ? l.map((t) => t.children && t.children.length ? {
119
119
  label: t[e],
120
- value: t[u] + "",
121
- children: d(t.children, e, u)
120
+ value: t[i] + "",
121
+ children: d(t.children, e, i)
122
122
  } : {
123
123
  label: t[e],
124
- value: t[u] + ""
124
+ value: t[i] + ""
125
125
  }) : (Y.info("请检查数据位置是否配置准确"), []);
126
126
  }
127
127
  L(
@@ -133,7 +133,7 @@ const ee = {
133
133
  immediate: !0
134
134
  }
135
135
  );
136
- const f = [
136
+ const V = [
137
137
  {
138
138
  title: "静态"
139
139
  },
@@ -142,12 +142,16 @@ const ee = {
142
142
  }
143
143
  ];
144
144
  async function a(l) {
145
- h.title = l.title, l.title === "静态" && (n.value = "");
145
+ h.title = l.title, l.title === "静态" ? (o.value = [], n.value = "") : (o.value = [], c.value = f.sourceData.map((e) => ({
146
+ ...e,
147
+ label: e.apiName,
148
+ value: e.id
149
+ })));
146
150
  }
147
- async function V(l) {
148
- const e = m.value.find((u) => u.id === l);
151
+ async function _(l) {
152
+ const e = c.value.find((i) => i.id === l);
149
153
  if (e && e.url) {
150
- let u = await X({
154
+ let i = await X({
151
155
  method: (e == null ? void 0 : e.method) || "get",
152
156
  url: e.url,
153
157
  // url: "http://localhost:3333/users",
@@ -156,62 +160,62 @@ const ee = {
156
160
  headers: e != null && e.header ? JSON.parse(e == null ? void 0 : e.header) : {}
157
161
  });
158
162
  if (e && (e != null && e.dataPath)) {
159
- const U = e.dataPath.split(".").reduce((I, M) => I[M], u.data);
160
- i.value = d(U, e.dataKey, e.dataValue);
163
+ const U = e.dataPath.split(".").reduce((O, M) => O[M], i.data);
164
+ o.value = d(U, e.dataKey, e.dataValue);
161
165
  } else
162
- i.value = d(u.data, e.dataKey, e.dataValue);
166
+ o.value = d(i.data, e.dataKey, e.dataValue);
163
167
  }
164
168
  }
165
169
  s.modelValue, P("tree", s.tree);
166
- function r() {
170
+ function u() {
167
171
  const l = w({
168
172
  label: "",
169
173
  value: ""
170
174
  });
171
- i.value.length ? i.value = [...i.value, l] : i.value = [l];
175
+ o.value.length ? o.value = [...o.value, l] : o.value = [l];
172
176
  }
173
177
  return (l, e) => {
174
- var u;
175
- return v(), _("div", te, [
178
+ var i;
179
+ return v(), g("div", te, [
176
180
  p("div", null, [
177
181
  p("div", ae, [
178
- (v(), _(R, null, T(f, (t, U) => p("div", {
179
- class: D(["epic-tab cursor-pointer truncate", { checked: h.title === t.title }]),
182
+ (v(), g(R, null, T(V, (t, U) => p("div", {
183
+ class: A(["epic-tab cursor-pointer truncate", { checked: h.title === t.title }]),
180
184
  key: U,
181
185
  title: t.title,
182
- onClick: (I) => a(t)
186
+ onClick: (O) => a(t)
183
187
  }, F(t.title), 11, ne)), 64))
184
188
  ]),
185
- h.title === "静态" ? (v(), _("div", oe, [
189
+ h.title === "静态" ? (v(), g("div", oe, [
186
190
  q(p("div", re, "暂无选项", 512), [
187
- [G, !((u = o(i)) != null && u.length)]
191
+ [G, !((i = r(o)) != null && i.length)]
188
192
  ]),
189
- c(le, {
190
- modelValue: o(i),
191
- "onUpdate:modelValue": e[0] || (e[0] = (t) => E(i) ? i.value = t : null)
193
+ m(le, {
194
+ modelValue: r(o),
195
+ "onUpdate:modelValue": e[0] || (e[0] = (t) => E(o) ? o.value = t : null)
192
196
  }, null, 8, ["modelValue"]),
193
- c(o(k), { onClick: r }, {
194
- default: A(() => e[2] || (e[2] = [
197
+ m(r(k), { onClick: u }, {
198
+ default: D(() => e[2] || (e[2] = [
195
199
  H("添加选项")
196
200
  ])),
197
201
  _: 1
198
202
  })
199
- ])) : (v(), _("div", ie, [
203
+ ])) : (v(), g("div", ue, [
200
204
  e[3] || (e[3] = p("span", { style: { "font-size": "12px", "margin-bottom": "8px", display: "inline-block" } }, "数据源", -1)),
201
- c(o(x), {
202
- modelValue: o(n),
205
+ m(r(x), {
206
+ modelValue: r(n),
203
207
  "onUpdate:modelValue": e[1] || (e[1] = (t) => E(n) ? n.value = t : null),
204
208
  placeholder: "请选择数据源",
205
209
  clearable: "",
206
- options: m.value,
207
- onChange: V
210
+ options: c.value,
211
+ onChange: _
208
212
  }, null, 8, ["modelValue", "options"])
209
213
  ]))
210
214
  ])
211
215
  ]);
212
216
  };
213
217
  }
214
- }), fe = /* @__PURE__ */ Z(ue, [["__scopeId", "data-v-5fa7ffef"]]);
218
+ }), fe = /* @__PURE__ */ Z(ie, [["__scopeId", "data-v-706ed161"]]);
215
219
  export {
216
220
  fe as default
217
221
  };