@kp-ui/lowcode 2.14.0-beta.2 → 2.14.0-beta.21

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 (90) hide show
  1. package/package.json +1 -1
  2. package/src/components/FormRender/useFormRender.js +18 -0
  3. package/src/components/form-designer/designer.js +78 -75
  4. package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue.js +18 -18
  5. package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue2.js +18 -20
  6. package/src/components/form-designer/form-widget/container-widget/vf-box-item.vue.js +9 -9
  7. package/src/components/form-designer/form-widget/container-widget/vf-dialog-widget.vue.js +29 -21
  8. package/src/components/form-designer/form-widget/field-widget/cascader-widget.vue.js +32 -39
  9. package/src/components/form-designer/form-widget/field-widget/date-range-widget.vue.js +24 -31
  10. package/src/components/form-designer/form-widget/field-widget/date-widget.vue.js +26 -33
  11. package/src/components/form-designer/form-widget/field-widget/diy-compontent-widget.vue.js +4 -4
  12. package/src/components/form-designer/form-widget/field-widget/fieldMixin.js +4 -1
  13. package/src/components/form-designer/form-widget/field-widget/form-item-wrapper.vue.js +84 -152
  14. package/src/components/form-designer/form-widget/field-widget/input-widget.vue.js +31 -38
  15. package/src/components/form-designer/form-widget/field-widget/number-widget.vue.js +23 -30
  16. package/src/components/form-designer/form-widget/field-widget/select-widget.vue.js +56 -63
  17. package/src/components/form-designer/form-widget/field-widget/switch-widget.vue.js +1 -1
  18. package/src/components/form-designer/form-widget/field-widget/textarea-widget.vue.js +23 -32
  19. package/src/components/form-designer/form-widget/field-widget/treeSelect-widget.vue.js +26 -33
  20. package/src/components/form-designer/setting-panel/form-setting.vue.js +2 -2
  21. package/src/components/form-designer/setting-panel/form-setting.vue2.js +81 -94
  22. package/src/components/form-designer/setting-panel/index.vue.js +2 -2
  23. package/src/components/form-designer/setting-panel/index.vue2.js +135 -135
  24. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-colorRow-editor.vue2.js +8 -7
  25. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-dsEnabled-editor.vue.js +23 -22
  26. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +3 -3
  27. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue2.js +7 -7
  28. package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/formCode-editor.vue.js +25 -19
  29. package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/line-height-editor.vue2.js +7 -6
  30. package/src/components/form-designer/setting-panel/property-editor/index.js +41 -42
  31. package/src/components/form-designer/setting-panel/propertyRegister.js +3 -6
  32. package/src/components/form-designer/widget-panel/PanelItemDrag.vue.js +50 -0
  33. package/src/components/form-designer/widget-panel/PanelItemDrag.vue2.js +4 -0
  34. package/src/components/form-designer/widget-panel/advanced/cascader.js +0 -1
  35. package/src/components/form-designer/widget-panel/advanced/data-table.js +1 -1
  36. package/src/components/form-designer/widget-panel/advanced/file-upload.js +0 -1
  37. package/src/components/form-designer/widget-panel/advanced/rich-editor.js +4 -5
  38. package/src/components/form-designer/widget-panel/advanced/tree-select.js +0 -1
  39. package/src/components/form-designer/widget-panel/basicFields/checkbox.js +2 -3
  40. package/src/components/form-designer/widget-panel/basicFields/color.js +0 -1
  41. package/src/components/form-designer/widget-panel/basicFields/date.js +0 -1
  42. package/src/components/form-designer/widget-panel/basicFields/dateRange.js +0 -1
  43. package/src/components/form-designer/widget-panel/basicFields/input.js +0 -1
  44. package/src/components/form-designer/widget-panel/basicFields/number.js +0 -1
  45. package/src/components/form-designer/widget-panel/basicFields/radio.js +0 -1
  46. package/src/components/form-designer/widget-panel/basicFields/rate.js +5 -6
  47. package/src/components/form-designer/widget-panel/basicFields/select.js +2 -3
  48. package/src/components/form-designer/widget-panel/basicFields/slider.js +0 -1
  49. package/src/components/form-designer/widget-panel/basicFields/switch.js +0 -1
  50. package/src/components/form-designer/widget-panel/basicFields/textarea.js +0 -1
  51. package/src/components/form-designer/widget-panel/basicFields/time.js +0 -1
  52. package/src/components/form-designer/widget-panel/basicFields/timeRange.js +0 -1
  53. package/src/components/form-designer/widget-panel/business/department-select.js +0 -1
  54. package/src/components/form-designer/widget-panel/business/material-select.js +0 -1
  55. package/src/components/form-designer/widget-panel/business/operation-select.js +2 -3
  56. package/src/components/form-designer/widget-panel/business/post-select.js +0 -1
  57. package/src/components/form-designer/widget-panel/business/project-group-select.js +2 -3
  58. package/src/components/form-designer/widget-panel/business/project-select.js +2 -3
  59. package/src/components/form-designer/widget-panel/business/user-select.js +0 -1
  60. package/src/components/form-designer/widget-panel/containers/vf-dialog.js +3 -2
  61. package/src/components/form-designer/widget-panel/index.vue.js +4 -338
  62. package/src/components/form-designer/widget-panel/index.vue2.js +82 -0
  63. package/src/components/form-designer/widget-panel/widgetsConfig.js +19 -18
  64. package/src/components/form-render/RenderWigetList.vue.js +61 -0
  65. package/src/components/form-render/RenderWigetList.vue2.js +4 -0
  66. package/src/components/form-render/SubmitButtonRender.vue.js +41 -29
  67. package/src/components/form-render/container-item/container-item-wrapper.vue.js +2 -23
  68. package/src/components/form-render/container-item/container-item-wrapper.vue2.js +20 -0
  69. package/src/components/form-render/container-item/data-table-item.vue.js +22 -36
  70. package/src/components/form-render/container-item/grid-item.vue.js +7 -7
  71. package/src/components/form-render/container-item/grid-sub-form-item.vue.js +1 -1
  72. package/src/components/form-render/container-item/sub-form-item.vue.js +115 -146
  73. package/src/components/form-render/container-item/tab-item.vue.js +19 -19
  74. package/src/components/form-render/container-item/table-item.vue.js +7 -7
  75. package/src/components/form-render/container-item/vf-collapse-item.vue.js +27 -27
  76. package/src/components/form-render/dynamic-dialog.vue.js +87 -86
  77. package/src/components/form-render/index.vue.js +94 -110
  78. package/src/components/public/ActionButtonListDialog.vue.js +82 -75
  79. package/src/components/public/ActionButtonListDialog.vue2.js +16 -10
  80. package/src/components/public/ActionButtonListRender.vue.js +12 -11
  81. package/src/components/public/CustomerModal/CustomerModal.vue2.js +49 -42
  82. package/src/hooks/useLowcode.js +40 -39
  83. package/src/lang/en-US.js +5 -1
  84. package/src/lang/zh-CN.js +5 -1
  85. package/src/mixins/useDataTableMixin.js +29 -31
  86. package/src/utils/asyncExecuteFunction.js +4 -0
  87. package/stats.html +1 -1
  88. package/styles/style.css +1 -1
  89. package/src/components/form-designer/setting-panel/property-editor/labelTooltip-editor.vue.js +0 -31
  90. package/src/components/form-designer/widget-panel/templatesConfig.js +0 -53
@@ -1,13 +1,13 @@
1
- import { SvgIcon as C } from "tmgc2-share";
2
- import F from "../../../../utils/i18n.js";
3
- import { resolveComponent as b, createElementBlock as n, openBlock as l, normalizeClass as y, createBlock as v, createCommentVNode as c, withModifiers as u, withCtx as r, renderSlot as I, createElementVNode as a, Fragment as g, createVNode as s, toDisplayString as m } from "vue";
1
+ import { SvgIcon as F } from "tmgc2-share";
2
+ import C from "../../../../utils/i18n.js";
3
+ import { resolveComponent as c, createElementBlock as l, openBlock as s, normalizeClass as u, createBlock as W, createCommentVNode as r, withModifiers as m, withCtx as b, renderSlot as _, createElementVNode as a, Fragment as f, createVNode as o, toDisplayString as h } from "vue";
4
4
  /* empty css */
5
- import W from "../../../../../_virtual/_plugin-vue_export-helper.js";
6
- const k = {
5
+ import p from "../../../../../_virtual/_plugin-vue_export-helper.js";
6
+ const y = {
7
7
  name: "form-item-wrapper",
8
- mixins: [F],
8
+ mixins: [C],
9
9
  components: {
10
- SvgIcon: C
10
+ SvgIcon: F
11
11
  },
12
12
  props: {
13
13
  field: Object,
@@ -57,8 +57,8 @@ const k = {
57
57
  return this.field.options.size ? this.field.options.size : this.designer ? this.designer.formConfig.size || "middle" : this.formConfig.size || "middle";
58
58
  },
59
59
  customClass() {
60
- var i;
61
- return ((i = this.field.options.customClass) == null ? void 0 : i.join(" ")) || "";
60
+ var t;
61
+ return ((t = this.field.options.customClass) == null ? void 0 : t.join(" ")) || "";
62
62
  },
63
63
  subFormName() {
64
64
  return this.getSubFormName ? this.getSubFormName() : "";
@@ -82,8 +82,8 @@ const k = {
82
82
  // }
83
83
  // return false;
84
84
  // },
85
- selectField(i) {
86
- this.designer && (this.designer.setSelected(i), this.designer.emitEvent("field-selected", this.parentWidget));
85
+ selectField(t) {
86
+ this.designer && (this.designer.setSelected(t), this.designer.emitEvent("field-selected", this.parentWidget));
87
87
  },
88
88
  selectParentWidget() {
89
89
  this.parentWidget ? this.designer.setSelected(this.parentWidget) : this.designer.clearSelected();
@@ -96,9 +96,9 @@ const k = {
96
96
  },
97
97
  removeFieldWidget() {
98
98
  if (this.parentList) {
99
- let i = null;
100
- this.parentList.length === 1 ? this.parentWidget && (i = this.parentWidget) : this.parentList.length === 1 + this.indexOfParentList ? i = this.parentList[this.indexOfParentList - 1] : i = this.parentList[this.indexOfParentList + 1], this.$nextTick(() => {
101
- this.parentList.splice(this.indexOfParentList, 1), this.designer.setSelected(i), this.designer.emitHistoryChange();
99
+ let t = null;
100
+ this.parentList.length === 1 ? this.parentWidget && (t = this.parentWidget) : this.parentList.length === 1 + this.indexOfParentList ? t = this.parentList[this.indexOfParentList - 1] : t = this.parentList[this.indexOfParentList + 1], this.$nextTick(() => {
101
+ this.parentList.splice(this.indexOfParentList, 1), this.designer.setSelected(t), this.designer.emitHistoryChange();
102
102
  });
103
103
  }
104
104
  },
@@ -106,172 +106,104 @@ const k = {
106
106
  return this.subFormItemFlag && !this.designState ? this.subFormName + "." + this.subFormRowIndex + "." + this.field.options.name : this.field.options.name;
107
107
  }
108
108
  }
109
- }, x = { class: "label-box" }, S = {
109
+ }, k = { class: "label-box" }, L = {
110
110
  key: 0,
111
111
  class: "custom-label"
112
- }, L = { class: "label-text" }, p = { class: "label-text" }, z = { class: "label-text" }, w = { class: "label-text" }, P = { class: "label-text" }, N = {
112
+ }, I = { class: "label-text" }, S = { class: "label-text" }, x = {
113
+ key: 1,
114
+ class: "label-text"
115
+ }, w = {
113
116
  key: 0,
114
117
  class: "field-action"
115
- }, A = ["title"], O = ["title"], H = ["title"], T = ["title"], j = {
118
+ }, P = ["title"], N = ["title"], A = ["title"], O = ["title"], z = {
116
119
  key: 1,
117
120
  class: "drag-handler background-opacity"
118
- }, D = ["title"], B = { key: 0 };
119
- function U(i, d, e, E, R, t) {
120
- const o = b("svg-icon"), f = b("a-tooltip"), _ = b("a-form-item");
121
- return l(), n("div", {
122
- class: y(["field-wrapper", { "design-time-bottom-margin": !!this.designer }])
121
+ }, H = ["title"], j = { key: 0 };
122
+ function D(t, n, e, B, U, i) {
123
+ const d = c("svg-icon"), v = c("a-form-item");
124
+ return s(), l("div", {
125
+ class: u(["field-wrapper", { "design-time-bottom-margin": !!this.designer }])
123
126
  }, [
124
- e.field.formItemFlag ? (l(), v(_, {
127
+ e.field.formItemFlag ? (s(), W(v, {
125
128
  key: 0,
126
- labelCol: { style: { width: t.labelWidth + "px" } },
127
- title: e.field.options.labelTooltip,
128
- size: t.size,
129
+ labelCol: { style: { width: i.labelWidth + "px" } },
130
+ title: i.label,
131
+ size: i.size,
129
132
  rules: e.rules,
130
- name: t.getPropName(),
131
- labelAlign: t.labelAlign,
132
- class: y([t.selected ? "selected" : "", t.customClass]),
133
- onClick: d[0] || (d[0] = u((h) => t.selectField(e.field), ["stop"]))
133
+ name: i.getPropName(),
134
+ labelAlign: i.labelAlign,
135
+ class: u([i.selected ? "selected" : "", i.customClass]),
136
+ onClick: n[0] || (n[0] = m((g) => i.selectField(e.field), ["stop"]))
134
137
  }, {
135
- label: r(() => [
136
- a("div", x, [
137
- e.field.options.labelIconClass ? (l(), n("span", S, [
138
- e.field.options.labelIconPosition === "front" ? (l(), n(g, { key: 0 }, [
139
- e.field.options.labelTooltip ? (l(), n(g, { key: 0 }, [
140
- s(f, {
141
- title: e.field.options.labelTooltip,
142
- overlayStyle: { zIndex: 1e3 }
143
- }, {
144
- default: r(() => [
145
- s(o, {
146
- "icon-class": e.field.options.labelIconClass
147
- }, null, 8, ["icon-class"])
148
- ]),
149
- _: 1
150
- }, 8, ["title"]),
151
- s(f, {
152
- title: t.label,
153
- overlayStyle: { zIndex: 1e3 }
154
- }, {
155
- default: r(() => [
156
- a("div", L, m(t.label), 1)
157
- ]),
158
- _: 1
159
- }, 8, ["title"])
160
- ], 64)) : (l(), n(g, { key: 1 }, [
161
- s(o, {
162
- "icon-class": e.field.options.labelIconClass
163
- }, null, 8, ["icon-class"]),
164
- s(f, {
165
- title: t.label,
166
- overlayStyle: { zIndex: 1e3 }
167
- }, {
168
- default: r(() => [
169
- a("div", p, m(t.label), 1)
170
- ]),
171
- _: 1
172
- }, 8, ["title"])
173
- ], 64))
174
- ], 64)) : e.field.options.labelIconPosition === "rear" ? (l(), n(g, { key: 1 }, [
175
- e.field.options.labelTooltip ? (l(), n(g, { key: 0 }, [
176
- s(f, {
177
- title: t.label,
178
- overlayStyle: { zIndex: 1e3 }
179
- }, {
180
- default: r(() => [
181
- a("div", z, m(t.label), 1)
182
- ]),
183
- _: 1
184
- }, 8, ["title"]),
185
- s(f, {
186
- title: e.field.options.labelTooltip,
187
- overlayStyle: { zIndex: 1e3 }
188
- }, {
189
- default: r(() => [
190
- s(o, {
191
- "icon-class": e.field.options.labelIconClass
192
- }, null, 8, ["icon-class"])
193
- ]),
194
- _: 1
195
- }, 8, ["title"])
196
- ], 64)) : (l(), n(g, { key: 1 }, [
197
- s(f, {
198
- title: t.label,
199
- overlayStyle: { zIndex: 1e3 }
200
- }, {
201
- default: r(() => [
202
- a("div", w, m(t.label), 1)
203
- ]),
204
- _: 1
205
- }, 8, ["title"]),
206
- s(o, {
207
- "icon-class": e.field.options.labelIconClass
208
- }, null, 8, ["icon-class"])
209
- ], 64))
210
- ], 64)) : c("", !0)
211
- ])) : (l(), v(f, {
212
- key: 1,
213
- title: t.label,
214
- overlayStyle: { zIndex: 1e3 }
215
- }, {
216
- default: r(() => [
217
- a("div", P, m(t.label), 1)
218
- ]),
219
- _: 1
220
- }, 8, ["title"]))
138
+ label: b(() => [
139
+ a("div", k, [
140
+ e.field.options.labelIconClass ? (s(), l("span", L, [
141
+ e.field.options.labelIconPosition === "front" ? (s(), l(f, { key: 0 }, [
142
+ o(d, {
143
+ "icon-class": e.field.options.labelIconClass
144
+ }, null, 8, ["icon-class"]),
145
+ a("div", I, h(i.label), 1)
146
+ ], 64)) : e.field.options.labelIconPosition === "rear" ? (s(), l(f, { key: 1 }, [
147
+ a("div", S, h(i.label), 1),
148
+ o(d, {
149
+ "icon-class": e.field.options.labelIconClass
150
+ }, null, 8, ["icon-class"])
151
+ ], 64)) : r("", !0)
152
+ ])) : (s(), l("div", x, h(i.label), 1))
221
153
  ])
222
154
  ]),
223
- default: r(() => [
224
- I(i.$slots, "default", {}, void 0, !0)
155
+ default: b(() => [
156
+ _(t.$slots, "default", {}, void 0, !0)
225
157
  ]),
226
158
  _: 3
227
- }, 8, ["labelCol", "title", "size", "rules", "name", "labelAlign", "class"])) : c("", !0),
228
- this.designer ? (l(), n(g, { key: 1 }, [
229
- e.designer.selectedId === e.field.id ? (l(), n("div", N, [
159
+ }, 8, ["labelCol", "title", "size", "rules", "name", "labelAlign", "class"])) : r("", !0),
160
+ this.designer ? (s(), l(f, { key: 1 }, [
161
+ e.designer.selectedId === e.field.id ? (s(), l("div", w, [
230
162
  a("i", {
231
- title: i.i18nt("designer.hint.selectParentWidget"),
232
- onClick: d[1] || (d[1] = u((h) => t.selectParentWidget(e.field), ["stop"]))
163
+ title: t.i18nt("designer.hint.selectParentWidget"),
164
+ onClick: n[1] || (n[1] = m((g) => i.selectParentWidget(e.field), ["stop"]))
233
165
  }, [
234
- s(o, { "icon-class": "icon-el-back" })
235
- ], 8, A),
236
- e.parentList && e.parentList.length > 1 ? (l(), n("i", {
166
+ o(d, { "icon-class": "icon-el-back" })
167
+ ], 8, P),
168
+ e.parentList && e.parentList.length > 1 ? (s(), l("i", {
237
169
  key: 0,
238
- title: i.i18nt("designer.hint.moveUpWidget"),
239
- onClick: d[2] || (d[2] = u((h) => t.moveUpWidget(e.field), ["stop"]))
170
+ title: t.i18nt("designer.hint.moveUpWidget"),
171
+ onClick: n[2] || (n[2] = m((g) => i.moveUpWidget(e.field), ["stop"]))
240
172
  }, [
241
- s(o, { "icon-class": "icon-el-move-up" })
242
- ], 8, O)) : c("", !0),
243
- e.parentList && e.parentList.length > 1 ? (l(), n("i", {
173
+ o(d, { "icon-class": "icon-el-move-up" })
174
+ ], 8, N)) : r("", !0),
175
+ e.parentList && e.parentList.length > 1 ? (s(), l("i", {
244
176
  key: 1,
245
- title: i.i18nt("designer.hint.moveDownWidget"),
246
- onClick: d[3] || (d[3] = u((h) => t.moveDownWidget(e.field), ["stop"]))
177
+ title: t.i18nt("designer.hint.moveDownWidget"),
178
+ onClick: n[3] || (n[3] = m((g) => i.moveDownWidget(e.field), ["stop"]))
247
179
  }, [
248
- s(o, { "icon-class": "icon-el-move-down" })
249
- ], 8, H)) : c("", !0),
180
+ o(d, { "icon-class": "icon-el-move-down" })
181
+ ], 8, A)) : r("", !0),
250
182
  a("i", {
251
- title: i.i18nt("designer.hint.remove"),
252
- onClick: d[4] || (d[4] = u((...h) => t.removeFieldWidget && t.removeFieldWidget(...h), ["stop"]))
183
+ title: t.i18nt("designer.hint.remove"),
184
+ onClick: n[4] || (n[4] = m((...g) => i.removeFieldWidget && i.removeFieldWidget(...g), ["stop"]))
253
185
  }, [
254
- s(o, { "icon-class": "icon-el-delete" })
255
- ], 8, T)
256
- ])) : c("", !0),
257
- e.designer.selectedId === e.field.id ? (l(), n("div", j, [
186
+ o(d, { "icon-class": "icon-el-delete" })
187
+ ], 8, O)
188
+ ])) : r("", !0),
189
+ e.designer.selectedId === e.field.id ? (s(), l("div", z, [
258
190
  a("i", {
259
- title: i.i18nt("designer.hint.dragHandler")
191
+ title: t.i18nt("designer.hint.dragHandler")
260
192
  }, [
261
- s(o, { "icon-class": "icon-el-drag-move" })
262
- ], 8, D),
263
- a("i", null, m(i.i18n2t(
193
+ o(d, { "icon-class": "icon-el-drag-move" })
194
+ ], 8, H),
195
+ a("i", null, h(t.i18n2t(
264
196
  `designer.widgetLabel.${e.field.type}`,
265
197
  `extension.widgetLabel.${e.field.type}`
266
198
  )), 1),
267
- e.field.options.hidden === !0 ? (l(), n("i", B, [
268
- s(o, { "icon-class": "icon-el-hide" })
269
- ])) : c("", !0)
270
- ])) : c("", !0)
271
- ], 64)) : c("", !0)
199
+ e.field.options.hidden === !0 ? (s(), l("i", j, [
200
+ o(d, { "icon-class": "icon-el-hide" })
201
+ ])) : r("", !0)
202
+ ])) : r("", !0)
203
+ ], 64)) : r("", !0)
272
204
  ], 2);
273
205
  }
274
- const K = /* @__PURE__ */ W(k, [["render", U], ["__scopeId", "data-v-c2f3bcb4"]]);
206
+ const q = /* @__PURE__ */ p(y, [["render", D], ["__scopeId", "data-v-30542ff6"]]);
275
207
  export {
276
- K as default
208
+ q as default
277
209
  };
@@ -1,16 +1,16 @@
1
- import g from "./form-item-wrapper.vue.js";
2
- import { SvgIcon as w } from "tmgc2-share";
3
- import b from "../../../../utils/emitter.js";
4
- import C from "../../../../utils/i18n.js";
5
- import y from "./fieldMixin.js";
6
- import { resolveComponent as n, createBlock as s, createCommentVNode as r, openBlock as a, withCtx as i, withDirectives as _, createVNode as u, createSlots as v, vShow as F, createElementVNode as x, toDisplayString as I } from "vue";
1
+ import h from "./form-item-wrapper.vue.js";
2
+ import { SvgIcon as c } from "tmgc2-share";
3
+ import g from "../../../../utils/emitter.js";
4
+ import w from "../../../../utils/i18n.js";
5
+ import b from "./fieldMixin.js";
6
+ import { resolveComponent as i, createBlock as C, createCommentVNode as l, openBlock as s, withCtx as r, withDirectives as y, createElementBlock as v, createVNode as a, createSlots as F, vShow as x, toDisplayString as I } from "vue";
7
7
  /* empty css */
8
- import M from "../../../../../_virtual/_plugin-vue_export-helper.js";
9
- const z = {
8
+ import _ from "../../../../../_virtual/_plugin-vue_export-helper.js";
9
+ const M = {
10
10
  name: "input-widget",
11
11
  componentName: "FieldWidget",
12
12
  //必须固定为FieldWidget,用于接收父级组件的broadcast事件
13
- mixins: [b, y, C],
13
+ mixins: [g, b, w],
14
14
  props: {
15
15
  field: Object,
16
16
  parentWidget: Object,
@@ -38,8 +38,8 @@ const z = {
38
38
  }
39
39
  },
40
40
  components: {
41
- FormItemWrapper: g,
42
- SvgIcon: w
41
+ FormItemWrapper: h,
42
+ SvgIcon: c
43
43
  },
44
44
  data() {
45
45
  return {
@@ -69,14 +69,17 @@ const z = {
69
69
  this.unregisterFromRefList();
70
70
  },
71
71
  methods: {}
72
- }, R = { class: "readonly-mode-field" };
73
- function k(t, d, e, L, o, l) {
74
- const f = n("svg-icon"), m = n("a-input"), p = n("a-tooltip"), h = n("form-item-wrapper");
75
- return t.handleHidden() ? r("", !0) : (a(), s(h, {
72
+ }, k = {
73
+ key: 0,
74
+ class: "readonly-mode-field"
75
+ };
76
+ function R(t, o, e, z, n, d) {
77
+ const u = i("svg-icon"), f = i("a-input"), m = i("form-item-wrapper");
78
+ return t.handleHidden() ? l("", !0) : (s(), C(m, {
76
79
  key: 0,
77
80
  designer: e.designer,
78
81
  field: e.field,
79
- rules: o.rules,
82
+ rules: n.rules,
80
83
  "design-state": e.designState,
81
84
  "parent-widget": e.parentWidget,
82
85
  "parent-list": e.parentList,
@@ -85,16 +88,16 @@ function k(t, d, e, L, o, l) {
85
88
  "sub-form-col-index": e.subFormColIndex,
86
89
  "sub-form-row-id": e.subFormRowId
87
90
  }, {
88
- default: i(() => [
89
- _(u(m, {
91
+ default: r(() => [
92
+ y(a(f, {
90
93
  ref: "fieldEditor",
91
- value: o.fieldModel,
92
- "onUpdate:value": d[0] || (d[0] = (c) => o.fieldModel = c),
94
+ value: n.fieldModel,
95
+ "onUpdate:value": o[0] || (o[0] = (p) => n.fieldModel = p),
93
96
  disabled: t.handleDisabled(),
94
97
  readonly: e.field.options.readonly,
95
- size: l.size,
98
+ size: d.size,
96
99
  class: "hide-spin-button",
97
- type: l.inputType,
100
+ type: d.inputType,
98
101
  "show-password": e.field.options.showPassword,
99
102
  placeholder: e.field.options.placeholder,
100
103
  allowClear: e.field.options.allowClear,
@@ -104,11 +107,11 @@ function k(t, d, e, L, o, l) {
104
107
  onBlur: t.handleBlurCustomEvent,
105
108
  onInput: t.handleInputCustomEvent,
106
109
  onChange: t.handleChangeEvent
107
- }, v({ _: 2 }, [
110
+ }, F({ _: 2 }, [
108
111
  e.field.options.useModal ? {
109
112
  name: "addonAfter",
110
- fn: i(() => [
111
- u(f, {
113
+ fn: r(() => [
114
+ a(u, {
112
115
  "icon-class": "icon-sousuo",
113
116
  onClick: t.handleClickIcon
114
117
  }, null, 8, ["onClick"])
@@ -116,24 +119,14 @@ function k(t, d, e, L, o, l) {
116
119
  key: "0"
117
120
  } : void 0
118
121
  ]), 1032, ["value", "disabled", "readonly", "size", "type", "show-password", "placeholder", "allowClear", "maxlength", "showCount", "onFocus", "onBlur", "onInput", "onChange"]), [
119
- [F, !t.isReadMode]
122
+ [x, !t.isReadMode]
120
123
  ]),
121
- t.isReadMode ? (a(), s(p, {
122
- key: 0,
123
- placement: "topLeft",
124
- title: o.fieldModel,
125
- overlayStyle: { zIndex: 1e3 }
126
- }, {
127
- default: i(() => [
128
- x("span", R, I(o.fieldModel), 1)
129
- ]),
130
- _: 1
131
- }, 8, ["title"])) : r("", !0)
124
+ t.isReadMode ? (s(), v("span", k, I(n.fieldModel), 1)) : l("", !0)
132
125
  ]),
133
126
  _: 1
134
127
  }, 8, ["designer", "field", "rules", "design-state", "parent-widget", "parent-list", "index-of-parent-list", "sub-form-row-index", "sub-form-col-index", "sub-form-row-id"]));
135
128
  }
136
- const D = /* @__PURE__ */ M(z, [["render", k], ["__scopeId", "data-v-f16608cb"]]);
129
+ const D = /* @__PURE__ */ _(M, [["render", R], ["__scopeId", "data-v-10f4a56c"]]);
137
130
  export {
138
131
  D as default
139
132
  };
@@ -1,15 +1,15 @@
1
- import c from "./form-item-wrapper.vue.js";
2
- import h from "../../../../utils/emitter.js";
3
- import b from "../../../../utils/i18n.js";
4
- import g from "./fieldMixin.js";
5
- import { resolveComponent as o, createBlock as d, createCommentVNode as r, openBlock as l, withCtx as s, withDirectives as w, createVNode as _, vShow as x, createElementVNode as F, toDisplayString as C } from "vue";
1
+ import u from "./form-item-wrapper.vue.js";
2
+ import f from "../../../../utils/emitter.js";
3
+ import p from "../../../../utils/i18n.js";
4
+ import c from "./fieldMixin.js";
5
+ import { resolveComponent as o, createBlock as h, createCommentVNode as d, openBlock as r, withCtx as b, withDirectives as g, createElementBlock as w, createVNode as F, vShow as x, toDisplayString as C } from "vue";
6
6
  /* empty css */
7
- import v from "../../../../../_virtual/_plugin-vue_export-helper.js";
8
- const y = {
7
+ import _ from "../../../../../_virtual/_plugin-vue_export-helper.js";
8
+ const v = {
9
9
  name: "number-widget",
10
10
  componentName: "FieldWidget",
11
11
  //必须固定为FieldWidget,用于接收父级组件的broadcast事件
12
- mixins: [h, g, b],
12
+ mixins: [f, c, p],
13
13
  props: {
14
14
  field: Object,
15
15
  parentWidget: Object,
@@ -37,7 +37,7 @@ const y = {
37
37
  }
38
38
  },
39
39
  components: {
40
- FormItemWrapper: c
40
+ FormItemWrapper: u
41
41
  },
42
42
  data() {
43
43
  return {
@@ -64,10 +64,13 @@ const y = {
64
64
  this.unregisterFromRefList();
65
65
  },
66
66
  methods: {}
67
- }, M = { class: "readonly-mode-field" };
68
- function z(i, n, e, I, t, a) {
69
- const m = o("a-input-number"), u = o("a-tooltip"), f = o("form-item-wrapper");
70
- return i.handleHidden() ? r("", !0) : (l(), d(f, {
67
+ }, y = {
68
+ key: 0,
69
+ class: "readonly-mode-field"
70
+ };
71
+ function M(i, n, e, R, t, s) {
72
+ const l = o("a-input-number"), a = o("form-item-wrapper");
73
+ return i.handleHidden() ? d("", !0) : (r(), h(a, {
71
74
  key: 0,
72
75
  designer: e.designer,
73
76
  field: e.field,
@@ -80,12 +83,12 @@ function z(i, n, e, I, t, a) {
80
83
  "sub-form-col-index": e.subFormColIndex,
81
84
  "sub-form-row-id": e.subFormRowId
82
85
  }, {
83
- default: s(() => [
84
- w(_(m, {
86
+ default: b(() => [
87
+ g(F(l, {
85
88
  ref: "fieldEditor",
86
- size: a.size,
89
+ size: s.size,
87
90
  value: t.fieldModel,
88
- "onUpdate:value": n[0] || (n[0] = (p) => t.fieldModel = p),
91
+ "onUpdate:value": n[0] || (n[0] = (m) => t.fieldModel = m),
89
92
  class: "full-width-input",
90
93
  disabled: i.handleDisabled(),
91
94
  "controls-position": e.field.options.controlsPosition,
@@ -100,22 +103,12 @@ function z(i, n, e, I, t, a) {
100
103
  }, null, 8, ["size", "value", "disabled", "controls-position", "placeholder", "min", "max", "precision", "step", "onFocus", "onBlur", "onChange"]), [
101
104
  [x, !i.isReadMode]
102
105
  ]),
103
- i.isReadMode ? (l(), d(u, {
104
- key: 0,
105
- placement: "topLeft",
106
- title: t.fieldModel,
107
- overlayStyle: { zIndex: 1e3 }
108
- }, {
109
- default: s(() => [
110
- F("span", M, C(t.fieldModel), 1)
111
- ]),
112
- _: 1
113
- }, 8, ["title"])) : r("", !0)
106
+ i.isReadMode ? (r(), w("span", y, C(t.fieldModel), 1)) : d("", !0)
114
107
  ]),
115
108
  _: 1
116
109
  }, 8, ["designer", "field", "rules", "design-state", "parent-widget", "parent-list", "index-of-parent-list", "sub-form-row-index", "sub-form-col-index", "sub-form-row-id"]));
117
110
  }
118
- const W = /* @__PURE__ */ v(y, [["render", z], ["__scopeId", "data-v-87ed8e36"]]);
111
+ const k = /* @__PURE__ */ _(v, [["render", M], ["__scopeId", "data-v-068cbf85"]]);
119
112
  export {
120
- W as default
113
+ k as default
121
114
  };