@kp-ui/lowcode 2.15.0-alpha.16 → 2.15.0-alpha.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/FormRender/index.vue.js +2 -2
- package/src/components/FormRender/index.vue2.js +30 -34
- package/src/components/FormRender/useFormContext.js +109 -97
- package/src/components/form-designer/form-widget/container-widget/useTableWidget.js +38 -37
- package/src/components/form-designer/form-widget/field-widget/button-list-widget.vue.js +2 -2
- package/src/components/form-designer/form-widget/field-widget/button-list-widget.vue2.js +21 -20
- package/src/components/form-designer/form-widget/field-widget/button-widget.vue.js +2 -2
- package/src/components/form-designer/form-widget/field-widget/button-widget.vue2.js +11 -11
- package/src/components/form-designer/form-widget/field-widget/hooks/useSelect.js +72 -71
- package/src/components/form-designer/form-widget/field-widget/useField.js +12 -11
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +3 -3
- package/src/components/form-designer/useAppRef.js +29 -27
- package/src/components/form-render/SubmitButtonRender.vue.js +15 -17
- package/src/components/form-render/container-items/data-table-widget.vue.js +1 -1
- package/src/components/form-render/container-items/data-table-widget.vue2.js +56 -53
- package/src/components/form-render/container-items/grid-col-widget.vue.js +1 -1
- package/src/components/form-render/container-items/grid-col-widget.vue2.js +19 -17
- package/src/components/form-render/container-items/grid-sub-form-widget.vue.js +2 -2
- package/src/components/form-render/container-items/grid-sub-form-widget.vue2.js +103 -92
- package/src/components/form-render/container-items/grid-widget.vue.js +1 -1
- package/src/components/form-render/container-items/grid-widget.vue2.js +18 -16
- package/src/components/form-render/dynamic-dialog.vue.js +56 -52
- package/src/components/public/CustomerModal/CustomerModal.vue2.js +29 -26
- package/stats.html +1 -1
- package/styles/style.css +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ComponentNameEnum as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { useField as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { defineComponent as c, computed as a, createBlock as f, createCommentVNode as l, unref as t, openBlock as x, normalizeProps as b, mergeProps as g, withCtx as C, createVNode as L } from "vue";
|
|
2
|
+
import { ComponentNameEnum as _, WidgetTypeEnum as E } from "../../../../constants/WidgetTypeEnum.js";
|
|
3
|
+
import F from "./static-content-wrapper.vue.js";
|
|
4
|
+
import w from "../../../public/ActionButtonListRender.vue.js";
|
|
5
|
+
import { useField as k } from "./useField.js";
|
|
6
|
+
import { useExecFunction as N } from "tmgc2-share";
|
|
7
|
+
const V = /* @__PURE__ */ c({
|
|
8
|
+
name: E.buttonList,
|
|
9
|
+
componentName: _.FieldWidget,
|
|
9
10
|
__name: "button-list-widget",
|
|
10
11
|
props: {
|
|
11
12
|
widget: {},
|
|
@@ -18,22 +19,22 @@ const I = /* @__PURE__ */ u({
|
|
|
18
19
|
subFormRowId: {},
|
|
19
20
|
subFormColIndex: {}
|
|
20
21
|
},
|
|
21
|
-
setup(
|
|
22
|
-
const o =
|
|
23
|
-
return
|
|
24
|
-
buttonList:
|
|
25
|
-
...
|
|
26
|
-
}), (
|
|
27
|
-
default:
|
|
28
|
-
|
|
22
|
+
setup(n, { expose: i }) {
|
|
23
|
+
const o = n, s = a(() => e.options.buttonList || []), { fieldEditor: r, field: e, designState: d, handleHidden: m, defineExposed: p } = k(o), { context: u } = N();
|
|
24
|
+
return i({
|
|
25
|
+
buttonList: s,
|
|
26
|
+
...p
|
|
27
|
+
}), (S, W) => t(m) ? l("", !0) : (x(), f(F, b(g({ key: 0 }, o)), {
|
|
28
|
+
default: C(() => [
|
|
29
|
+
L(w, {
|
|
29
30
|
ref_key: "fieldEditor",
|
|
30
|
-
ref:
|
|
31
|
+
ref: r,
|
|
31
32
|
options: t(e).options,
|
|
32
|
-
designState: t(
|
|
33
|
+
designState: t(d),
|
|
33
34
|
buttonList: t(e).options.buttonList || [],
|
|
34
35
|
customClass: t(e).options.customClass || [],
|
|
35
36
|
flex: t(e).options.flex,
|
|
36
|
-
ctx: t(
|
|
37
|
+
ctx: t(u)
|
|
37
38
|
}, null, 8, ["options", "designState", "buttonList", "customClass", "flex", "ctx"])
|
|
38
39
|
]),
|
|
39
40
|
_: 1
|
|
@@ -41,5 +42,5 @@ const I = /* @__PURE__ */ u({
|
|
|
41
42
|
}
|
|
42
43
|
});
|
|
43
44
|
export {
|
|
44
|
-
|
|
45
|
+
V as default
|
|
45
46
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./button-widget.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const _ = /* @__PURE__ */ o(t, [["__scopeId", "data-v-06b0b085"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_ as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as _, resolveComponent as x, createBlock as i, createCommentVNode as s, unref as e, openBlock as
|
|
1
|
+
import { defineComponent as _, resolveComponent as x, createBlock as i, createCommentVNode as s, unref as e, openBlock as a, normalizeProps as y, mergeProps as k, withCtx as r, createVNode as w, normalizeClass as E, createTextVNode as F, toDisplayString as z } from "vue";
|
|
2
2
|
import N from "./static-content-wrapper.vue.js";
|
|
3
3
|
import { SvgIcon as W } from "tmgc2-share";
|
|
4
4
|
import { ComponentNameEnum as B, WidgetTypeEnum as I } from "../../../../constants/WidgetTypeEnum.js";
|
|
@@ -21,7 +21,7 @@ const H = /* @__PURE__ */ _({
|
|
|
21
21
|
setup(d, { expose: p }) {
|
|
22
22
|
const t = d, {
|
|
23
23
|
loading: l,
|
|
24
|
-
|
|
24
|
+
asyncExecuteFunction: c,
|
|
25
25
|
fieldEditor: m,
|
|
26
26
|
field: o,
|
|
27
27
|
size: u,
|
|
@@ -29,8 +29,8 @@ const H = /* @__PURE__ */ _({
|
|
|
29
29
|
handleHidden: g,
|
|
30
30
|
handleDisabled: b,
|
|
31
31
|
defineExposed: h
|
|
32
|
-
} = S(t), n = () => {
|
|
33
|
-
f || o.options.onClick && c({
|
|
32
|
+
} = S(t), n = async () => {
|
|
33
|
+
f || o.options.onClick && await c({
|
|
34
34
|
functionBody: o.options.onClick || ""
|
|
35
35
|
});
|
|
36
36
|
};
|
|
@@ -39,14 +39,14 @@ const H = /* @__PURE__ */ _({
|
|
|
39
39
|
handleButtonWidgetClick: n
|
|
40
40
|
}), (P, V) => {
|
|
41
41
|
const C = x("a-button");
|
|
42
|
-
return e(g) ? s("", !0) : (
|
|
43
|
-
default:
|
|
44
|
-
|
|
42
|
+
return e(g) ? s("", !0) : (a(), i(N, y(k({ key: 0 }, t)), {
|
|
43
|
+
default: r(() => [
|
|
44
|
+
w(C, {
|
|
45
45
|
ref_key: "fieldEditor",
|
|
46
46
|
ref: m,
|
|
47
47
|
type: e(o).options.type,
|
|
48
48
|
size: e(u),
|
|
49
|
-
class:
|
|
49
|
+
class: E([e(o).options.label === "" ? "hide-text-span" : "", "tpf-button"]),
|
|
50
50
|
shape: e(o).options.shape,
|
|
51
51
|
danger: e(o).options.danger,
|
|
52
52
|
ghost: e(o).options.ghost,
|
|
@@ -54,12 +54,12 @@ const H = /* @__PURE__ */ _({
|
|
|
54
54
|
loading: e(l),
|
|
55
55
|
onClick: n
|
|
56
56
|
}, {
|
|
57
|
-
default:
|
|
58
|
-
e(o).options.icon ? (
|
|
57
|
+
default: r(() => [
|
|
58
|
+
e(o).options.icon ? (a(), i(e(W), {
|
|
59
59
|
key: 0,
|
|
60
60
|
"icon-class": e(o).options.icon
|
|
61
61
|
}, null, 8, ["icon-class"])) : s("", !0),
|
|
62
|
-
|
|
62
|
+
F(" " + z(e(o).options.label), 1)
|
|
63
63
|
]),
|
|
64
64
|
_: 1
|
|
65
65
|
}, 8, ["type", "size", "class", "shape", "danger", "ghost", "disabled", "loading"])
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { debounce as
|
|
3
|
-
import { translateOptionItems as
|
|
4
|
-
import { useExecFunction as
|
|
5
|
-
function
|
|
1
|
+
import { ref as b, computed as c, unref as N } from "vue";
|
|
2
|
+
import { debounce as R, isArray as w } from "lodash-es";
|
|
3
|
+
import { translateOptionItems as q } from "../../../../../utils/util.js";
|
|
4
|
+
import { useExecFunction as D } from "tmgc2-share";
|
|
5
|
+
function Q(t, g) {
|
|
6
6
|
if (!Array.isArray(t))
|
|
7
7
|
return -1;
|
|
8
8
|
let l = -1;
|
|
@@ -10,122 +10,123 @@ function D(t, g) {
|
|
|
10
10
|
i === g && (l = s);
|
|
11
11
|
}), l;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
const i =
|
|
13
|
+
function V({ field: t, designState: g, fieldModel: l }) {
|
|
14
|
+
const i = b({
|
|
15
15
|
val: ""
|
|
16
|
-
}), s =
|
|
16
|
+
}), s = b(!1), a = b({
|
|
17
17
|
page: 1,
|
|
18
18
|
pageSize: 20,
|
|
19
19
|
totalPage: 0,
|
|
20
20
|
total: 0
|
|
21
|
-
}), { execHttpFunction:
|
|
22
|
-
var
|
|
21
|
+
}), { execHttpFunction: E } = D(), h = async () => {
|
|
22
|
+
var o;
|
|
23
23
|
if (!s.value) {
|
|
24
|
-
if (s.value = !0, t.options.dsEnabled && ((
|
|
24
|
+
if (s.value = !0, t.options.dsEnabled && ((o = t.options.http) != null && o.url)) {
|
|
25
|
+
a.value.page === 1 && P();
|
|
25
26
|
try {
|
|
26
|
-
const { http:
|
|
27
|
+
const { http: e, dataHandlerCode: n, dataReqHandlerCode: r } = t.options, m = t.options.loadingPage ? { page: a.value.page, pageSize: a.value.pageSize } : {}, u = await E(
|
|
27
28
|
{
|
|
28
|
-
http:
|
|
29
|
+
http: e,
|
|
29
30
|
dataHandlerCode: n,
|
|
30
|
-
dataReqHandlerCode:
|
|
31
|
+
dataReqHandlerCode: r
|
|
31
32
|
},
|
|
32
|
-
{}
|
|
33
|
+
{ data: m }
|
|
33
34
|
);
|
|
34
|
-
if (!
|
|
35
|
+
if (!u) {
|
|
35
36
|
s.value = !1;
|
|
36
37
|
return;
|
|
37
38
|
}
|
|
38
|
-
if (
|
|
39
|
-
|
|
39
|
+
if (w(u)) {
|
|
40
|
+
p(u), s.value = !1;
|
|
40
41
|
return;
|
|
41
42
|
}
|
|
42
|
-
|
|
43
|
-
} catch (
|
|
44
|
-
console.error("err: ",
|
|
43
|
+
w(u.list) && (t.options.loadingPage ? (a.value.total = u.total || 0, a.value.totalPage = u.totalPage || 0, p([...v(), ...u.list])) : p(u.list));
|
|
44
|
+
} catch (e) {
|
|
45
|
+
console.error("err: ", e);
|
|
45
46
|
}
|
|
46
|
-
else
|
|
47
|
-
|
|
47
|
+
} else
|
|
48
|
+
p([...v()]);
|
|
48
49
|
s.value = !1;
|
|
49
50
|
}
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
}, 500),
|
|
51
|
+
}, x = R(function() {
|
|
52
|
+
a.value.page += 1, h();
|
|
53
|
+
}, 500), H = (o) => {
|
|
53
54
|
if (!t.options.loadingPage) return;
|
|
54
|
-
const { target:
|
|
55
|
-
if (
|
|
56
|
-
if (
|
|
55
|
+
const { target: e } = o, { scrollTop: n, scrollHeight: r, clientHeight: m } = e;
|
|
56
|
+
if (r - (n + m) <= 30 && a.value.totalPage > a.value.page) {
|
|
57
|
+
if (a.value.totalPage === a.value.page)
|
|
57
58
|
return;
|
|
58
|
-
|
|
59
|
+
x();
|
|
59
60
|
}
|
|
60
|
-
},
|
|
61
|
+
}, C = c(() => (t == null ? void 0 : t.options.labelKey) || "label"), K = c(() => (t == null ? void 0 : t.options.valueKey) || "value"), L = c(() => (t == null ? void 0 : t.options.childrenKey) || "children"), y = c(() => ({
|
|
61
62
|
label: (t == null ? void 0 : t.options.labelKey) || "label",
|
|
62
63
|
value: (t == null ? void 0 : t.options.valueKey) || "value",
|
|
63
64
|
options: "options"
|
|
64
|
-
})),
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
t.options.showSearch && (g || (
|
|
68
|
-
}, A =
|
|
65
|
+
})), S = (o, e) => e[y.value.label].toLowerCase().indexOf(o.toLowerCase()) >= 0, P = () => {
|
|
66
|
+
a.value = { page: 1, pageSize: 20, total: 0, totalPage: 0 }, p([]);
|
|
67
|
+
}, z = (o) => {
|
|
68
|
+
t.options.showSearch && (g || (P(), i.value.val = o, h()));
|
|
69
|
+
}, A = c(() => {
|
|
69
70
|
var n;
|
|
70
|
-
const
|
|
71
|
+
const e = (n = t == null ? void 0 : t.options) == null ? void 0 : n.showSearch;
|
|
71
72
|
return {
|
|
72
73
|
loading: s.value,
|
|
73
74
|
fieldNames: y.value,
|
|
74
75
|
showSearch: !0,
|
|
75
|
-
onPopupScroll:
|
|
76
|
-
onSearch:
|
|
77
|
-
filterOption: !
|
|
76
|
+
onPopupScroll: H,
|
|
77
|
+
onSearch: z,
|
|
78
|
+
filterOption: !e && S,
|
|
78
79
|
listHeight: 240
|
|
79
80
|
};
|
|
80
|
-
}),
|
|
81
|
-
t.options.optionItems =
|
|
82
|
-
|
|
81
|
+
}), p = async (o) => {
|
|
82
|
+
t.options.optionItems = q(
|
|
83
|
+
o,
|
|
83
84
|
t.type,
|
|
84
85
|
t.options.labelKey || "label",
|
|
85
86
|
t.options.valueKey || "value"
|
|
86
87
|
);
|
|
87
|
-
}, v = () => t.options.optionItems, k = () => v().find((
|
|
88
|
+
}, v = () => t.options.optionItems, k = () => v().find((e) => e[K.value] === l.value), F = c(() => {
|
|
88
89
|
if (l.value === null)
|
|
89
90
|
return "";
|
|
90
91
|
{
|
|
91
|
-
let
|
|
92
|
-
const { valueKey:
|
|
93
|
-
return t.options.optionItems.forEach((
|
|
94
|
-
(
|
|
95
|
-
}),
|
|
92
|
+
let o = "";
|
|
93
|
+
const { valueKey: e, labelKey: n } = t.options;
|
|
94
|
+
return t.options.optionItems.forEach((r) => {
|
|
95
|
+
(r[e] === l.value || Q(l.value, r[e]) !== -1) && (o = o === "" ? r[n] : o + " " + r[n]);
|
|
96
|
+
}), o;
|
|
96
97
|
}
|
|
97
|
-
}),
|
|
98
|
+
}), I = () => {
|
|
98
99
|
t.options.dsEnabled && t.options.optionItems.splice(0, t.options.optionItems.length);
|
|
99
|
-
},
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
n.value ===
|
|
100
|
+
}, O = (o) => {
|
|
101
|
+
const e = t.options.optionItems;
|
|
102
|
+
e && e.length > 0 && e.forEach((n) => {
|
|
103
|
+
n.value === o && (n.disabled = !0);
|
|
103
104
|
});
|
|
104
105
|
};
|
|
105
106
|
return {
|
|
106
107
|
selectDefineExpose: {
|
|
107
108
|
getSelectedItem: k,
|
|
108
|
-
disableOption:
|
|
109
|
-
clearOptionItems:
|
|
110
|
-
enableOption: (
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
n.value ===
|
|
109
|
+
disableOption: O,
|
|
110
|
+
clearOptionItems: I,
|
|
111
|
+
enableOption: (o) => {
|
|
112
|
+
const e = t.options.optionItems;
|
|
113
|
+
e && e.length > 0 && e.forEach((n) => {
|
|
114
|
+
n.value === o && (n.disabled = !1);
|
|
114
115
|
});
|
|
115
116
|
},
|
|
116
117
|
getOptionItems: v,
|
|
117
|
-
keyword:
|
|
118
|
+
keyword: N(i)
|
|
118
119
|
},
|
|
119
|
-
disableOption:
|
|
120
|
-
clearOptionItems:
|
|
121
|
-
childrenKey:
|
|
122
|
-
valueKey:
|
|
123
|
-
labelKey:
|
|
124
|
-
optionLabel:
|
|
125
|
-
loadOptions:
|
|
126
|
-
filterOption:
|
|
120
|
+
disableOption: O,
|
|
121
|
+
clearOptionItems: I,
|
|
122
|
+
childrenKey: L,
|
|
123
|
+
valueKey: K,
|
|
124
|
+
labelKey: C,
|
|
125
|
+
optionLabel: F,
|
|
126
|
+
loadOptions: p,
|
|
127
|
+
filterOption: S,
|
|
127
128
|
keyword: i,
|
|
128
|
-
pager:
|
|
129
|
+
pager: a,
|
|
129
130
|
loading: s,
|
|
130
131
|
fieldNames: y,
|
|
131
132
|
selectOps: A,
|
|
@@ -134,5 +135,5 @@ function U({ field: t, designState: g, fieldModel: l }) {
|
|
|
134
135
|
};
|
|
135
136
|
}
|
|
136
137
|
export {
|
|
137
|
-
|
|
138
|
+
V as useSelect
|
|
138
139
|
};
|
|
@@ -7,12 +7,12 @@ import { useEmitter as $e } from "../../../../utils/useEmitter.js";
|
|
|
7
7
|
import { useAppRef as je } from "../../useAppRef.js";
|
|
8
8
|
import { useExecFunction as Ge } from "tmgc2-share";
|
|
9
9
|
function et(t) {
|
|
10
|
-
const K = c("getFormConfig", () => ({})), y = c("formData", f({})), Q = c("getReadMode", () => !1), k = c("isSubFormField", !1), D = c("getSubFormName", () => ""), o = c("designState", !1), { registerToRefList: X, getWidgetRef: Y, getFormRef: B, unregisterFromRefList: Z } = je(), { executeFunction: u, asyncExecuteFunction:
|
|
10
|
+
const K = c("getFormConfig", () => ({})), y = c("formData", f({})), Q = c("getReadMode", () => !1), k = c("isSubFormField", !1), D = c("getSubFormName", () => ""), o = c("designState", !1), { registerToRefList: X, getWidgetRef: Y, getFormRef: B, unregisterFromRefList: Z } = je(), { executeFunction: u, asyncExecuteFunction: g } = Ge(), { i18nt: M, i18n2t: _ } = Je(), { field: d } = t, v = f(null), A = f(null), R = f(!1), w = f(!1), l = f([]), O = f({}), H = f({}), p = f(null), h = ze(), { dispatch: E } = $e(), q = s(() => K()), ee = s(() => {
|
|
11
11
|
var e;
|
|
12
12
|
return (e = d == null ? void 0 : d.options) != null && e.size ? d.options.size : q.value.size || "middle";
|
|
13
13
|
}), b = s(() => D ? D() : ""), a = s({
|
|
14
14
|
get() {
|
|
15
|
-
return Le(y.value,
|
|
15
|
+
return Le(y.value, m.value);
|
|
16
16
|
},
|
|
17
17
|
set(e) {
|
|
18
18
|
x(e);
|
|
@@ -54,17 +54,17 @@ function et(t) {
|
|
|
54
54
|
return e.forEach((r, Ne) => {
|
|
55
55
|
r === n && (i = Ne);
|
|
56
56
|
}), i;
|
|
57
|
-
},
|
|
57
|
+
}, m = s(() => k && !o ? b.value + "." + t.subFormRowIndex + "." + t.field.options.name : t.field.options.name);
|
|
58
58
|
function oe() {
|
|
59
59
|
o || t.field.options.onCreated && j(async () => {
|
|
60
|
-
await
|
|
60
|
+
await g({
|
|
61
61
|
functionBody: t.field.options.onCreated
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
function le() {
|
|
66
66
|
o || t.field.options.onMounted && j(async () => {
|
|
67
|
-
await
|
|
67
|
+
await g({
|
|
68
68
|
functionBody: t.field.options.onMounted
|
|
69
69
|
});
|
|
70
70
|
});
|
|
@@ -135,8 +135,8 @@ function et(t) {
|
|
|
135
135
|
t.subFormRowIndex
|
|
136
136
|
]);
|
|
137
137
|
}, x = (e) => {
|
|
138
|
-
o || (E("VFormRender", "fieldValidation", [
|
|
139
|
-
fieldName:
|
|
138
|
+
o || (E("VFormRender", "fieldValidation", [m.value]), E("VFormRender", "fieldChange", {
|
|
139
|
+
fieldName: m.value,
|
|
140
140
|
value: e,
|
|
141
141
|
oldValue: $(a.value),
|
|
142
142
|
field: d
|
|
@@ -170,11 +170,11 @@ function et(t) {
|
|
|
170
170
|
});
|
|
171
171
|
}, me = async () => {
|
|
172
172
|
if (!o && t.field.options.onClick)
|
|
173
|
-
return await
|
|
173
|
+
return await g({
|
|
174
174
|
functionBody: t.field.options.onClick
|
|
175
175
|
});
|
|
176
176
|
}, ve = async () => {
|
|
177
|
-
o || V.value || d.options.onClickIcon && await
|
|
177
|
+
o || V.value || d.options.onClickIcon && await g({
|
|
178
178
|
functionBody: d.options.onClickIcon
|
|
179
179
|
});
|
|
180
180
|
}, F = () => v.value, T = (e) => (typeof e == "string" && (e = JSON.parse(e)), We(e) ? e.map((i, r) => ({
|
|
@@ -209,7 +209,7 @@ function et(t) {
|
|
|
209
209
|
}, xe = (e) => {
|
|
210
210
|
t.field.options.required = e, C(), !o && !e && P();
|
|
211
211
|
}, P = () => {
|
|
212
|
-
o || B().clearValidate(
|
|
212
|
+
o || B().clearValidate(m.value);
|
|
213
213
|
}, Ie = () => B().vfCtx, ke = (e) => {
|
|
214
214
|
t.field.options.label = e;
|
|
215
215
|
}, W = () => {
|
|
@@ -275,6 +275,7 @@ function et(t) {
|
|
|
275
275
|
focus: W
|
|
276
276
|
};
|
|
277
277
|
return {
|
|
278
|
+
asyncExecuteFunction: g,
|
|
278
279
|
executeFunction: u,
|
|
279
280
|
options: J,
|
|
280
281
|
customClass: He,
|
|
@@ -302,7 +303,7 @@ function et(t) {
|
|
|
302
303
|
handleHidden: ne,
|
|
303
304
|
handleDisabled: V,
|
|
304
305
|
findInArray: ie,
|
|
305
|
-
getPropName:
|
|
306
|
+
getPropName: m,
|
|
306
307
|
refreshDefaultValue: ae,
|
|
307
308
|
clearFieldRules: N,
|
|
308
309
|
buildFieldRules: C,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./data-table-tableColumns-editor.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import t from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ff49f09d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
import { useI18n as
|
|
2
|
-
import { message as
|
|
3
|
-
import { inject as
|
|
4
|
-
function
|
|
5
|
-
const { i18nt:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { useI18n as i } from "../../utils/i18n.js";
|
|
2
|
+
import { message as a } from "ant-design-vue";
|
|
3
|
+
import { inject as c, ref as d, getCurrentInstance as I, computed as g } from "vue";
|
|
4
|
+
function A(t, u) {
|
|
5
|
+
const { i18nt: v } = i(), l = u !== void 0;
|
|
6
|
+
l || (u = c("formWidgetId", ""));
|
|
7
|
+
const p = c("refList", t || d(/* @__PURE__ */ new Map())), o = I(), x = g(() => {
|
|
8
|
+
var r, e, n;
|
|
9
|
+
return (n = (e = (r = o == null ? void 0 : o.exposed) == null ? void 0 : r.field) == null ? void 0 : e.options) == null ? void 0 : n.name;
|
|
10
|
+
}), F = () => {
|
|
11
|
+
m();
|
|
12
|
+
}, f = (r, e) => {
|
|
13
|
+
const s = (l ? t == null ? void 0 : t.value : p.value).get(r);
|
|
14
|
+
return !s && e && a.error(v("render.hint.refNotFound") + r), s;
|
|
15
|
+
}, m = (r) => {
|
|
16
|
+
(l ? t == null ? void 0 : t.value : p.value).set(r || x.value, {
|
|
17
|
+
instance: o,
|
|
18
|
+
proxy: o == null ? void 0 : o.proxy,
|
|
19
|
+
...o == null ? void 0 : o.appContext.config.globalProperties,
|
|
20
|
+
...o == null ? void 0 : o.exposed
|
|
19
21
|
});
|
|
20
22
|
};
|
|
21
23
|
return {
|
|
22
|
-
refList:
|
|
23
|
-
getFormRef: () =>
|
|
24
|
-
registerToRefList:
|
|
24
|
+
refList: p,
|
|
25
|
+
getFormRef: () => f(u),
|
|
26
|
+
registerToRefList: m,
|
|
25
27
|
unregisterFromRefList: () => {
|
|
26
|
-
var
|
|
27
|
-
const
|
|
28
|
-
|
|
28
|
+
var e, n, s;
|
|
29
|
+
const r = (s = (n = (e = o == null ? void 0 : o.exposed) == null ? void 0 : e.field) == null ? void 0 : n.options) == null ? void 0 : s.name;
|
|
30
|
+
p.value.delete(r);
|
|
29
31
|
},
|
|
30
|
-
initRefList:
|
|
31
|
-
getWidgetRef:
|
|
32
|
+
initRefList: F,
|
|
33
|
+
getWidgetRef: f
|
|
32
34
|
};
|
|
33
35
|
}
|
|
34
36
|
export {
|
|
35
|
-
|
|
37
|
+
A as useAppRef
|
|
36
38
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useExecFunction as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as S, ref as B, computed as a, resolveComponent as m, createBlock as u, openBlock as s, withCtx as r, createCommentVNode as k, createTextVNode as v, toDisplayString as y } from "vue";
|
|
2
|
+
import { useI18n as L } from "../../utils/i18n.js";
|
|
3
|
+
import { useExecFunction as V } from "tmgc2-share";
|
|
4
|
+
const E = /* @__PURE__ */ S({
|
|
5
5
|
__name: "SubmitButtonRender",
|
|
6
6
|
props: {
|
|
7
7
|
disabled: { type: Boolean },
|
|
@@ -13,7 +13,7 @@ const T = /* @__PURE__ */ L({
|
|
|
13
13
|
},
|
|
14
14
|
emits: ["update:dialogVisible"],
|
|
15
15
|
setup(C, { emit: g }) {
|
|
16
|
-
const e = C, b = g, {
|
|
16
|
+
const e = C, b = g, { asyncExecuteFunction: d } = V(), l = B(!1), i = B(!1), { i18nt: f } = L(), c = a(() => (e == null ? void 0 : e.options) ?? {}), _ = a(() => c.value.cancelButtonHidden != null ? c.value.cancelButtonHidden === 0 : 1), h = a(() => c.value.okButtonHidden != null ? c.value.okButtonHidden === 0 : 1), x = a(
|
|
17
17
|
() => {
|
|
18
18
|
var t;
|
|
19
19
|
return ((t = e.options) == null ? void 0 : t.cancelButtonLabel) || f("designer.hint.cancel");
|
|
@@ -39,16 +39,14 @@ const T = /* @__PURE__ */ L({
|
|
|
39
39
|
} finally {
|
|
40
40
|
i.value = !1;
|
|
41
41
|
}
|
|
42
|
-
},
|
|
42
|
+
}, F = async () => {
|
|
43
43
|
var t;
|
|
44
44
|
if (!l.value)
|
|
45
45
|
try {
|
|
46
|
-
l.value = !0
|
|
47
|
-
const n = _({
|
|
46
|
+
if (l.value = !0, await d({
|
|
48
47
|
context: e.ctx,
|
|
49
48
|
functionBody: ((t = e.options) == null ? void 0 : t.onOkButtonClick) || ""
|
|
50
|
-
});
|
|
51
|
-
if (await d(n) === !1) return;
|
|
49
|
+
}) === !1) return;
|
|
52
50
|
p();
|
|
53
51
|
} catch (n) {
|
|
54
52
|
console.error("提交操作失败:", n);
|
|
@@ -57,24 +55,24 @@ const T = /* @__PURE__ */ L({
|
|
|
57
55
|
}
|
|
58
56
|
};
|
|
59
57
|
return (t, n) => {
|
|
60
|
-
const o = m("a-button"),
|
|
61
|
-
return s(), u(
|
|
58
|
+
const o = m("a-button"), N = m("a-space");
|
|
59
|
+
return s(), u(N, { x: 8 }, {
|
|
62
60
|
default: r(() => [
|
|
63
|
-
|
|
61
|
+
_.value ? (s(), u(o, {
|
|
64
62
|
key: "cancelButtonHidden",
|
|
65
63
|
loading: i.value,
|
|
66
64
|
onClick: w
|
|
67
65
|
}, {
|
|
68
66
|
default: r(() => [
|
|
69
|
-
v(y(
|
|
67
|
+
v(y(x.value), 1)
|
|
70
68
|
]),
|
|
71
69
|
_: 1
|
|
72
70
|
}, 8, ["loading"])) : k("", !0),
|
|
73
|
-
|
|
71
|
+
h.value ? (s(), u(o, {
|
|
74
72
|
type: "primary",
|
|
75
73
|
key: "okButtonHidden",
|
|
76
74
|
loading: l.value,
|
|
77
|
-
onClick:
|
|
75
|
+
onClick: F,
|
|
78
76
|
disabled: t.disabled
|
|
79
77
|
}, {
|
|
80
78
|
default: r(() => [
|
|
@@ -89,5 +87,5 @@ const T = /* @__PURE__ */ L({
|
|
|
89
87
|
}
|
|
90
88
|
});
|
|
91
89
|
export {
|
|
92
|
-
|
|
90
|
+
E as default
|
|
93
91
|
};
|
|
@@ -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-
|
|
4
|
+
const m = /* @__PURE__ */ a(t, [["__scopeId", "data-v-d707610a"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|