@aplus-frontend/ui 7.10.1 → 7.10.2
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-action/item-dropdown/index.vue.mjs +43 -38
- package/es/src/ap-action/style/dropdown-item.mjs +17 -11
- package/es/src/ap-action/style/index.mjs +8 -9
- package/es/src/ap-form/style/item.mjs +15 -15
- package/es/src/config-provider/config-provider-props.d.ts +12 -12
- package/es/src/config-provider/config-provider-props.mjs +12 -12
- package/es/src/config-provider/config-provider.d.ts +27 -27
- package/es/src/config-provider/config-provider.mjs +42 -40
- package/es/src/config-provider/hooks/use-global-config.d.ts +13 -13
- package/es/src/config-provider/index.d.ts +43 -43
- package/es/src/design-token/interface.d.ts +2 -0
- package/es/src/utils/cssinjs/index.mjs +36 -35
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-action/style/dropdown-item.js +1 -1
- package/lib/src/ap-action/style/index.js +1 -1
- package/lib/src/ap-form/style/item.js +1 -1
- package/lib/src/config-provider/config-provider-props.d.ts +12 -12
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +27 -27
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/hooks/use-global-config.d.ts +13 -13
- package/lib/src/config-provider/index.d.ts +43 -43
- package/lib/src/design-token/interface.d.ts +2 -0
- package/lib/src/utils/cssinjs/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -4
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Dropdown as
|
|
3
|
-
import { IconApAdLineDown as
|
|
4
|
-
import { isUndefined as
|
|
1
|
+
import { defineComponent as C, ref as w, computed as A, createBlock as r, openBlock as t, unref as o, normalizeClass as s, withCtx as a, createElementVNode as u, createVNode as d, normalizeProps as B, guardReactiveProps as b, renderSlot as I, resolveDynamicComponent as D, createCommentVNode as P, createElementBlock as N, Fragment as $, renderList as L, mergeProps as m } from "vue";
|
|
2
|
+
import { Dropdown as V, Menu as z, MenuItem as E } from "@aplus-frontend/antdv";
|
|
3
|
+
import { IconApAdLineDown as F } from "@aplus-frontend/icon";
|
|
4
|
+
import { isUndefined as M, omit as S } from "lodash-unified";
|
|
5
5
|
import "../../config-provider/index.mjs";
|
|
6
6
|
import "../item/index.vue.mjs";
|
|
7
7
|
import "../item-modal/index.vue2.mjs";
|
|
8
8
|
import "../item-popconfirm/index.vue2.mjs";
|
|
9
|
-
import
|
|
10
|
-
import { useNamespace as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
const
|
|
9
|
+
import x from "../style/dropdown-item.mjs";
|
|
10
|
+
import { useNamespace as O } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
import g from "../item/index.vue2.mjs";
|
|
12
|
+
import R from "../item-modal/index.vue.mjs";
|
|
13
|
+
import U from "../item-popconfirm/index.vue.mjs";
|
|
14
|
+
const oe = /* @__PURE__ */ C({
|
|
15
15
|
name: "ApActionItemDropDown",
|
|
16
16
|
__name: "index",
|
|
17
17
|
props: {
|
|
@@ -29,42 +29,47 @@ const ee = /* @__PURE__ */ w({
|
|
|
29
29
|
iconFirst: { type: Boolean },
|
|
30
30
|
tooltip: {}
|
|
31
31
|
},
|
|
32
|
-
setup(
|
|
33
|
-
const
|
|
32
|
+
setup(y) {
|
|
33
|
+
const p = y, i = w(!1), { e: c, b: _ } = O("action-item-dropdown"), f = x("action-item-dropdown"), v = (e, n) => {
|
|
34
|
+
(n.source === "trigger" || e) && (i.value = e);
|
|
35
|
+
}, k = A(() => p.actions.filter((e) => e.visible || M(e.visible)).map((e) => ({
|
|
34
36
|
...e,
|
|
35
|
-
|
|
37
|
+
onClick: (n) => {
|
|
38
|
+
e.onClick?.(n), !e.onAction && (i.value = !1);
|
|
39
|
+
},
|
|
40
|
+
onAction: e.onAction ? async (n) => {
|
|
36
41
|
try {
|
|
37
|
-
await e.onAction?.(
|
|
42
|
+
await e.onAction?.(n);
|
|
38
43
|
} finally {
|
|
39
44
|
i.value = !1;
|
|
40
45
|
}
|
|
41
|
-
}
|
|
46
|
+
} : void 0
|
|
42
47
|
})));
|
|
43
|
-
return (e,
|
|
48
|
+
return (e, n) => (t(), r(o(V), {
|
|
44
49
|
open: i.value,
|
|
45
|
-
"onUpdate:open": a[0] || (a[0] = (r) => i.value = r),
|
|
46
50
|
trigger: e.trigger,
|
|
47
51
|
placement: e.placement,
|
|
48
|
-
class: s(o(
|
|
52
|
+
class: s(o(f)),
|
|
53
|
+
onOpenChange: v
|
|
49
54
|
}, {
|
|
50
|
-
overlay:
|
|
51
|
-
d(o(
|
|
52
|
-
default:
|
|
53
|
-
(t(!0),
|
|
54
|
-
key:
|
|
55
|
-
class: s([o(
|
|
55
|
+
overlay: a(() => [
|
|
56
|
+
d(o(z), null, {
|
|
57
|
+
default: a(() => [
|
|
58
|
+
(t(!0), N($, null, L(k.value, (l, h) => (t(), r(o(E), {
|
|
59
|
+
key: h,
|
|
60
|
+
class: s([o(f), o(c)("item")])
|
|
56
61
|
}, {
|
|
57
|
-
default:
|
|
58
|
-
|
|
62
|
+
default: a(() => [
|
|
63
|
+
l.modalProps ? (t(), r(R, m({
|
|
59
64
|
key: 0,
|
|
60
65
|
ref_for: !0
|
|
61
|
-
},
|
|
66
|
+
}, l), null, 16)) : l.popconfirmProps ? (t(), r(U, m({
|
|
62
67
|
key: 1,
|
|
63
68
|
ref_for: !0
|
|
64
|
-
},
|
|
69
|
+
}, l), null, 16)) : (t(), r(g, m({
|
|
65
70
|
key: 2,
|
|
66
71
|
ref_for: !0
|
|
67
|
-
},
|
|
72
|
+
}, l), null, 16))
|
|
68
73
|
]),
|
|
69
74
|
_: 2
|
|
70
75
|
}, 1032, ["class"]))), 128))
|
|
@@ -72,19 +77,19 @@ const ee = /* @__PURE__ */ w({
|
|
|
72
77
|
_: 1
|
|
73
78
|
})
|
|
74
79
|
]),
|
|
75
|
-
default:
|
|
76
|
-
|
|
80
|
+
default: a(() => [
|
|
81
|
+
u("span", {
|
|
77
82
|
class: s(o(_)())
|
|
78
83
|
}, [
|
|
79
|
-
d(
|
|
80
|
-
default:
|
|
84
|
+
d(g, B(b(o(S)(p, ["actions", "trigger", "placement", "text"]))), {
|
|
85
|
+
default: a(() => [
|
|
81
86
|
I(e.$slots, "default", {}, () => [
|
|
82
|
-
(t(),
|
|
87
|
+
(t(), r(D(() => e.text)))
|
|
83
88
|
]),
|
|
84
|
-
|
|
85
|
-
class: s(o(
|
|
89
|
+
u("span", {
|
|
90
|
+
class: s(o(c)("icon"))
|
|
86
91
|
}, [
|
|
87
|
-
e.showIcon ? (t(),
|
|
92
|
+
e.showIcon ? (t(), r(o(F), { key: 0 })) : P("", !0)
|
|
88
93
|
], 2)
|
|
89
94
|
]),
|
|
90
95
|
_: 3
|
|
@@ -96,5 +101,5 @@ const ee = /* @__PURE__ */ w({
|
|
|
96
101
|
}
|
|
97
102
|
});
|
|
98
103
|
export {
|
|
99
|
-
|
|
104
|
+
oe as default
|
|
100
105
|
};
|
|
@@ -1,27 +1,33 @@
|
|
|
1
|
-
import { genComponentStyleHook as
|
|
2
|
-
const l = (
|
|
3
|
-
const { componentCls:
|
|
1
|
+
import { genComponentStyleHook as t } from "../../utils/cssinjs/index.mjs";
|
|
2
|
+
const l = (n) => {
|
|
3
|
+
const { componentCls: e, namespace: o } = n, i = `.${o}-action-item`;
|
|
4
4
|
return {
|
|
5
|
-
[
|
|
5
|
+
[e]: {
|
|
6
6
|
display: "inline-flex",
|
|
7
7
|
flexDirection: "row",
|
|
8
8
|
alignItems: "center",
|
|
9
9
|
// dropdown menu item
|
|
10
10
|
"&__item": {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
padding: "0px !important",
|
|
12
|
+
[i]: {
|
|
13
|
+
width: "100%",
|
|
14
|
+
paddingInline: "12px",
|
|
15
|
+
paddingBlock: "6px"
|
|
16
|
+
},
|
|
17
|
+
[`${i}--loading`]: {
|
|
18
|
+
marginInlineEnd: n.calc(n.spaceXS).mul(-3).equal()
|
|
13
19
|
}
|
|
14
20
|
},
|
|
15
|
-
[`${
|
|
16
|
-
fontSize:
|
|
21
|
+
[`${e}__icon`]: {
|
|
22
|
+
fontSize: n.fontSize,
|
|
17
23
|
display: "inline-flex"
|
|
18
24
|
}
|
|
19
25
|
}
|
|
20
26
|
};
|
|
21
|
-
},
|
|
22
|
-
l(
|
|
27
|
+
}, p = t("ApAction.Dropdown", (n) => [
|
|
28
|
+
l(n)
|
|
23
29
|
]);
|
|
24
30
|
export {
|
|
25
|
-
|
|
31
|
+
p as default,
|
|
26
32
|
l as genActionDropdownItemStyle
|
|
27
33
|
};
|
|
@@ -2,11 +2,11 @@ import { resetComponent as t } from "../../style/index.mjs";
|
|
|
2
2
|
import { genComponentStyleHook as s } from "../../utils/cssinjs/index.mjs";
|
|
3
3
|
const d = (o) => {
|
|
4
4
|
const {
|
|
5
|
-
loadingOpacity:
|
|
6
|
-
colorLink:
|
|
5
|
+
loadingOpacity: r,
|
|
6
|
+
colorLink: n,
|
|
7
7
|
colorSuccess: a,
|
|
8
|
-
colorError:
|
|
9
|
-
colorWarn:
|
|
8
|
+
colorError: c,
|
|
9
|
+
colorWarn: l,
|
|
10
10
|
componentCls: i
|
|
11
11
|
} = o;
|
|
12
12
|
return {
|
|
@@ -23,7 +23,7 @@ const d = (o) => {
|
|
|
23
23
|
opacity: 0.7
|
|
24
24
|
},
|
|
25
25
|
"&--primary": {
|
|
26
|
-
color:
|
|
26
|
+
color: n,
|
|
27
27
|
[`&${i}--disabled`]: {
|
|
28
28
|
color: o.colorLinkDisabled
|
|
29
29
|
}
|
|
@@ -35,19 +35,19 @@ const d = (o) => {
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"&--error": {
|
|
38
|
-
color:
|
|
38
|
+
color: c,
|
|
39
39
|
[`&${i}--disabled`]: {
|
|
40
40
|
color: o.colorErrorDisabled
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"&--warn": {
|
|
44
|
-
color:
|
|
44
|
+
color: l,
|
|
45
45
|
[`&${i}--disabled`]: {
|
|
46
46
|
color: o.colorWarnDisabled
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"&--loading": {
|
|
50
|
-
opacity:
|
|
50
|
+
opacity: r,
|
|
51
51
|
transition: `opacity ${o.motionDurationMid}`,
|
|
52
52
|
cursor: "default",
|
|
53
53
|
[`&${i}--disabled`]: {
|
|
@@ -65,7 +65,6 @@ const d = (o) => {
|
|
|
65
65
|
},
|
|
66
66
|
[`${i}-loading-icon`]: {
|
|
67
67
|
display: "inline-block",
|
|
68
|
-
lineHeight: 0,
|
|
69
68
|
transition: ["width", "opacity", "margin"].map(
|
|
70
69
|
(e) => `${e} ${o.motionDurationSlow} ${o.apActionLoadingIconEase}`
|
|
71
70
|
).join(",")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { genComponentStyleHook as
|
|
2
|
-
const
|
|
3
|
-
const { componentCls: e, namespace:
|
|
1
|
+
import { genComponentStyleHook as o } from "../../utils/cssinjs/index.mjs";
|
|
2
|
+
const l = (n) => {
|
|
3
|
+
const { componentCls: e, namespace: t, antdv: i } = n, r = `${e}--disabled`, a = n.calc(n.controlHeight).sub(n.calc(n.lineWidth).mul(2)).equal();
|
|
4
4
|
return {
|
|
5
5
|
[e]: {
|
|
6
6
|
// bordered
|
|
@@ -12,7 +12,7 @@ const o = (n) => {
|
|
|
12
12
|
".ant-input-affix-wrapper": {
|
|
13
13
|
padding: 0
|
|
14
14
|
},
|
|
15
|
-
[`&:has(.${
|
|
15
|
+
[`&:has(.${t}-batch-input-group):has(.ant-select)`]: {
|
|
16
16
|
".ant-input-affix-wrapper": {
|
|
17
17
|
paddingInlineEnd: n.space
|
|
18
18
|
}
|
|
@@ -23,7 +23,7 @@ const o = (n) => {
|
|
|
23
23
|
paddingInlineStart: 0
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
-
[`&:has(div.${
|
|
26
|
+
[`&:has(div.${t}-batch-input-group .ant-input)`]: {
|
|
27
27
|
paddingInlineEnd: n.space,
|
|
28
28
|
".ant-input": {
|
|
29
29
|
paddingInlineStart: 0
|
|
@@ -52,7 +52,7 @@ const o = (n) => {
|
|
|
52
52
|
background: "unset !important"
|
|
53
53
|
},
|
|
54
54
|
".ant-select-single .ant-select-selector": {
|
|
55
|
-
height: `${
|
|
55
|
+
height: `${a} !important`
|
|
56
56
|
},
|
|
57
57
|
"input.ant-input-number-input": {
|
|
58
58
|
paddingInlineStart: 0
|
|
@@ -72,25 +72,25 @@ const o = (n) => {
|
|
|
72
72
|
},
|
|
73
73
|
".ant-form-item-label > label": {
|
|
74
74
|
paddingRight: n.spaceLG,
|
|
75
|
-
height:
|
|
75
|
+
height: a,
|
|
76
76
|
"&::after": {
|
|
77
77
|
margin: 0
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
".ant-form-item-control-input": {
|
|
81
|
-
minHeight:
|
|
81
|
+
minHeight: a,
|
|
82
82
|
".ant-select-single": {
|
|
83
83
|
height: "unset"
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
|
-
[`&:hover:not(${
|
|
86
|
+
[`&:hover:not(${r})`]: {
|
|
87
87
|
borderColor: n.hoverColorBase
|
|
88
88
|
},
|
|
89
89
|
"&:focus": {
|
|
90
90
|
borderColor: n.activeColorBase,
|
|
91
|
-
boxShadow:
|
|
91
|
+
boxShadow: `0 0 0 2px ${n.calc(i.controlOutline).colorMix(10)}`
|
|
92
92
|
},
|
|
93
|
-
[`.${
|
|
93
|
+
[`.${t}-batch-input-group-popover-input__popover`]: {
|
|
94
94
|
width: "calc(100% + 12px)"
|
|
95
95
|
}
|
|
96
96
|
},
|
|
@@ -105,7 +105,7 @@ const o = (n) => {
|
|
|
105
105
|
// focus
|
|
106
106
|
"&--focused": {
|
|
107
107
|
borderColor: n.activeColorBase,
|
|
108
|
-
boxShadow:
|
|
108
|
+
boxShadow: `0 0 0 2px ${n.calc(i.controlOutline).colorMix(10)}`
|
|
109
109
|
},
|
|
110
110
|
// other
|
|
111
111
|
".ant-form-show-help": {
|
|
@@ -132,8 +132,8 @@ const o = (n) => {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
|
-
},
|
|
135
|
+
}, d = o("ApForm", (n) => [l(n)]);
|
|
136
136
|
export {
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
d as default,
|
|
138
|
+
l as genApFormItemStyle
|
|
139
139
|
};
|
|
@@ -166,6 +166,18 @@ export declare const configProviderProps: () => {
|
|
|
166
166
|
apTitle: {
|
|
167
167
|
type: PropType<ApTitleConfig>;
|
|
168
168
|
};
|
|
169
|
+
searchForm: {
|
|
170
|
+
type: PropType<SearchFormGlobalConfig>;
|
|
171
|
+
default: () => {};
|
|
172
|
+
};
|
|
173
|
+
apUpload: {
|
|
174
|
+
type: PropType<ApUploadConfig>;
|
|
175
|
+
default: () => {};
|
|
176
|
+
};
|
|
177
|
+
apDescriptions: {
|
|
178
|
+
type: PropType<ApDescriptionsConfig>;
|
|
179
|
+
default: () => {};
|
|
180
|
+
};
|
|
169
181
|
/**
|
|
170
182
|
* @description aplus-ui的locale
|
|
171
183
|
*/
|
|
@@ -191,14 +203,6 @@ export declare const configProviderProps: () => {
|
|
|
191
203
|
uiMode: {
|
|
192
204
|
type: PropType<UiModeType>;
|
|
193
205
|
};
|
|
194
|
-
apUpload: {
|
|
195
|
-
type: PropType<ApUploadConfig>;
|
|
196
|
-
default: () => {};
|
|
197
|
-
};
|
|
198
|
-
apDescriptions: {
|
|
199
|
-
type: PropType<ApDescriptionsConfig>;
|
|
200
|
-
default: () => {};
|
|
201
|
-
};
|
|
202
206
|
valueTypeMap: {
|
|
203
207
|
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
204
208
|
default: () => {};
|
|
@@ -218,10 +222,6 @@ export declare const configProviderProps: () => {
|
|
|
218
222
|
type: PropType<ViewCacheOption>;
|
|
219
223
|
default: () => {};
|
|
220
224
|
};
|
|
221
|
-
searchForm: {
|
|
222
|
-
type: PropType<SearchFormGlobalConfig>;
|
|
223
|
-
default: () => {};
|
|
224
|
-
};
|
|
225
225
|
};
|
|
226
226
|
export type ConfigProviderProps = Partial<ExtractPropTypes<ReturnType<typeof configProviderProps>>>;
|
|
227
227
|
export {};
|
|
@@ -14,6 +14,18 @@ const t = () => ({
|
|
|
14
14
|
},
|
|
15
15
|
apTitle: {
|
|
16
16
|
type: Object
|
|
17
|
+
},
|
|
18
|
+
searchForm: {
|
|
19
|
+
type: Object,
|
|
20
|
+
default: () => ({})
|
|
21
|
+
},
|
|
22
|
+
apUpload: {
|
|
23
|
+
type: Object,
|
|
24
|
+
default: () => ({})
|
|
25
|
+
},
|
|
26
|
+
apDescriptions: {
|
|
27
|
+
type: Object,
|
|
28
|
+
default: () => ({})
|
|
17
29
|
}
|
|
18
30
|
}), o = () => ({
|
|
19
31
|
/**
|
|
@@ -41,14 +53,6 @@ const t = () => ({
|
|
|
41
53
|
uiMode: {
|
|
42
54
|
type: String
|
|
43
55
|
},
|
|
44
|
-
apUpload: {
|
|
45
|
-
type: Object,
|
|
46
|
-
default: () => ({})
|
|
47
|
-
},
|
|
48
|
-
apDescriptions: {
|
|
49
|
-
type: Object,
|
|
50
|
-
default: () => ({})
|
|
51
|
-
},
|
|
52
56
|
valueTypeMap: {
|
|
53
57
|
type: Object,
|
|
54
58
|
default: () => ({})
|
|
@@ -68,10 +72,6 @@ const t = () => ({
|
|
|
68
72
|
type: Object,
|
|
69
73
|
default: () => ({})
|
|
70
74
|
},
|
|
71
|
-
searchForm: {
|
|
72
|
-
type: Object,
|
|
73
|
-
default: () => ({})
|
|
74
|
-
},
|
|
75
75
|
...t(),
|
|
76
76
|
...e()
|
|
77
77
|
});
|
|
@@ -7,7 +7,7 @@ import { Locale } from '@aplus-frontend/antdv/es/locale';
|
|
|
7
7
|
import { ButtonSize } from '@aplus-frontend/antdv/es/button';
|
|
8
8
|
import { ThemeConfig, InputConfig, PaginationConfig, FormConfig, SelectConfig, CascaderConfig, DatePickerConfig, RangePickerConfig, TreeSelectConfig, TextAreaConfig, InputNumberConfig, MentionsConfig, TimePickerConfig, CardConfig } from '@aplus-frontend/antdv/es/config-provider/context';
|
|
9
9
|
import { ApGridRowSelection, AgGridRowSelection, FullToken, ViewCacheOption } from '..';
|
|
10
|
-
import { UiModeType,
|
|
10
|
+
import { UiModeType, SearchFormGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ApiType, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField } from './constants';
|
|
11
11
|
import { LocaleType } from '../locale';
|
|
12
12
|
import { RecursivePartial } from '../type';
|
|
13
13
|
export declare const globalConfigCached: Ref<ConfigProviderProps>;
|
|
@@ -168,6 +168,18 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
168
168
|
uiMode?: UiModeType | undefined;
|
|
169
169
|
}>;
|
|
170
170
|
};
|
|
171
|
+
searchForm: {
|
|
172
|
+
type: PropType<SearchFormGlobalConfig>;
|
|
173
|
+
default: () => {};
|
|
174
|
+
};
|
|
175
|
+
apUpload: {
|
|
176
|
+
type: PropType<ApUploadConfig>;
|
|
177
|
+
default: () => {};
|
|
178
|
+
};
|
|
179
|
+
apDescriptions: {
|
|
180
|
+
type: PropType<ApDescriptionsConfig>;
|
|
181
|
+
default: () => {};
|
|
182
|
+
};
|
|
171
183
|
aplusLocale: {
|
|
172
184
|
type: PropType<LocaleType>;
|
|
173
185
|
};
|
|
@@ -184,14 +196,6 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
184
196
|
uiMode: {
|
|
185
197
|
type: PropType<UiModeType>;
|
|
186
198
|
};
|
|
187
|
-
apUpload: {
|
|
188
|
-
type: PropType<ApUploadConfig>;
|
|
189
|
-
default: () => {};
|
|
190
|
-
};
|
|
191
|
-
apDescriptions: {
|
|
192
|
-
type: PropType<ApDescriptionsConfig>;
|
|
193
|
-
default: () => {};
|
|
194
|
-
};
|
|
195
199
|
valueTypeMap: {
|
|
196
200
|
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
197
201
|
default: () => {};
|
|
@@ -211,10 +215,6 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
211
215
|
type: PropType<ViewCacheOption>;
|
|
212
216
|
default: () => {};
|
|
213
217
|
};
|
|
214
|
-
searchForm: {
|
|
215
|
-
type: PropType<SearchFormGlobalConfig>;
|
|
216
|
-
default: () => {};
|
|
217
|
-
};
|
|
218
218
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
219
219
|
iconPrefixCls: StringConstructor;
|
|
220
220
|
getTargetContainer: {
|
|
@@ -372,6 +372,18 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
372
372
|
uiMode?: UiModeType | undefined;
|
|
373
373
|
}>;
|
|
374
374
|
};
|
|
375
|
+
searchForm: {
|
|
376
|
+
type: PropType<SearchFormGlobalConfig>;
|
|
377
|
+
default: () => {};
|
|
378
|
+
};
|
|
379
|
+
apUpload: {
|
|
380
|
+
type: PropType<ApUploadConfig>;
|
|
381
|
+
default: () => {};
|
|
382
|
+
};
|
|
383
|
+
apDescriptions: {
|
|
384
|
+
type: PropType<ApDescriptionsConfig>;
|
|
385
|
+
default: () => {};
|
|
386
|
+
};
|
|
375
387
|
aplusLocale: {
|
|
376
388
|
type: PropType<LocaleType>;
|
|
377
389
|
};
|
|
@@ -388,14 +400,6 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
388
400
|
uiMode: {
|
|
389
401
|
type: PropType<UiModeType>;
|
|
390
402
|
};
|
|
391
|
-
apUpload: {
|
|
392
|
-
type: PropType<ApUploadConfig>;
|
|
393
|
-
default: () => {};
|
|
394
|
-
};
|
|
395
|
-
apDescriptions: {
|
|
396
|
-
type: PropType<ApDescriptionsConfig>;
|
|
397
|
-
default: () => {};
|
|
398
|
-
};
|
|
399
403
|
valueTypeMap: {
|
|
400
404
|
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
401
405
|
default: () => {};
|
|
@@ -415,10 +419,6 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
415
419
|
type: PropType<ViewCacheOption>;
|
|
416
420
|
default: () => {};
|
|
417
421
|
};
|
|
418
|
-
searchForm: {
|
|
419
|
-
type: PropType<SearchFormGlobalConfig>;
|
|
420
|
-
default: () => {};
|
|
421
|
-
};
|
|
422
422
|
}>> & Readonly<{}>, {
|
|
423
423
|
input: InputConfig;
|
|
424
424
|
select: SelectConfig;
|
|
@@ -451,12 +451,12 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
451
451
|
timePicker: TimePickerConfig;
|
|
452
452
|
card: CardConfig;
|
|
453
453
|
apUpload: ApUploadConfig;
|
|
454
|
-
|
|
454
|
+
searchForm: SearchFormGlobalConfig;
|
|
455
455
|
apDescriptions: ApDescriptionsConfig;
|
|
456
|
+
api: ApiType;
|
|
456
457
|
valueTypeMap: Record<string, ValueTypeRenderConfig>;
|
|
457
458
|
downloadCenterTriggerConfig: downloadCenterTriggerConfig;
|
|
458
459
|
exportField: ExportField;
|
|
459
460
|
viewCacheOption: ViewCacheOption;
|
|
460
|
-
searchForm: SearchFormGlobalConfig;
|
|
461
461
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
462
462
|
export type ConfigProviderInstance = InstanceType<typeof ConfigProvider>;
|
|
@@ -1,63 +1,65 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { ConfigProvider as
|
|
3
|
-
import { useDevWarning as
|
|
4
|
-
import { mergeAntdProviderConfigWithCache as
|
|
5
|
-
import { configProviderProps as
|
|
6
|
-
import { DEFAULT_NAMESPACE as
|
|
7
|
-
import { useGlobalConfig as
|
|
8
|
-
function
|
|
9
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1
|
+
import { isVNode as m, ref as f, defineComponent as p, computed as s, watch as v, onActivated as C, createVNode as P, renderSlot as h } from "vue";
|
|
2
|
+
import { ConfigProvider as T } from "@aplus-frontend/antdv";
|
|
3
|
+
import { useDevWarning as b } from "../utils/warning.mjs";
|
|
4
|
+
import { mergeAntdProviderConfigWithCache as t, mergeAntdProvideConfig as n } from "../utils/config-provider-preset.mjs";
|
|
5
|
+
import { configProviderProps as w } from "./config-provider-props.mjs";
|
|
6
|
+
import { DEFAULT_NAMESPACE as A } from "./constants.mjs";
|
|
7
|
+
import { useGlobalConfig as D, provideGlobalConfig as F } from "./hooks/use-global-config.mjs";
|
|
8
|
+
function G(e) {
|
|
9
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !m(e);
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const i = f({}), E = /* @__PURE__ */ p({
|
|
12
12
|
name: "AplusConfigProvider",
|
|
13
|
-
props:
|
|
13
|
+
props: w(),
|
|
14
14
|
setup(e, {
|
|
15
|
-
slots:
|
|
15
|
+
slots: l
|
|
16
16
|
}) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
b("ConfigProvider")(!e.uiMode, "breaking", "uiMode has been remove, see migrate guild https://aplus.aplnk.com/aplus-ui/guild/migrate-7.2.html");
|
|
18
|
+
function o(a, c) {
|
|
19
|
+
return e[a] ?? d.value?.[a] ?? c;
|
|
20
|
+
}
|
|
21
|
+
const d = D(), u = s(() => ({
|
|
22
|
+
namespace: o("namespace", A),
|
|
23
|
+
apGrid: o("apGrid"),
|
|
24
|
+
agGrid: o("agGrid"),
|
|
25
|
+
apProCard: o("apProCard"),
|
|
26
|
+
apImage: o("apImage"),
|
|
27
|
+
apTitle: o("apTitle"),
|
|
28
|
+
searchForm: o("searchForm"),
|
|
29
|
+
apUpload: o("apUpload"),
|
|
30
|
+
apDescriptions: o("apDescriptions"),
|
|
22
31
|
aplusLocale: e.aplusLocale,
|
|
23
32
|
aplusToken: e.aplusToken,
|
|
24
33
|
api: e.api,
|
|
25
|
-
apUpload: e.apUpload,
|
|
26
|
-
apDescriptions: e.apDescriptions,
|
|
27
34
|
valueTypeMap: e.valueTypeMap,
|
|
28
35
|
downloadCenterTriggerConfig: e.downloadCenterTriggerConfig,
|
|
29
36
|
exportField: e.exportField,
|
|
30
37
|
scrollYDomName: e.scrollYDomName,
|
|
31
|
-
viewCacheOption: e.viewCacheOption
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
apImage: n(v),
|
|
37
|
-
apTitle: n(C)
|
|
38
|
-
})), s = k(p);
|
|
39
|
-
return h(() => e, (o) => {
|
|
40
|
-
r.value = d(l(o), r.value);
|
|
38
|
+
viewCacheOption: e.viewCacheOption
|
|
39
|
+
})), g = F(u);
|
|
40
|
+
let r = !0;
|
|
41
|
+
return v(() => e, (a) => {
|
|
42
|
+
i.value = t(n(a), i.value);
|
|
41
43
|
}, {
|
|
42
44
|
deep: !0,
|
|
43
45
|
immediate: !0
|
|
44
|
-
}),
|
|
45
|
-
if (
|
|
46
|
-
|
|
46
|
+
}), C(() => {
|
|
47
|
+
if (r) {
|
|
48
|
+
r = !1;
|
|
47
49
|
return;
|
|
48
50
|
}
|
|
49
|
-
|
|
51
|
+
i.value = t(n(e), i.value);
|
|
50
52
|
}), () => {
|
|
51
|
-
let
|
|
52
|
-
return
|
|
53
|
-
config:
|
|
54
|
-
})) ?
|
|
55
|
-
default: () => [
|
|
53
|
+
let a;
|
|
54
|
+
return P(T, i.value, G(a = h(l, "default", {
|
|
55
|
+
config: g?.value
|
|
56
|
+
})) ? a : {
|
|
57
|
+
default: () => [a]
|
|
56
58
|
});
|
|
57
59
|
};
|
|
58
60
|
}
|
|
59
61
|
});
|
|
60
62
|
export {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
E as ConfigProvider,
|
|
64
|
+
i as globalConfigCached
|
|
63
65
|
};
|