@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.
Files changed (90) hide show
  1. package/package.json +1 -1
  2. package/src/components/FormRender/useFormRender.js +18 -0
  3. package/src/components/form-designer/designer.js +78 -75
  4. package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue.js +18 -18
  5. package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue2.js +18 -20
  6. package/src/components/form-designer/form-widget/container-widget/vf-box-item.vue.js +9 -9
  7. package/src/components/form-designer/form-widget/container-widget/vf-dialog-widget.vue.js +29 -21
  8. package/src/components/form-designer/form-widget/field-widget/cascader-widget.vue.js +32 -39
  9. package/src/components/form-designer/form-widget/field-widget/date-range-widget.vue.js +24 -31
  10. package/src/components/form-designer/form-widget/field-widget/date-widget.vue.js +26 -33
  11. package/src/components/form-designer/form-widget/field-widget/diy-compontent-widget.vue.js +4 -4
  12. package/src/components/form-designer/form-widget/field-widget/fieldMixin.js +4 -1
  13. package/src/components/form-designer/form-widget/field-widget/form-item-wrapper.vue.js +84 -152
  14. package/src/components/form-designer/form-widget/field-widget/input-widget.vue.js +31 -38
  15. package/src/components/form-designer/form-widget/field-widget/number-widget.vue.js +23 -30
  16. package/src/components/form-designer/form-widget/field-widget/select-widget.vue.js +56 -63
  17. package/src/components/form-designer/form-widget/field-widget/switch-widget.vue.js +1 -1
  18. package/src/components/form-designer/form-widget/field-widget/textarea-widget.vue.js +23 -32
  19. package/src/components/form-designer/form-widget/field-widget/treeSelect-widget.vue.js +26 -33
  20. package/src/components/form-designer/setting-panel/form-setting.vue.js +2 -2
  21. package/src/components/form-designer/setting-panel/form-setting.vue2.js +81 -94
  22. package/src/components/form-designer/setting-panel/index.vue.js +2 -2
  23. package/src/components/form-designer/setting-panel/index.vue2.js +135 -135
  24. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-colorRow-editor.vue2.js +8 -7
  25. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-dsEnabled-editor.vue.js +23 -22
  26. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +3 -3
  27. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue2.js +7 -7
  28. package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/formCode-editor.vue.js +25 -19
  29. package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/line-height-editor.vue2.js +7 -6
  30. package/src/components/form-designer/setting-panel/property-editor/index.js +41 -42
  31. package/src/components/form-designer/setting-panel/propertyRegister.js +3 -6
  32. package/src/components/form-designer/widget-panel/PanelItemDrag.vue.js +50 -0
  33. package/src/components/form-designer/widget-panel/PanelItemDrag.vue2.js +4 -0
  34. package/src/components/form-designer/widget-panel/advanced/cascader.js +0 -1
  35. package/src/components/form-designer/widget-panel/advanced/data-table.js +1 -1
  36. package/src/components/form-designer/widget-panel/advanced/file-upload.js +0 -1
  37. package/src/components/form-designer/widget-panel/advanced/rich-editor.js +4 -5
  38. package/src/components/form-designer/widget-panel/advanced/tree-select.js +0 -1
  39. package/src/components/form-designer/widget-panel/basicFields/checkbox.js +2 -3
  40. package/src/components/form-designer/widget-panel/basicFields/color.js +0 -1
  41. package/src/components/form-designer/widget-panel/basicFields/date.js +0 -1
  42. package/src/components/form-designer/widget-panel/basicFields/dateRange.js +0 -1
  43. package/src/components/form-designer/widget-panel/basicFields/input.js +0 -1
  44. package/src/components/form-designer/widget-panel/basicFields/number.js +0 -1
  45. package/src/components/form-designer/widget-panel/basicFields/radio.js +0 -1
  46. package/src/components/form-designer/widget-panel/basicFields/rate.js +5 -6
  47. package/src/components/form-designer/widget-panel/basicFields/select.js +2 -3
  48. package/src/components/form-designer/widget-panel/basicFields/slider.js +0 -1
  49. package/src/components/form-designer/widget-panel/basicFields/switch.js +0 -1
  50. package/src/components/form-designer/widget-panel/basicFields/textarea.js +0 -1
  51. package/src/components/form-designer/widget-panel/basicFields/time.js +0 -1
  52. package/src/components/form-designer/widget-panel/basicFields/timeRange.js +0 -1
  53. package/src/components/form-designer/widget-panel/business/department-select.js +0 -1
  54. package/src/components/form-designer/widget-panel/business/material-select.js +0 -1
  55. package/src/components/form-designer/widget-panel/business/operation-select.js +2 -3
  56. package/src/components/form-designer/widget-panel/business/post-select.js +0 -1
  57. package/src/components/form-designer/widget-panel/business/project-group-select.js +2 -3
  58. package/src/components/form-designer/widget-panel/business/project-select.js +2 -3
  59. package/src/components/form-designer/widget-panel/business/user-select.js +0 -1
  60. package/src/components/form-designer/widget-panel/containers/vf-dialog.js +3 -2
  61. package/src/components/form-designer/widget-panel/index.vue.js +4 -338
  62. package/src/components/form-designer/widget-panel/index.vue2.js +82 -0
  63. package/src/components/form-designer/widget-panel/widgetsConfig.js +19 -18
  64. package/src/components/form-render/RenderWigetList.vue.js +61 -0
  65. package/src/components/form-render/RenderWigetList.vue2.js +4 -0
  66. package/src/components/form-render/SubmitButtonRender.vue.js +41 -29
  67. package/src/components/form-render/container-item/container-item-wrapper.vue.js +2 -23
  68. package/src/components/form-render/container-item/container-item-wrapper.vue2.js +20 -0
  69. package/src/components/form-render/container-item/data-table-item.vue.js +22 -36
  70. package/src/components/form-render/container-item/grid-item.vue.js +7 -7
  71. package/src/components/form-render/container-item/grid-sub-form-item.vue.js +1 -1
  72. package/src/components/form-render/container-item/sub-form-item.vue.js +115 -146
  73. package/src/components/form-render/container-item/tab-item.vue.js +19 -19
  74. package/src/components/form-render/container-item/table-item.vue.js +7 -7
  75. package/src/components/form-render/container-item/vf-collapse-item.vue.js +27 -27
  76. package/src/components/form-render/dynamic-dialog.vue.js +87 -86
  77. package/src/components/form-render/index.vue.js +94 -110
  78. package/src/components/public/ActionButtonListDialog.vue.js +82 -75
  79. package/src/components/public/ActionButtonListDialog.vue2.js +16 -10
  80. package/src/components/public/ActionButtonListRender.vue.js +12 -11
  81. package/src/components/public/CustomerModal/CustomerModal.vue2.js +49 -42
  82. package/src/hooks/useLowcode.js +40 -39
  83. package/src/lang/en-US.js +5 -1
  84. package/src/lang/zh-CN.js +5 -1
  85. package/src/mixins/useDataTableMixin.js +29 -31
  86. package/src/utils/asyncExecuteFunction.js +4 -0
  87. package/stats.html +1 -1
  88. package/styles/style.css +1 -1
  89. package/src/components/form-designer/setting-panel/property-editor/labelTooltip-editor.vue.js +0 -31
  90. 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 v } from "vue";
2
- import f, { useI18n as I } from "../../utils/i18n.js";
3
- import h from "../code-editor/code-modal-editor.vue.js";
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: h, TpfSelectIcon: x },
19
- mixins: [f],
18
+ components: { CodeModalEditor: I, TpfSelectIcon: x },
19
+ mixins: [h],
20
20
  emits: ["update:data"],
21
21
  setup(r, { emit: u }) {
22
- const { i18nt: t } = I(), o = a(), d = a(), i = a(), c = [
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 v(
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: c,
99
+ columns: p,
94
100
  buttonList: n,
95
- editClickEvent: (e, s, p) => {
101
+ editClickEvent: (e, s, c) => {
96
102
  var l;
97
- i.value = p[0], o.value = e, console.log({ code: s[e] }), (l = d.value) == null || l.open(s[e]);
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 s, openBlock as t, normalizeStyle as p, normalizeClass as u, createBlock as a, Teleport as b, createVNode as f, withCtx as l, Fragment as _, renderList as m, createCommentVNode as y, createTextVNode as k, toDisplayString as C } from "vue";
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 g from "../../../_virtual/_plugin-vue_export-helper.js";
5
- function v(o, B, S, $, h, z) {
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(), s("div", {
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(), a(b, {
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), s(_, null, m(o.visibleButtons, (e) => (t(), a(c, {
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(), a(r, {
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"])) : y("", !0),
32
- k(" " + C(e.label), 1)
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__ */ g(d, [["render", v], ["__scopeId", "data-v-a5c375c2"]]);
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 x, getCurrentInstance as _, useAttrs as b, ref as w, computed as p, onMounted as k, createBlock as V, openBlock as R, unref as o, withCtx as l, createVNode as s, mergeProps as $, nextTick as M } from "vue";
2
- import { useLowcode as T } from "../../../hooks/useLowcode.js";
3
- import B from "../../form-render/SubmitButtonRender.vue.js";
4
- import L from "../../form-render/index.vue.js";
5
- import { TpfConfigProvider as P, TpfModal as U } from "tmgc2-share";
6
- import { Skeleton as A } from "ant-design-vue";
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 q = /* @__PURE__ */ x({
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(d) {
16
- const a = _(), r = b() || {}, i = w(!1), e = d, m = p(() => {
17
- var n, t;
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: a.proxy.$router,
20
- _id: ((t = (n = r == null ? void 0 : r.row) == null ? void 0 : n.record) == null ? void 0 : t._id) || null,
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: a,
23
- ...r
24
+ instance: u,
25
+ ...i
24
26
  };
25
27
  }), {
26
- vfdRef: u,
27
- formConfig: c,
28
- getComponentJson: v,
29
- isLoading: g
30
- } = T({
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
- }), C = p(() => (console.log({
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" ? "查看" : "新增")), y = async () => {
36
- i.value = !0, await M(), await v([]), console.log("attrs", r);
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 k(() => {
39
- y();
40
- }), (n, t) => (R(), V(o(P), null, {
41
- default: l(() => [s(o(U), $({
42
- visible: i.value,
43
- "onUpdate:visible": t[1] || (t[1] = (f) => i.value = f)
44
- }, n.$attrs, {
45
- title: C.value
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(B, {
48
- dialogVisible: i.value,
49
- "onUpdate:dialogVisible": t[0] || (t[0] = (f) => i.value = f),
50
- options: o(c),
51
- ctx: o(u)
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(o(A), {
60
+ default: l(() => [s(r(I), {
54
61
  active: "",
55
- loading: o(g)
62
+ loading: r(y)
56
63
  }, {
57
- default: l(() => [s(L, {
58
- vfCtx: m.value,
64
+ default: l(() => [s(U, {
65
+ vfCtx: g.value,
59
66
  ref_key: "vfdRef",
60
- ref: u
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
- q as default
78
+ E as default
72
79
  };
@@ -1,13 +1,14 @@
1
- import v from "../components/form-render/index.vue.js";
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 w } from "@kp-ui/tool";
4
- import { useDataQueryApi as L, useComRef as R, useRouteBackTab as P, routerReloadStatus as N } from "tmgc2-share";
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 Q = (C) => {
7
- const { formCode: d, entityCode: l, type: h } = C, r = g(!1), f = L(), s = R(v), u = g(), { routeBackTab: b } = P(), F = (t = []) => {
8
- const o = {
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: w(),
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 t.push(y.button(o)), t;
25
- }, m = (t = []) => {
26
- const e = t.reduce((o, n) => {
27
- const i = y[n.componentType];
28
- if (i) {
29
- const c = i({
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
- o = [...o, c];
35
+ e = [...e, d];
35
36
  }
36
- return o;
37
+ return e;
37
38
  }, []);
38
- return e.length ? F(e) : e;
39
- }, a = async (t = []) => {
40
- var o, n;
39
+ return t.length ? F(t) : t;
40
+ }, c = async (o = [], t) => {
41
+ var n, s;
41
42
  let e = { widgetList: [], formConfig: {} };
42
- if (d && h) {
43
- (o = s.value) == null || o.setLoading(!0);
43
+ if (i = t || i, i && h) {
44
+ (n = r.value) == null || n.setLoading(!0);
44
45
  try {
45
- const i = await f.dataQueryDetail({ code: d }, "FormDefinitionManagement").then((c) => c.data.object || {});
46
- e = JSON.parse(i.frontendDefinition || "{}");
46
+ const d = await f.dataQueryDetail({ code: i }, "FormDefinitionManagement").then((v) => v.data.object || {});
47
+ e = JSON.parse(d.frontendDefinition || "{}");
47
48
  } finally {
48
- (n = s.value) == null || n.setLoading(!1);
49
+ (s = r.value) == null || s.setLoading(!1);
49
50
  }
50
51
  } else
51
- e.widgetList = m(t);
52
- return r.value = !1, console.log("json: ", e), u.value = e.formConfig, s.value.setFormJson(e), e;
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 (r.value = !0, !l)
55
- return a([]), [];
56
- const t = {
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
- }, e = await f.execute(t).then((o) => o.data.object.list);
64
- return a(e), e;
64
+ }, t = await f.execute(o).then((e) => e.data.object.list);
65
+ return c(t), t;
65
66
  };
66
67
  return {
67
- isLoading: r,
68
- goBack: (t = N.view) => {
69
- b(t);
68
+ isLoading: a,
69
+ goBack: (o = j.view) => {
70
+ b(o);
70
71
  },
71
72
  formConfig: u,
72
73
  getInitRenderJSON: m,
73
- vfdRef: s,
74
- getComponentJson: a,
74
+ vfdRef: r,
75
+ getComponentJson: c,
75
76
  getFieldList: p,
76
- fieldListApi: async () => (await p()).map((e) => ({
77
- showName: e.entityPropertyName,
78
- fieldCode: e.entityPropertyCode
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
- Q as useLowcode
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 r, isArray as g, isEmpty as u } from "lodash-es";
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 m } from "../hooks/TpfConfirm.js";
5
- import f from "../components/CustomRender/RenderBodyCell.js";
6
- import { executeFunction as l } from "../utils/executeFunction.js";
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: f
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 d = this;
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: d
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) => (i.bodyCell && (n[i.dataIndex] = i.bodyCell, delete i.customRender), 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
- return e ? !0 : t ? new Function(t).call(this) : !1;
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 ? u(this.selectedRowInfo.selectedRowKeys) : u(this.selectRow);
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 m({
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 = r(t, ["customRender"]), o = t.customRender;
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) => l({
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 l({
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: a
271
+ onOperationButtonClick: l
268
272
  } = this.widget.options;
269
- a ? await l({
270
- functionBody: a,
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
- ...r(t, ["onChange"]),
326
+ ...u(t, ["onChange"]),
329
327
  onChange: (e, o) => {
330
328
  this.selectedRowInfo = {
331
329
  selectedRowKeys: e,
@@ -0,0 +1,4 @@
1
+ const e = async (t) => typeof t != "function" ? t : await t();
2
+ export {
3
+ e as asyncExecuteFunction
4
+ };