@kp-ui/lowcode 2.14.0-beta.6 → 2.14.0-beta.9

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 (49) hide show
  1. package/package.json +1 -1
  2. package/src/components/FormRender/useFormRender.js +9 -8
  3. package/src/components/form-designer/form-widget/container-widget/index.js +6 -6
  4. package/src/components/form-designer/form-widget/field-widget/cascader-widget.vue.js +32 -39
  5. package/src/components/form-designer/form-widget/field-widget/date-range-widget.vue.js +24 -31
  6. package/src/components/form-designer/form-widget/field-widget/date-widget.vue.js +26 -33
  7. package/src/components/form-designer/form-widget/field-widget/form-item-wrapper.vue.js +84 -152
  8. package/src/components/form-designer/form-widget/field-widget/input-widget.vue.js +31 -38
  9. package/src/components/form-designer/form-widget/field-widget/number-widget.vue.js +23 -30
  10. package/src/components/form-designer/form-widget/field-widget/select-widget.vue.js +56 -63
  11. package/src/components/form-designer/form-widget/field-widget/switch-widget.vue.js +1 -1
  12. package/src/components/form-designer/form-widget/field-widget/textarea-widget.vue.js +23 -32
  13. package/src/components/form-designer/form-widget/field-widget/treeSelect-widget.vue.js +26 -33
  14. package/src/components/form-designer/setting-panel/property-editor/index.js +41 -42
  15. package/src/components/form-designer/setting-panel/propertyRegister.js +0 -1
  16. package/src/components/form-designer/widget-panel/advanced/cascader.js +0 -1
  17. package/src/components/form-designer/widget-panel/advanced/file-upload.js +0 -1
  18. package/src/components/form-designer/widget-panel/advanced/rich-editor.js +4 -5
  19. package/src/components/form-designer/widget-panel/advanced/tree-select.js +0 -1
  20. package/src/components/form-designer/widget-panel/basicFields/checkbox.js +2 -3
  21. package/src/components/form-designer/widget-panel/basicFields/color.js +0 -1
  22. package/src/components/form-designer/widget-panel/basicFields/date.js +0 -1
  23. package/src/components/form-designer/widget-panel/basicFields/dateRange.js +0 -1
  24. package/src/components/form-designer/widget-panel/basicFields/input.js +0 -1
  25. package/src/components/form-designer/widget-panel/basicFields/number.js +0 -1
  26. package/src/components/form-designer/widget-panel/basicFields/radio.js +0 -1
  27. package/src/components/form-designer/widget-panel/basicFields/rate.js +5 -6
  28. package/src/components/form-designer/widget-panel/basicFields/select.js +2 -3
  29. package/src/components/form-designer/widget-panel/basicFields/slider.js +0 -1
  30. package/src/components/form-designer/widget-panel/basicFields/switch.js +0 -1
  31. package/src/components/form-designer/widget-panel/basicFields/textarea.js +0 -1
  32. package/src/components/form-designer/widget-panel/basicFields/time.js +0 -1
  33. package/src/components/form-designer/widget-panel/basicFields/timeRange.js +0 -1
  34. package/src/components/form-designer/widget-panel/business/department-select.js +0 -1
  35. package/src/components/form-designer/widget-panel/business/material-select.js +0 -1
  36. package/src/components/form-designer/widget-panel/business/operation-select.js +2 -3
  37. package/src/components/form-designer/widget-panel/business/post-select.js +0 -1
  38. package/src/components/form-designer/widget-panel/business/project-group-select.js +2 -3
  39. package/src/components/form-designer/widget-panel/business/project-select.js +2 -3
  40. package/src/components/form-designer/widget-panel/business/user-select.js +0 -1
  41. package/src/components/form-render/RenderWigetList.vue.js +2 -1
  42. package/src/components/form-render/container-item/index.js +11 -11
  43. package/src/components/form-render/container-item/sub-form-item.vue.js +115 -146
  44. package/src/components/form-render/index.vue.js +47 -37
  45. package/src/lang/en-US.js +0 -1
  46. package/src/lang/zh-CN.js +0 -1
  47. package/stats.html +1 -1
  48. package/styles/style.css +1 -1
  49. package/src/components/form-designer/setting-panel/property-editor/labelTooltip-editor.vue.js +0 -31
@@ -1,23 +1,23 @@
1
1
  import M from "../../../utils/emitter.js";
2
- import N from "../../../utils/i18n.js";
3
- import { deepClone as A, generateId as y } from "../../../utils/util.js";
4
- import E from "../refMixin.js";
5
- import V from "./container-item-wrapper.vue2.js";
6
- import z from "./containerItemMixin.js";
7
- import B from "../../form-designer/form-widget/field-widget/index.js";
8
- import { SvgIcon as H } from "tmgc2-share";
9
- import { TpfConfirm as j } from "../../../hooks/TpfConfirm.js";
10
- import { resolveComponent as S, createBlock as g, openBlock as n, withCtx as r, withDirectives as R, createElementBlock as s, createVNode as a, createElementVNode as u, createCommentVNode as b, toDisplayString as c, createTextVNode as D, Fragment as h, renderList as C, normalizeStyle as T, normalizeClass as q, vShow as _, resolveDynamicComponent as O } from "vue";
2
+ import T from "../../../utils/i18n.js";
3
+ import { deepClone as I, generateId as _ } from "../../../utils/util.js";
4
+ import N from "../refMixin.js";
5
+ import E from "./container-item-wrapper.vue2.js";
6
+ import V from "./containerItemMixin.js";
7
+ import z from "../../form-designer/form-widget/field-widget/index.js";
8
+ import { SvgIcon as B } from "tmgc2-share";
9
+ import { TpfConfirm as H } from "../../../hooks/TpfConfirm.js";
10
+ import { resolveComponent as C, createBlock as D, openBlock as o, withCtx as r, withDirectives as g, createElementBlock as a, createVNode as d, createElementVNode as c, createCommentVNode as w, toDisplayString as h, createTextVNode as k, Fragment as f, renderList as y, normalizeStyle as A, normalizeClass as j, vShow as S, resolveDynamicComponent as q } from "vue";
11
11
  /* empty css */
12
- import P from "../../../../_virtual/_plugin-vue_export-helper.js";
13
- const U = {
12
+ import O from "../../../../_virtual/_plugin-vue_export-helper.js";
13
+ const P = {
14
14
  name: "sub-form-item",
15
15
  componentName: "ContainerItem",
16
- mixins: [M, N, E, z],
16
+ mixins: [M, T, N, V],
17
17
  components: {
18
- ContainerItemWrapper: V,
19
- ...B,
20
- SvgIcon: H
18
+ ContainerItemWrapper: E,
19
+ ...z,
20
+ SvgIcon: B
21
21
  },
22
22
  props: {
23
23
  widget: Object
@@ -66,17 +66,17 @@ const U = {
66
66
  this.rowIdData.splice(0, this.rowIdData.length);
67
67
  const t = this.formModel[this.widget.options.name];
68
68
  t && t.length > 0 && (t.forEach(() => {
69
- this.rowIdData.push("id" + y());
69
+ this.rowIdData.push("id" + _());
70
70
  }), e && setTimeout(() => {
71
71
  this.handleSubFormRowChange(t);
72
72
  }, 800));
73
73
  }
74
74
  },
75
75
  addToRowIdData() {
76
- this.rowIdData.push("id" + y());
76
+ this.rowIdData.push("id" + _());
77
77
  },
78
78
  insertToRowIdData(e) {
79
- this.rowIdData.splice(e, 0, "id" + y());
79
+ this.rowIdData.splice(e, 0, "id" + _());
80
80
  },
81
81
  deleteFromRowIdData(e) {
82
82
  this.rowIdData.splice(e, 1);
@@ -95,8 +95,8 @@ const U = {
95
95
  if (this.fieldSchemaData.splice(0, this.fieldSchemaData.length), e > 0)
96
96
  for (let t = 0; t < e; t++) {
97
97
  const i = [];
98
- this.widget.widgetList.forEach((f) => {
99
- i.push(this.cloneFieldSchema(f));
98
+ this.widget.widgetList.forEach((p) => {
99
+ i.push(this.cloneFieldSchema(p));
100
100
  }), this.fieldSchemaData.push(i);
101
101
  }
102
102
  },
@@ -110,8 +110,8 @@ const U = {
110
110
  this.fieldSchemaData.splice(e, 1);
111
111
  },
112
112
  cloneFieldSchema(e) {
113
- const t = A(e);
114
- return t.id = e.type + y(), t;
113
+ const t = I(e);
114
+ return t.id = e.type + _(), t;
115
115
  },
116
116
  initEventHandler() {
117
117
  this.widget.type === "sub-form" && this.on$("setFormData", (e) => {
@@ -138,21 +138,21 @@ const U = {
138
138
  },
139
139
  insertSubFormRow(e) {
140
140
  const t = {};
141
- this.widget.widgetList.forEach((f) => {
142
- f.formItemFlag && (t[f.options.name] = f.options.defaultValue);
141
+ this.widget.widgetList.forEach((p) => {
142
+ p.formItemFlag && (t[p.options.name] = p.options.defaultValue);
143
143
  });
144
144
  const i = this.formModel[this.widget.options.name] || [];
145
145
  i.splice(e, 0, t), this.insertToRowIdData(e), this.addToFieldSchemaData(e), this.handleSubFormRowInsert(i, this.rowIdData[e]), this.handleSubFormRowChange(i);
146
146
  },
147
147
  deleteSubFormRow(e) {
148
- j({
148
+ H({
149
149
  type: "confirm",
150
150
  content: this.i18nt("render.hint.deleteSubFormRow") + "?",
151
151
  title: this.i18nt("render.hint.prompt"),
152
152
  okText: this.i18nt("render.hint.confirm"),
153
153
  cancelText: this.i18nt("render.hint.cancel")
154
154
  }).then(() => {
155
- const t = this.formModel[this.widget.options.name] || [], i = A(t[e]);
155
+ const t = this.formModel[this.widget.options.name] || [], i = I(t[e]);
156
156
  t.splice(e, 1), this.deleteFromRowIdData(e), this.deleteFromFieldSchemaData(e), this.handleSubFormRowDelete(t, i), this.handleSubFormRowChange(t);
157
157
  }).catch(() => {
158
158
  });
@@ -202,123 +202,92 @@ const U = {
202
202
  this.deleteDisabled = e;
203
203
  }
204
204
  }
205
- }, G = { class: "action-header-column" }, J = { class: "action-label" }, K = {
205
+ }, U = { class: "action-header-column" }, G = { class: "action-label" }, J = {
206
206
  key: 0,
207
207
  class: "row-no-header-column"
208
- }, Q = {
208
+ }, K = {
209
209
  key: 0,
210
210
  class: "custom-label"
211
- }, X = ["title"], Y = { class: "action-header-column" }, Z = { class: "action-label" }, x = { class: "sub-form-action-column hide-label" }, W = { class: "action-button-column" }, $ = {
211
+ }, Q = { key: 1 }, X = { class: "action-header-column" }, Y = { class: "action-label" }, Z = { class: "sub-form-action-column hide-label" }, W = { class: "action-button-column" }, x = {
212
212
  key: 0,
213
213
  class: "row-no-column"
214
- }, ee = {
214
+ }, $ = {
215
215
  key: 0,
216
216
  class: "row-number-span"
217
- }, te = { class: "sub-form-action-column hide-label" }, ie = { class: "action-button-column" };
218
- function oe(e, t, i, f, l, d) {
219
- const m = S("svg-icon"), F = S("a-button"), v = S("a-tooltip"), I = S("a-row"), L = S("container-item-wrapper");
220
- return n(), g(L, { widget: i.widget }, {
217
+ }, ee = { class: "sub-form-action-column hide-label" }, te = { class: "action-button-column" };
218
+ function ie(e, t, i, p, s, l) {
219
+ const m = C("svg-icon"), F = C("a-button"), v = C("a-row"), L = C("container-item-wrapper");
220
+ return o(), D(L, { widget: i.widget }, {
221
221
  default: r(() => [
222
- R((n(), s("div", {
222
+ g((o(), a("div", {
223
223
  key: i.widget.id,
224
224
  class: "sub-form-container"
225
225
  }, [
226
- a(I, { class: "header-row" }, {
226
+ d(v, { class: "header-row" }, {
227
227
  default: r(() => [
228
- u("div", G, [
229
- u("span", J, c(e.i18nt("render.hint.subFormAction")), 1),
230
- d.isReadMode ? b("", !0) : (n(), g(F, {
228
+ c("div", U, [
229
+ c("span", G, h(e.i18nt("render.hint.subFormAction")), 1),
230
+ l.isReadMode ? w("", !0) : (o(), D(F, {
231
231
  key: 0,
232
- disabled: l.actionDisabled || l.insertDisabled,
232
+ disabled: s.actionDisabled || s.insertDisabled,
233
233
  shape: "round",
234
234
  type: "primary",
235
235
  size: "small",
236
236
  class: "action-button",
237
- onClick: d.addSubFormRow,
237
+ onClick: l.addSubFormRow,
238
238
  title: e.i18nt("render.hint.subFormAddActionHint")
239
239
  }, {
240
240
  default: r(() => [
241
- D(c(e.i18nt("render.hint.subFormAddAction")) + " ", 1),
242
- a(m, { "icon-class": "icon-el-plus" })
241
+ k(h(e.i18nt("render.hint.subFormAddAction")) + " ", 1),
242
+ d(m, { "icon-class": "icon-el-plus" })
243
243
  ]),
244
244
  _: 1
245
245
  }, 8, ["disabled", "onClick", "title"]))
246
246
  ]),
247
- i.widget.options.showRowNumber ? (n(), s("div", K, [
248
- u("span", null, c(e.i18nt("render.hint.subFormRowNo")), 1)
249
- ])) : b("", !0),
250
- (n(!0), s(h, null, C(i.widget.widgetList, (o) => (n(), s(h, {
251
- key: o.id + "thc"
247
+ i.widget.options.showRowNumber ? (o(), a("div", J, [
248
+ c("span", null, h(e.i18nt("render.hint.subFormRowNo")), 1)
249
+ ])) : w("", !0),
250
+ (o(!0), a(f, null, y(i.widget.widgetList, (n) => (o(), a(f, {
251
+ key: n.id + "thc"
252
252
  }, [
253
- o.options.hidden ? b("", !0) : (n(), s("div", {
253
+ n.options.hidden ? w("", !0) : (o(), a("div", {
254
254
  key: 0,
255
- class: q(["field-header-column", [
256
- d.getLabelAlign(i.widget, o),
257
- o.options.required ? "is-required" : ""
255
+ class: j(["field-header-column", [
256
+ l.getLabelAlign(i.widget, n),
257
+ n.options.required ? "is-required" : ""
258
258
  ]]),
259
- style: T({ width: o.options.columnWidth })
259
+ style: A({ width: n.options.columnWidth })
260
260
  }, [
261
- o.options.labelIconClass ? (n(), s("span", Q, [
262
- o.options.labelIconPosition === "front" ? (n(), s(h, { key: 0 }, [
263
- o.options.labelTooltip ? (n(), s(h, { key: 0 }, [
264
- a(v, {
265
- title: o.options.labelTooltip
266
- }, {
267
- default: r(() => [
268
- a(m, {
269
- "icon-class": o.options.labelIconClass
270
- }, null, 8, ["icon-class"])
271
- ]),
272
- _: 2
273
- }, 1032, ["title"]),
274
- D(" " + c(o.options.label), 1)
275
- ], 64)) : (n(), s(h, { key: 1 }, [
276
- a(m, {
277
- "icon-class": o.options.labelIconClass
278
- }, null, 8, ["icon-class"]),
279
- D(" " + c(o.options.label), 1)
280
- ], 64))
281
- ], 64)) : o.options.labelIconPosition === "rear" ? (n(), s(h, { key: 1 }, [
282
- o.options.labelTooltip ? (n(), s(h, { key: 0 }, [
283
- D(c(o.options.label) + " ", 1),
284
- a(v, {
285
- title: o.options.labelTooltip
286
- }, {
287
- default: r(() => [
288
- a(m, {
289
- "icon-class": o.options.labelIconClass
290
- }, null, 8, ["icon-class"])
291
- ]),
292
- _: 2
293
- }, 1032, ["title"])
294
- ], 64)) : (n(), s(h, { key: 1 }, [
295
- D(c(o.options.label) + " ", 1),
296
- a(m, {
297
- "icon-class": o.options.labelIconClass
298
- }, null, 8, ["icon-class"])
299
- ], 64))
300
- ], 64)) : b("", !0)
301
- ])) : (n(), s("span", {
302
- key: 1,
303
- title: o.options.labelTooltip
304
- }, c(o.options.label), 9, X))
261
+ n.options.labelIconClass ? (o(), a("span", K, [
262
+ n.options.labelIconPosition === "front" ? (o(), a(f, { key: 0 }, [
263
+ d(m, {
264
+ "icon-class": n.options.labelIconClass
265
+ }, null, 8, ["icon-class"]),
266
+ k(" " + h(n.options.label), 1)
267
+ ], 64)) : n.options.labelIconPosition === "rear" ? (o(), a(f, { key: 1 }, [
268
+ k(h(n.options.label) + " ", 1),
269
+ d(m, {
270
+ "icon-class": n.options.labelIconClass
271
+ }, null, 8, ["icon-class"])
272
+ ], 64)) : w("", !0)
273
+ ])) : (o(), a("span", Q, h(n.options.label), 1))
305
274
  ], 6))
306
275
  ], 64))), 128)),
307
- u("div", Y, [
308
- u("span", Z, c(e.i18nt("render.hint.subFormAction")), 1),
309
- d.isReadMode ? b("", !0) : (n(), g(F, {
276
+ c("div", X, [
277
+ c("span", Y, h(e.i18nt("render.hint.subFormAction")), 1),
278
+ l.isReadMode ? w("", !0) : (o(), D(F, {
310
279
  key: 0,
311
- disabled: l.actionDisabled || l.insertDisabled,
280
+ disabled: s.actionDisabled || s.insertDisabled,
312
281
  shape: "round",
313
282
  type: "primary",
314
283
  size: "small",
315
284
  class: "action-button",
316
- onClick: d.addSubFormRow,
285
+ onClick: l.addSubFormRow,
317
286
  title: e.i18nt("render.hint.subFormAddActionHint")
318
287
  }, {
319
288
  default: r(() => [
320
- D(c(e.i18nt("render.hint.subFormAddAction")) + " ", 1),
321
- a(m, { "icon-class": "icon-el-plus" })
289
+ k(h(e.i18nt("render.hint.subFormAddAction")) + " ", 1),
290
+ d(m, { "icon-class": "icon-el-plus" })
322
291
  ]),
323
292
  _: 1
324
293
  }, 8, ["disabled", "onClick", "title"]))
@@ -326,90 +295,90 @@ function oe(e, t, i, f, l, d) {
326
295
  ]),
327
296
  _: 1
328
297
  }),
329
- (n(!0), s(h, null, C(l.rowIdData, (o, w) => (n(), g(I, {
298
+ (o(!0), a(f, null, y(s.rowIdData, (n, u) => (o(), D(v, {
330
299
  class: "sub-form-row",
331
- key: o
300
+ key: n
332
301
  }, {
333
302
  default: r(() => [
334
- u("div", x, [
335
- u("div", W, [
336
- R(a(F, {
337
- disabled: l.actionDisabled || l.insertDisabled,
303
+ c("div", Z, [
304
+ c("div", W, [
305
+ g(d(F, {
306
+ disabled: s.actionDisabled || s.insertDisabled,
338
307
  shape: "circle",
339
- onClick: (p) => d.insertSubFormRow(w),
308
+ onClick: (b) => l.insertSubFormRow(u),
340
309
  title: e.i18nt("render.hint.insertSubFormRow")
341
310
  }, {
342
311
  default: r(() => [
343
- a(m, { "icon-class": "icon-el-plus" })
312
+ d(m, { "icon-class": "icon-el-plus" })
344
313
  ]),
345
314
  _: 2
346
315
  }, 1032, ["disabled", "onClick", "title"]), [
347
- [_, !d.isReadMode]
316
+ [S, !l.isReadMode]
348
317
  ]),
349
- R(a(F, {
350
- disabled: l.actionDisabled || l.deleteDisabled,
318
+ g(d(F, {
319
+ disabled: s.actionDisabled || s.deleteDisabled,
351
320
  shape: "circle",
352
- onClick: (p) => d.deleteSubFormRow(w),
321
+ onClick: (b) => l.deleteSubFormRow(u),
353
322
  title: e.i18nt("render.hint.deleteSubFormRow")
354
323
  }, {
355
324
  default: r(() => [
356
- a(m, { "icon-class": "icon-el-delete" })
325
+ d(m, { "icon-class": "icon-el-delete" })
357
326
  ]),
358
327
  _: 2
359
328
  }, 1032, ["disabled", "onClick", "title"]), [
360
- [_, !d.isReadMode]
329
+ [S, !l.isReadMode]
361
330
  ])
362
331
  ])
363
332
  ]),
364
- i.widget.options.showRowNumber ? (n(), s("div", $, [
365
- i.widget.options.showRowNumber ? (n(), s("span", ee, "#" + c(w + 1), 1)) : b("", !0)
366
- ])) : b("", !0),
367
- (n(!0), s(h, null, C(i.widget.widgetList, (p, k) => (n(), s(h, {
368
- key: l.fieldSchemaData[w][k].id
333
+ i.widget.options.showRowNumber ? (o(), a("div", x, [
334
+ i.widget.options.showRowNumber ? (o(), a("span", $, "#" + h(u + 1), 1)) : w("", !0)
335
+ ])) : w("", !0),
336
+ (o(!0), a(f, null, y(i.widget.widgetList, (b, R) => (o(), a(f, {
337
+ key: s.fieldSchemaData[u][R].id
369
338
  }, [
370
- p.options.hidden ? b("", !0) : (n(), s("div", {
339
+ b.options.hidden ? w("", !0) : (o(), a("div", {
371
340
  key: 0,
372
341
  class: "sub-form-table-column hide-label",
373
- style: T({ width: p.options.columnWidth })
342
+ style: A({ width: b.options.columnWidth })
374
343
  }, [
375
- (n(), g(O(p.type + "-widget"), {
376
- field: l.fieldSchemaData[w][k],
344
+ (o(), D(q(b.type + "-widget"), {
345
+ field: s.fieldSchemaData[u][R],
377
346
  "parent-list": i.widget.widgetList,
378
- "index-of-parent-list": k,
347
+ "index-of-parent-list": R,
379
348
  "parent-widget": i.widget,
380
- "sub-form-row-id": o,
381
- "sub-form-row-index": w,
382
- "sub-form-col-index": k
349
+ "sub-form-row-id": n,
350
+ "sub-form-row-index": u,
351
+ "sub-form-col-index": R
383
352
  }, null, 8, ["field", "parent-list", "index-of-parent-list", "parent-widget", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index"]))
384
353
  ], 4))
385
354
  ], 64))), 128)),
386
- u("div", te, [
387
- u("div", ie, [
388
- R(a(F, {
389
- disabled: l.actionDisabled || l.insertDisabled,
355
+ c("div", ee, [
356
+ c("div", te, [
357
+ g(d(F, {
358
+ disabled: s.actionDisabled || s.insertDisabled,
390
359
  shape: "circle",
391
- onClick: (p) => d.insertSubFormRow(w),
360
+ onClick: (b) => l.insertSubFormRow(u),
392
361
  title: e.i18nt("render.hint.insertSubFormRow")
393
362
  }, {
394
363
  default: r(() => [
395
- a(m, { "icon-class": "icon-el-plus" })
364
+ d(m, { "icon-class": "icon-el-plus" })
396
365
  ]),
397
366
  _: 2
398
367
  }, 1032, ["disabled", "onClick", "title"]), [
399
- [_, !d.isReadMode]
368
+ [S, !l.isReadMode]
400
369
  ]),
401
- R(a(F, {
402
- disabled: l.actionDisabled || l.deleteDisabled,
370
+ g(d(F, {
371
+ disabled: s.actionDisabled || s.deleteDisabled,
403
372
  shape: "circle",
404
- onClick: (p) => d.deleteSubFormRow(w),
373
+ onClick: (b) => l.deleteSubFormRow(u),
405
374
  title: e.i18nt("render.hint.deleteSubFormRow")
406
375
  }, {
407
376
  default: r(() => [
408
- a(m, { "icon-class": "icon-el-delete" })
377
+ d(m, { "icon-class": "icon-el-delete" })
409
378
  ]),
410
379
  _: 2
411
380
  }, 1032, ["disabled", "onClick", "title"]), [
412
- [_, !d.isReadMode]
381
+ [S, !l.isReadMode]
413
382
  ])
414
383
  ])
415
384
  ])
@@ -417,13 +386,13 @@ function oe(e, t, i, f, l, d) {
417
386
  _: 2
418
387
  }, 1024))), 128))
419
388
  ])), [
420
- [_, !i.widget.options.hidden]
389
+ [S, !i.widget.options.hidden]
421
390
  ])
422
391
  ]),
423
392
  _: 1
424
393
  }, 8, ["widget"]);
425
394
  }
426
- const pe = /* @__PURE__ */ P(U, [["render", oe], ["__scopeId", "data-v-44e1e557"]]);
395
+ const be = /* @__PURE__ */ O(P, [["render", ie], ["__scopeId", "data-v-18c22eeb"]]);
427
396
  export {
428
- pe as default
397
+ be as default
429
398
  };
@@ -1,25 +1,26 @@
1
- import { resolveComponent as h, createElementBlock as L, openBlock as W, Fragment as S, createVNode as d, withCtx as u, createElementVNode as v, normalizeStyle as O, withKeys as M, normalizeClass as w, mergeProps as E, render as V } from "vue";
2
- import j from "../../utils/emitter.js";
3
- import x from "../form-designer/form-widget/field-widget/index.js";
4
- import { useI18n as A } from "@kp-ui/i18n";
5
- import k from "./RenderWigetList.vue.js";
6
- import { buildDefaultFormJson as _, getContainerWidgetByName as g, cloneFormConfigWithoutEventHandler as p, deepClone as f, getDSByName as F, overwriteObj as m, runDataSourceRequest as b, getAllContainerWidgets as $, getAllFieldWidgets as J, getDefaultFormConfig as P, traverseFieldWidgets as B, getFieldWidgetByName as D, traverseFieldWidgetsOfContainer as H, insertCustomCssToHead as T, insertGlobalFunctionsToHtml as z, generateId as c } from "../../utils/util.js";
7
- import K, { setLangMessages as G } from "../../utils/i18n.js";
8
- import q from "./dynamic-dialog.vue.js";
1
+ import { resolveComponent as h, createElementBlock as W, openBlock as S, Fragment as v, createVNode as d, withCtx as u, createElementVNode as O, normalizeStyle as M, withKeys as w, normalizeClass as E, mergeProps as V, render as j } from "vue";
2
+ import x from "../../utils/emitter.js";
3
+ import A from "../form-designer/form-widget/field-widget/index.js";
4
+ import { useI18n as k } from "@kp-ui/i18n";
5
+ import _ from "./RenderWigetList.vue.js";
6
+ import { buildDefaultFormJson as $, getContainerWidgetByName as g, cloneFormConfigWithoutEventHandler as p, deepClone as f, getDSByName as F, overwriteObj as m, runDataSourceRequest as b, getAllContainerWidgets as B, getAllFieldWidgets as J, getDefaultFormConfig as P, traverseFieldWidgets as H, getFieldWidgetByName as D, traverseFieldWidgetsOfContainer as T, insertCustomCssToHead as z, insertGlobalFunctionsToHtml as K, generateId as c } from "../../utils/util.js";
7
+ import G, { setLangMessages as q } from "../../utils/i18n.js";
8
+ import U from "./dynamic-dialog.vue.js";
9
9
  /* empty css */
10
- import U from "./dynamic-drawer.vue.js";
10
+ import N from "./dynamic-drawer.vue.js";
11
11
  import { fmtHttpParams as C } from "../../utils/request/fmtHttpParams.js";
12
+ import { executeFunction as y } from "../../utils/executeFunction.js";
12
13
  /* empty css */
13
- import N from "../../../_virtual/_plugin-vue_export-helper.js";
14
- const Q = {
14
+ import Q from "../../../_virtual/_plugin-vue_export-helper.js";
15
+ const X = {
15
16
  name: "VFormRender",
16
17
  componentName: "VFormRender",
17
18
  inheritAttrs: !1,
18
- mixins: [j, K],
19
+ mixins: [x, G],
19
20
  components: {
20
- RenderWigetList: k,
21
- DynamicDialog: q,
22
- ...x
21
+ RenderWigetList: _,
22
+ DynamicDialog: U,
23
+ ...A
23
24
  },
24
25
  props: {
25
26
  vfCtx: {
@@ -29,7 +30,7 @@ const Q = {
29
30
  formJson: {
30
31
  //prop传入的表单JSON配置
31
32
  type: Object,
32
- default: () => _()
33
+ default: () => $()
33
34
  },
34
35
  formData: {
35
36
  //prop传入的表单数据
@@ -209,14 +210,14 @@ const Q = {
209
210
  return t.type + "-widget";
210
211
  },
211
212
  initLocale() {
212
- const { t, messages: e } = A(), i = e.value[this.getLocale];
213
- i && G(this.getLocale, i.lang), this.changeLanguage(this.getLocale);
213
+ const { t, messages: e } = k(), i = e.value[this.getLocale];
214
+ i && q(this.getLocale, i.lang), this.changeLanguage(this.getLocale);
214
215
  },
215
216
  insertCustomStyleAndScriptNode() {
216
- this.formConfig && this.formConfig.cssCode && T(
217
+ this.formConfig && this.formConfig.cssCode && z(
217
218
  this.formConfig.cssCode,
218
219
  this.previewState ? "" : this.formId
219
- ), this.formConfig && this.formConfig.functions && z(
220
+ ), this.formConfig && this.formConfig.functions && K(
220
221
  this.formConfig.functions,
221
222
  this.previewState ? "" : this.formId
222
223
  );
@@ -267,7 +268,7 @@ const Q = {
267
268
  this.formDataModel[e] = f(i);
268
269
  } else {
269
270
  const i = [];
270
- H(t, (r) => {
271
+ T(t, (r) => {
271
272
  i.push(r);
272
273
  });
273
274
  const s = {};
@@ -341,7 +342,16 @@ const Q = {
341
342
  this.formConfig && this.formConfig.onFormCreated && new Function(this.formConfig.onFormCreated).call(this);
342
343
  },
343
344
  onFormEnterKey() {
344
- this.formConfig && this.formConfig.onFormEnterKey && new Function(this.formConfig.onFormEnterKey).call(this);
345
+ if (this.formConfig && this.formConfig.onFormEnterKey) {
346
+ const t = y({
347
+ functionBody: this.formConfig.onFormEnterKey,
348
+ context: this
349
+ });
350
+ t && y({
351
+ functionBody: t,
352
+ context: this
353
+ });
354
+ }
345
355
  },
346
356
  handleOnMounted() {
347
357
  this.formConfig && this.formConfig.onFormMounted && new Function(this.formConfig.onFormMounted).call(this);
@@ -382,7 +392,7 @@ const Q = {
382
392
  const o = (s, r) => {
383
393
  s.options && s.options.name === t && (i = r.options.name);
384
394
  };
385
- if (B(this.widgetList, o), i) {
395
+ if (H(this.widgetList, o), i) {
386
396
  const s = this.getWidgetRef(i);
387
397
  if (s) {
388
398
  const r = s.getRowIdData();
@@ -600,7 +610,7 @@ const Q = {
600
610
  * @returns {*[]}
601
611
  */
602
612
  getContainerWidgets() {
603
- return $(this.formJsonObj.widgetList);
613
+ return B(this.formJsonObj.widgetList);
604
614
  },
605
615
  /**
606
616
  * 增加外部组件引用,可通过getEC()方法获取外部组件,以便在VForm内部调用外部组件方法
@@ -735,7 +745,7 @@ const Q = {
735
745
  const r = {
736
746
  widgetList: f(s.widgetList),
737
747
  formConfig: p(o.formConfig)
738
- }, n = c() + "", a = d(U, {
748
+ }, n = c() + "", a = d(N, {
739
749
  options: s.options,
740
750
  formJson: r,
741
751
  formData: e || {},
@@ -747,7 +757,7 @@ const Q = {
747
757
  });
748
758
  a.appContext = this.$root.$.appContext;
749
759
  const l = document.createElement("div");
750
- l.id = "vf-dynamic-drawer-wrapper" + n, document.body.appendChild(l), V(a, l), document.body.appendChild(a.el), a.component.ctx.show();
760
+ l.id = "vf-dynamic-drawer-wrapper" + n, document.body.appendChild(l), j(a, l), document.body.appendChild(a.el), a.component.ctx.show();
751
761
  },
752
762
  /**
753
763
  * 判断表单是否处于设计器预览状态
@@ -762,29 +772,29 @@ const Q = {
762
772
  //--------------------- 以上为组件支持外部调用的API方法 end ------------------//
763
773
  }
764
774
  };
765
- function X(t, e, i, o, s, r) {
766
- const n = h("RenderWigetList"), a = h("a-form"), l = h("a-spin"), y = h("DynamicDialog");
767
- return W(), L(S, null, [
775
+ function Y(t, e, i, o, s, r) {
776
+ const n = h("RenderWigetList"), a = h("a-form"), l = h("a-spin"), R = h("DynamicDialog");
777
+ return S(), W(v, null, [
768
778
  d(l, { spinning: s.isLoading }, {
769
779
  default: u(() => [
770
- v("div", {
771
- style: O(s.isLoading ? "min-height: 260px" : "")
780
+ O("div", {
781
+ style: M(s.isLoading ? "min-height: 260px" : "")
772
782
  }, [
773
783
  d(a, {
774
784
  layout: r.labelPosition,
775
- class: w([[r.customClass, s.readModeFlag ? "readonly-mode-form" : ""], "render-form tpf-form"]),
785
+ class: E([[r.customClass, s.readModeFlag ? "readonly-mode-form" : ""], "render-form tpf-form"]),
776
786
  "label-width": r.labelWidth,
777
787
  "validate-on-rule-change": !1,
778
788
  model: s.formDataModel,
779
789
  ref: "renderForm",
780
- onKeydown: M(r.onFormEnterKey, ["enter"])
790
+ onKeydown: w(r.onFormEnterKey, ["enter"])
781
791
  }, {
782
792
  default: u(() => [
783
793
  d(n, {
784
794
  "parent-widget": null,
785
795
  "widget-list": r.widgetList,
786
796
  formDataModel: s.formDataModel,
787
- "onUpdate:formDataModel": e[0] || (e[0] = (R) => s.formDataModel = R)
797
+ "onUpdate:formDataModel": e[0] || (e[0] = (L) => s.formDataModel = L)
788
798
  }, null, 8, ["widget-list", "formDataModel"])
789
799
  ]),
790
800
  _: 1
@@ -793,10 +803,10 @@ function X(t, e, i, o, s, r) {
793
803
  ]),
794
804
  _: 1
795
805
  }, 8, ["spinning"]),
796
- d(y, E(s.dialogProps, { ref: "dynamicDialgRef" }), null, 16)
806
+ d(R, V(s.dialogProps, { ref: "dynamicDialgRef" }), null, 16)
797
807
  ], 64);
798
808
  }
799
- const dt = /* @__PURE__ */ N(Q, [["render", X], ["__scopeId", "data-v-a4be1a19"]]);
809
+ const mt = /* @__PURE__ */ Q(X, [["render", Y], ["__scopeId", "data-v-00d8154a"]]);
800
810
  export {
801
- dt as default
811
+ mt as default
802
812
  };
package/src/lang/en-US.js CHANGED
@@ -309,7 +309,6 @@ const e = {
309
309
  customLabelIcon: "Custom Label",
310
310
  labelIconClass: "Label Icon Class",
311
311
  labelIconPosition: "Label Icon Position",
312
- labelTooltip: "Label Tooltip",
313
312
  minValue: "Min Value",
314
313
  maxValue: "Max Value",
315
314
  precision: "Precision",
package/src/lang/zh-CN.js CHANGED
@@ -311,7 +311,6 @@ const e = {
311
311
  customLabelIcon: "定制字段标签",
312
312
  labelIconClass: "标签Icon样式",
313
313
  labelIconPosition: "标签Icon位置",
314
- labelTooltip: "标签文字提示",
315
314
  minValue: "最小值",
316
315
  maxValue: "最大值",
317
316
  precision: "精度",