@kp-ui/lowcode 2.15.0-alpha.1 → 2.15.0-alpha.11

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 (27) hide show
  1. package/install.js +16 -17
  2. package/package.json +1 -4
  3. package/src/components/FormRender/FormContainer.js +15 -14
  4. package/src/components/FormRender/index.vue2.js +26 -22
  5. package/src/components/FormRender/useFormContext.js +51 -50
  6. package/src/components/form-designer/form-widget/container-widget/grid-col-widget.vue2.js +19 -19
  7. package/src/components/form-designer/form-widget/field-widget/checkbox-widget.vue.js +19 -18
  8. package/src/components/form-designer/form-widget/field-widget/checkbox-widget.vue2.js +18 -17
  9. package/src/components/form-designer/form-widget/field-widget/input-widget.vue2.js +20 -21
  10. package/src/components/form-designer/form-widget/field-widget/time-range-widget.vue2.js +11 -11
  11. package/src/components/form-designer/form-widget/field-widget/time-widget.vue2.js +16 -16
  12. package/src/components/form-designer/form-widget/field-widget/useField.js +204 -186
  13. package/src/components/form-designer/index.vue.js +24 -22
  14. package/src/components/form-designer/index.vue2.js +38 -33
  15. package/src/components/form-designer/setting-panel/index.vue2.js +58 -55
  16. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue2.js +70 -65
  17. package/src/components/form-designer/useAppRef.js +17 -17
  18. package/src/components/form-render/container-items/grid-col-widget.vue.js +11 -11
  19. package/src/components/form-render/container-items/grid-col-widget.vue2.js +14 -16
  20. package/src/components/form-render/container-items/grid-widget.vue.js +20 -17
  21. package/src/components/form-render/container-items/grid-widget.vue2.js +13 -12
  22. package/src/components/form-render/container-items/vf-box-widget.vue2.js +9 -9
  23. package/src/components/form-render/dynamic-dialog.vue.js +1 -1
  24. package/src/components/form-render/dynamic-dialog.vue2.js +56 -53
  25. package/src/components/public/CustomerModal/useCustomerModal.js +7 -8
  26. package/stats.html +1 -1
  27. package/styles/style.css +1 -1
package/install.js CHANGED
@@ -1,22 +1,21 @@
1
1
  /* empty css */
2
2
  import "./_virtual/virtual_svg-icons-register.js";
3
- import { VxeTooltip as f } from "./node_modules/.pnpm/vxe-pc-ui@4.10.29_vue@3.5.17_typescript@5.8.2_/node_modules/vxe-pc-ui/es/tooltip/index.js";
4
- /* empty css */
5
- import { basicFieldsEnums as b } from "./src/components/form-designer/widget-panel/basicFieldsEnums.js";
6
- import { default as R } from "./src/components/form-designer/index.vue.js";
7
- import { openCustomerModal as m } from "./src/components/public/CustomerModal/useCustomerModal.js";
8
- import { default as C } from "./src/components/form-render/SubmitButtonRender.vue.js";
9
- import { useLowcode as M } from "./src/hooks/useLowcode.js";
10
- import { default as h } from "./src/components/FormRender/index.vue.js";
11
- const u = (e) => {
12
- const { app: o, http: r, factoryRender: t, useMountApp: p, getUserInfo: s } = e;
13
- o.config.globalProperties.$http = r, o.config.globalProperties.$getUserInfo = s, o.config.globalProperties.$factoryRender = t, o.config.globalProperties.$openCustomerModal = (i) => m(i, p), o.use(f);
3
+ import { VxeTooltip as f } from "vxe-pc-ui";
4
+ import { basicFieldsEnums as u } from "./src/components/form-designer/widget-panel/basicFieldsEnums.js";
5
+ import { default as b } from "./src/components/form-designer/index.vue.js";
6
+ import { openCustomerModal as i } from "./src/components/public/CustomerModal/useCustomerModal.js";
7
+ import { default as R } from "./src/components/form-render/SubmitButtonRender.vue.js";
8
+ import { useLowcode as C } from "./src/hooks/useLowcode.js";
9
+ import { default as V } from "./src/components/FormRender/index.vue.js";
10
+ const d = (e) => {
11
+ const { app: o, http: r, factoryRender: t, getUserInfo: p } = e;
12
+ o.config.globalProperties.$http = r, o.config.globalProperties.$getUserInfo = p, o.config.globalProperties.$factoryRender = t, o.config.globalProperties.$openCustomerModal = (s) => i(s, o), o.use(f);
14
13
  };
15
14
  export {
16
- C as SubmitButtonRender,
17
- R as VFormDesigner,
18
- h as VFormRender,
19
- b as basicFieldsEnums,
20
- u as registerLowcodeCore,
21
- M as useLowcode
15
+ R as SubmitButtonRender,
16
+ b as VFormDesigner,
17
+ V as VFormRender,
18
+ u as basicFieldsEnums,
19
+ d as registerLowcodeCore,
20
+ C as useLowcode
22
21
  };
package/package.json CHANGED
@@ -1,14 +1,11 @@
1
1
  {
2
2
  "name": "@kp-ui/lowcode",
3
- "version": "2.15.0-alpha.1",
3
+ "version": "2.15.0-alpha.11",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
7
  "module": "install.js",
8
8
  "dependencies": {
9
- "@kp-ui/i18n": "0.0.12",
10
- "@surely-vue/table": "5.0.3",
11
- "monaco-editor": "^0.44.0",
12
9
  "animate.css": "^4.1.1",
13
10
  "ant-design-vue": "4.2.6",
14
11
  "axios": "^1.3.5",
@@ -1,4 +1,4 @@
1
- import { defineComponent as w, ref as D, computed as o, onMounted as F, createVNode as l } from "vue";
1
+ import { defineComponent as w, ref as D, computed as o, onMounted as F, createVNode as i } from "vue";
2
2
  import { Form as h } from "ant-design-vue";
3
3
  import E from "../form-render/RenderWigetList.vue.js";
4
4
  import { useEmitter as L } from "../../utils/useEmitter.js";
@@ -11,42 +11,43 @@ const P = /* @__PURE__ */ w({
11
11
  },
12
12
  emits: ["form-submit", "form-cancel"],
13
13
  setup(e, {
14
- emit: i,
15
- expose: m
14
+ emit: m,
15
+ expose: c
16
16
  }) {
17
- var r;
18
- const c = D(), {
17
+ var l;
18
+ const n = D(), {
19
19
  emit$: d,
20
20
  on$: u,
21
21
  off$: f
22
- } = L(), a = o(() => e.context.formDataModel.value), s = o(() => e.context.readModeFlag.value), v = o(() => e.context.formConfig.value), g = o(() => e.context.widgetList.value), x = o(() => e.context.labelPosition.value), y = o(() => e.context.customClass.value), b = (r = e == null ? void 0 : e.context) == null ? void 0 : r.formValidator, C = () => {
22
+ } = L(), a = o(() => e.context.formDataModel.value), s = o(() => e.context.readModeFlag.value), v = o(() => e.context.formConfig.value), g = o(() => e.context.widgetList.value), x = o(() => e.context.labelPosition.value), y = o(() => e.context.customClass.value), b = (l = e == null ? void 0 : e.context) == null ? void 0 : l.formValidator, C = () => {
23
23
  var t;
24
- ((t = v.value) == null ? void 0 : t.isEnterSubmit) === 1 && n();
25
- }, n = async () => {
24
+ ((t = v.value) == null ? void 0 : t.isEnterSubmit) === 1 && r();
25
+ }, r = async () => {
26
26
  try {
27
27
  if (await b.validate()) {
28
28
  const M = e.context.getFormData();
29
- i("form-submit", M);
29
+ m("form-submit", M);
30
30
  }
31
31
  } catch (t) {
32
32
  console.error("表单验证失败:", t);
33
33
  }
34
34
  };
35
35
  return F(() => {
36
- }), m({
36
+ }), c({
37
+ renderForm: n,
37
38
  off$: f,
38
39
  on$: u,
39
40
  emit$: d,
40
- handleOnSubmit: n
41
- }), () => l(h, {
42
- ref: c,
41
+ handleOnSubmit: r
42
+ }), () => i(h, {
43
+ ref: n,
43
44
  layout: x.value,
44
45
  class: ["render-form", "tpf-form", y.value, s.value ? "readonly-mode-form" : ""],
45
46
  validateOnRuleChange: !1,
46
47
  model: a.value,
47
48
  onKeydown: (t) => t.key === "Enter" && C()
48
49
  }, {
49
- default: () => [l(E, {
50
+ default: () => [i(E, {
50
51
  "parent-widget": null,
51
52
  "widget-list": g.value,
52
53
  formDataModel: a.value,
@@ -1,13 +1,14 @@
1
- import { defineComponent as D, computed as j, ref as n, getCurrentInstance as x, onMounted as O, watch as R } from "vue";
2
- import { useRoute as v } from "../../../node_modules/.pnpm/vue-router@4.2.4_vue@3.5.17_typescript@5.8.2_/node_modules/vue-router/dist/vue-router.js";
1
+ import { defineComponent as j, computed as x, ref as d, getCurrentInstance as L, onMounted as O, watch as R } from "vue";
3
2
  import S from "../form-render/dynamic-dialog.vue.js";
4
- import L from "./FormContainer.js";
5
- import { useFormContext as h } from "./useFormContext.js";
6
- import { useI18n as B } from "../../utils/i18n.js";
7
- import { storeToRefs as J } from "pinia";
8
- import { useLocaleStore as N } from "@kp-ui/i18n";
9
- import V from "./Debugger.vue.js";
10
- const G = /* @__PURE__ */ D({
3
+ import c from "./FormContainer.js";
4
+ import { useFormContext as N } from "./useFormContext.js";
5
+ import { useI18n as h } from "../../utils/i18n.js";
6
+ import { storeToRefs as B } from "pinia";
7
+ import { useLocaleStore as J } from "@kp-ui/i18n";
8
+ import { getLocat as V } from "@kp-ui/tool";
9
+ import w from "./Debugger.vue.js";
10
+ import { useComRef as I } from "tmgc2-share";
11
+ const Q = /* @__PURE__ */ j({
11
12
  name: "VFormRender",
12
13
  componentName: "VFormRender",
13
14
  __name: "index",
@@ -24,13 +25,13 @@ const G = /* @__PURE__ */ D({
24
25
  debug: { type: Boolean, required: !1 }
25
26
  },
26
27
  emits: ["form-submit", "form-cancel"],
27
- setup(u, { expose: d, emit: c }) {
28
- const { initLocale: a } = B(), m = N(), { locale: t } = J(m), s = v(), p = j(() => s.query.debug === "1"), b = n(!1), g = x(), o = u, r = n(), y = n(), i = c, e = h({
28
+ setup(p, { expose: g, emit: b }) {
29
+ const { initLocale: a } = h(), m = J(), { locale: t } = B(m), y = x(() => V().debug === "1"), C = d(!1), _ = L(), o = p, r = d(), n = I(c), s = b, e = N({
29
30
  props: o,
30
31
  renderForm: r
31
- }), C = (F) => {
32
- i("form-submit", F);
33
- };
32
+ }), q = (D) => {
33
+ s("form-submit", D);
34
+ }, i = () => (console.log(n.value), n.value);
34
35
  O(() => {
35
36
  e.registerToRefList("v_form_ref");
36
37
  }), R(
@@ -42,19 +43,22 @@ const G = /* @__PURE__ */ D({
42
43
  immediate: !0
43
44
  }
44
45
  );
45
- const { dynamicDialgRef: _, dialogProps: q, emitter: f } = e;
46
- d({
47
- ...f,
46
+ const f = () => {
47
+ }, { dynamicDialgRef: F, dialogProps: v, emitter: l } = e;
48
+ g({
49
+ ...l,
48
50
  ...e,
51
+ getNativeForm: i,
52
+ setLoading: f,
49
53
  formJson: o.formJson,
50
54
  renderForm: r
51
55
  });
52
- const l = { initLocale: a, localeStore: m, locale: t, route: s, debug: p, debugVisible: b, instance: g, props: o, renderForm: r, formContainer: y, emit: i, formContext: e, handleFormSubmit: C, dynamicDialgRef: _, dialogProps: q, emitter: f, DynamicDialog: S, get FormContainer() {
53
- return L;
54
- }, Debugger: V };
55
- return Object.defineProperty(l, "__isScriptSetup", { enumerable: !1, value: !0 }), l;
56
+ const u = { initLocale: a, localeStore: m, locale: t, debug: y, debugVisible: C, instance: _, props: o, renderForm: r, formContainer: n, emit: s, formContext: e, handleFormSubmit: q, getNativeForm: i, setLoading: f, dynamicDialgRef: F, dialogProps: v, emitter: l, DynamicDialog: S, get FormContainer() {
57
+ return c;
58
+ }, Debugger: w };
59
+ return Object.defineProperty(u, "__isScriptSetup", { enumerable: !1, value: !0 }), u;
56
60
  }
57
61
  });
58
62
  export {
59
- G as default
63
+ Q as default
60
64
  };
@@ -1,23 +1,23 @@
1
- import { ref as a, provide as l, computed as u, watchEffect as ae, onMounted as ie, nextTick as le } from "vue";
2
- import { useFormValidation as P } from "./formValidation.js";
3
- import { useFormDataProcessor as fe } from "./useFormDataProcessor.js";
4
- import { insertCustomCssToHead as ce, insertGlobalFunctionsToHtml as ue, getContainerWidgetByName as V, cloneFormConfigWithoutEventHandler as me, generateId as de } from "../../utils/util.js";
5
- import { set as ve, cloneDeep as ge } from "lodash-es";
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
6
  import { message as W } from "ant-design-vue";
7
7
  import { useI18n as pe } from "../../utils/i18n.js";
8
- import { getUuidKey as Fe } from "@kp-ui/tool";
9
- import { useComRef as Ce, useRef as De, useExecFunction as he } from "tmgc2-share";
10
- import Re from "../form-render/dynamic-dialog.vue.js";
11
- import { useEmitter as we } from "../../utils/useEmitter.js";
12
- import { useAppRef as be } from "../form-designer/useAppRef.js";
13
- const Te = ({ renderForm: F, props: f }) => {
14
- const { formJson: C, formData: H } = f, v = Ce(Re), { i18nt: D } = pe(), [h, I] = De(!1), g = we(), c = a(), n = a({}), R = a(!1), p = a(/* @__PURE__ */ new Map()), w = a({}), J = a();
15
- l("refList", p), l("getFormConfig", () => t.value), l("formData", n), l("getReadMode", () => h.value), l("designState", !1);
16
- const b = a(), { executeFunction: T, context: x, execHttpFunction: j } = he(), { getFormRef: M, getWidgetRef: $, registerToRefList: B } = be(p), t = u(() => {
8
+ import { getUuidKey as Ce } from "@kp-ui/tool";
9
+ import { useComRef as De, useRef as he, useExecFunction as Re } from "tmgc2-share";
10
+ import we from "../form-render/dynamic-dialog.vue.js";
11
+ import { useEmitter as be } from "../../utils/useEmitter.js";
12
+ import { useAppRef as xe } from "../form-designer/useAppRef.js";
13
+ const je = ({ renderForm: p, props: i }) => {
14
+ const { formJson: C, formData: H } = i, v = De(we), { i18nt: D } = pe(), [h, I] = he(!1), g = be(), c = a(), n = a({}), R = a(!1), F = a(/* @__PURE__ */ new Map()), w = a({}), J = a();
15
+ f("refList", F), f("getFormConfig", () => t.value), f("formData", n), f("getReadMode", () => h.value), f("designState", !1);
16
+ const b = a(), { executeFunction: T, context: x, execHttpFunction: j } = Re(), { getFormRef: M, getWidgetRef: $, registerToRefList: B } = xe(F, !0), t = u(() => {
17
17
  var e;
18
18
  return ((e = c.value) == null ? void 0 : e.formConfig) || {};
19
19
  });
20
- l("formConfig", t);
20
+ f("formConfig", t);
21
21
  const m = u(() => {
22
22
  var e;
23
23
  return ((e = c.value) == null ? void 0 : e.widgetList) || [];
@@ -32,14 +32,14 @@ const Te = ({ renderForm: F, props: f }) => {
32
32
  }), K = u(() => {
33
33
  var e;
34
34
  return ((e = t.value) == null ? void 0 : e.customClass) || "";
35
- }), L = fe();
36
- let d = P(F, m.value || []);
37
- ae(() => {
38
- d = P(F, m.value || []);
35
+ }), L = ce();
36
+ let d = E(p, m.value || []);
37
+ ie(() => {
38
+ d = E(p, m.value || []);
39
39
  });
40
40
  const y = async (e) => {
41
41
  var o;
42
- c.value = e || { widgetList: [], formConfig: {} }, n.value = {}, S(((o = c.value) == null ? void 0 : o.widgetList) || []), await le(), te();
42
+ c.value = e || { widgetList: [], formConfig: {} }, n.value = {}, S(((o = c.value) == null ? void 0 : o.widgetList) || []), await fe(), ne();
43
43
  }, S = (e) => {
44
44
  if ((e == null ? void 0 : e.length) > 0) {
45
45
  const o = L.buildFormModel(e, H);
@@ -58,46 +58,46 @@ const Te = ({ renderForm: F, props: f }) => {
58
58
  }, Y = (e) => {
59
59
  b.value = e;
60
60
  }, Z = () => {
61
- if (!f.parentForm)
61
+ if (!i.parentForm)
62
62
  return M();
63
- let e = f.parentForm;
63
+ let e = i.parentForm;
64
64
  for (; e.parentForm; )
65
65
  e = e.parentForm;
66
66
  return e;
67
67
  }, _ = (e, o = {}, s = {}) => {
68
- var O, E;
69
- const r = Z(), i = V((r == null ? void 0 : r.widgetList) || [], e) || V(m.value || [], e);
70
- if (i === null) {
68
+ var O, P;
69
+ const r = Z(), l = V((r == null ? void 0 : r.widgetList) || [], e) || V(m.value || [], e);
70
+ if (l === null) {
71
71
  W.error(D("render.hint.refNotFound") + e);
72
72
  return;
73
73
  }
74
- if (!e || i.type !== "vf-dialog") {
74
+ if (!e || l.type !== "vf-dialog") {
75
75
  W.error(D("render.hint.refNotFound") + e);
76
76
  return;
77
77
  }
78
- const re = {
79
- widgetList: ge((i == null ? void 0 : i.widgetList) || []),
80
- formConfig: me(((O = r == null ? void 0 : r.formConfig) == null ? void 0 : O.value) || {})
81
- }, se = Fe();
78
+ const se = {
79
+ widgetList: Fe((l == null ? void 0 : l.widgetList) || []),
80
+ formConfig: de(((O = r == null ? void 0 : r.formConfig) == null ? void 0 : O.value) || {})
81
+ }, ae = Ce();
82
82
  w.value = {
83
- options: i.options,
84
- formJson: re,
83
+ options: l.options,
84
+ formJson: se,
85
85
  formData: { ...o },
86
86
  optionData: r.optionData,
87
87
  globalDsv: r.globalDsv,
88
88
  parentFormRef: x.value,
89
89
  extraData: s,
90
- wrapperId: se,
90
+ wrapperId: ae,
91
91
  vfCtx: { ...o }
92
- }, (E = v.value) == null || E.show();
93
- }, N = () => {
92
+ }, (P = v.value) == null || P.show();
93
+ }, N = () => i.parentForm, ee = () => {
94
94
  var e;
95
95
  return (e = v.value) == null ? void 0 : e.getFormRef();
96
- }, ee = () => {
96
+ }, oe = () => {
97
97
  g.off$("fieldChange"), g.on$("fieldChange", ({ fieldName: e, value: o }) => {
98
- ve(n.value, e, o);
98
+ ge(n.value, e, o);
99
99
  });
100
- }, oe = async () => {
100
+ }, te = async () => {
101
101
  var o;
102
102
  const e = t.value.serveList;
103
103
  if ((o = e.vformDetail.http) != null && o.url) {
@@ -106,24 +106,25 @@ const Te = ({ renderForm: F, props: f }) => {
106
106
  ...e.vformDetail
107
107
  },
108
108
  {
109
- ...f.vfCtx
109
+ ...i.vfCtx
110
110
  }
111
111
  );
112
112
  return console.log("res: ", s), s;
113
113
  }
114
- }, te = () => {
114
+ }, ne = () => {
115
115
  var e, o;
116
116
  (e = t.value) != null && e.onFormMounted && T({
117
117
  functionBody: (o = t.value) == null ? void 0 : o.onFormMounted
118
118
  });
119
- }, ne = () => {
120
- const e = "vfRender" + de(), { cssCode: o, functions: s } = t.value;
121
- o && ce(o, e || ""), s && ue(s, e || "");
119
+ }, re = () => {
120
+ const e = "vfRender" + ve(), { cssCode: o, functions: s } = t.value;
121
+ o && ue(o, e || ""), s && me(s, e || "");
122
122
  };
123
- return ie(() => {
124
- C && y(C), ee(), ne();
123
+ return le(() => {
124
+ C && y(C), oe(), re();
125
125
  }), {
126
- vfCtx: f.vfCtx,
126
+ vfCtx: i.vfCtx,
127
+ getParentFormRef: N,
127
128
  getFormRef: M,
128
129
  getWidgetRef: $,
129
130
  registerToRefList: B,
@@ -134,18 +135,18 @@ const Te = ({ renderForm: F, props: f }) => {
134
135
  setReadMode: I,
135
136
  setFormJson: y,
136
137
  setLoading: q,
137
- onFormDetail: oe,
138
+ onFormDetail: te,
138
139
  emitter: g,
139
140
  context: x,
140
141
  getFormData: U,
141
- getChildFormRef: N,
142
+ getChildFormRef: ee,
142
143
  // 状态
143
144
  formJsonObj: c,
144
145
  formDataModel: n,
145
146
  isLoading: R,
146
147
  readModeFlag: h,
147
148
  // 引用
148
- widgetRefList: p,
149
+ widgetRefList: F,
149
150
  // 处理器
150
151
  formDataProcessor: L,
151
152
  formValidator: d,
@@ -163,5 +164,5 @@ const Te = ({ renderForm: F, props: f }) => {
163
164
  };
164
165
  };
165
166
  export {
166
- Te as useFormContext
167
+ je as useFormContext
167
168
  };
@@ -1,19 +1,19 @@
1
- import { defineComponent as g, computed as c, ref as y } from "vue";
2
- import { useI18n as _ } from "../../../../utils/i18n.js";
3
- import h from "../RenderDesignerWigetList.vue.js";
4
- import C from "../widgetAction.vue.js";
5
- import { useContainerWidget as q } from "./useContainerWidget.js";
6
- import { useAppRef as w } from "../../useAppRef.js";
7
- import { ComponentNameEnum as b, ContainerTypeEnum as W } from "../../../../constants/WidgetTypeEnum.js";
8
- const D = /* @__PURE__ */ g({
1
+ import { defineComponent as c, computed as g, ref as y } from "vue";
2
+ import { useI18n as b } from "../../../../utils/i18n.js";
3
+ import _ from "../RenderDesignerWigetList.vue.js";
4
+ import h from "../widgetAction.vue.js";
5
+ import { useContainerWidget as C } from "./useContainerWidget.js";
6
+ import { useAppRef as q } from "../../useAppRef.js";
7
+ import { ComponentNameEnum as w, ContainerTypeEnum as W } from "../../../../constants/WidgetTypeEnum.js";
8
+ const H = /* @__PURE__ */ c({
9
9
  name: W.GridColWidget,
10
- componentName: b.ContainerWidget,
10
+ componentName: w.ContainerWidget,
11
11
  inheritAttrs: !1,
12
12
  __name: "grid-col-widget",
13
13
  props: {
14
- widget: { type: null, required: !0 },
15
- field: { type: null, required: !0 },
16
- parentWidget: { type: null, required: !0 },
14
+ widget: { type: Object, required: !0 },
15
+ field: { type: Object, required: !0 },
16
+ parentWidget: { type: [Object, null], required: !0 },
17
17
  parentList: { type: Array, required: !0 },
18
18
  indexOfParentList: { type: Number, required: !1 },
19
19
  subFormRowIndex: { type: Number, required: !1 },
@@ -22,24 +22,24 @@ const D = /* @__PURE__ */ g({
22
22
  },
23
23
  setup(i, { expose: o }) {
24
24
  o();
25
- const e = i, { i18nt: n } = _(), {
25
+ const e = i, { i18nt: n } = b(), {
26
26
  designState: s,
27
27
  selected: p,
28
28
  selectWidget: u,
29
29
  customClass: d,
30
- onContainerDragAdd: l,
31
- onContainerDragUpdate: a
32
- } = q(e), m = c(() => e.colHeight ? { height: e.colHeight } : {}), f = y({
30
+ onContainerDragAdd: a,
31
+ onContainerDragUpdate: l
32
+ } = C(e), m = g(() => e.colHeight ? { height: e.colHeight } : {}), f = y({
33
33
  span: e.widget.options.span || 12,
34
34
  offset: e.widget.options.offset || 0,
35
35
  push: e.widget.options.push || 0,
36
36
  pull: e.widget.options.pull || 0
37
- }), { initRefList: t } = w(e);
37
+ }), { initRefList: t } = q(e);
38
38
  t();
39
- const r = { props: e, i18nt: n, designState: s, selected: p, selectWidget: u, customClass: d, onContainerDragAdd: l, onContainerDragUpdate: a, colHeightStyle: m, layoutProps: f, initRefList: t, RenderDesignerWigetList: h, WidgetAction: C };
39
+ const r = { props: e, i18nt: n, designState: s, selected: p, selectWidget: u, customClass: d, onContainerDragAdd: a, onContainerDragUpdate: l, colHeightStyle: m, layoutProps: f, initRefList: t, RenderDesignerWigetList: _, WidgetAction: h };
40
40
  return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
41
41
  }
42
42
  });
43
43
  export {
44
- D as default
44
+ H as default
45
45
  };
@@ -1,15 +1,15 @@
1
1
  import m from "./checkbox-widget.vue2.js";
2
- import { resolveComponent as t, createBlock as d, createCommentVNode as _, openBlock as r, mergeProps as p, withCtx as l, createElementBlock as a, Fragment as b, renderList as k, createTextVNode as g, toDisplayString as i } from "vue";
3
- import u from "../../../../../_virtual/_plugin-vue_export-helper.js";
2
+ import { resolveComponent as a, createBlock as d, createCommentVNode as _, openBlock as r, mergeProps as b, withCtx as n, createElementBlock as t, Fragment as p, renderList as g, createTextVNode as h, toDisplayString as i } from "vue";
3
+ import k from "../../../../../_virtual/_plugin-vue_export-helper.js";
4
4
  const v = {
5
5
  key: 1,
6
6
  class: "readonly-mode-field"
7
7
  };
8
- function x(h, n, y, e, w, B) {
9
- const c = t("a-checkbox"), s = t("a-checkbox-group");
10
- return e.handleHidden ? _("v-if", !0) : (r(), d(e.FormItemWrapper, p({ key: 0 }, e.props, { rules: e.rules }), {
11
- default: l(() => [
12
- e.isReadMode ? (r(), a(
8
+ function x(u, l, y, e, C, w) {
9
+ const c = a("a-checkbox"), s = a("a-checkbox-group");
10
+ return e.handleHidden ? _("v-if", !0) : (r(), d(e.FormItemWrapper, b({ key: 0 }, e.props, { rules: e.rules }), {
11
+ default: n(() => [
12
+ e.isReadMode ? (r(), t(
13
13
  "span",
14
14
  v,
15
15
  i(e.optionLabel),
@@ -19,22 +19,23 @@ function x(h, n, y, e, w, B) {
19
19
  key: 0,
20
20
  ref: "fieldEditor",
21
21
  value: e.fieldModel,
22
- "onUpdate:value": n[0] || (n[0] = (o) => e.fieldModel = o),
23
- disabled: e.handleDisabled
22
+ "onUpdate:value": l[0] || (l[0] = (o) => e.fieldModel = o),
23
+ disabled: e.handleDisabled,
24
+ onChange: e.handleChangeEvent
24
25
  }, {
25
- default: l(() => [
26
- (r(!0), a(
27
- b,
26
+ default: n(() => [
27
+ (r(!0), t(
28
+ p,
28
29
  null,
29
- k(e.field.options.optionItems, (o, f) => (r(), d(c, {
30
+ g(e.field.options.optionItems, (o, f) => (r(), d(c, {
30
31
  key: f,
31
32
  value: o[e.field.options.valueKey],
32
33
  disabled: o.disabled,
33
34
  border: e.field.options.border,
34
35
  style: {}
35
36
  }, {
36
- default: l(() => [
37
- g(
37
+ default: n(() => [
38
+ h(
38
39
  i(o[e.field.options.labelKey]),
39
40
  1
40
41
  /* TEXT */
@@ -49,13 +50,13 @@ function x(h, n, y, e, w, B) {
49
50
  ]),
50
51
  _: 1
51
52
  /* STABLE */
52
- }, 8, ["value", "disabled"]))
53
+ }, 8, ["value", "disabled", "onChange"]))
53
54
  ]),
54
55
  _: 1
55
56
  /* STABLE */
56
57
  }, 16, ["rules"]));
57
58
  }
58
- const E = /* @__PURE__ */ u(m, [["render", x], ["__file", "/Users/zhaopeng/dev/kunpeng/tmgc2-web-vfrom/src/components/form-designer/form-widget/field-widget/checkbox-widget.vue"]]);
59
+ const D = /* @__PURE__ */ k(m, [["render", x], ["__file", "/Users/zhaopeng/dev/kunpeng/tmgc2-web-vfrom/src/components/form-designer/form-widget/field-widget/checkbox-widget.vue"]]);
59
60
  export {
60
- E as default
61
+ D as default
61
62
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as c } from "vue";
2
- import b from "./form-item-wrapper.vue.js";
3
- import { useSelect as y } from "./hooks/useSelect.js";
4
- import { useField as _ } from "./useField.js";
5
- import { ComponentNameEnum as q, WidgetTypeEnum as g } from "../../../../constants/WidgetTypeEnum.js";
6
- const w = /* @__PURE__ */ c({
7
- name: g.checkbox,
1
+ import { defineComponent as b } from "vue";
2
+ import y from "./form-item-wrapper.vue.js";
3
+ import { useSelect as _ } from "./hooks/useSelect.js";
4
+ import { useField as g } from "./useField.js";
5
+ import { ComponentNameEnum as q, WidgetTypeEnum as x } from "../../../../constants/WidgetTypeEnum.js";
6
+ const w = /* @__PURE__ */ b({
7
+ name: x.checkbox,
8
8
  componentName: q.FieldWidget,
9
9
  __name: "checkbox-widget",
10
10
  props: {
@@ -18,27 +18,28 @@ const w = /* @__PURE__ */ c({
18
18
  subFormRowId: { type: String, required: !1 },
19
19
  subFormColIndex: { type: Number, required: !1 }
20
20
  },
21
- setup(o, { expose: n }) {
22
- const e = o, {
21
+ setup(n, { expose: o }) {
22
+ const e = n, {
23
23
  rules: l,
24
24
  field: u,
25
25
  designState: r,
26
26
  fieldModel: t,
27
27
  isReadMode: p,
28
28
  fieldEditor: s,
29
- handleHidden: m,
30
- handleDisabled: a,
31
- defineExposed: i
32
- } = _(e), { optionLabel: f } = y({
29
+ handleHidden: a,
30
+ handleDisabled: m,
31
+ defineExposed: d,
32
+ handleChangeEvent: f
33
+ } = g(e), { optionLabel: c } = _({
33
34
  fieldModel: t,
34
35
  field: e.field,
35
36
  designState: r
36
37
  });
37
- n({
38
- ...i
38
+ o({
39
+ ...d
39
40
  });
40
- const d = { props: e, rules: l, field: u, designState: r, fieldModel: t, isReadMode: p, fieldEditor: s, handleHidden: m, handleDisabled: a, defineExposed: i, optionLabel: f, FormItemWrapper: b };
41
- return Object.defineProperty(d, "__isScriptSetup", { enumerable: !1, value: !0 }), d;
41
+ const i = { props: e, rules: l, field: u, designState: r, fieldModel: t, isReadMode: p, fieldEditor: s, handleHidden: a, handleDisabled: m, defineExposed: d, handleChangeEvent: f, optionLabel: c, FormItemWrapper: y };
42
+ return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
42
43
  }
43
44
  });
44
45
  export {
@@ -1,11 +1,11 @@
1
- import { defineComponent as _, computed as q } from "vue";
2
- import F from "./form-item-wrapper.vue.js";
1
+ import { defineComponent as g, computed as _ } from "vue";
2
+ import q from "./form-item-wrapper.vue.js";
3
3
  import { SvgIcon as x } from "tmgc2-share";
4
- import { useField as I } from "./useField.js";
5
- import { ComponentNameEnum as C, WidgetTypeEnum as E } from "../../../../constants/WidgetTypeEnum.js";
6
- const W = /* @__PURE__ */ _({
7
- name: E.input,
8
- componentName: C.FieldWidget,
4
+ import { useField as F } from "./useField.js";
5
+ import { ComponentNameEnum as I, WidgetTypeEnum as C } from "../../../../constants/WidgetTypeEnum.js";
6
+ const w = /* @__PURE__ */ g({
7
+ name: C.input,
8
+ componentName: I.FieldWidget,
9
9
  __name: "input-widget",
10
10
  props: {
11
11
  widget: { type: null, required: !0 },
@@ -20,29 +20,28 @@ const W = /* @__PURE__ */ _({
20
20
  },
21
21
  setup(i, { expose: o }) {
22
22
  const r = i, {
23
- isSubFormField: u,
24
- rules: d,
25
- fieldEditor: p,
23
+ rules: u,
24
+ fieldEditor: d,
26
25
  field: e,
27
- fieldModel: l,
28
- isReadMode: s,
29
- size: m,
30
- handleHidden: a,
31
- handleDisabled: f,
32
- handleClickIcon: c,
33
- handleFocusCustomEvent: y,
34
- handleBlurCustomEvent: b,
26
+ fieldModel: p,
27
+ isReadMode: l,
28
+ size: s,
29
+ handleHidden: m,
30
+ handleDisabled: a,
31
+ handleClickIcon: f,
32
+ handleFocusCustomEvent: c,
33
+ handleBlurCustomEvent: y,
35
34
  defineExposed: t
36
- } = I(r), g = q(() => e.options.type === "number" ? "text" : e.options.type);
35
+ } = F(r), b = _(() => e.options.type === "number" ? "text" : e.options.type);
37
36
  o({
38
37
  ...t
39
38
  });
40
- const n = { props: r, isSubFormField: u, rules: d, fieldEditor: p, field: e, fieldModel: l, isReadMode: s, size: m, handleHidden: a, handleDisabled: f, handleClickIcon: c, handleFocusCustomEvent: y, handleBlurCustomEvent: b, defineExposed: t, inputType: g, FormItemWrapper: F, get SvgIcon() {
39
+ const n = { props: r, rules: u, fieldEditor: d, field: e, fieldModel: p, isReadMode: l, size: s, handleHidden: m, handleDisabled: a, handleClickIcon: f, handleFocusCustomEvent: c, handleBlurCustomEvent: y, defineExposed: t, inputType: b, FormItemWrapper: q, get SvgIcon() {
41
40
  return x;
42
41
  } };
43
42
  return Object.defineProperty(n, "__isScriptSetup", { enumerable: !1, value: !0 }), n;
44
43
  }
45
44
  });
46
45
  export {
47
- W as default
46
+ w as default
48
47
  };