@aplus-frontend/ui 7.7.8 → 7.7.10
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/es/src/ag-grid/editable/form-item.vue.mjs +67 -66
- package/es/src/ag-grid/hooks/use-editable-form-item-api.d.ts +1 -0
- package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +98 -94
- package/es/src/ap-action/item-dropdown/index.vue.mjs +23 -21
- package/es/src/ap-action/item-popconfirm/index.vue.d.ts +1 -0
- package/es/src/ap-action/style/dropdown-item.mjs +7 -9
- package/es/src/ap-action/style/index.d.ts +3 -0
- package/es/src/ap-action/style/index.mjs +22 -26
- package/es/src/ap-field/style/textarea.mjs +10 -4
- package/es/src/ap-field/text-area/index.vue.mjs +24 -23
- package/es/src/ap-form/ap-form.vue2.mjs +27 -27
- package/es/src/ap-form/drawer-form/index.vue.d.ts +4 -4
- package/es/src/ap-form/interface.d.ts +2 -1
- package/es/src/ap-form/modal-form/index.vue.d.ts +4 -4
- package/es/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/es/src/ap-form/style/item.mjs +13 -19
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
- package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
- package/es/src/check-card/style/index.mjs +39 -37
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/hooks/use-editable-form-item-api.d.ts +1 -0
- package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +1 -0
- package/lib/src/ap-action/style/dropdown-item.js +1 -1
- package/lib/src/ap-action/style/index.d.ts +3 -0
- package/lib/src/ap-action/style/index.js +1 -1
- package/lib/src/ap-field/style/textarea.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +4 -4
- package/lib/src/ap-form/interface.d.ts +2 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +4 -4
- package/lib/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/lib/src/ap-form/style/item.js +1 -1
- package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
- package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
- package/lib/src/check-card/style/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
- package/es/src/check-card/group/style/css.d.ts +0 -1
- package/es/src/check-card/group/style/index.d.ts +0 -1
- package/lib/src/check-card/group/style/css.d.ts +0 -1
- package/lib/src/check-card/group/style/index.d.ts +0 -1
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { resetComponent as
|
|
2
|
-
import { genComponentStyleHook as
|
|
3
|
-
const
|
|
1
|
+
import { resetComponent as t } from "../../style/index.mjs";
|
|
2
|
+
import { genComponentStyleHook as s } from "../../utils/cssinjs/index.mjs";
|
|
3
|
+
const d = (o) => {
|
|
4
4
|
const {
|
|
5
|
-
loadingOpacity:
|
|
6
|
-
colorLink:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
colorWarn: e,
|
|
5
|
+
loadingOpacity: n,
|
|
6
|
+
colorLink: r,
|
|
7
|
+
colorSuccess: a,
|
|
8
|
+
colorError: l,
|
|
9
|
+
colorWarn: c,
|
|
11
10
|
componentCls: i
|
|
12
11
|
} = o;
|
|
13
12
|
return {
|
|
@@ -19,41 +18,38 @@ const p = (o) => {
|
|
|
19
18
|
textAlign: "center",
|
|
20
19
|
gap: o.spaceXS,
|
|
21
20
|
cursor: "pointer",
|
|
22
|
-
...
|
|
21
|
+
...t(o),
|
|
22
|
+
[`&:not(${i}--disabled):hover`]: {
|
|
23
|
+
opacity: 0.7
|
|
24
|
+
},
|
|
23
25
|
"&--primary": {
|
|
24
|
-
color:
|
|
25
|
-
[`&:not(${i}--disabled):hover`]: {
|
|
26
|
-
color: a
|
|
27
|
-
},
|
|
26
|
+
color: r,
|
|
28
27
|
[`&${i}--disabled`]: {
|
|
29
28
|
color: o.colorLinkDisabled
|
|
30
29
|
}
|
|
31
30
|
},
|
|
32
31
|
"&--success": {
|
|
33
|
-
color:
|
|
32
|
+
color: a,
|
|
34
33
|
[`&${i}--disabled`]: {
|
|
35
34
|
color: o.colorSuccessDisabled
|
|
36
35
|
}
|
|
37
36
|
},
|
|
38
37
|
"&--error": {
|
|
39
|
-
color:
|
|
38
|
+
color: l,
|
|
40
39
|
[`&${i}--disabled`]: {
|
|
41
40
|
color: o.colorErrorDisabled
|
|
42
41
|
}
|
|
43
42
|
},
|
|
44
43
|
"&--warn": {
|
|
45
|
-
color:
|
|
44
|
+
color: c,
|
|
46
45
|
[`&${i}--disabled`]: {
|
|
47
46
|
color: o.colorWarnDisabled
|
|
48
47
|
}
|
|
49
48
|
},
|
|
50
49
|
"&--loading": {
|
|
51
|
-
opacity:
|
|
50
|
+
opacity: n,
|
|
52
51
|
transition: `opacity ${o.motionDurationMid}`,
|
|
53
52
|
cursor: "default",
|
|
54
|
-
// [`${componentCls}-loading-icon`]: {
|
|
55
|
-
// marginRight: token.spaceXS
|
|
56
|
-
// },
|
|
57
53
|
[`&${i}--disabled`]: {
|
|
58
54
|
opacity: 1
|
|
59
55
|
}
|
|
@@ -71,7 +67,7 @@ const p = (o) => {
|
|
|
71
67
|
display: "inline-block",
|
|
72
68
|
lineHeight: 0,
|
|
73
69
|
transition: ["width", "opacity", "margin"].map(
|
|
74
|
-
(
|
|
70
|
+
(e) => `${e} ${o.motionDurationSlow} ${o.apActionLoadingIconEase}`
|
|
75
71
|
).join(",")
|
|
76
72
|
},
|
|
77
73
|
[`${i}-loading-icon-motion`]: {
|
|
@@ -90,9 +86,9 @@ const p = (o) => {
|
|
|
90
86
|
}
|
|
91
87
|
}
|
|
92
88
|
};
|
|
93
|
-
},
|
|
89
|
+
}, g = s(
|
|
94
90
|
"ApAction",
|
|
95
|
-
(o) => [
|
|
91
|
+
(o) => [d(o)],
|
|
96
92
|
{
|
|
97
93
|
loadingOpacity: 0.35,
|
|
98
94
|
apActionLoadingIconEase: "cubic-bezier(0.645, 0.045, 0.355, 1)"
|
|
@@ -102,6 +98,6 @@ const p = (o) => {
|
|
|
102
98
|
}
|
|
103
99
|
);
|
|
104
100
|
export {
|
|
105
|
-
|
|
106
|
-
|
|
101
|
+
g as default,
|
|
102
|
+
d as genActionItemStyle
|
|
107
103
|
};
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
const
|
|
2
|
-
const { componentCls:
|
|
1
|
+
const t = (a) => {
|
|
2
|
+
const { componentCls: e } = a;
|
|
3
3
|
return {
|
|
4
|
-
[`${
|
|
4
|
+
[`${e}-textarea--read`]: {
|
|
5
5
|
whiteSpace: "pre-wrap",
|
|
6
6
|
wordWrap: "break-word",
|
|
7
7
|
wordBreak: "break-all"
|
|
8
|
+
},
|
|
9
|
+
[`${e}-textarea`]: {
|
|
10
|
+
"&.ant-input-affix-wrapper-textarea-with-clear-btn .ant-input-clear-icon": {
|
|
11
|
+
insetBlockStart: "9px"
|
|
12
|
+
// (28 - 10) / 2
|
|
13
|
+
}
|
|
8
14
|
}
|
|
9
15
|
};
|
|
10
16
|
};
|
|
11
17
|
export {
|
|
12
|
-
|
|
18
|
+
t as genTextareaStyle
|
|
13
19
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isNil as
|
|
1
|
+
import { defineComponent as B, shallowRef as b, computed as I, createElementBlock as A, createBlock as C, openBlock as s, normalizeClass as g, unref as e, toDisplayString as z, mergeProps as T } from "vue";
|
|
2
|
+
import { isNil as w, omit as k } from "lodash-unified";
|
|
3
3
|
import "../../hooks/index.mjs";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { Input as
|
|
6
|
-
import { useDefaultPlaceholder as
|
|
7
|
-
import
|
|
8
|
-
import { useControllableValue as
|
|
9
|
-
import { useNamespace as
|
|
10
|
-
const
|
|
5
|
+
import { Input as R } from "@aplus-frontend/antdv";
|
|
6
|
+
import { useDefaultPlaceholder as S } from "../hooks/use-default-placeholder.mjs";
|
|
7
|
+
import _ from "../style/index.mjs";
|
|
8
|
+
import { useControllableValue as U } from "../../hooks/useControllableValue.mjs";
|
|
9
|
+
import { useNamespace as V } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
const q = /* @__PURE__ */ B({
|
|
11
11
|
name: "ApFieldTextArea",
|
|
12
12
|
__name: "index",
|
|
13
13
|
props: {
|
|
@@ -62,36 +62,37 @@ const O = /* @__PURE__ */ h({
|
|
|
62
62
|
beforeInput: {}
|
|
63
63
|
},
|
|
64
64
|
emits: ["update:value"],
|
|
65
|
-
setup(
|
|
66
|
-
const o =
|
|
67
|
-
function
|
|
68
|
-
const n = t.target.value || "",
|
|
69
|
-
|
|
65
|
+
setup(i, { expose: d, emit: c }) {
|
|
66
|
+
const o = b(), a = i, m = c, { value: l, updateValue: f } = U(a, m), { b: y, m: x } = V("field-textarea"), r = _("field"), v = S("TextArea", a);
|
|
67
|
+
function h(t) {
|
|
68
|
+
const n = t.target.value || "", u = a.beforeInput ? a.beforeInput?.(n) : n, p = o.value?.$el?.querySelector("textarea");
|
|
69
|
+
p && (p.value = u), f(u);
|
|
70
70
|
}
|
|
71
|
-
return
|
|
71
|
+
return d({
|
|
72
72
|
focus: (t) => {
|
|
73
73
|
o.value?.focus(t);
|
|
74
74
|
},
|
|
75
75
|
blur: () => {
|
|
76
76
|
o.value?.blur();
|
|
77
77
|
},
|
|
78
|
-
resizableTextArea:
|
|
79
|
-
}), (t, n) => t.mode === "read" ? (
|
|
78
|
+
resizableTextArea: I(() => o.value?.resizableTextArea)
|
|
79
|
+
}), (t, n) => t.mode === "read" ? (s(), A("span", {
|
|
80
80
|
key: 0,
|
|
81
|
-
class:
|
|
82
|
-
},
|
|
81
|
+
class: g([e(x)("read"), e(r)])
|
|
82
|
+
}, z(e(w)(e(l)) || e(l) === "" ? t.emptyText : e(l)), 3)) : (s(), C(e(R).TextArea, T(
|
|
83
83
|
{ key: 1 },
|
|
84
|
-
e(
|
|
84
|
+
e(k)(a, ["onUpdate:value", "value", "beforeInput", "emptyText"]),
|
|
85
85
|
{
|
|
86
86
|
ref_key: "textAreaRef",
|
|
87
87
|
ref: o,
|
|
88
|
-
placeholder: e(
|
|
88
|
+
placeholder: e(v),
|
|
89
89
|
value: e(l),
|
|
90
|
-
|
|
90
|
+
class: [e(y)(), e(r)],
|
|
91
|
+
onInput: h
|
|
91
92
|
}
|
|
92
|
-
), null, 16, ["placeholder", "value"]));
|
|
93
|
+
), null, 16, ["placeholder", "value", "class"]));
|
|
93
94
|
}
|
|
94
95
|
});
|
|
95
96
|
export {
|
|
96
|
-
|
|
97
|
+
q as default
|
|
97
98
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as ee, reactive as te, shallowRef as re, ref as oe, unref as h, nextTick as ne, toRaw as
|
|
1
|
+
import { defineComponent as ee, reactive as te, shallowRef as re, ref as oe, unref as h, nextTick as ne, toRaw as R, watch as ie, onWatcherCleanup as le, computed as se, createBlock as ae, openBlock as ue, mergeProps as ce, withCtx as fe, renderSlot as de } from "vue";
|
|
2
2
|
import { Form as ge } from "@aplus-frontend/antdv";
|
|
3
3
|
import { useProvideForm as me } from "./context.mjs";
|
|
4
|
-
import { isArray as f, cloneDeep as pe, isEqual as he, isFunction as
|
|
4
|
+
import { isArray as f, cloneDeep as pe, isEqual as he, isFunction as M, isPlainObject as B, omit as Fe } from "lodash-unified";
|
|
5
5
|
import { useUrlSearchParams as ye } from "@vueuse/core";
|
|
6
6
|
import { INTERNAL_FORM_INSTANCE_MARK as O } from "./constant.mjs";
|
|
7
7
|
import { getRouteType as Te } from "../utils/index.mjs";
|
|
8
8
|
import Ve from "./utils/set.mjs";
|
|
9
|
-
import { genParams as
|
|
9
|
+
import { genParams as _, setToParams as j } from "./utils/params.mjs";
|
|
10
10
|
import { useInjectFormProvider as ve } from "./provider/context.mjs";
|
|
11
11
|
import { getModelValue as x } from "./utils/get.mjs";
|
|
12
12
|
import { useDevWarning as Ce } from "../utils/warning.mjs";
|
|
@@ -61,12 +61,12 @@ const xe = /* @__PURE__ */ ee({
|
|
|
61
61
|
y();
|
|
62
62
|
}
|
|
63
63
|
const s = re(), v = ye(Te()), F = ve(), S = Ce("ApForm"), C = oe(
|
|
64
|
-
n.syncToUrl ?
|
|
64
|
+
n.syncToUrl ? _(n.syncToUrl, v, "get") : {}
|
|
65
65
|
);
|
|
66
|
-
let d = pe(
|
|
67
|
-
const l = te(
|
|
66
|
+
let d = pe(b()), g = {};
|
|
67
|
+
const l = te(b());
|
|
68
68
|
let m = [];
|
|
69
|
-
function
|
|
69
|
+
function b() {
|
|
70
70
|
const e = n.initialValues || {};
|
|
71
71
|
return n.syncToUrlPriority ? {
|
|
72
72
|
...e,
|
|
@@ -78,13 +78,13 @@ const xe = /* @__PURE__ */ ee({
|
|
|
78
78
|
}
|
|
79
79
|
function q(e) {
|
|
80
80
|
const t = p(e, g);
|
|
81
|
-
F.triggerFormFinish(n.name, e), n.syncToUrl && j(v,
|
|
81
|
+
F.triggerFormFinish(n.name, e), n.syncToUrl && j(v, _(n.syncToUrl, t, "set")), n.onFinish?.(t);
|
|
82
82
|
}
|
|
83
83
|
const D = async () => {
|
|
84
84
|
s.value?.resetFields(), await ne(() => {
|
|
85
85
|
Object.keys(l).forEach((e) => delete l[e]), Object.assign(l, d), y(), n.syncToUrl && j(
|
|
86
86
|
v,
|
|
87
|
-
|
|
87
|
+
_(
|
|
88
88
|
n.syncToUrl,
|
|
89
89
|
p(d, g),
|
|
90
90
|
"set"
|
|
@@ -99,18 +99,18 @@ const xe = /* @__PURE__ */ ee({
|
|
|
99
99
|
t
|
|
100
100
|
);
|
|
101
101
|
return p(r, g);
|
|
102
|
-
},
|
|
103
|
-
const t =
|
|
102
|
+
}, I = (e) => e === !0 ? R(l) : s.value?.getFieldsValue(e), k = (e) => {
|
|
103
|
+
const t = I(e);
|
|
104
104
|
return p(t, g);
|
|
105
105
|
}, G = (e, t) => s.value?.validate(e, t), H = (e, t = {}) => {
|
|
106
106
|
s.value?.scrollToField(e, t);
|
|
107
107
|
}, J = (e) => {
|
|
108
108
|
Object.assign(l, e), y();
|
|
109
|
-
},
|
|
109
|
+
}, U = (e, t, r = !0, o) => {
|
|
110
110
|
V(e, t, r, o), y();
|
|
111
111
|
};
|
|
112
|
-
function
|
|
113
|
-
return e(
|
|
112
|
+
function P(e) {
|
|
113
|
+
return e(R(l)), m.push(e), () => {
|
|
114
114
|
m = m.filter((t) => t !== e);
|
|
115
115
|
};
|
|
116
116
|
}
|
|
@@ -154,14 +154,14 @@ const xe = /* @__PURE__ */ ee({
|
|
|
154
154
|
), e === O)
|
|
155
155
|
return {
|
|
156
156
|
registerField: w,
|
|
157
|
-
registerWatch:
|
|
158
|
-
setFieldValue:
|
|
157
|
+
registerWatch: P,
|
|
158
|
+
setFieldValue: U,
|
|
159
159
|
getInitialValues: A
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
162
|
function y() {
|
|
163
163
|
if (m.length) {
|
|
164
|
-
const e =
|
|
164
|
+
const e = R(l);
|
|
165
165
|
m.forEach((t) => {
|
|
166
166
|
t(e);
|
|
167
167
|
});
|
|
@@ -172,14 +172,14 @@ const xe = /* @__PURE__ */ ee({
|
|
|
172
172
|
return;
|
|
173
173
|
let r = f(e) ? [] : {};
|
|
174
174
|
return Object.keys(e).forEach((o) => {
|
|
175
|
-
const a = e[o], i = t?.[o], u =
|
|
176
|
-
if (
|
|
177
|
-
const c = u(a);
|
|
178
|
-
z ? f(c) && f(r) ? r = [...r, ...c] :
|
|
175
|
+
const a = e[o], i = t?.[o], u = M(i) ? i : i?.transformer, z = M(i) ? !0 : i?.flat;
|
|
176
|
+
if (M(u)) {
|
|
177
|
+
const c = u(a, { getFieldsValue: I });
|
|
178
|
+
z ? f(c) && f(r) ? r = [...r, ...c] : B(c) && B(r) ? r = {
|
|
179
179
|
...r,
|
|
180
180
|
...c
|
|
181
181
|
} : r[o] = c : r[o] = c;
|
|
182
|
-
} else if (
|
|
182
|
+
} else if (B(a) || f(a)) {
|
|
183
183
|
const c = p(
|
|
184
184
|
a,
|
|
185
185
|
i
|
|
@@ -193,12 +193,12 @@ const xe = /* @__PURE__ */ ee({
|
|
|
193
193
|
resetFields: D,
|
|
194
194
|
clearValidate: K,
|
|
195
195
|
validateFields: L,
|
|
196
|
-
getFieldsValue:
|
|
196
|
+
getFieldsValue: I,
|
|
197
197
|
validate: G,
|
|
198
198
|
scrollToField: H,
|
|
199
199
|
setFieldsValue: J,
|
|
200
|
-
setFieldValue:
|
|
201
|
-
registerWatch:
|
|
200
|
+
setFieldValue: U,
|
|
201
|
+
registerWatch: P,
|
|
202
202
|
validateFieldsReturnTransformed: $,
|
|
203
203
|
getFieldsValueTransformed: k,
|
|
204
204
|
getInternalInstance: Z
|
|
@@ -217,9 +217,9 @@ const xe = /* @__PURE__ */ ee({
|
|
|
217
217
|
model: se(() => l),
|
|
218
218
|
updateModel: V,
|
|
219
219
|
internalInstance: {
|
|
220
|
-
registerWatch:
|
|
220
|
+
registerWatch: P,
|
|
221
221
|
registerField: w,
|
|
222
|
-
setFieldValue:
|
|
222
|
+
setFieldValue: U,
|
|
223
223
|
getInitialValues: A
|
|
224
224
|
}
|
|
225
225
|
}), N(E), (e, t) => (ue(), ae(h(ge), ce(
|
|
@@ -829,7 +829,7 @@ declare function __VLS_template(): {
|
|
|
829
829
|
validateOnRuleChange: boolean;
|
|
830
830
|
validateTrigger: string | string[];
|
|
831
831
|
syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
|
|
832
|
-
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "
|
|
832
|
+
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "getFieldsValue" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "validate" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "registerWatch" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
|
|
833
833
|
setFieldsValue: (fields: Partial<any>) => void;
|
|
834
834
|
setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
|
|
835
835
|
resetFields: () => Promise<void>;
|
|
@@ -852,13 +852,13 @@ declare function __VLS_template(): {
|
|
|
852
852
|
};
|
|
853
853
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
854
854
|
declare const __VLS_component: DefineComponent<ApFormDrawerFormProps, {
|
|
855
|
-
|
|
855
|
+
getFieldsValue: (nameList?: true | InternalNamePath[]) => Partial<any> | undefined;
|
|
856
856
|
setFieldsValue: (fields: Partial<any>) => void;
|
|
857
857
|
setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
|
|
858
858
|
resetFields: () => Promise<void>;
|
|
859
859
|
clearValidate: (name?: NamePath) => void;
|
|
860
860
|
validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
|
|
861
|
-
|
|
861
|
+
validate: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
|
|
862
862
|
scrollToField: (name: NamePath, options?: any) => void;
|
|
863
863
|
getInternalInstance: (mark: string) => ApFormInternalInstance | undefined;
|
|
864
864
|
validateFieldsReturnTransformed: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
|
|
@@ -1792,7 +1792,7 @@ declare const __VLS_component: DefineComponent<ApFormDrawerFormProps, {
|
|
|
1792
1792
|
validateOnRuleChange: boolean;
|
|
1793
1793
|
validateTrigger: string | string[];
|
|
1794
1794
|
syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
|
|
1795
|
-
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "
|
|
1795
|
+
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "getFieldsValue" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "validate" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "registerWatch" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
|
|
1796
1796
|
setFieldsValue: (fields: Partial<any>) => void;
|
|
1797
1797
|
setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
|
|
1798
1798
|
resetFields: () => Promise<void>;
|
|
@@ -4,9 +4,10 @@ import { InternalNamePath, NamePath, ValidateOptions } from '@aplus-frontend/ant
|
|
|
4
4
|
import { LiteralUnion, Recordable } from '../type';
|
|
5
5
|
import { VNode } from 'vue';
|
|
6
6
|
import { BreakPointType } from './search-form/hooks/use-count-per-row';
|
|
7
|
+
import { ApFormInstance } from './provider/interface';
|
|
7
8
|
export type { ApFormChangeInfo, ApFormFinishInfo } from './provider/interface';
|
|
8
9
|
export type ApFormColProps = Omit<ColProps, 'prefixCls'>;
|
|
9
|
-
export type ApFormItemTransformFn = (value: any) => any;
|
|
10
|
+
export type ApFormItemTransformFn = (value: any, api?: Pick<ApFormInstance, 'getFieldsValue'>) => any;
|
|
10
11
|
export type ApFormItemTransformType = ApFormItemTransformFn | {
|
|
11
12
|
transformer: ApFormItemTransformFn;
|
|
12
13
|
/**
|
|
@@ -830,7 +830,7 @@ declare function __VLS_template(): {
|
|
|
830
830
|
validateOnRuleChange: boolean;
|
|
831
831
|
validateTrigger: string | string[];
|
|
832
832
|
syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
|
|
833
|
-
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "
|
|
833
|
+
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "getFieldsValue" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "validate" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "registerWatch" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
|
|
834
834
|
setFieldsValue: (fields: Partial<any>) => void;
|
|
835
835
|
setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
|
|
836
836
|
resetFields: () => Promise<void>;
|
|
@@ -853,13 +853,13 @@ declare function __VLS_template(): {
|
|
|
853
853
|
};
|
|
854
854
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
855
855
|
declare const __VLS_component: DefineComponent<ApFormModalFormProps, {
|
|
856
|
-
|
|
856
|
+
getFieldsValue: (nameList?: true | InternalNamePath[]) => Partial<any> | undefined;
|
|
857
857
|
setFieldsValue: (fields: Partial<any>) => void;
|
|
858
858
|
setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
|
|
859
859
|
resetFields: () => Promise<void>;
|
|
860
860
|
clearValidate: (name?: NamePath) => void;
|
|
861
861
|
validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
|
|
862
|
-
|
|
862
|
+
validate: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
|
|
863
863
|
scrollToField: (name: NamePath, options?: any) => void;
|
|
864
864
|
getInternalInstance: (mark: string) => ApFormInternalInstance | undefined;
|
|
865
865
|
validateFieldsReturnTransformed: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
|
|
@@ -2033,7 +2033,7 @@ declare const __VLS_component: DefineComponent<ApFormModalFormProps, {
|
|
|
2033
2033
|
validateOnRuleChange: boolean;
|
|
2034
2034
|
validateTrigger: string | string[];
|
|
2035
2035
|
syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
|
|
2036
|
-
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "
|
|
2036
|
+
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "getFieldsValue" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "validate" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "registerWatch" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
|
|
2037
2037
|
setFieldsValue: (fields: Partial<any>) => void;
|
|
2038
2038
|
setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
|
|
2039
2039
|
resetFields: () => Promise<void>;
|
|
@@ -829,7 +829,7 @@ declare function __VLS_template(): {
|
|
|
829
829
|
validateOnRuleChange: boolean;
|
|
830
830
|
validateTrigger: string | string[];
|
|
831
831
|
syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
|
|
832
|
-
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "
|
|
832
|
+
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "getFieldsValue" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "validate" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "registerWatch" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
|
|
833
833
|
setFieldsValue: (fields: Partial<any>) => void;
|
|
834
834
|
setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
|
|
835
835
|
resetFields: () => Promise<void>;
|
|
@@ -1817,7 +1817,7 @@ declare const __VLS_component: DefineComponent<ApFormSearchFormProps, {
|
|
|
1817
1817
|
validateOnRuleChange: boolean;
|
|
1818
1818
|
validateTrigger: string | string[];
|
|
1819
1819
|
syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
|
|
1820
|
-
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "
|
|
1820
|
+
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "getFieldsValue" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "validate" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "registerWatch" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
|
|
1821
1821
|
setFieldsValue: (fields: Partial<any>) => void;
|
|
1822
1822
|
setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
|
|
1823
1823
|
resetFields: () => Promise<void>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { genComponentStyleHook as
|
|
2
|
-
const
|
|
3
|
-
const { componentCls:
|
|
1
|
+
import { genComponentStyleHook as r } from "../../utils/cssinjs/index.mjs";
|
|
2
|
+
const o = (n) => {
|
|
3
|
+
const { componentCls: e, namespace: a } = n, i = `${e}--disabled`, t = n.calc(n.controlHeight).sub(n.calc(n.lineWidth).mul(2)).equal();
|
|
4
4
|
return {
|
|
5
|
-
[
|
|
5
|
+
[e]: {
|
|
6
6
|
// bordered
|
|
7
7
|
"&--bordered": {
|
|
8
8
|
boxSizing: "border-box",
|
|
@@ -12,7 +12,7 @@ const r = (n) => {
|
|
|
12
12
|
".ant-input-affix-wrapper": {
|
|
13
13
|
padding: 0
|
|
14
14
|
},
|
|
15
|
-
[`&:has(.${
|
|
15
|
+
[`&:has(.${a}-batch-input-group):has(.ant-select)`]: {
|
|
16
16
|
".ant-input-affix-wrapper": {
|
|
17
17
|
paddingInlineEnd: n.space
|
|
18
18
|
}
|
|
@@ -23,7 +23,7 @@ const r = (n) => {
|
|
|
23
23
|
paddingInlineStart: 0
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
-
[`&:has(div.${
|
|
26
|
+
[`&:has(div.${a}-batch-input-group .ant-input)`]: {
|
|
27
27
|
paddingInlineEnd: n.space,
|
|
28
28
|
".ant-input": {
|
|
29
29
|
paddingInlineStart: 0
|
|
@@ -52,7 +52,7 @@ const r = (n) => {
|
|
|
52
52
|
background: "unset !important"
|
|
53
53
|
},
|
|
54
54
|
".ant-select-single .ant-select-selector": {
|
|
55
|
-
height: `${
|
|
55
|
+
height: `${t} !important`
|
|
56
56
|
},
|
|
57
57
|
"input.ant-input-number-input": {
|
|
58
58
|
paddingInlineStart: 0
|
|
@@ -72,25 +72,25 @@ const r = (n) => {
|
|
|
72
72
|
},
|
|
73
73
|
".ant-form-item-label > label": {
|
|
74
74
|
paddingRight: n.spaceLG,
|
|
75
|
-
height:
|
|
75
|
+
height: t,
|
|
76
76
|
"&::after": {
|
|
77
77
|
margin: 0
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
".ant-form-item-control-input": {
|
|
81
|
-
minHeight:
|
|
81
|
+
minHeight: t,
|
|
82
82
|
".ant-select-single": {
|
|
83
83
|
height: "unset"
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
|
-
[`&:hover:not(${
|
|
86
|
+
[`&:hover:not(${i})`]: {
|
|
87
87
|
borderColor: n.hoverColorBase
|
|
88
88
|
},
|
|
89
89
|
"&:focus": {
|
|
90
90
|
borderColor: n.activeColorBase,
|
|
91
91
|
boxShadow: "0 0 0 2px rgba(5, 155, 255, 0.1)"
|
|
92
92
|
},
|
|
93
|
-
[`.${
|
|
93
|
+
[`.${a}-batch-input-group-popover-input__popover`]: {
|
|
94
94
|
width: "calc(100% + 12px)"
|
|
95
95
|
}
|
|
96
96
|
},
|
|
@@ -129,17 +129,11 @@ const r = (n) => {
|
|
|
129
129
|
paddingInline: n.space,
|
|
130
130
|
flex: 1
|
|
131
131
|
}
|
|
132
|
-
},
|
|
133
|
-
textarea: {
|
|
134
|
-
lineHeight: "20px"
|
|
135
|
-
},
|
|
136
|
-
"& .ant-input-affix-wrapper-textarea-with-clear-btn .ant-input-clear-icon": {
|
|
137
|
-
insetBlockStart: "8px"
|
|
138
132
|
}
|
|
139
133
|
}
|
|
140
134
|
};
|
|
141
|
-
}, p =
|
|
135
|
+
}, p = r("ApForm", (n) => [o(n)]);
|
|
142
136
|
export {
|
|
143
137
|
p as default,
|
|
144
|
-
|
|
138
|
+
o as genApFormItemStyle
|
|
145
139
|
};
|
|
@@ -820,7 +820,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
|
|
|
820
820
|
validateOnRuleChange: boolean;
|
|
821
821
|
validateTrigger: string | string[];
|
|
822
822
|
syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
|
|
823
|
-
}> & Omit<Readonly<ApFormProps> & Readonly<{}>, "
|
|
823
|
+
}> & Omit<Readonly<ApFormProps> & Readonly<{}>, "getFieldsValue" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "validate" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "registerWatch" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
|
|
824
824
|
setFieldsValue: (fields: Partial<any>) => void;
|
|
825
825
|
setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
|
|
826
826
|
resetFields: () => Promise<void>;
|
|
@@ -821,7 +821,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
|
|
|
821
821
|
validateOnRuleChange: boolean;
|
|
822
822
|
validateTrigger: string | string[];
|
|
823
823
|
syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
|
|
824
|
-
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "
|
|
824
|
+
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "getFieldsValue" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "validate" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "registerWatch" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
|
|
825
825
|
setFieldsValue: (fields: Partial<any>) => void;
|
|
826
826
|
setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
|
|
827
827
|
resetFields: () => Promise<void>;
|