@kp-ui/lowcode 2.14.0-beta.17 → 2.14.0-beta.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kp-ui/lowcode",
3
- "version": "2.14.0-beta.17",
3
+ "version": "2.14.0-beta.18",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -5,7 +5,7 @@ import h from "./container-wrapper.vue.js";
5
5
  import { resolveComponent as m, createBlock as f, openBlock as d, withCtx as p, createElementBlock as w, withModifiers as L, normalizeClass as x, createElementVNode as a, toDisplayString as C } from "vue";
6
6
  /* empty css */
7
7
  import W from "../../../../../_virtual/_plugin-vue_export-helper.js";
8
- const v = {
8
+ const u = {
9
9
  name: "vf-dialog-widget",
10
10
  componentName: "VfDialogWidget",
11
11
  mixins: [l, g],
@@ -75,7 +75,7 @@ const v = {
75
75
  }
76
76
  }
77
77
  }
78
- }, u = { class: "dialog-title" };
78
+ }, v = { class: "dialog-title" };
79
79
  function k(e, i, t, n, D, s) {
80
80
  const o = m("container-wrapper");
81
81
  return d(), f(o, {
@@ -91,8 +91,8 @@ function k(e, i, t, n, D, s) {
91
91
  key: t.widget.id,
92
92
  onClick: i[1] || (i[1] = L((r) => s.selectWidget(t.widget), ["stop"]))
93
93
  }, [
94
- a("div", u, [
95
- a("div", {
94
+ a("div", v, [
95
+ a("span", {
96
96
  class: "tpf-link",
97
97
  onClick: i[0] || (i[0] = (...r) => s.handleClickTitle && s.handleClickTitle(...r))
98
98
  }, C(t.widget.options.title), 1)
@@ -102,7 +102,7 @@ function k(e, i, t, n, D, s) {
102
102
  _: 1
103
103
  }, 8, ["designer", "widget", "parent-widget", "parent-list", "index-of-parent-list"]);
104
104
  }
105
- const j = /* @__PURE__ */ W(v, [["render", k], ["__scopeId", "data-v-cf739d00"]]);
105
+ const j = /* @__PURE__ */ W(u, [["render", k], ["__scopeId", "data-v-3833bfd1"]]);
106
106
  export {
107
107
  j as default
108
108
  };
@@ -1,5 +1,5 @@
1
1
  import { getUuidKey as o } from "@kp-ui/tool";
2
- const l = (e = {}) => ({
2
+ const t = (e = {}) => ({
3
3
  key: o(),
4
4
  type: "vf-dialog",
5
5
  category: "container",
@@ -17,6 +17,7 @@ const l = (e = {}) => ({
17
17
  closeOnPressEscape: !1,
18
18
  readMode: !1,
19
19
  disabledMode: !1,
20
+ disabled: !1,
20
21
  okButtonLabel: "",
21
22
  okButtonHidden: !1,
22
23
  cancelButtonLabel: "",
@@ -29,5 +30,5 @@ const l = (e = {}) => ({
29
30
  }
30
31
  });
31
32
  export {
32
- l as vfDialog
33
+ t as vfDialog
33
34
  };
@@ -1,8 +1,8 @@
1
- import { defineComponent as E, defineAsyncComponent as M, computed as c, ref as v, getCurrentInstance as S, onBeforeUnmount as L, resolveDirective as V, createBlock as H, openBlock as b, unref as f, mergeProps as I, withCtx as C, withDirectives as J, createElementBlock as P, createVNode as y, nextTick as U } from "vue";
1
+ import { defineComponent as M, defineAsyncComponent as S, computed as c, ref as u, getCurrentInstance as I, onBeforeUnmount as L, resolveDirective as N, createBlock as V, openBlock as b, unref as i, mergeProps as H, withCtx as C, withDirectives as J, createElementBlock as P, createVNode as y, nextTick as U } from "vue";
2
2
  import { TpfModal as W } from "tmgc2-share";
3
3
  import A from "./SubmitButtonRender.vue.js";
4
- import { useLowcode as N } from "../../hooks/useLowcode.js";
5
- const $ = { class: "dialog-content" }, oe = /* @__PURE__ */ E({
4
+ import { useLowcode as $ } from "../../hooks/useLowcode.js";
5
+ const q = { class: "dialog-content" }, ne = /* @__PURE__ */ M({
6
6
  name: "dynamic-dialog",
7
7
  __name: "dynamic-dialog",
8
8
  props: {
@@ -45,65 +45,68 @@ const $ = { class: "dialog-content" }, oe = /* @__PURE__ */ E({
45
45
  }
46
46
  },
47
47
  setup(n, { expose: R }) {
48
- const F = M(() => import("./index.vue.js")), e = n, x = c(() => e.options.height || "500px"), u = v(!1), a = v(!1), i = S(), { vfdRef: l, formConfig: q, getComponentJson: D, goBack: z } = N({
49
- formCode: e.options.formCode,
50
- ...e.vfCtx
51
- }), h = c(() => ({
52
- ...e.parentFormRef,
53
- parentDom: i,
54
- getParentFormRef: g
55
- })), O = c(() => e.options.cancelButtonHidden && e.options.okButtonHidden ? { footer: null } : {});
48
+ const F = S(() => import("./index.vue.js")), t = n, x = c(() => t.options.height || "500px"), D = u(null), p = u(!1), l = u(!1), r = I(), { vfdRef: a, formConfig: z, getComponentJson: h, goBack: G } = $({
49
+ formCode: t.options.formCode,
50
+ ...t.vfCtx
51
+ }), O = c(() => ({
52
+ ...t.parentFormRef,
53
+ parentDom: r,
54
+ getParentFormRef: v
55
+ })), w = c(() => t.options.cancelButtonHidden && t.options.okButtonHidden ? { footer: null } : {});
56
56
  L(() => {
57
- var o, t;
58
- console.log(e.parentFormRef), (t = (o = e.parentFormRef) == null ? void 0 : o.setChildFormRef) == null || t.call(o, null);
57
+ var e, o;
58
+ console.log(t.parentFormRef), (o = (e = t.parentFormRef) == null ? void 0 : e.setChildFormRef) == null || o.call(e, null);
59
59
  });
60
- const w = (o) => {
61
- console.log("setLoading", o), u.value = o;
62
- }, k = (o) => {
63
- e.options.title = o;
64
- }, B = () => {
65
- a.value = !0;
60
+ const k = (e) => {
61
+ console.log("setLoading", e), p.value = e;
62
+ }, B = (e) => {
63
+ t.options.title = e;
64
+ }, T = () => {
65
+ l.value = !0;
66
66
  }, j = async () => {
67
- a.value = !0, U(async () => {
68
- var o, t;
69
- e.options.readMode && ((o = l.value) == null || o.setReadMode(!0)), await D([], e.options.formCode), (t = l.value) == null || t.setDialogOrDrawerRef(i), e.parentFormRef && e.parentFormRef.setChildFormRef(l.value), m();
67
+ l.value = !0, U(async () => {
68
+ var e, o;
69
+ t.options.readMode && ((e = a.value) == null || e.setReadMode(!0)), await h([], t.options.formCode), (o = a.value) == null || o.setDialogOrDrawerRef(r), t.parentFormRef && t.parentFormRef.setChildFormRef(a.value), g();
70
70
  });
71
- }, T = () => {
72
- e.options.onDialogBeforeClose && new Function("done", e.options.onDialogBeforeClose).call(i) === !1 || (a.value = !1);
73
- }, r = () => {
74
- if (e.options.onDialogBeforeClose) {
75
- const o = new Function(e.options.onDialogBeforeClose);
76
- return console.log(o), o.call(i);
71
+ }, E = () => {
72
+ t.options.onDialogBeforeClose && new Function("done", t.options.onDialogBeforeClose).call(r) === !1 || (l.value = !1);
73
+ }, d = () => {
74
+ if (t.options.onDialogBeforeClose) {
75
+ const e = new Function(t.options.onDialogBeforeClose);
76
+ return console.log(e), e.call(r);
77
77
  }
78
78
  return !0;
79
- }, p = () => {
80
- r() && (a.value = !1);
81
79
  }, m = () => {
82
- e.options.onDialogOpened && new Function(e.options.onDialogOpened).call(i);
83
- }, g = () => e.parentFormRef;
80
+ d() && (l.value = !1);
81
+ }, g = () => {
82
+ t.options.onDialogOpened && new Function(t.options.onDialogOpened).call(r);
83
+ }, v = () => t.parentFormRef;
84
84
  return R({
85
- setLoading: w,
86
- setTitle: k,
87
- beforeOpen: B,
85
+ setleftText: (e) => {
86
+ D.value = e;
87
+ },
88
+ setLoading: k,
89
+ setTitle: B,
90
+ beforeOpen: T,
88
91
  show: j,
89
- close: T,
90
- handleBeforeClose: r,
91
- handleCloseEvent: p,
92
- handleOpenedEvent: m,
93
- getParentFormRef: g,
94
- getFormRef: () => (console.log("getFormRef"), l.value),
95
- getWidgetRef: (o, t = !1) => {
92
+ close: E,
93
+ handleBeforeClose: d,
94
+ handleCloseEvent: m,
95
+ handleOpenedEvent: g,
96
+ getParentFormRef: v,
97
+ getFormRef: () => (console.log("getFormRef"), a.value),
98
+ getWidgetRef: (e, o = !1) => {
96
99
  var s;
97
- return (s = l.value) == null ? void 0 : s.getWidgetRef(o, t);
100
+ return (s = a.value) == null ? void 0 : s.getWidgetRef(e, o);
98
101
  },
99
102
  updateTable: () => {
100
- var o, t, s;
101
- (s = (t = (o = e.vfCtx) == null ? void 0 : o.parent) == null ? void 0 : t.exposed) != null && s.updateTable && e.vfCtx.parent.exposed.updateTable();
103
+ var e, o, s;
104
+ (s = (o = (e = t.vfCtx) == null ? void 0 : e.parent) == null ? void 0 : o.exposed) != null && s.updateTable && t.vfCtx.parent.exposed.updateTable();
102
105
  },
103
- getExtraData: () => e.extraData
104
- }), (o, t) => {
105
- const s = V("loading");
106
- return b(), H(f(W), I({
106
+ getExtraData: () => t.extraData
107
+ }), (e, o) => {
108
+ const s = N("loading");
109
+ return b(), V(i(W), H({
107
110
  class: "tpf-model design-model",
108
111
  destroyOnClose: !0,
109
112
  title: n.options.title,
@@ -113,42 +116,46 @@ const $ = { class: "dialog-content" }, oe = /* @__PURE__ */ E({
113
116
  ...JSON.parse(n.options.bodyStyle || "{}")
114
117
  },
115
118
  centered: !0,
116
- visible: a.value,
117
- "onUpdate:visible": t[1] || (t[1] = (d) => a.value = d),
119
+ visible: l.value,
120
+ "onUpdate:visible": o[1] || (o[1] = (f) => l.value = f),
118
121
  width: n.options.width,
119
122
  mask: n.options.showModal,
120
123
  maskClosable: n.options.closeOnClickModal,
121
124
  keyboard: n.options.closeOnPressEscape,
122
- onCancel: p
123
- }, O.value), {
125
+ onCancel: m,
126
+ "left-num": e.leftNumber
127
+ }, w.value), {
124
128
  footerRight: C(() => [
125
129
  y(A, {
126
- "dialog-visible": a.value,
127
- "onUpdate:dialogVisible": t[0] || (t[0] = (d) => a.value = d),
128
- handleBeforeClose: r,
130
+ "dialog-visible": l.value,
131
+ "onUpdate:dialogVisible": o[0] || (o[0] = (f) => l.value = f),
132
+ handleBeforeClose: d,
129
133
  options: n.options,
130
- ctx: f(l)
134
+ ctx: i(a)
131
135
  }, null, 8, ["dialog-visible", "options", "ctx"])
132
136
  ]),
133
137
  default: C(() => [
134
- J((b(), P("div", $, [
135
- y(f(F), {
138
+ J((b(), P("div", q, [
139
+ y(i(F), {
136
140
  ref_key: "vfdRef",
137
- ref: l,
138
- vfCtx: n.vfCtx,
139
- "parent-form": h.value,
141
+ ref: a,
142
+ vfCtx: {
143
+ ...n.vfCtx,
144
+ currentInstance: i(r)
145
+ },
146
+ "parent-form": O.value,
140
147
  "disabled-mode": n.options.disabledMode,
141
148
  "dynamic-creation": !0
142
149
  }, null, 8, ["vfCtx", "parent-form", "disabled-mode"])
143
150
  ])), [
144
- [s, u.value]
151
+ [s, p.value]
145
152
  ])
146
153
  ]),
147
154
  _: 1
148
- }, 16, ["title", "bodyStyle", "visible", "width", "mask", "maskClosable", "keyboard"]);
155
+ }, 16, ["title", "bodyStyle", "visible", "width", "mask", "maskClosable", "keyboard", "left-num"]);
149
156
  };
150
157
  }
151
158
  });
152
159
  export {
153
- oe as default
160
+ ne as default
154
161
  };
@@ -1,73 +1,79 @@
1
- import { defineComponent as x, getCurrentInstance as _, useAttrs as b, ref as w, computed as u, onMounted as k, createBlock as B, openBlock as V, unref as t, withCtx as l, createVNode as s, mergeProps as R, nextTick as $ } from "vue";
2
- import { useLowcode as h } from "../../../hooks/useLowcode.js";
3
- import M from "../../form-render/SubmitButtonRender.vue.js";
4
- import T from "../../form-render/index.vue.js";
5
- import { TpfConfigProvider as L, TpfModal as P } from "tmgc2-share";
6
- import { Skeleton as U } from "ant-design-vue";
1
+ import { defineComponent as k, getCurrentInstance as V, useAttrs as N, ref as d, computed as m, onMounted as R, createBlock as T, openBlock as $, unref as r, withCtx as l, createVNode as s, mergeProps as M, nextTick as B } from "vue";
2
+ import { useLowcode as L } from "../../../hooks/useLowcode.js";
3
+ import P from "../../form-render/SubmitButtonRender.vue.js";
4
+ import U from "../../form-render/index.vue.js";
5
+ import { TpfConfigProvider as A, TpfModal as F } from "tmgc2-share";
6
+ import { Skeleton as I } from "ant-design-vue";
7
7
  import "../../../utils/i18n.js";
8
- const q = /* @__PURE__ */ x({
8
+ const E = /* @__PURE__ */ k({
9
9
  __name: "CustomerModal",
10
10
  props: {
11
11
  title: {},
12
12
  type: {},
13
13
  formCode: {}
14
14
  },
15
- setup(p) {
16
- const a = _(), r = b() || {}, i = w(!1), e = p, m = u(() => {
17
- var n, o;
15
+ setup(c, {
16
+ expose: v
17
+ }) {
18
+ const u = V(), i = N() || {}, n = d(!1), e = c, g = m(() => {
19
+ var o, t;
18
20
  return {
19
- $router: a.proxy.$router,
20
- _id: ((o = (n = r == null ? void 0 : r.row) == null ? void 0 : n.record) == null ? void 0 : o._id) || null,
21
+ $router: u.proxy.$router,
22
+ _id: ((t = (o = i == null ? void 0 : i.row) == null ? void 0 : o.record) == null ? void 0 : t._id) || null,
21
23
  type: e.type,
22
- instance: a,
23
- ...r
24
+ instance: u,
25
+ ...i
24
26
  };
25
27
  }), {
26
- vfdRef: d,
27
- formConfig: c,
28
- getComponentJson: v,
29
- isLoading: C
30
- } = h({
28
+ vfdRef: a,
29
+ formConfig: C,
30
+ getComponentJson: x,
31
+ isLoading: y
32
+ } = L({
31
33
  formCode: e.formCode,
32
34
  type: e.type
33
- }), g = u(() => (console.log({
35
+ }), p = d(0), _ = m(() => (console.log({
34
36
  props: e
35
- }), e.title ? e.title : e.type === "add" ? "新增" : e.type === "edit" ? "编辑" : e.type === "view" ? "查看" : "新增")), y = async () => {
36
- i.value = !0, await $(), await v([]), console.log("attrs", r);
37
+ }), e.title ? e.title : e.type === "add" ? "新增" : e.type === "edit" ? "编辑" : e.type === "view" ? "查看" : "新增")), b = async () => {
38
+ n.value = !0, await B(), await x([]), console.log("attrs", i);
39
+ }, w = (o) => {
40
+ p.value = o;
37
41
  };
38
- return k(() => {
39
- y();
40
- }), (n, o) => (V(), B(t(L), null, {
41
- default: l(() => [s(t(P), R({
42
- visible: i.value,
43
- "onUpdate:visible": o[1] || (o[1] = (f) => i.value = f)
44
- }, n.$attrs, {
45
- title: g.value
42
+ return R(() => {
43
+ b();
44
+ }), v({
45
+ setleftText: w
46
+ }), (o, t) => ($(), T(r(A), null, {
47
+ default: l(() => [s(r(F), M({
48
+ visible: n.value,
49
+ "onUpdate:visible": t[1] || (t[1] = (f) => n.value = f)
50
+ }, o.$attrs, {
51
+ title: _.value,
52
+ leftNum: p.value
46
53
  }), {
47
- footerRight: l(() => [s(M, {
48
- dialogVisible: i.value,
49
- "onUpdate:dialogVisible": o[0] || (o[0] = (f) => i.value = f),
50
- options: t(c),
51
- handleBeforeClose: n.handleBeforeClose,
52
- ctx: t(d)
53
- }, null, 8, ["dialogVisible", "options", "handleBeforeClose", "ctx"])]),
54
- default: l(() => [s(t(U), {
54
+ footerRight: l(() => [s(P, {
55
+ dialogVisible: n.value,
56
+ "onUpdate:dialogVisible": t[0] || (t[0] = (f) => n.value = f),
57
+ options: r(C),
58
+ ctx: r(a)
59
+ }, null, 8, ["dialogVisible", "options", "ctx"])]),
60
+ default: l(() => [s(r(I), {
55
61
  active: "",
56
- loading: t(C)
62
+ loading: r(y)
57
63
  }, {
58
- default: l(() => [s(T, {
59
- vfCtx: m.value,
64
+ default: l(() => [s(U, {
65
+ vfCtx: g.value,
60
66
  ref_key: "vfdRef",
61
- ref: d
67
+ ref: a
62
68
  }, null, 8, ["vfCtx"])]),
63
69
  _: 1
64
70
  }, 8, ["loading"])]),
65
71
  _: 1
66
- }, 16, ["visible", "title"])]),
72
+ }, 16, ["visible", "title", "leftNum"])]),
67
73
  _: 1
68
74
  }));
69
75
  }
70
76
  });
71
77
  export {
72
- q as default
78
+ E as default
73
79
  };