@king-one/form-design 0.0.18 → 0.0.20

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 (54) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/es/src/components/form-desgin.mjs +8 -7
  3. package/dist/es/src/components/form-material.vue.mjs +53 -51
  4. package/dist/es/src/components/form-panel.vue.mjs +69 -70
  5. package/dist/es/src/components/panel/index.mjs +12 -9
  6. package/dist/es/src/components/panel/panel-item.vue.mjs +28 -28
  7. package/dist/es/src/components/panel/panel-wrapper.mjs +25 -15
  8. package/dist/es/src/components/panel/widget/array-card.vue2.mjs +39 -26
  9. package/dist/es/src/components/panel/widget/array-table.vue.mjs +4 -0
  10. package/dist/es/src/components/panel/widget/array-table.vue2.mjs +105 -0
  11. package/dist/es/src/components/panel/widget/date-range.vue2.mjs +10 -10
  12. package/dist/es/src/components/panel/widget/object.vue2.mjs +40 -29
  13. package/dist/es/src/components/props/form-config.vue.mjs +7 -8
  14. package/dist/es/src/config/index.mjs +90 -21
  15. package/dist/es/src/core/Design.mjs +15 -12
  16. package/dist/es/src/core/FormSchema.mjs +1 -1
  17. package/dist/es/src/internal.mjs +5 -4
  18. package/dist/es/src/plugins/index.mjs +23 -11
  19. package/dist/es/src/plugins/modules/drag-add.mjs +23 -0
  20. package/dist/lib/src/components/form-desgin.js +1 -1
  21. package/dist/lib/src/components/form-material.vue.js +1 -1
  22. package/dist/lib/src/components/form-panel.vue.js +2 -2
  23. package/dist/lib/src/components/panel/index.js +1 -1
  24. package/dist/lib/src/components/panel/panel-item.vue.js +1 -1
  25. package/dist/lib/src/components/panel/panel-wrapper.js +1 -1
  26. package/dist/lib/src/components/panel/widget/array-card.vue2.js +1 -1
  27. package/dist/lib/src/components/panel/widget/array-table.vue.js +1 -0
  28. package/dist/lib/src/components/panel/widget/array-table.vue2.js +1 -0
  29. package/dist/lib/src/components/panel/widget/date-range.vue2.js +1 -1
  30. package/dist/lib/src/components/panel/widget/object.vue2.js +1 -1
  31. package/dist/lib/src/components/props/form-config.vue.js +1 -1
  32. package/dist/lib/src/config/index.js +1 -1
  33. package/dist/lib/src/core/Design.js +1 -1
  34. package/dist/lib/src/core/FormSchema.js +1 -1
  35. package/dist/lib/src/internal.js +1 -1
  36. package/dist/lib/src/plugins/index.js +1 -1
  37. package/dist/lib/src/plugins/modules/drag-add.js +1 -0
  38. package/dist/theme-chalk/array-table.css +1 -0
  39. package/dist/theme-chalk/icon.css +1 -1
  40. package/dist/theme-chalk/index.css +1 -1
  41. package/dist/theme-chalk/panel-item.css +1 -1
  42. package/dist/theme-chalk/panel.css +1 -1
  43. package/dist/types/src/components/base/Carousel.vue.d.ts +1 -1
  44. package/dist/types/src/components/panel/panel-item.vue.d.ts +2 -0
  45. package/dist/types/src/components/panel/panel-wrapper.d.ts +11 -1
  46. package/dist/types/src/components/panel/widget/array-table.vue.d.ts +20 -0
  47. package/dist/types/src/core/Design.d.ts +3 -2
  48. package/dist/types/src/internal.d.ts +1 -0
  49. package/dist/types/src/plugins/index.d.ts +3 -2
  50. package/dist/types/src/plugins/modules/{drag-put.d.ts → drag-add.d.ts} +2 -1
  51. package/dist/types/src/types.d.ts +3 -3
  52. package/package.json +1 -1
  53. package/dist/es/src/plugins/modules/drag-put.mjs +0 -14
  54. package/dist/lib/src/plugins/modules/drag-put.js +0 -1
@@ -1,59 +1,59 @@
1
- import { defineComponent as V, computed as g, openBlock as n, createElementBlock as b, normalizeClass as p, withModifiers as j, unref as t, createBlock as a, resolveDynamicComponent as x, withCtx as z, createElementVNode as $, createCommentVNode as r, createVNode as A, defineAsyncComponent as M } from "vue";
2
- import { FormItem as O, Tooltip as S } from "ant-design-vue";
1
+ import { defineComponent as V, computed as g, openBlock as n, createElementBlock as b, normalizeClass as p, withModifiers as j, unref as t, createBlock as a, resolveDynamicComponent as w, withCtx as z, createElementVNode as $, createCommentVNode as r, createVNode as x, defineAsyncComponent as A } from "vue";
2
+ import { FormItem as M, Tooltip as O } from "ant-design-vue";
3
3
  import "../../internal.mjs";
4
- import { useInjectDesignContext as T } from "../../context/design.mjs";
4
+ import { useInjectDesignContext as S } from "../../context/design.mjs";
5
5
  import "../index.mjs";
6
6
  import { useNamespace as W } from "../../hooks/use-namespace/index.mjs";
7
7
  import m from "../form-icon.vue2.mjs";
8
- const _ = {
8
+ const q = {
9
9
  key: 2,
10
10
  class: "icons"
11
- }, R = /* @__PURE__ */ V({
11
+ }, U = /* @__PURE__ */ V({
12
12
  __name: "panel-item",
13
13
  props: {
14
14
  field: {},
15
- space: {}
15
+ space: {},
16
+ hideTitle: { type: Boolean }
16
17
  },
17
- setup(D) {
18
- const o = D, { b: I, e: u, m: v } = W("panel-item"), c = T(), { checkedField: d, shared: N } = c;
19
- function w(e, i = {}) {
18
+ setup(B) {
19
+ const o = B, { b: D, e: u, m: v } = W("panel-item"), c = S(), { checkedField: d, shared: I } = c;
20
+ function N(e, i = {}) {
20
21
  return Object.entries(e).forEach(([l, s]) => {
21
- typeof s == "function" ? i[l] = M(s) : i[l] = s;
22
+ typeof s == "function" ? i[l] = A(s) : i[l] = s;
22
23
  }), i;
23
24
  }
24
- const k = w(N.panelWidgets);
25
- function B(e) {
25
+ const k = N(I.panelWidgets);
26
+ function E(e) {
26
27
  c.setCheckedField(e);
27
28
  }
28
29
  const f = g(() => {
29
30
  var i, l;
30
31
  return ((l = (i = o.field["x-design-props"]) == null ? void 0 : i.validate) == null ? void 0 : l.status) === "error";
31
- }), E = g(() => {
32
+ }), F = g(() => {
32
33
  var i;
33
- const e = [I()];
34
+ const e = [D()];
34
35
  return ((i = d.value) == null ? void 0 : i.id) === o.field.id && e.push(v("active")), f.value && e.push(v("error")), e;
35
36
  });
36
- function F() {
37
+ function T() {
37
38
  if (!c.hooks.beforeDelete.call(o.field))
38
39
  return;
39
40
  const i = o.space.findIndex((l) => l.id === o.field.id);
40
41
  i !== -1 && o.space.splice(i, 1);
41
42
  }
42
43
  return (e, i) => {
43
- var l, s, y, C, h;
44
+ var l, s, C, h, y;
44
45
  return n(), b(
45
46
  "div",
46
47
  {
47
- class: p(E.value),
48
- onClick: i[0] || (i[0] = j((q) => B(e.field), ["stop"]))
48
+ class: p(F.value),
49
+ onClick: i[0] || (i[0] = j((G) => E(e.field), ["stop"]))
49
50
  },
50
51
  [
51
- t(k)[e.field.key] ? (n(), a(x(t(k)[e.field.key]), {
52
+ t(k)[e.field.key] ? (n(), a(w(t(k)[e.field.key]), {
52
53
  key: 0,
53
- style: { width: "100%" },
54
- readonly: "",
54
+ "hide-title": e.hideTitle,
55
55
  field: e.field
56
- }, null, 8, ["field"])) : (n(), a(t(O), {
56
+ }, null, 8, ["hide-title", "field"])) : (n(), a(t(M), {
57
57
  key: 1,
58
58
  class: p(t(u)("form")),
59
59
  label: e.field.title
@@ -72,22 +72,22 @@ const _ = {
72
72
  _: 1
73
73
  /* STABLE */
74
74
  }, 8, ["class", "label"])),
75
- ((l = t(d)) == null ? void 0 : l.id) === e.field.id || f.value ? (n(), b("div", _, [
75
+ ((l = t(d)) == null ? void 0 : l.id) === e.field.id || f.value ? (n(), b("div", q, [
76
76
  ((s = t(d)) == null ? void 0 : s.id) === e.field.id ? (n(), a(t(m), {
77
77
  key: 0,
78
78
  name: "copy",
79
79
  class: "panel-icon",
80
80
  size: 15
81
81
  })) : r("v-if", !0),
82
- ((y = t(d)) == null ? void 0 : y.id) === e.field.id ? (n(), a(t(m), {
82
+ ((C = t(d)) == null ? void 0 : C.id) === e.field.id ? (n(), a(t(m), {
83
83
  key: 1,
84
84
  name: "delete1",
85
85
  class: "panel-icon",
86
86
  size: 15,
87
- onClick: F
87
+ onClick: T
88
88
  })) : r("v-if", !0),
89
- A(t(S), {
90
- title: (h = (C = e.field["x-design-props"]) == null ? void 0 : C.validate) == null ? void 0 : h.message,
89
+ x(t(O), {
90
+ title: (y = (h = e.field["x-design-props"]) == null ? void 0 : h.validate) == null ? void 0 : y.message,
91
91
  color: "pink"
92
92
  }, {
93
93
  default: z(() => [
@@ -110,5 +110,5 @@ const _ = {
110
110
  }
111
111
  });
112
112
  export {
113
- R as default
113
+ U as default
114
114
  };
@@ -1,30 +1,40 @@
1
- import { defineComponent as n, createVNode as m, h as a } from "vue";
2
- import { FormItem as l } from "ant-design-vue";
1
+ import { defineComponent as a, createVNode as n, h as p } from "vue";
2
+ import { FormItem as i } from "ant-design-vue";
3
3
  import "../../internal.mjs";
4
- import { defaultNamespace as f } from "../../hooks/use-namespace/index.mjs";
5
- function s(o) {
6
- return /* @__PURE__ */ n({
4
+ import { defaultNamespace as m } from "../../hooks/use-namespace/index.mjs";
5
+ function s(t) {
6
+ return /* @__PURE__ */ a({
7
7
  name: "panelWarpper",
8
8
  props: {
9
9
  field: {
10
10
  type: Object
11
+ },
12
+ hideTitle: {
13
+ type: Boolean,
14
+ default: !1
11
15
  }
12
16
  },
13
17
  setup(e) {
14
- var r;
15
- const p = (r = e.field) == null ? void 0 : r["x-component-props"];
18
+ var l;
19
+ const r = (l = e.field) == null ? void 0 : l["x-component-props"];
16
20
  return () => {
17
- var t;
18
- return m(l, {
19
- class: [`${f}-panel-item__form`],
20
- label: (t = e.field) == null ? void 0 : t.title
21
+ var o;
22
+ return n("div", null, [e.hideTitle ? p(t, {
23
+ ...r,
24
+ readonly: !0
25
+ }) : n(i, {
26
+ class: [`${m}-panel-item__form`],
27
+ label: (o = e.field) == null ? void 0 : o.title
21
28
  }, {
22
- default: () => a(o, {
23
- ...p,
24
- readonly: !0
29
+ default: () => p(t, {
30
+ ...r,
31
+ readonly: !0,
32
+ style: {
33
+ width: "100%"
34
+ }
25
35
  }),
26
36
  _: 1
27
- }, 8, ["label"]);
37
+ }, 8, ["label"])]);
28
38
  };
29
39
  }
30
40
  });
@@ -1,52 +1,65 @@
1
- import { defineComponent as u, toRaw as g, openBlock as h, createElementBlock as y, createElementVNode as n, toDisplayString as k, createVNode as l, unref as r, normalizeClass as C, withCtx as v, renderSlot as b } from "vue";
2
- import w from "vuedraggable";
1
+ import { defineComponent as p, toRaw as h, openBlock as y, createElementBlock as k, createElementVNode as o, toDisplayString as x, createVNode as c, unref as a, normalizeClass as C, withCtx as v, renderSlot as w } from "vue";
2
+ import A from "vuedraggable";
3
3
  import "../../../internal.mjs";
4
+ import { message as D } from "ant-design-vue";
4
5
  import "../../../index.mjs";
5
- import { useInjectDesignContext as x } from "../../../context/design.mjs";
6
- import { useNamespace as S } from "../../../hooks/use-namespace/index.mjs";
7
- import D from "../panel-item.vue.mjs";
8
- const N = { class: "form-item" }, j = /* @__PURE__ */ u({
6
+ import { useInjectDesignContext as b } from "../../../context/design.mjs";
7
+ import { useNamespace as I } from "../../../hooks/use-namespace/index.mjs";
8
+ import S from "../panel-item.vue.mjs";
9
+ const N = { class: "form-item" }, F = /* @__PURE__ */ p({
9
10
  inheritAttrs: !1,
10
11
  __name: "array-card",
11
12
  props: {
12
13
  field: {}
13
14
  },
14
15
  setup(s) {
15
- const a = x(), { b: d } = S("panel-drag");
16
+ const i = b(), { b: f } = I("panel-drag");
16
17
  function m() {
17
18
  return !0;
18
19
  }
19
- function c(e, t) {
20
- const o = g(e), { oldIndex: f } = t, i = o[f];
21
- if (i) {
22
- const { shared: p } = a;
23
- p.draggedContext.key = i.key;
20
+ function g(e, t) {
21
+ const n = h(e), { oldIndex: l } = t, r = n[l];
22
+ if (r) {
23
+ const { shared: d } = i;
24
+ d.draggedContext.key = r.key, d.draggedContext.field = r;
24
25
  }
25
26
  }
26
- return console.log(s.field), (e, t) => (h(), y("div", null, [
27
- n(
27
+ function u() {
28
+ const { shared: e } = i, { field: t } = e.draggedContext, n = {
29
+ source: t,
30
+ traget: s.field.children,
31
+ region: "k-array-card"
32
+ };
33
+ if (i.hooks.syncDragAdd.call(n), !i.dragAddResult.every((r) => r)) {
34
+ const r = s.field.children.findIndex((d) => d.id === t.id);
35
+ r !== -1 && (s.field.children.splice(r, 1), D.warning("不能将该控件拖拽到列表容器中"));
36
+ }
37
+ }
38
+ return (e, t) => (y(), k("div", null, [
39
+ o(
28
40
  "div",
29
41
  null,
30
- k(e.field.title),
42
+ x(e.field.title),
31
43
  1
32
44
  /* TEXT */
33
45
  ),
34
- n("div", null, [
35
- l(r(w), {
46
+ o("div", null, [
47
+ c(a(A), {
36
48
  list: e.field.children,
37
- class: C(r(d)()),
49
+ class: C(a(f)()),
38
50
  group: { name: "form", put: m },
39
51
  animation: 300,
40
52
  sort: !0,
41
53
  "item-key": "id",
42
54
  "chosen-class": "choose",
43
- onStart: t[0] || (t[0] = (o) => c(e.field.children, o))
55
+ onStart: t[0] || (t[0] = (n) => g(e.field.children, n)),
56
+ onAdd: u
44
57
  }, {
45
- item: v(({ element: o }) => [
46
- n("div", N, [
47
- b(e.$slots, `panel-${o.key}`, {}, () => [
48
- l(r(D), {
49
- field: o,
58
+ item: v(({ element: n }) => [
59
+ o("div", N, [
60
+ w(e.$slots, `panel-${n.key}`, {}, () => [
61
+ c(a(S), {
62
+ field: n,
50
63
  space: e.field.children
51
64
  }, null, 8, ["field", "space"])
52
65
  ])
@@ -55,7 +68,7 @@ const N = { class: "form-item" }, j = /* @__PURE__ */ u({
55
68
  _: 3
56
69
  /* FORWARDED */
57
70
  }, 8, ["list", "class", "group"]),
58
- t[1] || (t[1] = n(
71
+ t[1] || (t[1] = o(
59
72
  "div",
60
73
  { style: { color: "#c0bebe", "text-align": "center", width: "90%", padding: "5px" } },
61
74
  " ☝ 拖拽控件到容器内部 ",
@@ -67,5 +80,5 @@ const N = { class: "form-item" }, j = /* @__PURE__ */ u({
67
80
  }
68
81
  });
69
82
  export {
70
- j as default
83
+ F as default
71
84
  };
@@ -0,0 +1,4 @@
1
+ import f from "./array-table.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,105 @@
1
+ import { defineComponent as f, openBlock as g, createElementBlock as p, normalizeClass as b, unref as l, createElementVNode as e, createVNode as o, withCtx as y, renderSlot as u, toDisplayString as v } from "vue";
2
+ import h from "vuedraggable";
3
+ import "../../../index.mjs";
4
+ import "../../../internal.mjs";
5
+ import { message as x } from "ant-design-vue";
6
+ import { useInjectDesignContext as _ } from "../../../context/design.mjs";
7
+ import { useNamespace as C } from "../../../hooks/use-namespace/index.mjs";
8
+ import k from "../panel-item.vue.mjs";
9
+ const A = { class: "array-table-box" }, D = { class: "array-table-drag" }, w = { class: "form-item" }, I = { class: "table-item" }, N = { class: "array-table-drag-header" }, $ = { class: "array-table-drag-content" }, T = /* @__PURE__ */ f({
10
+ name: "ArrayTable",
11
+ __name: "array-table",
12
+ props: {
13
+ field: {}
14
+ },
15
+ setup(s) {
16
+ const d = _(), { b: n } = C("array-table");
17
+ function c() {
18
+ const { shared: a } = d, { field: t } = a.draggedContext, r = {
19
+ source: t,
20
+ traget: s.field.children,
21
+ region: "k-array-card"
22
+ };
23
+ if (d.hooks.syncDragAdd.call(r), !d.dragAddResult.every((i) => i)) {
24
+ const i = s.field.children.findIndex((m) => m.id === t.id);
25
+ i !== -1 && (s.field.children.splice(i, 1), x.warning("不能将该控件拖拽到列表容器中"));
26
+ }
27
+ }
28
+ return (a, t) => (g(), p(
29
+ "div",
30
+ {
31
+ class: b(l(n)())
32
+ },
33
+ [
34
+ t[1] || (t[1] = e(
35
+ "div",
36
+ null,
37
+ "明细列表",
38
+ -1
39
+ /* CACHED */
40
+ )),
41
+ e("div", A, [
42
+ t[0] || (t[0] = e(
43
+ "div",
44
+ { class: "array-table-left" },
45
+ [
46
+ e("div", { class: "array-table-drag-header" }, " 表头 "),
47
+ e("div", { class: "array-table-drag-content" })
48
+ ],
49
+ -1
50
+ /* CACHED */
51
+ )),
52
+ e("div", D, [
53
+ o(l(h), {
54
+ class: "widget-drag",
55
+ list: a.field.children,
56
+ group: { name: "form", direction: "vertical", removeCloneOnHide: !1 },
57
+ animation: 300,
58
+ sort: !0,
59
+ "item-key": "id",
60
+ "drag-class": "table-item-drag-class",
61
+ onAdd: c
62
+ }, {
63
+ item: y(({ element: r }) => [
64
+ e("div", w, [
65
+ u(a.$slots, `panel-${r.key}`, {}, () => [
66
+ e("div", I, [
67
+ e(
68
+ "div",
69
+ N,
70
+ v(r.title),
71
+ 1
72
+ /* TEXT */
73
+ ),
74
+ e("div", $, [
75
+ o(l(k), {
76
+ field: r,
77
+ space: a.field.children,
78
+ "hide-title": ""
79
+ }, null, 8, ["field", "space"])
80
+ ])
81
+ ])
82
+ ])
83
+ ])
84
+ ]),
85
+ _: 3
86
+ /* FORWARDED */
87
+ }, 8, ["list"])
88
+ ])
89
+ ]),
90
+ t[2] || (t[2] = e(
91
+ "div",
92
+ { style: { color: "#c0bebe", "text-align": "center", width: "90%", padding: "5px" } },
93
+ " ☝ 拖拽控件到明细列表 ",
94
+ -1
95
+ /* CACHED */
96
+ ))
97
+ ],
98
+ 2
99
+ /* CLASS */
100
+ ));
101
+ }
102
+ });
103
+ export {
104
+ T as default
105
+ };
@@ -1,18 +1,18 @@
1
- import { defineComponent as o, openBlock as t, createBlock as a, unref as r, withCtx as n, createVNode as l, normalizeProps as p, guardReactiveProps as i } from "vue";
2
- import { FormItem as m, RangePicker as c } from "ant-design-vue";
3
- const _ = /* @__PURE__ */ o({
1
+ import { defineComponent as r, openBlock as t, createBlock as n, unref as o, withCtx as l, createVNode as p, mergeProps as a } from "vue";
2
+ import { FormItem as f, RangePicker as m } from "ant-design-vue";
3
+ const u = /* @__PURE__ */ r({
4
4
  __name: "date-range",
5
5
  props: {
6
6
  field: {}
7
7
  },
8
- setup(f) {
9
- return (e, d) => (t(), a(r(m), {
8
+ setup(i) {
9
+ return (e, c) => (t(), n(o(f), {
10
10
  label: e.field.title
11
11
  }, {
12
- default: n(() => [
13
- l(
14
- r(c),
15
- p(i(e.field["x-component-props"])),
12
+ default: l(() => [
13
+ p(
14
+ o(m),
15
+ a(e.field["x-component-props"], { open: !1 }),
16
16
  null,
17
17
  16
18
18
  /* FULL_PROPS */
@@ -24,5 +24,5 @@ const _ = /* @__PURE__ */ o({
24
24
  }
25
25
  });
26
26
  export {
27
- _ as default
27
+ u as default
28
28
  };
@@ -1,52 +1,63 @@
1
- import { defineComponent as f, toRaw as u, openBlock as g, createElementBlock as h, createElementVNode as n, toDisplayString as k, createVNode as s, unref as r, normalizeClass as y, withCtx as C, renderSlot as b } from "vue";
1
+ import { defineComponent as p, toRaw as u, openBlock as h, createElementBlock as k, createElementVNode as r, toDisplayString as x, createVNode as c, unref as l, normalizeClass as y, withCtx as C, renderSlot as b } from "vue";
2
2
  import v from "vuedraggable";
3
3
  import "../../../internal.mjs";
4
4
  import "../../../index.mjs";
5
+ import { message as A } from "ant-design-vue";
5
6
  import { useInjectDesignContext as w } from "../../../context/design.mjs";
6
- import { useNamespace as x } from "../../../hooks/use-namespace/index.mjs";
7
- import S from "../panel-item.vue.mjs";
8
- const _ = { class: "form-item" }, V = /* @__PURE__ */ f({
7
+ import { useNamespace as D } from "../../../hooks/use-namespace/index.mjs";
8
+ import I from "../panel-item.vue.mjs";
9
+ const S = { class: "form-item" }, q = /* @__PURE__ */ p({
9
10
  inheritAttrs: !1,
10
11
  __name: "object",
11
12
  props: {
12
13
  field: {}
13
14
  },
14
- setup(D) {
15
- const l = w(), { b: a } = x("panel-drag");
16
- function d() {
17
- return !0;
15
+ setup(s) {
16
+ const i = w(), { b: f } = D("panel-drag");
17
+ function m(e, t) {
18
+ const n = u(e), { oldIndex: a } = t, o = n[a];
19
+ if (o) {
20
+ const { shared: d } = i;
21
+ d.draggedContext.key = o.key, d.draggedContext.field = o;
22
+ }
18
23
  }
19
- function p(e, t) {
20
- const o = u(e), { oldIndex: m } = t, i = o[m];
21
- if (i) {
22
- const { shared: c } = l;
23
- c.draggedContext.key = i.key;
24
+ function g() {
25
+ console.log("dragAdd");
26
+ const { shared: e } = i, { field: t } = e.draggedContext, n = {
27
+ source: t,
28
+ traget: s.field.children,
29
+ region: "k-object"
30
+ };
31
+ if (i.hooks.syncDragAdd.call(n), !i.dragAddResult.every((o) => o)) {
32
+ const o = s.field.children.findIndex((d) => d.id === t.id);
33
+ o !== -1 && (s.field.children.splice(o, 1), A.warning("不能将该控件拖拽到对象容器中"));
24
34
  }
25
35
  }
26
- return (e, t) => (g(), h("div", null, [
27
- n(
36
+ return (e, t) => (h(), k("div", null, [
37
+ r(
28
38
  "div",
29
39
  null,
30
- k(e.field.title),
40
+ x(e.field.title),
31
41
  1
32
42
  /* TEXT */
33
43
  ),
34
- n("div", null, [
35
- s(r(v), {
44
+ r("div", null, [
45
+ c(l(v), {
36
46
  list: e.field.children,
37
- class: y(r(a)()),
38
- group: { name: "form", put: d },
47
+ class: y(l(f)()),
48
+ group: { name: "form" },
39
49
  animation: 300,
40
50
  sort: !0,
41
51
  "item-key": "id",
42
52
  "chosen-class": "choose",
43
- onStart: t[0] || (t[0] = (o) => p(e.field.children, o))
53
+ onStart: t[0] || (t[0] = (n) => m(e.field.children, n)),
54
+ onAdd: g
44
55
  }, {
45
- item: C(({ element: o }) => [
46
- n("div", _, [
47
- b(e.$slots, `panel-${o.key}`, {}, () => [
48
- s(r(S), {
49
- field: o,
56
+ item: C(({ element: n }) => [
57
+ r("div", S, [
58
+ b(e.$slots, `panel-${n.key}`, {}, () => [
59
+ c(l(I), {
60
+ field: n,
50
61
  space: e.field.children
51
62
  }, null, 8, ["field", "space"])
52
63
  ])
@@ -54,8 +65,8 @@ const _ = { class: "form-item" }, V = /* @__PURE__ */ f({
54
65
  ]),
55
66
  _: 3
56
67
  /* FORWARDED */
57
- }, 8, ["list", "class", "group"]),
58
- t[1] || (t[1] = n(
68
+ }, 8, ["list", "class"]),
69
+ t[1] || (t[1] = r(
59
70
  "div",
60
71
  { style: { color: "#c0bebe", "text-align": "center", width: "90%", padding: "5px" } },
61
72
  " ☝ 拖拽控件到布局容器内部 ",
@@ -67,5 +78,5 @@ const _ = { class: "form-item" }, V = /* @__PURE__ */ f({
67
78
  }
68
79
  });
69
80
  export {
70
- V as default
81
+ q as default
71
82
  };
@@ -1,19 +1,18 @@
1
- import { defineComponent as k, computed as y, openBlock as o, createElementBlock as a, normalizeClass as _, unref as e, createVNode as t, withCtx as n, Fragment as g, createBlock as s, resolveDynamicComponent as x, renderSlot as b } from "vue";
1
+ import { defineComponent as k, computed as y, openBlock as o, createElementBlock as m, normalizeClass as _, unref as e, createVNode as t, withCtx as n, Fragment as g, createBlock as s, resolveDynamicComponent as x, renderSlot as b } from "vue";
2
2
  import { Tabs as v, TabPane as p, Empty as c } from "ant-design-vue";
3
3
  import "../../internal.mjs";
4
4
  import { FormConfigProps as C } from "../types.mjs";
5
5
  import "./form-props.vue.mjs";
6
6
  import { expandProps as P } from "./widget/index.mjs";
7
- import "@king-one/form-design/dist/theme-chalk/form-config.css";
8
7
  import { useInjectDesignContext as h } from "../../context/design.mjs";
9
8
  import { useNamespace as F } from "../../hooks/use-namespace/index.mjs";
10
9
  import B from "./form-props.vue2.mjs";
11
- const V = /* @__PURE__ */ k({
10
+ const S = /* @__PURE__ */ k({
12
11
  __name: "form-config",
13
12
  props: C,
14
13
  setup(i) {
15
- const l = i, { checkedField: f } = h(), r = y(() => f.value.key || ""), { b: d } = F("form-config"), m = P(l.expandProps);
16
- return (u, z) => (o(), a(
14
+ const l = i, { checkedField: f } = h(), r = y(() => f.value.key || ""), { b: d } = F("form-config"), a = P(l.expandProps);
15
+ return (u, z) => (o(), m(
17
16
  "div",
18
17
  {
19
18
  class: _(e(d)())
@@ -30,11 +29,11 @@ const V = /* @__PURE__ */ k({
30
29
  tab: "组件配置"
31
30
  }, {
32
31
  default: n(() => [
33
- r.value ? (o(), a(
32
+ r.value ? (o(), m(
34
33
  g,
35
34
  { key: 0 },
36
35
  [
37
- e(m)[r.value] ? (o(), s(x(e(m)[r.value]), { key: 0 })) : (o(), s(e(c), {
36
+ e(a)[r.value] ? (o(), s(x(e(a)[r.value]), { key: 0 })) : (o(), s(e(c), {
38
37
  key: 1,
39
38
  style: { "margin-top": "50px" },
40
39
  description: "暂无配置"
@@ -74,5 +73,5 @@ const V = /* @__PURE__ */ k({
74
73
  }
75
74
  });
76
75
  export {
77
- V as default
76
+ S as default
78
77
  };