@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.
- package/package.json +1 -1
- package/src/components/FormRender/useFormRender.js +18 -0
- package/src/components/form-designer/designer.js +78 -75
- package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue.js +18 -18
- package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue2.js +18 -20
- package/src/components/form-designer/form-widget/container-widget/vf-box-item.vue.js +9 -9
- package/src/components/form-designer/form-widget/container-widget/vf-dialog-widget.vue.js +29 -21
- package/src/components/form-designer/form-widget/field-widget/cascader-widget.vue.js +32 -39
- package/src/components/form-designer/form-widget/field-widget/date-range-widget.vue.js +24 -31
- package/src/components/form-designer/form-widget/field-widget/date-widget.vue.js +26 -33
- package/src/components/form-designer/form-widget/field-widget/diy-compontent-widget.vue.js +4 -4
- package/src/components/form-designer/form-widget/field-widget/fieldMixin.js +4 -1
- package/src/components/form-designer/form-widget/field-widget/form-item-wrapper.vue.js +84 -152
- package/src/components/form-designer/form-widget/field-widget/input-widget.vue.js +31 -38
- package/src/components/form-designer/form-widget/field-widget/number-widget.vue.js +23 -30
- package/src/components/form-designer/form-widget/field-widget/select-widget.vue.js +56 -63
- package/src/components/form-designer/form-widget/field-widget/switch-widget.vue.js +1 -1
- package/src/components/form-designer/form-widget/field-widget/textarea-widget.vue.js +23 -32
- package/src/components/form-designer/form-widget/field-widget/treeSelect-widget.vue.js +26 -33
- package/src/components/form-designer/setting-panel/form-setting.vue.js +2 -2
- package/src/components/form-designer/setting-panel/form-setting.vue2.js +81 -94
- package/src/components/form-designer/setting-panel/index.vue.js +2 -2
- package/src/components/form-designer/setting-panel/index.vue2.js +135 -135
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-colorRow-editor.vue2.js +8 -7
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-dsEnabled-editor.vue.js +23 -22
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +3 -3
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue2.js +7 -7
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/formCode-editor.vue.js +25 -19
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/line-height-editor.vue2.js +7 -6
- package/src/components/form-designer/setting-panel/property-editor/index.js +41 -42
- package/src/components/form-designer/setting-panel/propertyRegister.js +3 -6
- package/src/components/form-designer/widget-panel/PanelItemDrag.vue.js +50 -0
- package/src/components/form-designer/widget-panel/PanelItemDrag.vue2.js +4 -0
- package/src/components/form-designer/widget-panel/advanced/cascader.js +0 -1
- package/src/components/form-designer/widget-panel/advanced/data-table.js +1 -1
- package/src/components/form-designer/widget-panel/advanced/file-upload.js +0 -1
- package/src/components/form-designer/widget-panel/advanced/rich-editor.js +4 -5
- package/src/components/form-designer/widget-panel/advanced/tree-select.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/checkbox.js +2 -3
- package/src/components/form-designer/widget-panel/basicFields/color.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/date.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/dateRange.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/input.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/number.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/radio.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/rate.js +5 -6
- package/src/components/form-designer/widget-panel/basicFields/select.js +2 -3
- package/src/components/form-designer/widget-panel/basicFields/slider.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/switch.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/textarea.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/time.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/timeRange.js +0 -1
- package/src/components/form-designer/widget-panel/business/department-select.js +0 -1
- package/src/components/form-designer/widget-panel/business/material-select.js +0 -1
- package/src/components/form-designer/widget-panel/business/operation-select.js +2 -3
- package/src/components/form-designer/widget-panel/business/post-select.js +0 -1
- package/src/components/form-designer/widget-panel/business/project-group-select.js +2 -3
- package/src/components/form-designer/widget-panel/business/project-select.js +2 -3
- package/src/components/form-designer/widget-panel/business/user-select.js +0 -1
- package/src/components/form-designer/widget-panel/containers/vf-dialog.js +3 -2
- package/src/components/form-designer/widget-panel/index.vue.js +4 -338
- package/src/components/form-designer/widget-panel/index.vue2.js +82 -0
- package/src/components/form-designer/widget-panel/widgetsConfig.js +19 -18
- package/src/components/form-render/RenderWigetList.vue.js +61 -0
- package/src/components/form-render/RenderWigetList.vue2.js +4 -0
- package/src/components/form-render/SubmitButtonRender.vue.js +41 -29
- package/src/components/form-render/container-item/container-item-wrapper.vue.js +2 -23
- package/src/components/form-render/container-item/container-item-wrapper.vue2.js +20 -0
- package/src/components/form-render/container-item/data-table-item.vue.js +22 -36
- package/src/components/form-render/container-item/grid-item.vue.js +7 -7
- package/src/components/form-render/container-item/grid-sub-form-item.vue.js +1 -1
- package/src/components/form-render/container-item/sub-form-item.vue.js +115 -146
- package/src/components/form-render/container-item/tab-item.vue.js +19 -19
- package/src/components/form-render/container-item/table-item.vue.js +7 -7
- package/src/components/form-render/container-item/vf-collapse-item.vue.js +27 -27
- package/src/components/form-render/dynamic-dialog.vue.js +87 -86
- package/src/components/form-render/index.vue.js +94 -110
- package/src/components/public/ActionButtonListDialog.vue.js +82 -75
- package/src/components/public/ActionButtonListDialog.vue2.js +16 -10
- package/src/components/public/ActionButtonListRender.vue.js +12 -11
- package/src/components/public/CustomerModal/CustomerModal.vue2.js +49 -42
- package/src/hooks/useLowcode.js +40 -39
- package/src/lang/en-US.js +5 -1
- package/src/lang/zh-CN.js +5 -1
- package/src/mixins/useDataTableMixin.js +29 -31
- package/src/utils/asyncExecuteFunction.js +4 -0
- package/stats.html +1 -1
- package/styles/style.css +1 -1
- package/src/components/form-designer/setting-panel/property-editor/labelTooltip-editor.vue.js +0 -31
- package/src/components/form-designer/widget-panel/templatesConfig.js +0 -53
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { SvgIcon as
|
|
2
|
-
import
|
|
3
|
-
import { resolveComponent as
|
|
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
|
|
6
|
-
const
|
|
5
|
+
import p from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
const y = {
|
|
7
7
|
name: "form-item-wrapper",
|
|
8
|
-
mixins: [
|
|
8
|
+
mixins: [C],
|
|
9
9
|
components: {
|
|
10
|
-
SvgIcon:
|
|
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
|
|
61
|
-
return ((
|
|
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(
|
|
86
|
-
this.designer && (this.designer.setSelected(
|
|
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
|
|
100
|
-
this.parentList.length === 1 ? this.parentWidget && (
|
|
101
|
-
this.parentList.splice(this.indexOfParentList, 1), this.designer.setSelected(
|
|
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
|
-
},
|
|
109
|
+
}, k = { class: "label-box" }, L = {
|
|
110
110
|
key: 0,
|
|
111
111
|
class: "custom-label"
|
|
112
|
-
},
|
|
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
|
-
},
|
|
118
|
+
}, P = ["title"], N = ["title"], A = ["title"], O = ["title"], z = {
|
|
116
119
|
key: 1,
|
|
117
120
|
class: "drag-handler background-opacity"
|
|
118
|
-
},
|
|
119
|
-
function
|
|
120
|
-
const
|
|
121
|
-
return
|
|
122
|
-
class:
|
|
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 ? (
|
|
127
|
+
e.field.formItemFlag ? (s(), W(v, {
|
|
125
128
|
key: 0,
|
|
126
|
-
labelCol: { style: { width:
|
|
127
|
-
title:
|
|
128
|
-
size:
|
|
129
|
+
labelCol: { style: { width: i.labelWidth + "px" } },
|
|
130
|
+
title: i.label,
|
|
131
|
+
size: i.size,
|
|
129
132
|
rules: e.rules,
|
|
130
|
-
name:
|
|
131
|
-
labelAlign:
|
|
132
|
-
class:
|
|
133
|
-
onClick:
|
|
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:
|
|
136
|
-
a("div",
|
|
137
|
-
e.field.options.labelIconClass ? (
|
|
138
|
-
e.field.options.labelIconPosition === "front" ? (
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
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:
|
|
224
|
-
|
|
155
|
+
default: b(() => [
|
|
156
|
+
_(t.$slots, "default", {}, void 0, !0)
|
|
225
157
|
]),
|
|
226
158
|
_: 3
|
|
227
|
-
}, 8, ["labelCol", "title", "size", "rules", "name", "labelAlign", "class"])) :
|
|
228
|
-
this.designer ? (
|
|
229
|
-
e.designer.selectedId === e.field.id ? (
|
|
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:
|
|
232
|
-
onClick:
|
|
163
|
+
title: t.i18nt("designer.hint.selectParentWidget"),
|
|
164
|
+
onClick: n[1] || (n[1] = m((g) => i.selectParentWidget(e.field), ["stop"]))
|
|
233
165
|
}, [
|
|
234
|
-
|
|
235
|
-
], 8,
|
|
236
|
-
e.parentList && e.parentList.length > 1 ? (
|
|
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:
|
|
239
|
-
onClick:
|
|
170
|
+
title: t.i18nt("designer.hint.moveUpWidget"),
|
|
171
|
+
onClick: n[2] || (n[2] = m((g) => i.moveUpWidget(e.field), ["stop"]))
|
|
240
172
|
}, [
|
|
241
|
-
|
|
242
|
-
], 8,
|
|
243
|
-
e.parentList && e.parentList.length > 1 ? (
|
|
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:
|
|
246
|
-
onClick:
|
|
177
|
+
title: t.i18nt("designer.hint.moveDownWidget"),
|
|
178
|
+
onClick: n[3] || (n[3] = m((g) => i.moveDownWidget(e.field), ["stop"]))
|
|
247
179
|
}, [
|
|
248
|
-
|
|
249
|
-
], 8,
|
|
180
|
+
o(d, { "icon-class": "icon-el-move-down" })
|
|
181
|
+
], 8, A)) : r("", !0),
|
|
250
182
|
a("i", {
|
|
251
|
-
title:
|
|
252
|
-
onClick:
|
|
183
|
+
title: t.i18nt("designer.hint.remove"),
|
|
184
|
+
onClick: n[4] || (n[4] = m((...g) => i.removeFieldWidget && i.removeFieldWidget(...g), ["stop"]))
|
|
253
185
|
}, [
|
|
254
|
-
|
|
255
|
-
], 8,
|
|
256
|
-
])) :
|
|
257
|
-
e.designer.selectedId === e.field.id ? (
|
|
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:
|
|
191
|
+
title: t.i18nt("designer.hint.dragHandler")
|
|
260
192
|
}, [
|
|
261
|
-
|
|
262
|
-
], 8,
|
|
263
|
-
a("i", null,
|
|
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 ? (
|
|
268
|
-
|
|
269
|
-
])) :
|
|
270
|
-
])) :
|
|
271
|
-
], 64)) :
|
|
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
|
|
206
|
+
const q = /* @__PURE__ */ p(y, [["render", D], ["__scopeId", "data-v-30542ff6"]]);
|
|
275
207
|
export {
|
|
276
|
-
|
|
208
|
+
q as default
|
|
277
209
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { SvgIcon as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { resolveComponent as
|
|
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
|
|
9
|
-
const
|
|
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: [
|
|
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:
|
|
42
|
-
SvgIcon:
|
|
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
|
-
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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:
|
|
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:
|
|
89
|
-
|
|
91
|
+
default: r(() => [
|
|
92
|
+
y(a(f, {
|
|
90
93
|
ref: "fieldEditor",
|
|
91
|
-
value:
|
|
92
|
-
"onUpdate:value":
|
|
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:
|
|
98
|
+
size: d.size,
|
|
96
99
|
class: "hide-spin-button",
|
|
97
|
-
type:
|
|
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
|
-
},
|
|
110
|
+
}, F({ _: 2 }, [
|
|
108
111
|
e.field.options.useModal ? {
|
|
109
112
|
name: "addonAfter",
|
|
110
|
-
fn:
|
|
111
|
-
u
|
|
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
|
-
[
|
|
122
|
+
[x, !t.isReadMode]
|
|
120
123
|
]),
|
|
121
|
-
t.isReadMode ? (
|
|
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
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { resolveComponent as o, createBlock as
|
|
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
|
|
8
|
-
const
|
|
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: [
|
|
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:
|
|
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
|
-
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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:
|
|
84
|
-
|
|
86
|
+
default: b(() => [
|
|
87
|
+
g(F(l, {
|
|
85
88
|
ref: "fieldEditor",
|
|
86
|
-
size:
|
|
89
|
+
size: s.size,
|
|
87
90
|
value: t.fieldModel,
|
|
88
|
-
"onUpdate:value": n[0] || (n[0] = (
|
|
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 ? (
|
|
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
|
|
111
|
+
const k = /* @__PURE__ */ _(v, [["render", M], ["__scopeId", "data-v-068cbf85"]]);
|
|
119
112
|
export {
|
|
120
|
-
|
|
113
|
+
k as default
|
|
121
114
|
};
|