@kp-ui/lowcode 2.15.0-alpha.16 → 2.15.0-alpha.18

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 (26) hide show
  1. package/package.json +1 -1
  2. package/src/components/FormRender/index.vue.js +2 -2
  3. package/src/components/FormRender/index.vue2.js +30 -34
  4. package/src/components/FormRender/useFormContext.js +109 -97
  5. package/src/components/form-designer/form-widget/container-widget/useTableWidget.js +38 -37
  6. package/src/components/form-designer/form-widget/field-widget/button-list-widget.vue.js +2 -2
  7. package/src/components/form-designer/form-widget/field-widget/button-list-widget.vue2.js +21 -20
  8. package/src/components/form-designer/form-widget/field-widget/button-widget.vue.js +2 -2
  9. package/src/components/form-designer/form-widget/field-widget/button-widget.vue2.js +11 -11
  10. package/src/components/form-designer/form-widget/field-widget/hooks/useSelect.js +72 -71
  11. package/src/components/form-designer/form-widget/field-widget/useField.js +12 -11
  12. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +3 -3
  13. package/src/components/form-designer/useAppRef.js +29 -27
  14. package/src/components/form-render/SubmitButtonRender.vue.js +15 -17
  15. package/src/components/form-render/container-items/data-table-widget.vue.js +1 -1
  16. package/src/components/form-render/container-items/data-table-widget.vue2.js +56 -53
  17. package/src/components/form-render/container-items/grid-col-widget.vue.js +1 -1
  18. package/src/components/form-render/container-items/grid-col-widget.vue2.js +19 -17
  19. package/src/components/form-render/container-items/grid-sub-form-widget.vue.js +2 -2
  20. package/src/components/form-render/container-items/grid-sub-form-widget.vue2.js +103 -92
  21. package/src/components/form-render/container-items/grid-widget.vue.js +1 -1
  22. package/src/components/form-render/container-items/grid-widget.vue2.js +18 -16
  23. package/src/components/form-render/dynamic-dialog.vue.js +56 -52
  24. package/src/components/public/CustomerModal/CustomerModal.vue2.js +29 -26
  25. package/stats.html +1 -1
  26. package/styles/style.css +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kp-ui/lowcode",
3
- "version": "2.15.0-alpha.16",
3
+ "version": "2.15.0-alpha.18",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,7 +1,7 @@
1
1
  import o from "./index.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-74715541"]]);
4
+ const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-eab1c859"]]);
5
5
  export {
6
- p as default
6
+ a as default
7
7
  };
@@ -1,19 +1,19 @@
1
- import { defineComponent as S, computed as h, ref as d, onMounted as w, watch as J, createElementBlock as p, openBlock as t, Fragment as E, createElementVNode as M, createBlock as P, createCommentVNode as g, createVNode as r, unref as e, mergeProps as T } from "vue";
1
+ import { defineComponent as h, computed as w, ref as c, onMounted as J, watch as E, createElementBlock as p, openBlock as t, Fragment as I, createElementVNode as M, createBlock as P, createCommentVNode as g, createVNode as r, unref as e, mergeProps as T } from "vue";
2
2
  import { Skeleton as z } from "ant-design-vue";
3
- import I from "../form-render/dynamic-dialog.vue.js";
3
+ import U from "../form-render/dynamic-dialog.vue.js";
4
4
  /* empty css */
5
- import v from "./FormContainer.js";
6
- import { useFormContext as U } from "./useFormContext.js";
5
+ import b from "./FormContainer.js";
6
+ import { useFormContext as W } from "./useFormContext.js";
7
7
  import { useI18n as $ } from "../../utils/i18n.js";
8
8
  import { storeToRefs as j } from "pinia";
9
9
  import { useLocaleStore as q } from "@kp-ui/i18n";
10
- import { getLocat as b } from "@kp-ui/tool";
11
- import A from "./Debugger.vue.js";
12
- import { useComRef as G } from "tmgc2-share";
13
- const H = { class: "form-render-wrapper" }, K = {
10
+ import { getLocat as A } from "@kp-ui/tool";
11
+ import G from "./Debugger.vue.js";
12
+ import { useComRef as H } from "tmgc2-share";
13
+ const K = { class: "form-render-wrapper" }, O = {
14
14
  key: 0,
15
15
  class: "loading-wrapper"
16
- }, ae = /* @__PURE__ */ S({
16
+ }, le = /* @__PURE__ */ h({
17
17
  name: "VFormRender",
18
18
  componentName: "VFormRender",
19
19
  __name: "index",
@@ -30,58 +30,54 @@ const H = { class: "form-render-wrapper" }, K = {
30
30
  debug: { type: Boolean }
31
31
  },
32
32
  emits: ["form-submit", "form-cancel"],
33
- setup(_, { expose: C, emit: y }) {
34
- const { initLocale: F } = $(), x = q(), { locale: n } = j(x);
35
- console.log(b());
36
- const k = h(() => b().debug === "1"), m = d(!1), a = _, i = d(), l = G(v), N = y, o = U({
33
+ setup(v, { expose: C, emit: _ }) {
34
+ const { initLocale: y } = $(), F = q(), { locale: n } = j(F), x = w(() => A().debug === "1"), m = c(!1), a = v, i = c(), l = H(b), k = _, o = W({
37
35
  props: a,
38
36
  renderForm: i
39
- }), R = (c) => {
40
- N("form-submit", c);
41
- }, B = () => l.value;
42
- w(() => {
43
- o.registerToRefList("v_form_ref");
44
- }), J(
37
+ }), N = (d) => {
38
+ k("form-submit", d);
39
+ }, R = () => l.value, { dynamicDialgRef: s, dialogProps: B, emitter: D, isLoading: f, registerToRefList: L, formWidgetId: V } = o;
40
+ return J(() => {
41
+ L(V);
42
+ }), E(
45
43
  n,
46
44
  () => {
47
- F(n.value);
45
+ y(n.value);
48
46
  },
49
47
  {
50
48
  immediate: !0
51
49
  }
52
- );
53
- const { dynamicDialgRef: s, dialogProps: D, emitter: L, isLoading: f } = o;
54
- return C({
55
- ...L,
50
+ ), C({
51
+ ...D,
56
52
  ...o,
57
53
  dynamicDialgRef: s,
58
- getNativeForm: B,
54
+ getNativeForm: R,
59
55
  formJson: a.formJson,
60
56
  renderForm: i
61
- }), (c, u) => (t(), p(E, null, [
62
- M("div", H, [
63
- e(f) ? (t(), p("div", K, [
57
+ }), (d, u) => (t(), p(I, null, [
58
+ M("div", K, [
59
+ e(f) ? (t(), p("div", O, [
64
60
  r(e(z), { active: e(f) }, null, 8, ["active"])
65
61
  ])) : g("", !0),
66
- r(e(v), {
62
+ r(e(b), {
67
63
  ref_key: "formContainer",
68
64
  ref: l,
69
65
  context: e(o),
70
- onFormSubmit: R
66
+ onFormSubmit: N
71
67
  }, null, 8, ["context"]),
72
- r(I, T(e(D), {
68
+ r(U, T(e(B), {
73
69
  ref_key: "dynamicDialgRef",
74
70
  ref: s
75
71
  }), null, 16)
76
72
  ]),
77
- k.value ? (t(), P(A, {
73
+ x.value ? (t(), P(G, {
78
74
  key: 0,
79
75
  visible: m.value,
80
- "onUpdate:visible": u[0] || (u[0] = (V) => m.value = V)
76
+ "onUpdate:visible": u[0] || (u[0] = (S) => m.value = S)
81
77
  }, null, 8, ["visible"])) : g("", !0)
82
78
  ], 64));
83
79
  }
84
80
  });
85
81
  export {
86
- ae as default
82
+ le as default
87
83
  };
@@ -1,169 +1,181 @@
1
- import { ref as a, provide as f, computed as u, watchEffect as ie, onMounted as le, nextTick as fe } from "vue";
2
- import { useFormValidation as E } from "./formValidation.js";
3
- import { useFormDataProcessor as ce } from "./useFormDataProcessor.js";
4
- import { insertCustomCssToHead as ue, insertGlobalFunctionsToHtml as me, getContainerWidgetByName as V, cloneFormConfigWithoutEventHandler as de, generateId as ve } from "../../utils/util.js";
5
- import { set as ge, cloneDeep as Fe } from "lodash-es";
6
- import { message as W } from "ant-design-vue";
7
- import { useI18n as pe } from "../../utils/i18n.js";
8
- import { getUuidKey as Ce } from "@kp-ui/tool";
9
- import { useComRef as he, useRef as De, useExecFunction as Re } from "tmgc2-share";
10
- import we from "../form-render/dynamic-dialog.vue.js";
1
+ import { ref as i, provide as l, computed as m, watchEffect as fe, onMounted as ce, nextTick as me } from "vue";
2
+ import { useFormValidation as V } from "./formValidation.js";
3
+ import { useFormDataProcessor as ue } from "./useFormDataProcessor.js";
4
+ import { insertCustomCssToHead as de, insertGlobalFunctionsToHtml as ve, getContainerWidgetByName as H, cloneFormConfigWithoutEventHandler as ge, generateId as Fe } from "../../utils/util.js";
5
+ import { set as pe, cloneDeep as Ce } from "lodash-es";
6
+ import { message as J } from "ant-design-vue";
7
+ import { useI18n as he } from "../../utils/i18n.js";
8
+ import { getUuidKey as De } from "@kp-ui/tool";
9
+ import { useComRef as Re, useRef as we, useExecFunction as xe } from "tmgc2-share";
10
+ import be from "../form-render/dynamic-dialog.vue.js";
11
11
  /* empty css */
12
- import { useEmitter as be } from "../../utils/useEmitter.js";
13
- import { useAppRef as xe } from "../form-designer/useAppRef.js";
14
- const $e = ({ renderForm: p, props: i }) => {
15
- const { formJson: C, formData: H } = i, v = he(we), { i18nt: h } = pe(), [D, I] = De(!1), g = be(), c = a(), n = a({}), R = a(!1), F = a(/* @__PURE__ */ new Map()), w = a({}), J = a();
16
- f("refList", F), f("getFormConfig", () => t.value), f("formData", n), f("getReadMode", () => D.value), f("designState", !1);
17
- const b = a(), { executeFunction: T, context: x, execHttpFunction: j } = Re(), { getFormRef: M, getWidgetRef: $, registerToRefList: B } = xe(F, !0), t = u(() => {
12
+ import { useEmitter as Le } from "../../utils/useEmitter.js";
13
+ import { useAppRef as Me } from "../form-designer/useAppRef.js";
14
+ const Be = ({ renderForm: C, props: a }) => {
15
+ const { formJson: h, formData: T } = a, v = Re(be), { i18nt: D } = he(), [R, j] = we(!1), g = Le(), c = i(), s = i({}), w = i(!1), F = i(/* @__PURE__ */ new Map()), x = i({}), U = i(), p = Symbol("formWidget");
16
+ l("refList", F), l("getFormConfig", () => t.value), l("formData", s), l("getReadMode", () => R.value), l("designState", !1);
17
+ const b = i(), { executeFunction: $, context: L, execHttpFunction: M } = xe(), { getFormRef: y, getWidgetRef: B, registerToRefList: S } = Me(F, p), t = m(() => {
18
18
  var e;
19
19
  return ((e = c.value) == null ? void 0 : e.formConfig) || {};
20
20
  });
21
- f("formConfig", t);
22
- const m = u(() => {
21
+ l("formConfig", t), l("formWidgetId", p);
22
+ const u = m(() => {
23
23
  var e;
24
24
  return ((e = c.value) == null ? void 0 : e.widgetList) || [];
25
- }), _ = u(() => {
25
+ }), _ = m(() => {
26
26
  var e;
27
27
  return ((e = t.value) == null ? void 0 : e.labelPosition) || "horizontal";
28
28
  }), z = (e) => {
29
- J.value = e;
30
- }, A = u(() => {
29
+ U.value = e;
30
+ }, A = m(() => {
31
31
  var e;
32
32
  return (e = t.value) != null && e.labelWidth ? `${t.value.labelWidth}px` : "80px";
33
- }), G = u(() => {
33
+ }), G = m(() => {
34
34
  var e;
35
35
  return ((e = t.value) == null ? void 0 : e.customClass) || "";
36
- }), L = ce();
37
- let d = E(p, m.value || []);
38
- ie(() => {
39
- d = E(p, m.value || []);
36
+ }), W = ue();
37
+ let d = V(C, u.value || []);
38
+ fe(() => {
39
+ d = V(C, u.value || []);
40
40
  });
41
- const y = async (e) => {
41
+ const I = async (e) => {
42
42
  var o;
43
- c.value = e || { widgetList: [], formConfig: {} }, n.value = {}, K(((o = c.value) == null ? void 0 : o.widgetList) || []), await fe(), ne();
43
+ c.value = e || { widgetList: [], formConfig: {} }, s.value = {}, K(((o = c.value) == null ? void 0 : o.widgetList) || []), await me(), se();
44
44
  }, K = (e) => {
45
45
  if ((e == null ? void 0 : e.length) > 0) {
46
- const o = L.buildFormModel(e, H);
47
- Object.assign(n.value, o);
46
+ const o = W.buildFormModel(e, T);
47
+ Object.assign(s.value, o);
48
48
  }
49
- }, S = () => n.value || {}, U = (e) => {
49
+ }, O = () => s.value || {}, k = (e) => {
50
50
  e && Object.keys(e).forEach((o) => {
51
- n.value.hasOwnProperty(o) && (n.value[o] = e[o]);
51
+ s.value.hasOwnProperty(o) && (s.value[o] = e[o]);
52
52
  });
53
- }, k = (e) => {
54
- R.value = e;
55
- }, q = () => {
56
- d.resetValidation();
53
+ }, q = (e) => {
54
+ w.value = e;
57
55
  }, Q = () => {
56
+ d.resetValidation();
57
+ }, X = () => {
58
58
  d.clearValidate();
59
- }, X = (e) => {
59
+ }, Y = (e) => {
60
60
  b.value = e;
61
- }, Y = () => {
62
- if (!i.parentForm)
63
- return M();
64
- let e = i.parentForm;
61
+ }, Z = () => {
62
+ if (!a.parentForm)
63
+ return y();
64
+ let e = a.parentForm;
65
65
  for (; e.parentForm; )
66
66
  e = e.parentForm;
67
67
  return e;
68
- }, Z = (e, o = {}, s = {}) => {
69
- var O, P;
70
- const r = Y(), l = V((r == null ? void 0 : r.widgetList) || [], e) || V(m.value || [], e);
71
- if (l === null) {
72
- W.error(h("render.hint.refNotFound") + e);
68
+ }, N = (e, o = {}, n = {}) => {
69
+ var P, E;
70
+ const r = Z(), f = H((r == null ? void 0 : r.widgetList) || [], e) || H(u.value || [], e);
71
+ if (f === null) {
72
+ J.error(D("render.hint.refNotFound") + e);
73
73
  return;
74
74
  }
75
- if (!e || l.type !== "vf-dialog") {
76
- W.error(h("render.hint.refNotFound") + e);
75
+ if (!e || f.type !== "vf-dialog") {
76
+ J.error(D("render.hint.refNotFound") + e);
77
77
  return;
78
78
  }
79
- const se = {
80
- widgetList: Fe((l == null ? void 0 : l.widgetList) || []),
81
- formConfig: de(((O = r == null ? void 0 : r.formConfig) == null ? void 0 : O.value) || {})
82
- }, ae = Ce();
83
- w.value = {
84
- options: l.options,
85
- formJson: se,
79
+ const ie = {
80
+ widgetList: Ce((f == null ? void 0 : f.widgetList) || []),
81
+ formConfig: ge(((P = r == null ? void 0 : r.formConfig) == null ? void 0 : P.value) || {})
82
+ }, le = De();
83
+ x.value = {
84
+ options: f.options,
85
+ formJson: ie,
86
86
  formData: { ...o },
87
87
  optionData: r.optionData,
88
88
  globalDsv: r.globalDsv,
89
- parentFormRef: x.value,
90
- extraData: s,
91
- wrapperId: ae,
89
+ parentFormRef: L.value,
90
+ extraData: n,
91
+ wrapperId: le,
92
92
  vfCtx: { ...o }
93
- }, (P = v.value) == null || P.show();
94
- }, N = () => i.parentForm, ee = () => {
93
+ }, (E = v.value) == null || E.show();
94
+ }, ee = () => a.parentForm, oe = () => {
95
95
  var e;
96
96
  return (e = v.value) == null ? void 0 : e.getFormRef();
97
- }, oe = () => {
97
+ }, te = () => {
98
98
  g.off$("fieldChange"), g.on$("fieldChange", ({ fieldName: e, value: o }) => {
99
- ge(n.value, e, o);
99
+ pe(s.value, e, o);
100
100
  });
101
- }, te = async () => {
101
+ }, re = async () => {
102
102
  var o;
103
103
  const e = t.value.serveList;
104
104
  if ((o = e.vformDetail.http) != null && o.url) {
105
- const s = await j(
105
+ const n = await M(
106
106
  {
107
107
  ...e.vformDetail
108
108
  },
109
109
  {
110
- ...i.vfCtx
110
+ ...a.vfCtx
111
111
  }
112
112
  );
113
- return console.log("res: ", s), s;
113
+ return console.log("res: ", n), n;
114
+ }
115
+ }, ne = async () => {
116
+ var n;
117
+ const e = await O(), o = t.value.serveList;
118
+ if ((n = o.vformDetail.http) != null && n.url) {
119
+ const r = await M(o.vformUpdate, {
120
+ data: e,
121
+ vfCtx: a.vfCtx
122
+ });
123
+ return console.log("res: ", r), r;
114
124
  }
115
- }, ne = () => {
125
+ }, se = () => {
116
126
  var e, o;
117
- (e = t.value) != null && e.onFormMounted && T({
127
+ (e = t.value) != null && e.onFormMounted && $({
118
128
  functionBody: (o = t.value) == null ? void 0 : o.onFormMounted
119
129
  });
120
- }, re = () => {
121
- const e = "vfRender" + ve(), { cssCode: o, functions: s } = t.value;
122
- o && ue(o, e || ""), s && me(s, e || "");
130
+ }, ae = () => {
131
+ const e = "vfRender" + Fe(), { cssCode: o, functions: n } = t.value;
132
+ o && de(o, e || ""), n && ve(n, e || "");
123
133
  };
124
- return le(() => {
125
- C && y(C), oe(), re();
134
+ return ce(() => {
135
+ h && I(h), te(), ae();
126
136
  }), {
127
- vfCtx: i.vfCtx,
128
- getParentFormRef: N,
129
- getFormRef: M,
130
- getWidgetRef: $,
131
- registerToRefList: B,
137
+ formWidgetId: p,
138
+ vfCtx: a.vfCtx,
139
+ getParentFormRef: ee,
140
+ getFormRef: y,
141
+ getWidgetRef: B,
142
+ registerToRefList: S,
132
143
  dialogOrDrawerRef: b,
133
- setDialogOrDrawerRef: X,
134
- showDialog: Z,
135
- setFormData: U,
136
- setReadMode: I,
137
- setFormJson: y,
138
- setLoading: k,
139
- onFormDetail: te,
144
+ setDialogOrDrawerRef: Y,
145
+ showDialog: N,
146
+ setFormData: k,
147
+ setReadMode: j,
148
+ setFormJson: I,
149
+ setLoading: q,
150
+ onFormDetail: re,
151
+ onFormUpdate: ne,
140
152
  emitter: g,
141
- context: x,
142
- getFormData: S,
143
- getChildFormRef: ee,
153
+ context: L,
154
+ getFormData: O,
155
+ getChildFormRef: oe,
144
156
  // 状态
145
157
  formJsonObj: c,
146
- formDataModel: n,
147
- isLoading: R,
148
- readModeFlag: D,
158
+ formDataModel: s,
159
+ isLoading: w,
160
+ readModeFlag: R,
149
161
  // 引用
150
162
  widgetRefList: F,
151
163
  // 处理器
152
- formDataProcessor: L,
164
+ formDataProcessor: W,
153
165
  formValidator: d,
154
166
  // 计算属性
155
167
  formConfig: t,
156
- widgetList: m,
168
+ widgetList: u,
157
169
  labelPosition: _,
158
170
  labelWidth: A,
159
171
  customClass: G,
160
172
  dynamicDialgRef: v,
161
- dialogProps: w,
173
+ dialogProps: x,
162
174
  setChildFormRef: z,
163
- resetValidation: q,
164
- clearValidate: Q
175
+ resetValidation: Q,
176
+ clearValidate: X
165
177
  };
166
178
  };
167
179
  export {
168
- $e as useFormContext
180
+ Be as useFormContext
169
181
  };
@@ -1,14 +1,14 @@
1
1
  import { inject as E, ref as x, computed as l, h as K } from "vue";
2
- import { omit as H, cloneDeep as g, isArray as N } from "lodash-es";
2
+ import { omit as H, cloneDeep as d, isArray as N } from "lodash-es";
3
3
  import q from "../../../public/ActionButtonListRender.vue.js";
4
4
  import { useI18n as L } from "../../../../utils/i18n.js";
5
5
  import { useExecFunction as j, tranformAntTableColumnToVxetableColumn as _, tranformAntSizzVxetableSize as G } from "tmgc2-share";
6
6
  import { useDataHttp as J } from "../../../../hooks/useDataHttp.js";
7
- function rt({ props: c, fieldModel: s }) {
8
- const C = E("designState", !1), d = x(), h = x(!1), { widget: n } = c, { i18nt: y } = L(), { executeFunction: u, context: S } = j(), { loadataSource: v, setPagination: f, getPagination: p, pagintion: D } = J({
7
+ function rt({ props: c, fieldModel: a }) {
8
+ const C = E("designState", !1), h = x(), f = x(!1), { widget: n } = c, { i18nt: v } = L(), { executeFunction: u, context: y } = j(), { loadataSource: S, setPagination: b, getPagination: p, pagintion: D } = J({
9
9
  props: c
10
10
  }), T = l(() => {
11
- const t = [], e = (n == null ? void 0 : n.options) || {}, { rowSelection: o, showIndex: a, tableColumns: r = [] } = (n == null ? void 0 : n.options) ?? {};
11
+ const t = [], e = (n == null ? void 0 : n.options) || {}, { rowSelection: o, showIndex: s, tableColumns: r = [] } = (n == null ? void 0 : n.options) ?? {};
12
12
  o != null && o.hasRowSelection && t.push({
13
13
  title: o.columnTitle,
14
14
  width: o.columnWidth,
@@ -16,8 +16,8 @@ function rt({ props: c, fieldModel: s }) {
16
16
  fixed: "left",
17
17
  dataIndex: "checkbox",
18
18
  type: "checkbox"
19
- }), a && t.push({
20
- title: y("designer.setting.seq"),
19
+ }), s && t.push({
20
+ title: v("designer.setting.seq"),
21
21
  align: "left",
22
22
  width: 90,
23
23
  fixed: "left",
@@ -26,7 +26,7 @@ function rt({ props: c, fieldModel: s }) {
26
26
  resizable: !0,
27
27
  type: "seq"
28
28
  });
29
- const m = r.filter((i) => i.show).map((i) => ({
29
+ const g = r.filter((i) => i.show).map((i) => ({
30
30
  ...i,
31
31
  ...R(i)
32
32
  })), w = [];
@@ -42,26 +42,26 @@ function rt({ props: c, fieldModel: s }) {
42
42
  buttonList: i,
43
43
  flex: "center",
44
44
  scope: A,
45
- ctx: S.value
45
+ ctx: y.value
46
46
  })
47
47
  }
48
48
  });
49
49
  }
50
- const V = [...t, ...m, ...w];
50
+ const V = [...t, ...g, ...w];
51
51
  return _(V);
52
52
  }), R = (t) => {
53
53
  const e = H(t, ["customRender"]), o = t.customRender;
54
54
  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 ? {
55
55
  ...e,
56
56
  slots: {
57
- default(a) {
57
+ default(s) {
58
58
  return u({
59
59
  source: c.field.options.name,
60
60
  functionBody: o,
61
61
  params: {
62
- index: a.rowIndex,
63
- record: a.row,
64
- ...a
62
+ index: s.rowIndex,
63
+ record: s.row,
64
+ ...s
65
65
  },
66
66
  errorCallback: (r) => {
67
67
  console.error("Custom render error:", r);
@@ -71,22 +71,22 @@ function rt({ props: c, fieldModel: s }) {
71
71
  }
72
72
  } : t;
73
73
  }, k = l(() => n.options.tableWidth), z = l(() => n.options.tableSize), W = () => {
74
- b();
74
+ m();
75
75
  }, B = l(() => n.options.rowKey), P = l(() => {
76
76
  const {
77
77
  tableSize: t,
78
78
  rowKey: e,
79
79
  tableHeight: o = 300,
80
- border: a = !1,
80
+ border: s = !1,
81
81
  lineHeight: r = 50,
82
- colorRow: m = !1
82
+ colorRow: g = !1
83
83
  } = n.options;
84
84
  return {
85
85
  showPagination: n.options.showPagination,
86
86
  size: G(t),
87
87
  height: o,
88
- border: a ?? !1,
89
- data: s.value || [],
88
+ border: s ?? !1,
89
+ data: a.value || [],
90
90
  columns: T.value,
91
91
  sortConfig: {
92
92
  trigger: "cell",
@@ -95,7 +95,7 @@ function rt({ props: c, fieldModel: s }) {
95
95
  },
96
96
  rowConfig: {
97
97
  keyField: e,
98
- isCurrent: m,
98
+ isCurrent: g,
99
99
  isHover: !0
100
100
  },
101
101
  cellConfig: {
@@ -103,20 +103,20 @@ function rt({ props: c, fieldModel: s }) {
103
103
  }
104
104
  };
105
105
  }), F = (t) => {
106
- d.value = t;
107
- }, b = async () => {
106
+ h.value = t;
107
+ }, m = async () => {
108
108
  var t;
109
109
  if (c.field.options.dsEnabled) {
110
- h.value = !0;
110
+ f.value = !0;
111
111
  try {
112
- const e = await v(), o = e.list || [];
113
- C ? await ((t = d.value) == null ? void 0 : t.loadData(o)) : s.value = g(o || []), f(e);
112
+ const e = await S(), o = e.list || [];
113
+ C ? await ((t = h.value) == null ? void 0 : t.loadData(o)) : a.value = d(o || []), b(e);
114
114
  } catch (e) {
115
115
  console.error(e);
116
116
  }
117
117
  } else
118
- s.value = n.options.dataSource || [];
119
- h.value = !1;
118
+ a.value = n.options.dataSource || [];
119
+ f.value = !1;
120
120
  }, I = ({ row: t, $event: e }, o) => {
121
121
  u({
122
122
  functionBody: n.options.customRow[o],
@@ -137,19 +137,20 @@ function rt({ props: c, fieldModel: s }) {
137
137
  setValue: (t) => {
138
138
  if (!N(t))
139
139
  return console.error("表格数据类型错误");
140
+ a.value = d(t);
140
141
  },
141
142
  insertTableValue: (t) => {
142
- s.value || (s.value = []), s.value.push(g(t));
143
+ a.value || (a.value = []), a.value.push(d(t));
143
144
  },
144
- setPagination: f,
145
- getDataSource: () => s.value,
145
+ setPagination: b,
146
+ getDataSource: () => a.value,
146
147
  getPagination: p
147
148
  },
148
149
  onSortChange: W,
149
150
  pagintion: D,
150
- setPagination: f,
151
+ setPagination: b,
151
152
  getPagination: p,
152
- handleTableChange: (t, e, o, a) => {
153
+ handleTableChange: (t, e, o, s) => {
153
154
  const r = n.options.onTableChange;
154
155
  r && u({
155
156
  functionBody: r,
@@ -157,26 +158,26 @@ function rt({ props: c, fieldModel: s }) {
157
158
  pagination: t,
158
159
  filters: e,
159
160
  sorter: o,
160
- currentDataSource: a
161
+ currentDataSource: s
161
162
  },
162
163
  keys: ["pagination", "filters", "sorter", "currentDataSource"]
163
164
  });
164
165
  },
165
166
  setTableData: (t) => {
166
- s.value = g(t);
167
+ a.value = d(t);
167
168
  },
168
169
  loadDataTableDataSource: () => {
169
- b();
170
+ m();
170
171
  },
171
172
  showPagination: l(() => !!c.field.options.showPagination),
172
173
  onRunEvent: I,
173
- isLoading: h,
174
- initTableSoureData: b,
174
+ isLoading: f,
175
+ initTableSoureData: m,
175
176
  setTableRef: F,
176
177
  tableSize: z,
177
178
  tableWidth: k,
178
179
  tableProps: P,
179
- tableRef: d
180
+ tableRef: h
180
181
  };
181
182
  }
182
183
  export {
@@ -1,7 +1,7 @@
1
1
  import t from "./button-list-widget.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../../../../_virtual/_plugin-vue_export-helper.js";
4
- const i = /* @__PURE__ */ o(t, [["__scopeId", "data-v-15ea0ae1"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-cf651b67"]]);
5
5
  export {
6
- i as default
6
+ m as default
7
7
  };