@aplus-frontend/ui 0.1.32 → 0.1.34
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/ap-form/ap-form-item.vue.d.ts +1 -1
- package/es/src/ap-form/ap-form-item.vue.mjs +68 -62
- package/es/src/ap-form/ap-form-list.vue.mjs +23 -21
- package/es/src/ap-form/ap-form.vue.d.ts +3 -1
- package/es/src/ap-form/ap-form.vue2.mjs +130 -80
- package/es/src/ap-form/interface.d.ts +51 -1
- package/es/src/ap-form/items/checkbox/index.vue.mjs +6 -5
- package/es/src/ap-form/items/date/index.vue.mjs +10 -9
- package/es/src/ap-form/items/date-range/index.vue.mjs +8 -7
- package/es/src/ap-form/items/number/index.vue.mjs +12 -11
- package/es/src/ap-form/items/radio/index.vue.mjs +5 -4
- package/es/src/ap-form/items/select/index.vue.mjs +1 -0
- package/es/src/ap-form/items/switch/index.vue.mjs +10 -9
- package/es/src/ap-form/items/text/index.vue2.mjs +1 -0
- package/es/src/ap-form/items/text/password.vue.mjs +1 -0
- package/es/src/ap-form/items/text-area/index.vue.mjs +7 -6
- package/es/src/ap-form/modal-form/index.vue.d.ts +7 -3
- package/es/src/ap-form/search-form/index.vue.d.ts +7 -3
- package/es/src/ap-form/utils/get.d.ts +1 -0
- package/es/src/ap-form/utils/get.mjs +12 -0
- package/es/src/ap-form/utils/set.d.ts +6 -0
- package/es/src/ap-form/utils/set.mjs +41 -0
- package/es/src/ap-list/index.vue.d.ts +3 -0
- package/es/src/ap-list/index.vue.mjs +51 -49
- package/es/src/ap-table/ap-table.vue.d.ts +4 -1
- package/es/src/ap-table/ap-table.vue.mjs +65 -59
- package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +8 -8
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +14 -11
- package/es/src/ap-table/components/setting/utils.mjs +29 -29
- package/es/src/ap-table/constants.d.ts +121 -1
- package/es/src/ap-table/interface.d.ts +6 -1
- package/es/src/ap-table/utils.d.ts +121 -1
- package/es/src/business/ap-card/ApCard.vue2.mjs +31 -26
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +30 -100
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +104 -64
- package/es/src/business/ap-expand-alert/interface.d.ts +24 -6
- package/es/src/business/ap-expand-alert/style.css +9 -0
- package/es/src/business/ap-title/style.css +4 -4
- package/es/src/business/hooks/usePageListApTable.d.ts +2 -0
- package/es/src/business/index.d.ts +53 -187
- package/es/src/check-card/group.vue.d.ts +7 -1
- package/es/src/check-card/group.vue.mjs +26 -22
- package/es/src/check-card/index.vue.d.ts +5 -2
- package/es/src/check-card/index.vue2.mjs +69 -60
- package/es/src/check-card/interface.d.ts +12 -0
- package/es/src/check-card/style/index.css +9 -5
- package/es/src/locale/lang/en.mjs +4 -0
- package/es/src/locale/lang/zh-cn.mjs +4 -0
- package/es/src/theme/ap-expand-alert/ap-expand-alert.css +9 -0
- package/es/src/theme/ap-title/ap-title.css +4 -4
- package/es/src/theme/check-card/index.css +9 -5
- package/lib/src/ap-form/ap-form-item.vue.d.ts +1 -1
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-form/ap-form-list.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +3 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/interface.d.ts +51 -1
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
- package/lib/src/ap-form/items/date/index.vue.js +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/switch/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue2.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +7 -3
- package/lib/src/ap-form/search-form/index.vue.d.ts +7 -3
- package/lib/src/ap-form/utils/get.d.ts +1 -0
- package/lib/src/ap-form/utils/get.js +1 -0
- package/lib/src/ap-form/utils/set.d.ts +6 -0
- package/lib/src/ap-form/utils/set.js +1 -0
- package/lib/src/ap-list/index.vue.d.ts +3 -0
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +4 -1
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/utils.js +1 -1
- package/lib/src/ap-table/constants.d.ts +121 -1
- package/lib/src/ap-table/interface.d.ts +6 -1
- package/lib/src/ap-table/utils.d.ts +121 -1
- package/lib/src/business/ap-card/ApCard.vue2.js +1 -1
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +30 -100
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/ap-expand-alert/interface.d.ts +24 -6
- package/lib/src/business/ap-expand-alert/style.css +9 -0
- package/lib/src/business/ap-title/style.css +4 -4
- package/lib/src/business/hooks/usePageListApTable.d.ts +2 -0
- package/lib/src/business/index.d.ts +53 -187
- package/lib/src/check-card/group.vue.d.ts +7 -1
- package/lib/src/check-card/group.vue.js +1 -1
- package/lib/src/check-card/index.vue.d.ts +5 -2
- package/lib/src/check-card/index.vue2.js +1 -1
- package/lib/src/check-card/interface.d.ts +12 -0
- package/lib/src/check-card/style/index.css +9 -5
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/theme/ap-expand-alert/ap-expand-alert.css +9 -0
- package/lib/src/theme/ap-title/ap-title.css +4 -4
- package/lib/src/theme/check-card/index.css +9 -5
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as v, unref as r, computed as g, renderSlot as y } from "vue";
|
|
2
2
|
import "../hooks/index.mjs";
|
|
3
|
-
import { useProvideCheckCard as
|
|
4
|
-
import { isUndefined as
|
|
5
|
-
import { useControllableValue as
|
|
6
|
-
const
|
|
3
|
+
import { useProvideCheckCard as b } from "./context.mjs";
|
|
4
|
+
import { isUndefined as S } from "lodash-unified";
|
|
5
|
+
import { useControllableValue as B } from "../hooks/useControllableValue.mjs";
|
|
6
|
+
const P = /* @__PURE__ */ v({
|
|
7
7
|
name: "CheckCardGroup",
|
|
8
8
|
__name: "group",
|
|
9
9
|
props: {
|
|
@@ -12,47 +12,51 @@ const z = /* @__PURE__ */ g({
|
|
|
12
12
|
loading: { type: Boolean, default: void 0 },
|
|
13
13
|
size: { default: void 0 },
|
|
14
14
|
stopPropagation: { type: [Boolean, Function], default: void 0 },
|
|
15
|
+
indicatorSize: { default: void 0 },
|
|
16
|
+
style: { default: void 0 },
|
|
15
17
|
multiple: { type: Boolean, default: !1 },
|
|
16
18
|
defaultValue: { type: [String, Number, Boolean, Array], default: void 0 },
|
|
17
19
|
value: { type: [String, Number, Boolean, Array], default: void 0 },
|
|
18
20
|
"onUpdate:value": {}
|
|
19
21
|
},
|
|
20
22
|
emits: ["update:value"],
|
|
21
|
-
setup(
|
|
22
|
-
const t =
|
|
23
|
-
function
|
|
23
|
+
setup(n, { emit: u }) {
|
|
24
|
+
const t = n, s = u, { value: a, updateValue: d } = B(t, s), l = /* @__PURE__ */ new Map();
|
|
25
|
+
function p(e) {
|
|
24
26
|
if (!t.multiple) {
|
|
25
|
-
if (r(
|
|
27
|
+
if (r(a) === e)
|
|
26
28
|
return;
|
|
27
|
-
|
|
29
|
+
d(e);
|
|
28
30
|
return;
|
|
29
31
|
}
|
|
30
|
-
let o = [...r(
|
|
31
|
-
const c = o.find((
|
|
32
|
-
|
|
32
|
+
let o = [...r(a) || []];
|
|
33
|
+
const c = o.find((i) => i === e);
|
|
34
|
+
S(c) ? o.push(e) : o = o.filter((i) => i !== e).filter((i) => l.has(i)), d(o);
|
|
33
35
|
}
|
|
34
36
|
function f(e) {
|
|
35
|
-
|
|
37
|
+
l.set(e, !0);
|
|
36
38
|
}
|
|
37
39
|
function m(e) {
|
|
38
|
-
|
|
40
|
+
l.delete(e);
|
|
39
41
|
}
|
|
40
|
-
return
|
|
41
|
-
|
|
42
|
-
toggleOption:
|
|
42
|
+
return b(
|
|
43
|
+
g(() => ({
|
|
44
|
+
toggleOption: p,
|
|
43
45
|
registerValue: f,
|
|
44
46
|
cancelValue: m,
|
|
45
47
|
disabled: t.disabled,
|
|
46
48
|
size: t.size,
|
|
47
49
|
bordered: t.bordered,
|
|
48
50
|
loading: t.loading,
|
|
49
|
-
value: r(
|
|
51
|
+
value: r(a),
|
|
50
52
|
multiple: t.multiple,
|
|
51
|
-
stopPropagation: t.stopPropagation
|
|
53
|
+
stopPropagation: t.stopPropagation,
|
|
54
|
+
style: t.style,
|
|
55
|
+
indicatorSize: t.indicatorSize
|
|
52
56
|
}))
|
|
53
|
-
), (e, o) =>
|
|
57
|
+
), (e, o) => y(e.$slots, "default");
|
|
54
58
|
}
|
|
55
59
|
});
|
|
56
60
|
export {
|
|
57
|
-
|
|
61
|
+
P as default
|
|
58
62
|
};
|
|
@@ -15,16 +15,18 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
15
15
|
bordered: boolean;
|
|
16
16
|
size: string;
|
|
17
17
|
checked: undefined;
|
|
18
|
-
style:
|
|
18
|
+
style: undefined;
|
|
19
19
|
stopPropagation: boolean;
|
|
20
|
+
indicatorSize: undefined;
|
|
20
21
|
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
21
22
|
"update:checked": (...args: any[]) => void;
|
|
22
23
|
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<CheckCardProps>, {
|
|
23
24
|
bordered: boolean;
|
|
24
25
|
size: string;
|
|
25
26
|
checked: undefined;
|
|
26
|
-
style:
|
|
27
|
+
style: undefined;
|
|
27
28
|
stopPropagation: boolean;
|
|
29
|
+
indicatorSize: undefined;
|
|
28
30
|
}>>> & {
|
|
29
31
|
"onUpdate:checked"?: ((...args: any[]) => any) | undefined;
|
|
30
32
|
}, {
|
|
@@ -33,6 +35,7 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
33
35
|
bordered: boolean;
|
|
34
36
|
checked: boolean;
|
|
35
37
|
stopPropagation: boolean | ((event: MouseEvent) => boolean);
|
|
38
|
+
indicatorSize: number;
|
|
36
39
|
}, {}>;
|
|
37
40
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
38
41
|
export default _default;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Skeleton as
|
|
1
|
+
import { defineComponent as I, computed as d, unref as o, createVNode as m, watch as W, watchEffect as $, openBlock as c, createElementBlock as z, normalizeStyle as j, normalizeClass as S, withModifiers as D, createBlock as f, renderSlot as M, resolveDynamicComponent as B, createCommentVNode as g, createElementVNode as O } from "vue";
|
|
2
|
+
import { Skeleton as U } from "ant-design-vue";
|
|
3
3
|
import "../config-provider/index.mjs";
|
|
4
4
|
import "../hooks/index.mjs";
|
|
5
|
-
import { isFunction as
|
|
6
|
-
import { useInjectCheckCard as
|
|
5
|
+
import { isFunction as N } from "lodash-unified";
|
|
6
|
+
import { useInjectCheckCard as q } from "./context.mjs";
|
|
7
7
|
import "./style/index.css";
|
|
8
|
-
import
|
|
9
|
-
import { useNamespace as
|
|
10
|
-
import { useControllableValue as
|
|
11
|
-
const
|
|
8
|
+
import A from "./checked.svg.mjs";
|
|
9
|
+
import { useNamespace as G } from "../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
import { useControllableValue as H } from "../hooks/useControllableValue.mjs";
|
|
11
|
+
const J = ["src"], oe = /* @__PURE__ */ I({
|
|
12
12
|
name: "CheckCard",
|
|
13
13
|
__name: "index",
|
|
14
14
|
props: {
|
|
@@ -29,6 +29,12 @@ const H = ["src"], te = /* @__PURE__ */ F({
|
|
|
29
29
|
type: [Boolean, Function],
|
|
30
30
|
default: !1
|
|
31
31
|
},
|
|
32
|
+
indicatorSize: {
|
|
33
|
+
default: void 0
|
|
34
|
+
},
|
|
35
|
+
style: {
|
|
36
|
+
default: void 0
|
|
37
|
+
},
|
|
32
38
|
checked: {
|
|
33
39
|
type: Boolean,
|
|
34
40
|
default: void 0
|
|
@@ -40,94 +46,97 @@ const H = ["src"], te = /* @__PURE__ */ F({
|
|
|
40
46
|
value: {
|
|
41
47
|
type: [String, Number, Boolean]
|
|
42
48
|
},
|
|
43
|
-
style: {
|
|
44
|
-
default: () => ({})
|
|
45
|
-
},
|
|
46
49
|
title: {},
|
|
47
50
|
content: {}
|
|
48
51
|
},
|
|
49
52
|
emits: ["update:checked"],
|
|
50
|
-
setup(
|
|
51
|
-
emit:
|
|
53
|
+
setup(P, {
|
|
54
|
+
emit: V
|
|
52
55
|
}) {
|
|
53
|
-
const
|
|
54
|
-
b:
|
|
55
|
-
m:
|
|
56
|
+
const a = P, {
|
|
57
|
+
b: v,
|
|
58
|
+
m: s,
|
|
56
59
|
e: p,
|
|
57
60
|
em: k
|
|
58
|
-
} =
|
|
61
|
+
} = G("check-card"), _ = V, l = q(), {
|
|
59
62
|
value: r,
|
|
60
63
|
updateValue: h
|
|
61
|
-
} =
|
|
64
|
+
} = H(a, _, {
|
|
62
65
|
valuePropName: "checked",
|
|
63
66
|
defaultValuePropName: "defaultChecked"
|
|
64
|
-
}),
|
|
67
|
+
}), n = d(() => {
|
|
65
68
|
const e = {
|
|
66
|
-
...
|
|
67
|
-
}, t = l
|
|
68
|
-
return t && (e.disabled = e.disabled || t.disabled, e.bordered = e.bordered || t.bordered, e.loading = e.loading || t.loading, e.size = e.size || t.size, e.stopPropagation = e.stopPropagation || t.stopPropagation), e;
|
|
69
|
-
}), w =
|
|
70
|
-
const e =
|
|
71
|
-
return [
|
|
72
|
-
}),
|
|
73
|
-
const e = o
|
|
69
|
+
...a
|
|
70
|
+
}, t = o(l);
|
|
71
|
+
return t && (e.disabled = e.disabled || t.disabled, e.bordered = e.bordered || t.bordered, e.loading = e.loading || t.loading, e.size = e.size || t.size, e.indicatorSize = e.indicatorSize || t.indicatorSize, e.stopPropagation = e.stopPropagation || t.stopPropagation, e.style = e.style ? e.style : t.style), e;
|
|
72
|
+
}), w = d(() => {
|
|
73
|
+
const e = o(n);
|
|
74
|
+
return [v(), ...e.disabled ? [] : [v(), o(r) ? s("checked") : null], s(e.size), e.bordered ? s("bordered") : null, e.disabled ? s("disabled") : null];
|
|
75
|
+
}), T = d(() => {
|
|
76
|
+
const e = o(n);
|
|
77
|
+
return {
|
|
78
|
+
...e.style || {},
|
|
79
|
+
"--check-card-indicator-size": `${e.indicatorSize || 16}px`
|
|
80
|
+
};
|
|
81
|
+
}), y = d(() => {
|
|
82
|
+
const e = a.title;
|
|
74
83
|
if (!e)
|
|
75
84
|
return;
|
|
76
|
-
const t =
|
|
85
|
+
const t = N(e) ? e(o(r)) : m("span", null, [e]);
|
|
77
86
|
return m("div", {
|
|
78
|
-
class: [p("title"),
|
|
87
|
+
class: [p("title"), n.value.disabled ? k("title", "disabled") : null]
|
|
79
88
|
}, [t]);
|
|
80
|
-
}),
|
|
81
|
-
if (!
|
|
89
|
+
}), b = d(() => {
|
|
90
|
+
if (!a.content)
|
|
82
91
|
return;
|
|
83
|
-
const e =
|
|
92
|
+
const e = N(a.content) ? a.content(o(r)) : a.content;
|
|
84
93
|
return m("div", {
|
|
85
|
-
class: [p("content"),
|
|
94
|
+
class: [p("content"), n.value.disabled ? k("content", "disabled") : null]
|
|
86
95
|
}, [e]);
|
|
87
96
|
});
|
|
88
|
-
function
|
|
89
|
-
const t =
|
|
97
|
+
function E(e) {
|
|
98
|
+
const t = o(n).stopPropagation;
|
|
90
99
|
return t ? t === !0 ? e.target !== e.currentTarget : t(e) : !1;
|
|
91
100
|
}
|
|
92
|
-
function
|
|
93
|
-
var t,
|
|
94
|
-
|
|
101
|
+
function F(e) {
|
|
102
|
+
var t, i;
|
|
103
|
+
E(e) || n.value.loading || n.value.disabled || (l.value ? (i = (t = l.value) == null ? void 0 : t.toggleOption) == null || i.call(t, a.value) : h(!o(r)));
|
|
95
104
|
}
|
|
96
|
-
return
|
|
105
|
+
return W(() => l.value, (e) => {
|
|
97
106
|
if (!e)
|
|
98
107
|
return;
|
|
99
|
-
const t = e.multiple ? (e.value || []).includes(
|
|
108
|
+
const t = e.multiple ? (e.value || []).includes(a.value) : e.value === a.value;
|
|
100
109
|
h(t);
|
|
101
110
|
}, {
|
|
102
111
|
immediate: !0
|
|
103
|
-
}),
|
|
104
|
-
var t,
|
|
105
|
-
(
|
|
106
|
-
var
|
|
107
|
-
return (C = (
|
|
112
|
+
}), $((e) => {
|
|
113
|
+
var t, i;
|
|
114
|
+
(i = (t = l.value) == null ? void 0 : t.registerValue) == null || i.call(t, a.value), e(() => {
|
|
115
|
+
var u, C;
|
|
116
|
+
return (C = (u = l.value) == null ? void 0 : u.cancelValue) == null ? void 0 : C.call(u, a.value);
|
|
108
117
|
});
|
|
109
|
-
}), (e, t) => (
|
|
110
|
-
style:
|
|
111
|
-
class:
|
|
112
|
-
onClick:
|
|
113
|
-
}, [
|
|
118
|
+
}), (e, t) => (c(), z("div", {
|
|
119
|
+
style: j(T.value),
|
|
120
|
+
class: S(w.value),
|
|
121
|
+
onClick: D(F, ["stop"])
|
|
122
|
+
}, [n.value.loading ? (c(), f(o(U), {
|
|
114
123
|
key: 0,
|
|
115
124
|
active: ""
|
|
116
|
-
})) :
|
|
125
|
+
})) : M(e.$slots, "default", {
|
|
117
126
|
key: 1,
|
|
118
|
-
checked:
|
|
119
|
-
}, () => [
|
|
127
|
+
checked: o(r)
|
|
128
|
+
}, () => [y.value ? (c(), f(B(y.value), {
|
|
120
129
|
key: 0
|
|
121
|
-
})) :
|
|
130
|
+
})) : g("", !0), b.value ? (c(), f(B(b.value), {
|
|
122
131
|
key: 1
|
|
123
|
-
})) :
|
|
132
|
+
})) : g("", !0)]), o(r) ? (c(), z("div", {
|
|
124
133
|
key: 2,
|
|
125
|
-
class:
|
|
126
|
-
}, [
|
|
127
|
-
src:
|
|
128
|
-
}, null, 8,
|
|
134
|
+
class: S(o(p)("checked-icon"))
|
|
135
|
+
}, [O("img", {
|
|
136
|
+
src: o(A)
|
|
137
|
+
}, null, 8, J)], 2)) : g("", !0)], 6));
|
|
129
138
|
}
|
|
130
139
|
});
|
|
131
140
|
export {
|
|
132
|
-
|
|
141
|
+
oe as default
|
|
133
142
|
};
|
|
@@ -24,6 +24,14 @@ type CheckCardCommonType = {
|
|
|
24
24
|
* 是否阻止点击事件冒泡(对于自定义内容包含输入控件时需要设置)
|
|
25
25
|
*/
|
|
26
26
|
stopPropagation?: boolean | ((event: MouseEvent) => boolean);
|
|
27
|
+
/**
|
|
28
|
+
* 选中指示器的尺寸
|
|
29
|
+
*/
|
|
30
|
+
indicatorSize?: number;
|
|
31
|
+
/**
|
|
32
|
+
* 可选卡片容器样式
|
|
33
|
+
*/
|
|
34
|
+
style?: CSSProperties;
|
|
27
35
|
};
|
|
28
36
|
export type CheckCardProps = CheckCardCommonType & {
|
|
29
37
|
/**
|
|
@@ -51,6 +59,10 @@ export type CheckCardProps = CheckCardCommonType & {
|
|
|
51
59
|
* 内容
|
|
52
60
|
*/
|
|
53
61
|
content?: string | ((checked: boolean) => VNode);
|
|
62
|
+
/**
|
|
63
|
+
* 指定选中指示器的尺寸
|
|
64
|
+
*/
|
|
65
|
+
indicatorSize?: number;
|
|
54
66
|
};
|
|
55
67
|
export type CheckCardGroupValueType = CheckCardValueType | CheckCardValueType[] | undefined;
|
|
56
68
|
export type CheckCardGroupProps = CheckCardCommonType & {
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
opacity: 0;
|
|
22
22
|
inset-block-start: -2px;
|
|
23
23
|
inset-inline-end: -2px;
|
|
24
|
-
border-inline-start: 16px solid transparent;
|
|
25
|
-
border-block-end: 16px solid transparent;
|
|
24
|
+
border-inline-start: var(--check-card-indicator-size, 16px) solid transparent;
|
|
25
|
+
border-block-end: var(--check-card-indicator-size, 16px) solid transparent;
|
|
26
26
|
border-radius: 4px;
|
|
27
27
|
}
|
|
28
28
|
.aplus-check-card--checked {
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
}
|
|
34
34
|
.aplus-check-card--checked::after {
|
|
35
35
|
opacity: 1;
|
|
36
|
-
border: 16px solid var(--check-card-checked-bg, #0070ff);
|
|
37
|
-
border-inline-start: 16px solid transparent;
|
|
38
|
-
border-block-end: 16px solid transparent;
|
|
36
|
+
border: var(--check-card-indicator-size, 16px) solid var(--check-card-checked-bg, #0070ff);
|
|
37
|
+
border-inline-start: var(--check-card-indicator-size, 16px) solid transparent;
|
|
38
|
+
border-block-end: var(--check-card-indicator-size, 16px) solid transparent;
|
|
39
39
|
inset-block-start: -2px;
|
|
40
40
|
inset-inline-end: -2px;
|
|
41
41
|
transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
@@ -75,3 +75,7 @@
|
|
|
75
75
|
-moz-user-select: none;
|
|
76
76
|
user-select: none;
|
|
77
77
|
}
|
|
78
|
+
.aplus-check-card__checked-icon > img {
|
|
79
|
+
width: calc(var(--check-card-indicator-size, 16px) - 2px);
|
|
80
|
+
vertical-align: top;
|
|
81
|
+
}
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
}
|
|
20
20
|
.aplus-ap-expand-alert__prefix {
|
|
21
21
|
color: #182948;
|
|
22
|
+
display: inline-block;
|
|
22
23
|
}
|
|
23
24
|
.aplus-ap-expand-alert__showItem {
|
|
24
25
|
color: #0070ff;
|
|
@@ -40,3 +41,11 @@
|
|
|
40
41
|
font-size: 16px;
|
|
41
42
|
transform: translateY(2px);
|
|
42
43
|
}
|
|
44
|
+
.aplus-ap-expand-alert--aplus .card-alert {
|
|
45
|
+
background-color: transparent !important;
|
|
46
|
+
border: none ;
|
|
47
|
+
}
|
|
48
|
+
.aplus-ap-expand-alert--admin .card-alert {
|
|
49
|
+
background-color: transparent !important;
|
|
50
|
+
border: none;
|
|
51
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
.aplus-ap-title {
|
|
2
2
|
position: relative;
|
|
3
3
|
width: 100%;
|
|
4
|
-
height: 20px;
|
|
5
4
|
display: flex;
|
|
6
5
|
align-items: center;
|
|
7
6
|
justify-content: space-between;
|
|
@@ -12,7 +11,8 @@
|
|
|
12
11
|
position: absolute;
|
|
13
12
|
content: '';
|
|
14
13
|
left: 0;
|
|
15
|
-
top:
|
|
14
|
+
top: 50%;
|
|
15
|
+
transform: translateY(-50%);
|
|
16
16
|
width: 3px;
|
|
17
17
|
height: 16px;
|
|
18
18
|
background: #0070ff;
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
color: #0070ff;
|
|
31
31
|
}
|
|
32
32
|
.aplus-ap-title--admin {
|
|
33
|
-
height: 22px;
|
|
34
33
|
padding-left: 14px;
|
|
35
34
|
}
|
|
36
35
|
.aplus-ap-title--admin::before {
|
|
37
|
-
top:
|
|
36
|
+
top: 50%;
|
|
37
|
+
transform: translateY(-50%);
|
|
38
38
|
width: 8px;
|
|
39
39
|
height: 8px;
|
|
40
40
|
border-radius: 50%;
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
opacity: 0;
|
|
22
22
|
inset-block-start: -2px;
|
|
23
23
|
inset-inline-end: -2px;
|
|
24
|
-
border-inline-start: 16px solid transparent;
|
|
25
|
-
border-block-end: 16px solid transparent;
|
|
24
|
+
border-inline-start: var(--check-card-indicator-size, 16px) solid transparent;
|
|
25
|
+
border-block-end: var(--check-card-indicator-size, 16px) solid transparent;
|
|
26
26
|
border-radius: 4px;
|
|
27
27
|
}
|
|
28
28
|
.aplus-check-card--checked {
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
}
|
|
34
34
|
.aplus-check-card--checked::after {
|
|
35
35
|
opacity: 1;
|
|
36
|
-
border: 16px solid var(--check-card-checked-bg, #0070ff);
|
|
37
|
-
border-inline-start: 16px solid transparent;
|
|
38
|
-
border-block-end: 16px solid transparent;
|
|
36
|
+
border: var(--check-card-indicator-size, 16px) solid var(--check-card-checked-bg, #0070ff);
|
|
37
|
+
border-inline-start: var(--check-card-indicator-size, 16px) solid transparent;
|
|
38
|
+
border-block-end: var(--check-card-indicator-size, 16px) solid transparent;
|
|
39
39
|
inset-block-start: -2px;
|
|
40
40
|
inset-inline-end: -2px;
|
|
41
41
|
transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
@@ -75,3 +75,7 @@
|
|
|
75
75
|
-moz-user-select: none;
|
|
76
76
|
user-select: none;
|
|
77
77
|
}
|
|
78
|
+
.aplus-check-card__checked-icon > img {
|
|
79
|
+
width: calc(var(--check-card-indicator-size, 16px) - 2px);
|
|
80
|
+
vertical-align: top;
|
|
81
|
+
}
|
|
@@ -9,7 +9,7 @@ declare function onFieldBlur(): void;
|
|
|
9
9
|
declare function onFieldChange(): void;
|
|
10
10
|
declare function clearValidate(): void;
|
|
11
11
|
declare function resetField(): void;
|
|
12
|
-
declare function getFieldValue(): any;
|
|
12
|
+
declare function getFieldValue(shouldFormat?: boolean): any;
|
|
13
13
|
declare function __VLS_template(): {
|
|
14
14
|
slots: Readonly<ApFormItemSlots> & ApFormItemSlots;
|
|
15
15
|
refs: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),F=require("ant-design-vue"),D=require("ant-design-vue/es/theme/internal"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),F=require("ant-design-vue"),D=require("ant-design-vue/es/theme/internal"),a=require("lodash-unified"),T=require("./constant.js"),z=require("@ant-design/icons-vue");require("../config-provider/index.js");const A=require("./context.js");require("./style/ap-form-item.css");const O=require("@fruits-chain/utils"),R=require("../config-provider/hooks/use-namespace.js"),j=["title"],E=e.defineComponent({name:"ApFormItem",__name:"ap-form-item",props:{htmlFor:{},prefixCls:{},label:{},help:{},extra:{},labelCol:{},wrapperCol:{},hasFeedback:{type:Boolean,default:!1},colon:{type:Boolean,default:void 0},labelAlign:{},prop:{},name:{},rules:{},autoLink:{type:Boolean,default:!0},required:{type:Boolean,default:void 0},validateFirst:{type:Boolean,default:void 0},validateStatus:{},validateTrigger:{},messageVariables:{},hidden:{type:Boolean},noStyle:{type:Boolean},tooltip:{},span:{},order:{},offset:{},push:{},pull:{},xs:{},sm:{},md:{},lg:{},xl:{},xxl:{},flex:{},bordered:{type:Boolean,default:!1},valuePropName:{default:"value"},initialValue:{},_signal:{},transform:{}},setup(V,{expose:g}){var y,b;const o=V,n=e.useSlots(),{model:i,updateModel:s,internalInstance:f}=A.useInjectForm(),{m:c,b:B}=R.useNamespace("ap-form-item"),d=e.ref(!1),u=e.ref(),[,C]=D.useToken();e.onMounted(async()=>{let t=a.isFunction(o.initialValue)?o.initialValue():o.initialValue;O.isPromise(t)&&(t=await t),f==null||f.registerField({name:o.name,initialValue:a.cloneDeep(t),transform:o.transform})});const m=e.computed(()=>o.name?a.isArray(o.name)?o.name.reduce((t,r)=>t==null?void 0:t[r],e.unref(i)):i==null?void 0:i.value[o.name]:null),p=e.ref((b=(y=n.default)==null?void 0:y.call(n))==null?void 0:b[0]);e.watch(()=>{var t;return(t=n.default)==null?void 0:t.call(n)},t=>{p.value=t==null?void 0:t[0]});function k(t){s==null||s(o.name,t)}function q(){d.value=!0}function N(){d.value=!1}const v=e.computed(()=>{var r,l;if(!o.name)return(r=n.default())==null?void 0:r[0];const t=e.unref(p);return t?e.cloneVNode(t,{[o.valuePropName]:e.unref(m),[`onUpdate:${o.valuePropName}`]:k,bordered:o.bordered?!1:(l=t==null?void 0:t.props)==null?void 0:l.bordered,onFocus:q,onBlur:N}):null});function w(){var t;(t=u.value)==null||t.onFieldBlur()}function P(){var t;(t=u.value)==null||t.onFieldChange()}function S(){var t;(t=u.value)==null||t.clearValidate()}function x(){var t;(t=u.value)==null||t.resetField()}function _(t=!1){const r=e.unref(m);if(!t||!o.transform)return r;const l=a.isFunction(o.transform)?o.transform:o.transform.transformer;return o.transform?l(r):r}return g({onFieldBlur:w,onFieldChange:P,clearValidate:S,resetField:x,getFieldValue:_}),(t,r)=>(e.openBlock(),e.createBlock(e.unref(F.Form).Item,e.mergeProps({ref_key:"formItemRef",ref:u},e.unref(a.omit)(o,[...e.unref(T.apFormItemColPropKeys),"tooltip","label"]),{class:{[e.unref(c)("bordered")]:t.bordered,[e.unref(c)("focused")]:t.bordered&&d.value,[e.unref(B)()]:!0},colon:t.bordered?!1:o.colon}),e.createSlots({default:e.withCtx(()=>[v.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v.value),{key:0})):e.createCommentVNode("",!0)]),_:2},[o.tooltip?{name:"tooltip",fn:e.withCtx(({class:l})=>[e.createElementVNode("span",{class:e.normalizeClass(l)},[e.createVNode(e.unref(F.Tooltip),{title:o.tooltip},{default:e.withCtx(()=>[e.createVNode(e.unref(z.QuestionCircleOutlined),{style:e.normalizeStyle({color:e.unref(C).colorPrimary})},null,8,["style"])]),_:1},8,["title"])],2)]),key:"0"}:void 0,t.label?{name:"label",fn:e.withCtx(()=>[e.createElementVNode("span",{title:t.label,style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},e.toDisplayString(t.label),9,j)]),key:"1"}:void 0,e.renderList(e.unref(a.omit)(n,"default"),(l,h)=>({name:h,fn:e.withCtx(I=>[e.renderSlot(t.$slots,h,e.normalizeProps(e.guardReactiveProps(I||{})))])}))]),1040,["class","colon"]))}});exports.default=E;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),v=require("./context.js"),F=require("lodash-unified"),V=r.defineComponent({name:"ApFormList",__name:"ap-form-list",props:{name:{},initialValue:{},transform:{type:[Function,Object]}},setup(f){let u=1;const o=[],t=f,{model:i,updateModel:s,internalInstance:l}=v.useInjectForm();r.onMounted(()=>{l==null||l.registerField({name:t.name,initialValue:t.initialValue,transform:t.transform})});const a=r.computed(()=>F.isArray(t.name)?t.name.reduce((e,n)=>e==null?void 0:e.value[n],i):i==null?void 0:i.value[t.name]);function d(e=void 0){const n=r.unref(a)?[...r.unref(a),e]:[e];o.push(u),u+=1,s==null||s(t.name,n)}function p(e){let n=r.unref(a)||[];n=[...n.slice(0,e),...n.slice(e+1)],o.splice(e,1),s==null||s(t.name,n)}const y={add:d,remove:p},_=r.computed(()=>(r.unref(a)||[]).map((n,c)=>{let m=o[c];return typeof m>"u"&&(o[c]=u,m=u,u+=1),{key:m,fieldName:c,name:[t.name,c],value:n}}));return(e,n)=>r.renderSlot(e.$slots,"default",{fields:_.value,actions:y})}});exports.default=V;
|
|
@@ -17,7 +17,7 @@ declare function registerWatch(callback: WatchFunc, inner: boolean): () => void;
|
|
|
17
17
|
* 注册表单项
|
|
18
18
|
* @param field
|
|
19
19
|
*/
|
|
20
|
-
declare function registerField({ initialValue, name }: RegistedFieldType): void;
|
|
20
|
+
declare function registerField({ initialValue, name, transform }: RegistedFieldType): void;
|
|
21
21
|
declare function getInternalInstance(mark: string): {
|
|
22
22
|
registerField: typeof registerField;
|
|
23
23
|
registerWatch: typeof registerWatch;
|
|
@@ -911,6 +911,8 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
911
911
|
setFieldsValue: (values: Record<string, any>) => void;
|
|
912
912
|
setFieldValue: (name: NamePath, newValue: any) => void;
|
|
913
913
|
registerWatch: typeof registerWatch;
|
|
914
|
+
validateFieldsReturnTransformed: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<any>;
|
|
915
|
+
getFieldsValueTransformed: (nameList?: InternalNamePath[] | true) => any;
|
|
914
916
|
getInternalInstance: typeof getInternalInstance;
|
|
915
917
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApFormProps>, {
|
|
916
918
|
layout: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),P=require("ant-design-vue"),N=require("./context.js"),n=require("lodash-unified"),S=require("./constant.js"),b=require("../utils/index.js"),W=require("./utils/set.js"),z=a.defineComponent({__name:"ap-form",props:{layout:{default:"horizontal"},labelCol:{},wrapperCol:{},colon:{type:Boolean,default:!0},labelAlign:{default:"right"},labelWrap:{type:Boolean},prefixCls:{},requiredMark:{},hideRequiredMark:{type:Boolean,default:!1},rules:{},validateMessages:{},validateOnRuleChange:{type:Boolean,default:!0},scrollToFirstError:{},onSubmit:{},name:{},validateTrigger:{default:"change"},size:{},disabled:{type:Boolean},onValuesChange:{},onFieldsChange:{},onFinish:{},onFinishFailed:{},onValidate:{},initialValues:{}},setup(C,{expose:O}){const u=C;function p(e,t,l=!0){var r;if(n.isArray(e)){let s=o;for(let d=0;d<e.length-1;d++)e[d]in s||(s[e[d]]={}),s=s[e[d]];s[e[e.length-1]]=t}else o[e]=t;let i=n.isArray(e)?e[0]:e;l&&((r=u.onValuesChange)==null||r.call(u,{[i]:o[i]},o)),g()}function R(e){var l;const t=v(e,h);(l=u.onFinish)==null||l.call(u,t)}const c=a.ref();let V=u.initialValues?n.cloneDeep(u.initialValues):{},h={};const o=a.reactive(u.initialValues||{});let F=[];const T=async()=>{var e;(e=c.value)==null||e.resetFields(),await a.nextTick(()=>{Object.keys(o).forEach(t=>delete o[t]),Object.assign(o,n.cloneDeep(V)),g()})},q=e=>{var t;(t=c.value)==null||t.clearValidate(e)},M=(e,t)=>{var l;return(l=c.value)==null?void 0:l.validateFields(e,t)},j=async(e,t)=>{var i;const l=await((i=c.value)==null?void 0:i.validateFields(e,t));return v(l,h)},m=e=>{var t;return(t=c.value)==null?void 0:t.getFieldsValue(e)},w=e=>{var l;const t=(l=c.value)==null?void 0:l.getFieldsValue(e);return v(t,h)},B=(e,t)=>{var l;return(l=c.value)==null?void 0:l.validate(e,t)},I=(e,t={})=>{var l;(l=c.value)==null||l.scrollToField(e,t)},x=e=>{Object.assign(o,e),g()},_=(e,t)=>{p(e,t),g()};function y(e,t){return t||e(a.toRaw(o)),F.push(e),()=>{F=F.filter(l=>l!==e)}}function A({initialValue:e,name:t,transform:l}){if(b.isDef(e)&&b.isDef(t))if(p(t,e,!1),n.isArray(t)){let i=V;for(let r=0;r<t.length-1;r++)b.isDef(i[t[r]])||(i[t[r]]={}),i=i[t[r]];i[t[t.length-1]]=e}else V[t]=e;h=W.default(h,[t].flat(1),l,!0)}function D(e){if(e!==S.INTERNAL_FORM_INSTANCE_MARK){console.warn("getInternalInstance should only used at internal");return}return{registerField:A,registerWatch:y}}function g(){if(F.length){const e=a.toRaw(o);F.forEach(t=>{t(e)})}}function v(e,t){if(e==null)return;let l=n.isArray(e)?[]:{};return Object.keys(e).forEach(i=>{const r=e[i],s=t[i],d=n.isFunction(s)?s:s==null?void 0:s.transformer,E=n.isFunction(s)?!0:s==null?void 0:s.flat;if(n.isFunction(d)){const f=d(r);E?n.isArray(f)&&n.isArray(l)?l=[...l,...f]:n.isPlainObject(f)&&n.isPlainObject(l)?l={...l,...f}:l[i]=f:l[i]=f}else if(n.isPlainObject(r)||n.isArray(r)){const f=v(r,s);l[i]=f}else l[i]=r}),l}return N.useProvideForm({model:a.computed(()=>o),updateModel:p,internalInstance:{registerWatch:y,registerField:A,setFieldValue:_}}),O({resetFields:T,clearValidate:q,validateFields:M,getFieldsValue:m,validate:B,scrollToField:I,setFieldsValue:x,setFieldValue:_,registerWatch:y,validateFieldsReturnTransformed:j,getFieldsValueTransformed:w,getInternalInstance:D}),(e,t)=>(a.openBlock(),a.createBlock(a.unref(P.Form),a.mergeProps({ref_key:"formRef",ref:c},a.unref(n.omit)(u,["initialValues","onValuesChange","onFinish"]),{onFinish:R,model:o}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["model"]))}});exports.default=z;
|
|
@@ -4,6 +4,14 @@ import { InternalNamePath, NamePath, ValidateOptions } from 'ant-design-vue/es/f
|
|
|
4
4
|
import { Recordable } from '../type';
|
|
5
5
|
import { VNode } from 'vue';
|
|
6
6
|
export type ApFormColProps = Omit<ColProps, 'prefixCls'>;
|
|
7
|
+
export type ApFormItemTransformFn = (value: any) => any;
|
|
8
|
+
export type ApFormItemTransformType = ApFormItemTransformFn | {
|
|
9
|
+
transformer: ApFormItemTransformFn;
|
|
10
|
+
/**
|
|
11
|
+
* 是否进行扁平化处理(只向上扁平化一层)
|
|
12
|
+
*/
|
|
13
|
+
flat?: boolean;
|
|
14
|
+
};
|
|
7
15
|
export type ApFormItemProps = FormItemProps & Partial<ApFormColProps> & {
|
|
8
16
|
/**
|
|
9
17
|
* 是否展示包含了输入框&label的border
|
|
@@ -18,6 +26,12 @@ export type ApFormItemProps = FormItemProps & Partial<ApFormColProps> & {
|
|
|
18
26
|
* 内部使用,请勿传入
|
|
19
27
|
*/
|
|
20
28
|
_signal?: number;
|
|
29
|
+
/**
|
|
30
|
+
* 数据转换(提交/或者手动调用时才会)
|
|
31
|
+
* @param value
|
|
32
|
+
* @returns
|
|
33
|
+
*/
|
|
34
|
+
transform?: ApFormItemTransformType;
|
|
21
35
|
};
|
|
22
36
|
export type ApFormItemGroupProps = RowProps & {
|
|
23
37
|
countPerRow?: number;
|
|
@@ -48,6 +62,19 @@ export type ApFormExpose<ModelType = any> = {
|
|
|
48
62
|
* @returns
|
|
49
63
|
*/
|
|
50
64
|
getInternalInstance: (mark: string) => ApFormInternalInstance;
|
|
65
|
+
/**
|
|
66
|
+
* 校验表单并返回转换后的数据
|
|
67
|
+
* @param nameList
|
|
68
|
+
* @param options
|
|
69
|
+
* @returns
|
|
70
|
+
*/
|
|
71
|
+
validateFieldsReturnTransformed: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<ModelType>> | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* 获取表单数据并转换
|
|
74
|
+
* @param nameList
|
|
75
|
+
* @returns
|
|
76
|
+
*/
|
|
77
|
+
getFieldsValueTransformed: (nameList?: true | InternalNamePath[]) => Partial<ModelType> | undefined;
|
|
51
78
|
};
|
|
52
79
|
/**
|
|
53
80
|
* 被注册的表单项
|
|
@@ -55,6 +82,7 @@ export type ApFormExpose<ModelType = any> = {
|
|
|
55
82
|
export type RegistedFieldType = {
|
|
56
83
|
name: FormItemProps['name'];
|
|
57
84
|
initialValue?: any;
|
|
85
|
+
transform?: ApFormItemTransformType;
|
|
58
86
|
};
|
|
59
87
|
export type ApFormInternalInstance = {
|
|
60
88
|
/**
|
|
@@ -72,7 +100,12 @@ export type ApFormInternalInstance = {
|
|
|
72
100
|
registerField: (field: RegistedFieldType) => void;
|
|
73
101
|
} & Pick<ApFormExpose, 'setFieldValue'>;
|
|
74
102
|
export type ApFormItemExpose = FormItemExpose & {
|
|
75
|
-
|
|
103
|
+
/**
|
|
104
|
+
* 是否需要格式化(默认为false)
|
|
105
|
+
* @param shouldFormat
|
|
106
|
+
* @returns
|
|
107
|
+
*/
|
|
108
|
+
getFieldValue: (shouldFormat?: boolean) => any;
|
|
76
109
|
};
|
|
77
110
|
export type ApFormListProps = {
|
|
78
111
|
name: FormItemProps['name'];
|
|
@@ -80,6 +113,7 @@ export type ApFormListProps = {
|
|
|
80
113
|
* 设置FormList的默认值
|
|
81
114
|
*/
|
|
82
115
|
initialValue?: any[];
|
|
116
|
+
transform?: ApFormItemTransformType;
|
|
83
117
|
};
|
|
84
118
|
export type ApFormSearchFormProps = ApFormProps & {
|
|
85
119
|
collapse?: boolean;
|
|
@@ -129,3 +163,19 @@ export type ApFormItemSlots = {
|
|
|
129
163
|
export type ApFormDependencyProps = {
|
|
130
164
|
nameList: NamePath[];
|
|
131
165
|
};
|
|
166
|
+
export type ApFormSetProps = {
|
|
167
|
+
/**
|
|
168
|
+
* 需要聚合成的字段名
|
|
169
|
+
*/
|
|
170
|
+
name: NamePath;
|
|
171
|
+
/**
|
|
172
|
+
* 聚合成(数组/对象)
|
|
173
|
+
*/
|
|
174
|
+
as?: 'array' | 'object';
|
|
175
|
+
/**
|
|
176
|
+
* 转换函数(表单提交时触发)
|
|
177
|
+
* @param value
|
|
178
|
+
* @returns
|
|
179
|
+
*/
|
|
180
|
+
transform?: ApFormItemTransformType;
|
|
181
|
+
};
|