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

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 (21) hide show
  1. package/package.json +1 -1
  2. package/src/components/FormRender/index.vue.js +5 -79
  3. package/src/components/FormRender/index.vue2.js +85 -2
  4. package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue.js +3 -3
  5. package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue2.js +36 -30
  6. package/src/components/form-designer/form-widget/container-widget/useTableWidget.js +58 -54
  7. package/src/components/form-designer/form-widget/field-widget/hooks/useSelect.js +16 -16
  8. package/src/components/form-designer/form-widget/field-widget/useField.js +117 -108
  9. package/src/components/form-designer/index.vue.js +60 -62
  10. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +3 -3
  11. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue2.js +49 -47
  12. package/src/components/form-designer/toolbar-panel/PreviewDialog.vue.js +1 -1
  13. package/src/components/form-designer/widget-panel/advanced/data-table.js +7 -19
  14. package/src/components/form-render/container-items/data-table-widget.vue.js +1 -1
  15. package/src/components/form-render/container-items/data-table-widget.vue2.js +57 -49
  16. package/src/components/form-render/dynamic-dialog.vue.js +91 -94
  17. package/src/components/public/CustomerModal/CustomerModal.vue2.js +16 -16
  18. package/src/hooks/useDataHttp.js +15 -12
  19. package/src/lang/zh-CN.js +4 -3
  20. package/stats.html +1 -1
  21. package/styles/style.css +1 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as V, mergeModels as W, ref as b, useModel as E, createVNode as i, resolveComponent as n, computed as N, createElementBlock as B, openBlock as O, Fragment as j, unref as o, withCtx as a, createTextVNode as f, toDisplayString as m, createElementVNode as F, nextTick as k, isVNode as L } from "vue";
1
+ import { defineComponent as N, mergeModels as V, ref as b, useModel as W, createVNode as i, resolveComponent as n, computed as E, createElementBlock as B, openBlock as O, Fragment as j, unref as s, withCtx as r, createTextVNode as m, toDisplayString as p, createElementVNode as F, nextTick as k, isVNode as L } from "vue";
2
2
  import { useI18n as $ } from "../../../../../utils/i18n.js";
3
3
  import q from "../../../../code-editor/code-modal-editor.vue.js";
4
4
  import { cloneDeep as K } from "lodash-es";
@@ -8,14 +8,14 @@ import { useDesigner as Q } from "../../../form-widget/useFormDesigner.js";
8
8
  const X = {
9
9
  class: "add-btn t-flex t-justify-center t-mt-[10px]"
10
10
  };
11
- function p(u) {
11
+ function f(u) {
12
12
  return typeof u == "function" || Object.prototype.toString.call(u) === "[object Object]" && !L(u);
13
13
  }
14
- const se = /* @__PURE__ */ V({
14
+ const oe = /* @__PURE__ */ N({
15
15
  name: "tableColumns-editor",
16
16
  inheritAttrs: !1,
17
17
  __name: "data-table-tableColumns-editor",
18
- props: /* @__PURE__ */ W({
18
+ props: /* @__PURE__ */ V({
19
19
  selectedWidget: {}
20
20
  }, {
21
21
  optionModel: {
@@ -27,12 +27,12 @@ const se = /* @__PURE__ */ V({
27
27
  }),
28
28
  emits: ["update:optionModel"],
29
29
  setup(u, {
30
- expose: y
30
+ expose: _
31
31
  }) {
32
32
  Q();
33
33
  const {
34
34
  i18nt: l
35
- } = $(), v = b(null), c = b(!1), h = b(), C = E(u, "optionModel"), _ = [{
35
+ } = $(), v = b(null), c = b(!1), h = b(), C = W(u, "optionModel"), y = [{
36
36
  value: "left",
37
37
  label: "left"
38
38
  }, {
@@ -162,26 +162,28 @@ const se = /* @__PURE__ */ V({
162
162
  }, {
163
163
  field: "fixed",
164
164
  title: l("designer.setting.fixedColumn"),
165
- width: 100,
165
+ width: 120,
166
166
  slots: {
167
167
  default({
168
168
  row: e
169
169
  }) {
170
- let t, s;
171
- return i(n("a-select"), {
170
+ let t, o, a;
171
+ return i(n("a-radio-group"), {
172
172
  value: e.fixed,
173
- "onUpdate:value": (d) => e.fixed = d,
174
- allowClear: !0,
175
- style: "width: 100%"
173
+ "onUpdate:value": (d) => e.fixed = d
176
174
  }, {
177
- default: () => [i(n("a-select-option"), {
175
+ default: () => [i(n("a-radio-button"), {
178
176
  value: "left"
179
- }, p(t = l("designer.setting.fixedLeft")) ? t : {
177
+ }, f(t = l("designer.setting.fixedLeft")) ? t : {
180
178
  default: () => [t]
181
- }), i(n("a-select-option"), {
179
+ }), i(n("a-radio-button"), {
180
+ value: null
181
+ }, f(o = l("designer.setting.fixedNull")) ? o : {
182
+ default: () => [o]
183
+ }), i(n("a-radio-button"), {
182
184
  value: "right"
183
- }, p(s = l("designer.setting.fixedRight")) ? s : {
184
- default: () => [s]
185
+ }, f(a = l("designer.setting.fixedRight")) ? a : {
186
+ default: () => [a]
185
187
  })]
186
188
  });
187
189
  }
@@ -197,7 +199,7 @@ const se = /* @__PURE__ */ V({
197
199
  return i(n("a-select"), {
198
200
  value: e.align,
199
201
  "onUpdate:value": (t) => e.align = t,
200
- options: _,
202
+ options: y,
201
203
  style: "width: 100%"
202
204
  }, null);
203
205
  }
@@ -213,7 +215,7 @@ const se = /* @__PURE__ */ V({
213
215
  row: e,
214
216
  rowIndex: t
215
217
  }) {
216
- let s;
218
+ let o;
217
219
  return i(n("a-button"), {
218
220
  class: [{
219
221
  "button-text-highlight": !!e.customRender
@@ -221,8 +223,8 @@ const se = /* @__PURE__ */ V({
221
223
  onClick: () => M(e),
222
224
  size: "small",
223
225
  shape: "round"
224
- }, p(s = l("designer.setting.edit")) ? s : {
225
- default: () => [s]
226
+ }, f(o = l("designer.setting.edit")) ? o : {
227
+ default: () => [o]
226
228
  });
227
229
  }
228
230
  }
@@ -241,12 +243,12 @@ const se = /* @__PURE__ */ V({
241
243
  type: "link",
242
244
  onClick: () => S(e),
243
245
  size: "small"
244
- }, p(t = l("designer.setting.delete")) ? t : {
246
+ }, f(t = l("designer.setting.delete")) ? t : {
245
247
  default: () => [t]
246
248
  });
247
249
  }
248
250
  }
249
- }], T = N(() => ({
251
+ }], T = E(() => ({
250
252
  columnConfig: {
251
253
  resizable: !0
252
254
  },
@@ -275,7 +277,7 @@ const se = /* @__PURE__ */ V({
275
277
  }, U = (e) => {
276
278
  h.value && (h.value.customRender = e);
277
279
  }, D = async () => {
278
- var t, s, d, r;
280
+ var t, o, a, d;
279
281
  const e = {
280
282
  isAutoWidth: !0,
281
283
  columnId: (/* @__PURE__ */ new Date()).getTime(),
@@ -291,7 +293,7 @@ const se = /* @__PURE__ */ V({
291
293
  ellipsis: !1,
292
294
  showSorterTooltip: !1
293
295
  };
294
- await ((t = g.value) == null ? void 0 : t.insertAt(e, -1)), await k(), console.log((s = g.value) == null ? void 0 : s.getRowById(e.columnId)), (r = g.value) == null || r.scrollToRow((d = g.value) == null ? void 0 : d.getRowById(e.columnId));
296
+ await ((t = g.value) == null ? void 0 : t.insertAt(e, -1)), await k(), console.log((o = g.value) == null ? void 0 : o.getRowById(e.columnId)), (d = g.value) == null || d.scrollToRow((a = g.value) == null ? void 0 : a.getRowById(e.columnId));
295
297
  }, S = (e) => {
296
298
  var t;
297
299
  if (w().length === 1)
@@ -304,52 +306,52 @@ const se = /* @__PURE__ */ V({
304
306
  I(K(C.value.tableColumns));
305
307
  }, 100);
306
308
  };
307
- return y({
309
+ return _({
308
310
  openSetting: x
309
311
  }), (e, t) => {
310
- const s = n("a-button"), d = n("a-form-item");
311
- return O(), B(j, null, [i(d, {
312
- label: o(l)("designer.setting.tableColEdit")
312
+ const o = n("a-button"), a = n("a-form-item");
313
+ return O(), B(j, null, [i(a, {
314
+ label: s(l)("designer.setting.tableColEdit")
313
315
  }, {
314
- default: a(() => [i(s, {
316
+ default: r(() => [i(o, {
315
317
  type: "primary",
316
318
  shape: "round",
317
319
  onClick: x
318
320
  }, {
319
- default: a(() => [f(m(o(l)("designer.setting.editAction")), 1)]),
321
+ default: r(() => [m(p(s(l)("designer.setting.editAction")), 1)]),
320
322
  _: 1
321
323
  })]),
322
324
  _: 1
323
- }, 8, ["label"]), i(o(G), {
324
- title: o(l)("designer.setting.tableColEdit"),
325
+ }, 8, ["label"]), i(s(G), {
326
+ title: s(l)("designer.setting.tableColEdit"),
325
327
  visible: c.value,
326
- "onUpdate:visible": t[2] || (t[2] = (r) => c.value = r),
328
+ "onUpdate:visible": t[2] || (t[2] = (d) => c.value = d),
327
329
  width: "1280px",
328
330
  height: "70vh"
329
331
  }, {
330
- footerRight: a(() => [i(s, {
332
+ footerRight: r(() => [i(o, {
331
333
  size: "default",
332
- onClick: t[1] || (t[1] = (r) => c.value = !1)
334
+ onClick: t[1] || (t[1] = (d) => c.value = !1)
333
335
  }, {
334
- default: a(() => [f(m(o(l)("designer.hint.cancel")), 1)]),
336
+ default: r(() => [m(p(s(l)("designer.hint.cancel")), 1)]),
335
337
  _: 1
336
- }), i(s, {
338
+ }), i(o, {
337
339
  size: "default",
338
340
  type: "primary",
339
341
  onClick: A
340
342
  }, {
341
- default: a(() => [f(m(o(l)("designer.hint.confirm")), 1)]),
343
+ default: r(() => [m(p(s(l)("designer.hint.confirm")), 1)]),
342
344
  _: 1
343
345
  })]),
344
- default: a(() => [i(o(H), {
345
- onRegister: o(z)
346
- }, null, 8, ["onRegister"]), F("div", X, [i(s, {
347
- title: o(l)("designer.setting.addTableColumn"),
346
+ default: r(() => [i(s(H), {
347
+ onRegister: s(z)
348
+ }, null, 8, ["onRegister"]), F("div", X, [i(o, {
349
+ title: s(l)("designer.setting.addTableColumn"),
348
350
  type: "primary",
349
351
  size: "medium",
350
- onClick: t[0] || (t[0] = (r) => D())
352
+ onClick: t[0] || (t[0] = (d) => D())
351
353
  }, {
352
- default: a(() => [f(m(o(l)("designer.setting.addTableColumn")), 1)]),
354
+ default: r(() => [m(p(s(l)("designer.setting.addTableColumn")), 1)]),
353
355
  _: 1
354
356
  }, 8, ["title"])])]),
355
357
  _: 1
@@ -357,12 +359,12 @@ const se = /* @__PURE__ */ V({
357
359
  onSave: U,
358
360
  ref_key: "CodeModalEditorRef",
359
361
  ref: v,
360
- title: o(l)("designer.setting.renderFunction"),
362
+ title: s(l)("designer.setting.renderFunction"),
361
363
  "fn-params": "scope"
362
364
  }, null, 8, ["title"])], 64);
363
365
  };
364
366
  }
365
367
  });
366
368
  export {
367
- se as default
369
+ oe as default
368
370
  };
@@ -16,7 +16,7 @@ const z = { class: "form-render-wrapper" }, te = /* @__PURE__ */ L({
16
16
  }),
17
17
  emits: ["update:visible"],
18
18
  setup(b) {
19
- const y = T(() => import("../../FormRender/index.vue2.js"));
19
+ const y = T(() => import("../../FormRender/index.vue.js"));
20
20
  V("designState", !1);
21
21
  const { formConfig: _, designer: d } = q(), w = B({ type: "add", ...c() }), { i18nt: l } = I(), f = E(b, "visible"), F = () => {
22
22
  var e;
@@ -1,6 +1,6 @@
1
- import { getUuidKey as t } from "@kp-ui/tool";
2
- const l = (a = {}) => ({
3
- key: t(),
1
+ import { getUuidKey as a } from "@kp-ui/tool";
2
+ const l = (t = {}) => ({
3
+ key: a(),
4
4
  type: "data-table",
5
5
  category: "container",
6
6
  icon: "data-table",
@@ -57,23 +57,11 @@ const l = (a = {}) => ({
57
57
  },
58
58
  dataReqHandlerCode: "",
59
59
  dataHandlerCode: "",
60
- rowKey: "name",
60
+ rowKey: "_id",
61
61
  childrenKey: "children",
62
- dataSource: [
63
- {
64
- date: "2016-05-02",
65
- date2: "2016-05-02 23:12:12",
66
- date3: "2016-05-02 9:11:12",
67
- name: "小二",
68
- add: "上海市普陀区金沙江路 1518 弄",
69
- age: 100
70
- }
71
- ],
62
+ dataSource: [],
72
63
  onCreated: "",
73
64
  onMounted: "",
74
- // onHideOperationButton: '',
75
- // onDisableOperationButton: '',
76
- // onOperationButtonClick: '',
77
65
  customRow: {
78
66
  onClick: "",
79
67
  onDblclick: "",
@@ -97,7 +85,7 @@ const l = (a = {}) => ({
97
85
  hasRowSelection: !1,
98
86
  preserveSelectedRowKeys: !1,
99
87
  fixed: !0,
100
- onChange: "console.log(122222,selectedRowKeys, selectedRows)",
88
+ onChange: "console.log(selectedRowKeys, selectedRows)",
101
89
  columnWidth: 32,
102
90
  getCheckboxProps: (e) => ({
103
91
  disabled: e.name === "Disabled User",
@@ -105,7 +93,7 @@ const l = (a = {}) => ({
105
93
  name: e.name
106
94
  })
107
95
  },
108
- ...a
96
+ ...t
109
97
  }
110
98
  });
111
99
  export {
@@ -1,7 +1,7 @@
1
1
  import t from "./data-table-widget.vue2.js";
2
2
  /* empty css */
3
3
  import a from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ a(t, [["__scopeId", "data-v-ad273c72"]]);
4
+ const m = /* @__PURE__ */ a(t, [["__scopeId", "data-v-d5ee76ba"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,12 +1,12 @@
1
- import { defineComponent as v, watchEffect as D, onMounted as _, createBlock as M, createCommentVNode as N, unref as e, openBlock as W, mergeProps as y, withCtx as F, createElementVNode as S, normalizeStyle as V, createVNode as I } from "vue";
2
- import L from "./container-wrapper.vue.js";
3
- import { ComponentNameEnum as P, ContainerTypeEnum as B } from "../../../constants/WidgetTypeEnum.js";
4
- import { useVxeTable as z, Table as H } from "tmgc2-share";
5
- import { useField as O } from "../../form-designer/form-widget/field-widget/useField.js";
6
- import { useTableWidget as j } from "../../form-designer/form-widget/container-widget/useTableWidget.js";
7
- const X = /* @__PURE__ */ v({
8
- name: B.DataTable,
9
- componentName: P.FieldWidget,
1
+ import { defineComponent as M, watchEffect as s, onMounted as N, createBlock as P, createCommentVNode as S, unref as e, openBlock as W, mergeProps as y, withCtx as F, createElementVNode as V, normalizeStyle as I, createVNode as L } from "vue";
2
+ import z from "./container-wrapper.vue.js";
3
+ import { ComponentNameEnum as B, ContainerTypeEnum as H } from "../../../constants/WidgetTypeEnum.js";
4
+ import { useVxeTable as O, Table as j } from "tmgc2-share";
5
+ import { useField as q } from "../../form-designer/form-widget/field-widget/useField.js";
6
+ import { useTableWidget as A } from "../../form-designer/form-widget/container-widget/useTableWidget.js";
7
+ const Y = /* @__PURE__ */ M({
8
+ name: H.DataTable,
9
+ componentName: B.FieldWidget,
10
10
  __name: "data-table-widget",
11
11
  props: {
12
12
  widget: {},
@@ -17,59 +17,67 @@ const X = /* @__PURE__ */ v({
17
17
  subFormRowIndex: {},
18
18
  subFormRowId: {}
19
19
  },
20
- setup(l, { expose: r }) {
21
- const t = l, { fieldModel: i, handleHidden: s, defineExposed: d, customClass: c } = O(t), {
22
- isLoading: m,
23
- tableProps: p,
24
- tableWidth: u,
25
- pagintion: f,
26
- setTableRef: b,
27
- initTableSoureData: g,
28
- handleTableChange: C,
29
- loadDataTableDataSource: h,
20
+ setup(d, { expose: c }) {
21
+ const t = d, { fieldModel: p, handleHidden: m, defineExposed: u, customClass: f } = q(t), {
22
+ isLoading: g,
23
+ tableProps: b,
24
+ tableWidth: C,
25
+ pagintion: l,
26
+ setPagination: i,
27
+ setTableRef: h,
28
+ initTableSoureData: w,
29
+ handleTableChange: x,
30
+ loadDataTableDataSource: r,
30
31
  onRunEvent: a,
31
- onSortChange: x,
32
- onCheckboxChange: T,
33
- tableDefinExpoed: w
34
- } = j({
32
+ onSortChange: T,
33
+ onCheckboxChange: v,
34
+ tableDefinExpoed: E
35
+ } = A({
35
36
  props: t,
36
- fieldModel: i
37
- }), { tableRef: n, register: E, selectedRowInfo: R, sorts: k } = z({
38
- props: p,
37
+ fieldModel: p
38
+ });
39
+ s(() => {
40
+ t.field.options.showPagination || i({
41
+ total: 0
42
+ });
43
+ }), l.value.onChange = (o, _) => {
44
+ r();
45
+ };
46
+ const { tableRef: n, register: R, selectedRowInfo: k, sorts: D } = O({
47
+ props: b,
39
48
  events: {
40
49
  cellDblclick: (o) => a(o, "onDblclick"),
41
50
  cellMouseenter: (o) => a(o, "onMouseenter"),
42
51
  cellMouseleave: (o) => a(o, "onMouseleave")
43
52
  },
44
53
  callbacks: {
45
- onCheckboxChange: T,
46
- onSortChange: x
54
+ onCheckboxChange: v,
55
+ onSortChange: T
47
56
  }
48
57
  });
49
- return D(() => {
50
- n.value && b(n.value);
51
- }), _(() => {
52
- setTimeout(() => {
53
- g();
54
- }, 1e3);
55
- }), r({
56
- ...d,
57
- ...w,
58
- sorts: k,
59
- selectedRowInfo: R,
60
- loadDataTableDataSource: h,
58
+ return s(() => {
59
+ n.value && h(n.value);
60
+ }), N(() => {
61
+ w();
62
+ }), c({
63
+ ...u,
64
+ ...E,
65
+ setPagination: i,
66
+ sorts: D,
67
+ selectedRowInfo: k,
68
+ loadDataTableDataSource: r,
61
69
  fieldEditor: n
62
- }), (o, q) => e(s) ? N("", !0) : (W(), M(L, y({ key: 0 }, t, { customClass: e(c) }), {
70
+ }), (o, _) => e(m) ? S("", !0) : (W(), P(z, y({ key: 0 }, t, { customClass: e(f) }), {
63
71
  default: F(() => [
64
- S("div", {
72
+ V("div", {
65
73
  class: "talbe-wrapper",
66
- style: V({ width: e(u) })
74
+ style: I({ width: e(C) })
67
75
  }, [
68
- I(e(H), {
69
- onRegister: e(E),
70
- onChange: e(C),
71
- loading: e(m),
72
- pagination: e(f)
76
+ L(e(j), {
77
+ onRegister: e(R),
78
+ onChange: e(x),
79
+ loading: e(g),
80
+ pagination: e(l)
73
81
  }, null, 8, ["onRegister", "onChange", "loading", "pagination"])
74
82
  ], 4)
75
83
  ]),
@@ -78,5 +86,5 @@ const X = /* @__PURE__ */ v({
78
86
  }
79
87
  });
80
88
  export {
81
- X as default
89
+ Y as default
82
90
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as H, computed as u, ref as c, onBeforeUnmount as J, resolveDirective as L, createBlock as N, openBlock as x, unref as s, mergeProps as P, withCtx as C, withDirectives as U, createElementBlock as V, createVNode as D, nextTick as $ } from "vue";
2
- import { useExecFunction as A, TpfModal as I } from "tmgc2-share";
3
- import q from "./SubmitButtonRender.vue.js";
4
- import { useLowcode as z } from "../../hooks/useLowcode.js";
5
- import G from "../FormRender/index.vue.js";
6
- const K = { class: "dialog-content" }, le = /* @__PURE__ */ H({
1
+ import { defineComponent as M, computed as f, ref as u, onBeforeUnmount as S, createBlock as V, openBlock as N, unref as i, mergeProps as H, withCtx as y, createElementVNode as J, createVNode as x, nextTick as L } from "vue";
2
+ import { useExecFunction as P, TpfModal as U } from "tmgc2-share";
3
+ import A from "./SubmitButtonRender.vue.js";
4
+ import { useLowcode as I } from "../../hooks/useLowcode.js";
5
+ import $ from "../FormRender/index.vue.js";
6
+ const q = { class: "dialog-content" }, ne = /* @__PURE__ */ M({
7
7
  name: "dynamic-dialog",
8
8
  __name: "dynamic-dialog",
9
9
  props: {
@@ -45,119 +45,116 @@ const K = { class: "dialog-content" }, le = /* @__PURE__ */ H({
45
45
  default: null
46
46
  }
47
47
  },
48
- setup(n, { expose: h }) {
49
- const e = n, O = u(() => e.options.height || "500px"), p = c(null), m = c(!1), a = c(!1), { context: r, asyncExecuteFunction: v, executeFunction: B } = A(), { vfdRef: i, formConfig: Q, isLoading: b, getComponentJson: R, goBack: W } = z({
48
+ setup(n, { expose: C }) {
49
+ const e = n, D = f(() => e.options.height || "500px"), c = u(null), p = u(!1), l = u(!1), { context: r, asyncExecuteFunction: m, executeFunction: R } = P(), { vfdRef: s, formConfig: z, isLoading: v, getComponentJson: F, goBack: G } = I({
50
50
  formCode: e.options.formCode,
51
51
  ...e.vfCtx
52
- }), k = u(() => ({
52
+ }), O = f(() => ({
53
53
  ...e.parentFormRef,
54
54
  parentDom: r.value,
55
- getParentFormRef: S
56
- })), w = u(() => e.options.cancelButtonHidden && e.options.okButtonHidden ? { footer: null } : {});
57
- J(() => {
55
+ getParentFormRef: E
56
+ })), h = f(() => e.options.cancelButtonHidden && e.options.okButtonHidden ? { footer: null } : {});
57
+ S(() => {
58
58
  var t, o;
59
59
  console.log(e.parentFormRef), (o = (t = e.parentFormRef) == null ? void 0 : t.setChildFormRef) == null || o.call(t, null);
60
60
  });
61
- const F = (t) => {
62
- b.value = t;
63
- }, T = (t) => {
61
+ const B = (t) => {
62
+ v.value = t;
63
+ }, k = (t) => {
64
64
  e.options.title = t;
65
- }, j = () => {
66
- a.value = !0;
67
- }, E = () => {
68
- a.value = !0, $(async () => {
69
- var t, o, l;
70
- (t = e.options) != null && t.readMode && ((o = i.value) == null || o.setReadMode(!0)), await R([], e.options.formCode), (l = i.value) == null || l.setDialogOrDrawerRef(r.value), e.parentFormRef && e.parentFormRef.setChildFormRef(i.value), y();
65
+ }, w = () => {
66
+ l.value = !0;
67
+ }, T = () => {
68
+ l.value = !0, L(async () => {
69
+ var t, o, a;
70
+ (t = e.options) != null && t.readMode && ((o = s.value) == null || o.setReadMode(!0)), await F([], e.options.formCode), (a = s.value) == null || a.setDialogOrDrawerRef(r.value), e.parentFormRef && e.parentFormRef.setChildFormRef(s.value), g();
71
71
  });
72
- }, M = async () => {
72
+ }, j = async () => {
73
73
  if (e.options.onDialogBeforeClose)
74
- return await v({
74
+ return await m({
75
75
  functionBody: e.options.onDialogBeforeClose
76
76
  });
77
- a.value = !1;
78
- }, g = () => {
79
- d() && (a.value = !1);
80
- }, d = async () => e.options.onDialogBeforeClose ? B({
77
+ l.value = !1;
78
+ }, b = () => {
79
+ d() && (l.value = !1);
80
+ }, d = async () => e.options.onDialogBeforeClose ? R({
81
81
  functionBody: e.options.onDialogBeforeClose
82
- }) : !0, y = async () => {
82
+ }) : !0, g = async () => {
83
83
  if (e.options.onDialogOpened)
84
- return await v({
84
+ return await m({
85
85
  functionBody: e.options.onDialogOpened
86
86
  });
87
- }, S = () => e.parentFormRef;
88
- return h({
87
+ }, E = () => e.parentFormRef;
88
+ return C({
89
+ getFormRef: () => s.value,
89
90
  setDisabled: (t) => {
90
- m.value = t;
91
+ p.value = t;
91
92
  },
92
93
  setleftText: (t) => {
93
- p.value = t;
94
+ c.value = t;
94
95
  },
95
- setLoading: F,
96
- setTitle: T,
97
- beforeOpen: j,
98
- show: E,
99
- close: M,
96
+ setLoading: B,
97
+ setTitle: k,
98
+ beforeOpen: w,
99
+ show: T,
100
+ close: j,
100
101
  handleBeforeClose: d,
101
- handleCloseEvent: g,
102
- handleOpenedEvent: y,
102
+ handleCloseEvent: b,
103
+ handleOpenedEvent: g,
103
104
  updateTable: () => {
104
- var t, o, l;
105
- (l = (o = (t = e.vfCtx) == null ? void 0 : t.parent) == null ? void 0 : o.exposed) != null && l.updateTable && e.vfCtx.parent.exposed.updateTable();
105
+ var t, o, a;
106
+ (a = (o = (t = e.vfCtx) == null ? void 0 : t.parent) == null ? void 0 : o.exposed) != null && a.updateTable && e.vfCtx.parent.exposed.updateTable();
106
107
  },
107
108
  getExtraData: () => e.extraData
108
- }), (t, o) => {
109
- const l = L("loading");
110
- return x(), N(s(I), P({
111
- class: "tpf-model design-model",
112
- destroyOnClose: !0,
113
- title: n.options.title,
114
- bodyStyle: {
115
- height: O.value,
116
- overflow: "auto",
117
- ...JSON.parse(n.options.bodyStyle || "{}")
118
- },
119
- centered: !0,
120
- visible: a.value,
121
- "onUpdate:visible": o[1] || (o[1] = (f) => a.value = f),
122
- width: n.options.width,
123
- mask: n.options.showModal,
124
- maskClosable: n.options.closeOnClickModal,
125
- keyboard: n.options.closeOnPressEscape,
126
- onCancel: g,
127
- "left-num": p.value
128
- }, w.value), {
129
- footerRight: C(() => [
130
- D(q, {
131
- disabled: m.value,
132
- "dialog-visible": a.value,
133
- "onUpdate:dialogVisible": o[0] || (o[0] = (f) => a.value = f),
134
- handleBeforeClose: d,
135
- options: n.options,
136
- ctx: s(i)
137
- }, null, 8, ["disabled", "dialog-visible", "options", "ctx"])
138
- ]),
139
- default: C(() => [
140
- U((x(), V("div", K, [
141
- D(G, {
142
- ref_key: "vfdRef",
143
- ref: i,
144
- vfCtx: {
145
- ...n.vfCtx,
146
- instance: s(r)
147
- },
148
- "parent-form": k.value,
149
- "disabled-mode": n.options.disabledMode,
150
- "dynamic-creation": !0
151
- }, null, 8, ["vfCtx", "parent-form", "disabled-mode"])
152
- ])), [
153
- [l, s(b)]
154
- ])
155
- ]),
156
- _: 1
157
- }, 16, ["title", "bodyStyle", "visible", "width", "mask", "maskClosable", "keyboard", "left-num"]);
158
- };
109
+ }), (t, o) => (N(), V(i(U), H({
110
+ class: "tpf-model design-model",
111
+ destroyOnClose: !0,
112
+ title: n.options.title,
113
+ bodyStyle: {
114
+ height: D.value,
115
+ overflow: "auto",
116
+ ...JSON.parse(n.options.bodyStyle || "{}")
117
+ },
118
+ centered: !0,
119
+ visible: l.value,
120
+ "onUpdate:visible": o[1] || (o[1] = (a) => l.value = a),
121
+ width: n.options.width,
122
+ mask: n.options.showModal,
123
+ maskClosable: n.options.closeOnClickModal,
124
+ keyboard: n.options.closeOnPressEscape,
125
+ onCancel: b,
126
+ "left-num": c.value
127
+ }, h.value), {
128
+ footerRight: y(() => [
129
+ x(A, {
130
+ disabled: p.value,
131
+ "dialog-visible": l.value,
132
+ "onUpdate:dialogVisible": o[0] || (o[0] = (a) => l.value = a),
133
+ handleBeforeClose: d,
134
+ options: n.options,
135
+ ctx: i(s)
136
+ }, null, 8, ["disabled", "dialog-visible", "options", "ctx"])
137
+ ]),
138
+ default: y(() => [
139
+ J("div", q, [
140
+ x($, {
141
+ ref_key: "vfdRef",
142
+ ref: s,
143
+ loading: i(v),
144
+ vfCtx: {
145
+ ...n.vfCtx,
146
+ instance: i(r)
147
+ },
148
+ "parent-form": O.value,
149
+ "disabled-mode": n.options.disabledMode,
150
+ "dynamic-creation": !0
151
+ }, null, 8, ["loading", "vfCtx", "parent-form", "disabled-mode"])
152
+ ])
153
+ ]),
154
+ _: 1
155
+ }, 16, ["title", "bodyStyle", "visible", "width", "mask", "maskClosable", "keyboard", "left-num"]));
159
156
  }
160
157
  });
161
158
  export {
162
- le as default
159
+ ne as default
163
160
  };