@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,27 @@
|
|
|
1
|
-
import { resolveComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import { resolveComponent as d, createElementBlock as S, openBlock as u, Fragment as W, createElementVNode as v, createVNode as m, normalizeStyle as O, createBlock as M, createCommentVNode as w, withKeys as E, normalizeClass as V, withCtx as j, mergeProps as k, render as x } from "vue";
|
|
2
|
+
import A from "../../utils/emitter.js";
|
|
3
|
+
import { useI18n as _ } from "@kp-ui/i18n";
|
|
4
|
+
import B from "./RenderWigetList.vue.js";
|
|
5
|
+
import { Skeleton as $ } from "ant-design-vue";
|
|
6
|
+
import { buildDefaultFormJson as J, getContainerWidgetByName as g, cloneFormConfigWithoutEventHandler as p, deepClone as f, getDSByName as F, overwriteObj as h, runDataSourceRequest as b, getAllContainerWidgets as P, getAllFieldWidgets as H, getDefaultFormConfig as T, traverseFieldWidgets as z, getFieldWidgetByName as D, traverseFieldWidgetsOfContainer as K, insertCustomCssToHead as G, insertGlobalFunctionsToHtml as q, generateId as c } from "../../utils/util.js";
|
|
7
|
+
import U, { setLangMessages as N } from "../../utils/i18n.js";
|
|
8
|
+
import Q from "./dynamic-dialog.vue.js";
|
|
8
9
|
/* empty css */
|
|
9
|
-
import
|
|
10
|
-
import { fmtHttpParams as
|
|
10
|
+
import X from "./dynamic-drawer.vue.js";
|
|
11
|
+
import { fmtHttpParams as C } from "../../utils/request/fmtHttpParams.js";
|
|
12
|
+
import { executeFunction as y } from "../../utils/executeFunction.js";
|
|
11
13
|
/* empty css */
|
|
12
|
-
import
|
|
13
|
-
const
|
|
14
|
+
import Y from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
15
|
+
const Z = {
|
|
14
16
|
name: "VFormRender",
|
|
15
17
|
componentName: "VFormRender",
|
|
16
18
|
inheritAttrs: !1,
|
|
17
|
-
mixins: [
|
|
19
|
+
mixins: [A, U],
|
|
18
20
|
components: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
Skeleton: $,
|
|
22
|
+
RenderWigetList: B,
|
|
23
|
+
DynamicDialog: Q
|
|
24
|
+
// ...FieldComponents
|
|
21
25
|
},
|
|
22
26
|
props: {
|
|
23
27
|
vfCtx: {
|
|
@@ -27,7 +31,7 @@ const et = {
|
|
|
27
31
|
formJson: {
|
|
28
32
|
//prop传入的表单JSON配置
|
|
29
33
|
type: Object,
|
|
30
|
-
default: () =>
|
|
34
|
+
default: () => J()
|
|
31
35
|
},
|
|
32
36
|
formData: {
|
|
33
37
|
//prop传入的表单数据
|
|
@@ -150,10 +154,6 @@ const et = {
|
|
|
150
154
|
this.isLoading = t;
|
|
151
155
|
},
|
|
152
156
|
// 处理回车键事件
|
|
153
|
-
handleEnterKey() {
|
|
154
|
-
var t;
|
|
155
|
-
((t = this.formConfig) == null ? void 0 : t.isEnterSubmit) === 1 && this.handleOnSubmit();
|
|
156
|
-
},
|
|
157
157
|
handleCancelClick() {
|
|
158
158
|
if (!this.isClosing && this.handleBeforeClose())
|
|
159
159
|
try {
|
|
@@ -182,7 +182,7 @@ const et = {
|
|
|
182
182
|
var e;
|
|
183
183
|
const t = this.formConfig.serveList;
|
|
184
184
|
if ((e = t.vformDetail.http) != null && e.url) {
|
|
185
|
-
const i = await
|
|
185
|
+
const i = await C.call(this, t.vformDetail, {
|
|
186
186
|
vfCtx: this.vfCtx
|
|
187
187
|
});
|
|
188
188
|
return console.log("res: ", i), i;
|
|
@@ -192,7 +192,7 @@ const et = {
|
|
|
192
192
|
var i;
|
|
193
193
|
const t = await this.getFormData(), e = this.formConfig.serveList;
|
|
194
194
|
if ((i = e.vformDetail.http) != null && i.url) {
|
|
195
|
-
const o = await
|
|
195
|
+
const o = await C.call(this, e.vformUpdate, {
|
|
196
196
|
data: t,
|
|
197
197
|
vfCtx: this.vfCtx
|
|
198
198
|
});
|
|
@@ -200,7 +200,7 @@ const et = {
|
|
|
200
200
|
}
|
|
201
201
|
},
|
|
202
202
|
initFormObject(t = !0) {
|
|
203
|
-
this.formId = "vfRender" +
|
|
203
|
+
this.formId = "vfRender" + c(), t && !this.dynamicCreation && this.insertCustomStyleAndScriptNode(), this.addFieldChangeEventHandler(), this.addFieldValidateEventHandler(), this.registerFormToRefList(), this.handleOnCreated(), this.disabledMode && this.$nextTick(() => {
|
|
204
204
|
this.disableForm();
|
|
205
205
|
});
|
|
206
206
|
},
|
|
@@ -211,14 +211,14 @@ const et = {
|
|
|
211
211
|
return t.type + "-widget";
|
|
212
212
|
},
|
|
213
213
|
initLocale() {
|
|
214
|
-
const { t, messages: e } =
|
|
215
|
-
i &&
|
|
214
|
+
const { t, messages: e } = _(), i = e.value[this.getLocale];
|
|
215
|
+
i && N(this.getLocale, i.lang), this.changeLanguage(this.getLocale);
|
|
216
216
|
},
|
|
217
217
|
insertCustomStyleAndScriptNode() {
|
|
218
|
-
this.formConfig && this.formConfig.cssCode &&
|
|
218
|
+
this.formConfig && this.formConfig.cssCode && G(
|
|
219
219
|
this.formConfig.cssCode,
|
|
220
220
|
this.previewState ? "" : this.formId
|
|
221
|
-
), this.formConfig && this.formConfig.functions &&
|
|
221
|
+
), this.formConfig && this.formConfig.functions && q(
|
|
222
222
|
this.formConfig.functions,
|
|
223
223
|
this.previewState ? "" : this.formId
|
|
224
224
|
);
|
|
@@ -269,7 +269,7 @@ const et = {
|
|
|
269
269
|
this.formDataModel[e] = f(i);
|
|
270
270
|
} else {
|
|
271
271
|
const i = [];
|
|
272
|
-
|
|
272
|
+
K(t, (r) => {
|
|
273
273
|
i.push(r);
|
|
274
274
|
});
|
|
275
275
|
const s = {};
|
|
@@ -342,8 +342,17 @@ const et = {
|
|
|
342
342
|
handleOnCreated() {
|
|
343
343
|
this.formConfig && this.formConfig.onFormCreated && new Function(this.formConfig.onFormCreated).call(this);
|
|
344
344
|
},
|
|
345
|
-
|
|
346
|
-
|
|
345
|
+
onFormEnterKey() {
|
|
346
|
+
if (this.formConfig && this.formConfig.onFormEnterKey) {
|
|
347
|
+
const t = y({
|
|
348
|
+
functionBody: this.formConfig.onFormEnterKey,
|
|
349
|
+
context: this
|
|
350
|
+
});
|
|
351
|
+
t && y({
|
|
352
|
+
functionBody: t,
|
|
353
|
+
context: this
|
|
354
|
+
});
|
|
355
|
+
}
|
|
347
356
|
},
|
|
348
357
|
handleOnMounted() {
|
|
349
358
|
this.formConfig && this.formConfig.onFormMounted && new Function(this.formConfig.onFormMounted).call(this);
|
|
@@ -353,7 +362,7 @@ const et = {
|
|
|
353
362
|
i && i.setDisabled ? i.setDisabled(e) : this.findWidgetOfSubFormAndSetDisabled(t, e);
|
|
354
363
|
},
|
|
355
364
|
findWidgetOfSubFormAndSetDisabled(t, e) {
|
|
356
|
-
const i =
|
|
365
|
+
const i = D(
|
|
357
366
|
this.formJsonObj.widgetList,
|
|
358
367
|
t,
|
|
359
368
|
!0
|
|
@@ -368,7 +377,7 @@ const et = {
|
|
|
368
377
|
i && i.setDisabled ? i.setHidden(e) : this.findWidgetOfSubFormAndSetHidden(t, e);
|
|
369
378
|
},
|
|
370
379
|
findWidgetOfSubFormAndSetHidden(t, e) {
|
|
371
|
-
const i =
|
|
380
|
+
const i = D(
|
|
372
381
|
this.formJsonObj.widgetList,
|
|
373
382
|
t,
|
|
374
383
|
!0
|
|
@@ -384,7 +393,7 @@ const et = {
|
|
|
384
393
|
const o = (s, r) => {
|
|
385
394
|
s.options && s.options.name === t && (i = r.options.name);
|
|
386
395
|
};
|
|
387
|
-
if (
|
|
396
|
+
if (z(this.widgetList, o), i) {
|
|
388
397
|
const s = this.getWidgetRef(i);
|
|
389
398
|
if (s) {
|
|
390
399
|
const r = s.getRowIdData();
|
|
@@ -400,13 +409,13 @@ const et = {
|
|
|
400
409
|
this.getFieldWidgets().forEach((e) => {
|
|
401
410
|
e.field.options.dsEnabled && e.field.options.dsName && e.field.options.dataSetName && t.add(e.field.options.dsName);
|
|
402
411
|
}), t.size > 0 && t.forEach(async (e) => {
|
|
403
|
-
const i =
|
|
412
|
+
const i = F(this.formConfig, e);
|
|
404
413
|
if (i) {
|
|
405
414
|
const o = new Object({});
|
|
406
|
-
|
|
415
|
+
h(o, this.globalDsv || {});
|
|
407
416
|
let s = null;
|
|
408
417
|
try {
|
|
409
|
-
s = await
|
|
418
|
+
s = await b(
|
|
410
419
|
i,
|
|
411
420
|
o,
|
|
412
421
|
this,
|
|
@@ -454,8 +463,8 @@ const et = {
|
|
|
454
463
|
return;
|
|
455
464
|
}
|
|
456
465
|
this.clearFormDataModel(), this.buildFormModel(e.widgetList);
|
|
457
|
-
const i = f(
|
|
458
|
-
|
|
466
|
+
const i = f(T());
|
|
467
|
+
h(i, e.formConfig), this.formJsonObj.formConfig = i, this.formJsonObj.widgetList = e.widgetList, this.insertCustomStyleAndScriptNode(), this.$nextTick(() => {
|
|
459
468
|
this.initFormObject(!1), this.initDataSetRequest(), this.handleOnMounted();
|
|
460
469
|
});
|
|
461
470
|
} else
|
|
@@ -595,14 +604,14 @@ const et = {
|
|
|
595
604
|
* @returns {*[]}
|
|
596
605
|
*/
|
|
597
606
|
getFieldWidgets(t = !1) {
|
|
598
|
-
return
|
|
607
|
+
return H(this.formJsonObj.widgetList, t);
|
|
599
608
|
},
|
|
600
609
|
/**
|
|
601
610
|
* 获取所有容器组件
|
|
602
611
|
* @returns {*[]}
|
|
603
612
|
*/
|
|
604
613
|
getContainerWidgets() {
|
|
605
|
-
return
|
|
614
|
+
return P(this.formJsonObj.widgetList);
|
|
606
615
|
},
|
|
607
616
|
/**
|
|
608
617
|
* 增加外部组件引用,可通过getEC()方法获取外部组件,以便在VForm内部调用外部组件方法
|
|
@@ -655,8 +664,8 @@ const et = {
|
|
|
655
664
|
* @param localDsv
|
|
656
665
|
*/
|
|
657
666
|
async executeDataSource(t, e) {
|
|
658
|
-
const i =
|
|
659
|
-
return
|
|
667
|
+
const i = F(this.formJsonObj.formConfig, t), o = new Object({});
|
|
668
|
+
return h(o, this.globalDsv), h(o, e), await b(i, o, this, !1, this.$message);
|
|
660
669
|
},
|
|
661
670
|
/**
|
|
662
671
|
* 获取父级VFormRender组件实例
|
|
@@ -707,15 +716,15 @@ const et = {
|
|
|
707
716
|
* @param extraData
|
|
708
717
|
*/
|
|
709
718
|
showDialog(t, e = {}, i = {}) {
|
|
710
|
-
const o = this.getTopFormRef(), s = this.getFormRef(), r =
|
|
719
|
+
const o = this.getTopFormRef(), s = this.getFormRef(), r = g(o.widgetList, t) || g(s.widgetList, t);
|
|
711
720
|
if (!t || r.type !== "vf-dialog") {
|
|
712
721
|
this.$message.error(this.i18nt("render.hint.refNotFound") + t);
|
|
713
722
|
return;
|
|
714
723
|
}
|
|
715
724
|
const n = {
|
|
716
725
|
widgetList: f(r.widgetList),
|
|
717
|
-
formConfig:
|
|
718
|
-
}, a =
|
|
726
|
+
formConfig: p(o.formConfig)
|
|
727
|
+
}, a = c() + "";
|
|
719
728
|
this.dialogProps = {
|
|
720
729
|
options: r.options,
|
|
721
730
|
formJson: n,
|
|
@@ -729,15 +738,15 @@ const et = {
|
|
|
729
738
|
}, this.$refs.dynamicDialgRef.appContext = this.$root.$.appContext, this.$refs.dynamicDialgRef.show();
|
|
730
739
|
},
|
|
731
740
|
showDrawer(t, e = {}, i = {}) {
|
|
732
|
-
const o = this.getTopFormRef(), s =
|
|
741
|
+
const o = this.getTopFormRef(), s = g(o.widgetList, t);
|
|
733
742
|
if (!s || s.type !== "vf-drawer") {
|
|
734
743
|
this.$message.error(this.i18nt("render.hint.refNotFound") + t);
|
|
735
744
|
return;
|
|
736
745
|
}
|
|
737
746
|
const r = {
|
|
738
747
|
widgetList: f(s.widgetList),
|
|
739
|
-
formConfig:
|
|
740
|
-
}, n =
|
|
748
|
+
formConfig: p(o.formConfig)
|
|
749
|
+
}, n = c() + "", a = m(X, {
|
|
741
750
|
options: s.options,
|
|
742
751
|
formJson: r,
|
|
743
752
|
formData: e || {},
|
|
@@ -748,8 +757,8 @@ const et = {
|
|
|
748
757
|
wrapperId: n
|
|
749
758
|
});
|
|
750
759
|
a.appContext = this.$root.$.appContext;
|
|
751
|
-
const
|
|
752
|
-
|
|
760
|
+
const l = document.createElement("div");
|
|
761
|
+
l.id = "vf-dynamic-drawer-wrapper" + n, document.body.appendChild(l), x(a, l), document.body.appendChild(a.el), a.component.ctx.show();
|
|
753
762
|
},
|
|
754
763
|
/**
|
|
755
764
|
* 判断表单是否处于设计器预览状态
|
|
@@ -764,68 +773,43 @@ const et = {
|
|
|
764
773
|
//--------------------- 以上为组件支持外部调用的API方法 end ------------------//
|
|
765
774
|
}
|
|
766
775
|
};
|
|
767
|
-
function
|
|
768
|
-
const n =
|
|
769
|
-
return
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
]), 1032, ["widget", "data", "parent-list", "index-of-parent-list", "model"])) : (m(), W(O(r.getWidgetName(l)), {
|
|
802
|
-
field: l,
|
|
803
|
-
"form-model": s.formDataModel,
|
|
804
|
-
designer: null,
|
|
805
|
-
key: l.id,
|
|
806
|
-
"parent-list": r.widgetList,
|
|
807
|
-
"index-of-parent-list": S,
|
|
808
|
-
"parent-widget": null
|
|
809
|
-
}, v({ _: 2 }, [
|
|
810
|
-
C(Object.keys(t.$slots), (h) => ({
|
|
811
|
-
name: h,
|
|
812
|
-
fn: g((p) => [
|
|
813
|
-
M(t.$slots, h, y({ ref_for: !0 }, p), void 0, !0)
|
|
814
|
-
])
|
|
815
|
-
}))
|
|
816
|
-
]), 1032, ["field", "form-model", "parent-list", "index-of-parent-list"]))
|
|
817
|
-
], 64))), 256))
|
|
818
|
-
]),
|
|
819
|
-
_: 3
|
|
820
|
-
}, 8, ["layout", "class", "label-width", "model", "onKeydown"])
|
|
821
|
-
], 4)
|
|
822
|
-
]),
|
|
823
|
-
_: 3
|
|
824
|
-
}, 8, ["spinning"]),
|
|
825
|
-
u(d, y(s.dialogProps, { ref: "dynamicDialgRef" }), null, 16)
|
|
776
|
+
function I(t, e, i, o, s, r) {
|
|
777
|
+
const n = d("Skeleton"), a = d("RenderWigetList"), l = d("a-form"), R = d("DynamicDialog");
|
|
778
|
+
return u(), S(W, null, [
|
|
779
|
+
v("div", {
|
|
780
|
+
class: "form-render-container",
|
|
781
|
+
style: O(s.isLoading ? "min-height: 260px" : "")
|
|
782
|
+
}, [
|
|
783
|
+
s.isLoading ? (u(), M(n, {
|
|
784
|
+
key: 0,
|
|
785
|
+
class: "skeleton-form",
|
|
786
|
+
active: "",
|
|
787
|
+
loading: !0
|
|
788
|
+
})) : w("", !0),
|
|
789
|
+
m(l, {
|
|
790
|
+
layout: r.labelPosition,
|
|
791
|
+
class: V([[r.customClass, s.readModeFlag ? "readonly-mode-form" : ""], "render-form tpf-form"]),
|
|
792
|
+
"label-width": r.labelWidth,
|
|
793
|
+
"validate-on-rule-change": !1,
|
|
794
|
+
model: s.formDataModel,
|
|
795
|
+
ref: "renderForm",
|
|
796
|
+
onKeydown: E(r.onFormEnterKey, ["enter"])
|
|
797
|
+
}, {
|
|
798
|
+
default: j(() => [
|
|
799
|
+
m(a, {
|
|
800
|
+
"parent-widget": null,
|
|
801
|
+
"widget-list": r.widgetList,
|
|
802
|
+
formDataModel: s.formDataModel,
|
|
803
|
+
"onUpdate:formDataModel": e[0] || (e[0] = (L) => s.formDataModel = L)
|
|
804
|
+
}, null, 8, ["widget-list", "formDataModel"])
|
|
805
|
+
]),
|
|
806
|
+
_: 1
|
|
807
|
+
}, 8, ["layout", "class", "label-width", "model", "onKeydown"])
|
|
808
|
+
], 4),
|
|
809
|
+
m(R, k(s.dialogProps, { ref: "dynamicDialgRef" }), null, 16)
|
|
826
810
|
], 64);
|
|
827
811
|
}
|
|
828
|
-
const
|
|
812
|
+
const ct = /* @__PURE__ */ Y(Z, [["render", I], ["__scopeId", "data-v-efb592b3"]]);
|
|
829
813
|
export {
|
|
830
|
-
|
|
814
|
+
ct as default
|
|
831
815
|
};
|
|
@@ -1,190 +1,197 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as k, createElementBlock as
|
|
1
|
+
import B from "./ActionButtonListDialog.vue2.js";
|
|
2
|
+
import { resolveComponent as k, createElementBlock as U, openBlock as u, Fragment as z, createVNode as d, createElementVNode as $, withCtx as n, createBlock as s, createCommentVNode as p, createTextVNode as o, normalizeClass as b, toDisplayString as f } from "vue";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import E from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
return
|
|
9
|
-
|
|
5
|
+
const V = { class: "add-btn" };
|
|
6
|
+
function w(e, t, D, S, H, N) {
|
|
7
|
+
const h = k("a-input"), r = k("a-select-option"), m = k("a-select"), C = k("a-switch"), y = k("TpfSelectIcon"), g = k("a-button"), _ = k("s-table"), c = k("CodeModalEditor");
|
|
8
|
+
return u(), U(z, null, [
|
|
9
|
+
d(_, {
|
|
10
10
|
deepWatchDataSource: "",
|
|
11
11
|
"data-source": e.buttonList,
|
|
12
12
|
pagination: !1,
|
|
13
13
|
resizable: !0,
|
|
14
14
|
columns: e.columns,
|
|
15
|
-
"row-key": (
|
|
15
|
+
"row-key": (i) => i.name
|
|
16
16
|
}, {
|
|
17
|
-
bodyCell: n(({ column:
|
|
18
|
-
|
|
17
|
+
bodyCell: n(({ column: i, recordIndexs: a, index: L, record: v }) => [
|
|
18
|
+
i.dataIndex === "label" ? (u(), s(h, {
|
|
19
19
|
key: 0,
|
|
20
|
-
value: e.buttonList[
|
|
21
|
-
"onUpdate:value": (
|
|
20
|
+
value: e.buttonList[a[0]].label,
|
|
21
|
+
"onUpdate:value": (l) => e.buttonList[a[0]].label = l,
|
|
22
22
|
placeholder: e.i18nt("designer.setting.operationButtonLabel")
|
|
23
|
-
}, null, 8, ["value", "onUpdate:value", "placeholder"])) :
|
|
24
|
-
|
|
23
|
+
}, null, 8, ["value", "onUpdate:value", "placeholder"])) : p("", !0),
|
|
24
|
+
i.dataIndex === "type" ? (u(), s(m, {
|
|
25
25
|
key: 1,
|
|
26
|
-
value: e.buttonList[
|
|
27
|
-
"onUpdate:value": (
|
|
26
|
+
value: e.buttonList[a[0]].type,
|
|
27
|
+
"onUpdate:value": (l) => e.buttonList[a[0]].type = l,
|
|
28
28
|
placeholder: e.i18nt("designer.setting.operationButtonType"),
|
|
29
29
|
style: { width: "100%" }
|
|
30
30
|
}, {
|
|
31
31
|
default: n(() => [
|
|
32
|
-
|
|
32
|
+
d(r, { value: "primary" }, {
|
|
33
33
|
default: n(() => t[0] || (t[0] = [
|
|
34
|
-
|
|
34
|
+
o("primary")
|
|
35
35
|
])),
|
|
36
36
|
_: 1,
|
|
37
37
|
__: [0]
|
|
38
38
|
}),
|
|
39
|
-
|
|
39
|
+
d(r, { value: "ghost" }, {
|
|
40
40
|
default: n(() => t[1] || (t[1] = [
|
|
41
|
-
|
|
41
|
+
o("ghost")
|
|
42
42
|
])),
|
|
43
43
|
_: 1,
|
|
44
44
|
__: [1]
|
|
45
45
|
}),
|
|
46
|
-
|
|
46
|
+
d(r, { value: "dashed" }, {
|
|
47
47
|
default: n(() => t[2] || (t[2] = [
|
|
48
|
-
|
|
48
|
+
o("dashed")
|
|
49
49
|
])),
|
|
50
50
|
_: 1,
|
|
51
51
|
__: [2]
|
|
52
52
|
}),
|
|
53
|
-
|
|
53
|
+
d(r, { value: "text" }, {
|
|
54
54
|
default: n(() => t[3] || (t[3] = [
|
|
55
|
-
|
|
55
|
+
o("text")
|
|
56
56
|
])),
|
|
57
57
|
_: 1,
|
|
58
58
|
__: [3]
|
|
59
59
|
}),
|
|
60
|
-
|
|
60
|
+
d(r, { value: "link" }, {
|
|
61
61
|
default: n(() => t[4] || (t[4] = [
|
|
62
|
-
|
|
62
|
+
o("link")
|
|
63
63
|
])),
|
|
64
64
|
_: 1,
|
|
65
65
|
__: [4]
|
|
66
66
|
}),
|
|
67
|
-
|
|
67
|
+
d(r, { value: "default" }, {
|
|
68
68
|
default: n(() => t[5] || (t[5] = [
|
|
69
|
-
|
|
69
|
+
o("default")
|
|
70
70
|
])),
|
|
71
71
|
_: 1,
|
|
72
72
|
__: [5]
|
|
73
73
|
})
|
|
74
74
|
]),
|
|
75
75
|
_: 2
|
|
76
|
-
}, 1032, ["value", "onUpdate:value", "placeholder"])) :
|
|
77
|
-
|
|
76
|
+
}, 1032, ["value", "onUpdate:value", "placeholder"])) : p("", !0),
|
|
77
|
+
i.dataIndex === "size" ? (u(), s(m, {
|
|
78
78
|
key: 2,
|
|
79
|
-
value: e.buttonList[
|
|
80
|
-
"onUpdate:value": (
|
|
79
|
+
value: e.buttonList[a[0]].size,
|
|
80
|
+
"onUpdate:value": (l) => e.buttonList[a[0]].size = l,
|
|
81
81
|
placeholder: e.i18nt("designer.setting.size"),
|
|
82
82
|
style: { width: "100%" }
|
|
83
83
|
}, {
|
|
84
84
|
default: n(() => [
|
|
85
|
-
|
|
85
|
+
d(r, { value: "default" }, {
|
|
86
86
|
default: n(() => t[6] || (t[6] = [
|
|
87
|
-
|
|
87
|
+
o("default")
|
|
88
88
|
])),
|
|
89
89
|
_: 1,
|
|
90
90
|
__: [6]
|
|
91
91
|
}),
|
|
92
|
-
|
|
92
|
+
d(r, { value: "small" }, {
|
|
93
93
|
default: n(() => t[7] || (t[7] = [
|
|
94
|
-
|
|
94
|
+
o("small")
|
|
95
95
|
])),
|
|
96
96
|
_: 1,
|
|
97
97
|
__: [7]
|
|
98
98
|
}),
|
|
99
|
-
|
|
99
|
+
d(r, { value: "large" }, {
|
|
100
100
|
default: n(() => t[8] || (t[8] = [
|
|
101
|
-
|
|
101
|
+
o("large")
|
|
102
102
|
])),
|
|
103
103
|
_: 1,
|
|
104
104
|
__: [8]
|
|
105
105
|
})
|
|
106
106
|
]),
|
|
107
107
|
_: 2
|
|
108
|
-
}, 1032, ["value", "onUpdate:value", "placeholder"])) :
|
|
109
|
-
|
|
108
|
+
}, 1032, ["value", "onUpdate:value", "placeholder"])) : p("", !0),
|
|
109
|
+
i.dataIndex === "ghost" ? (u(), s(C, {
|
|
110
110
|
key: 3,
|
|
111
|
-
value: e.buttonList[l[0]].icon,
|
|
112
|
-
"onUpdate:value": (o) => e.buttonList[l[0]].icon = o
|
|
113
|
-
}, null, 8, ["value", "onUpdate:value"])) : r("", !0),
|
|
114
|
-
d.dataIndex === "danger" ? (s(), p(_, {
|
|
115
|
-
key: 4,
|
|
116
111
|
checkedValue: 1,
|
|
117
112
|
unCheckedValue: 0,
|
|
118
|
-
checked: e.buttonList[
|
|
119
|
-
"onUpdate:checked": (
|
|
120
|
-
}, null, 8, ["checked", "onUpdate:checked"])) :
|
|
121
|
-
|
|
113
|
+
checked: e.buttonList[a[0]].ghost,
|
|
114
|
+
"onUpdate:checked": (l) => e.buttonList[a[0]].ghost = l
|
|
115
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : p("", !0),
|
|
116
|
+
i.dataIndex === "icon" ? (u(), s(y, {
|
|
117
|
+
key: 4,
|
|
118
|
+
value: e.buttonList[a[0]].icon,
|
|
119
|
+
"onUpdate:value": (l) => e.buttonList[a[0]].icon = l
|
|
120
|
+
}, null, 8, ["value", "onUpdate:value"])) : p("", !0),
|
|
121
|
+
i.dataIndex === "danger" ? (u(), s(C, {
|
|
122
122
|
key: 5,
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
checkedValue: 1,
|
|
124
|
+
unCheckedValue: 0,
|
|
125
|
+
checked: e.buttonList[a[0]].danger,
|
|
126
|
+
"onUpdate:checked": (l) => e.buttonList[a[0]].danger = l
|
|
127
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : p("", !0),
|
|
128
|
+
i.dataIndex === "onHidden" ? (u(), s(g, {
|
|
129
|
+
key: 6,
|
|
130
|
+
class: b([{ "button-text-highlight": !!v.onHidden }]),
|
|
131
|
+
onClick: (l) => e.editClickEvent("onHidden", v, a),
|
|
125
132
|
size: "small"
|
|
126
133
|
}, {
|
|
127
134
|
default: n(() => [
|
|
128
|
-
|
|
135
|
+
o(f(e.i18nt("designer.setting.operationButtonHidden")), 1)
|
|
129
136
|
]),
|
|
130
137
|
_: 2
|
|
131
|
-
}, 1032, ["class", "onClick"])) :
|
|
132
|
-
|
|
133
|
-
key:
|
|
134
|
-
class:
|
|
135
|
-
onClick: (
|
|
138
|
+
}, 1032, ["class", "onClick"])) : p("", !0),
|
|
139
|
+
i.dataIndex === "onDisabled" ? (u(), s(g, {
|
|
140
|
+
key: 7,
|
|
141
|
+
class: b([{ "button-text-highlight": !!v.onDisabled }]),
|
|
142
|
+
onClick: (l) => e.editClickEvent("onDisabled", v, a),
|
|
136
143
|
size: "small"
|
|
137
144
|
}, {
|
|
138
145
|
default: n(() => [
|
|
139
|
-
|
|
146
|
+
o(f(e.i18nt("designer.setting.operationButtonDisabled")), 1)
|
|
140
147
|
]),
|
|
141
148
|
_: 2
|
|
142
|
-
}, 1032, ["class", "onClick"])) :
|
|
143
|
-
|
|
144
|
-
key:
|
|
145
|
-
class:
|
|
146
|
-
onClick: (
|
|
149
|
+
}, 1032, ["class", "onClick"])) : p("", !0),
|
|
150
|
+
i.dataIndex === "onClick" ? (u(), s(g, {
|
|
151
|
+
key: 8,
|
|
152
|
+
class: b([{ "button-text-highlight": !!v.onClick }]),
|
|
153
|
+
onClick: (l) => e.editClickEvent("onClick", v, a),
|
|
147
154
|
size: "small"
|
|
148
155
|
}, {
|
|
149
156
|
default: n(() => [
|
|
150
|
-
|
|
157
|
+
o(f(e.i18nt("designer.setting.operationButtonClick")), 1)
|
|
151
158
|
]),
|
|
152
159
|
_: 2
|
|
153
|
-
}, 1032, ["class", "onClick"])) :
|
|
154
|
-
|
|
155
|
-
key:
|
|
160
|
+
}, 1032, ["class", "onClick"])) : p("", !0),
|
|
161
|
+
i.dataIndex === "action" ? (u(), s(g, {
|
|
162
|
+
key: 9,
|
|
156
163
|
type: "link",
|
|
157
|
-
onClick: (
|
|
164
|
+
onClick: (l) => e.deleteOperationButton(L),
|
|
158
165
|
size: "small"
|
|
159
166
|
}, {
|
|
160
167
|
default: n(() => [
|
|
161
|
-
|
|
168
|
+
o(f(e.i18nt("designer.setting.delete")), 1)
|
|
162
169
|
]),
|
|
163
170
|
_: 2
|
|
164
|
-
}, 1032, ["onClick"])) :
|
|
171
|
+
}, 1032, ["onClick"])) : p("", !0)
|
|
165
172
|
]),
|
|
166
173
|
_: 1
|
|
167
174
|
}, 8, ["data-source", "columns", "row-key"]),
|
|
168
|
-
$("div",
|
|
169
|
-
|
|
175
|
+
$("div", V, [
|
|
176
|
+
d(g, {
|
|
170
177
|
type: "primary",
|
|
171
178
|
size: "default",
|
|
172
179
|
onClick: e.addOperationButton
|
|
173
180
|
}, {
|
|
174
181
|
default: n(() => [
|
|
175
|
-
|
|
182
|
+
o(f(e.i18nt("designer.setting.addOperationButton")), 1)
|
|
176
183
|
]),
|
|
177
184
|
_: 1
|
|
178
185
|
}, 8, ["onClick"])
|
|
179
186
|
]),
|
|
180
|
-
|
|
187
|
+
d(c, {
|
|
181
188
|
ref: "codeModalEditorRef",
|
|
182
189
|
onSave: e.saveColumnRender,
|
|
183
190
|
"event-header": `${e.currentEditBtn}(${e.parmas}){`
|
|
184
191
|
}, null, 8, ["onSave", "event-header"])
|
|
185
192
|
], 64);
|
|
186
193
|
}
|
|
187
|
-
const A = /* @__PURE__ */ E(
|
|
194
|
+
const A = /* @__PURE__ */ E(B, [["render", w], ["__scopeId", "data-v-739c411e"]]);
|
|
188
195
|
export {
|
|
189
196
|
A as default
|
|
190
197
|
};
|