@kp-ui/lowcode 1.0.102 → 1.0.104

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 (53) hide show
  1. package/package.json +1 -1
  2. package/src/components/form-designer/form-widget/container-widget/vf-collapse-widget.vue.js +75 -100
  3. package/src/components/form-designer/form-widget/container-widget/vf-collapse-widget.vue.js.map +1 -1
  4. package/src/components/form-designer/form-widget/container-widget/vf-collapse-widget.vue2.js +4 -4
  5. package/src/components/form-designer/form-widget/container-widget/vf-collapse-widget.vue2.js.map +1 -1
  6. package/src/components/form-designer/form-widget/container-widget/vf-collapse-widget.vue4.js +2 -0
  7. package/src/components/form-designer/form-widget/container-widget/vf-collapse-widget.vue4.js.map +1 -0
  8. package/src/components/form-designer/form-widget/field-widget/code-editor-widget.vue.js +1 -1
  9. package/src/components/form-designer/form-widget/field-widget/code-editor-widget.vue.js.map +1 -1
  10. package/src/components/form-designer/form-widget/field-widget/fieldMixin.js.map +1 -1
  11. package/src/components/form-designer/form-widget/field-widget/index.js +1 -1
  12. package/src/components/form-designer/form-widget/field-widget/index.js.map +1 -1
  13. package/src/components/form-designer/form-widget/field-widget/tree-widget.vue.js +124 -0
  14. package/src/components/form-designer/form-widget/field-widget/tree-widget.vue.js.map +1 -0
  15. package/src/components/form-designer/index.vue.js +80 -91
  16. package/src/components/form-designer/index.vue.js.map +1 -1
  17. package/src/components/form-designer/setting-panel/index.vue.js +115 -121
  18. package/src/components/form-designer/setting-panel/index.vue.js.map +1 -1
  19. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-dsEnabled-editor.vue.js +17 -17
  20. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-dsEnabled-editor.vue.js.map +1 -1
  21. package/src/components/form-designer/setting-panel/property-editor/event-handler/onCheck-editor.vue.js +50 -0
  22. package/src/components/form-designer/setting-panel/property-editor/event-handler/onCheck-editor.vue.js.map +1 -0
  23. package/src/components/form-designer/setting-panel/property-editor/field-tree/tree-data-editor.vue.js +195 -0
  24. package/src/components/form-designer/setting-panel/property-editor/field-tree/tree-data-editor.vue.js.map +1 -0
  25. package/src/components/form-designer/setting-panel/property-editor/index.js +139 -137
  26. package/src/components/form-designer/setting-panel/property-editor/index.js.map +1 -1
  27. package/src/components/form-designer/setting-panel/propertyRegister.js +2 -0
  28. package/src/components/form-designer/setting-panel/propertyRegister.js.map +1 -1
  29. package/src/components/form-designer/widget-panel/advanced/tree-select.js.map +1 -1
  30. package/src/components/form-designer/widget-panel/advanced/tree.js +44 -0
  31. package/src/components/form-designer/widget-panel/advanced/tree.js.map +1 -0
  32. package/src/components/form-designer/widget-panel/advancedFieldsEnums.js +4 -2
  33. package/src/components/form-designer/widget-panel/advancedFieldsEnums.js.map +1 -1
  34. package/src/components/form-render/container-item/vf-collapse-item.vue.js +2 -2
  35. package/src/components/form-render/container-item/vf-collapse-item.vue.js.map +1 -1
  36. package/src/components/form-render/dynamic-dialog.vue.js +95 -105
  37. package/src/components/form-render/dynamic-dialog.vue.js.map +1 -1
  38. package/src/components/form-render/index.vue.js +111 -118
  39. package/src/components/form-render/index.vue.js.map +1 -1
  40. package/src/components/public/CustomerModal/CustomerModal.vue2.js +37 -33
  41. package/src/components/public/CustomerModal/CustomerModal.vue2.js.map +1 -1
  42. package/src/components/public/CustomerModal/useCustomerModal.js +15 -18
  43. package/src/components/public/CustomerModal/useCustomerModal.js.map +1 -1
  44. package/src/lang/zh-CN.js +1 -0
  45. package/src/lang/zh-CN.js.map +1 -1
  46. package/src/utils/executeFunction.js +20 -16
  47. package/src/utils/executeFunction.js.map +1 -1
  48. package/stats.html +1 -1
  49. package/styles/style.css +1 -1
  50. package/src/components/TpfCollapse/TpfCollapseTitle.vue.js +0 -8
  51. package/src/components/TpfCollapse/TpfCollapseTitle.vue.js.map +0 -1
  52. package/src/components/TpfCollapse/TpfCollapseTitle.vue2.js +0 -18
  53. package/src/components/TpfCollapse/TpfCollapseTitle.vue2.js.map +0 -1
@@ -1,12 +1,12 @@
1
- import _ from "../../../../../utils/i18n.js";
1
+ import g from "../../../../../utils/i18n.js";
2
2
  import E from "../../../../http-editor/index.vue.js";
3
- import h from "../../../../code-editor/code-modal-editor.vue.js";
4
- import { resolveComponent as o, createElementBlock as u, openBlock as d, Fragment as M, createVNode as a, createBlock as r, createCommentVNode as c, withCtx as i, createTextVNode as D, toDisplayString as k } from "vue";
5
- import C from "../../../../../../_virtual/_plugin-vue_export-helper.js";
3
+ import u from "../../../../code-editor/code-modal-editor.vue.js";
4
+ import { resolveComponent as o, createElementBlock as h, openBlock as a, Fragment as M, createVNode as d, createBlock as r, createCommentVNode as c, withCtx as i, createTextVNode as k, toDisplayString as C } from "vue";
5
+ import D from "../../../../../../_virtual/_plugin-vue_export-helper.js";
6
6
  const O = {
7
7
  name: "data-table-dsEnabled-editor",
8
- mixins: [_],
9
- components: { HttpEditor: E, CodeModalEditor: h },
8
+ mixins: [g],
9
+ components: { HttpEditor: E, CodeModalEditor: u },
10
10
  props: {
11
11
  designer: Object,
12
12
  selectedWidget: Object,
@@ -28,43 +28,43 @@ const O = {
28
28
  }
29
29
  },
30
30
  openTableDataEdit() {
31
- this.tableDataOptions = JSON.stringify(this.optionModel.dataSource, null, " "), console.log(this.tableDataOptions), this.$refs.CodeModalEditorRef.open(this.tableDataOptions);
31
+ this.tableDataOptions = JSON.stringify(this.optionModel.dataSource, null, " "), this.$refs.CodeModalEditorRef.open(this.tableDataOptions);
32
32
  }
33
33
  }
34
34
  };
35
35
  function y(t, n, e, S, w, l) {
36
36
  const m = o("a-switch"), s = o("a-form-item"), p = o("a-button"), b = o("CodeModalEditor"), f = o("HttpEditor");
37
- return d(), u(M, null, [
38
- a(s, {
37
+ return a(), h(M, null, [
38
+ d(s, {
39
39
  label: t.i18nt("designer.setting.dsEnabled")
40
40
  }, {
41
41
  default: i(() => [
42
- a(m, {
42
+ d(m, {
43
43
  checked: e.optionModel.dsEnabled,
44
- "onUpdate:checked": n[0] || (n[0] = (g) => e.optionModel.dsEnabled = g)
44
+ "onUpdate:checked": n[0] || (n[0] = (_) => e.optionModel.dsEnabled = _)
45
45
  }, null, 8, ["checked"])
46
46
  ]),
47
47
  _: 1
48
48
  }, 8, ["label"]),
49
- e.optionModel.dsEnabled ? c("", !0) : (d(), r(s, {
49
+ e.optionModel.dsEnabled ? c("", !0) : (a(), r(s, {
50
50
  key: 0,
51
51
  label: t.i18nt("designer.setting.tableDataEdit")
52
52
  }, {
53
53
  default: i(() => [
54
- a(p, {
54
+ d(p, {
55
55
  type: "primary",
56
56
  shape: "round",
57
57
  onClick: l.openTableDataEdit
58
58
  }, {
59
59
  default: i(() => [
60
- D(k(t.i18nt("designer.setting.editAction")), 1)
60
+ k(C(t.i18nt("designer.setting.editAction")), 1)
61
61
  ]),
62
62
  _: 1
63
63
  }, 8, ["onClick"])
64
64
  ]),
65
65
  _: 1
66
66
  }, 8, ["label"])),
67
- a(b, {
67
+ d(b, {
68
68
  ref: "CodeModalEditorRef",
69
69
  mode: "json",
70
70
  readonly: !1,
@@ -72,7 +72,7 @@ function y(t, n, e, S, w, l) {
72
72
  title: t.i18nt("designer.setting.tableDataEdit"),
73
73
  onSave: l.handleUpdate
74
74
  }, null, 8, ["title", "onSave"]),
75
- e.optionModel.dsEnabled ? (d(), r(f, {
75
+ e.optionModel.dsEnabled ? (a(), r(f, {
76
76
  key: 1,
77
77
  designer: e.designer,
78
78
  "selected-widget": e.selectedWidget,
@@ -80,7 +80,7 @@ function y(t, n, e, S, w, l) {
80
80
  }, null, 8, ["designer", "selected-widget", "optionModel"])) : c("", !0)
81
81
  ], 64);
82
82
  }
83
- const x = /* @__PURE__ */ C(O, [["render", y]]);
83
+ const x = /* @__PURE__ */ D(O, [["render", y]]);
84
84
  export {
85
85
  x as default
86
86
  };
@@ -1 +1 @@
1
- {"version":3,"file":"data-table-dsEnabled-editor.vue.js","sources":["../../../../../../../src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-dsEnabled-editor.vue"],"sourcesContent":["<template>\n <a-form-item :label=\"i18nt('designer.setting.dsEnabled')\">\n <a-switch v-model:checked=\"optionModel.dsEnabled\" />\n </a-form-item>\n <a-form-item v-if=\"!optionModel.dsEnabled\" :label=\"i18nt('designer.setting.tableDataEdit')\">\n <a-button type=\"primary\" shape=\"round\" @click=\"openTableDataEdit\">\n {{ i18nt('designer.setting.editAction') }}\n </a-button>\n </a-form-item>\n\n <CodeModalEditor\n ref=\"CodeModalEditorRef\"\n mode=\"json\"\n :readonly=\"false\"\n :isShowEventHeader=\"false\"\n :title=\"i18nt('designer.setting.tableDataEdit')\"\n @save=\"handleUpdate\"\n />\n <HttpEditor\n v-if=\"!!optionModel.dsEnabled\"\n :designer=\"designer\"\n :selected-widget=\"selectedWidget\"\n :optionModel=\"optionModel\"\n />\n</template>\n\n<script>\n import i18n from '@/utils/i18n';\n import HttpEditor from '@/components/http-editor/index.vue';\n import CodeModalEditor from '@/components/code-editor/code-modal-editor.vue';\n\n export default {\n name: 'data-table-dsEnabled-editor',\n mixins: [i18n],\n components: { HttpEditor, CodeModalEditor },\n props: {\n designer: Object,\n selectedWidget: Object,\n optionModel: Object\n },\n data() {\n return {\n tableDataOptions: ''\n };\n },\n methods: {\n handleUpdate(value) {\n try {\n this.optionModel.dataSource = JSON.parse(value);\n } catch (ex) {\n this.$message.error(\n this.i18nt('designer.hint.invalidOptionsData') + ex.message\n );\n }\n },\n openTableDataEdit() {\n this.tableDataOptions = JSON.stringify(this.optionModel.dataSource, null, ' ');\n console.log(this.tableDataOptions);\n this.$refs.CodeModalEditorRef.open(this.tableDataOptions);\n }\n }\n };\n</script>\n"],"names":["_sfc_main","i18n","HttpEditor","CodeModalEditor","value","ex","_createVNode","_component_a_form_item","_ctx","_component_a_switch","$props","_cache","$event","_createBlock","_component_a_button","$options","_component_CodeModalEditor","_component_HttpEditor"],"mappings":";;;;;AA+BI,MAAKA,IAAU;AAAA,EACX,MAAM;AAAA,EACN,QAAQ,CAACC,CAAI;AAAA,EACb,YAAY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AA;AAAA;IAGCL,EAAA,YAAY,kBADxBG,EAKEI,GAAA;AAAA;MAHG,UAAUP,EAAA;AAAA,MACV,mBAAiBA,EAAA;AAAA,MACjB,aAAaA,EAAA;AAAA;;;;"}
1
+ {"version":3,"file":"data-table-dsEnabled-editor.vue.js","sources":["../../../../../../../src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-dsEnabled-editor.vue"],"sourcesContent":["<template>\n <a-form-item :label=\"i18nt('designer.setting.dsEnabled')\">\n <a-switch v-model:checked=\"optionModel.dsEnabled\" />\n </a-form-item>\n <a-form-item v-if=\"!optionModel.dsEnabled\" :label=\"i18nt('designer.setting.tableDataEdit')\">\n <a-button type=\"primary\" shape=\"round\" @click=\"openTableDataEdit\">\n {{ i18nt('designer.setting.editAction') }}\n </a-button>\n </a-form-item>\n\n <CodeModalEditor\n ref=\"CodeModalEditorRef\"\n mode=\"json\"\n :readonly=\"false\"\n :isShowEventHeader=\"false\"\n :title=\"i18nt('designer.setting.tableDataEdit')\"\n @save=\"handleUpdate\"\n />\n <HttpEditor\n v-if=\"!!optionModel.dsEnabled\"\n :designer=\"designer\"\n :selected-widget=\"selectedWidget\"\n :optionModel=\"optionModel\"\n />\n</template>\n\n<script>\n import i18n from '@/utils/i18n';\n import HttpEditor from '@/components/http-editor/index.vue';\n import CodeModalEditor from '@/components/code-editor/code-modal-editor.vue';\n\n export default {\n name: 'data-table-dsEnabled-editor',\n mixins: [i18n],\n components: { HttpEditor, CodeModalEditor },\n props: {\n designer: Object,\n selectedWidget: Object,\n optionModel: Object\n },\n data() {\n return {\n tableDataOptions: ''\n };\n },\n methods: {\n handleUpdate(value) {\n try {\n this.optionModel.dataSource = JSON.parse(value);\n } catch (ex) {\n this.$message.error(\n this.i18nt('designer.hint.invalidOptionsData') + ex.message\n );\n }\n },\n openTableDataEdit() {\n this.tableDataOptions = JSON.stringify(this.optionModel.dataSource, null, ' ');\n this.$refs.CodeModalEditorRef.open(this.tableDataOptions);\n }\n }\n };\n</script>\n"],"names":["_sfc_main","i18n","HttpEditor","CodeModalEditor","value","ex","_createVNode","_component_a_form_item","_ctx","_component_a_switch","$props","_cache","$event","_createBlock","_component_a_button","$options","_component_CodeModalEditor","_component_HttpEditor"],"mappings":";;;;;AA+BI,MAAKA,IAAU;AAAA,EACX,MAAM;AAAA,EACN,QAAQ,CAACC,CAAI;AAAA,EACb,YAAY,EAAA,YAAEC,GAAU,iBAAEC;EAC1B,OAAO;AAAA,IACH,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,aAAa;AAAA;EAEjB,OAAO;AACH,WAAO;AAAA,MACH,kBAAkB;AAAA;EAE1B;AAAA,EACA,SAAS;AAAA,IACL,aAAaC,GAAO;AAChB,UAAI;AACA,aAAK,YAAY,aAAa,KAAK,MAAMA,CAAK;AAAA,MAClD,SAASC,GAAI;AACT,aAAK,SAAS;AAAA,UACV,KAAK,MAAM,kCAAkC,IAAIA,EAAG;AAAA;MAE5D;AAAA,IACJ;AAAA,IACA,oBAAoB;AAChB,WAAK,mBAAmB,KAAK,UAAU,KAAK,YAAY,YAAY,MAAM,IAAI,GAC9E,KAAK,MAAM,mBAAmB,KAAK,KAAK,gBAAgB;AAAA,IAC5D;AAAA,EACJ;;;;;IA1DJC,EAEcC,GAAA;AAAA,MAFA,OAAOC,EAAA,MAAK,4BAAA;AAAA;iBACtB,MAAoD;AAAA,QAApDF,EAAoDG,GAAA;AAAA,UAAlC,SAASC,EAAA,YAAY;AAAA,UAAZ,oBAAAC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAAF,EAAA,YAAY,YAASE;AAAA;;;;IAEhCF,EAAA,YAAY,8BAAhCG,EAIcN,GAAA;AAAA;MAJ8B,OAAOC,EAAA,MAAK,gCAAA;AAAA;iBACpD,MAEW;AAAA,QAFXF,EAEWQ,GAAA;AAAA,UAFD,MAAK;AAAA,UAAU,OAAM;AAAA,UAAS,SAAOC,EAAA;AAAA;qBAC3C,MAA0C;AAAA,gBAAvCP,EAAA,MAAK,6BAAA,CAAA,GAAA,CAAA;AAAA;;;;;;IAIhBF,EAOEU,GAAA;AAAA,MANE,KAAI;AAAA,MACJ,MAAK;AAAA,MACJ,UAAU;AAAA,MACV,mBAAmB;AAAA,MACnB,OAAOR,EAAA,MAAK,gCAAA;AAAA,MACZ,QAAMO,EAAA;AAAA;IAGCL,EAAA,YAAY,kBADxBG,EAKEI,GAAA;AAAA;MAHG,UAAUP,EAAA;AAAA,MACV,mBAAiBA,EAAA;AAAA,MACjB,aAAaA,EAAA;AAAA;;;;"}
@@ -0,0 +1,50 @@
1
+ import s from "../../../../../utils/i18n.js";
2
+ import d from "./eventMixin.js";
3
+ import { resolveComponent as n, createBlock as c, openBlock as m, withCtx as o, createVNode as p, normalizeClass as f, createTextVNode as _, toDisplayString as u } from "vue";
4
+ import h from "../../../../../../_virtual/_plugin-vue_export-helper.js";
5
+ const b = {
6
+ name: "onCheck-editor",
7
+ mixins: [s, d],
8
+ props: {
9
+ designer: Object,
10
+ selectedWidget: Object,
11
+ optionModel: Object,
12
+ eventHandled: {
13
+ type: Boolean,
14
+ default: !1
15
+ }
16
+ },
17
+ data() {
18
+ return {
19
+ eventParams: ["checkedKeys", "e"]
20
+ };
21
+ }
22
+ };
23
+ function k(e, t, r, C, a, g) {
24
+ const i = n("a-button"), l = n("a-form-item");
25
+ return m(), c(l, {
26
+ label: "onCheck",
27
+ labelAlign: "left",
28
+ "label-width": "150px"
29
+ }, {
30
+ default: o(() => [
31
+ p(i, {
32
+ plain: "",
33
+ shape: "round",
34
+ class: f([r.optionModel.onCheck ? "button-text-highlight" : ""]),
35
+ onClick: t[0] || (t[0] = (v) => e.editEventHandler("onCheck", a.eventParams))
36
+ }, {
37
+ default: o(() => [
38
+ _(u(e.i18nt("designer.setting.addEventHandler")), 1)
39
+ ]),
40
+ _: 1
41
+ }, 8, ["class"])
42
+ ]),
43
+ _: 1
44
+ });
45
+ }
46
+ const E = /* @__PURE__ */ h(b, [["render", k]]);
47
+ export {
48
+ E as default
49
+ };
50
+ //# sourceMappingURL=onCheck-editor.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onCheck-editor.vue.js","sources":["../../../../../../../src/components/form-designer/setting-panel/property-editor/event-handler/onCheck-editor.vue"],"sourcesContent":["<template>\n <a-form-item label=\"onCheck\" labelAlign=\"left\" label-width=\"150px\">\n <a-button\n plain\n shape=\"round\"\n :class=\"[optionModel.onCheck ? 'button-text-highlight' : '']\"\n @click=\"editEventHandler('onCheck', eventParams)\"\n >\n {{ i18nt('designer.setting.addEventHandler') }}\n </a-button>\n </a-form-item>\n</template>\n\n<script>\n import i18n from '@/utils/i18n';\n import eventMixin from '@/components/form-designer/setting-panel/property-editor/event-handler/eventMixin';\n\n export default {\n name: 'onCheck-editor',\n mixins: [i18n, eventMixin],\n props: {\n designer: Object,\n selectedWidget: Object,\n optionModel: Object,\n eventHandled: {\n type: Boolean,\n default: false\n }\n },\n data() {\n return {\n eventParams: ['checkedKeys', 'e']\n };\n }\n };\n</script>\n"],"names":["_sfc_main","i18n","eventMixin","_createBlock","_component_a_form_item","_createVNode","_component_a_button","_normalizeClass","$props","_cache","$event","_ctx","$data"],"mappings":";;;;AAiBI,MAAKA,IAAU;AAAA,EACX,MAAM;AAAA,EACN,QAAQ,CAACC,GAAMC,CAAU;AAAA,EACzB,OAAO;AAAA,IACH,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,aAAa;AAAA,IACb,cAAc;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACb;AAAA;EAEJ,OAAO;AACH,WAAO;AAAA,MACH,aAAa,CAAC,eAAe,GAAG;AAAA;EAExC;;;;cAhCJC,EAScC,GAAA;AAAA,IATD,OAAM;AAAA,IAAU,YAAW;AAAA,IAAO,eAAY;AAAA;eACvD,MAOW;AAAA,MAPXC,EAOWC,GAAA;AAAA,QANP,OAAA;AAAA,QACA,OAAM;AAAA,QACL,OAAKC,EAAA,CAAGC,EAAA,YAAY,UAAO,0BAAA,EAAA,CAAA;AAAA,QAC3B,SAAKC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAEC,EAAA,iBAAgB,WAAYC,EAAA,WAAW;AAAA;mBAE/C,MAA+C;AAAA,cAA5CD,EAAA,MAAK,kCAAA,CAAA,GAAA,CAAA;AAAA;;;;;;;;"}
@@ -0,0 +1,195 @@
1
+ import k from "../../../../../utils/i18n.js";
2
+ import v from "../../option-items-setting.vue.js";
3
+ import E from "../propertyMixin.js";
4
+ import { getDSByName as y } from "../../../../../utils/util.js";
5
+ import _ from "../../../../http-editor/index.vue.js";
6
+ import C from "../../../../code-editor/code-modal-editor.vue.js";
7
+ import { resolveComponent as d, createElementBlock as D, openBlock as r, Fragment as w, createVNode as a, createBlock as u, createCommentVNode as c, withCtx as n, createTextVNode as f, toDisplayString as g } from "vue";
8
+ import N from "../../../../../../_virtual/_plugin-vue_export-helper.js";
9
+ const K = {
10
+ name: "tree-data-editor",
11
+ mixins: [k, E],
12
+ props: {
13
+ designer: Object,
14
+ selectedWidget: Object,
15
+ optionModel: Object
16
+ },
17
+ components: {
18
+ CodeModalEditor: C,
19
+ OptionItemsSetting: v,
20
+ HttpEditor: _
21
+ },
22
+ data() {
23
+ return {
24
+ dataSetList: []
25
+ };
26
+ },
27
+ computed: {
28
+ dataSourceList() {
29
+ return !this.designer.formConfig || !this.designer.formConfig.dataSources ? [] : this.designer.formConfig.dataSources;
30
+ }
31
+ },
32
+ watch: {
33
+ selectedWidget: {
34
+ handler(e, o) {
35
+ e && this.loadDataSet(e.options.dsName);
36
+ },
37
+ immediate: !0
38
+ }
39
+ },
40
+ methods: {
41
+ handleSave(e) {
42
+ this.optionModel.treeData = JSON.parse(e);
43
+ },
44
+ openTableDataEdit() {
45
+ const e = JSON.stringify(this.optionModel.treeData, null, " ");
46
+ this.$refs.CodeModalEditorRef.open(e);
47
+ },
48
+ loadDataSet(e) {
49
+ if (this.dataSetList.length = 0, !e)
50
+ return;
51
+ const o = y(this.designer.formConfig, e);
52
+ o && o.dataSets && o.dataSets.forEach((t) => {
53
+ this.dataSetList.push({
54
+ name: t.name,
55
+ remark: t.remark
56
+ });
57
+ });
58
+ },
59
+ getDataSetList() {
60
+ this.optionModel.dataSetName = "", this.loadDataSet(this.optionModel.dsName);
61
+ }
62
+ }
63
+ };
64
+ function L(e, o, t, O, U, p) {
65
+ const b = d("a-divider"), i = d("a-form-item"), s = d("a-input"), m = d("a-switch"), h = d("a-button"), M = d("HttpEditor"), S = d("CodeModalEditor");
66
+ return r(), D(w, null, [
67
+ a(i, { "label-width": "0" }, {
68
+ default: n(() => [
69
+ a(b, { class: "custom-divider-margin-top" }, {
70
+ default: n(() => [
71
+ f(g(e.i18nt("参数设置")), 1)
72
+ ]),
73
+ _: 1
74
+ })
75
+ ]),
76
+ _: 1
77
+ }),
78
+ a(i, {
79
+ label: e.i18nt("designer.setting.labelKeyName")
80
+ }, {
81
+ default: n(() => [
82
+ a(s, {
83
+ size: "small",
84
+ value: t.optionModel.labelKey,
85
+ "onUpdate:value": o[0] || (o[0] = (l) => t.optionModel.labelKey = l),
86
+ allowClear: ""
87
+ }, null, 8, ["value"])
88
+ ]),
89
+ _: 1
90
+ }, 8, ["label"]),
91
+ a(i, {
92
+ label: e.i18nt("designer.setting.valueKeyName")
93
+ }, {
94
+ default: n(() => [
95
+ a(s, {
96
+ size: "small",
97
+ value: t.optionModel.valueKey,
98
+ "onUpdate:value": o[1] || (o[1] = (l) => t.optionModel.valueKey = l),
99
+ allowClear: ""
100
+ }, null, 8, ["value"])
101
+ ]),
102
+ _: 1
103
+ }, 8, ["label"]),
104
+ e.hasConfig("childrenKey") ? (r(), u(i, {
105
+ key: 0,
106
+ label: e.i18nt("designer.setting.childrenKeyName")
107
+ }, {
108
+ default: n(() => [
109
+ a(s, {
110
+ size: "small",
111
+ value: t.optionModel.childrenKey,
112
+ "onUpdate:value": o[2] || (o[2] = (l) => t.optionModel.childrenKey = l),
113
+ allowClear: ""
114
+ }, null, 8, ["value"])
115
+ ]),
116
+ _: 1
117
+ }, 8, ["label"])) : c("", !0),
118
+ a(i, {
119
+ label: e.i18nt("是否展示连接线 ")
120
+ }, {
121
+ default: n(() => [
122
+ a(m, {
123
+ checked: t.optionModel.showLine,
124
+ "onUpdate:checked": o[3] || (o[3] = (l) => t.optionModel.showLine = l)
125
+ }, null, 8, ["checked"])
126
+ ]),
127
+ _: 1
128
+ }, 8, ["label"]),
129
+ a(i, {
130
+ label: e.i18nt("是否可选择")
131
+ }, {
132
+ default: n(() => [
133
+ a(m, {
134
+ checked: t.optionModel.checkable,
135
+ "onUpdate:checked": o[4] || (o[4] = (l) => t.optionModel.checkable = l)
136
+ }, null, 8, ["checked"])
137
+ ]),
138
+ _: 1
139
+ }, 8, ["label"]),
140
+ a(b, { class: "custom-divider-margin-top" }, {
141
+ default: n(() => [
142
+ f(g(e.i18nt("数据源设置")), 1)
143
+ ]),
144
+ _: 1
145
+ }),
146
+ a(i, {
147
+ label: e.i18nt("designer.setting.dsEnabled")
148
+ }, {
149
+ default: n(() => [
150
+ a(m, {
151
+ checked: t.optionModel.dsEnabled,
152
+ "onUpdate:checked": o[5] || (o[5] = (l) => t.optionModel.dsEnabled = l)
153
+ }, null, 8, ["checked"])
154
+ ]),
155
+ _: 1
156
+ }, 8, ["label"]),
157
+ t.optionModel.dsEnabled ? c("", !0) : (r(), u(i, {
158
+ key: 1,
159
+ label: e.i18nt("designer.setting.tableDataEdit")
160
+ }, {
161
+ default: n(() => [
162
+ a(h, {
163
+ type: "primary",
164
+ shape: "round",
165
+ onClick: p.openTableDataEdit
166
+ }, {
167
+ default: n(() => [
168
+ f(g(e.i18nt("designer.setting.editAction")), 1)
169
+ ]),
170
+ _: 1
171
+ }, 8, ["onClick"])
172
+ ]),
173
+ _: 1
174
+ }, 8, ["label"])),
175
+ t.optionModel.dsEnabled ? (r(), u(M, {
176
+ key: 2,
177
+ designer: t.designer,
178
+ "selected-widget": t.selectedWidget,
179
+ optionModel: t.optionModel
180
+ }, null, 8, ["designer", "selected-widget", "optionModel"])) : c("", !0),
181
+ a(S, {
182
+ ref: "CodeModalEditorRef",
183
+ mode: "json",
184
+ readonly: !1,
185
+ isShowEventHeader: !1,
186
+ title: e.i18nt("designer.setting.tableDataEdit"),
187
+ onSave: p.handleSave
188
+ }, null, 8, ["title", "onSave"])
189
+ ], 64);
190
+ }
191
+ const R = /* @__PURE__ */ N(K, [["render", L]]);
192
+ export {
193
+ R as default
194
+ };
195
+ //# sourceMappingURL=tree-data-editor.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree-data-editor.vue.js","sources":["../../../../../../../src/components/form-designer/setting-panel/property-editor/field-tree/tree-data-editor.vue"],"sourcesContent":["<template>\n <a-form-item label-width=\"0\">\n <a-divider class=\"custom-divider-margin-top\">\n {{ i18nt('参数设置') }}\n </a-divider>\n </a-form-item>\n <a-form-item :label=\"i18nt('designer.setting.labelKeyName')\">\n <a-input size=\"small\" v-model:value=\"optionModel.labelKey\" allowClear />\n </a-form-item>\n <a-form-item :label=\"i18nt('designer.setting.valueKeyName')\">\n <a-input size=\"small\" v-model:value=\"optionModel.valueKey\" allowClear />\n </a-form-item>\n <a-form-item v-if=\"hasConfig('childrenKey')\" :label=\"i18nt('designer.setting.childrenKeyName')\">\n <a-input size=\"small\" v-model:value=\"optionModel.childrenKey\" allowClear />\n </a-form-item>\n\n <a-form-item :label=\"i18nt('是否展示连接线\t')\">\n <a-switch v-model:checked=\"optionModel.showLine\" />\n </a-form-item>\n\n <a-form-item :label=\"i18nt('是否可选择')\">\n <a-switch v-model:checked=\"optionModel.checkable\" />\n </a-form-item>\n\n <a-divider class=\"custom-divider-margin-top\">\n {{ i18nt('数据源设置') }}\n </a-divider>\n <a-form-item :label=\"i18nt('designer.setting.dsEnabled')\">\n <a-switch v-model:checked=\"optionModel.dsEnabled\" />\n </a-form-item>\n <a-form-item v-if=\"!optionModel.dsEnabled\" :label=\"i18nt('designer.setting.tableDataEdit')\">\n <a-button type=\"primary\" shape=\"round\" @click=\"openTableDataEdit\">\n {{ i18nt('designer.setting.editAction') }}\n </a-button>\n </a-form-item>\n <HttpEditor\n v-if=\"!!optionModel.dsEnabled\"\n :designer=\"designer\"\n :selected-widget=\"selectedWidget\"\n :optionModel=\"optionModel\"\n />\n\n <CodeModalEditor\n ref=\"CodeModalEditorRef\"\n mode=\"json\"\n :readonly=\"false\"\n :isShowEventHeader=\"false\"\n :title=\"i18nt('designer.setting.tableDataEdit')\"\n @save=\"handleSave\"\n />\n</template>\n\n<script>\n import i18n from '@/utils/i18n';\n import OptionItemsSetting from '@/components/form-designer/setting-panel/option-items-setting';\n import propertyMixin from '@/components/form-designer/setting-panel/property-editor/propertyMixin';\n import { getDSByName } from '@/utils/util';\n import HttpEditor from '@/components/http-editor/index.vue';\n import CodeModalEditor from '@/components/code-editor/code-modal-editor.vue';\n\n export default {\n name: 'tree-data-editor',\n mixins: [i18n, propertyMixin],\n props: {\n designer: Object,\n selectedWidget: Object,\n optionModel: Object\n },\n components: {\n CodeModalEditor,\n OptionItemsSetting,\n HttpEditor\n },\n data() {\n return {\n dataSetList: []\n };\n },\n computed: {\n dataSourceList() {\n if (!this.designer.formConfig || !this.designer.formConfig.dataSources) {\n return [];\n } else {\n return this.designer.formConfig.dataSources;\n }\n }\n },\n watch: {\n selectedWidget: {\n handler(val, oldVal) {\n if (!val) {\n return;\n }\n\n this.loadDataSet(val.options.dsName);\n },\n immediate: true\n }\n },\n methods: {\n handleSave(value) {\n this.optionModel.treeData = JSON.parse(value);\n },\n openTableDataEdit() {\n const treeDataOptions = JSON.stringify(this.optionModel.treeData, null, ' ');\n this.$refs.CodeModalEditorRef.open(treeDataOptions);\n },\n loadDataSet(dsName) {\n this.dataSetList.length = 0;\n if (!dsName) {\n return;\n }\n\n const dsModel = getDSByName(this.designer.formConfig, dsName);\n if (!!dsModel && !!dsModel.dataSets) {\n dsModel.dataSets.forEach(dSet => {\n this.dataSetList.push({\n name: dSet.name,\n remark: dSet.remark\n });\n });\n }\n },\n\n getDataSetList() {\n this.optionModel.dataSetName = '';\n this.loadDataSet(this.optionModel.dsName);\n }\n }\n };\n</script>\n\n<style scoped></style>\n"],"names":["_sfc_main","i18n","propertyMixin","CodeModalEditor","OptionItemsSetting","HttpEditor","val","oldVal","value","treeDataOptions","dsName","dsModel","getDSByName","dSet","_createVNode","_component_a_form_item","_component_a_divider","_ctx","_component_a_input","$props","_cache","$event","_createBlock","_component_a_switch","_component_a_button","$options","_component_HttpEditor","_component_CodeModalEditor"],"mappings":";;;;;;;;AA4DI,MAAKA,IAAU;AAAA,EACX,MAAM;AAAA,EACN,QAAQ,CAACC,GAAMC,CAAa;AAAA,EAC5B,OAAO;AAAA,IACH,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,aAAa;AAAA;EAEjB,YAAY;AAAA,IACR,iBAAAC;AAAAA,IACA,oBAAAC;AAAA,IACA,YAAAC;AAAAA;EAEJ,OAAO;AACH,WAAO;AAAA,MACH,aAAa,CAAA;AAAA;EAErB;AAAA,EACA,UAAU;AAAA,IACN,iBAAiB;AACb,aAAI,CAAC,KAAK,SAAS,cAAc,CAAC,KAAK,SAAS,WAAW,cAChD,CAAA,IAEA,KAAK,SAAS,WAAW;AAAA,IAExC;AAAA;EAEJ,OAAO;AAAA,IACH,gBAAgB;AAAA,MACZ,QAAQC,GAAKC,GAAQ;AACjB,QAAKD,KAIL,KAAK,YAAYA,EAAI,QAAQ,MAAM;AAAA,MACvC;AAAA,MACA,WAAW;AAAA,IACf;AAAA;EAEJ,SAAS;AAAA,IACL,WAAWE,GAAO;AACd,WAAK,YAAY,WAAW,KAAK,MAAMA,CAAK;AAAA,IAChD;AAAA,IACA,oBAAoB;AAChB,YAAMC,IAAkB,KAAK,UAAU,KAAK,YAAY,UAAU,MAAM,IAAI;AAC5E,WAAK,MAAM,mBAAmB,KAAKA,CAAe;AAAA,IACtD;AAAA,IACA,YAAYC,GAAQ;AAEhB,UADA,KAAK,YAAY,SAAS,GACtB,CAAC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