@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,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as g, ref as a, computed as m, watch as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as g, ref as a, computed as m, watch as f } from "vue";
|
|
2
|
+
import h, { useI18n as v } from "../../utils/i18n.js";
|
|
3
|
+
import I from "../code-editor/code-modal-editor.vue.js";
|
|
4
4
|
import { generateId as B } from "../../utils/util.js";
|
|
5
5
|
import { TpfSelectIcon as x } from "tmgc2-share";
|
|
6
6
|
const z = g({
|
|
@@ -15,11 +15,11 @@ const z = g({
|
|
|
15
15
|
required: !0
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
-
components: { CodeModalEditor:
|
|
19
|
-
mixins: [
|
|
18
|
+
components: { CodeModalEditor: I, TpfSelectIcon: x },
|
|
19
|
+
mixins: [h],
|
|
20
20
|
emits: ["update:data"],
|
|
21
21
|
setup(r, { emit: u }) {
|
|
22
|
-
const { i18nt: t } =
|
|
22
|
+
const { i18nt: t } = v(), o = a(), d = a(), i = a(), p = [
|
|
23
23
|
{
|
|
24
24
|
dataIndex: "label",
|
|
25
25
|
title: t("designer.setting.operationButtonLabel"),
|
|
@@ -35,6 +35,11 @@ const z = g({
|
|
|
35
35
|
title: t("designer.setting.operationButtonSize"),
|
|
36
36
|
width: 80
|
|
37
37
|
},
|
|
38
|
+
{
|
|
39
|
+
dataIndex: "ghost",
|
|
40
|
+
title: t("designer.setting.operationButtonGhost"),
|
|
41
|
+
width: 80
|
|
42
|
+
},
|
|
38
43
|
{
|
|
39
44
|
dataIndex: "danger",
|
|
40
45
|
title: t("designer.setting.danger"),
|
|
@@ -66,7 +71,7 @@ const z = g({
|
|
|
66
71
|
width: 80
|
|
67
72
|
}
|
|
68
73
|
], n = m(() => r.data);
|
|
69
|
-
return
|
|
74
|
+
return f(
|
|
70
75
|
() => n.value,
|
|
71
76
|
() => {
|
|
72
77
|
u("update:data", n.value);
|
|
@@ -81,6 +86,7 @@ const z = g({
|
|
|
81
86
|
label: "new btn",
|
|
82
87
|
type: "primary",
|
|
83
88
|
size: "small",
|
|
89
|
+
ghost: !1,
|
|
84
90
|
shape: "default",
|
|
85
91
|
hidden: !1,
|
|
86
92
|
disabled: !1,
|
|
@@ -90,11 +96,11 @@ const z = g({
|
|
|
90
96
|
saveColumnRender: (e) => {
|
|
91
97
|
console.log(n.value, i.value, o.value), n.value[i.value][o.value] = e;
|
|
92
98
|
},
|
|
93
|
-
columns:
|
|
99
|
+
columns: p,
|
|
94
100
|
buttonList: n,
|
|
95
|
-
editClickEvent: (e, s,
|
|
101
|
+
editClickEvent: (e, s, c) => {
|
|
96
102
|
var l;
|
|
97
|
-
i.value =
|
|
103
|
+
i.value = c[0], o.value = e, console.log({ code: s[e] }), (l = d.value) == null || l.open(s[e]);
|
|
98
104
|
},
|
|
99
105
|
codeModalEditorRef: d,
|
|
100
106
|
currentEditBtn: o,
|
|
@@ -1,45 +1,46 @@
|
|
|
1
1
|
import d from "./ActionButtonListRender.vue2.js";
|
|
2
|
-
import { resolveComponent as n, createElementBlock as
|
|
2
|
+
import { resolveComponent as n, createElementBlock as a, openBlock as t, normalizeStyle as p, normalizeClass as u, createBlock as s, Teleport as b, createVNode as f, withCtx as l, Fragment as _, renderList as g, createCommentVNode as m, createTextVNode as y, toDisplayString as k } from "vue";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import
|
|
5
|
-
function
|
|
4
|
+
import C from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
function h(o, v, B, S, $, z) {
|
|
6
6
|
const r = n("SvgIcon"), c = n("a-button"), i = n("a-space");
|
|
7
|
-
return t(),
|
|
7
|
+
return t(), a("div", {
|
|
8
8
|
ref: "fieldEditor",
|
|
9
9
|
class: u(["button-list-container", ...o.customClass]),
|
|
10
10
|
style: p(o.containerStyle)
|
|
11
11
|
}, [
|
|
12
|
-
(t(),
|
|
12
|
+
(t(), s(b, {
|
|
13
13
|
disabled: o.isDisabled,
|
|
14
14
|
to: o.getContainer
|
|
15
15
|
}, [
|
|
16
16
|
f(i, { size: 8 }, {
|
|
17
17
|
default: l(() => [
|
|
18
|
-
(t(!0),
|
|
18
|
+
(t(!0), a(_, null, g(o.visibleButtons, (e) => (t(), s(c, {
|
|
19
19
|
key: e.key,
|
|
20
20
|
type: e.type,
|
|
21
21
|
danger: e.danger,
|
|
22
|
+
ghost: e.ghost,
|
|
22
23
|
class: "tpf-button",
|
|
23
24
|
disabled: o.handleDisabled(e),
|
|
24
25
|
onClick: (D) => o.handleClick(e)
|
|
25
26
|
}, {
|
|
26
27
|
default: l(() => [
|
|
27
|
-
e.icon ? (t(),
|
|
28
|
+
e.icon ? (t(), s(r, {
|
|
28
29
|
key: 0,
|
|
29
30
|
"icon-class": e.icon,
|
|
30
31
|
class: "button-icon"
|
|
31
|
-
}, null, 8, ["icon-class"])) :
|
|
32
|
-
|
|
32
|
+
}, null, 8, ["icon-class"])) : m("", !0),
|
|
33
|
+
y(" " + k(e.label), 1)
|
|
33
34
|
]),
|
|
34
35
|
_: 2
|
|
35
|
-
}, 1032, ["type", "danger", "disabled", "onClick"]))), 128))
|
|
36
|
+
}, 1032, ["type", "danger", "ghost", "disabled", "onClick"]))), 128))
|
|
36
37
|
]),
|
|
37
38
|
_: 1
|
|
38
39
|
})
|
|
39
40
|
], 8, ["disabled", "to"]))
|
|
40
41
|
], 6);
|
|
41
42
|
}
|
|
42
|
-
const L = /* @__PURE__ */
|
|
43
|
+
const L = /* @__PURE__ */ C(d, [["render", h], ["__scopeId", "data-v-698b66f2"]]);
|
|
43
44
|
export {
|
|
44
45
|
L as default
|
|
45
46
|
};
|
|
@@ -1,72 +1,79 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useLowcode as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { TpfConfigProvider as
|
|
6
|
-
import { Skeleton as
|
|
1
|
+
import { defineComponent as k, getCurrentInstance as V, useAttrs as N, ref as d, computed as m, onMounted as R, createBlock as T, openBlock as $, unref as r, withCtx as l, createVNode as s, mergeProps as M, nextTick as B } from "vue";
|
|
2
|
+
import { useLowcode as L } from "../../../hooks/useLowcode.js";
|
|
3
|
+
import P from "../../form-render/SubmitButtonRender.vue.js";
|
|
4
|
+
import U from "../../form-render/index.vue.js";
|
|
5
|
+
import { TpfConfigProvider as A, TpfModal as F } from "tmgc2-share";
|
|
6
|
+
import { Skeleton as I } from "ant-design-vue";
|
|
7
7
|
import "../../../utils/i18n.js";
|
|
8
|
-
const
|
|
8
|
+
const E = /* @__PURE__ */ k({
|
|
9
9
|
__name: "CustomerModal",
|
|
10
10
|
props: {
|
|
11
11
|
title: {},
|
|
12
12
|
type: {},
|
|
13
13
|
formCode: {}
|
|
14
14
|
},
|
|
15
|
-
setup(
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
setup(c, {
|
|
16
|
+
expose: v
|
|
17
|
+
}) {
|
|
18
|
+
const u = V(), i = N() || {}, n = d(!1), e = c, g = m(() => {
|
|
19
|
+
var o, t;
|
|
18
20
|
return {
|
|
19
|
-
$router:
|
|
20
|
-
_id: ((t = (
|
|
21
|
+
$router: u.proxy.$router,
|
|
22
|
+
_id: ((t = (o = i == null ? void 0 : i.row) == null ? void 0 : o.record) == null ? void 0 : t._id) || null,
|
|
21
23
|
type: e.type,
|
|
22
|
-
instance:
|
|
23
|
-
...
|
|
24
|
+
instance: u,
|
|
25
|
+
...i
|
|
24
26
|
};
|
|
25
27
|
}), {
|
|
26
|
-
vfdRef:
|
|
27
|
-
formConfig:
|
|
28
|
-
getComponentJson:
|
|
29
|
-
isLoading:
|
|
30
|
-
} =
|
|
28
|
+
vfdRef: a,
|
|
29
|
+
formConfig: C,
|
|
30
|
+
getComponentJson: x,
|
|
31
|
+
isLoading: y
|
|
32
|
+
} = L({
|
|
31
33
|
formCode: e.formCode,
|
|
32
34
|
type: e.type
|
|
33
|
-
}),
|
|
35
|
+
}), p = d(null), _ = m(() => (console.log({
|
|
34
36
|
props: e
|
|
35
|
-
}), e.title ? e.title : e.type === "add" ? "新增" : e.type === "edit" ? "编辑" : e.type === "view" ? "查看" : "新增")),
|
|
36
|
-
|
|
37
|
+
}), e.title ? e.title : e.type === "add" ? "新增" : e.type === "edit" ? "编辑" : e.type === "view" ? "查看" : "新增")), b = async () => {
|
|
38
|
+
n.value = !0, await B(), await x([]), console.log("attrs", i);
|
|
39
|
+
}, w = (o) => {
|
|
40
|
+
p.value = o;
|
|
37
41
|
};
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
}), (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
return R(() => {
|
|
43
|
+
b();
|
|
44
|
+
}), v({
|
|
45
|
+
setleftText: w
|
|
46
|
+
}), (o, t) => ($(), T(r(A), null, {
|
|
47
|
+
default: l(() => [s(r(F), M({
|
|
48
|
+
visible: n.value,
|
|
49
|
+
"onUpdate:visible": t[1] || (t[1] = (f) => n.value = f)
|
|
50
|
+
}, o.$attrs, {
|
|
51
|
+
title: _.value,
|
|
52
|
+
leftNum: p.value
|
|
46
53
|
}), {
|
|
47
|
-
footerRight: l(() => [s(
|
|
48
|
-
dialogVisible:
|
|
49
|
-
"onUpdate:dialogVisible": t[0] || (t[0] = (f) =>
|
|
50
|
-
options:
|
|
51
|
-
ctx:
|
|
54
|
+
footerRight: l(() => [s(P, {
|
|
55
|
+
dialogVisible: n.value,
|
|
56
|
+
"onUpdate:dialogVisible": t[0] || (t[0] = (f) => n.value = f),
|
|
57
|
+
options: r(C),
|
|
58
|
+
ctx: r(a)
|
|
52
59
|
}, null, 8, ["dialogVisible", "options", "ctx"])]),
|
|
53
|
-
default: l(() => [s(
|
|
60
|
+
default: l(() => [s(r(I), {
|
|
54
61
|
active: "",
|
|
55
|
-
loading:
|
|
62
|
+
loading: r(y)
|
|
56
63
|
}, {
|
|
57
|
-
default: l(() => [s(
|
|
58
|
-
vfCtx:
|
|
64
|
+
default: l(() => [s(U, {
|
|
65
|
+
vfCtx: g.value,
|
|
59
66
|
ref_key: "vfdRef",
|
|
60
|
-
ref:
|
|
67
|
+
ref: a
|
|
61
68
|
}, null, 8, ["vfCtx"])]),
|
|
62
69
|
_: 1
|
|
63
70
|
}, 8, ["loading"])]),
|
|
64
71
|
_: 1
|
|
65
|
-
}, 16, ["visible", "title"])]),
|
|
72
|
+
}, 16, ["visible", "title", "leftNum"])]),
|
|
66
73
|
_: 1
|
|
67
74
|
}));
|
|
68
75
|
}
|
|
69
76
|
});
|
|
70
77
|
export {
|
|
71
|
-
|
|
78
|
+
E as default
|
|
72
79
|
};
|
package/src/hooks/useLowcode.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import w from "../components/form-render/index.vue.js";
|
|
2
2
|
import { basicFieldsEnums as y } from "../components/form-designer/widget-panel/basicFieldsEnums.js";
|
|
3
|
-
import { getUuidKey as
|
|
4
|
-
import { useDataQueryApi as
|
|
3
|
+
import { getUuidKey as L } from "@kp-ui/tool";
|
|
4
|
+
import { useDataQueryApi as R, useComRef as P, useRouteBackTab as N, routerReloadStatus as j } from "tmgc2-share";
|
|
5
5
|
import { ref as g } from "vue";
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const S = (C) => {
|
|
7
|
+
let { formCode: i, entityCode: l, type: h = "add" } = C;
|
|
8
|
+
const a = g(!1), f = R(), r = P(w), u = g(), { routeBackTab: b } = N(), F = (o = []) => {
|
|
9
|
+
const e = {
|
|
9
10
|
label: "提交",
|
|
10
|
-
name:
|
|
11
|
+
name: L(),
|
|
11
12
|
onCreated: `
|
|
12
13
|
const hidden = this.getFormRef().vfCtx?.type==='view';
|
|
13
14
|
this.setHidden(hidden)
|
|
@@ -21,64 +22,64 @@ const Q = (C) => {
|
|
|
21
22
|
}
|
|
22
23
|
})()`
|
|
23
24
|
};
|
|
24
|
-
return
|
|
25
|
-
}, m = (
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
29
|
-
const
|
|
25
|
+
return o.push(y.button(e)), o;
|
|
26
|
+
}, m = (o = []) => {
|
|
27
|
+
const t = o.reduce((e, n) => {
|
|
28
|
+
const s = y[n.componentType];
|
|
29
|
+
if (s) {
|
|
30
|
+
const d = s({
|
|
30
31
|
name: n.entityPropertyCode,
|
|
31
32
|
label: n.entityPropertyName,
|
|
32
33
|
...n.options
|
|
33
34
|
});
|
|
34
|
-
|
|
35
|
+
e = [...e, d];
|
|
35
36
|
}
|
|
36
|
-
return
|
|
37
|
+
return e;
|
|
37
38
|
}, []);
|
|
38
|
-
return
|
|
39
|
-
},
|
|
40
|
-
var
|
|
39
|
+
return t.length ? F(t) : t;
|
|
40
|
+
}, c = async (o = [], t) => {
|
|
41
|
+
var n, s;
|
|
41
42
|
let e = { widgetList: [], formConfig: {} };
|
|
42
|
-
if (
|
|
43
|
-
(
|
|
43
|
+
if (i = t || i, i && h) {
|
|
44
|
+
(n = r.value) == null || n.setLoading(!0);
|
|
44
45
|
try {
|
|
45
|
-
const
|
|
46
|
-
e = JSON.parse(
|
|
46
|
+
const d = await f.dataQueryDetail({ code: i }, "FormDefinitionManagement").then((v) => v.data.object || {});
|
|
47
|
+
e = JSON.parse(d.frontendDefinition || "{}");
|
|
47
48
|
} finally {
|
|
48
|
-
(
|
|
49
|
+
(s = r.value) == null || s.setLoading(!1);
|
|
49
50
|
}
|
|
50
51
|
} else
|
|
51
|
-
e.widgetList = m(
|
|
52
|
-
return
|
|
52
|
+
e.widgetList = m(o);
|
|
53
|
+
return a.value = !1, console.log("json: ", e), u.value = e.formConfig, r.value.setFormJson(e), e;
|
|
53
54
|
}, p = async () => {
|
|
54
|
-
if (
|
|
55
|
-
return
|
|
56
|
-
const
|
|
55
|
+
if (a.value = !0, !l)
|
|
56
|
+
return c([]), [];
|
|
57
|
+
const o = {
|
|
57
58
|
pageCode: "EntityPropertyFormItem",
|
|
58
59
|
conditions: [{ fieldCode: "entityCode", type: "EQ", value: l }],
|
|
59
60
|
requiredFields: ["entityPropertyCode", "entityPropertyName", "valueType"],
|
|
60
61
|
page: 1,
|
|
61
62
|
pageSize: null,
|
|
62
63
|
sorts: []
|
|
63
|
-
},
|
|
64
|
-
return
|
|
64
|
+
}, t = await f.execute(o).then((e) => e.data.object.list);
|
|
65
|
+
return c(t), t;
|
|
65
66
|
};
|
|
66
67
|
return {
|
|
67
|
-
isLoading:
|
|
68
|
-
goBack: (
|
|
69
|
-
b(
|
|
68
|
+
isLoading: a,
|
|
69
|
+
goBack: (o = j.view) => {
|
|
70
|
+
b(o);
|
|
70
71
|
},
|
|
71
72
|
formConfig: u,
|
|
72
73
|
getInitRenderJSON: m,
|
|
73
|
-
vfdRef:
|
|
74
|
-
getComponentJson:
|
|
74
|
+
vfdRef: r,
|
|
75
|
+
getComponentJson: c,
|
|
75
76
|
getFieldList: p,
|
|
76
|
-
fieldListApi: async () => (await p()).map((
|
|
77
|
-
showName:
|
|
78
|
-
fieldCode:
|
|
77
|
+
fieldListApi: async () => (await p()).map((t) => ({
|
|
78
|
+
showName: t.entityPropertyName,
|
|
79
|
+
fieldCode: t.entityPropertyCode
|
|
79
80
|
}))
|
|
80
81
|
};
|
|
81
82
|
};
|
|
82
83
|
export {
|
|
83
|
-
|
|
84
|
+
S as useLowcode
|
|
84
85
|
};
|
package/src/lang/en-US.js
CHANGED
|
@@ -171,6 +171,8 @@ const e = {
|
|
|
171
171
|
generateSFC: "Generate SFC"
|
|
172
172
|
},
|
|
173
173
|
setting: {
|
|
174
|
+
// 序号
|
|
175
|
+
seq: "Seq",
|
|
174
176
|
containerInputPlaceholder: "Enter the container selector",
|
|
175
177
|
langMode: "language Mode",
|
|
176
178
|
editAPIConfig: "Edit API Config",
|
|
@@ -182,6 +184,7 @@ const e = {
|
|
|
182
184
|
tags: "Tags Mode",
|
|
183
185
|
buttonList: "Button Group",
|
|
184
186
|
buttonPosition: "Position",
|
|
187
|
+
autoWidth: "Auto Width",
|
|
185
188
|
fixed: "Fixed Position",
|
|
186
189
|
fixedRight: "Fixed Right",
|
|
187
190
|
resizableColumn: "Resizable Column",
|
|
@@ -306,7 +309,6 @@ const e = {
|
|
|
306
309
|
customLabelIcon: "Custom Label",
|
|
307
310
|
labelIconClass: "Label Icon Class",
|
|
308
311
|
labelIconPosition: "Label Icon Position",
|
|
309
|
-
labelTooltip: "Label Tooltip",
|
|
310
312
|
minValue: "Min Value",
|
|
311
313
|
maxValue: "Max Value",
|
|
312
314
|
precision: "Precision",
|
|
@@ -425,6 +427,7 @@ const e = {
|
|
|
425
427
|
actionColumn: "Action",
|
|
426
428
|
addTableColumn: "Add New Column",
|
|
427
429
|
deleteTableColumn: "Delete This Column",
|
|
430
|
+
addSubsets: "Add Subsets",
|
|
428
431
|
onlyOneColumnCannotBeDeleted: "The last column cannot be deleted.",
|
|
429
432
|
treeDataEnabled: "Enable Tree Data",
|
|
430
433
|
rowKeyOfTreeData: "Row Key Of Data",
|
|
@@ -438,6 +441,7 @@ const e = {
|
|
|
438
441
|
operationButtonLabel: "Text",
|
|
439
442
|
operationButtonType: "Type",
|
|
440
443
|
operationButtonSize: "Size",
|
|
444
|
+
operationButtonGhost: "Ghost",
|
|
441
445
|
operationButtonRound: "Round",
|
|
442
446
|
operationButtonHidden: "Hidden",
|
|
443
447
|
operationButtonDisabled: "Disabled",
|
package/src/lang/zh-CN.js
CHANGED
|
@@ -169,6 +169,8 @@ const e = {
|
|
|
169
169
|
generateSFC: "生成SFC"
|
|
170
170
|
},
|
|
171
171
|
setting: {
|
|
172
|
+
// 序号
|
|
173
|
+
seq: "序号",
|
|
172
174
|
containerInputPlaceholder: "请输入要渲染的目标",
|
|
173
175
|
langMode: "语法模式",
|
|
174
176
|
editAPIConfig: "编辑API",
|
|
@@ -309,7 +311,6 @@ const e = {
|
|
|
309
311
|
customLabelIcon: "定制字段标签",
|
|
310
312
|
labelIconClass: "标签Icon样式",
|
|
311
313
|
labelIconPosition: "标签Icon位置",
|
|
312
|
-
labelTooltip: "标签文字提示",
|
|
313
314
|
minValue: "最小值",
|
|
314
315
|
maxValue: "最大值",
|
|
315
316
|
precision: "精度",
|
|
@@ -396,6 +397,7 @@ const e = {
|
|
|
396
397
|
drawSize: "抽屉大小(px/%)",
|
|
397
398
|
drawDirection: "抽屉滑出方向",
|
|
398
399
|
isEnterSubmit: "回车键提交",
|
|
400
|
+
autoWidth: "自动宽度",
|
|
399
401
|
//data-table
|
|
400
402
|
tableWidth: "宽度(px/%)",
|
|
401
403
|
tableHeight: "高度(px/%)",
|
|
@@ -423,6 +425,7 @@ const e = {
|
|
|
423
425
|
actionColumn: "操作",
|
|
424
426
|
addTableColumn: "增加列",
|
|
425
427
|
deleteTableColumn: "删除列",
|
|
428
|
+
addSubsets: "增加子集",
|
|
426
429
|
onlyOneColumnCannotBeDeleted: "表格只有一列时不可删除.",
|
|
427
430
|
treeDataEnabled: "允许加载树形数据",
|
|
428
431
|
rowKeyOfTreeData: "树形数据ID键",
|
|
@@ -436,6 +439,7 @@ const e = {
|
|
|
436
439
|
operationButtonLabel: "文字",
|
|
437
440
|
operationButtonType: "类型",
|
|
438
441
|
operationButtonSize: "大小",
|
|
442
|
+
operationButtonGhost: "幽灵按钮",
|
|
439
443
|
operationButtonRound: "圆角",
|
|
440
444
|
operationButtonHidden: "隐藏",
|
|
441
445
|
operationButtonDisabled: "禁用",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createVNode as w } from "vue";
|
|
2
|
-
import { omit as
|
|
2
|
+
import { omit as u, isArray as g, isEmpty as d } from "lodash-es";
|
|
3
3
|
import { fmtHttpParams as p } from "../utils/request/fmtHttpParams.js";
|
|
4
|
-
import { TpfConfirm as
|
|
5
|
-
import
|
|
6
|
-
import { executeFunction as
|
|
4
|
+
import { TpfConfirm as f } from "../hooks/TpfConfirm.js";
|
|
5
|
+
import m from "../components/CustomRender/RenderBodyCell.js";
|
|
6
|
+
import { executeFunction as r } from "../utils/executeFunction.js";
|
|
7
7
|
import R from "../components/public/ActionButtonListRender.vue.js";
|
|
8
8
|
const I = {
|
|
9
9
|
data() {
|
|
@@ -17,7 +17,7 @@ const I = {
|
|
|
17
17
|
};
|
|
18
18
|
},
|
|
19
19
|
components: {
|
|
20
|
-
RenderBodyCell:
|
|
20
|
+
RenderBodyCell: m
|
|
21
21
|
},
|
|
22
22
|
inject: ["refList"],
|
|
23
23
|
computed: {
|
|
@@ -39,7 +39,7 @@ const I = {
|
|
|
39
39
|
})), s = [];
|
|
40
40
|
if (e.showButtonsColumn) {
|
|
41
41
|
const i = e.operationButtons ?? [];
|
|
42
|
-
let
|
|
42
|
+
let a = this;
|
|
43
43
|
s.push({
|
|
44
44
|
fixed: "right",
|
|
45
45
|
align: "center",
|
|
@@ -50,26 +50,23 @@ const I = {
|
|
|
50
50
|
buttonList: i,
|
|
51
51
|
flex: "center",
|
|
52
52
|
scope: h,
|
|
53
|
-
ctx:
|
|
53
|
+
ctx: a
|
|
54
54
|
}, null);
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
let n = {};
|
|
59
59
|
return {
|
|
60
|
-
columns: [...t, ...o, ...s].map((i) =>
|
|
60
|
+
columns: [...t, ...o, ...s].map((i) => {
|
|
61
|
+
var a;
|
|
62
|
+
return (a = i.children) != null && a.length || delete i.children, i.bodyCell && (n[i.dataIndex] = i.bodyCell, delete i.customRender), i;
|
|
63
|
+
}),
|
|
61
64
|
bodyCell: n
|
|
62
65
|
};
|
|
63
66
|
},
|
|
64
67
|
tableHeight() {
|
|
65
68
|
return parseFloat(this.widget.options.tableHeight || 0);
|
|
66
69
|
},
|
|
67
|
-
// rowClassName() {
|
|
68
|
-
// if (this.widget.options.stripe) {
|
|
69
|
-
// return (_record, index) => (index % 2 === 1 ? 'table-striped' : null);
|
|
70
|
-
// }
|
|
71
|
-
// return null;
|
|
72
|
-
// },
|
|
73
70
|
customClass() {
|
|
74
71
|
return this.widget.options.customClass || "";
|
|
75
72
|
},
|
|
@@ -108,7 +105,14 @@ const I = {
|
|
|
108
105
|
onHidden: t,
|
|
109
106
|
hidden: e
|
|
110
107
|
} = this.widget.options;
|
|
111
|
-
|
|
108
|
+
if (e) return !0;
|
|
109
|
+
if (t)
|
|
110
|
+
try {
|
|
111
|
+
return new Function(t).call(this);
|
|
112
|
+
} catch {
|
|
113
|
+
return !1;
|
|
114
|
+
}
|
|
115
|
+
return !1;
|
|
112
116
|
},
|
|
113
117
|
rowClassName(t) {
|
|
114
118
|
const {
|
|
@@ -129,7 +133,7 @@ const I = {
|
|
|
129
133
|
const {
|
|
130
134
|
hasRowSelection: t
|
|
131
135
|
} = this.widget.options.rowSelection;
|
|
132
|
-
return t ?
|
|
136
|
+
return t ? d(this.selectedRowInfo.selectedRowKeys) : d(this.selectRow);
|
|
133
137
|
},
|
|
134
138
|
getSelectedRowKeys() {
|
|
135
139
|
return this.selectedRowInfo.selectedRowKeys;
|
|
@@ -144,7 +148,7 @@ const I = {
|
|
|
144
148
|
this.widget.options.tableColumns = t;
|
|
145
149
|
},
|
|
146
150
|
async delSelectRow(t) {
|
|
147
|
-
if (await
|
|
151
|
+
if (await f({
|
|
148
152
|
content: "确定删除选中的数据吗"
|
|
149
153
|
}), t = t || this.selectedRowInfo.selectedRowKeys, !t.length) return;
|
|
150
154
|
const {
|
|
@@ -227,10 +231,10 @@ const I = {
|
|
|
227
231
|
},
|
|
228
232
|
// 处理列配置
|
|
229
233
|
handleColumnItem(t) {
|
|
230
|
-
const e =
|
|
234
|
+
const e = u(t, ["customRender"]), o = t.customRender;
|
|
231
235
|
return t.minWidth = 50, t.maxWidth = 1200, t.isAutoWidth ? (t.width = null, delete t.width) : t.width = isNaN(Number(t.width)) ? t.width : Number(t.width), o ? {
|
|
232
236
|
...e,
|
|
233
|
-
bodyCell: (s) =>
|
|
237
|
+
bodyCell: (s) => r({
|
|
234
238
|
functionBody: o,
|
|
235
239
|
params: s,
|
|
236
240
|
context: this,
|
|
@@ -251,7 +255,7 @@ const I = {
|
|
|
251
255
|
this.skipSelectionChangeEvent = !0;
|
|
252
256
|
try {
|
|
253
257
|
if (n.onClick) {
|
|
254
|
-
await
|
|
258
|
+
await r({
|
|
255
259
|
functionBody: n.onClick,
|
|
256
260
|
params: {
|
|
257
261
|
record: o,
|
|
@@ -264,10 +268,10 @@ const I = {
|
|
|
264
268
|
return;
|
|
265
269
|
}
|
|
266
270
|
const {
|
|
267
|
-
onOperationButtonClick:
|
|
271
|
+
onOperationButtonClick: l
|
|
268
272
|
} = this.widget.options;
|
|
269
|
-
|
|
270
|
-
functionBody:
|
|
273
|
+
l ? await r({
|
|
274
|
+
functionBody: l,
|
|
271
275
|
params: {
|
|
272
276
|
buttonName: t,
|
|
273
277
|
rowIndex: e,
|
|
@@ -306,16 +310,10 @@ const I = {
|
|
|
306
310
|
getFormRef() {
|
|
307
311
|
return this.refList.v_form_ref;
|
|
308
312
|
},
|
|
309
|
-
handlePageSizeChange(t) {
|
|
310
|
-
this.pageSize = t;
|
|
311
|
-
const {
|
|
312
|
-
onPageSizeChange: e
|
|
313
|
-
} = this.widget.options;
|
|
314
|
-
e ? new Function("pageSize", "currentPage", e).call(this, t, this.currentPage) : this.dispatch("VFormRender", "dataTablePageSizeChange", [this, t, this.currentPage]);
|
|
315
|
-
},
|
|
316
313
|
handleTablePageChange(t, e, o, {
|
|
317
314
|
currentDataSource: s
|
|
318
315
|
}) {
|
|
316
|
+
console.log(2442342);
|
|
319
317
|
const n = this.widget.options.onTableChange;
|
|
320
318
|
this.widget.options.pagination.current = t.current, this.widget.options.pagination.pageSize = t.pageSize, n && new Function("pagination", "filters", "sorter", "currentDataSource", n).call(this, t, e, o, {
|
|
321
319
|
currentDataSource: s
|
|
@@ -325,7 +323,7 @@ const I = {
|
|
|
325
323
|
const t = this.widget.options.rowSelection;
|
|
326
324
|
if (t.hasRowSelection)
|
|
327
325
|
return {
|
|
328
|
-
...
|
|
326
|
+
...u(t, ["onChange"]),
|
|
329
327
|
onChange: (e, o) => {
|
|
330
328
|
this.selectedRowInfo = {
|
|
331
329
|
selectedRowKeys: e,
|