@kp-ui/lowcode 2.14.0-beta → 2.14.0-beta.10
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/install.js +26 -25
- package/package.json +2 -2
- package/src/components/FormRender/useFormRender.js +18 -0
- 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/index.js +6 -6
- 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 +20 -19
- 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 +1 -1
- 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/index.vue.js +55 -54
- package/src/components/form-designer/setting-panel/form-crud-setting.vue.js +62 -23
- 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 +4 -386
- package/src/components/form-designer/setting-panel/index.vue2.js +273 -0
- package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue2.js +5 -4
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/customRowEvent/data-table-customRow-editor.vue.js +1 -0
- 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 +26 -24
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-pagination-editor.vue.js +1 -0
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-selections-editor.vue2.js +24 -24
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-showButtonsColumn-editor.vue.js +9 -8
- 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 +13 -12
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/bodyStyle-editor.vue2.js +7 -6
- 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/customRender-editor.vue.js +2 -40
- package/src/components/form-designer/setting-panel/property-editor/customRender-editor.vue2.js +41 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onClickIcon-editor.vue.js +2 -47
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onClickIcon-editor.vue2.js +44 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onCreated-editor.vue.js +2 -47
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onCreated-editor.vue2.js +43 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onOkButtonClick-editor.vue.js +2 -46
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onOkButtonClick-editor.vue2.js +43 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onValidate-editor.vue.js +2 -47
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onValidate-editor.vue2.js +44 -0
- package/src/components/form-designer/setting-panel/property-editor/field-dropdown/dropdown-menuList-editor.vue.js +2 -66
- package/src/components/form-designer/setting-panel/property-editor/field-dropdown/dropdown-menuList-editor.vue2.js +42 -0
- package/src/components/form-designer/setting-panel/property-editor/field-html-text/htmlContent-editor.vue.js +5 -4
- package/src/components/form-designer/setting-panel/property-editor/hidden-editor.vue.js +6 -5
- package/src/components/form-designer/setting-panel/property-editor/index.js +146 -153
- package/src/components/form-designer/setting-panel/property-editor/labelIconClass-editor.vue.js +8 -7
- package/src/components/form-designer/setting-panel/property-editor/optionItems-editor.vue.js +38 -35
- package/src/components/form-designer/setting-panel/propertyRegister.js +3 -18
- 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-render/RenderWigetList.vue.js +61 -0
- package/src/components/form-render/RenderWigetList.vue2.js +4 -0
- package/src/components/form-render/SubmitButtonRender.vue.js +33 -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 +135 -0
- package/src/components/form-render/container-item/grid-col-item.vue.js +149 -0
- package/src/components/form-render/container-item/grid-item.vue.js +92 -0
- package/src/components/form-render/container-item/grid-sub-form-item.vue.js +319 -0
- package/src/components/form-render/container-item/index.js +24 -0
- package/src/components/form-render/container-item/sub-form-item.vue.js +398 -0
- package/src/components/form-render/container-item/tab-item.vue.js +160 -0
- package/src/components/form-render/container-item/table-cell-item.vue.js +95 -0
- package/src/components/form-render/container-item/table-item.vue.js +96 -0
- package/src/components/form-render/container-item/vf-collapse-item.vue.js +252 -0
- package/src/components/form-render/container-item/vf-dialog-item.vue.js +12 -0
- package/src/components/form-render/container-item/vf-drawer-item.vue.js +12 -0
- package/src/components/form-render/dynamic-dialog.vue.js +66 -81
- package/src/components/form-render/index.vue.js +96 -114
- package/src/components/http-editor/index.vue.js +10 -10
- package/src/components/public/ActionButtonListRender.vue.js +19 -24
- package/src/hooks/useLowcode.js +40 -39
- package/src/lang/en-US.js +4 -4
- package/src/lang/zh-CN.js +3 -4
- package/src/mixins/useDataTableMixin.js +18 -23
- package/src/utils/useEmitter.js +57 -0
- package/src/utils/util.js +50 -49
- package/stats.html +1 -1
- package/styles/style.css +1 -1
- package/src/components/form-designer/setting-panel/property-editor/displayStyle-editor.vue.js +0 -46
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onVformAdd-editor.vue.js +0 -49
- package/src/components/form-designer/setting-panel/property-editor/labelTooltip-editor.vue.js +0 -31
- package/src/components/form-designer/setting-panel/property-editor/multipleSelect-editor.vue.js +0 -30
- package/src/components/form-designer/setting-panel/property-editor/uploadTip-editor.vue.js +0 -31
- package/src/components/form-designer/setting-panel/property-editor/uploadURL-editor.vue.js +0 -44
- package/src/components/form-designer/setting-panel/property-editor/withCredentials-editor.vue.js +0 -30
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
const e = {
|
|
2
|
-
//字段
|
|
3
2
|
name: "name-editor",
|
|
4
3
|
label: "label-editor",
|
|
5
4
|
labelAlign: "labelAlign-editor",
|
|
@@ -17,7 +16,6 @@ const e = {
|
|
|
17
16
|
autoFullWidth: "autoFullWidth-editor",
|
|
18
17
|
size: "size-editor",
|
|
19
18
|
flex: "flex-editor",
|
|
20
|
-
// displayStyle: 'displayStyle-editor',
|
|
21
19
|
buttonStyle: "buttonStyle-editor",
|
|
22
20
|
border: "border-editor",
|
|
23
21
|
labelWidth: "labelWidth-editor",
|
|
@@ -59,24 +57,14 @@ const e = {
|
|
|
59
57
|
diyCompontent: "diy-compontent-editor",
|
|
60
58
|
format: "format-editor",
|
|
61
59
|
valueFormat: "valueFormat-editor",
|
|
62
|
-
// filterable: 'filterable-editor',
|
|
63
|
-
// allowCreate: 'allowCreate-editor',
|
|
64
60
|
showSearch: "showSearch-editor",
|
|
65
|
-
// automaticDropdown: 'automaticDropdown-editor',
|
|
66
|
-
// checkStrictly: 'checkStrictly-editor',
|
|
67
|
-
// showAllLevels: 'showAllLevels-editor',
|
|
68
61
|
multiple: "multiple-editor",
|
|
69
62
|
accept: "accept-editor",
|
|
70
|
-
// multipleLimit: 'multipleLimit-editor',
|
|
71
63
|
mode: "mode-editor",
|
|
72
64
|
menuList: "menuList-editor",
|
|
73
65
|
contentPosition: "contentPosition-editor",
|
|
74
66
|
optionItems: "optionItems-editor",
|
|
75
67
|
treeData: "tree-data-editor",
|
|
76
|
-
// uploadURL: 'uploadURL-editor',
|
|
77
|
-
// uploadTip: 'uploadTip-editor',
|
|
78
|
-
// withCredentials: 'withCredentials-editor',
|
|
79
|
-
// multipleSelect: 'multipleSelect-editor',
|
|
80
68
|
limit: "limit-editor",
|
|
81
69
|
maxSize: "maxSize-editor",
|
|
82
70
|
fileTypes: "fileTypes-editor",
|
|
@@ -154,7 +142,6 @@ const e = {
|
|
|
154
142
|
icon: "icon-editor",
|
|
155
143
|
labelIconClass: "labelIconClass-editor",
|
|
156
144
|
labelIconPosition: "labelIconPosition-editor",
|
|
157
|
-
labelTooltip: "labelTooltip-editor",
|
|
158
145
|
appendButton: "appendButton-editor",
|
|
159
146
|
appendButtonDisabled: "appendButtonDisabled-editor",
|
|
160
147
|
buttonIcon: "buttonIcon-editor"
|
|
@@ -206,15 +193,13 @@ const e = {
|
|
|
206
193
|
onDrawerBeforeClose: "onDrawerBeforeClose-editor",
|
|
207
194
|
customRow: "customRow-editor"
|
|
208
195
|
};
|
|
209
|
-
|
|
210
|
-
return !!e[o] || !!t[o] || !!i[o];
|
|
211
|
-
}
|
|
196
|
+
var d = /* @__PURE__ */ ((o) => (o.Common = "COMMON", o.Advanced = "ADVANCED", o.Event = "EVENT", o))(d || {});
|
|
212
197
|
const r = {
|
|
213
198
|
COMMON_PROPERTIES: e,
|
|
214
199
|
ADVANCED_PROPERTIES: t,
|
|
215
200
|
EVENT_PROPERTIES: i
|
|
216
201
|
};
|
|
217
202
|
export {
|
|
218
|
-
|
|
219
|
-
|
|
203
|
+
d as PROPERTY_TYPE,
|
|
204
|
+
r as default
|
|
220
205
|
};
|
|
@@ -6,12 +6,12 @@ const l = (t = {}) => ({
|
|
|
6
6
|
icon: "data-table",
|
|
7
7
|
widgetList: [],
|
|
8
8
|
options: {
|
|
9
|
+
lineHeight: 50,
|
|
9
10
|
name: "",
|
|
10
11
|
label: "data-table",
|
|
11
12
|
hidden: !1,
|
|
12
13
|
tableHeight: "300px",
|
|
13
14
|
tableWidth: "100%",
|
|
14
|
-
lineHeight: 50,
|
|
15
15
|
customClass: [],
|
|
16
16
|
showIndex: !1,
|
|
17
17
|
showPagination: !0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const
|
|
1
|
+
const l = (e = {}) => ({
|
|
2
2
|
type: "rich-editor",
|
|
3
3
|
icon: "rich-editor-field",
|
|
4
|
-
id:
|
|
4
|
+
id: e.name,
|
|
5
5
|
formItemFlag: !0,
|
|
6
6
|
options: {
|
|
7
7
|
name: "",
|
|
@@ -21,15 +21,14 @@ const e = (l = {}) => ({
|
|
|
21
21
|
customClass: [],
|
|
22
22
|
labelIconClass: null,
|
|
23
23
|
labelIconPosition: "rear",
|
|
24
|
-
labelTooltip: null,
|
|
25
24
|
maxLength: null,
|
|
26
25
|
showCount: !1,
|
|
27
26
|
onCreated: "",
|
|
28
27
|
onMounted: "",
|
|
29
28
|
onValidate: "",
|
|
30
|
-
...
|
|
29
|
+
...e
|
|
31
30
|
}
|
|
32
31
|
});
|
|
33
32
|
export {
|
|
34
|
-
|
|
33
|
+
l as richEditor
|
|
35
34
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getUuidKey as a } from "@kp-ui/tool";
|
|
2
|
-
const
|
|
2
|
+
const d = (e = {}) => ({
|
|
3
3
|
key: a(),
|
|
4
4
|
id: e.name,
|
|
5
5
|
type: "checkbox",
|
|
@@ -48,7 +48,6 @@ return {...data,data:d}`,
|
|
|
48
48
|
//自定义css类名
|
|
49
49
|
labelIconClass: null,
|
|
50
50
|
labelIconPosition: "rear",
|
|
51
|
-
labelTooltip: null,
|
|
52
51
|
//-------------------
|
|
53
52
|
onCreated: "",
|
|
54
53
|
onMounted: "",
|
|
@@ -58,5 +57,5 @@ return {...data,data:d}`,
|
|
|
58
57
|
}
|
|
59
58
|
});
|
|
60
59
|
export {
|
|
61
|
-
|
|
60
|
+
d as checkbox
|
|
62
61
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getUuidKey as
|
|
2
|
-
const n = (
|
|
3
|
-
key:
|
|
4
|
-
id:
|
|
1
|
+
import { getUuidKey as l } from "@kp-ui/tool";
|
|
2
|
+
const n = (e = {}) => ({
|
|
3
|
+
key: l(),
|
|
4
|
+
id: e.name,
|
|
5
5
|
type: "rate",
|
|
6
6
|
icon: "rate-field",
|
|
7
7
|
formItemFlag: !0,
|
|
@@ -26,7 +26,6 @@ const n = (l = {}) => ({
|
|
|
26
26
|
//自定义css类名
|
|
27
27
|
labelIconClass: null,
|
|
28
28
|
labelIconPosition: "rear",
|
|
29
|
-
labelTooltip: null,
|
|
30
29
|
count: 5,
|
|
31
30
|
allowHalf: !1,
|
|
32
31
|
//-------------------
|
|
@@ -34,7 +33,7 @@ const n = (l = {}) => ({
|
|
|
34
33
|
onMounted: "",
|
|
35
34
|
onChange: "",
|
|
36
35
|
onValidate: "",
|
|
37
|
-
...
|
|
36
|
+
...e
|
|
38
37
|
}
|
|
39
38
|
});
|
|
40
39
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getUuidKey as l } from "@kp-ui/tool";
|
|
2
|
-
const
|
|
2
|
+
const t = (e = {}) => ({
|
|
3
3
|
key: l(),
|
|
4
4
|
id: e.name,
|
|
5
5
|
type: "select",
|
|
@@ -57,7 +57,6 @@ return {...data,data:d}`,
|
|
|
57
57
|
//自定义css类名
|
|
58
58
|
labelIconClass: null,
|
|
59
59
|
labelIconPosition: "rear",
|
|
60
|
-
labelTooltip: null,
|
|
61
60
|
//-------------------
|
|
62
61
|
onCreated: "",
|
|
63
62
|
onMounted: "",
|
|
@@ -71,5 +70,5 @@ return {...data,data:d}`,
|
|
|
71
70
|
}
|
|
72
71
|
});
|
|
73
72
|
export {
|
|
74
|
-
|
|
73
|
+
t as select
|
|
75
74
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getUuidKey as a } from "@kp-ui/tool";
|
|
2
|
-
const
|
|
2
|
+
const t = (e = {}) => ({
|
|
3
3
|
key: a(),
|
|
4
4
|
id: e.name,
|
|
5
5
|
showName: "选择工序",
|
|
@@ -63,7 +63,6 @@ const l = (e = {}) => ({
|
|
|
63
63
|
customClass: [],
|
|
64
64
|
labelIconClass: null,
|
|
65
65
|
labelIconPosition: "rear",
|
|
66
|
-
labelTooltip: null,
|
|
67
66
|
onCreated: "",
|
|
68
67
|
onMounted: "",
|
|
69
68
|
onChange: "",
|
|
@@ -75,5 +74,5 @@ const l = (e = {}) => ({
|
|
|
75
74
|
}
|
|
76
75
|
});
|
|
77
76
|
export {
|
|
78
|
-
|
|
77
|
+
t as operationSelect
|
|
79
78
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getUuidKey as a } from "@kp-ui/tool";
|
|
2
|
-
const
|
|
2
|
+
const t = (e = {}) => ({
|
|
3
3
|
key: a(),
|
|
4
4
|
id: e.name,
|
|
5
5
|
showName: "选择项目组",
|
|
@@ -63,7 +63,6 @@ const l = (e = {}) => ({
|
|
|
63
63
|
customClass: [],
|
|
64
64
|
labelIconClass: null,
|
|
65
65
|
labelIconPosition: "rear",
|
|
66
|
-
labelTooltip: null,
|
|
67
66
|
onCreated: "",
|
|
68
67
|
onMounted: "",
|
|
69
68
|
onChange: "",
|
|
@@ -75,5 +74,5 @@ const l = (e = {}) => ({
|
|
|
75
74
|
}
|
|
76
75
|
});
|
|
77
76
|
export {
|
|
78
|
-
|
|
77
|
+
t as projectGroupSelect
|
|
79
78
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getUuidKey as a } from "@kp-ui/tool";
|
|
2
|
-
const
|
|
2
|
+
const l = (e = {}) => ({
|
|
3
3
|
key: a(),
|
|
4
4
|
id: e.name,
|
|
5
5
|
showName: "选择项目",
|
|
@@ -59,7 +59,6 @@ const o = (e = {}) => ({
|
|
|
59
59
|
customClass: [],
|
|
60
60
|
labelIconClass: null,
|
|
61
61
|
labelIconPosition: "rear",
|
|
62
|
-
labelTooltip: null,
|
|
63
62
|
onCreated: "",
|
|
64
63
|
onMounted: "",
|
|
65
64
|
onChange: "",
|
|
@@ -71,5 +70,5 @@ const o = (e = {}) => ({
|
|
|
71
70
|
}
|
|
72
71
|
});
|
|
73
72
|
export {
|
|
74
|
-
|
|
73
|
+
l as projectSelect
|
|
75
74
|
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { defineComponent as U, mergeModels as W, useModel as C, createElementBlock as i, openBlock as r, Fragment as m, renderList as d, createBlock as p, resolveDynamicComponent as f, unref as u, createSlots as g, withCtx as v, renderSlot as M, mergeProps as k } from "vue";
|
|
2
|
+
import { useFormRender as $ } from "../FormRender/useFormRender.js";
|
|
3
|
+
const F = /* @__PURE__ */ U({
|
|
4
|
+
name: "RenderWigetList",
|
|
5
|
+
__name: "RenderWigetList",
|
|
6
|
+
props: /* @__PURE__ */ W({
|
|
7
|
+
widgetList: { default: () => [] },
|
|
8
|
+
parentWidget: { default: null }
|
|
9
|
+
}, {
|
|
10
|
+
formDataModel: {
|
|
11
|
+
default: () => ({})
|
|
12
|
+
},
|
|
13
|
+
formDataModelModifiers: {}
|
|
14
|
+
}),
|
|
15
|
+
emits: ["update:formDataModel"],
|
|
16
|
+
setup(y) {
|
|
17
|
+
const a = C(y, "formDataModel"), { getContainerWidget: D, getFieldWidget: L } = $();
|
|
18
|
+
return (n, o) => (r(!0), i(m, null, d(n.widgetList, (e, s) => (r(), i(m, null, [
|
|
19
|
+
e.category === "container" ? (r(), p(f(u(D)(e)), {
|
|
20
|
+
widget: e,
|
|
21
|
+
key: e.id,
|
|
22
|
+
data: a.value[e.options.name],
|
|
23
|
+
"onUpdate:data": (t) => a.value[e.options.name] = t,
|
|
24
|
+
"parent-list": n.parentWidget,
|
|
25
|
+
"index-of-parent-list": s,
|
|
26
|
+
"parent-widget": e,
|
|
27
|
+
model: a.value,
|
|
28
|
+
"onUpdate:model": o[0] || (o[0] = (t) => a.value = t)
|
|
29
|
+
}, g({ _: 2 }, [
|
|
30
|
+
d(Object.keys(n.$slots), (t) => ({
|
|
31
|
+
name: t,
|
|
32
|
+
fn: v((l) => [
|
|
33
|
+
M(n.$slots, t, k({ ref_for: !0 }, l))
|
|
34
|
+
])
|
|
35
|
+
}))
|
|
36
|
+
]), 1064, ["widget", "data", "onUpdate:data", "parent-list", "index-of-parent-list", "parent-widget", "model"])) : (r(), p(f(u(L)(e)), {
|
|
37
|
+
field: e,
|
|
38
|
+
"form-model": a.value,
|
|
39
|
+
"onUpdate:formModel": o[1] || (o[1] = (t) => a.value = t),
|
|
40
|
+
designer: null,
|
|
41
|
+
key: e.id,
|
|
42
|
+
widget: e,
|
|
43
|
+
"parent-list": n.widgetList,
|
|
44
|
+
"index-of-parent-list": s,
|
|
45
|
+
"parent-widget": e,
|
|
46
|
+
data: a.value[e.options.name],
|
|
47
|
+
"onUpdate:data": (t) => a.value[e.options.name] = t
|
|
48
|
+
}, g({ _: 2 }, [
|
|
49
|
+
d(Object.keys(n.$slots), (t) => ({
|
|
50
|
+
name: t,
|
|
51
|
+
fn: v((l) => [
|
|
52
|
+
M(n.$slots, t, k({ ref_for: !0 }, l))
|
|
53
|
+
])
|
|
54
|
+
}))
|
|
55
|
+
]), 1064, ["field", "form-model", "widget", "parent-list", "index-of-parent-list", "parent-widget", "data", "onUpdate:data"]))
|
|
56
|
+
], 64))), 256));
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
export {
|
|
60
|
+
F as default
|
|
61
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as F, ref as p, computed as a, resolveComponent as B, createBlock as u, openBlock as r, withCtx as s, createCommentVNode as m, createTextVNode as k, toDisplayString as v } from "vue";
|
|
2
|
+
import { executeFunction as C } from "../../utils/executeFunction.js";
|
|
2
3
|
import { useI18n as L } from "../../utils/i18n.js";
|
|
3
|
-
const
|
|
4
|
+
const D = /* @__PURE__ */ F({
|
|
4
5
|
__name: "SubmitButtonRender",
|
|
5
6
|
props: {
|
|
6
7
|
goBack: { type: Function },
|
|
@@ -10,39 +11,42 @@ const W = /* @__PURE__ */ S({
|
|
|
10
11
|
ctx: {}
|
|
11
12
|
},
|
|
12
13
|
emits: ["update:dialogVisible"],
|
|
13
|
-
setup(
|
|
14
|
-
const e =
|
|
14
|
+
setup(y, { emit: g }) {
|
|
15
|
+
const e = y, _ = g, l = p(!1), i = p(!1), { i18nt: d } = L(), c = a(() => (e == null ? void 0 : e.options) ?? {}), h = a(() => c.value.cancelButtonHidden != null ? c.value.cancelButtonHidden === 0 : 0), x = a(() => c.value.okButtonHidden != null ? c.value.okButtonHidden === 0 : 0), b = a(
|
|
15
16
|
() => {
|
|
16
17
|
var t;
|
|
17
18
|
return ((t = e.options) == null ? void 0 : t.cancelButtonLabel) || d("designer.hint.cancel");
|
|
18
19
|
}
|
|
19
|
-
),
|
|
20
|
+
), H = a(
|
|
20
21
|
() => {
|
|
21
22
|
var t;
|
|
22
23
|
return ((t = e.options) == null ? void 0 : t.okButtonLabel) || d("designer.hint.confirm");
|
|
23
24
|
}
|
|
24
|
-
), f =
|
|
25
|
-
|
|
26
|
-
},
|
|
25
|
+
), f = () => {
|
|
26
|
+
_("update:dialogVisible", !1), e.deleteWrapperNode && setTimeout(e.deleteWrapperNode, 150);
|
|
27
|
+
}, w = async () => {
|
|
27
28
|
var t, n;
|
|
28
|
-
if (!
|
|
29
|
+
if (!i.value)
|
|
29
30
|
try {
|
|
30
|
-
if (
|
|
31
|
-
e.ctx,
|
|
32
|
-
(n = e.options) == null ? void 0 : n.onCancelButtonClick
|
|
33
|
-
) === !1) return;
|
|
34
|
-
e.goBack ? e.goBack() :
|
|
31
|
+
if (i.value = !0, e.handleBeforeClose && !((t = e == null ? void 0 : e.handleBeforeClose) != null && t.call(e)) || await C({
|
|
32
|
+
context: e.ctx,
|
|
33
|
+
functionBody: ((n = e.options) == null ? void 0 : n.onCancelButtonClick) || ""
|
|
34
|
+
}) === !1) return;
|
|
35
|
+
e.goBack ? e.goBack() : f();
|
|
35
36
|
} catch (o) {
|
|
36
37
|
console.error("取消操作失败:", o);
|
|
37
38
|
} finally {
|
|
38
|
-
|
|
39
|
+
i.value = !1;
|
|
39
40
|
}
|
|
40
|
-
},
|
|
41
|
+
}, N = async () => {
|
|
41
42
|
var t;
|
|
42
43
|
if (!l.value)
|
|
43
44
|
try {
|
|
44
|
-
if (l.value = !0, await
|
|
45
|
-
|
|
45
|
+
if (l.value = !0, await C({
|
|
46
|
+
context: e.ctx,
|
|
47
|
+
functionBody: ((t = e.options) == null ? void 0 : t.onOkButtonClick) || ""
|
|
48
|
+
}) === !1) return;
|
|
49
|
+
f();
|
|
46
50
|
} catch (n) {
|
|
47
51
|
console.error("提交操作失败:", n);
|
|
48
52
|
} finally {
|
|
@@ -50,30 +54,30 @@ const W = /* @__PURE__ */ S({
|
|
|
50
54
|
}
|
|
51
55
|
};
|
|
52
56
|
return (t, n) => {
|
|
53
|
-
const o = B("a-button"),
|
|
54
|
-
return r(), u(
|
|
57
|
+
const o = B("a-button"), S = B("a-space");
|
|
58
|
+
return r(), u(S, { x: 8 }, {
|
|
55
59
|
default: s(() => [
|
|
56
60
|
h.value ? (r(), u(o, {
|
|
57
61
|
key: "cancelButtonHidden",
|
|
58
|
-
loading:
|
|
59
|
-
onClick:
|
|
62
|
+
loading: i.value,
|
|
63
|
+
onClick: w
|
|
60
64
|
}, {
|
|
61
65
|
default: s(() => [
|
|
62
|
-
v(
|
|
66
|
+
k(v(b.value), 1)
|
|
63
67
|
]),
|
|
64
68
|
_: 1
|
|
65
|
-
}, 8, ["loading"])) :
|
|
66
|
-
|
|
69
|
+
}, 8, ["loading"])) : m("", !0),
|
|
70
|
+
x.value ? (r(), u(o, {
|
|
67
71
|
type: "primary",
|
|
68
72
|
key: "okButtonHidden",
|
|
69
73
|
loading: l.value,
|
|
70
|
-
onClick:
|
|
74
|
+
onClick: N
|
|
71
75
|
}, {
|
|
72
76
|
default: s(() => [
|
|
73
|
-
v(
|
|
77
|
+
k(v(H.value), 1)
|
|
74
78
|
]),
|
|
75
79
|
_: 1
|
|
76
|
-
}, 8, ["loading"])) :
|
|
80
|
+
}, 8, ["loading"])) : m("", !0)
|
|
77
81
|
]),
|
|
78
82
|
_: 1
|
|
79
83
|
});
|
|
@@ -81,5 +85,5 @@ const W = /* @__PURE__ */ S({
|
|
|
81
85
|
}
|
|
82
86
|
});
|
|
83
87
|
export {
|
|
84
|
-
|
|
88
|
+
D as default
|
|
85
89
|
};
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import c from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
const i = {
|
|
4
|
-
name: "container-item-wrapper",
|
|
5
|
-
props: {
|
|
6
|
-
widget: Object
|
|
7
|
-
},
|
|
8
|
-
computed: {
|
|
9
|
-
customClass() {
|
|
10
|
-
return this.widget.options.customClass ? this.widget.options.customClass.join(" ") : "";
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
function p(t, l, m, d, u, e) {
|
|
15
|
-
return o(), s("div", {
|
|
16
|
-
class: n(["container-wrapper", [e.customClass]]),
|
|
17
|
-
style: r(t.$attrs.containerStyle)
|
|
18
|
-
}, [
|
|
19
|
-
a(t.$slots, "default")
|
|
20
|
-
], 6);
|
|
21
|
-
}
|
|
22
|
-
const _ = /* @__PURE__ */ c(i, [["render", p]]);
|
|
1
|
+
import f from "./container-item-wrapper.vue2.js";
|
|
23
2
|
export {
|
|
24
|
-
|
|
3
|
+
f as default
|
|
25
4
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineComponent as r, computed as s, createElementBlock as a, openBlock as i, normalizeStyle as l, normalizeClass as p, renderSlot as c } from "vue";
|
|
2
|
+
const d = /* @__PURE__ */ r({
|
|
3
|
+
name: "container-item-wrapper",
|
|
4
|
+
__name: "container-item-wrapper",
|
|
5
|
+
props: {
|
|
6
|
+
widget: {}
|
|
7
|
+
},
|
|
8
|
+
setup(o) {
|
|
9
|
+
const e = o, n = s(() => e.widget.options.customClass ? e.widget.options.customClass.join(" ") : "");
|
|
10
|
+
return (t, m) => (i(), a("div", {
|
|
11
|
+
class: p(["container-wrapper", [n.value]]),
|
|
12
|
+
style: l(t.$attrs.containerStyle)
|
|
13
|
+
}, [
|
|
14
|
+
c(t.$slots, "default")
|
|
15
|
+
], 6));
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
d as default
|
|
20
|
+
};
|