@kp-ui/lowcode 2.15.0-alpha.14 → 2.15.0-alpha.16
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/index.vue.js +5 -79
- package/src/components/FormRender/index.vue2.js +85 -2
- package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue.js +3 -3
- package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue2.js +36 -30
- package/src/components/form-designer/form-widget/container-widget/useTableWidget.js +58 -54
- package/src/components/form-designer/form-widget/field-widget/hooks/useSelect.js +16 -16
- package/src/components/form-designer/form-widget/field-widget/useField.js +117 -108
- package/src/components/form-designer/index.vue.js +60 -62
- 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 +49 -47
- package/src/components/form-designer/toolbar-panel/PreviewDialog.vue.js +1 -1
- package/src/components/form-designer/widget-panel/advanced/data-table.js +7 -19
- package/src/components/form-render/container-items/data-table-widget.vue.js +1 -1
- package/src/components/form-render/container-items/data-table-widget.vue2.js +57 -49
- package/src/components/form-render/dynamic-dialog.vue.js +91 -94
- package/src/components/public/CustomerModal/CustomerModal.vue2.js +16 -16
- package/src/hooks/useDataHttp.js +15 -12
- package/src/lang/zh-CN.js +4 -3
- package/stats.html +1 -1
- package/styles/style.css +1 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { inject as c, ref as f, getCurrentInstance as
|
|
2
|
-
import { deepClone as
|
|
1
|
+
import { inject as c, ref as f, getCurrentInstance as ze, computed as s, toRaw as $, onMounted as Ue, onBeforeUnmount as Te, nextTick as j } from "vue";
|
|
2
|
+
import { deepClone as G } from "../../../../utils/util.js";
|
|
3
3
|
import I from "../../../../utils/validators.js";
|
|
4
|
-
import { get as
|
|
5
|
-
import { useI18n as
|
|
6
|
-
import { useEmitter as
|
|
7
|
-
import { useAppRef as
|
|
8
|
-
import { useExecFunction as
|
|
9
|
-
function
|
|
10
|
-
const
|
|
4
|
+
import { get as Le, eq as Pe, isArray as We } from "lodash-es";
|
|
5
|
+
import { useI18n as Je } from "../../../../utils/i18n.js";
|
|
6
|
+
import { useEmitter as $e } from "../../../../utils/useEmitter.js";
|
|
7
|
+
import { useAppRef as je } from "../../useAppRef.js";
|
|
8
|
+
import { useExecFunction as Ge } from "tmgc2-share";
|
|
9
|
+
function et(t) {
|
|
10
|
+
const K = c("getFormConfig", () => ({})), y = c("formData", f({})), Q = c("getReadMode", () => !1), k = c("isSubFormField", !1), D = c("getSubFormName", () => ""), o = c("designState", !1), { registerToRefList: X, getWidgetRef: Y, getFormRef: B, unregisterFromRefList: Z } = je(), { executeFunction: u, asyncExecuteFunction: m } = Ge(), { i18nt: M, i18n2t: _ } = Je(), { field: d } = t, v = f(null), A = f(null), R = f(!1), w = f(!1), l = f([]), O = f({}), H = f({}), p = f(null), h = ze(), { dispatch: E } = $e(), q = s(() => K()), ee = s(() => {
|
|
11
11
|
var e;
|
|
12
|
-
return (e =
|
|
13
|
-
}), b =
|
|
12
|
+
return (e = d == null ? void 0 : d.options) != null && e.size ? d.options.size : q.value.size || "middle";
|
|
13
|
+
}), b = s(() => D ? D() : ""), a = s({
|
|
14
14
|
get() {
|
|
15
|
-
return
|
|
15
|
+
return Le(y.value, g.value);
|
|
16
16
|
},
|
|
17
17
|
set(e) {
|
|
18
18
|
x(e);
|
|
19
19
|
}
|
|
20
|
-
}),
|
|
20
|
+
}), te = s(() => y.value[b.value]), S = s(() => Q() ? !0 : R.value), ne = s(() => {
|
|
21
21
|
if (o)
|
|
22
22
|
return !1;
|
|
23
23
|
const { onHidden: e, hidden: n } = t.field.options;
|
|
@@ -32,7 +32,7 @@ function pe(t) {
|
|
|
32
32
|
return !1;
|
|
33
33
|
}
|
|
34
34
|
return !1;
|
|
35
|
-
}), V =
|
|
35
|
+
}), V = s(() => {
|
|
36
36
|
if (o)
|
|
37
37
|
return !1;
|
|
38
38
|
const { onDisabled: e, disabled: n } = t.field.options;
|
|
@@ -47,29 +47,29 @@ function pe(t) {
|
|
|
47
47
|
return console.log({ error: i }), !1;
|
|
48
48
|
}
|
|
49
49
|
return !1;
|
|
50
|
-
}),
|
|
50
|
+
}), ie = (e, n) => {
|
|
51
51
|
if (!Array.isArray(e))
|
|
52
52
|
return -1;
|
|
53
53
|
let i = -1;
|
|
54
|
-
return e.forEach((r,
|
|
55
|
-
r === n && (i =
|
|
54
|
+
return e.forEach((r, Ne) => {
|
|
55
|
+
r === n && (i = Ne);
|
|
56
56
|
}), i;
|
|
57
|
-
},
|
|
58
|
-
function
|
|
59
|
-
o || t.field.options.onCreated &&
|
|
60
|
-
await
|
|
57
|
+
}, g = s(() => k && !o ? b.value + "." + t.subFormRowIndex + "." + t.field.options.name : t.field.options.name);
|
|
58
|
+
function oe() {
|
|
59
|
+
o || t.field.options.onCreated && j(async () => {
|
|
60
|
+
await m({
|
|
61
61
|
functionBody: t.field.options.onCreated
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
o || t.field.options.onMounted &&
|
|
67
|
-
await
|
|
65
|
+
function le() {
|
|
66
|
+
o || t.field.options.onMounted && j(async () => {
|
|
67
|
+
await m({
|
|
68
68
|
functionBody: t.field.options.onMounted
|
|
69
69
|
});
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
const
|
|
72
|
+
const ae = () => {
|
|
73
73
|
a.value = t.field.options.defaultValue;
|
|
74
74
|
}, N = () => {
|
|
75
75
|
t.field.formItemFlag && l.value.splice(0, l.value.length);
|
|
@@ -110,19 +110,19 @@ function pe(t) {
|
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
},
|
|
113
|
+
}, se = () => {
|
|
114
114
|
l.value && l.value.forEach((e) => {
|
|
115
115
|
e.trigger && e.trigger.splice(0, e.trigger.length);
|
|
116
116
|
});
|
|
117
|
-
},
|
|
117
|
+
}, de = () => {
|
|
118
118
|
l.value && l.value.forEach((e) => {
|
|
119
119
|
e.trigger && (e.trigger.push("blur"), e.trigger.push("change"));
|
|
120
120
|
});
|
|
121
|
-
},
|
|
121
|
+
}, fe = (e, n) => {
|
|
122
122
|
e && e.length > 0 && e.forEach((i) => {
|
|
123
123
|
i.value === n && (i.disabled = !0);
|
|
124
124
|
});
|
|
125
|
-
},
|
|
125
|
+
}, ue = (e, n) => {
|
|
126
126
|
e && e.length > 0 && e.forEach((i) => {
|
|
127
127
|
i.value === n && (i.disabled = !1);
|
|
128
128
|
});
|
|
@@ -135,25 +135,25 @@ function pe(t) {
|
|
|
135
135
|
t.subFormRowIndex
|
|
136
136
|
]);
|
|
137
137
|
}, x = (e) => {
|
|
138
|
-
o || (E("VFormRender", "fieldValidation", [
|
|
139
|
-
fieldName:
|
|
138
|
+
o || (E("VFormRender", "fieldValidation", [g.value]), E("VFormRender", "fieldChange", {
|
|
139
|
+
fieldName: g.value,
|
|
140
140
|
value: e,
|
|
141
|
-
oldValue:
|
|
142
|
-
field:
|
|
143
|
-
}));
|
|
144
|
-
},
|
|
145
|
-
o || (A.value =
|
|
141
|
+
oldValue: $(a.value),
|
|
142
|
+
field: d
|
|
143
|
+
}), U(e, $(a.value)));
|
|
144
|
+
}, re = (e) => {
|
|
145
|
+
o || (A.value = G(a.value), t.field.options.onFocus && u({
|
|
146
146
|
functionBody: t.field.options.onFocus,
|
|
147
147
|
params: { event: e },
|
|
148
148
|
keys: ["event"]
|
|
149
149
|
}));
|
|
150
|
-
},
|
|
150
|
+
}, ce = (e) => {
|
|
151
151
|
o || t.field.options.onBlur && u({
|
|
152
152
|
functionBody: t.field.options.onBlur,
|
|
153
153
|
params: { event: e },
|
|
154
154
|
keys: ["event"]
|
|
155
155
|
});
|
|
156
|
-
},
|
|
156
|
+
}, ge = () => {
|
|
157
157
|
o || t.field.options.onAppendButtonClick && u({
|
|
158
158
|
functionBody: t.field.options.onAppendButtonClick
|
|
159
159
|
});
|
|
@@ -163,27 +163,27 @@ function pe(t) {
|
|
|
163
163
|
params: {
|
|
164
164
|
value: e,
|
|
165
165
|
oldVal: n,
|
|
166
|
-
subFormData:
|
|
166
|
+
subFormData: te.value,
|
|
167
167
|
rowId: t.subFormRowId
|
|
168
168
|
},
|
|
169
169
|
keys: ["value", "subFormData", "rowId"]
|
|
170
170
|
});
|
|
171
171
|
}, me = async () => {
|
|
172
172
|
if (!o && t.field.options.onClick)
|
|
173
|
-
return await
|
|
173
|
+
return await m({
|
|
174
174
|
functionBody: t.field.options.onClick
|
|
175
175
|
});
|
|
176
|
-
},
|
|
177
|
-
o || V.value ||
|
|
178
|
-
functionBody:
|
|
176
|
+
}, ve = async () => {
|
|
177
|
+
o || V.value || d.options.onClickIcon && await m({
|
|
178
|
+
functionBody: d.options.onClickIcon
|
|
179
179
|
});
|
|
180
|
-
}, F = () => v.value, T = (e) => (typeof e == "string" && (e = JSON.parse(e)),
|
|
180
|
+
}, F = () => v.value, T = (e) => (typeof e == "string" && (e = JSON.parse(e)), We(e) ? e.map((i, r) => ({
|
|
181
181
|
...i,
|
|
182
182
|
name: i.fileName,
|
|
183
183
|
uid: r
|
|
184
184
|
})) : []), L = (e, n = !1) => {
|
|
185
|
-
if (e && (e = e.target ? e.target.value : e),
|
|
186
|
-
const i =
|
|
185
|
+
if (e && (e = e.target ? e.target.value : e), Pe(a.value, e)) return;
|
|
186
|
+
const i = G(a.value);
|
|
187
187
|
if (t.field.type === "file-upload")
|
|
188
188
|
e = T(e || []);
|
|
189
189
|
else if (t.field.type === "code-editor") {
|
|
@@ -191,135 +191,144 @@ function pe(t) {
|
|
|
191
191
|
r && r.setValue(e);
|
|
192
192
|
}
|
|
193
193
|
a.value = e, x(e), n || z(e, i);
|
|
194
|
-
},
|
|
194
|
+
}, he = () => a.value, be = () => {
|
|
195
195
|
const e = t.field.options.defaultValue;
|
|
196
196
|
L(e), (t.field.type === "picture-upload" || t.field.type === "file-upload") && a.value.splice(0, a.value.length);
|
|
197
|
-
},
|
|
197
|
+
}, Ce = (e, n) => {
|
|
198
198
|
t.field.options.hasOwnProperty(e) && (t.field.options[e] = n);
|
|
199
|
-
}, Ce = (e) => {
|
|
200
|
-
t.field.options.readonly = e;
|
|
201
199
|
}, Fe = (e) => {
|
|
202
|
-
t.field.options.
|
|
200
|
+
t.field.options.readonly = e;
|
|
203
201
|
}, ye = (e) => {
|
|
204
|
-
t.field.options.
|
|
202
|
+
t.field.options.disabled = e;
|
|
205
203
|
}, Be = (e) => {
|
|
206
|
-
t.field.options.
|
|
204
|
+
t.field.options.appendButton = e;
|
|
207
205
|
}, Re = (e) => {
|
|
208
|
-
t.field.options.
|
|
206
|
+
t.field.options.appendButtonDisabled = e;
|
|
209
207
|
}, Ee = (e) => {
|
|
208
|
+
t.field.options.hidden = e, e ? N() : C();
|
|
209
|
+
}, xe = (e) => {
|
|
210
210
|
t.field.options.required = e, C(), !o && !e && P();
|
|
211
211
|
}, P = () => {
|
|
212
|
-
o || B().clearValidate(
|
|
213
|
-
},
|
|
212
|
+
o || B().clearValidate(g.value);
|
|
213
|
+
}, Ie = () => B().vfCtx, ke = (e) => {
|
|
214
214
|
t.field.options.label = e;
|
|
215
215
|
}, W = () => {
|
|
216
216
|
const e = F();
|
|
217
217
|
e && e.focus && e.focus();
|
|
218
|
-
}, ke = (e, n) => {
|
|
219
|
-
O.value[e] = n;
|
|
220
218
|
}, De = (e, n) => {
|
|
219
|
+
O.value[e] = n;
|
|
220
|
+
}, Me = (e, n) => {
|
|
221
221
|
H.value[e] = n;
|
|
222
|
-
},
|
|
222
|
+
}, Ae = (e = !0) => {
|
|
223
223
|
R.value = e;
|
|
224
|
-
},
|
|
224
|
+
}, Oe = (e) => {
|
|
225
225
|
t.field.options.customClass ? t.field.options.customClass.push(e) : t.field.options.customClass = [e];
|
|
226
|
-
},
|
|
226
|
+
}, He = s(() => t.field.options.customClass), qe = (e) => {
|
|
227
227
|
if (!t.field.options.customClass)
|
|
228
228
|
return;
|
|
229
229
|
let n = -1;
|
|
230
230
|
t.field.options.customClass.map((i, r) => {
|
|
231
231
|
i === e && (n = r);
|
|
232
232
|
}), n > -1 && t.field.options.customClass.splice(n, 1);
|
|
233
|
-
},
|
|
233
|
+
}, Se = () => {
|
|
234
234
|
var e;
|
|
235
235
|
return (e = v.value) == null ? void 0 : e.$el;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
236
|
+
}, J = s({
|
|
237
|
+
get() {
|
|
238
|
+
return t.field.options;
|
|
239
|
+
},
|
|
240
|
+
set(e) {
|
|
241
|
+
t.field.options = e;
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
Ue(() => {
|
|
245
|
+
X(), oe(), C(), le();
|
|
246
|
+
}), Te(() => {
|
|
247
|
+
Z();
|
|
241
248
|
});
|
|
242
|
-
const
|
|
249
|
+
const Ve = {
|
|
250
|
+
options: J,
|
|
243
251
|
proxy: h == null ? void 0 : h.proxy,
|
|
244
|
-
field:
|
|
245
|
-
widget:
|
|
252
|
+
field: d,
|
|
253
|
+
widget: d,
|
|
246
254
|
fieldModel: a,
|
|
247
255
|
fieldEditor: v,
|
|
248
256
|
isReadMode: S,
|
|
249
|
-
setWidgetOption:
|
|
250
|
-
setReadonly:
|
|
251
|
-
setDisabled:
|
|
252
|
-
getVfCtx:
|
|
253
|
-
setLabel:
|
|
254
|
-
getEl:
|
|
255
|
-
setReadMode:
|
|
256
|
-
resetField:
|
|
257
|
+
setWidgetOption: Ce,
|
|
258
|
+
setReadonly: Fe,
|
|
259
|
+
setDisabled: ye,
|
|
260
|
+
getVfCtx: Ie,
|
|
261
|
+
setLabel: ke,
|
|
262
|
+
getEl: Se,
|
|
263
|
+
setReadMode: Ae,
|
|
264
|
+
resetField: be,
|
|
257
265
|
setValue: L,
|
|
258
|
-
getValue:
|
|
266
|
+
getValue: he,
|
|
259
267
|
getFieldEditor: F,
|
|
260
268
|
getFormRef: B,
|
|
261
|
-
getWidgetRef:
|
|
262
|
-
setHidden:
|
|
263
|
-
addCssClass:
|
|
264
|
-
removeCssClass:
|
|
265
|
-
setRequired:
|
|
269
|
+
getWidgetRef: Y,
|
|
270
|
+
setHidden: Ee,
|
|
271
|
+
addCssClass: Oe,
|
|
272
|
+
removeCssClass: qe,
|
|
273
|
+
setRequired: xe,
|
|
266
274
|
clearValidate: P,
|
|
267
275
|
focus: W
|
|
268
276
|
};
|
|
269
277
|
return {
|
|
270
278
|
executeFunction: u,
|
|
271
|
-
|
|
279
|
+
options: J,
|
|
280
|
+
customClass: He,
|
|
272
281
|
fieldEditor: v,
|
|
273
282
|
// 状态
|
|
274
283
|
fieldModel: a,
|
|
275
284
|
oldFieldValue: A,
|
|
276
285
|
fieldReadonlyFlag: R,
|
|
277
|
-
loading:
|
|
286
|
+
loading: w,
|
|
278
287
|
rules: l,
|
|
279
288
|
uploadHeaders: O,
|
|
280
289
|
uploadData: H,
|
|
281
290
|
designState: o,
|
|
282
|
-
customToolbar:
|
|
291
|
+
customToolbar: p,
|
|
283
292
|
i18nt: M,
|
|
284
|
-
i18n2t:
|
|
285
|
-
size:
|
|
286
|
-
field:
|
|
293
|
+
i18n2t: _,
|
|
294
|
+
size: ee,
|
|
295
|
+
field: d,
|
|
287
296
|
// 计算属性
|
|
288
297
|
formConfig: q,
|
|
289
298
|
subFormName: b,
|
|
290
299
|
formModel: y,
|
|
291
300
|
isReadMode: S,
|
|
292
301
|
// 方法
|
|
293
|
-
handleHidden:
|
|
302
|
+
handleHidden: ne,
|
|
294
303
|
handleDisabled: V,
|
|
295
|
-
findInArray:
|
|
296
|
-
getPropName:
|
|
297
|
-
refreshDefaultValue:
|
|
304
|
+
findInArray: ie,
|
|
305
|
+
getPropName: g,
|
|
306
|
+
refreshDefaultValue: ae,
|
|
298
307
|
clearFieldRules: N,
|
|
299
308
|
buildFieldRules: C,
|
|
300
|
-
disableChangeValidate:
|
|
301
|
-
enableChangeValidate:
|
|
302
|
-
disableOptionOfList:
|
|
303
|
-
enableOptionOfList:
|
|
309
|
+
disableChangeValidate: se,
|
|
310
|
+
enableChangeValidate: de,
|
|
311
|
+
disableOptionOfList: fe,
|
|
312
|
+
enableOptionOfList: ue,
|
|
304
313
|
emitFieldDataChange: z,
|
|
305
314
|
syncUpdateFormModel: x,
|
|
306
|
-
handleFocusCustomEvent:
|
|
307
|
-
handleBlurCustomEvent:
|
|
308
|
-
emitAppendButtonClick:
|
|
315
|
+
handleFocusCustomEvent: re,
|
|
316
|
+
handleBlurCustomEvent: ce,
|
|
317
|
+
emitAppendButtonClick: ge,
|
|
309
318
|
handleOnChange: U,
|
|
310
319
|
onClick: me,
|
|
311
|
-
handleClickIcon:
|
|
320
|
+
handleClickIcon: ve,
|
|
312
321
|
getFieldEditor: F,
|
|
313
322
|
showFileList: T,
|
|
314
|
-
setAppendButtonVisible:
|
|
315
|
-
setAppendButtonDisabled:
|
|
323
|
+
setAppendButtonVisible: Be,
|
|
324
|
+
setAppendButtonDisabled: Re,
|
|
316
325
|
focus: W,
|
|
317
|
-
setUploadHeader:
|
|
318
|
-
setUploadData:
|
|
326
|
+
setUploadHeader: De,
|
|
327
|
+
setUploadData: Me,
|
|
319
328
|
isSubFormField: k,
|
|
320
|
-
defineExposed:
|
|
329
|
+
defineExposed: Ve
|
|
321
330
|
};
|
|
322
331
|
}
|
|
323
332
|
export {
|
|
324
|
-
|
|
333
|
+
et as useField
|
|
325
334
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { createDesigner as
|
|
7
|
-
import { useLocaleStore as
|
|
8
|
-
import { deepClone as
|
|
9
|
-
import { isEmpty as
|
|
10
|
-
import { useI18n as
|
|
11
|
-
import { message as
|
|
12
|
-
import { storeToRefs as
|
|
13
|
-
import { useRef as
|
|
14
|
-
const
|
|
1
|
+
import { defineComponent as x, ref as l, provide as s, getCurrentInstance as M, computed as q, watch as z, onMounted as G, resolveComponent as a, createBlock as K, openBlock as Q, withCtx as n, createVNode as r, createSlots as X, renderList as Y, renderSlot as Z, createElementVNode as j } from "vue";
|
|
2
|
+
import O from "./widget-panel/index.vue.js";
|
|
3
|
+
import ee from "./toolbar-panel/index.vue.js";
|
|
4
|
+
import te from "./setting-panel/index.vue.js";
|
|
5
|
+
import oe from "./form-widget/index.vue.js";
|
|
6
|
+
import { createDesigner as re } from "./designer.js";
|
|
7
|
+
import { useLocaleStore as ne } from "@kp-ui/i18n";
|
|
8
|
+
import { deepClone as _, getAllFieldWidgets as W, getAllContainerWidgets as y } from "../../utils/util.js";
|
|
9
|
+
import { isEmpty as w } from "lodash-es";
|
|
10
|
+
import { useI18n as F } from "../../utils/i18n.js";
|
|
11
|
+
import { message as L } from "ant-design-vue";
|
|
12
|
+
import { storeToRefs as ie } from "pinia";
|
|
13
|
+
import { useRef as le } from "tmgc2-share";
|
|
14
|
+
const se = { class: "container-scroll-bar" }, ye = /* @__PURE__ */ x({
|
|
15
15
|
name: "VFormDesigner",
|
|
16
16
|
componentName: "VFormDesigner",
|
|
17
17
|
__name: "index",
|
|
@@ -34,75 +34,75 @@ const ge = { class: "container-scroll-bar" }, be = /* @__PURE__ */ M({
|
|
|
34
34
|
}) },
|
|
35
35
|
globalDsv: { default: () => ({}) }
|
|
36
36
|
},
|
|
37
|
-
setup(
|
|
38
|
-
const u = l(), { i18nt:
|
|
37
|
+
setup(b, { expose: D }) {
|
|
38
|
+
const u = l(), { i18nt: J } = F(), A = ne(), { locale: m } = ie(A), d = b;
|
|
39
39
|
s("serverFieldList", () => c.value), s("designState", !0);
|
|
40
|
-
const f = l(270), g = l(300), c = l([]), { initLocale:
|
|
41
|
-
s("formConfig",
|
|
42
|
-
const
|
|
43
|
-
if (!
|
|
40
|
+
const f = l(270), g = l(300), c = l([]), { initLocale: R } = F(), S = M(), t = l(re(S)), B = q(() => t.value.formConfig);
|
|
41
|
+
s("formConfig", B), s("designer", t), s("getDesignerConfig", () => d.designerConfig);
|
|
42
|
+
const V = (e) => {
|
|
43
|
+
if (!w(e))
|
|
44
44
|
try {
|
|
45
45
|
if (!e || !e.formConfig)
|
|
46
|
-
throw new Error(
|
|
46
|
+
throw new Error(J("designer.hint.invalidJsonFormat"));
|
|
47
47
|
t.value.loadFormJson(e), t.value.emitHistoryChange(), t.value.emitEvent("form-json-imported", []);
|
|
48
48
|
} catch (o) {
|
|
49
|
-
|
|
49
|
+
L.error(o + "");
|
|
50
50
|
}
|
|
51
|
-
},
|
|
51
|
+
}, E = async () => {
|
|
52
52
|
d.fieldListApi && (c.value = await d.fieldListApi());
|
|
53
|
-
},
|
|
54
|
-
if (!
|
|
53
|
+
}, N = (e) => {
|
|
54
|
+
if (!w(e))
|
|
55
55
|
try {
|
|
56
56
|
let o = !1;
|
|
57
57
|
typeof e == "string" ? o = t.value.loadFormJson(JSON.parse(e)) : e.constructor === Object && (o = t.value.loadFormJson(e)), o && t.value.emitHistoryChange();
|
|
58
58
|
} catch (o) {
|
|
59
|
-
|
|
59
|
+
L.error(o + "");
|
|
60
60
|
}
|
|
61
|
-
},
|
|
62
|
-
widgetList:
|
|
63
|
-
formConfig:
|
|
64
|
-
}),
|
|
65
|
-
|
|
61
|
+
}, k = () => ({
|
|
62
|
+
widgetList: _(t.value.widgetList),
|
|
63
|
+
formConfig: _(t.value.formConfig)
|
|
64
|
+
}), I = (e = []) => e.length ? W(e) : W(t.value.widgetList), P = (e = []) => e.length ? y(e) : y(t.value.widgetList), U = (e, o = !1) => u.value.getWidgetRef(e, o);
|
|
65
|
+
z(
|
|
66
66
|
m,
|
|
67
67
|
() => {
|
|
68
|
-
|
|
68
|
+
R(m.value);
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
immediate: !0
|
|
72
72
|
}
|
|
73
73
|
);
|
|
74
|
-
const [
|
|
75
|
-
return
|
|
76
|
-
t.value.initDesigner(),
|
|
77
|
-
}),
|
|
78
|
-
isLoading:
|
|
74
|
+
const [H, T] = le(!1);
|
|
75
|
+
return G(() => {
|
|
76
|
+
t.value.initDesigner(), E();
|
|
77
|
+
}), D({
|
|
78
|
+
isLoading: H,
|
|
79
79
|
setLoading: T,
|
|
80
|
-
getWidgetRef:
|
|
81
|
-
getContainerWidgets:
|
|
82
|
-
getFieldWidgets:
|
|
83
|
-
getFormJson:
|
|
84
|
-
setFormJson:
|
|
85
|
-
setJsonImport:
|
|
80
|
+
getWidgetRef: U,
|
|
81
|
+
getContainerWidgets: P,
|
|
82
|
+
getFieldWidgets: I,
|
|
83
|
+
getFormJson: k,
|
|
84
|
+
setFormJson: N,
|
|
85
|
+
setJsonImport: V
|
|
86
86
|
}), (e, o) => {
|
|
87
|
-
const
|
|
88
|
-
return
|
|
87
|
+
const v = a("a-layout-sider"), $ = a("a-layout-header"), p = a("a-layout-content"), h = a("a-layout");
|
|
88
|
+
return Q(), K(h, { class: "main-container full-height" }, {
|
|
89
89
|
default: n(() => [
|
|
90
|
-
r(
|
|
90
|
+
r(h, null, {
|
|
91
91
|
default: n(() => [
|
|
92
|
-
r(
|
|
92
|
+
r(v, {
|
|
93
93
|
width: f.value,
|
|
94
94
|
class: "side-panel"
|
|
95
95
|
}, {
|
|
96
96
|
default: n(() => [
|
|
97
|
-
r(
|
|
97
|
+
r(O)
|
|
98
98
|
]),
|
|
99
99
|
_: 1
|
|
100
100
|
}, 8, ["width"]),
|
|
101
|
-
r(
|
|
101
|
+
r(p, { class: "center-layout-container" }, {
|
|
102
102
|
default: n(() => [
|
|
103
103
|
r($, { class: "toolbar-header" }, {
|
|
104
104
|
default: n(() => [
|
|
105
|
-
r(
|
|
105
|
+
r(ee, {
|
|
106
106
|
saveJsonApi: e.saveJsonApi,
|
|
107
107
|
"global-dsv": e.globalDsv,
|
|
108
108
|
leftWidth: f.value,
|
|
@@ -110,28 +110,26 @@ const ge = { class: "container-scroll-bar" }, be = /* @__PURE__ */ M({
|
|
|
110
110
|
rightWidth: g.value,
|
|
111
111
|
"onUpdate:rightWidth": o[1] || (o[1] = (i) => g.value = i),
|
|
112
112
|
ref: "toolbarRef"
|
|
113
|
-
},
|
|
114
|
-
|
|
113
|
+
}, X({ _: 2 }, [
|
|
114
|
+
Y(e.$slots, (i, C) => ({
|
|
115
115
|
name: C,
|
|
116
116
|
fn: n(() => [
|
|
117
|
-
|
|
117
|
+
Z(e.$slots, C)
|
|
118
118
|
])
|
|
119
119
|
}))
|
|
120
120
|
]), 1032, ["saveJsonApi", "global-dsv", "leftWidth", "rightWidth"])
|
|
121
121
|
]),
|
|
122
122
|
_: 3
|
|
123
123
|
}),
|
|
124
|
-
r(
|
|
124
|
+
r(p, { class: "form-widget-main" }, {
|
|
125
125
|
default: n(() => [
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
j("div", se, [
|
|
127
|
+
r(oe, {
|
|
128
128
|
"global-dsv": e.globalDsv,
|
|
129
129
|
"form-config": t.value.formConfig,
|
|
130
130
|
ref_key: "formRef",
|
|
131
131
|
ref: u
|
|
132
|
-
}, null, 8, ["global-dsv", "form-config"])
|
|
133
|
-
[x, oe(v)]
|
|
134
|
-
])
|
|
132
|
+
}, null, 8, ["global-dsv", "form-config"])
|
|
135
133
|
])
|
|
136
134
|
]),
|
|
137
135
|
_: 1
|
|
@@ -139,9 +137,9 @@ const ge = { class: "container-scroll-bar" }, be = /* @__PURE__ */ M({
|
|
|
139
137
|
]),
|
|
140
138
|
_: 3
|
|
141
139
|
}),
|
|
142
|
-
r(
|
|
140
|
+
r(v, { width: g.value }, {
|
|
143
141
|
default: n(() => [
|
|
144
|
-
r(
|
|
142
|
+
r(te, {
|
|
145
143
|
"selected-widget": t.value.selectedWidget,
|
|
146
144
|
"onUpdate:selectedWidget": o[2] || (o[2] = (i) => t.value.selectedWidget = i),
|
|
147
145
|
"global-dsv": e.globalDsv,
|
|
@@ -160,5 +158,5 @@ const ge = { class: "container-scroll-bar" }, be = /* @__PURE__ */ M({
|
|
|
160
158
|
}
|
|
161
159
|
});
|
|
162
160
|
export {
|
|
163
|
-
|
|
161
|
+
ye as default
|
|
164
162
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./data-table-tableColumns-editor.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const e = /* @__PURE__ */ o
|
|
3
|
+
import a from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const e = /* @__PURE__ */ a(o, [["__scopeId", "data-v-ac7b3122"]]);
|
|
5
5
|
export {
|
|
6
6
|
e as default
|
|
7
7
|
};
|