@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,23 +1,23 @@
|
|
|
1
1
|
import M from "../../../utils/emitter.js";
|
|
2
|
-
import
|
|
3
|
-
import { deepClone as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { SvgIcon as
|
|
9
|
-
import { TpfConfirm as
|
|
10
|
-
import { resolveComponent as
|
|
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
|
|
13
|
-
const
|
|
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,
|
|
16
|
+
mixins: [M, T, N, V],
|
|
17
17
|
components: {
|
|
18
|
-
ContainerItemWrapper:
|
|
19
|
-
...
|
|
20
|
-
SvgIcon:
|
|
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" +
|
|
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" +
|
|
76
|
+
this.rowIdData.push("id" + _());
|
|
77
77
|
},
|
|
78
78
|
insertToRowIdData(e) {
|
|
79
|
-
this.rowIdData.splice(e, 0, "id" +
|
|
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((
|
|
99
|
-
i.push(this.cloneFieldSchema(
|
|
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 =
|
|
114
|
-
return t.id = e.type +
|
|
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((
|
|
142
|
-
|
|
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
|
-
|
|
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 =
|
|
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
|
-
},
|
|
205
|
+
}, U = { class: "action-header-column" }, G = { class: "action-label" }, J = {
|
|
206
206
|
key: 0,
|
|
207
207
|
class: "row-no-header-column"
|
|
208
|
-
},
|
|
208
|
+
}, K = {
|
|
209
209
|
key: 0,
|
|
210
210
|
class: "custom-label"
|
|
211
|
-
},
|
|
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
|
-
},
|
|
214
|
+
}, $ = {
|
|
215
215
|
key: 0,
|
|
216
216
|
class: "row-number-span"
|
|
217
|
-
},
|
|
218
|
-
function
|
|
219
|
-
const m =
|
|
220
|
-
return
|
|
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
|
-
|
|
222
|
+
g((o(), a("div", {
|
|
223
223
|
key: i.widget.id,
|
|
224
224
|
class: "sub-form-container"
|
|
225
225
|
}, [
|
|
226
|
-
|
|
226
|
+
d(v, { class: "header-row" }, {
|
|
227
227
|
default: r(() => [
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
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:
|
|
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:
|
|
237
|
+
onClick: l.addSubFormRow,
|
|
238
238
|
title: e.i18nt("render.hint.subFormAddActionHint")
|
|
239
239
|
}, {
|
|
240
240
|
default: r(() => [
|
|
241
|
-
|
|
242
|
-
|
|
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 ? (
|
|
248
|
-
|
|
249
|
-
])) :
|
|
250
|
-
(
|
|
251
|
-
key:
|
|
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
|
-
|
|
253
|
+
n.options.hidden ? w("", !0) : (o(), a("div", {
|
|
254
254
|
key: 0,
|
|
255
|
-
class:
|
|
256
|
-
|
|
257
|
-
|
|
255
|
+
class: j(["field-header-column", [
|
|
256
|
+
l.getLabelAlign(i.widget, n),
|
|
257
|
+
n.options.required ? "is-required" : ""
|
|
258
258
|
]]),
|
|
259
|
-
style:
|
|
259
|
+
style: A({ width: n.options.columnWidth })
|
|
260
260
|
}, [
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
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
|
-
|
|
308
|
-
|
|
309
|
-
|
|
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:
|
|
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:
|
|
285
|
+
onClick: l.addSubFormRow,
|
|
317
286
|
title: e.i18nt("render.hint.subFormAddActionHint")
|
|
318
287
|
}, {
|
|
319
288
|
default: r(() => [
|
|
320
|
-
|
|
321
|
-
|
|
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
|
-
(
|
|
298
|
+
(o(!0), a(f, null, y(s.rowIdData, (n, u) => (o(), D(v, {
|
|
330
299
|
class: "sub-form-row",
|
|
331
|
-
key:
|
|
300
|
+
key: n
|
|
332
301
|
}, {
|
|
333
302
|
default: r(() => [
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
disabled:
|
|
303
|
+
c("div", Z, [
|
|
304
|
+
c("div", W, [
|
|
305
|
+
g(d(F, {
|
|
306
|
+
disabled: s.actionDisabled || s.insertDisabled,
|
|
338
307
|
shape: "circle",
|
|
339
|
-
onClick: (
|
|
308
|
+
onClick: (b) => l.insertSubFormRow(u),
|
|
340
309
|
title: e.i18nt("render.hint.insertSubFormRow")
|
|
341
310
|
}, {
|
|
342
311
|
default: r(() => [
|
|
343
|
-
|
|
312
|
+
d(m, { "icon-class": "icon-el-plus" })
|
|
344
313
|
]),
|
|
345
314
|
_: 2
|
|
346
315
|
}, 1032, ["disabled", "onClick", "title"]), [
|
|
347
|
-
[
|
|
316
|
+
[S, !l.isReadMode]
|
|
348
317
|
]),
|
|
349
|
-
|
|
350
|
-
disabled:
|
|
318
|
+
g(d(F, {
|
|
319
|
+
disabled: s.actionDisabled || s.deleteDisabled,
|
|
351
320
|
shape: "circle",
|
|
352
|
-
onClick: (
|
|
321
|
+
onClick: (b) => l.deleteSubFormRow(u),
|
|
353
322
|
title: e.i18nt("render.hint.deleteSubFormRow")
|
|
354
323
|
}, {
|
|
355
324
|
default: r(() => [
|
|
356
|
-
|
|
325
|
+
d(m, { "icon-class": "icon-el-delete" })
|
|
357
326
|
]),
|
|
358
327
|
_: 2
|
|
359
328
|
}, 1032, ["disabled", "onClick", "title"]), [
|
|
360
|
-
[
|
|
329
|
+
[S, !l.isReadMode]
|
|
361
330
|
])
|
|
362
331
|
])
|
|
363
332
|
]),
|
|
364
|
-
i.widget.options.showRowNumber ? (
|
|
365
|
-
i.widget.options.showRowNumber ? (
|
|
366
|
-
])) :
|
|
367
|
-
(
|
|
368
|
-
key:
|
|
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
|
-
|
|
339
|
+
b.options.hidden ? w("", !0) : (o(), a("div", {
|
|
371
340
|
key: 0,
|
|
372
341
|
class: "sub-form-table-column hide-label",
|
|
373
|
-
style:
|
|
342
|
+
style: A({ width: b.options.columnWidth })
|
|
374
343
|
}, [
|
|
375
|
-
(
|
|
376
|
-
field:
|
|
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":
|
|
347
|
+
"index-of-parent-list": R,
|
|
379
348
|
"parent-widget": i.widget,
|
|
380
|
-
"sub-form-row-id":
|
|
381
|
-
"sub-form-row-index":
|
|
382
|
-
"sub-form-col-index":
|
|
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
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
disabled:
|
|
355
|
+
c("div", ee, [
|
|
356
|
+
c("div", te, [
|
|
357
|
+
g(d(F, {
|
|
358
|
+
disabled: s.actionDisabled || s.insertDisabled,
|
|
390
359
|
shape: "circle",
|
|
391
|
-
onClick: (
|
|
360
|
+
onClick: (b) => l.insertSubFormRow(u),
|
|
392
361
|
title: e.i18nt("render.hint.insertSubFormRow")
|
|
393
362
|
}, {
|
|
394
363
|
default: r(() => [
|
|
395
|
-
|
|
364
|
+
d(m, { "icon-class": "icon-el-plus" })
|
|
396
365
|
]),
|
|
397
366
|
_: 2
|
|
398
367
|
}, 1032, ["disabled", "onClick", "title"]), [
|
|
399
|
-
[
|
|
368
|
+
[S, !l.isReadMode]
|
|
400
369
|
]),
|
|
401
|
-
|
|
402
|
-
disabled:
|
|
370
|
+
g(d(F, {
|
|
371
|
+
disabled: s.actionDisabled || s.deleteDisabled,
|
|
403
372
|
shape: "circle",
|
|
404
|
-
onClick: (
|
|
373
|
+
onClick: (b) => l.deleteSubFormRow(u),
|
|
405
374
|
title: e.i18nt("render.hint.deleteSubFormRow")
|
|
406
375
|
}, {
|
|
407
376
|
default: r(() => [
|
|
408
|
-
|
|
377
|
+
d(m, { "icon-class": "icon-el-delete" })
|
|
409
378
|
]),
|
|
410
379
|
_: 2
|
|
411
380
|
}, 1032, ["disabled", "onClick", "title"]), [
|
|
412
|
-
[
|
|
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
|
-
[
|
|
389
|
+
[S, !i.widget.options.hidden]
|
|
421
390
|
])
|
|
422
391
|
]),
|
|
423
392
|
_: 1
|
|
424
393
|
}, 8, ["widget"]);
|
|
425
394
|
}
|
|
426
|
-
const
|
|
395
|
+
const be = /* @__PURE__ */ O(P, [["render", ie], ["__scopeId", "data-v-18c22eeb"]]);
|
|
427
396
|
export {
|
|
428
|
-
|
|
397
|
+
be as default
|
|
429
398
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import F from "../../../utils/emitter.js";
|
|
2
2
|
import x from "../../../utils/i18n.js";
|
|
3
3
|
import k from "../refMixin.js";
|
|
4
|
-
import I from "./container-item-wrapper.
|
|
4
|
+
import I from "./container-item-wrapper.vue2.js";
|
|
5
5
|
import R from "./containerItemMixin.js";
|
|
6
6
|
import L from "../../form-designer/form-widget/field-widget/index.js";
|
|
7
|
-
import { resolveComponent as f, createBlock as l, openBlock as o, withCtx as
|
|
7
|
+
import { resolveComponent as f, createBlock as l, openBlock as o, withCtx as r, withDirectives as N, createElementBlock as m, createVNode as B, normalizeClass as M, Fragment as w, renderList as c, resolveDynamicComponent as g, createSlots as h, renderSlot as v, mergeProps as C, vShow as O } from "vue";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import P from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
10
10
|
const S = {
|
|
11
11
|
name: "tab-item",
|
|
12
12
|
componentName: "ContainerItem",
|
|
13
|
-
mixins: [
|
|
13
|
+
mixins: [F, x, k, R],
|
|
14
14
|
components: {
|
|
15
15
|
ContainerItemWrapper: I,
|
|
16
16
|
...L
|
|
@@ -82,14 +82,14 @@ const S = {
|
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
84
|
function j(e, i, t, u, G, p) {
|
|
85
|
-
const
|
|
86
|
-
return o(), l(
|
|
87
|
-
default:
|
|
85
|
+
const _ = f("a-tab-pane"), T = f("a-tabs"), y = f("container-item-wrapper");
|
|
86
|
+
return o(), l(y, { widget: t.widget }, {
|
|
87
|
+
default: r(() => [
|
|
88
88
|
N((o(), m("div", {
|
|
89
89
|
key: t.widget.id,
|
|
90
90
|
class: "tab-container"
|
|
91
91
|
}, [
|
|
92
|
-
B(
|
|
92
|
+
B(T, {
|
|
93
93
|
ref: "fieldEditor",
|
|
94
94
|
activeKey: t.widget.options.activeTab,
|
|
95
95
|
"onUpdate:activeKey": i[0] || (i[0] = (n) => t.widget.options.activeTab = n),
|
|
@@ -99,13 +99,13 @@ function j(e, i, t, u, G, p) {
|
|
|
99
99
|
class: M([e.customClass]),
|
|
100
100
|
onTabClick: p.onTabClick
|
|
101
101
|
}, {
|
|
102
|
-
default:
|
|
103
|
-
(o(!0), m(w, null, c(p.visibleTabs, (n) => (o(), l(
|
|
102
|
+
default: r(() => [
|
|
103
|
+
(o(!0), m(w, null, c(p.visibleTabs, (n) => (o(), l(_, {
|
|
104
104
|
tab: n.options.label,
|
|
105
105
|
disabled: n.options.disabled,
|
|
106
106
|
key: n.options.label
|
|
107
107
|
}, {
|
|
108
|
-
default:
|
|
108
|
+
default: r(() => [
|
|
109
109
|
(o(!0), m(w, null, c(n.widgetList, (a, d) => (o(), m(w, null, [
|
|
110
110
|
a.category === "container" ? (o(), l(g(e.getComponentByContainer(a)), {
|
|
111
111
|
widget: a,
|
|
@@ -117,10 +117,10 @@ function j(e, i, t, u, G, p) {
|
|
|
117
117
|
"sub-form-row-index": t.subFormRowIndex,
|
|
118
118
|
"sub-form-col-index": t.subFormColIndex
|
|
119
119
|
}, h({ _: 2 }, [
|
|
120
|
-
c(Object.keys(e.$slots), (
|
|
121
|
-
name:
|
|
122
|
-
fn:
|
|
123
|
-
v(e.$slots,
|
|
120
|
+
c(Object.keys(e.$slots), (s) => ({
|
|
121
|
+
name: s,
|
|
122
|
+
fn: r((b) => [
|
|
123
|
+
v(e.$slots, s, C({ ref_for: !0 }, b), void 0, !0)
|
|
124
124
|
])
|
|
125
125
|
}))
|
|
126
126
|
]), 1032, ["widget", "parent-list", "index-of-parent-list", "parent-widget", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index"])) : (o(), l(g(a.type + "-widget"), {
|
|
@@ -133,10 +133,10 @@ function j(e, i, t, u, G, p) {
|
|
|
133
133
|
"sub-form-row-index": t.subFormRowIndex,
|
|
134
134
|
"sub-form-col-index": t.subFormColIndex
|
|
135
135
|
}, h({ _: 2 }, [
|
|
136
|
-
c(Object.keys(e.$slots), (
|
|
137
|
-
name:
|
|
138
|
-
fn:
|
|
139
|
-
v(e.$slots,
|
|
136
|
+
c(Object.keys(e.$slots), (s) => ({
|
|
137
|
+
name: s,
|
|
138
|
+
fn: r((b) => [
|
|
139
|
+
v(e.$slots, s, C({ ref_for: !0 }, b), void 0, !0)
|
|
140
140
|
])
|
|
141
141
|
}))
|
|
142
142
|
]), 1032, ["field", "parent-list", "index-of-parent-list", "parent-widget", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index"]))
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import p from "../../../utils/emitter.js";
|
|
2
2
|
import x from "../../../utils/i18n.js";
|
|
3
3
|
import I from "../refMixin.js";
|
|
4
|
-
import C from "./container-item-wrapper.
|
|
4
|
+
import C from "./container-item-wrapper.vue2.js";
|
|
5
5
|
import y from "./table-cell-item.vue.js";
|
|
6
6
|
import h from "./containerItemMixin.js";
|
|
7
7
|
import { resolveComponent as s, createBlock as c, openBlock as t, withCtx as u, withDirectives as F, createElementBlock as r, createElementVNode as f, normalizeClass as k, Fragment as n, renderList as i, createCommentVNode as R, createSlots as v, renderSlot as L, mergeProps as N, vShow as S } from "vue";
|
|
@@ -10,7 +10,7 @@ import j from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
|
10
10
|
const B = {
|
|
11
11
|
name: "table-item",
|
|
12
12
|
componentName: "ContainerItem",
|
|
13
|
-
mixins: [
|
|
13
|
+
mixins: [p, x, I, h],
|
|
14
14
|
components: {
|
|
15
15
|
ContainerItemWrapper: C,
|
|
16
16
|
TableCellItem: y
|
|
@@ -57,7 +57,7 @@ function M(o, E, e, O, V, z) {
|
|
|
57
57
|
class: k(["table-layout", [o.customClass]])
|
|
58
58
|
}, [
|
|
59
59
|
f("tbody", null, [
|
|
60
|
-
(t(!0), r(n, null, i(e.widget.rows, (m,
|
|
60
|
+
(t(!0), r(n, null, i(e.widget.rows, (m, _) => (t(), r("tr", {
|
|
61
61
|
key: m.id
|
|
62
62
|
}, [
|
|
63
63
|
(t(!0), r(n, null, i(m.cols, (d, l) => (t(), r(n, null, [
|
|
@@ -65,7 +65,7 @@ function M(o, E, e, O, V, z) {
|
|
|
65
65
|
widget: d,
|
|
66
66
|
key: l,
|
|
67
67
|
"parent-list": e.widget.cols,
|
|
68
|
-
"row-index":
|
|
68
|
+
"row-index": _,
|
|
69
69
|
"col-index": l,
|
|
70
70
|
"parent-widget": e.widget,
|
|
71
71
|
"sub-form-row-id": e.subFormRowId,
|
|
@@ -74,8 +74,8 @@ function M(o, E, e, O, V, z) {
|
|
|
74
74
|
}, v({ _: 2 }, [
|
|
75
75
|
i(Object.keys(o.$slots), (a) => ({
|
|
76
76
|
name: a,
|
|
77
|
-
fn: u((
|
|
78
|
-
L(o.$slots, a, N({ ref_for: !0 },
|
|
77
|
+
fn: u((g) => [
|
|
78
|
+
L(o.$slots, a, N({ ref_for: !0 }, g), void 0, !0)
|
|
79
79
|
])
|
|
80
80
|
}))
|
|
81
81
|
]), 1032, ["widget", "parent-list", "row-index", "col-index", "parent-widget", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index"]))
|