@king-one/form-design 0.0.17 → 0.0.19

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 (116) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/es/index.mjs +16 -13
  3. package/dist/es/src/components/base/Carousel.vue.mjs +92 -0
  4. package/dist/es/src/components/base/Carousel.vue2.mjs +4 -0
  5. package/dist/es/src/components/base/json-preview.vue.mjs +215 -151
  6. package/dist/es/src/components/form-material.vue.mjs +168 -94
  7. package/dist/es/src/components/form-panel.vue.mjs +65 -60
  8. package/dist/es/src/components/panel/index.mjs +26 -13
  9. package/dist/es/src/components/panel/panel-item.vue.mjs +39 -39
  10. package/dist/es/src/components/panel/panel-wrapper.mjs +25 -15
  11. package/dist/es/src/components/panel/widget/array-card.vue2.mjs +39 -26
  12. package/dist/es/src/components/panel/widget/array-table.vue.mjs +4 -0
  13. package/dist/es/src/components/panel/widget/array-table.vue2.mjs +105 -0
  14. package/dist/es/src/components/panel/widget/date-range.vue.mjs +4 -0
  15. package/dist/es/src/components/panel/widget/date-range.vue2.mjs +28 -0
  16. package/dist/es/src/components/panel/widget/date-single.vue.mjs +4 -0
  17. package/dist/es/src/components/panel/widget/date-single.vue2.mjs +28 -0
  18. package/dist/es/src/components/panel/widget/kit.vue.mjs +4 -0
  19. package/dist/es/src/components/panel/widget/kit.vue2.mjs +48 -0
  20. package/dist/es/src/components/panel/widget/object.vue2.mjs +41 -30
  21. package/dist/es/src/components/panel/widget/select.vue2.mjs +3 -3
  22. package/dist/es/src/components/props/form-config.vue.mjs +1 -1
  23. package/dist/es/src/components/props/widget/BaseProps.vue2.mjs +31 -46
  24. package/dist/es/src/components/props/widget/InputNumberProps.vue2.mjs +94 -109
  25. package/dist/es/src/components/props/widget/InputProps.vue2.mjs +49 -64
  26. package/dist/es/src/components/props/widget/OvertimeProps.vue.mjs +4 -0
  27. package/dist/es/src/components/props/widget/OvertimeProps.vue2.mjs +17 -0
  28. package/dist/es/src/components/props/widget/PropsDecorator.mjs +34 -0
  29. package/dist/es/src/components/props/widget/SelectProps.vue.mjs +4 -0
  30. package/dist/es/src/components/props/widget/SelectProps.vue2.mjs +88 -0
  31. package/dist/es/src/components/props/widget/TextareaProps.vue2.mjs +48 -63
  32. package/dist/es/src/components/props/widget/index.mjs +44 -36
  33. package/dist/es/src/config/index.mjs +235 -16
  34. package/dist/es/src/core/Design.mjs +24 -16
  35. package/dist/es/src/core/Field.mjs +1 -1
  36. package/dist/es/src/core/FormSchema.mjs +29 -27
  37. package/dist/es/src/index.mjs +15 -13
  38. package/dist/es/src/internal.mjs +5 -4
  39. package/dist/es/src/plugins/index.mjs +23 -8
  40. package/dist/es/src/plugins/modules/drag-add.mjs +23 -0
  41. package/dist/es/src/utils/debounce.mjs +16 -0
  42. package/dist/es/src/utils/index.mjs +15 -13
  43. package/dist/lib/index.js +1 -1
  44. package/dist/lib/src/components/base/Carousel.vue.js +1 -0
  45. package/dist/lib/src/components/base/Carousel.vue2.js +1 -0
  46. package/dist/lib/src/components/base/json-preview.vue.js +6 -6
  47. package/dist/lib/src/components/form-material.vue.js +10 -1
  48. package/dist/lib/src/components/form-panel.vue.js +2 -2
  49. package/dist/lib/src/components/panel/index.js +1 -1
  50. package/dist/lib/src/components/panel/panel-item.vue.js +1 -1
  51. package/dist/lib/src/components/panel/panel-wrapper.js +1 -1
  52. package/dist/lib/src/components/panel/widget/array-card.vue2.js +1 -1
  53. package/dist/lib/src/components/panel/widget/array-table.vue.js +1 -0
  54. package/dist/lib/src/components/panel/widget/array-table.vue2.js +1 -0
  55. package/dist/lib/src/components/panel/widget/date-range.vue.js +1 -0
  56. package/dist/lib/src/components/panel/widget/date-range.vue2.js +1 -0
  57. package/dist/lib/src/components/panel/widget/date-single.vue.js +1 -0
  58. package/dist/lib/src/components/panel/widget/date-single.vue2.js +1 -0
  59. package/dist/lib/src/components/panel/widget/kit.vue.js +1 -0
  60. package/dist/lib/src/components/panel/widget/kit.vue2.js +1 -0
  61. package/dist/lib/src/components/panel/widget/object.vue2.js +1 -1
  62. package/dist/lib/src/components/panel/widget/select.vue2.js +1 -1
  63. package/dist/lib/src/components/props/form-config.vue.js +1 -1
  64. package/dist/lib/src/components/props/widget/BaseProps.vue2.js +1 -1
  65. package/dist/lib/src/components/props/widget/InputNumberProps.vue2.js +1 -1
  66. package/dist/lib/src/components/props/widget/InputProps.vue2.js +1 -1
  67. package/dist/lib/src/components/props/widget/OvertimeProps.vue.js +1 -0
  68. package/dist/lib/src/components/props/widget/OvertimeProps.vue2.js +1 -0
  69. package/dist/lib/src/components/props/widget/PropsDecorator.js +1 -0
  70. package/dist/lib/src/components/props/widget/SelectProps.vue.js +1 -0
  71. package/dist/lib/src/components/props/widget/SelectProps.vue2.js +1 -0
  72. package/dist/lib/src/components/props/widget/TextareaProps.vue2.js +1 -1
  73. package/dist/lib/src/components/props/widget/index.js +1 -1
  74. package/dist/lib/src/config/index.js +1 -1
  75. package/dist/lib/src/core/Design.js +1 -1
  76. package/dist/lib/src/core/Field.js +1 -1
  77. package/dist/lib/src/core/FormSchema.js +1 -1
  78. package/dist/lib/src/index.js +1 -1
  79. package/dist/lib/src/internal.js +1 -1
  80. package/dist/lib/src/plugins/index.js +1 -1
  81. package/dist/lib/src/plugins/modules/drag-add.js +1 -0
  82. package/dist/lib/src/utils/debounce.js +1 -0
  83. package/dist/lib/src/utils/index.js +1 -1
  84. package/dist/theme-chalk/array-table.css +1 -0
  85. package/dist/theme-chalk/carousel.css +1 -0
  86. package/dist/theme-chalk/icon.css +1 -1
  87. package/dist/theme-chalk/index.css +1 -1
  88. package/dist/theme-chalk/json-preview.css +1 -1
  89. package/dist/theme-chalk/kit-panel.css +1 -0
  90. package/dist/theme-chalk/material.css +1 -1
  91. package/dist/theme-chalk/panel-item.css +1 -1
  92. package/dist/theme-chalk/panel.css +1 -1
  93. package/dist/types/src/components/base/Carousel.vue.d.ts +65 -0
  94. package/dist/types/src/components/panel/panel-item.vue.d.ts +2 -0
  95. package/dist/types/src/components/panel/panel-wrapper.d.ts +11 -1
  96. package/dist/types/src/components/panel/widget/array-table.vue.d.ts +20 -0
  97. package/dist/types/src/components/panel/widget/date-range.vue.d.ts +8 -0
  98. package/dist/types/src/components/panel/widget/date-single.vue.d.ts +8 -0
  99. package/dist/types/src/components/panel/widget/kit.vue.d.ts +8 -0
  100. package/dist/types/src/components/props/widget/OvertimeProps.vue.d.ts +3 -0
  101. package/dist/types/src/components/props/widget/PropsDecorator.d.ts +3 -0
  102. package/dist/types/src/components/props/widget/SelectProps.vue.d.ts +3 -0
  103. package/dist/types/src/components/props/widget/index.d.ts +1 -9
  104. package/dist/types/src/components/types.d.ts +4 -3
  105. package/dist/types/src/config/index.d.ts +2 -1
  106. package/dist/types/src/core/Design.d.ts +95 -42
  107. package/dist/types/src/core/FormSchema.d.ts +22 -10
  108. package/dist/types/src/hooks/usePolling.d.ts +5 -0
  109. package/dist/types/src/index.d.ts +1 -0
  110. package/dist/types/src/internal.d.ts +1 -0
  111. package/dist/types/src/plugins/index.d.ts +5 -2
  112. package/dist/types/src/plugins/modules/drag-add.d.ts +6 -0
  113. package/dist/types/src/types.d.ts +29 -6
  114. package/dist/types/src/utils/debounce.d.ts +10 -0
  115. package/dist/types/src/utils/index.d.ts +1 -0
  116. package/package.json +2 -2
@@ -1,69 +1,54 @@
1
- import { defineComponent as p, computed as m, openBlock as s, createBlock as v, unref as l, withCtx as u, createElementVNode as i, createVNode as t } from "vue";
2
- import { CollapsePanel as c, Form as f, FormItem as n, Input as k, Switch as r, InputNumber as h } from "ant-design-vue";
1
+ import { defineComponent as p, computed as m, openBlock as c, createBlock as v, unref as e, withCtx as u, createVNode as a } from "vue";
2
+ import { Form as i, FormItem as n, Input as s, Switch as r, InputNumber as f } from "ant-design-vue";
3
3
  import "../../../internal.mjs";
4
- import { useInjectDesignContext as x } from "../../../context/design.mjs";
5
- const g = /* @__PURE__ */ p({
4
+ import { useInjectDesignContext as h } from "../../../context/design.mjs";
5
+ const I = /* @__PURE__ */ p({
6
6
  __name: "TextareaProps",
7
- setup(C) {
8
- const { checkedField: d } = x(), a = m(() => d.value["k-component-props"] || {});
9
- return (w, e) => (s(), v(l(c), { key: "textarea-props" }, {
10
- header: u(() => e[4] || (e[4] = [
11
- i(
12
- "div",
13
- null,
14
- "属性设置",
15
- -1
16
- /* CACHED */
17
- )
18
- ])),
7
+ setup(k) {
8
+ const { checkedField: d } = h(), l = m(() => d.value["x-component-props"] || {});
9
+ return (x, t) => (c(), v(e(i), { layout: "vertical" }, {
19
10
  default: u(() => [
20
- t(l(f), { layout: "vertical" }, {
11
+ a(e(n), { label: "占位提示" }, {
21
12
  default: u(() => [
22
- t(l(n), { label: "占位提示" }, {
23
- default: u(() => [
24
- t(l(k), {
25
- value: a.value.placeholder,
26
- "onUpdate:value": e[0] || (e[0] = (o) => a.value.placeholder = o),
27
- placeholder: "请输入占位提示"
28
- }, null, 8, ["value"])
29
- ]),
30
- _: 1
31
- /* STABLE */
32
- }),
33
- t(l(n), { label: "允许清除内容(显示清除图标)" }, {
34
- default: u(() => [
35
- t(l(r), {
36
- checked: a.value.allowClear,
37
- "onUpdate:checked": e[1] || (e[1] = (o) => a.value.allowClear = o)
38
- }, null, 8, ["checked"])
39
- ]),
40
- _: 1
41
- /* STABLE */
42
- }),
43
- t(l(n), { label: "是否展示字数" }, {
44
- default: u(() => [
45
- t(l(r), {
46
- checked: a.value.showCount,
47
- "onUpdate:checked": e[2] || (e[2] = (o) => a.value.showCount = o)
48
- }, null, 8, ["checked"])
49
- ]),
50
- _: 1
51
- /* STABLE */
52
- }),
53
- t(l(n), { label: "最大长度" }, {
54
- default: u(() => [
55
- t(l(h), {
56
- value: a.value.maxlength,
57
- "onUpdate:value": e[3] || (e[3] = (o) => a.value.maxlength = o),
58
- style: { width: "100%" },
59
- min: 1,
60
- precision: 0,
61
- max: 999
62
- }, null, 8, ["value"])
63
- ]),
64
- _: 1
65
- /* STABLE */
66
- })
13
+ a(e(s), {
14
+ value: l.value.placeholder,
15
+ "onUpdate:value": t[0] || (t[0] = (o) => l.value.placeholder = o),
16
+ placeholder: "请输入占位提示"
17
+ }, null, 8, ["value"])
18
+ ]),
19
+ _: 1
20
+ /* STABLE */
21
+ }),
22
+ a(e(n), { label: "允许清除内容(显示清除图标)" }, {
23
+ default: u(() => [
24
+ a(e(r), {
25
+ checked: l.value.allowClear,
26
+ "onUpdate:checked": t[1] || (t[1] = (o) => l.value.allowClear = o)
27
+ }, null, 8, ["checked"])
28
+ ]),
29
+ _: 1
30
+ /* STABLE */
31
+ }),
32
+ a(e(n), { label: "是否展示字数" }, {
33
+ default: u(() => [
34
+ a(e(r), {
35
+ checked: l.value.showCount,
36
+ "onUpdate:checked": t[2] || (t[2] = (o) => l.value.showCount = o)
37
+ }, null, 8, ["checked"])
38
+ ]),
39
+ _: 1
40
+ /* STABLE */
41
+ }),
42
+ a(e(n), { label: "最大长度" }, {
43
+ default: u(() => [
44
+ a(e(f), {
45
+ value: l.value.maxlength,
46
+ "onUpdate:value": t[3] || (t[3] = (o) => l.value.maxlength = o),
47
+ style: { width: "100%" },
48
+ min: 1,
49
+ precision: 0,
50
+ max: 999
51
+ }, null, 8, ["value"])
67
52
  ]),
68
53
  _: 1
69
54
  /* STABLE */
@@ -75,5 +60,5 @@ const g = /* @__PURE__ */ p({
75
60
  }
76
61
  });
77
62
  export {
78
- g as default
63
+ I as default
79
64
  };
@@ -1,54 +1,62 @@
1
- import { defineComponent as u, h as i } from "vue";
2
- import { Collapse as d } from "ant-design-vue";
3
1
  import "./InputProps.vue.mjs";
4
2
  import "./TextareaProps.vue.mjs";
5
3
  import "./InputNumberProps.vue.mjs";
6
4
  import "./BaseProps.vue.mjs";
5
+ import "./SelectProps.vue.mjs";
6
+ import "./OvertimeProps.vue.mjs";
7
+ import { propsWidgetDecorator as a } from "./PropsDecorator.mjs";
8
+ import o from "./BaseProps.vue2.mjs";
7
9
  import s from "./InputProps.vue2.mjs";
8
- import c from "./TextareaProps.vue2.mjs";
9
- import a from "./InputNumberProps.vue2.mjs";
10
- import e from "./BaseProps.vue2.mjs";
11
- const j = {
12
- "k-input": s,
13
- "k-textarea": c,
14
- "k-input-number": a
15
- }, _ = {
10
+ import d from "./TextareaProps.vue2.mjs";
11
+ import f from "./InputNumberProps.vue2.mjs";
12
+ import h from "./SelectProps.vue2.mjs";
13
+ import g from "./OvertimeProps.vue2.mjs";
14
+ const _ = {
16
15
  "k-input": {
17
- component: [e, s]
16
+ component: [
17
+ { header: "基础设置", widget: o },
18
+ { header: "组件属性", widget: s }
19
+ ]
18
20
  },
19
21
  "k-textarea": {
20
- component: [e, c]
22
+ component: [
23
+ { header: "基础设置", widget: o },
24
+ { header: "组件属性", widget: d }
25
+ ]
21
26
  },
22
27
  "k-input-number": {
23
- component: [e, a]
28
+ component: [
29
+ { header: "基础设置", widget: o },
30
+ { header: "组件属性", widget: f }
31
+ ]
32
+ },
33
+ "k-select": {
34
+ component: [
35
+ { header: "基础设置", widget: o },
36
+ { header: "组件属性", widget: h }
37
+ ]
38
+ },
39
+ "k-overtime": {
40
+ component: [
41
+ { header: "组件属性", widget: g }
42
+ ]
24
43
  }
25
44
  };
26
- function D(n = []) {
27
- const o = {};
28
- for (const [t, f] of Object.entries(_)) {
29
- const p = [...f.component];
30
- for (const m of n) {
31
- const { keys: r } = m;
32
- (Array.isArray(r) ? r.includes(t) : r.test(t)) && p.push(m.component);
45
+ function T(c = []) {
46
+ const i = {};
47
+ for (const [e, p] of Object.entries(_)) {
48
+ const n = [...p.component];
49
+ for (const m of c) {
50
+ const { keys: r, exclude: t } = m;
51
+ if (t && (Array.isArray(t) ? t.includes(e) : t.test(e)))
52
+ continue;
53
+ (Array.isArray(r) ? r.includes(e) : r.test(e)) && n.push(m.component);
33
54
  }
34
- o[t] = k(t, p);
55
+ i[e] = a(e, n);
35
56
  }
36
- return o;
37
- }
38
- function k(n, o) {
39
- return u({
40
- name: `${n}-props`,
41
- inheritAttrs: !1,
42
- setup() {
43
- return () => i(d, null, {
44
- default: () => o.map((t) => i(t))
45
- });
46
- }
47
- });
57
+ return i;
48
58
  }
49
59
  export {
50
- j as components,
51
- D as expandProps,
52
- k as propsWidgetDecorator,
60
+ T as expandProps,
53
61
  _ as widgetProps
54
62
  };
@@ -7,7 +7,7 @@ const e = {
7
7
  icon: "k-form-grid",
8
8
  key: "form-layout",
9
9
  type: "void",
10
- "k-component": "FormLayout"
10
+ "x-component": "FormLayout"
11
11
  }
12
12
  ]
13
13
  }, t = {
@@ -19,8 +19,8 @@ const e = {
19
19
  key: "k-input",
20
20
  type: "string",
21
21
  icon: "form-input",
22
- "k-component": "Input",
23
- "k-component-props": {
22
+ "x-component": "Input",
23
+ "x-component-props": {
24
24
  placeholder: "请输入"
25
25
  }
26
26
  },
@@ -29,8 +29,8 @@ const e = {
29
29
  key: "k-textarea",
30
30
  type: "string",
31
31
  icon: "form-textarea",
32
- "k-component": "Textarea",
33
- "k-component-props": {
32
+ "x-component": "Textarea",
33
+ "x-component-props": {
34
34
  placeholder: "请输入"
35
35
  }
36
36
  },
@@ -39,17 +39,20 @@ const e = {
39
39
  key: "k-input-number",
40
40
  type: "number",
41
41
  icon: "form-number",
42
- "k-component": "InputNumber",
43
- "k-component-props": {
42
+ "x-component": "InputNumber",
43
+ "x-component-props": {
44
44
  placeholder: "请输入"
45
45
  }
46
46
  },
47
47
  {
48
48
  title: "下拉选择框",
49
49
  key: "k-select",
50
- type: "string",
50
+ type: "array",
51
+ items: {
52
+ type: "string"
53
+ },
51
54
  icon: "form-select",
52
- "k-component": "Select",
55
+ "x-component": "Select",
53
56
  enum: [
54
57
  {
55
58
  label: "选项1",
@@ -60,9 +63,70 @@ const e = {
60
63
  value: "2"
61
64
  }
62
65
  ],
63
- "k-component-props": {
64
- placeholder: "请选择"
66
+ "x-component-props": {
67
+ placeholder: "请选择",
68
+ allowClear: !0,
69
+ mode: "multiple"
70
+ },
71
+ "x-decorator": "FormItem"
72
+ },
73
+ {
74
+ title: "日期范围",
75
+ key: "k-date-range",
76
+ type: "array",
77
+ format: "date",
78
+ items: {
79
+ type: "string",
80
+ format: "date"
81
+ },
82
+ icon: "form-date",
83
+ "x-component": "DateRange",
84
+ "x-component-props": {
85
+ valueFormat: "YYYY-MM-DD",
86
+ placeholder: [
87
+ "开始日期",
88
+ "结束日期"
89
+ ]
90
+ }
91
+ },
92
+ {
93
+ title: "单个日期",
94
+ key: "k-date-single",
95
+ type: "string",
96
+ format: "date",
97
+ icon: "form-date",
98
+ "x-component": "InputNumber",
99
+ "x-component-props": {
100
+ placeholder: "请输入",
101
+ formatData: "YYYY-MM-DD"
65
102
  }
103
+ },
104
+ {
105
+ title: "地区选择",
106
+ key: "k-form-area",
107
+ type: "object",
108
+ icon: "form-area",
109
+ "x-component": "FormArea",
110
+ children: [
111
+ {
112
+ title: "省份",
113
+ key: "k-form-area-province",
114
+ type: "string",
115
+ name: "province"
116
+ },
117
+ {
118
+ title: "城市",
119
+ key: "k-form-area-city",
120
+ type: "string",
121
+ name: "city"
122
+ },
123
+ {
124
+ title: "区县",
125
+ key: "k-form-area-county",
126
+ type: "string",
127
+ name: "county"
128
+ }
129
+ ]
66
130
  }
67
131
  ]
68
132
  }, o = {
@@ -77,24 +141,179 @@ const e = {
77
141
  children: []
78
142
  },
79
143
  {
80
- title: "数组容器",
144
+ title: "列表容器",
81
145
  key: "k-array-card",
82
146
  type: "array",
83
147
  icon: "form-list",
84
148
  children: [],
85
- "k-component": "ArrayCard"
149
+ "x-component": "ArrayCard",
150
+ "x-decorator": "Void"
86
151
  },
87
152
  {
88
153
  title: "明细表",
89
154
  key: "k-table",
90
155
  type: "array",
91
156
  icon: "form-table",
92
- "k-component": "FormLayout"
157
+ "x-component": "FormLayout"
93
158
  }
94
159
  ]
95
- };
160
+ }, a = [
161
+ {
162
+ name: "加班模版",
163
+ key: "overtime",
164
+ icon: "form-kit-overtime",
165
+ schema: {
166
+ title: "加班模版",
167
+ key: "k-overtime",
168
+ type: "object",
169
+ name: "overtime",
170
+ id: "overtime",
171
+ "x-design-props": {
172
+ validate: {
173
+ status: "",
174
+ message: ""
175
+ }
176
+ },
177
+ children: [
178
+ {
179
+ title: "加班明细",
180
+ key: "k-array-card",
181
+ type: "array",
182
+ children: [
183
+ {
184
+ title: "日期范围",
185
+ key: "k-date-range",
186
+ type: "array",
187
+ format: "date",
188
+ items: {
189
+ type: "string",
190
+ format: "date"
191
+ },
192
+ "x-component": "DateRange",
193
+ "x-component-props": {
194
+ valueFormat: "YYYY-MM-DD HH:mm:ss",
195
+ showTime: !0,
196
+ placeholder: [
197
+ "开始日期",
198
+ "结束日期"
199
+ ]
200
+ },
201
+ name: "m6husq11vxw",
202
+ id: "m6husq11vxw",
203
+ "x-design-props": {
204
+ validate: {
205
+ status: "",
206
+ message: ""
207
+ }
208
+ },
209
+ children: []
210
+ },
211
+ {
212
+ title: "加班时长",
213
+ key: "k-input-number",
214
+ type: "number",
215
+ "x-component": "InputNumber",
216
+ "x-component-props": {
217
+ placeholder: "请输入"
218
+ },
219
+ name: "b9yt6cz0u9f",
220
+ id: "b9yt6cz0u9f",
221
+ "x-design-props": {
222
+ validate: {
223
+ status: "",
224
+ message: ""
225
+ }
226
+ }
227
+ }
228
+ ],
229
+ "x-component": "ArrayCard",
230
+ "x-decorator": "Void",
231
+ name: "ptkezwx2oqd",
232
+ id: "ptkezwx2oqd",
233
+ "x-design-props": {
234
+ validate: {
235
+ status: "",
236
+ message: ""
237
+ }
238
+ }
239
+ },
240
+ {
241
+ title: "总时长",
242
+ key: "k-input",
243
+ type: "string",
244
+ "x-component": "Input",
245
+ "x-component-props": {
246
+ placeholder: "请输入"
247
+ },
248
+ name: "rrglkf7d06w",
249
+ id: "rrglkf7d06w",
250
+ "x-design-props": {
251
+ validate: {
252
+ status: "",
253
+ message: ""
254
+ }
255
+ }
256
+ }
257
+ ]
258
+ }
259
+ },
260
+ {
261
+ name: "请假模版",
262
+ key: "leave",
263
+ icon: "form-kit-out",
264
+ schema: {
265
+ title: "请假模版",
266
+ key: "k-leave",
267
+ type: "object",
268
+ name: "leave",
269
+ id: "leave",
270
+ "x-design-props": {
271
+ validate: {
272
+ status: "",
273
+ message: ""
274
+ }
275
+ },
276
+ children: [
277
+ {
278
+ title: "下拉选择框",
279
+ key: "k-select",
280
+ type: "array",
281
+ items: {
282
+ type: "string"
283
+ },
284
+ "x-component": "Select",
285
+ enum: [
286
+ {
287
+ label: "选项1",
288
+ value: "1"
289
+ },
290
+ {
291
+ label: "选项2",
292
+ value: "2"
293
+ }
294
+ ],
295
+ "x-component-props": {
296
+ placeholder: "请选择",
297
+ allowClear: !0,
298
+ mode: "multiple"
299
+ },
300
+ "x-decorator": "FormItem",
301
+ name: "uvvs3k1v39k",
302
+ id: "uvvs3k1v39k",
303
+ "x-design-props": {
304
+ validate: {
305
+ status: "",
306
+ message: ""
307
+ }
308
+ }
309
+ }
310
+ ]
311
+ }
312
+ }
313
+ ];
96
314
  export {
97
315
  t as BaseSchema,
98
316
  o as ExtendSchema,
99
- e as LayoutSchema
317
+ e as LayoutSchema,
318
+ a as tempSchema
100
319
  };
@@ -1,45 +1,47 @@
1
1
  var m = Object.defineProperty;
2
- var p = (s, e, r) => e in s ? m(s, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : s[e] = r;
3
- var t = (s, e, r) => p(s, typeof e != "symbol" ? e + "" : e, r);
4
- import { ref as n } from "vue";
2
+ var p = (r, e, s) => e in r ? m(r, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[e] = s;
3
+ var t = (r, e, s) => p(r, typeof e != "symbol" ? e + "" : e, s);
4
+ import { ref as d } from "vue";
5
5
  import "../effects/index.mjs";
6
6
  import { widgetPanels as c } from "../components/panel/index.mjs";
7
7
  import "../components/props/index.mjs";
8
- import { Plugin as g } from "../plugins/index.mjs";
9
- import { Heart as d } from "./Heart.mjs";
10
- import { FormSchema as l } from "./FormSchema.mjs";
8
+ import { Plugin as l } from "../plugins/index.mjs";
9
+ import { Heart as n } from "./Heart.mjs";
10
+ import { FormSchema as g } from "./FormSchema.mjs";
11
11
  import { widgetProps as a } from "../components/props/widget/index.mjs";
12
12
  import { runEffects as f } from "../effects/effective.mjs";
13
- class b {
13
+ class C {
14
14
  constructor(e) {
15
15
  t(this, "schema");
16
+ t(this, "tempSchema");
16
17
  t(this, "heart");
17
18
  t(this, "plugin");
18
- t(this, "FormSchema", new l());
19
+ t(this, "FormSchema", new g());
19
20
  t(this, "props");
20
- t(this, "checkedField", n({}));
21
+ t(this, "checkedField", d({}));
21
22
  t(this, "shared", {
22
23
  draggedContext: {
23
- key: ""
24
+ key: "",
25
+ field: null
24
26
  },
25
27
  panelWidgets: {},
26
28
  propsWidgets: {}
27
29
  });
28
30
  t(this, "extendFormProps", []);
29
- t(this, "notify", (e, ...r) => {
30
- this.heart.publish(e, ...r);
31
+ t(this, "notify", (e, ...s) => {
32
+ this.heart.publish(e, ...s);
31
33
  });
32
- const { extendFormProps: r = [], propsWidgets: i = {}, panelWidgets: o = {}, ...h } = e;
34
+ const { extendFormProps: s = [], propsWidgets: i = {}, panelWidgets: o = {}, ...h } = e;
33
35
  this.shared.panelWidgets = {
34
36
  ...c,
35
37
  ...o
36
38
  }, this.shared.propsWidgets = {
37
39
  ...a,
38
40
  ...i
39
- }, this.props = { ...h }, this.schema = e.schema, this.plugin = new g(), this.heart = new d({
41
+ }, this.props = { ...h }, this.schema = e.schema, this.tempSchema = e.tempSchema || [], this.plugin = new l(), this.heart = new n({
40
42
  lifecycles: this.lifecycles,
41
43
  context: this
42
- }), this.extendFormProps = r;
44
+ }), this.extendFormProps = s;
43
45
  }
44
46
  use(e) {
45
47
  this.plugin.use(e);
@@ -50,16 +52,22 @@ class b {
50
52
  getFieldList() {
51
53
  return this.FormSchema.getFieldList();
52
54
  }
55
+ setCheckedField(e) {
56
+ this.checkedField.value = e;
57
+ }
53
58
  get lifecycles() {
54
59
  return this.props.effects ? f(this, this.props.effects) : [];
55
60
  }
56
61
  get hooks() {
57
62
  return this.plugin.hooks;
58
63
  }
64
+ get dragAddResult() {
65
+ return this.plugin.dragAddResult;
66
+ }
59
67
  get fields() {
60
68
  return this.FormSchema.fields;
61
69
  }
62
70
  }
63
71
  export {
64
- b as FormDesign
72
+ C as FormDesign
65
73
  };
@@ -7,7 +7,7 @@ class p {
7
7
  this.field = i;
8
8
  }
9
9
  upDateValidate(i, s) {
10
- this.field["k-design-props"] && (this.field["k-design-props"].validate = {
10
+ this.field["x-design-props"] && (this.field["x-design-props"].validate = {
11
11
  status: i,
12
12
  message: s
13
13
  });